diff --git a/404.html b/404.html index 732d4ac07..5d129009c 100644 --- a/404.html +++ b/404.html @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/7195.8d200519daa4128381f8.js b/7195.8d200519daa4128381f8.js deleted file mode 100644 index 67f9ee494..000000000 --- a/7195.8d200519daa4128381f8.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunktui_editor=self.webpackChunktui_editor||[]).push([[7195],{43283:(t,e,n)=>{function r(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))})),t}function o(t){return Object.prototype.toString.call(t)}function i(t){return"[object Function]"===o(t)}function s(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(t,e,n){var r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){var r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){var r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(t){var e=t.re=n(82264)(t.__opts__),r=t.__tlds__.slice();function a(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push(c),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(a(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(a(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(a(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(a(e.tpl_host_fuzzy_test),"i");var l=[];function d(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){var n=t.__schemas__[e];if(null!==n){var r={validate:null,link:null};if(t.__compiled__[e]=r,"[object Object]"===o(n))return"[object RegExp]"!==o(n.validate)?i(n.validate)?r.validate=n.validate:d(e,n):r.validate=function(t){return function(e,n){var r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?d(e,n):r.normalize=function(t,e){e.normalize(t)});"[object String]"!==o(n)?d(e,n):l.push(e)}})),l.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};var u=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(s).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+u+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+u+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function h(t,e){var n=t.__index__,r=t.__last_index__,o=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=o,this.text=o,this.url=o}function p(t,e){var n=new h(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function f(t,e){if(!(this instanceof f))return new f(t,e);var n;e||(n=t,Object.keys(n||{}).reduce((function(t,e){return t||a.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=r({},a,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,t),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},u(this)}f.prototype.add=function(t,e){return this.__schemas__[t]=e,u(this),this},f.prototype.set=function(t){return this.__opts__=r(this.__opts__,t),this},f.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var e,n,r,o,i,s,a,l;if(this.re.schema_test.test(t))for((a=this.re.schema_search).lastIndex=0;null!==(e=a.exec(t));)if(o=this.testSchemaAt(t,e[2],a.lastIndex)){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l=0&&null!==(r=t.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),this.__index__>=0},f.prototype.pretest=function(t){return this.re.pretest.test(t)},f.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0},f.prototype.match=function(t){var e=0,n=[];this.__index__>=0&&this.__text_cache__===t&&(n.push(p(this,e)),e=this.__last_index__);for(var r=e?t.slice(e):t;this.test(r);)n.push(p(this,e)),r=r.slice(this.__last_index__),e+=this.__last_index__;return n.length?n:null},f.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;var e=this.re.schema_at_start.exec(t);if(!e)return null;var n=this.testSchemaAt(t,e[2],e[0].length);return n?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+n,p(this,0)):null},f.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,n){return t!==n[e-1]})).reverse(),u(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,u(this),this)},f.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},f.prototype.onCompile=function(){},t.exports=f},82264:(t,e,n)=>{t.exports=function(t){var e={};return t=t||{},e.src_Any=n(47531).source,e.src_Cc=n(87701).source,e.src_Z=n(72927).source,e.src_P=n(76155).source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|"),e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}},82033:(t,e,n)=>{t.exports=n(53612)},27973:(t,e,n)=>{t.exports=n(93854)},7661:t=>{t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},91418:t=>{var e="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+e+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),o=new RegExp("^(?:"+e+"|"+n+")");t.exports.n=r,t.exports.q=o},1128:(t,e,n)=>{var r=Object.prototype.hasOwnProperty;function o(t,e){return r.call(t,e)}function i(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function s(t){if(t>65535){var e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i,d=n(27973),u=/[&<>"]/,h=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function f(t){return p[t]}var m=/[.?*+^$[\]\\(){}|-]/g,g=n(76155);e.lib={},e.lib.mdurl=n(59213),e.lib.ucmicro=n(98786),e.assign=function(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t},e.isString=function(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)},e.has=o,e.unescapeMd=function(t){return t.indexOf("\\")<0?t:t.replace(a,"$1")},e.unescapeAll=function(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(l,(function(t,e,n){return e||function(t,e){var n;return o(d,e)?d[e]:35===e.charCodeAt(0)&&c.test(e)&&i(n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10))?s(n):t}(t,n)}))},e.isValidEntityCode=i,e.fromCodePoint=s,e.escapeHtml=function(t){return u.test(t)?t.replace(h,f):t},e.arrayReplaceAt=function(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))},e.isSpace=function(t){switch(t){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(t){return g.test(t)},e.escapeRE=function(t){return t.replace(m,"\\$&")},e.normalizeReference=function(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}},83415:(t,e,n)=>{e.parseLinkLabel=n(82111),e.parseLinkDestination=n(42565),e.parseLinkTitle=n(24364)},42565:(t,e,n)=>{var r=n(1128).unescapeAll;t.exports=function(t,e,n){var o,i,s=e,a={ok:!1,pos:0,lines:0,str:""};if(60===t.charCodeAt(s)){for(s++;s32)return a;if(41===o){if(0===i)break;i--}s++}return e===s||0!==i||(a.str=r(t.slice(e,s)),a.pos=s,a.ok=!0),a}},82111:t=>{t.exports=function(t,e,n){var r,o,i,s,a=-1,l=t.posMax,c=t.pos;for(t.pos=e+1,r=1;t.pos{var r=n(1128).unescapeAll;t.exports=function(t,e,n){var o,i,s=0,a=e,l={ok:!1,pos:0,lines:0,str:""};if(a>=n)return l;if(34!==(i=t.charCodeAt(a))&&39!==i&&40!==i)return l;for(a++,40===i&&(i=41);a{var r=n(1128),o=n(83415),i=n(8696),s=n(88785),a=n(79304),l=n(76596),c=n(43283),d=n(59213),u=n(61911),h={default:n(18910),zero:n(85123),commonmark:n(16535)},p=/^(vbscript|javascript|file|data):/,f=/^data:image\/(gif|png|jpeg|webp);/;function m(t){var e=t.trim().toLowerCase();return!p.test(e)||!!f.test(e)}var g=["http:","https:","mailto:"];function b(t){var e=d.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toASCII(e.hostname)}catch(t){}return d.encode(d.format(e))}function k(t){var e=d.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toUnicode(e.hostname)}catch(t){}return d.decode(d.format(e),d.decode.defaultChars+"%")}function v(t,e){if(!(this instanceof v))return new v(t,e);e||r.isString(t)||(e=t||{},t="default"),this.inline=new l,this.block=new a,this.core=new s,this.renderer=new i,this.linkify=new c,this.validateLink=m,this.normalizeLink=b,this.normalizeLinkText=k,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(t),e&&this.set(e)}v.prototype.set=function(t){return r.assign(this.options,t),this},v.prototype.configure=function(t){var e,n=this;if(r.isString(t)&&!(t=h[e=t]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach((function(e){t.components[e].rules&&n[e].ruler.enableOnly(t.components[e].rules),t.components[e].rules2&&n[e].ruler2.enableOnly(t.components[e].rules2)})),this},v.prototype.enable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.enable(t,!0))}),this),n=n.concat(this.inline.ruler2.enable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},v.prototype.disable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.disable(t,!0))}),this),n=n.concat(this.inline.ruler2.disable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},v.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},v.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");var n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},v.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},v.prototype.parseInline=function(t,e){var n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},v.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)},t.exports=v},79304:(t,e,n)=>{var r=n(49199),o=[["table",n(6938),["paragraph","reference"]],["code",n(13670)],["fence",n(18306),["paragraph","reference","blockquote","list"]],["blockquote",n(49699),["paragraph","reference","blockquote","list"]],["hr",n(15297),["paragraph","reference","blockquote","list"]],["list",n(81890),["paragraph","reference","blockquote"]],["reference",n(78731)],["html_block",n(5849),["paragraph","reference","blockquote"]],["heading",n(91002),["paragraph","reference","blockquote"]],["lheading",n(14781)],["paragraph",n(14408)]];function i(){this.ruler=new r;for(var t=0;t=n))&&!(t.sCount[l]=d){t.line=n;break}for(i=t.line,o=0;o=t.line)throw new Error("block rule didn't increment state.line");break}if(!r)throw new Error("none of the block rules matched");t.tight=!c,t.isEmpty(t.line-1)&&(c=!0),(l=t.line){var r=n(49199),o=[["normalize",n(15863)],["block",n(52770)],["inline",n(95390)],["linkify",n(91145)],["replacements",n(17928)],["smartquotes",n(5442)],["text_join",n(58919)]];function i(){this.ruler=new r;for(var t=0;t{var r=n(49199),o=[["text",n(58060)],["linkify",n(42876)],["newline",n(11078)],["escape",n(33747)],["backticks",n(94980)],["strikethrough",n(83182).w],["emphasis",n(80997).w],["link",n(14159)],["image",n(75012)],["autolink",n(51905)],["html_inline",n(53636)],["entity",n(97459)]],i=[["balance_pairs",n(21614)],["strikethrough",n(83182).g],["emphasis",n(80997).g],["fragments_join",n(97494)]];function s(){var t;for(this.ruler=new r,t=0;t=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;e||t.pos++,a[r]=t.pos}else t.pos=a[r]},s.prototype.tokenize=function(t){for(var e,n,r,o=this.ruler.getRules(""),i=o.length,s=t.posMax,a=t.md.options.maxNesting;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(e){if(t.pos>=s)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},s.prototype.parse=function(t,e,n,r){var o,i,s,a=new this.State(t,e,n,r);for(this.tokenize(a),s=(i=this.ruler2.getRules("")).length,o=0;o{t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},18910:t=>{t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},85123:t=>{t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}}},8696:(t,e,n)=>{var r=n(1128).assign,o=n(1128).unescapeAll,i=n(1128).escapeHtml,s={};function a(){this.rules=r({},s)}s.code_inline=function(t,e,n,r,o){var s=t[e];return""+i(s.content)+""},s.code_block=function(t,e,n,r,o){var s=t[e];return""+i(t[e].content)+"\n"},s.fence=function(t,e,n,r,s){var a,l,c,d,u,h=t[e],p=h.info?o(h.info).trim():"",f="",m="";return p&&(f=(c=p.split(/(\s+)/g))[0],m=c.slice(2).join("")),0===(a=n.highlight&&n.highlight(h.content,f,m)||i(h.content)).indexOf(""+a+"\n"):"
"+a+"
\n"},s.image=function(t,e,n,r,o){var i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(t,e,n)},s.hardbreak=function(t,e,n){return n.xhtmlOut?"
\n":"
\n"},s.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},s.text=function(t,e){return i(t[e].content)},s.html_block=function(t,e){return t[e].content},s.html_inline=function(t,e){return t[e].content},a.prototype.renderAttrs=function(t){var e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e\n":">")},a.prototype.renderInline=function(t,e,n){for(var r,o="",i=this.rules,s=0,a=t.length;s{function e(){this.__rules__=[],this.__cache__=null}e.prototype.__find__=function(t){for(var e=0;e{var r=n(1128).isSpace;t.exports=function(t,e,n,o){var i,s,a,l,c,d,u,h,p,f,m,g,b,k,v,y,w,x,C,A,M=t.lineMax,S=t.bMarks[e]+t.tShift[e],_=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(62!==t.src.charCodeAt(S))return!1;if(o)return!0;for(f=[],m=[],k=[],v=[],x=t.md.block.ruler.getRules("blockquote"),b=t.parentType,t.parentType="blockquote",h=e;h=(_=t.eMarks[h])));h++)if(62!==t.src.charCodeAt(S++)||A){if(d)break;for(w=!1,a=0,c=x.length;a=_,m.push(t.bsCount[h]),t.bsCount[h]=t.sCount[h]+1+(y?1:0),k.push(t.sCount[h]),t.sCount[h]=p-l,v.push(t.tShift[h]),t.tShift[h]=S-t.bMarks[h]}for(g=t.blkIndent,t.blkIndent=0,(C=t.push("blockquote_open","blockquote",1)).markup=">",C.map=u=[e,0],t.md.block.tokenize(t,e,h),(C=t.push("blockquote_close","blockquote",-1)).markup=">",t.lineMax=M,t.parentType=b,u[1]=t.line,a=0;a{t.exports=function(t,e,n){var r,o,i;if(t.sCount[e]-t.blkIndent<4)return!1;for(o=r=e+1;r=4))break;o=++r}return t.line=o,(i=t.push("code_block","code",0)).content=t.getLines(e,o,4+t.blkIndent,!1)+"\n",i.map=[e,t.line],!0}},18306:t=>{t.exports=function(t,e,n,r){var o,i,s,a,l,c,d,u=!1,h=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(h+3>p)return!1;if(126!==(o=t.src.charCodeAt(h))&&96!==o)return!1;if(l=h,(i=(h=t.skipChars(h,o))-l)<3)return!1;if(d=t.src.slice(l,h),s=t.src.slice(h,p),96===o&&s.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(a=e;!(++a>=n||(h=l=t.bMarks[a]+t.tShift[a])<(p=t.eMarks[a])&&t.sCount[a]=4||(h=t.skipChars(h,o))-l{var r=n(1128).isSpace;t.exports=function(t,e,n,o){var i,s,a,l,c=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(35!==(i=t.src.charCodeAt(c))||c>=d)return!1;for(s=1,i=t.src.charCodeAt(++c);35===i&&c6||cc&&r(t.src.charCodeAt(a-1))&&(d=a),t.line=e+1,(l=t.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),l.map=[e,t.line],(l=t.push("inline","",0)).content=t.src.slice(c,d).trim(),l.map=[e,t.line],l.children=[],(l=t.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s)),0))}},15297:(t,e,n)=>{var r=n(1128).isSpace;t.exports=function(t,e,n,o){var i,s,a,l,c=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(42!==(i=t.src.charCodeAt(c++))&&45!==i&&95!==i)return!1;for(s=1;c{var r=n(7661),o=n(91418).q,i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(t,e,n,r){var o,s,a,l,c=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(c))return!1;for(l=t.src.slice(c,d),o=0;o{t.exports=function(t,e,n){var r,o,i,s,a,l,c,d,u,h,p=e+1,f=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;for(h=t.parentType,t.parentType="paragraph";p3)){if(t.sCount[p]>=t.blkIndent&&(l=t.bMarks[p]+t.tShift[p])<(c=t.eMarks[p])&&(45===(u=t.src.charCodeAt(l))||61===u)&&(l=t.skipChars(l,u),(l=t.skipSpaces(l))>=c)){d=61===u?1:2;break}if(!(t.sCount[p]<0)){for(o=!1,i=0,s=f.length;i{var r=n(1128).isSpace;function o(t,e){var n,o,i,s;return o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e],42!==(n=t.src.charCodeAt(o++))&&45!==n&&43!==n||o=s)return-1;if((n=t.src.charCodeAt(i++))<48||n>57)return-1;for(;;){if(i>=s)return-1;if(!((n=t.src.charCodeAt(i++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(i-o>=10)return-1}return i=4)return!1;if(t.listIndent>=0&&t.sCount[L]-t.listIndent>=4&&t.sCount[L]=t.blkIndent&&(I=!0),(_=i(t,L))>=0){if(h=!0,O=t.bMarks[L]+t.tShift[L],k=Number(t.src.slice(O,_-1)),I&&1!==k)return!1}else{if(!((_=o(t,L))>=0))return!1;h=!1}if(I&&t.skipSpaces(_)>=t.eMarks[L])return!1;if(r)return!0;for(b=t.src.charCodeAt(_-1),g=t.tokens.length,h?(N=t.push("ordered_list_open","ol",1),1!==k&&(N.attrs=[["start",k]])):N=t.push("bullet_list_open","ul",1),N.map=m=[L,0],N.markup=String.fromCharCode(b),T=!1,D=t.md.block.ruler.getRules("list"),x=t.parentType,t.parentType="list";L=v?1:y-u)>4&&(d=1),c=u+d,(N=t.push("list_item_open","li",1)).markup=String.fromCharCode(b),N.map=p=[L,0],h&&(N.info=t.src.slice(O,_-1)),M=t.tight,A=t.tShift[L],C=t.sCount[L],w=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=c,t.tight=!0,t.tShift[L]=a-t.bMarks[L],t.sCount[L]=y,a>=v&&t.isEmpty(L+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,L,n,!0),t.tight&&!T||(R=!1),T=t.line-L>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=w,t.tShift[L]=A,t.sCount[L]=C,t.tight=M,(N=t.push("list_item_close","li",-1)).markup=String.fromCharCode(b),L=t.line,p[1]=L,L>=n)break;if(t.sCount[L]=4)break;for(E=!1,l=0,f=D.length;l{t.exports=function(t,e,n){var r,o,i,s,a,l,c=e+1,d=t.md.block.ruler.getRules("paragraph");for(l=t.parentType,t.parentType="paragraph";c3||t.sCount[c]<0)){for(o=!1,i=0,s=d.length;i{var r=n(1128).normalizeReference,o=n(1128).isSpace;t.exports=function(t,e,n,i){var s,a,l,c,d,u,h,p,f,m,g,b,k,v,y,w,x=0,C=t.bMarks[e]+t.tShift[e],A=t.eMarks[e],M=e+1;if(t.sCount[e]-t.blkIndent>=4)return!1;if(91!==t.src.charCodeAt(C))return!1;for(;++C3||t.sCount[M]<0)){for(v=!1,u=0,h=y.length;u{var r=n(77762),o=n(1128).isSpace;function i(t,e,n,r){var i,s,a,l,c,d,u,h;for(this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",h=!1,a=l=d=u=0,c=(s=this.src).length;l0&&this.level++,this.tokens.push(o),o},i.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},i.prototype.skipEmptyLines=function(t){for(var e=this.lineMax;te;)if(!o(this.src.charCodeAt(--t)))return t+1;return t},i.prototype.skipChars=function(t,e){for(var n=this.src.length;tn;)if(e!==this.src.charCodeAt(--t))return t+1;return t},i.prototype.getLines=function(t,e,n,r){var i,s,a,l,c,d,u,h=t;if(t>=e)return"";for(d=new Array(e-t),i=0;hn?new Array(s-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return d.join("")},i.prototype.Token=r,t.exports=i},6938:(t,e,n)=>{var r=n(1128).isSpace;function o(t,e){var n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function i(t){var e,n=[],r=0,o=t.length,i=!1,s=0,a="";for(e=t.charCodeAt(r);rn)return!1;if(h=e+1,t.sCount[h]=4)return!1;if((c=t.bMarks[h]+t.tShift[h])>=t.eMarks[h])return!1;if(124!==(C=t.src.charCodeAt(c++))&&45!==C&&58!==C)return!1;if(c>=t.eMarks[h])return!1;if(124!==(A=t.src.charCodeAt(c++))&&45!==A&&58!==A&&!r(A))return!1;if(45===C&&r(A))return!1;for(;c=4)return!1;if((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),0===(f=p.length)||f!==g.length)return!1;if(s)return!0;for(y=t.parentType,t.parentType="table",x=t.md.block.ruler.getRules("blockquote"),(m=t.push("table_open","table",1)).map=k=[e,0],(m=t.push("thead_open","thead",1)).map=[e,e+1],(m=t.push("tr_open","tr",1)).map=[e,e+1],d=0;d=4)break;for((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),h===e+2&&((m=t.push("tbody_open","tbody",1)).map=v=[e+2,0]),(m=t.push("tr_open","tr",1)).map=[h,h+1],d=0;d{t.exports=function(t){var e;t.inlineMode?((e=new t.Token("inline","",0)).content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}},95390:t=>{t.exports=function(t){var e,n,r,o=t.tokens;for(n=0,r=o.length;n{var r=n(1128).arrayReplaceAt;function o(t){return/^<\/a\s*>/i.test(t)}t.exports=function(t){var e,n,i,s,a,l,c,d,u,h,p,f,m,g,b,k,v,y,w=t.tokens;if(t.md.options.linkify)for(n=0,i=w.length;n=0;e--)if("link_close"!==(l=s[e]).type){if("html_inline"===l.type&&(y=l.content,/^\s]/i.test(y)&&m>0&&m--,o(l.content)&&m++),!(m>0)&&"text"===l.type&&t.md.linkify.test(l.content)){for(u=l.content,v=t.md.linkify.match(u),c=[],f=l.level,p=0,v.length>0&&0===v[0].index&&e>0&&"text_special"===s[e-1].type&&(v=v.slice(1)),d=0;dp&&((a=new t.Token("text","",0)).content=u.slice(p,h),a.level=f,c.push(a)),(a=new t.Token("link_open","a",1)).attrs=[["href",b]],a.level=f++,a.markup="linkify",a.info="auto",c.push(a),(a=new t.Token("text","",0)).content=k,a.level=f,c.push(a),(a=new t.Token("link_close","a",-1)).level=--f,a.markup="linkify",a.info="auto",c.push(a),p=v[d].lastIndex);p{var e=/\r\n?|\n/g,n=/\0/g;t.exports=function(t){var r;r=(r=t.src.replace(e,"\n")).replace(n,"�"),t.src=r}},17928:t=>{var e=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r)\)/i,r=/\((c|tm|r)\)/gi,o={c:"©",r:"®",tm:"™"};function i(t,e){return o[e.toLowerCase()]}function s(t){var e,n,o=0;for(e=t.length-1;e>=0;e--)"text"!==(n=t[e]).type||o||(n.content=n.content.replace(r,i)),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}function a(t){var n,r,o=0;for(n=t.length-1;n>=0;n--)"text"!==(r=t[n]).type||o||e.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&o--,"link_close"===r.type&&"auto"===r.info&&o++}t.exports=function(t){var r;if(t.md.options.typographer)for(r=t.tokens.length-1;r>=0;r--)"inline"===t.tokens[r].type&&(n.test(t.tokens[r].content)&&s(t.tokens[r].children),e.test(t.tokens[r].content)&&a(t.tokens[r].children))}},5442:(t,e,n)=>{var r=n(1128).isWhiteSpace,o=n(1128).isPunctChar,i=n(1128).isMdAsciiPunct,s=/['"]/,a=/['"]/g;function l(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function c(t,e){var n,s,c,d,u,h,p,f,m,g,b,k,v,y,w,x,C,A,M,S,_;for(M=[],n=0;n=0&&!(M[C].level<=p);C--);if(M.length=C+1,"text"===s.type){u=0,h=(c=s.content).length;t:for(;u=0)m=c.charCodeAt(d.index-1);else for(C=n-1;C>=0&&"softbreak"!==t[C].type&&"hardbreak"!==t[C].type;C--)if(t[C].content){m=t[C].content.charCodeAt(t[C].content.length-1);break}if(g=32,u=48&&m<=57&&(x=w=!1),w&&x&&(w=b,x=k),w||x){if(x)for(C=M.length-1;C>=0&&(f=M[C],!(M[C].level=0;e--)"inline"===t.tokens[e].type&&s.test(t.tokens[e].content)&&c(t.tokens[e].children,t)}},19124:(t,e,n)=>{var r=n(77762);function o(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}o.prototype.Token=r,t.exports=o},58919:t=>{t.exports=function(t){var e,n,r,o,i,s,a=t.tokens;for(e=0,n=a.length;e{var e=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;t.exports=function(t,r){var o,i,s,a,l,c,d=t.pos;if(60!==t.src.charCodeAt(d))return!1;for(l=t.pos,c=t.posMax;;){if(++d>=c)return!1;if(60===(a=t.src.charCodeAt(d)))return!1;if(62===a)break}return o=t.src.slice(l+1,d),n.test(o)?(i=t.md.normalizeLink(o),!!t.md.validateLink(i)&&(r||((s=t.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=t.push("text","",0)).content=t.md.normalizeLinkText(o),(s=t.push("link_close","a",-1)).markup="autolink",s.info="auto"),t.pos+=o.length+2,!0)):!!e.test(o)&&(i=t.md.normalizeLink("mailto:"+o),!!t.md.validateLink(i)&&(r||((s=t.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=t.push("text","",0)).content=t.md.normalizeLinkText(o),(s=t.push("link_close","a",-1)).markup="autolink",s.info="auto"),t.pos+=o.length+2,!0))}},94980:t=>{t.exports=function(t,e){var n,r,o,i,s,a,l,c,d=t.pos;if(96!==t.src.charCodeAt(d))return!1;for(n=d,d++,r=t.posMax;d{function e(t){var e,n,r,o,i,s,a,l,c={},d=t.length;if(d){var u=0,h=-2,p=[];for(e=0;ei;n-=p[n]+1)if((o=t[n]).marker===r.marker&&o.open&&o.end<0&&(a=!1,(o.close||r.open)&&(o.length+r.length)%3==0&&(o.length%3==0&&r.length%3==0||(a=!0)),!a)){l=n>0&&!t[n-1].open?p[n-1]+1:0,p[e]=e-n+l,p[n]=l,r.open=!1,o.end=e,o.close=!1,s=-1,h=-2;break}-1!==s&&(c[r.marker][(r.open?3:0)+(r.length||0)%3]=s)}}}t.exports=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(e(t.delimiters),n=0;n{function e(t,e){var n,r,o,i,s,a;for(n=e.length-1;n>=0;n--)95!==(r=e[n]).marker&&42!==r.marker||-1!==r.end&&(o=e[r.end],a=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,s=String.fromCharCode(r.marker),(i=t.tokens[r.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?s+s:s,i.content="",(i=t.tokens[o.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?s+s:s,i.content="",a&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--))}t.exports.w=function(t,e){var n,r,o=t.pos,i=t.src.charCodeAt(o);if(e)return!1;if(95!==i&&42!==i)return!1;for(r=t.scanDelims(t.pos,42===i),n=0;n{var r=n(27973),o=n(1128).has,i=n(1128).isValidEntityCode,s=n(1128).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(t,e){var n,c,d,u=t.pos,h=t.posMax;if(38!==t.src.charCodeAt(u))return!1;if(u+1>=h)return!1;if(35===t.src.charCodeAt(u+1)){if(c=t.src.slice(u).match(a))return e||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),(d=t.push("text_special","",0)).content=i(n)?s(n):s(65533),d.markup=c[0],d.info="entity"),t.pos+=c[0].length,!0}else if((c=t.src.slice(u).match(l))&&o(r,c[1]))return e||((d=t.push("text_special","",0)).content=r[c[1]],d.markup=c[0],d.info="entity"),t.pos+=c[0].length,!0;return!1}},33747:(t,e,n)=>{for(var r=n(1128).isSpace,o=[],i=0;i<256;i++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(t){o[t.charCodeAt(0)]=1})),t.exports=function(t,e){var n,i,s,a,l,c=t.pos,d=t.posMax;if(92!==t.src.charCodeAt(c))return!1;if(++c>=d)return!1;if(10===(n=t.src.charCodeAt(c))){for(e||t.push("hardbreak","br",0),c++;c=55296&&n<=56319&&c+1=56320&&i<=57343&&(a+=t.src[c+1],c++),s="\\"+a,e||(l=t.push("text_special","",0),n<256&&0!==o[n]?l.content=a:l.content=s,l.markup=s,l.info="escape"),t.pos=c+1,!0}},97494:t=>{t.exports=function(t){var e,n,r=0,o=t.tokens,i=t.tokens.length;for(e=n=0;e0&&r++,"text"===o[e].type&&e+1{var r=n(91418).n;t.exports=function(t,e){var n,o,i,s,a,l=t.pos;return!(!t.md.options.html||(i=t.posMax,60!==t.src.charCodeAt(l)||l+2>=i||33!==(n=t.src.charCodeAt(l+1))&&63!==n&&47!==n&&!function(t){var e=32|t;return e>=97&&e<=122}(n)||!(o=t.src.slice(l).match(r))||(e||((s=t.push("html_inline","",0)).content=o[0],a=s.content,/^\s]/i.test(a)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(s.content)&&t.linkLevel--),t.pos+=o[0].length,0)))}},75012:(t,e,n)=>{var r=n(1128).normalizeReference,o=n(1128).isSpace;t.exports=function(t,e){var n,i,s,a,l,c,d,u,h,p,f,m,g,b="",k=t.pos,v=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;if(c=t.pos+2,(l=t.md.helpers.parseLinkLabel(t,t.pos+1,!1))<0)return!1;if((d=l+1)=v)return!1;for(g=d,(h=t.md.helpers.parseLinkDestination(t.src,d,t.posMax)).ok&&(b=t.md.normalizeLink(h.str),t.md.validateLink(b)?d=h.pos:b=""),g=d;d=v||41!==t.src.charCodeAt(d))return t.pos=k,!1;d++}else{if(void 0===t.env.references)return!1;if(d=0?a=t.src.slice(g,d++):d=l+1):d=l+1,a||(a=t.src.slice(c,l)),!(u=t.env.references[r(a)]))return t.pos=k,!1;b=u.href,p=u.title}return e||(s=t.src.slice(c,l),t.md.inline.parse(s,t.md,t.env,m=[]),(f=t.push("image","img",0)).attrs=n=[["src",b],["alt",""]],f.children=m,f.content=s,p&&n.push(["title",p])),t.pos=d,t.posMax=v,!0}},14159:(t,e,n)=>{var r=n(1128).normalizeReference,o=n(1128).isSpace;t.exports=function(t,e){var n,i,s,a,l,c,d,u,h="",p="",f=t.pos,m=t.posMax,g=t.pos,b=!0;if(91!==t.src.charCodeAt(t.pos))return!1;if(l=t.pos+1,(a=t.md.helpers.parseLinkLabel(t,t.pos,!0))<0)return!1;if((c=a+1)=m)return!1;if(g=c,(d=t.md.helpers.parseLinkDestination(t.src,c,t.posMax)).ok){for(h=t.md.normalizeLink(d.str),t.md.validateLink(h)?c=d.pos:h="",g=c;c=m||41!==t.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===t.env.references)return!1;if(c=0?s=t.src.slice(g,c++):c=a+1):c=a+1,s||(s=t.src.slice(l,a)),!(u=t.env.references[r(s)]))return t.pos=f,!1;h=u.href,p=u.title}return e||(t.pos=l,t.posMax=a,t.push("link_open","a",1).attrs=n=[["href",h]],p&&n.push(["title",p]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)),t.pos=c,t.posMax=m,!0}},42876:t=>{var e=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;t.exports=function(t,n){var r,o,i,s,a,l,c;return!(!t.md.options.linkify||t.linkLevel>0||(r=t.pos)+3>t.posMax||58!==t.src.charCodeAt(r)||47!==t.src.charCodeAt(r+1)||47!==t.src.charCodeAt(r+2)||!(o=t.pending.match(e))||(i=o[1],!(s=t.md.linkify.matchAtStart(t.src.slice(r-i.length)))||(a=s.url).length<=i.length||(a=a.replace(/\*+$/,""),l=t.md.normalizeLink(a),!t.md.validateLink(l)||(n||(t.pending=t.pending.slice(0,-i.length),(c=t.push("link_open","a",1)).attrs=[["href",l]],c.markup="linkify",c.info="auto",(c=t.push("text","",0)).content=t.md.normalizeLinkText(a),(c=t.push("link_close","a",-1)).markup="linkify",c.info="auto"),t.pos+=a.length-i.length,0))))}},11078:(t,e,n)=>{var r=n(1128).isSpace;t.exports=function(t,e){var n,o,i,s=t.pos;if(10!==t.src.charCodeAt(s))return!1;if(n=t.pending.length-1,o=t.posMax,!e)if(n>=0&&32===t.pending.charCodeAt(n))if(n>=1&&32===t.pending.charCodeAt(n-1)){for(i=n-1;i>=1&&32===t.pending.charCodeAt(i-1);)i--;t.pending=t.pending.slice(0,i),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(s++;s{var r=n(77762),o=n(1128).isWhiteSpace,i=n(1128).isPunctChar,s=n(1128).isMdAsciiPunct;function a(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}a.prototype.pushPending=function(){var t=new r("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},a.prototype.push=function(t,e,n){this.pending&&this.pushPending();var o=new r(t,e,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(i),o},a.prototype.scanDelims=function(t,e){var n,r,a,l,c,d,u,h,p,f=t,m=!0,g=!0,b=this.posMax,k=this.src.charCodeAt(t);for(n=t>0?this.src.charCodeAt(t-1):32;f{function e(t,e){var n,r,o,i,s,a=[],l=e.length;for(n=0;n{function e(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}t.exports=function(t,n){for(var r=t.pos;r{function e(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}e.prototype.attrIndex=function(t){var e,n,r;if(!this.attrs)return-1;for(n=0,r=(e=this.attrs).length;n=0&&(n=this.attrs[e][1]),n},e.prototype.attrJoin=function(t,e){var n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e},t.exports=e},32279:t=>{var e={};function n(t,r){var o;return"string"!=typeof r&&(r=n.defaultChars),o=function(t){var n,r,o=e[t];if(o)return o;for(o=e[t]=[],n=0;n<128;n++)r=String.fromCharCode(n),o.push(r);for(n=0;n=55296&&l<=57343?"���":String.fromCharCode(l),e+=6):240==(248&r)&&e+91114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),e+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",t.exports=n},3978:t=>{var e={};function n(t,r,o){var i,s,a,l,c,d="";for("string"!=typeof r&&(o=r,r=n.defaultChars),void 0===o&&(o=!0),c=function(t){var n,r,o=e[t];if(o)return o;for(o=e[t]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?o.push(r):o.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1=56320&&l<=57343){d+=encodeURIComponent(t[i]+t[i+1]),i++;continue}d+="%EF%BF%BD"}else d+=encodeURIComponent(t[i]);return d}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",t.exports=n},54850:t=>{t.exports=function(t){var e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",(e+=t.search||"")+(t.hash||"")}},59213:(t,e,n)=>{t.exports.encode=n(3978),t.exports.decode=n(32279),t.exports.format=n(54850),t.exports.parse=n(47642)},47642:t=>{function e(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),s=["'"].concat(i),a=["%","/","?",";","#"].concat(s),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};e.prototype.parse=function(t,e){var r,i,s,p,f,m=t;if(m=m.trim(),!e&&1===t.split("#").length){var g=o.exec(m);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(m);if(b&&(s=(b=b[0]).toLowerCase(),this.protocol=b,m=m.substr(b.length)),(e||b||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(f="//"===m.substr(0,2))||b&&u[b]||(m=m.substr(2),this.slashes=!0)),!u[b]&&(f||b&&!h[b])){var k,v,y=-1;for(r=0;r127?M+="x":M+=A[S];if(!M.match(c)){var T=C.slice(0,r),O=C.slice(r+1),E=A.match(d);E&&(T.push(E[1]),O.unshift(E[2])),O.length&&(m=O.join(".")+m),this.hostname=T.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=m.indexOf("#");-1!==D&&(this.hash=m.substr(D),m=m.slice(0,D));var N=m.indexOf("?");return-1!==N&&(this.search=m.substr(N),m=m.slice(0,N)),m&&(this.pathname=m),h[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},e.prototype.parseHost=function(t){var e=r.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},t.exports=function(t,n){if(t&&t instanceof e)return t;var r=new e;return r.parse(t,n),r}},87701:t=>{t.exports=/[\0-\x1F\x7F-\x9F]/},54066:t=>{t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},76155:t=>{t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},72927:t=>{t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},98786:(t,e,n)=>{e.Any=n(47531),e.Cc=n(87701),e.Cf=n(54066),e.P=n(76155),e.Z=n(72927)},47531:t=>{t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},61911:(t,e,n)=>{n.r(e),n.d(e,{ucs2decode:()=>p,ucs2encode:()=>f,decode:()=>b,encode:()=>k,toASCII:()=>y,toUnicode:()=>v,default:()=>w});const r=2147483647,o=36,i=/^xn--/,s=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,d=String.fromCharCode;function u(t){throw new RangeError(l[t])}function h(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]);const o=function(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}((t=t.replace(a,".")).split("."),e).join(".");return r+o}function p(t){const e=[];let n=0;const r=t.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...t),m=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},g=function(t,e,n){let r=0;for(t=n?c(t/700):t>>1,t+=c(t/e);t>455;r+=o)t=c(t/35);return c(r+36*t/(t+38))},b=function(t){const e=[],n=t.length;let i=0,s=128,a=72,l=t.lastIndexOf("-");l<0&&(l=0);for(let n=0;n=128&&u("not-basic"),e.push(t.charCodeAt(n));for(let h=l>0?l+1:0;h=n&&u("invalid-input");const l=(d=t.charCodeAt(h++))>=48&&d<58?d-48+26:d>=65&&d<91?d-65:d>=97&&d<123?d-97:o;l>=o&&u("invalid-input"),l>c((r-i)/e)&&u("overflow"),i+=l*e;const p=s<=a?1:s>=a+26?26:s-a;if(lc(r/f)&&u("overflow"),e*=f}const p=e.length+1;a=g(i-l,p,0==l),c(i/p)>r-s&&u("overflow"),s+=c(i/p),i%=p,e.splice(i++,0,s)}var d;return String.fromCodePoint(...e)},k=function(t){const e=[],n=(t=p(t)).length;let i=128,s=0,a=72;for(const n of t)n<128&&e.push(d(n));const l=e.length;let h=l;for(l&&e.push("-");h=i&&ec((r-s)/p)&&u("overflow"),s+=(n-i)*p,i=n;for(const n of t)if(nr&&u("overflow"),n===i){let t=s;for(let n=o;;n+=o){const r=n<=a?1:n>=a+26?26:n-a;if(t{n.d(e,{h:()=>S});var r=n(74788),o=n(42600),i=n(1065),s=n(75747),a=n(16331),l=n(28986),c=n(99036),d=n(24751),u=n(65266),h=n(12057),p=n(71753),f=n(21032),m=n(38190),g=n(22545),b=n(91283),k=n(75526),v=n(19042),y=n(4642),w=n(45642);function x(t,e){if(1&t&&(r.TgZ(0,"button",7),r._uU(1),r.qZA()),2&t){const t=e.$implicit;r.Q6J("value",t),r.xp6(1),r.hij(" ",t," ")}}function C(t,e){if(1&t&&(r.TgZ(0,"tui-data-list",5),r.YNc(1,x,2,2,"button",6),r.qZA()),2&t){const t=r.oxw();r.xp6(1),r.Q6J("ngForOf",t.modes)}}function A(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-primitive-textfield",8),r.NdJ("valueChange",(function(e){return r.CHM(t),r.oxw().onHexChange(e)})),r.qZA()}if(2&t){const t=r.oxw();r.Q6J("maskito",t.hexMask)("tuiTextfieldLabelOutside",!0)("value",t.hex)}}function M(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-input-number",9),r.NdJ("ngModelChange",(function(e){r.CHM(t);const n=r.oxw();return n.onRgbChange(e,n.color[1],n.color[2],n.color[3])})),r.qZA(),r.TgZ(1,"tui-input-number",9),r.NdJ("ngModelChange",(function(e){r.CHM(t);const n=r.oxw();return n.onRgbChange(n.color[0],e,n.color[2],n.color[3])})),r.qZA(),r.TgZ(2,"tui-input-number",9),r.NdJ("ngModelChange",(function(e){r.CHM(t);const n=r.oxw();return n.onRgbChange(n.color[0],n.color[1],e,n.color[3])})),r.qZA()}if(2&t){const t=r.oxw();r.Q6J("max",255)("min",0)("ngModel",t.color[0])("tuiTextfieldLabelOutside",!0),r.xp6(1),r.Q6J("max",255)("min",0)("ngModel",t.color[1])("tuiTextfieldLabelOutside",!0),r.xp6(1),r.Q6J("max",255)("min",0)("ngModel",t.color[2])("tuiTextfieldLabelOutside",!0)}}let S=(()=>{class t{constructor(){this.color=[0,0,0,1],this.colorChange=new r.vpe,this.hexMask={mask:new RegExp("^[A-F\\d]{0,6}$","gi")},this.modes=["HEX","RGB"],this.mode=this.modes[0]}get isHex(){return this.mode===this.modes[0]}get hex(){return(0,o.WSX)(this.color[0],this.color[1],this.color[2]).replace("#","")}get opacity(){return Math.round(100*this.color[3])}onHexChange(t){if(6!==t.length)return;const e=(0,o.ROF)(t);this.updateColor([e[0],e[1],e[2],this.color[3]])}onRgbChange(...t){this.updateColor(t)}updateColor(t){this.color=t,this.colorChange.emit(t)}}return t.ɵfac=function(e){return new(e||t)},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-color-edit"]],inputs:{color:"color"},outputs:{colorChange:"colorChange"},decls:6,vars:8,consts:[["tuiDropdownAlign","left","tuiDropdownLimitWidth","min","tuiTextfieldSize","m",1,"t-select","tui-group__auto-width-item",3,"tuiTextfieldLabelOutside","ngModel","ngModelChange"],["size","s",4,"tuiDataList"],["tuiTextfieldSize","m","tuiValueAccessor","",3,"maskito","tuiTextfieldLabelOutside","value","valueChange",4,"ngIf","ngIfElse"],["rgb",""],["decimal","never","tuiTextfieldPostfix","%","tuiTextfieldSize","m",1,"t-opacity","tui-group__auto-width-item",3,"max","min","ngModel","tuiTextfieldLabelOutside","ngModelChange"],["size","s"],["tuiOption","",3,"value",4,"ngFor","ngForOf"],["tuiOption","",3,"value"],["tuiTextfieldSize","m","tuiValueAccessor","",3,"maskito","tuiTextfieldLabelOutside","value","valueChange"],["decimal","never","tuiTextfieldSize","m",1,"t-rgb",3,"max","min","ngModel","tuiTextfieldLabelOutside","ngModelChange"]],template:function(t,e){if(1&t&&(r.TgZ(0,"tui-select",0),r.NdJ("ngModelChange",(function(t){return e.mode=t})),r.YNc(1,C,2,1,"tui-data-list",1),r.qZA(),r.YNc(2,A,1,3,"tui-primitive-textfield",2),r.YNc(3,M,3,12,"ng-template",null,3,r.W1O),r.TgZ(5,"tui-input-number",4),r.NdJ("ngModelChange",(function(t){return e.onRgbChange(e.color[0],e.color[1],e.color[2],t/100)})),r.qZA()),2&t){const t=r.MAs(4);r.Q6J("tuiTextfieldLabelOutside",!0)("ngModel",e.mode),r.xp6(2),r.Q6J("ngIf",e.isHex)("ngIfElse",t),r.xp6(3),r.Q6J("max",100)("min",0)("ngModel",e.opacity)("tuiTextfieldLabelOutside",!0)}},directives:[i.u,s.O,a.Ek,l.s,c.x,d.JJ,d.On,u.g,h.O5,p.q,f.g,m.T,g.q,h.sg,b.v,k.y,v.B,y.n,w.ro],styles:["[_nghost-%COMP%]{display:flex}.t-select[_ngcontent-%COMP%]{width:5.875rem}.t-opacity[_ngcontent-%COMP%]{width:4.275rem}.t-rgb[_ngcontent-%COMP%], .t-opacity[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),t})()},22540:(t,e,n)=>{n.d(e,{$:()=>c});var r=n(97582),o=n(74788),i=n(91211),s=n(42600),a=n(97398),l=n(19157);class c{constructor(t){this.sanitizer=t,this.colorChange=new o.vpe,this.point=[0,1],this.hue=0,this.opacity=1}set color(t){if(this.currentColor.every(((e,n)=>e===t[n]))&&t[3]===this.opacity)return;const[e,n,r]=(0,s.bDt)(t[0],t[1],t[2]);this.opacity=t[3],this.hue=e/360,this.point=[n,1-r/255]}get currentColor(){return this.getCurrentColor(this.hue,this.point)}get base(){return`rgb(${(0,s.qZG)(360*this.hue,1,255)})`}get gradient(){return this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to right, rgba(${this.currentColor.join(",")}, 0), rgb(${this.currentColor.join(",")}))`)}onPointChange(t){this.point=t,this.updateColor()}onHueChange(t){this.hue=t,this.updateColor()}onOpacityChange(t){this.opacity=(0,s.FGw)(t,2),this.updateColor()}getCurrentColor(t,e){return(0,s.qZG)(360*t,e[0],255*(1-e[1]))}updateColor(){this.colorChange.emit([...this.currentColor,this.opacity])}}c.ɵfac=function(t){return new(t||c)(o.Y36(i.H7))},c.ɵcmp=o.Xpm({type:c,selectors:[["tui-color-picker"]],inputs:{color:"color"},outputs:{colorChange:"colorChange"},decls:5,vars:7,consts:[[1,"t-flat",3,"value","valueChange"],[1,"t-wrapper","t-wrapper_hue"],[1,"t-hue",3,"value","valueChange"],[1,"t-wrapper","t-wrapper_opacity"],[1,"t-opacity",3,"value","valueChange"]],template:function(t,e){1&t&&(o.TgZ(0,"tui-flat-picker",0),o.NdJ("valueChange",(function(t){return e.onPointChange(t)})),o.qZA(),o.TgZ(1,"div",1),o.TgZ(2,"tui-linear-picker",2),o.NdJ("valueChange",(function(t){return e.onHueChange(t)})),o.qZA(),o.qZA(),o.TgZ(3,"div",3),o.TgZ(4,"tui-linear-picker",4),o.NdJ("valueChange",(function(t){return e.onOpacityChange(t)})),o.qZA(),o.qZA()),2&t&&(o.Udp("background-color",e.base),o.Q6J("value",e.point),o.xp6(2),o.Q6J("value",e.hue),o.xp6(1),o.Udp("background",e.gradient),o.xp6(1),o.Q6J("value",e.opacity))},directives:[a.J,l.P],styles:['[_nghost-%COMP%]{position:relative;z-index:0;display:block}.t-flat[_ngcontent-%COMP%]{height:14rem;background:linear-gradient(rgba(0,0,0,0),#000000),linear-gradient(to right,#ffffff,rgba(255,255,255,0));margin-bottom:.25rem;overflow:hidden}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:"";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue[_ngcontent-%COMP%]{background:#ff0000}.t-wrapper_opacity[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:"";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue[_ngcontent-%COMP%]{background:linear-gradient(to right,#ff0000,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000);border-radius:inherit;margin:0 .5rem}.t-opacity[_ngcontent-%COMP%]{border-radius:inherit;margin:0 .5rem}'],changeDetection:0}),(0,r.gn)([s.UMq],c.prototype,"getCurrentColor",null)},58333:(t,e,n)=>{n.d(e,{s:()=>z});var r=n(97582),o=n(74788),i=n(91211),s=n(42600),a=n(40401),l=n(48178),c=n(98778),d=n(18289),u=n(12057),h=n(22540),p=n(77825),f=n(22545),m=n(91283),g=n(27626),b=n(44099),k=n(13938),v=n(10406),y=n(63790),w=n(51928),x=n(84219),C=n(20690),A=n(1706);function M(t,e){if(1&t&&o._UZ(0,"tui-svg",9),2&t){const t=o.oxw(),e=o.MAs(1);o.ekj("t-arrow_rotated",e.open),o.Q6J("src",t.options.icons.colorSelectorDropdownChevron)}}function S(t,e){if(1&t&&o._UZ(0,"tui-svg",14),2&t){const t=o.oxw(3);o.Q6J("src",t.options.icons.colorSelectorDropdownCheck)}}function _(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",(function(){const e=o.CHM(t).$implicit,n=o.oxw(2),r=o.MAs(1);return n.onModeSelect(e,r)}))("keydown.enter.prevent",(function(){const e=o.CHM(t).$implicit,n=o.oxw(2),r=o.MAs(1);return n.onModeSelect(e,r)}))("keydown.space.prevent",(function(){const e=o.CHM(t).$implicit,n=o.oxw(2),r=o.MAs(1);return n.onModeSelect(e,r)})),o._uU(1),o.YNc(2,S,1,1,"tui-svg",13),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.uIk("aria-checked",n.isModeActive(t)),o.xp6(1),o.hij(" ",t," "),o.xp6(1),o.Q6J("ngIf",n.isModeActive(t))}}function T(t,e){if(1&t&&(o.TgZ(0,"tui-data-list",10),o.YNc(1,_,3,3,"button",11),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.modes)}}function O(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",20),o.NdJ("click",(function(){const e=o.CHM(t).$implicit;return o.oxw(2).onDirectionChange(e)})),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.ekj("t-direction_active",n.isDirectionActive(t)),o.Q6J("icon",n.getIcon(t))("tuiHint",t)}}function E(t,e){if(1&t){const t=o.EpF();o.ynx(0),o._UZ(1,"hr",15),o.TgZ(2,"div",16),o.TgZ(3,"tui-linear-multi-picker",17),o.NdJ("indexChange",(function(e){return o.CHM(t),o.oxw().onIndexChange(e)}))("valueChange",(function(e){return o.CHM(t),o.oxw().onStopsChange(e)})),o.qZA(),o.qZA(),o.TgZ(4,"div",18),o.YNc(5,O,1,4,"button",19),o.qZA(),o.BQk()}if(2&t){const t=o.oxw();o.xp6(2),o.Udp("background",t.gradient),o.xp6(1),o.Q6J("value",t.stopsKeys),o.xp6(2),o.Q6J("ngForOf",t.buttons)}}function D(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-color-edit",21),o.NdJ("colorChange",(function(e){return o.CHM(t),o.oxw().onColorChange(e)})),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("color",t.color)}}function N(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-palette",22),o.NdJ("selectedColor",(function(e){return o.CHM(t),o.oxw().onPalettePick(e)})),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("colors",t.palette)}}const L=[0,0,0,0],I=[[0,[0,0,0,1]],[1,[255,255,255,1]]],R={"to top right":"tuiIconArrowUpRight","to right":"tuiIconArrowRight","to bottom right":"tuiIconArrowDownRight","to bottom":"tuiIconArrowDown","to bottom left":"tuiIconArrowDownLeft","to left":"tuiIconArrowLeft","to top left":"tuiIconArrowUpLeft","to top":"tuiIconArrowUp"};class z{constructor(t,e,n){this.options=t,this.sanitizer=e,this.modes=n,this.stops=new Map(I),this.currentStop=0,this.direction="to bottom",this.colors=new Map,this.colorChange=new o.vpe,this.color=[0,0,0,1],this.currentMode=this.modes[0],this.buttons=["to top right","to right","to bottom right","to bottom","to bottom left","to left","to top left","to top"]}set colorSetter(t){this.parse(t)}get palette(){return this.filterPalette(this.colors,this.isGradient)}get stopsKeys(){return this.getStopsKeys(this.stops)}get currentColor(){return this.isGradient?this.getStop(this.currentStop):this.color}get gradient(){return this.sanitizer.bypassSecurityTrustStyle(this.getGradient("to right"))}get isGradient(){return this.currentMode===this.modes[1]}getIcon(t){return R[t]}isModeActive(t){return this.currentMode===t}isDirectionActive(t){return this.direction===t}onPalettePick(t){this.updateColor(t)}onDirectionChange(t){this.direction=t,this.updateColor(this.getGradient(t))}onModeSelect(t,e){this.currentMode=t,e.open=!1,this.updateColor(t===this.modes[0]?`rgba(${this.color.join(", ")})`:this.getGradient(this.direction))}onIndexChange(t){this.currentStop=this.stopsKeys[t]}onColorChange(t){this.isGradient?(this.stops.set(this.currentStop,t),this.updateColor(this.getGradient(this.direction))):this.updateColor(`rgba(${t.join(", ")})`)}onStopsChange(t){const e=this.stopsKeys.find((e=>!t.includes(e))),n=t.find((t=>!this.stopsKeys.includes(t)));void 0===e&&void 0!==n&&this.addStop(n),void 0!==e&&void 0===n&&this.removeStop(e),void 0!==e&&void 0!==n&&this.replaceStop(e,n),this.updateColor(this.getGradient(this.direction))}getStopsKeys(t){return Array.from(t.keys())}filterPalette(t,e){const n=new Map(t);return n.forEach(((t,r)=>{(t.startsWith("linear-gradient")&&!e||!t.startsWith("linear-gradient")&&e)&&n.delete(r)})),n}updateColor(t){this.colorChange.emit(t)}getGradient(t){return`linear-gradient(${t}, ${[...this.stopsKeys].sort(s.A2j).map((t=>`rgba(${this.getStop(t).join(", ")}) ${100*t}%`)).join(", ")})`}getStop(t){return this.stops.get(t)||L}addStop(t){const e=this.stopsKeys.reduce(((e,n)=>Math.abs(n-t)r===t?[e,n]:[r,this.getStop(r)])))}parse(t){t.startsWith("linear-gradient")?this.parseGradient(t):this.parseColor(t)}parseGradient(t){if(t===this.getGradient(this.direction))return;const e=(0,l._N)((0,l.U5)(t));this.currentMode=this.modes[1],this.direction=e.side,this.currentStop=0,this.stops=new Map(e.stops.length?e.stops.map((({color:t,position:e})=>[parseFloat(e)/100,(0,s.MpC)(t)])):I)}parseColor(t){this.currentMode=this.modes[0],this.currentStop=0,this.color=(0,s.MpC)(t)}}z.ɵfac=function(t){return new(t||z)(o.Y36(a.mJ),o.Y36(i.H7),o.Y36(a.dj))},z.ɵcmp=o.Xpm({type:z,selectors:[["tui-color-selector"]],inputs:{colors:"colors",colorSetter:["color","colorSetter"]},outputs:{colorChange:"colorChange"},decls:12,vars:7,consts:[[1,"t-select",3,"content"],["dropdown",""],["appearance","","size","s","tuiButton","","type","button",3,"iconRight"],["arrow",""],["menu",""],[4,"ngIf"],[3,"color","colorChange"],["tuiGroup","","class","t-edit",3,"color","colorChange",4,"ngIf"],["class","t-palette",3,"colors","selectedColor",4,"ngIf"],[1,"t-arrow",3,"src"],["role","menu","size","s",1,"t-menu"],["role","menuitemradio","tuiOption","",3,"click","keydown.enter.prevent","keydown.space.prevent",4,"ngFor","ngForOf"],["role","menuitemradio","tuiOption","",3,"click","keydown.enter.prevent","keydown.space.prevent"],["class","t-checkmark",3,"src",4,"ngIf"],[1,"t-checkmark",3,"src"],[1,"t-hr"],[1,"t-wrapper"],[1,"t-gradient",3,"value","indexChange","valueChange"],[1,"t-buttons"],["appearance","","size","xs","tuiHintDescribe","","tuiIconButton","","type","button","class","t-direction",3,"t-direction_active","icon","tuiHint","click",4,"ngFor","ngForOf"],["appearance","","size","xs","tuiHintDescribe","","tuiIconButton","","type","button",1,"t-direction",3,"icon","tuiHint","click"],["tuiGroup","",1,"t-edit",3,"color","colorChange"],[1,"t-palette",3,"colors","selectedColor"]],template:function(t,e){if(1&t&&(o.TgZ(0,"tui-hosted-dropdown",0,1),o.TgZ(2,"button",2),o._uU(3),o.qZA(),o.YNc(4,M,1,3,"ng-template",null,3,o.W1O),o.YNc(6,T,2,1,"ng-template",null,4,o.W1O),o.qZA(),o.YNc(8,E,6,4,"ng-container",5),o.TgZ(9,"tui-color-picker",6),o.NdJ("colorChange",(function(t){return e.onColorChange(t)})),o.qZA(),o.YNc(10,D,1,1,"tui-color-edit",7),o.YNc(11,N,1,1,"tui-palette",8)),2&t){const t=o.MAs(5),n=o.MAs(7);o.Q6J("content",n),o.xp6(2),o.Q6J("iconRight",t),o.xp6(1),o.hij(" ",e.currentMode," "),o.xp6(5),o.Q6J("ngIf",e.isGradient),o.xp6(1),o.Q6J("color",e.currentColor),o.xp6(1),o.Q6J("ngIf",!e.isGradient),o.xp6(1),o.Q6J("ngIf",e.palette.size)}},directives:[c.o,d.v,u.O5,h.$,p.P,f.q,u.sg,m.v,g.e,b.$,k.D,v.x,y.t,w.D,x.h,C.g,A.R],styles:['[_nghost-%COMP%]{position:relative;z-index:0;display:block;width:22.6rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:"";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:"";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr[_ngcontent-%COMP%]{height:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient[_ngcontent-%COMP%]{margin:0 .5rem;border-radius:inherit}.t-select[_ngcontent-%COMP%]{margin:.75rem .5rem}.t-arrow[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated[_ngcontent-%COMP%]{transform:rotate(180deg)}.t-menu[_ngcontent-%COMP%]{width:11.25rem}.t-checkmark[_ngcontent-%COMP%]{margin-left:auto;width:1rem;height:1rem}.t-buttons[_ngcontent-%COMP%]{display:flex;padding:0 .75rem 1.25rem}.t-direction[_ngcontent-%COMP%]{color:var(--tui-text-02);margin:0 .375rem}.t-direction[_ngcontent-%COMP%]:hover, .t-direction_active[_ngcontent-%COMP%]{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit[_ngcontent-%COMP%]{margin:1.25rem}.t-palette[_ngcontent-%COMP%]{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}'],changeDetection:0}),(0,r.gn)([s.UMq],z.prototype,"getStopsKeys",null),(0,r.gn)([s.UMq],z.prototype,"filterPalette",null)},97398:(t,e,n)=>{n.d(e,{J:()=>s});var r=n(74788),o=n(42600),i=n(87901);let s=(()=>{class t{constructor(t){this.value=[0,0],this.valueChange=new r.vpe,t.subscribe((t=>{this.value=t,this.valueChange.emit([t[0],t[1]])}))}get left(){return 100*this.value[0]}get top(){return 100*this.value[1]}}return t.ɵfac=function(e){return new(e||t)(r.Y36(i.i))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-flat-picker"]],inputs:{value:"value"},outputs:{valueChange:"valueChange"},features:[r._Bn([o.a31,i.i])],decls:1,vars:4,consts:[[1,"t-circle"]],template:function(t,e){1&t&&r._UZ(0,"div",0),2&t&&r.Udp("left",e.left,"%")("top",e.top,"%")},styles:["[_nghost-%COMP%]{position:relative;display:block}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}"],changeDetection:0}),t})()},83950:(t,e,n)=>{n.d(e,{H9:()=>h,wl:()=>g,VM:()=>m}),n(84219);var r=n(12057),o=n(24751),i=n(45642),s=n(43232),a=n(67934),l=n(74788);let c=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,o.u5,i.U5,a.SCC,a.Jyo,s.KWI,s.cnw,s.dpK,s.pcV,a._Hh]]}),t})();n(22540);let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez]]}),t})(),u=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez]]}),t})(),h=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,d,u]]}),t})();n(58333);var p=n(42600);let f=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez]]}),t})(),m=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,s.goS]]}),t})(),g=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,s.fNO,s.jhF,h,f,s.goS,s.EIu,s.pcV,p.Ah6,c,s.n6B,m]]}),t})();n(97398),n(27626),n(19157),n(1706)},27626:(t,e,n)=>{n.d(e,{e:()=>l});var r=n(74788),o=n(42600),i=n(87901),s=n(12057);function a(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",1),r.NdJ("dblclick",(function(){const e=r.CHM(t).index;return r.oxw().onClick(e)}))("mousedown",(function(){const e=r.CHM(t).index;return r.oxw().onMouseDown(e)})),r.qZA()}if(2&t){const t=e.$implicit;r.Udp("left",100*t,"%")}}let l=(()=>{class t{constructor(t){this.value=[0,1],this.valueChange=new r.vpe,this.indexChange=new r.vpe,this.index=NaN,t.subscribe((([t])=>{this.onPicker(t)}))}onMouseUp(){this.index=NaN}onMouseDown(t){this.updateIndex(t)}onClick(t){this.value.length>2&&this.updateValue(this.value.filter(((e,n)=>n!==t)))}onPicker(t){Number.isNaN(this.index)&&(this.updateIndex(this.value.length),this.value=[...this.value,0]),this.value.some(((e,n)=>e===t&&n!==this.index))||this.updateValue(this.value.map(((e,n)=>n===this.index?t:e)))}updateIndex(t){this.index=t,this.indexChange.emit(t)}updateValue(t){this.value=t,this.valueChange.emit(t)}}return t.ɵfac=function(e){return new(e||t)(r.Y36(i.i))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-linear-multi-picker"]],hostBindings:function(t,e){1&t&&r.NdJ("mouseup",(function(){return e.onMouseUp()}),!1,r.evT)},inputs:{value:"value"},outputs:{valueChange:"valueChange",indexChange:"indexChange"},features:[r._Bn([o.a31,i.i])],decls:1,vars:1,consts:[["class","t-circle",3,"left","dblclick","mousedown",4,"ngFor","ngForOf"],[1,"t-circle",3,"dblclick","mousedown"]],template:function(t,e){1&t&&r.YNc(0,a,1,2,"div",0),2&t&&r.Q6J("ngForOf",e.value)},directives:[s.sg],styles:["[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}"],changeDetection:0}),t})()},19157:(t,e,n)=>{n.d(e,{P:()=>s});var r=n(74788),o=n(42600),i=n(87901);let s=(()=>{class t{constructor(t){this.value=0,this.valueChange=new r.vpe,t.subscribe((([t])=>{this.value=t,this.valueChange.emit(t)}))}get left(){return 100*this.value}}return t.ɵfac=function(e){return new(e||t)(r.Y36(i.i))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-linear-picker"]],inputs:{value:"value"},outputs:{valueChange:"valueChange"},features:[r._Bn([o.a31,i.i])],decls:1,vars:2,consts:[[1,"t-circle"]],template:function(t,e){1&t&&r._UZ(0,"div",0),2&t&&r.Udp("left",e.left,"%")},styles:["[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}"],changeDetection:0}),t})()},1706:(t,e,n)=>{n.d(e,{R:()=>u});var r=n(74788),o=n(12057),i=n(13938),s=n(10406),a=n(63790),l=n(51928),c=n(44099);function d(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",1),r.NdJ("click",(function(){const e=r.CHM(t).$implicit;return r.oxw().selectedColor.emit(e.value)})),r.qZA()}if(2&t){const t=e.$implicit;r.Udp("background",t.value),r.Q6J("id",t.key)("tuiHint",t.key)("tuiHintDescribe",t.key)}}let u=(()=>{class t{constructor(){this.colors=new Map,this.selectedColor=new r.vpe,this.originalOrder=(t,e)=>0}}return t.ɵfac=function(e){return new(e||t)},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-palette"]],inputs:{colors:"colors"},outputs:{selectedColor:"selectedColor"},decls:2,vars:4,consts:[["type","button","class","t-button",3,"id","background","tuiHint","tuiHintDescribe","click",4,"ngFor","ngForOf"],["type","button",1,"t-button",3,"id","tuiHint","tuiHintDescribe","click"]],template:function(t,e){1&t&&(r.YNc(0,d,1,5,"button",0),r.ALo(1,"keyvalue")),2&t&&r.Q6J("ngForOf",r.xi3(1,1,e.colors,e.originalOrder))},directives:[o.sg,i.D,s.x,a.t,l.D,c.$],pipes:[o.Nd],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap;padding:.875rem}.t-button[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;width:1.5625rem;height:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}"],changeDetection:0}),t})()},10553:(t,e,n)=>{n.d(e,{l:()=>T});var r=n(12057),o=n(74788),i=n(42600),s=n(69725),a=n(5915),l=n(40401),c=n(45400),d=n(36866),u=n(30528),h=n(24751),p=n(77825),f=n(18289),m=n(73460),g=n(96281),b=n(65538);let k=(()=>{class t{transform(t,e,n){return"#"===e?t.filter((t=>t!==n)):t}}return t.ɵfac=function(e){return new(e||t)},t.ɵpipe=o.Yjl({name:"tuiFilterAnchors",type:t,pure:!0}),t})();function v(t,e){1&t&&(o.ynx(0),o._uU(1,"Edit anchor"),o.BQk())}function y(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Link to anchor"),o.qZA())}function w(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"URL"),o.qZA())}function x(t,e){if(1&t&&(o.YNc(0,y,2,0,"span",1),o.YNc(1,w,2,0,"ng-template",null,12,o.W1O)),2&t){const t=o.MAs(2),e=o.oxw(2);o.Q6J("ngIf",e.prefixIsHashMode)("ngIfElse",t)}}function C(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=e.ngIf,n=o.oxw(2);o.xp6(1),o.hij(" ",n.prefixIsHashMode?t.anchorExample:t.urlExample," ")}}function A(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"label",4),o.TgZ(2,"div",5),o.YNc(3,v,2,0,"ng-container",1),o.YNc(4,x,3,2,"ng-template",null,6,o.W1O),o.qZA(),o.TgZ(6,"div",7),o.TgZ(7,"div",8),o._uU(8),o.qZA(),o.TgZ(9,"tui-input-inline",9),o.NdJ("ngModelChange",(function(e){return o.CHM(t),o.oxw().url=e}))("input",(function(e){let n;return o.CHM(t),o.oxw().onChange(null==(n=e.target)?null:n.value)}))("keydown.backspace",(function(){return o.CHM(t),o.oxw().onBackspace()}))("keydown.prevent.enter",(function(){return o.CHM(t),o.oxw().onSave()})),o.YNc(10,C,2,1,"ng-container",3),o.ALo(11,"async"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(12,"tui-svg",10),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onClear()})),o.qZA(),o.TgZ(13,"button",11),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onSave()})),o.qZA(),o.BQk()}if(2&t){const t=o.MAs(5),e=o.oxw();o.xp6(3),o.Q6J("ngIf",e.anchorMode)("ngIfElse",t),o.xp6(5),o.Oqu(e.prefix),o.xp6(1),o.ekj("t-input_filled",e.hasUrl),o.Q6J("ngModel",e.url),o.xp6(1),o.Q6J("ngIf",o.lcZ(11,11,e.texts$)),o.xp6(2),o.ekj("t-cleaner_hidden",!e.hasUrl),o.Q6J("src",e.options.icons.popupLinkRemove),o.xp6(1),o.Q6J("icon",e.options.icons.popupLinkSave)}}function M(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",13),o._uU(1),o.ALo(2,"tuiShortUrl"),o.qZA(),o.TgZ(3,"button",14),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onEdit()})),o.qZA(),o.TgZ(4,"button",15),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onRemove()})),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("href",t.href,o.LSH)("icon",t.prefixIsHashMode?"tuiIconHash":"tuiIconExternalLink"),o.xp6(1),o.hij(" ",o.lcZ(2,5,t.url)," "),o.xp6(2),o.Q6J("icon",t.options.icons.popupPreviewLinkEdit),o.xp6(1),o.Q6J("icon",t.options.icons.popupPreviewLinkClear)}}function S(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",19),o.NdJ("click",(function(){const e=o.CHM(t).$implicit;return o.oxw(2).setAnchor(e)})),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(1),o.hij(" #",t," ")}}function _(t,e){if(1&t&&(o.ynx(0),o._UZ(1,"hr",16),o.TgZ(2,"tui-scrollbar"),o.TgZ(3,"div",17),o.YNc(4,S,2,1,"button",18),o.ALo(5,"tuiFilterAnchors"),o.qZA(),o.qZA(),o.BQk()),2&t){const t=o.oxw();o.xp6(4),o.Q6J("ngForOf",o.Dn7(5,1,t.anchorIds,t.prefix,t.url))}}let T=(()=>{class t{constructor(t,e,n,r){this.doc=t,this.texts$=e,this.editor=n,this.options=r,this.isOnlyAnchorMode=this.detectAnchorMode(),this.addLink=new o.vpe,this.removeLink=new o.vpe,this.url=this.getHrefOrAnchorId(),this.edit=!this.url,this.prefix=this.makeDefaultPrefix(),this.anchorIds=this.getAllAnchorsIds()}get defaultProtocol(){var t,e;return null!==(e=null===(t=this.options.linkOptions)||void 0===t?void 0:t.protocol)&&void 0!==e?e:s.Ci}set anchorMode(t){this.isOnlyAnchorMode=t,this.prefix=t?s._s:this.makeDefaultPrefix()}get anchorMode(){return this.isOnlyAnchorMode}get prefixIsHashMode(){return this.prefix===s._s}get hasUrl(){return!!this.url}get href(){return`${this.prefix}${this.url}`}get showAnchorsList(){return!this.anchorMode&&this.edit&&this.anchorIds.length>0}get isViewMode(){return!this.edit}onSelectionChange(){this.isViewMode&&(this.url=this.getHrefOrAnchorId(),this.anchorMode=this.detectAnchorMode())}onMouseDown(t){(0,i.veZ)(t.target)&&!t.target.matches("a, button, input")&&t.preventDefault()}setAnchor(t){this.url=t,this.changePrefix(!0)}changePrefix(t){this.prefix=t?s._s:this.defaultProtocol}onSave(){this.url?this.addLink.emit(this.href):this.removeLink.emit()}onBackspace(){this.url||(this.prefix=this.isOnlyAnchorMode?s._s:this.defaultProtocol)}onEdit(){this.edit=!0}onRemove(){this.removeLink.emit()}onChange(t){this.url=this.removePrefix(t)}onClear(){this.url=""}makeDefaultPrefix(){var t,e;const n=this.getAnchorElement(),r=(0,c.$)(null!==(t=null==n?void 0:n.getAttribute("href"))&&void 0!==t?t:"").prefix||this.defaultProtocol;return n&&(!n.getAttribute("href")&&n.getAttribute("id")||(null===(e=n.getAttribute("href"))||void 0===e?void 0:e.startsWith(s._s)))?s._s:r}detectAnchorMode(){const t=this.getAnchorElement();return!(null==t?void 0:t.href)&&!!(null==t?void 0:t.getAttribute("id"))}getFocusedParentElement(){var t,e;return(null===(e=null===(t=this.doc.getSelection())||void 0===t?void 0:t.focusNode)||void 0===e?void 0:e.parentElement)||null}getAnchorElement(){var t,e,n;const r=this.getFocusedParentElement();return null!==(n=null!==(t=null==r?void 0:r.closest("a"))&&void 0!==t?t:null===(e=null==r?void 0:r.querySelector("img"))||void 0===e?void 0:e.closest("a"))&&void 0!==n?n:null}getHrefOrAnchorId(){const t=this.getAnchorElement();return t?this.removePrefix(t.getAttribute("href")||t.getAttribute("id")||""):this.url}removePrefix(t){var e;const n=t.startsWith(s._s)||this.prefix===s._s?t:`${null!==(e=this.prefix)&&void 0!==e?e:""}${t}`,{prefix:r,path:o}=(0,c.$)(n),i=this.isOnlyAnchorMode||r===s._s||""===r&&this.prefix===s._s;return this.prefix=i?s._s:""===r?this.defaultProtocol:r,o}getAllAnchorsIds(){var t;const e=Array.from(null!==(t=this.editor.getOriginTiptapEditor().view.dom.querySelectorAll('[data-type="jump-anchor"]'))&&void 0!==t?t:[]);return Array.from(e).map((t=>t.getAttribute("id")||"")).filter(Boolean)}}return t.ɵfac=function(e){return new(e||t)(o.Y36(r.K0),o.Y36(l.b$),o.Y36(a.$3),o.Y36(l.mJ))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-edit-link"]],hostBindings:function(t,e){1&t&&o.NdJ("selectionchange",(function(){return e.onSelectionChange()}),!1,o.evT)("mousedown",(function(t){return e.onMouseDown(t)}))},inputs:{anchorMode:"anchorMode"},outputs:{addLink:"addLink",removeLink:"removeLink"},decls:5,vars:3,consts:[[1,"t-edit-link",3,"mousedown"],[4,"ngIf","ngIfElse"],["view",""],[4,"ngIf"],[1,"t-label"],[1,"t-label-properties"],["fullOptions",""],[1,"t-url"],[1,"t-prefix"],["tuiAutoFocus","",1,"t-input",3,"ngModel","ngModelChange","input","keydown.backspace","keydown.prevent.enter"],[1,"t-cleaner",3,"src","click"],["appearance","icon","shape","rounded","size","s","title","Insert link","tuiIconButton","","type","button",1,"t-button",3,"icon","click"],["urlTitle",""],["iconAlign","left","target","_blank","tuiLink","",1,"t-link",3,"href","icon"],["appearance","icon","shape","rounded","size","s","title","Change link","tuiIconButton","","type","button",1,"t-button","t-edit-button",3,"icon","click"],["appearance","icon","automation-id","toolbar__popup-link-clear-button","shape","rounded","size","s","title","Remove link","tuiIconButton","","type","button",1,"t-button",3,"icon","click"],[1,"t-hr"],[1,"t-anchor-list"],["type","button","class","t-anchor",3,"click",4,"ngFor","ngForOf"],["type","button",1,"t-anchor",3,"click"]],template:function(t,e){if(1&t&&(o.TgZ(0,"div",0),o.NdJ("mousedown",(function(t){return t.stopImmediatePropagation()})),o.YNc(1,A,14,13,"ng-container",1),o.YNc(2,M,5,7,"ng-template",null,2,o.W1O),o.qZA(),o.YNc(4,_,6,5,"ng-container",3)),2&t){const t=o.MAs(3);o.xp6(1),o.Q6J("ngIf",e.edit)("ngIfElse",t),o.xp6(3),o.Q6J("ngIf",e.showAnchorsList)}},directives:[r.O5,d.l,u.k,h.JJ,h.On,p.P,f.v,m.V,g.I,r.sg],pipes:[r.Ov,b.X,k],styles:["[_nghost-%COMP%]{display:block;min-width:18.75rem}.t-edit-link[_ngcontent-%COMP%]{display:flex;min-height:4rem;align-items:center;padding-right:.75rem}.t-label[_ngcontent-%COMP%]{font:var(--tui-font-text-s);height:var(--tui-height-l);box-sizing:border-box;padding:.4375rem 1rem;min-width:12.5rem;max-width:25rem;width:100%}.t-label-properties[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:8.375rem;justify-content:space-between}.t-property_inactive[_ngcontent-%COMP%]{opacity:.5}.t-url[_ngcontent-%COMP%]{display:flex;font:var(--tui-font-text-m);color:var(--tui-text-02)}.t-input[_ngcontent-%COMP%]{flex:1}.t-input_filled[_ngcontent-%COMP%]{color:var(--tui-text-01)}.t-button[_ngcontent-%COMP%]{width:2rem;height:2rem;margin:0 .25rem;transition:background .2s}.t-edit-button[_ngcontent-%COMP%]{margin-left:auto}.t-link[_ngcontent-%COMP%]{margin:0 1rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.t-cleaner[_ngcontent-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-base-06);cursor:pointer;margin-left:auto}.t-cleaner[_ngcontent-%COMP%]:hover{color:var(--tui-base-07)}.t-cleaner_hidden[_ngcontent-%COMP%]{visibility:hidden}.t-anchor-list[_ngcontent-%COMP%]{display:flex;max-height:12.5rem;flex-direction:column}.t-anchor[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;min-height:2.75rem;padding:.375rem .5rem;margin:.125rem .5rem;border-radius:var(--tui-radius-m);text-align:left}.t-anchor[_ngcontent-%COMP%]:hover{background:var(--tui-base-02);cursor:pointer}"],changeDetection:0}),t})()},1884:(t,e,n)=>{n.d(e,{Fu:()=>c}),n(10553);var r=n(12057),o=n(24751),i=n(42600),s=n(43232),a=n(67934),l=n(74788);let c=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,o.u5,i.Q7V,s.fNO,s.EIu,s.jzK,a.z$l,a.YMv,s.Jyu]]}),t})();n(65538),n(45400)},65538:(t,e,n)=>{n.d(e,{X:()=>o});var r=n(74788);let o=(()=>{class t{transform(t){return t.length<60?t:`${t.slice(0,Math.max(0,40))}...${t.slice(t.length-10)}`}}return t.ɵfac=function(e){return new(e||t)},t.ɵpipe=r.Yjl({name:"tuiShortUrl",type:t,pure:!0}),t})()},45400:(t,e,n)=>{n.d(e,{$:()=>a});var r=n(42600),o=n(69725);function i(t=""){var e;const n=null!==(e=t.indexOf(o.jU))&&void 0!==e?e:-1,[r,s]=n>-1?[t.slice(0,n+o.jU.length),t.slice(n+o.jU.length,t.length)]:["",t],a=[r,s].filter(Boolean);return(null==s?void 0:s.includes("://"))&&a.length>1?i(s):a}function s(t=""){const[e,n]=t.split(/:/).slice(-2).filter(Boolean);return e&&n&&!(0,r.lj0)(t)?[`${e}:`,n]:[]}function a(t=""){if(t.startsWith(o._s))return{prefix:o._s,path:t.slice(1)};const[e="",n=""]=t.includes(o.jU)?i(t):s(t);if(n.includes(o.DN)){const[t,e]=s(n);if(t&&e)return{prefix:t,path:e}}return{prefix:e,path:""===e?t:n}}},22916:(t,e,n)=>{n.d(e,{V:()=>p});var r=n(74788),o=n(42600),i=n(76995),s=n(51703),a=n(12057);const l=function(){return[0,1]};function c(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",4),r.NdJ("tuiSizeChange",(function(e){return r.CHM(t),r.oxw().sizeChange.emit(e)})),r.qZA()}2&t&&r.Q6J("tuiResizer",r.DdM(1,l))}const d=function(t){return[t,0]},u=function(){return[1,0]},h=["*"];let p=(()=>{class t{constructor(){this.autoHeight=!1,this.width=null,this.height=null,this.sizeChange=new r.vpe}get hostWidth(){return(0,o.dtH)(this.width)?(0,o.O9r)(this.width):this.width}get hostHeight(){return this.autoHeight?null:(0,o.dtH)(this.height)?(0,o.O9r)(this.height):this.height}}return t.ɵfac=function(e){return new(e||t)},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-editor-resizable"]],hostVars:4,hostBindings:function(t,e){2&t&&r.Udp("width",e.hostWidth)("height",e.hostHeight)},inputs:{autoHeight:"autoHeight",width:"width",height:"height"},outputs:{sizeChange:"sizeChange"},ngContentSelectors:h,decls:5,vars:8,consts:[["tuiResizeable","",1,"t-resizable"],[1,"t-handle","t-handle-left-side",3,"tuiResizer","tuiSizeChange"],["class","t-handle t-handle-bottom-side",3,"tuiResizer","tuiSizeChange",4,"ngIf"],[1,"t-handle","t-handle-right-side",3,"tuiResizer","tuiSizeChange"],[1,"t-handle","t-handle-bottom-side",3,"tuiResizer","tuiSizeChange"]],template:function(t,e){1&t&&(r.F$t(),r.TgZ(0,"div",0),r.Hsn(1),r.TgZ(2,"div",1),r.NdJ("tuiSizeChange",(function(t){return e.sizeChange.emit(t)})),r.qZA(),r.YNc(3,c,1,2,"div",2),r.TgZ(4,"div",3),r.NdJ("tuiSizeChange",(function(t){return e.sizeChange.emit(t)})),r.qZA(),r.qZA()),2&t&&(r.ekj("t-resizable-auto-height",e.autoHeight),r.xp6(2),r.Q6J("tuiResizer",r.VKq(5,d,-1)),r.xp6(1),r.Q6J("ngIf",!e.autoHeight),r.xp6(1),r.Q6J("tuiResizer",r.DdM(7,u)))},directives:[i.U,s.L,a.O5],styles:['[_nghost-%COMP%]{position:relative;display:inline-block;box-sizing:border-box}[_nghost-%COMP%] .t-resizable[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%] .t-resizable-auto-height[_ngcontent-%COMP%]{height:auto!important}[_nghost-%COMP%] iframe[_ngcontent-%COMP%]{display:inline;pointer-events:none}[_nghost-%COMP%]:hover .t-handle[_ngcontent-%COMP%]:after{opacity:1}.t-handle[_ngcontent-%COMP%]{position:absolute;top:0;display:flex;width:.75rem;cursor:col-resize;justify-content:center;align-items:center;height:100%}.t-handle[_ngcontent-%COMP%]:after{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:"";width:50%;height:33%;box-sizing:border-box;border-radius:var(--tui-radius-m);background:var(--tui-base-08);border:1px solid var(--tui-base-03);opacity:0}.t-handle-left-side[_ngcontent-%COMP%]{left:0}.t-handle-bottom-side[_ngcontent-%COMP%]{top:unset;bottom:.3125rem;height:.95rem;width:100%}.t-handle-right-side[_ngcontent-%COMP%]{right:0}'],changeDetection:0}),t})()},8274:(t,e,n)=>{n.d(e,{_3:()=>i,Sl:()=>l});var r=n(13704),o=n(74788);let i=(()=>{class t extends r.d{constructor(){super(...arguments),this.currentHeight=0,this.currentWidth=0}get attrs(){var t;return(null===(t=this.node)||void 0===t?void 0:t.attrs)||{src:""}}get width(){return this.currentWidth||this.attrs.width||null}get height(){return this.currentHeight||this.attrs.height||null}}return t.ɵfac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.ɵdir=o.lG2({type:t,features:[o.qOj]}),t})();n(22916);var s=n(12057),a=n(42600);let l=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=o.oAB({type:t}),t.ɵinj=o.cJS({imports:[[s.ez,a.k54,a.gjW]]}),t})()},76690:(t,e,n)=>{n.d(e,{D:()=>c});var r=n(12057),o=n(74788),i=n(42600),s=n(43232),a=n(46561),l=n(40401);let c=(()=>{class t{constructor(t,e,n,r,o,i,s){this.el=t,this.renderer=e,this.sanitizer=n,this.tuiSanitizer=r,this.document=o,this.editor=i,this.options=s}set content(t){var e;this.renderer.setProperty(this.el.nativeElement,"innerHTML",this.tuiSanitizer?this.tuiSanitizer.sanitize(o.q3G.HTML,null!==(e=null==t?void 0:t.replace(/colwidth/g,"width"))&&void 0!==e?e:""):this.sanitizer.sanitize(o.q3G.HTML,null!=t?t:""))}click(t){var e,n;if(this.editor||!(0,i.veZ)(t.target))return;const r=(null===(n=null===(e=t.target)||void 0===e?void 0:e.closest("a"))||void 0===n?void 0:n.getAttribute("href"))||"";r.startsWith("#")&&(this.document.location.hash=r.replace("#",""),t.preventDefault())}}return t.ɵfac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(o.Tiy),o.Y36(s.hmb,8),o.Y36(r.K0),o.Y36(a.JU,8),o.Y36(l.mJ))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-editor-socket"]],hostVars:2,hostBindings:function(t,e){1&t&&o.NdJ("click",(function(t){return e.click(t)})),2&t&&o.ekj("tui-editor-socket",e.options.enableDefaultStyles)},inputs:{content:"content"},decls:0,vars:0,template:function(t,e){},styles:['.tui-editor-socket{display:block;margin:0;color:var(--tui-text-01);font:var(--tui-font-text-m)}.tui-editor-socket[tuiTiptapEditor]{overflow:hidden}.tui-editor-socket .ProseMirror{min-height:5.375rem;padding:.2rem 1rem;outline:none;white-space:pre-wrap}.tui-editor-socket .resize-cursor{cursor:ew-resize;cursor:col-resize}.tui-editor-socket h1,.tui-editor-socket h2,.tui-editor-socket h3,.tui-editor-socket h4,.tui-editor-socket h5,.tui-editor-socket h6{word-break:break-word;line-height:normal}.tui-editor-socket h1:first-child,.tui-editor-socket h2:first-child,.tui-editor-socket p:last-child{margin-bottom:0}.tui-editor-socket p:last-child,.tui-editor-socket pre:last-child{margin-bottom:0}.tui-editor-socket p:empty:after{content:" ";white-space:pre}.tui-editor-socket p:first-child{margin-top:0;min-width:1px}.tui-editor-socket p{margin:1rem 0}.tui-editor-socket p>span{line-height:initial}.tui-editor-socket blockquote{margin:1.25rem 0 1.25rem 1.5rem;padding-left:1.0625rem;border-left:1px solid var(--tui-base-04)}.tui-editor-socket hr{border:none;border-top:1px solid var(--tui-base-03);margin:1rem 0}.tui-editor-socket mark{background:unset;color:inherit}.tui-editor-socket font[face="Courier New"]{display:inline-block;padding:.25rem .5rem;border-radius:.25rem;background-color:#ecf1f7;word-break:break-word}.tui-editor-socket a:not([data-type="jump-anchor"]){color:var(--tui-link);text-decoration:none;outline:none}.tui-editor-socket a:not([data-type="jump-anchor"]):hover{color:var(--tui-link-hover);text-decoration:underline}.tui-editor-socket a:not([data-type="jump-anchor"]):active{color:var(--tui-primary-active)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]{text-decoration:underline;-webkit-text-decoration-color:var(--tui-link);text-decoration-color:var(--tui-link)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:before{content:"#"}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:hover{color:var(--tui-link)}.tui-editor-socket .ProseMirror a:hover img[contenteditable=false]{cursor:pointer;outline:.25rem solid var(--tui-link)}.tui-editor-socket ul:not([data-type]),.tui-editor-socket ol:not([data-type]){list-style-type:none;margin:1rem 1rem 1rem 1.5rem;padding:0}.tui-editor-socket ul:not([data-type]) li,.tui-editor-socket ol:not([data-type]) li{margin:.75rem 0}.tui-editor-socket ul:not([data-type]) li>p,.tui-editor-socket ol:not([data-type]) li>p{display:inline;margin:0 auto;word-break:break-word}.tui-editor-socket ul:not([data-type]) li:before,.tui-editor-socket ol:not([data-type]) li:before{unicode-bidi:-webkit-isolate;unicode-bidi:isolate;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;text-transform:none;text-indent:0;text-align:start;text-align-last:start}.tui-editor-socket ul:not([data-type]) li>p{display:block}.tui-editor-socket ul:not([data-type])>li:before{content:"";display:inline-block;width:.5rem;height:.5rem;border-radius:100%;margin:.5rem .875rem .0625rem -1.375rem;background-color:var(--tui-primary);vertical-align:top;box-sizing:border-box;float:left}.tui-editor-socket li ul:not([data-type])>li:before{background:none;border:.125rem solid var(--tui-primary)}.tui-editor-socket li ul:not([data-type])>li>ul:not([data-type])>li:before{background:var(--tui-primary);border-radius:0;width:.375rem;height:.375rem}.tui-editor-socket ol:not([data-type]){counter-reset:item}.tui-editor-socket ol:not([data-type])>li:before{content:counters(item,".") ".";display:block;margin:0 .75rem 0 -1.5rem;counter-increment:item;color:var(--tui-base-05);vertical-align:top;float:left;white-space:nowrap}.tui-editor-socket ul[data-type] li[data-checked]{display:flex;grid-gap:.5rem;gap:.5rem}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]{position:relative;width:var(--t-size, 1rem);height:var(--t-size, 1rem);border-radius:var(--tui-radius-xs, .25rem);transition-property:color,background,opacity,box-shadow,border;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:.125rem solid transparent;outline-offset:-.125rem;margin-top:.25rem;cursor:pointer}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:currentColor;-webkit-mask:url(\'data:image/svg+xml,\') center / 100%;mask:url(\'data:image/svg+xml,\') center / 100%;transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked{background:var(--tui-primary, #526ed3);color:var(--tui-primary-text, #fff)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked:before{-webkit-mask-image:url(\'data:image/svg+xml,\');mask-image:url(\'data:image/svg+xml,\');transform:scale(1)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]{box-shadow:inset 0 0 0 1px var(--tui-base-04);color:var(--tui-text-01)}.tui-editor-socket._preview-image img{cursor:pointer}.tui-editor-socket .ProseMirror video,.tui-editor-socket .ProseMirror audio{pointer-events:none}.tui-editor-socket img.ProseMirror-selectednode{outline:.25rem solid var(--tui-primary-hover)}.tui-editor-socket .t-editor-placeholder:before{content:attr(data-placeholder);float:left;color:var(--tui-base-05);pointer-events:none;height:0}.tui-editor-socket table{border-collapse:collapse;table-layout:fixed;width:100%;margin:0;overflow:hidden}.tui-editor-socket table .tableWrapper{overflow-x:auto}.tui-editor-socket .tableWrapper,.tui-editor-socket .tui-table-wrapper{overflow-x:auto}.tui-editor-socket table td{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word}.tui-editor-socket table th{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word;font-weight:bold;text-align:left;background-color:var(--tui-base-02);min-height:2rem}.tui-editor-socket table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background-color:#adf;pointer-events:none}.tui-editor-socket table td>*{margin-top:0;margin-bottom:0}.tui-editor-socket table th>*{margin-top:0;margin-bottom:0}.tui-editor-socket .selectedCell:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--tui-selection);pointer-events:none}.tui-editor-socket summary{display:flex;align-items:center;min-height:3.5rem;width:100%;padding:0 1.25rem;box-sizing:border-box;border-radius:var(--tui-radius-l);pointer-events:none;outline:none}.tui-editor-socket summary:focus-visible{outline:2px solid var(--tui-link)}.tui-editor-socket summary p{min-width:1px;margin:0}.tui-editor-socket summary::-webkit-details-marker{display:none}.tui-editor-socket details[open] summary{border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-editor-socket .details-arrow,.tui-editor-socket .t-details-arrow{position:absolute;top:1.5rem;right:1.25rem;height:.575rem;width:.575rem;border:1px solid var(--tui-base-06);border-width:0 2px 2px 0;transform:rotate(45deg);transition:var(--tui-duration, .3s);-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:0;background:none;cursor:pointer;outline:none}.tui-editor-socket details{width:100%;border:1px solid var(--tui-base-04);border-radius:var(--tui-radius-l)}.tui-editor-socket div[data-type=details-content]{padding:1.25rem;min-height:3rem;border:1px solid var(--tui-base-04);border-width:1px 0 0}.tui-editor-socket div[data-type=details-content] h1:first-child,.tui-editor-socket div[data-type=details-content] h2:first-child,.tui-editor-socket div[data-type=details-content] pre:first-child,.tui-editor-socket div[data-type=details-content] ul:first-child,.tui-editor-socket div[data-type=details-content] ol:first-child,.tui-editor-socket div[data-type=details-content] ol li:first-child,.tui-editor-socket div[data-type=details-content] ul li:first-child{margin-top:0}.tui-editor-socket .details-wrapper,.tui-editor-socket .t-details-wrapper{margin-bottom:.5rem;position:relative;display:flex}.tui-editor-socket .details-wrapper_rendered .details-arrow,.tui-editor-socket .t-details-wrapper_rendered .details-arrow,.tui-editor-socket .details-wrapper_rendered .t-details-arrow,.tui-editor-socket .t-details-wrapper_rendered .t-details-arrow{pointer-events:none}.tui-editor-socket .details-wrapper_rendered summary,.tui-editor-socket .t-details-wrapper_rendered summary{transition:transform var(--tui-duration, .3s);cursor:pointer;pointer-events:auto}.tui-editor-socket .details-wrapper_rendered summary:hover,.tui-editor-socket .t-details-wrapper_rendered summary:hover{background:var(--tui-base-02)}.tui-editor-socket details[open]+.details-arrow,.tui-editor-socket details[open]+.t-details-arrow{top:1.75rem;transform:rotate(225deg)}.tui-editor-socket pre{white-space:pre-wrap;word-break:break-word;border-radius:.25rem;margin:1rem 0;padding:.75rem 1rem;font-family:Courier,monospace;color:var(--tui-text-02);background:var(--tui-base-02)}.tui-editor-socket .tui-group-node{display:flex;flex-direction:row}.tui-editor-socket .tui-group-node:hover>.tui-group-pointer{pointer-events:auto;opacity:1}.tui-editor-socket .tui-group-pointer{opacity:0;min-height:.8125rem;max-height:.8125rem;min-width:.8125rem;max-width:.8125rem;margin:.3125rem .3125rem 0 0;cursor:grab;background-image:url(\'data:image/svg+xml;charset=UTF-8,\');background-repeat:no-repeat;background-size:contain;background-position:center}.tui-editor-socket [data-mode=onDark] .tui-group-pointer{background-image:url(\'data:image/svg+xml;charset=UTF-8,\')}\n'],encapsulation:2,changeDetection:0}),t})()},13099:(t,e,n)=>{n.d(e,{W:()=>c});var r=n(42600),o=n(43232),i=n(9112),s=n(88002),a=n(87519),l=n(74788);let c=(()=>{class t extends o.ydp{constructor(){super(...arguments),this.stream$=(0,i.aj)([this.handler$,this.selection$.pipe((0,s.U)((()=>this.getRange())),(0,a.x)(((t,e)=>t.startOffset===e.startOffset&&t.endOffset===e.endOffset)))]).pipe((0,s.U)((([t,e])=>{var n;const o=this.el.nativeElement.contains(e.commonAncestorContainer)||(null===(n=e.commonAncestorContainer.parentElement)||void 0===n?void 0:n.closest("tui-dropdown"));return this.range=o&&(0,r.wqZ)(e.commonAncestorContainer)?e:this.range,o&&t(this.range)||this.inDropdown(e)}))),this.position="selection"}set tuiToolbarDropdown(t){this.tuiDropdownSelection=t}getClientRect(){var t,e;switch(this.position){case"tag":{const{commonAncestorContainer:e}=this.range,n=(0,r.veZ)(e)?e:e.parentNode;return n&&(0,r.veZ)(n)?(null===(t=this.doc.querySelector(".ProseMirror-selectednode"))||void 0===t?void 0:t.getBoundingClientRect())||n.getBoundingClientRect():r.Jy9}case"word":return(0,o.DII)(this.range).getBoundingClientRect();default:{const t=this.range.getBoundingClientRect();return 0===t.x&&0===t.y&&0===t.width&&0===t.height?(null!==(e=this.el.nativeElement.querySelector("p"))&&void 0!==e?e:this.el.nativeElement).getBoundingClientRect():t}}}}return t.ɵfac=function(){let e;return function(n){return(e||(e=l.n5z(t)))(n||t)}}(),t.ɵdir=l.lG2({type:t,selectors:[["","tuiToolbarDropdown",""]],inputs:{position:["tuiToolbarDropdownPosition","position"],tuiToolbarDropdown:"tuiToolbarDropdown"},features:[l._Bn([(0,o.UKU)(t),(0,o.Ic9)(t)]),l.qOj]}),t})()},8820:(t,e,n)=>{n.d(e,{a:()=>J});var r=n(12057),o=n(74788),i=n(24751),s=n(42600),a=n(43232),l=n(90712),c=n(69725),d=n(5915),u=n(40401),h=n(48178),p=n(87874),f=n(46782),m=n(1566),g=n(42),b=n(55788),k=n(62490),v=n(96281),y=n(57495),w=n(21335),x=n(16331),C=n(82335),A=n(80475),M=n(62541),S=n(13099),_=n(76690),T=n(6723),O=n(10553);function E(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-toolbar",7),o.NdJ("fileAttached",(function(e){return o.CHM(t),o.oxw(2).fileAttached.emit(e)})),o.Hsn(1,1),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("disabled",!t.interactive)("tools",t.tools)}}function D(t,e){if(1&t&&(o.TgZ(0,"div",8),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij(" ",t.exampleText," ")}}function N(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-scrollbar",12),o.NdJ("mousedown",(function(e){return o.CHM(t),o.oxw(3).focus(e)})),o.GkF(1,13),o.qZA()}if(2&t){o.oxw();const t=o.MAs(4);o.xp6(1),o.Q6J("ngTemplateOutlet",t)}}function L(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-scrollbar",14),o.NdJ("mousedown",(function(e){return o.CHM(t),o.oxw(3).focus(e)})),o.GkF(1,13),o._UZ(2,"tui-editor-portal-host"),o.qZA()}if(2&t){o.oxw();const t=o.MAs(4);o.xp6(1),o.Q6J("ngTemplateOutlet",t)}}function I(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-toolbar",20),o.NdJ("fileAttached",(function(e){return o.CHM(t),o.oxw(5).fileAttached.emit(e)})),o.Hsn(1,2),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.Q6J("disabled",!e.interactive)("tools",e.tools)("tuiActiveZoneParent",t)}}function R(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-edit-link",21,22),o.NdJ("addLink",(function(e){o.CHM(t);const n=o.MAs(1),r=o.oxw(5);return n.anchorMode?r.addAnchor(e):r.addLink(e)}))("removeLink",(function(){o.CHM(t);const e=o.MAs(1),n=o.oxw(5);return e.anchorMode?n.removeAnchor():n.removeLink()})),o.qZA()}}function z(t,e){1&t&&(o.ynx(0),o.Hsn(1,3),o.BQk())}function P(t,e){if(1&t&&(o.TgZ(0,"div"),o.YNc(1,I,2,3,"tui-toolbar",18),o.YNc(2,R,2,0,"tui-edit-link",19),o.YNc(3,z,2,0,"ng-container",6),o.qZA()),2&t){const t=o.oxw(3).ngIf,e=o.oxw();o.ekj("t-floating",e.floatingToolbar),o.xp6(1),o.Q6J("ngIf",t&&e.tools.length&&e.floatingToolbar),o.xp6(1),o.Q6J("ngIf",e.isLinkSelected),o.xp6(1),o.Q6J("ngIf",e.mentionSuggestions)}}function H(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",15),o.TgZ(1,"tui-editor-socket",16),o.NdJ("stateChange",(function(){return 0}))("valueChange",(function(e){return o.CHM(t),o.oxw(3).onModelChange(e)})),o.qZA(),o.qZA(),o.YNc(2,P,4,5,"ng-template",null,17,o.W1O)}if(2&t){const t=o.MAs(3),e=o.oxw(3);o.Q6J("tuiDropdown",t)("tuiToolbarDropdown",e.dropdownSelectionHandler)("tuiToolbarDropdownPosition",e.floatingToolbar?"selection":"tag"),o.xp6(1),o.Q6J("editable",e.interactive)("value",e.value)}}function q(t,e){if(1&t&&(o.ynx(0),o.YNc(1,N,2,1,"tui-scrollbar",9),o.YNc(2,L,3,1,"tui-scrollbar",10),o.YNc(3,H,4,5,"ng-template",null,11,o.W1O),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.floatingToolbar),o.xp6(1),o.Q6J("ngIf",!t.floatingToolbar)}}function B(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",1),o.NdJ("tuiActiveZoneChange",(function(e){return o.CHM(t),o.oxw().onActiveZone(e)})),o.TgZ(1,"div",2),o.YNc(2,E,2,2,"tui-toolbar",3),o.TgZ(3,"div",4),o.Hsn(4),o.qZA(),o.YNc(5,D,2,1,"div",5),o.qZA(),o.YNc(6,q,5,2,"ng-container",6),o.qZA()}if(2&t){const t=e.ngIf,n=o.oxw();o.Q6J("appearance",n.options.appearence)("disabled",n.disabled)("focus",n.computedFocused)("hover",n.pseudoHover)("invalid",n.computedInvalid)("readOnly",n.readOnly),o.xp6(2),o.Q6J("ngIf",t&&n.tools.length&&!n.floatingToolbar),o.xp6(1),o.ekj("t-placeholder_raised",n.placeholderRaised),o.xp6(2),o.Q6J("ngIf",n.hasExampleText),o.xp6(1),o.Q6J("ngIf",t)}}const $=["*",[["tools"]],[["tools"]],[["mention"]]],F=["*","tools","tools","mention"];let J=(()=>{class t extends s.M$T{constructor(t,e,n,r,i,s,a,l){super(t,e,a),this.editorLoaded$=n,this.editorService=r,this.contentProcessor=i,this.doc=s,this.options=l,this.exampleText="",this.tools=c.Db,this.floatingToolbar=!1,this.fileAttached=new o.vpe,this.focused=!1,this.openDropdownWhen=t=>this.currentFocusedNodeIsTextAnchor(t)||this.currentFocusedNodeIsImageAnchor||this.mentionSuggestions.length>0,this.editorLoaded$.pipe((0,p.g)(0),(0,f.R)(this.destroy$)).subscribe((()=>this.patchContentEditableElement()))}get nativeFocusableElement(){var t,e;return this.computedDisabled?null:(null===(e=null===(t=this.el)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.querySelector("[contenteditable].ProseMirror"))||null}get dropdownSelectionHandler(){return this.floatingToolbar?s.YeN:this.focused?this.openDropdownWhen:s.IyD}get editor(){return this.editorService.getOriginTiptapEditor()?this.editorService:null}get placeholderRaised(){return this.computedFocused&&!this.readOnly||this.hasValue}get hasExampleText(){return!!this.exampleText&&this.computedFocused&&!this.hasValue&&!this.readOnly}get isLinkSelected(){var t,e,n;const r=null===(t=this.doc.getSelection())||void 0===t?void 0:t.focusNode,o=null==r?void 0:r.parentNode;return"a"===(null==o?void 0:o.nodeName.toLowerCase())||"a"===(null===(e=null==o?void 0:o.parentNode)||void 0===e?void 0:e.nodeName.toLowerCase())||"a"===(null==r?void 0:r.nodeName.toLowerCase())||!!(null===(n=null==o?void 0:o.parentElement)||void 0===n?void 0:n.closest("tui-edit-link"))}get mentionSuggestions(){const t=this.selectionState.before;return(null==t?void 0:t.startsWith("@"))&&t.length>1&&(null==t?void 0:t.replace("@",""))||""}writeValue(t){var e,n;if(t===this.value)return;const r=this.contentProcessor(t||"");super.writeValue(r),r!==t&&(null===(e=this.control)||void 0===e||e.setValue(r,{onlySelf:!1,emitEvent:!1,emitModelToViewChange:!1,emitViewToModelChange:!1})),this.focused||null===(n=this.doc.getSelection())||void 0===n||n.removeAllRanges()}onActiveZone(t){var e;this.focused=t,this.updateFocused(t),null===(e=this.control)||void 0===e||e.updateValueAndValidity()}onModelChange(t){this.value=t}addAnchor(t){var e;null===(e=this.editor)||void 0===e||e.setAnchor(t)}removeAnchor(){var t;null===(t=this.editor)||void 0===t||t.removeAnchor()}addLink(t){var e,n;null===(e=this.editor)||void 0===e||e.selectClosest(),null===(n=this.editor)||void 0===n||n.setLink(t)}removeLink(){var t;null===(t=this.editor)||void 0===t||t.unsetLink()}get selectionState(){return(0,h.Q4)(this.editor)}focus(t){var e,n;(null===(e=this.nativeFocusableElement)||void 0===e?void 0:e.contains(t.target))||(t.preventDefault(),null===(n=this.nativeFocusableElement)||void 0===n||n.focus())}ngOnDestroy(){var t;null===(t=this.editor)||void 0===t||t.destroy()}getFallbackValue(){return""}currentFocusedNodeIsTextAnchor(t){var e,n;return!!(null===(n=null===(e=t.startContainer.parentElement)||void 0===e?void 0:e.closest("a"))||void 0===n?void 0:n.contains(this.focusNode))&&(0,h.nC)(t)}get focusNode(){var t,e;return null!==(e=null===(t=this.doc.getSelection())||void 0===t?void 0:t.focusNode)&&void 0!==e?e:null}get hasValue(){return!!this.value}get currentFocusedNodeIsImageAnchor(){var t,e,n;return"A"===(null===(t=this.focusNode)||void 0===t?void 0:t.nodeName)&&["IMG","TUI-IMAGE-EDITOR"].includes(null===(n=null===(e=this.focusNode)||void 0===e?void 0:e.childNodes[0])||void 0===n?void 0:n.nodeName)}patchContentEditableElement(){var t,e;null===(t=this.nativeFocusableElement)||void 0===t||t.setAttribute("translate",this.options.translate),null===(e=this.nativeFocusableElement)||void 0===e||e.setAttribute("spellcheck",String(this.options.spellcheck))}}return t.ɵfac=function(e){return new(e||t)(o.Y36(i.a5,10),o.Y36(o.sBO),o.Y36(u.ZW),o.Y36(d.$3),o.Y36(u.F1),o.Y36(r.K0),o.Y36(u.bK,8),o.Y36(u.mJ))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-editor"]],viewQuery:function(t,e){if(1&t&&(o.Gf(d.JU,5,o.SBq),o.Gf(l.M6,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.el=t.first),o.iGM(t=o.CRH())&&(e.toolbar=t.first)}},inputs:{exampleText:"exampleText",tools:"tools",floatingToolbar:"floatingToolbar"},outputs:{fileAttached:"fileAttached"},features:[o._Bn([(0,s.FTc)(t),(0,s.f$T)({delay:a.GcO}),m.m]),o.qOj],ngContentSelectors:F,decls:2,vars:3,consts:[["tuiWrapper","","class","t-wrapper",3,"appearance","disabled","focus","hover","invalid","readOnly","tuiActiveZoneChange",4,"ngIf"],["tuiWrapper","",1,"t-wrapper",3,"appearance","disabled","focus","hover","invalid","readOnly","tuiActiveZoneChange"],[1,"t-toolbar-wrapper"],[3,"disabled","tools","fileAttached",4,"ngIf"],[1,"t-placeholder"],["class","t-example-text",4,"ngIf"],[4,"ngIf"],[3,"disabled","tools","fileAttached"],[1,"t-example-text"],["class","t-scrollbar",3,"mousedown",4,"ngIf"],["tuiEditorPortal","","class","t-scrollbar",3,"mousedown",4,"ngIf"],["editor",""],[1,"t-scrollbar",3,"mousedown"],[3,"ngTemplateOutlet"],["tuiEditorPortal","",1,"t-scrollbar",3,"mousedown"],["tuiDropdownLimitWidth","auto",3,"tuiDropdown","tuiToolbarDropdown","tuiToolbarDropdownPosition"],["tuiTiptapEditor","",3,"editable","value","stateChange","valueChange"],["dropdown",""],[3,"disabled","tools","tuiActiveZoneParent","fileAttached",4,"ngIf"],[3,"addLink","removeLink",4,"ngIf"],[3,"disabled","tools","tuiActiveZoneParent","fileAttached"],[3,"addLink","removeLink"],["link",""]],template:function(t,e){1&t&&(o.F$t($),o.YNc(0,B,7,11,"div",0),o.ALo(1,"async")),2&t&&o.Q6J("ngIf",o.lcZ(1,1,e.editorLoaded$))},directives:[r.O5,g.o,b.e,k.M,v.I,r.tP,y.A,w.d,x.Ek,C.t,A.V,M.A,S.W,_.D,T.J,O.l],pipes:[r.Ov],styles:["[_nghost-%COMP%]{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);border-radius:var(--tui-radius-m);max-height:inherit;min-height:10rem;box-sizing:border-box;overflow:clip}.t-wrapper[_ngcontent-%COMP%]{display:flex;max-height:inherit;min-height:inherit;cursor:text;overflow:clip;flex-direction:column;border-radius:inherit}.t-placeholder[_ngcontent-%COMP%]{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);margin:1rem 1rem -1rem;min-height:1.625rem;width:95%;font-size:.9375rem}@supports (-webkit-hyphens: none){.t-placeholder[_ngcontent-%COMP%]{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised[_ngcontent-%COMP%]{transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}._invalid[_nghost-%COMP%]:not(._focused) .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill)}._invalid[_nghost-%COMP%]:not(._focused) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill-night)}._focused[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-size=l][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font:var(--tui-font-text-m);line-height:1.25rem}[data-size=l][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font-size:.8156rem}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}._focused[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}.t-placeholder_raised[_ngcontent-%COMP%]{width:110%}.t-placeholder[_ngcontent-%COMP%]:empty{min-height:.8rem}.t-example-text[_ngcontent-%COMP%]{position:absolute;left:1rem;margin-top:1.6rem;color:var(--tui-base-06);letter-spacing:normal;text-transform:none}.t-example-text_light[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}.t-example-text_dark[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-scrollbar[_ngcontent-%COMP%]{display:flex;border-bottom:.3125rem solid transparent;padding-bottom:1.3125rem;box-sizing:border-box;flex:1}.t-floating[_ngcontent-%COMP%], .t-floating[_ngcontent-%COMP%] .t-tools-wrapper{max-width:var(--tui-floating-toolbar-max-width, 31.25rem);flex-wrap:nowrap}"],changeDetection:0}),t})()},1566:(t,e,n)=>{n.d(e,{m:()=>h});var r=n(74788),o=n(5915),i=n(40401),s=n(74235),a=n(9112),l=n(15257),c=n(88002),d=n(47349),u=n(53058);const h=[{provide:i.F4,deps:[i.Wf],useFactory:t=>{const e=new s.t(1);return Promise.all(t).then((t=>e.next(t))),e}},{provide:i.Y1,deps:[r.Qsj],useFactory:t=>t.createElement("div")},{provide:i.ZW,deps:[i.Y1,i.F4,i.bG],useFactory:(t,e,n)=>(0,a.aj)([n,e]).pipe((0,l.q)(1),(0,c.U)((([e,n])=>new e({element:t,extensions:n}))),(0,d.d)({bufferSize:1,refCount:!0}))},o.$3,u.Y]},21335:(t,e,n)=>{n.d(e,{d:()=>i});var r=n(42600),o=n(74788);let i=(()=>{class t extends r.ErH{}return t.ɵfac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.ɵcmp=o.Xpm({type:t,selectors:[["tui-editor-portal-host"]],features:[o._Bn([{provide:r.N9Y,useExisting:r.ae2},{provide:r.ErH,useExisting:t}]),o.qOj],decls:2,vars:0,consts:[["viewContainer",""]],template:function(t,e){1&t&&o.GkF(0,null,0)},styles:["[_nghost-%COMP%]{position:absolute;top:0;left:0;display:block;height:100%;width:100%;pointer-events:none}"],changeDetection:0}),t})()},57495:(t,e,n)=>{n.d(e,{A:()=>a});var r=n(74788),o=n(42600),i=n(43232),s=n(53058);let a=(()=>{class t extends i.O4x{constructor(t){super(),this.el=t,this.type="viewport"}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq))},t.ɵdir=r.lG2({type:t,selectors:[["","tuiEditorPortal",""]],features:[r._Bn([{provide:o.ae2,useExisting:s.Y},(0,i.ckU)(t)]),r.qOj]}),t})()},53058:(t,e,n)=>{n.d(e,{Y:()=>i});var r=n(42600),o=n(74788);let i=(()=>{class t extends r.N9Y{}return t.ɵfac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.ɵprov=o.Yz7({token:t,factory:t.ɵfac}),t})()},69057:(t,e,n)=>{n.d(e,{j:()=>v});var r=n(97582),o=n(74788),i=n(24751),s=n(91211),a=n(42600),l=n(43232),c=n(48178),d=n(98778),u=n(75526),h=n(19042),p=n(45642),f=n(61183),m=n(58333),g=n(55788);function b(t,e){if(1&t&&o._UZ(0,"div",4),2&t){const t=o.oxw();o.Udp("background",t.background)}}function k(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-color-selector",5),o.NdJ("colorChange",(function(e){return o.CHM(t),o.oxw().value=e})),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw();o.Q6J("colors",n.colors)("tuiActiveZoneParent",t)("color",n.value)}}class v extends a.M$T{constructor(t,e,n){super(t,e),this.domSanitizer=n,this.colors=new Map,this.open=!1}get nativeFocusableElement(){return this.computedDisabled||!this.textfield?null:this.textfield.nativeFocusableElement}get focused(){return!!this.dropdown&&this.dropdown.focused}get background(){return this.sanitize(this.value,this.domSanitizer)}get mode(){return this.value.startsWith("#")?"hex":this.value.startsWith("rgb")?"rgb":"gradient"}onClick(){this.open=!this.open}maskitoOptions(t){return"hex"===t?{mask:["#",...new Array(6).fill(/[0-9a-f]/i)]}:null}onValueChange(t){this.value=t}onFocused(t){this.updateFocused(t)}getFallbackValue(){return"#000000"}sanitize(t,e){return t.startsWith("linear-gradient(")?e.bypassSecurityTrustStyle((0,c.CH)((0,c._N)((0,c.U5)(t)))):t}}v.ɵfac=function(t){return new(t||v)(o.Y36(i.a5,10),o.Y36(o.sBO),o.Y36(s.H7))},v.ɵcmp=o.Xpm({type:v,selectors:[["tui-input-color"]],viewQuery:function(t,e){if(1&t&&(o.Gf(l.ycg,5),o.Gf(l.o1K,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.textfield=t.first),o.iGM(t=o.CRH())&&(e.dropdown=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("click",(function(){return e.onClick()}))},inputs:{colors:"colors"},features:[o._Bn([],[(0,l.fxH)({maxHeight:600})]),o.qOj],ngContentSelectors:["*"],decls:7,vars:13,consts:[[1,"t-wrapper",3,"content","open","openChange"],[1,"t-textfield",3,"disabled","focusable","invalid","maskito","nativeId","pseudoActive","pseudoFocus","pseudoHover","readOnly","tuiTextfieldIconLeft","value","valueChange","focusedChange"],["color",""],["picker",""],[1,"t-color"],[3,"colors","tuiActiveZoneParent","color","colorChange"]],template:function(t,e){if(1&t&&(o.F$t(),o.TgZ(0,"tui-hosted-dropdown",0),o.NdJ("openChange",(function(t){return e.open=t})),o.TgZ(1,"tui-primitive-textfield",1),o.NdJ("valueChange",(function(t){return e.value=t}))("focusedChange",(function(t){return e.onFocused(t)})),o.Hsn(2),o.qZA(),o.qZA(),o.YNc(3,b,1,2,"ng-template",null,2,o.W1O),o.YNc(5,k,1,3,"ng-template",null,3,o.W1O)),2&t){const t=o.MAs(4),n=o.MAs(6);o.Q6J("content",n)("open",e.open),o.xp6(1),o.Q6J("disabled",e.disabled)("focusable",e.focusable)("invalid",e.computedInvalid)("maskito",e.maskitoOptions(e.mode))("nativeId",e.nativeId)("pseudoActive",e.pseudoActive)("pseudoFocus",e.computedFocused)("pseudoHover",e.pseudoHover)("readOnly",e.readOnly)("tuiTextfieldIconLeft",t)("value",e.value)}},directives:[d.o,u.y,h.B,p.ro,f.a,m.s,g.e],styles:["[_nghost-%COMP%]{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-wrapper[_ngcontent-%COMP%]{display:flex;border-radius:inherit}.t-textfield[_ngcontent-%COMP%]{border-radius:inherit;text-align:inherit}.t-textfield[_ngcontent-%COMP%] .t-input{text-transform:lowercase!important}.t-color[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-03-dark);border-radius:.125rem;pointer-events:auto!important}"],changeDetection:0}),(0,r.gn)([a.UMq],v.prototype,"maskitoOptions",null),(0,r.gn)([a.UMq],v.prototype,"sanitize",null)},29761:(t,e,n)=>{n.d(e,{X:()=>y});var r=n(5915),o=n(40401),i=n(9112),s=n(88002),a=n(74788),l=n(12057),c=n(42486),d=n(98778),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928);function b(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",6),a.TgZ(1,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("left")})),a.qZA(),a.TgZ(2,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("center")})),a.qZA(),a.TgZ(3,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("right")})),a.qZA(),a.TgZ(4,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("justify")})),a.qZA(),a.qZA()}if(2&t){const t=a.oxw().tuiLet,e=a.oxw().ngIf,n=a.oxw();a.xp6(1),a.Q6J("icon",n.options.icons.textAlignLeft)("pseudoActive",!(null==t||!t.left))("tuiHint",e.justifyLeft),a.xp6(1),a.Q6J("icon",n.options.icons.textAlignCenter)("pseudoActive",!(null==t||!t.center))("tuiHint",e.justifyCenter),a.xp6(1),a.Q6J("icon",n.options.icons.textAlignRight)("pseudoActive",!(null==t||!t.right))("tuiHint",e.justifyRight),a.xp6(1),a.Q6J("icon",n.options.icons.textAlignJustify)("pseudoActive",!(null==t||!t.justify))("tuiHint",e.justifyFull)}}function k(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",2,3),a._UZ(2,"button",4),a.YNc(3,b,5,12,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=a.MAs(1),e=a.MAs(4),n=a.oxw().ngIf,r=a.oxw();a.Q6J("content",e),a.xp6(2),a.Q6J("focusable",t.open)("icon",r.options.icons.textAlignPreview)("pseudoActive",t.open)("tuiHint",n.justify)}}function v(t,e){if(1&t&&(a.ynx(0),a.YNc(1,k,5,5,"tui-hosted-dropdown",1),a.ALo(2,"async"),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("tuiLet",a.lcZ(2,1,t.alignState$))}}let y=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.alignState$=(0,i.aj)([this.editor.isActive$({textAlign:"left"}),this.editor.isActive$({textAlign:"right"}),this.editor.isActive$({textAlign:"center"}),this.editor.isActive$({textAlign:"justify"})]).pipe((0,s.U)((([t,e,n,r])=>({left:t,right:e,center:n,justify:r}))))}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-align-content"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["align",""],["appearance","icon","automation-id","toolbar__align-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["alignDropdown",""],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,v,3,3,"ng-container",0),a.ALo(1,"async")),2&t&&a.Q6J("ngIf",a.lcZ(1,1,e.texts$))},directives:[l.O5,c.L,d.o,u.v,h.$,p.D,f.x,m.t,g.D],pipes:[l.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},56496:(t,e,n)=>{n.d(e,{T:()=>y});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(98778),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928),m=n(22545),g=n(12057),b=n(91283);function k(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"button",5),a.NdJ("click",(function(){const e=a.CHM(t).index;return a.oxw(2).onCode(!!e)})),a._uU(1),a.qZA()}if(2&t){const t=e.$implicit;a.xp6(1),a.hij(" ",t," ")}}function v(t,e){if(1&t&&(a.TgZ(0,"tui-data-list"),a.YNc(1,k,2,1,"button",4),a.ALo(2,"async"),a.qZA()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("ngForOf",a.lcZ(2,1,t.codeOptionsTexts$))}}let y=(()=>{class t{constructor(t,e,n,r){this.options=t,this.editor=e,this.texts$=n,this.codeOptionsTexts$=r,this.hintText$=this.texts$.pipe((0,i.U)((t=>t.code))),this.insideCode$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.isActive("code")||this.editor.isActive("codeBlock"))),(0,s.x)())}onCode(t){t?this.editor.toggleCodeBlock():this.editor.toggleCode()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf),a.Y36(o.Mr))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-code"]],decls:7,vars:9,consts:[[3,"content"],["codes",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["codesDropdown",""],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",0,1),a._UZ(2,"button",2),a.ALo(3,"async"),a.ALo(4,"async"),a.YNc(5,v,3,3,"ng-template",null,3,a.W1O),a.qZA()),2&t){const t=a.MAs(1),n=a.MAs(6);a.Q6J("content",n),a.xp6(2),a.Q6J("focusable",t.open)("icon",e.options.icons.code)("pseudoActive",t.open||a.lcZ(3,5,e.insideCode$))("tuiHint",a.lcZ(4,7,e.hintText$))}},directives:[l.o,c.v,d.$,u.D,h.x,p.t,f.D,m.q,g.sg,b.v],pipes:[g.Ov],encapsulation:2,changeDetection:0}),t})()},47859:(t,e,n)=>{n.d(e,{U:()=>g});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(12057),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928);function m(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"button",1),a.NdJ("click",(function(){return a.CHM(t),a.oxw().removeDetails()})),a.ALo(1,"async"),a.qZA()}if(2&t){const t=e.ngIf,n=a.oxw();a.Q6J("disabled",!!a.lcZ(1,4,n.disabled$))("focusable",!1)("icon",n.options.icons.detailsRemove)("tuiHint",t.removeDetails)}}let g=(()=>{class t{constructor(t,e,n){this.editor=t,this.texts$=e,this.options=n,this.disabled$=this.editor.stateChange$.pipe((0,i.U)((()=>!this.editor.isActive("details"))),(0,s.x)())}removeDetails(){this.editor.removeDetails()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(r.$3),a.Y36(o.rf),a.Y36(o.mJ))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-details-remove"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,m,2,6,"button",0),a.ALo(1,"async")),2&t&&a.Q6J("ngIf",a.lcZ(1,1,e.texts$))},directives:[l.O5,c.v,d.$,u.D,h.x,p.t,f.D],pipes:[l.Ov],encapsulation:2,changeDetection:0}),t})()},26929:(t,e,n)=>{n.d(e,{y:()=>f});var r=n(5915),o=n(40401),i=n(74788),s=n(12057),a=n(18289),l=n(44099),c=n(13938),d=n(10406),u=n(63790),h=n(51928);function p(t,e){if(1&t){const t=i.EpF();i.TgZ(0,"button",1),i.NdJ("click",(function(){return i.CHM(t),i.oxw().setDetails()})),i.qZA()}if(2&t){const t=e.ngIf,n=i.oxw();i.Q6J("focusable",!1)("icon",n.options.icons.detailsAdd)("tuiHint",t.setDetails)}}let f=(()=>{class t{constructor(t,e,n){this.editor=t,this.texts$=e,this.options=n}setDetails(){this.editor.setDetails()}}return t.ɵfac=function(e){return new(e||t)(i.Y36(r.$3),i.Y36(o.rf),i.Y36(o.mJ))},t.ɵcmp=i.Xpm({type:t,selectors:[["tui-details"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(i.YNc(0,p,1,3,"button",0),i.ALo(1,"async")),2&t&&i.Q6J("ngIf",i.lcZ(1,1,e.texts$))},directives:[s.O5,a.v,l.$,c.D,d.x,u.t,h.D],pipes:[s.Ov],encapsulation:2,changeDetection:0}),t})()},37982:(t,e,n)=>{n.d(e,{m:()=>x});var r=n(42600),o=n(69725),i=n(5915),s=n(40401),a=n(88002),l=n(74788),c=n(98778),d=n(18289),u=n(44099),h=n(13938),p=n(10406),f=n(63790),m=n(51928),g=n(22545),b=n(12057),k=n(91283);const v=function(){return{}};function y(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"button",5),l.NdJ("click",(function(){const e=l.CHM(t).$implicit;return l.oxw(2).setFontOption(e)})),l.ALo(1,"lowercase"),l._uU(2),l.qZA()}if(2&t){const t=e.$implicit;l.Udp("font-family",t.family)("font-size",t.px,"px")("font-weight",t.weight),l.Q6J("ngClass",(null==t?null:t.ngClass)||l.DdM(12,v))("ngStyle",(null==t?null:t.ngStyle)||l.DdM(13,v)),l.uIk("automation-id","tui_font__"+l.lcZ(1,10,t.name||"")),l.xp6(2),l.hij(" ",t.name," ")}}function w(t,e){if(1&t&&(l.TgZ(0,"tui-data-list"),l.YNc(1,y,3,14,"button",4),l.ALo(2,"async"),l.qZA()),2&t){const t=l.oxw();l.xp6(1),l.Q6J("ngForOf",l.lcZ(2,1,t.fontsOptions$))}}let x=(()=>{class t{constructor(t,e,n,r){this.options=t,this.editor=e,this.texts$=n,this.fontOptionsTexts$=r,this.fontsOptions$=this.fontOptionsTexts$.pipe((0,a.U)((t=>this.options.fontOptions(t)))),this.fontText$=this.texts$.pipe((0,a.U)((t=>t.font)))}onClick({headingLevel:t,px:e}){this.setFontOption({headingLevel:t,px:e})}setFontOption({headingLevel:t,px:e}){const n=this.editor.getFontColor();this.clearPreviousTextStyles(),t?this.editor.setHeading(t):this.editor.setParagraph({fontSize:(0,r.O9r)(e||0)}),n!==o.hK&&this.editor.setFontColor(n)}clearPreviousTextStyles(){this.editor.removeEmptyTextStyle(),this.editor.toggleMark("textStyle")}}return t.ɵfac=function(e){return new(e||t)(l.Y36(s.mJ),l.Y36(i.$3),l.Y36(s.rf),l.Y36(s.UN))},t.ɵcmp=l.Xpm({type:t,selectors:[["tui-font-size"]],decls:6,vars:7,consts:[[3,"content"],["fonts",""],["appearance","icon","automation-id","toolbar__font-size-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["fontsDropdown",""],["tuiOption","",3,"ngClass","ngStyle","fontFamily","fontSize","fontWeight","click",4,"ngFor","ngForOf"],["tuiOption","",3,"ngClass","ngStyle","click"]],template:function(t,e){if(1&t&&(l.TgZ(0,"tui-hosted-dropdown",0,1),l._UZ(2,"button",2),l.ALo(3,"async"),l.YNc(4,w,3,3,"ng-template",null,3,l.W1O),l.qZA()),2&t){const t=l.MAs(1),n=l.MAs(5);l.Q6J("content",n),l.xp6(2),l.Q6J("focusable",t.open)("icon",e.options.icons.fontSize)("pseudoActive",t.open)("tuiHint",l.lcZ(3,5,e.fontText$))}},directives:[c.o,d.v,u.$,h.D,p.x,f.t,m.D,g.q,b.sg,k.v,b.mk,b.PC],pipes:[b.Ov,b.i8],encapsulation:2,changeDetection:0}),t})()},10845:(t,e,n)=>{n.d(e,{h:()=>M});var r=n(69725),o=n(5915),i=n(72023),s=n(40401),a=n(9112),l=n(88002),c=n(74788),d=n(12057),u=n(98778),h=n(18289),p=n(44099),f=n(13938),m=n(10406),g=n(63790),b=n(51928);function k(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleBold()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleBold)("pseudoActive",t.bold)("tuiHint",e.bold)}}function v(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleItalic()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleItalic)("pseudoActive",t.italic)("tuiHint",e.italic)}}function y(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleUnderline()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleUnderline)("pseudoActive",t.underline)("tuiHint",e.underline)}}function w(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleStrike()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleStrike)("pseudoActive",t.strike)("tuiHint",e.strikeThrough)}}function x(t,e){if(1&t&&(c.TgZ(0,"div",6),c.YNc(1,k,1,3,"button",7),c.YNc(2,v,1,3,"button",7),c.YNc(3,y,1,3,"button",7),c.YNc(4,w,1,3,"button",7),c.qZA()),2&t){const t=c.oxw(3);c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Bold)),c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Italic)),c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Underline)),c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Strikethrough))}}function C(t,e){if(1&t&&(c.TgZ(0,"tui-hosted-dropdown",2,3),c._UZ(2,"button",4),c.YNc(3,x,5,4,"ng-template",null,5,c.W1O),c.qZA()),2&t){const t=e.ngIf,n=c.MAs(1),r=c.MAs(4),o=c.oxw().ngIf,i=c.oxw();c.Q6J("content",r),c.xp6(2),c.Q6J("focusable",n.open)("icon",i.options.icons.fontStylePreview)("pseudoActive",n.open||t.bold||t.italic||t.underline||t.strike)("tuiHint",o.fontStyle)}}function A(t,e){if(1&t&&(c.ynx(0),c.YNc(1,C,5,5,"tui-hosted-dropdown",1),c.ALo(2,"async"),c.BQk()),2&t){const t=c.oxw();c.xp6(1),c.Q6J("ngIf",c.lcZ(2,1,t.fontStyleState$))}}let M=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.toolsSet=new Set(r.Db),this.editorTool=i._,this.fontStyleState$=(0,a.aj)([this.editor.isActive$("bold"),this.editor.isActive$("italic"),this.editor.isActive$("underline"),this.editor.isActive$("strike")]).pipe((0,l.U)((([t,e,n,r])=>({bold:t,italic:e,underline:n,strike:r}))))}set enabledTools(t){this.toolsSet=new Set(t)}isEnabled(t){return this.toolsSet.has(t)}}return t.ɵfac=function(e){return new(e||t)(c.Y36(s.mJ),c.Y36(o.$3),c.Y36(s.rf))},t.ɵcmp=c.Xpm({type:t,selectors:[["tui-font-style"]],inputs:{enabledTools:"enabledTools"},decls:2,vars:3,consts:[[4,"ngIf"],[3,"content",4,"ngIf"],[3,"content"],["format",""],["appearance","icon","automation-id","toolbar__font-style-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["formatDropdown",""],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button","class","t-option t-option_margin",3,"icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"]],template:function(t,e){1&t&&(c.YNc(0,A,3,3,"ng-container",0),c.ALo(1,"async")),2&t&&c.Q6J("ngIf",c.lcZ(1,1,e.texts$))},directives:[d.O5,u.o,h.v,p.$,f.D,m.x,g.t,b.D],pipes:[d.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},28299:(t,e,n)=>{n.d(e,{d:()=>m});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(18289),c=n(44099),d=n(13938),u=n(10406),h=n(63790),p=n(51928),f=n(12057);let m=(()=>{class t{constructor(t,e,n){this.editor=t,this.texts$=e,this.options=n,this.insertGroupText$=this.texts$.pipe((0,i.U)((t=>t.insertGroup))),this.removeGroupText$=this.texts$.pipe((0,i.U)((t=>t.removeGroup))),this.disabled$=this.editor.stateChange$.pipe((0,i.U)((()=>!this.editor.isActive("group"))),(0,s.x)())}addGroup(){this.editor.setGroup()}removeGroup(){this.editor.removeGroup()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(r.$3),a.Y36(o.rf),a.Y36(o.mJ))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-editor-group-tool"]],decls:5,vars:13,consts:[["appearance","icon","automation-id","toolbar__group-add-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click"],["appearance","icon","automation-id","toolbar__group-remove-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(a.TgZ(0,"button",0),a.NdJ("click",(function(){return e.addGroup()})),a.ALo(1,"async"),a.qZA(),a.TgZ(2,"button",1),a.NdJ("click",(function(){return e.removeGroup()})),a.ALo(3,"async"),a.ALo(4,"async"),a.qZA()),2&t&&(a.Q6J("focusable",!1)("icon",e.options.icons.groupAdd)("tuiHint",a.lcZ(1,7,e.insertGroupText$)),a.xp6(2),a.Q6J("disabled",!!a.lcZ(3,9,e.disabled$))("focusable",!1)("icon",e.options.icons.groupRemove)("tuiHint",a.lcZ(4,11,e.removeGroupText$)))},directives:[l.v,c.$,d.D,u.x,h.t,p.D],pipes:[f.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},78919:(t,e,n)=>{n.d(e,{U:()=>C});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(42486),c=n(98778),d=n(16331),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928),b=n(12057),k=n(1706),v=n(55788);function y(t,e){if(1&t&&a._UZ(0,"div",6),2&t){const t=a.oxw().tuiLet;a.Udp("background",t)}}function w(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"tui-palette",7),a.NdJ("selectedColor",(function(e){return a.CHM(t),a.oxw(2).editor.setBackgroundColor(e)})),a.qZA()}if(2&t){const t=e.$implicit,n=a.oxw(2);a.Q6J("colors",n.colors)("tuiActiveZoneParent",t)}}function x(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",1,2),a._UZ(2,"button",3),a.ALo(3,"async"),a.YNc(4,y,1,2,"div",4),a.YNc(5,w,1,2,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=e.tuiLet,n=a.MAs(1),r=a.MAs(6),o=a.oxw();a.Q6J("content",r)("tuiDropdownMaxHeight",999),a.xp6(2),a.Q6J("focusable",n.open)("icon",o.options.icons.textHilite)("pseudoActive",n.open)("tuiHint",a.lcZ(3,7,o.backColorText$)),a.xp6(2),a.Q6J("ngIf",!o.isBlankColor(t||""))}}let C=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.colors=this.options.colors,this.backgroundColor$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.getBackgroundColor()||this.options.blankColor)),(0,s.x)()),this.backColorText$=this.texts$.pipe((0,i.U)((t=>t.backColor)))}isBlankColor(t){return t===this.options.blankColor}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-highlight-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["hilite",""],["appearance","icon","automation-id","toolbar__hilite-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],["class","t-plate",3,"background",4,"ngIf"],["hiliteDropdown",""],[1,"t-plate"],[1,"t-color-picker",3,"colors","tuiActiveZoneParent","selectedColor"]],template:function(t,e){1&t&&(a.YNc(0,x,7,9,"tui-hosted-dropdown",0),a.ALo(1,"async")),2&t&&a.Q6J("tuiLet",a.lcZ(1,1,e.backgroundColor$))},directives:[l.L,c.o,d.Ek,u.v,h.$,p.D,f.x,m.t,g.D,b.O5,k.R,v.e],pipes:[b.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},30560:(t,e,n)=>{n.d(e,{pu:()=>a,P_:()=>l,y9:()=>c,jP:()=>h,p7:()=>d,Zv:()=>u,XC:()=>f,Ur:()=>m,mp:()=>g,iA:()=>k,er:()=>v,__:()=>y,_t:()=>w}),n(29761);var r=n(12057),o=n(42600),i=n(43232),s=n(74788);let a=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,o.WDk]]}),t})();n(56496);let l=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,i.pcV]]}),t})();n(26929);let c=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.goS]]}),t})();n(47859),n(37982);let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,i.pcV]]}),t})();n(10845);let u=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS]]}),t})();n(28299);let h=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.goS]]}),t})();n(78919);var p=n(83950);let f=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,p.VM,i.goS,i.dpK,o.Ah6,o.WDk]]}),t})();n(69201);let m=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,o.WDk]]}),t})();n(82556);let g=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,p.VM,i.fNO,i.goS,o.Ah6,i.dpK,o.WDk]]}),t})();n(76310),n(35659);let b=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,o.IhY]]}),t})(),k=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.dpK,i.fNO,i.goS,b]]}),t})();n(60020);let v=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.goS,o.WDk]]}),t})();n(69023);let y=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.goS,i.fNO,i.pcV,o.WDk]]}),t})();n(48838);let w=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.jhF,i.dpK,i.goS,p.VM,o.Ah6,o.WDk]]}),t})()},69201:(t,e,n)=>{n.d(e,{w:()=>y});var r=n(5915),o=n(40401),i=n(9112),s=n(88002),a=n(74788),l=n(12057),c=n(42486),d=n(98778),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928);function b(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",6),a.TgZ(1,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.toggleUnorderedList()})),a.qZA(),a.TgZ(2,"button",8),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.toggleOrderedList()})),a.qZA(),a.TgZ(3,"button",9),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.toggleTaskList()})),a.qZA(),a.TgZ(4,"button",10),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).sinkListItem()})),a.qZA(),a.TgZ(5,"button",11),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).liftListItem()})),a.qZA(),a.qZA()}if(2&t){const t=a.oxw().tuiLet,e=a.oxw().ngIf,n=a.oxw();a.xp6(1),a.Q6J("icon",n.options.icons.listUnOrdered)("pseudoActive",!(null==t||!t.unordered))("tuiHint",e.unorderedList),a.xp6(1),a.Q6J("icon",n.options.icons.listOrdered)("pseudoActive",!(null==t||!t.ordered))("tuiHint",e.orderedList),a.xp6(1),a.Q6J("icon",n.options.icons.taskList)("pseudoActive",!(null==t||!t.tasked)),a.xp6(1),a.Q6J("icon",n.options.icons.indent)("tuiHint",e.indent),a.xp6(1),a.Q6J("icon",n.options.icons.outdent)("tuiHint",e.outdent)}}function k(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",2,3),a._UZ(2,"button",4),a.YNc(3,b,6,12,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=e.tuiLet,n=a.MAs(1),r=a.MAs(4),o=a.oxw().ngIf,i=a.oxw();a.Q6J("content",r),a.xp6(2),a.Q6J("focusable",n.open)("icon",i.options.icons.listPreview)("pseudoActive",(null==n?null:n.open)||(null==t?null:t.unordered)||(null==t?null:t.ordered)||!1)("tuiHint",o.list)}}function v(t,e){if(1&t&&(a.ynx(0),a.YNc(1,k,5,5,"tui-hosted-dropdown",1),a.ALo(2,"async"),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("tuiLet",a.lcZ(2,1,t.listState$))}}let y=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.listState$=(0,i.aj)([this.editor.isActive$("orderedList"),this.editor.isActive$("bulletList"),this.editor.isActive$("taskList")]).pipe((0,s.U)((([t,e,n])=>({ordered:t,unordered:e,tasked:n}))))}sinkListItem(){this.editor.sinkListItem()}liftListItem(){this.editor.liftListItem()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-list-configs"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["list",""],["appearance","icon","automation-id","toolbar__ordering-list-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["listDropdown",""],[1,"t-dropdown","t-dropdown-list"],["appearance","icon","automation-id","toolbar__un-ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"],["appearance","icon","automation-id","toolbar__ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"],["appearance","icon","automation-id","toolbar__task-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","click"],["appearance","icon","automation-id","toolbar_indent-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","tuiHint","click"],["appearance","icon","automation-id","toolbar_outdent-button","size","s","tuiIconButton","","type","button",1,"t-option",3,"icon","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,v,3,3,"ng-container",0),a.ALo(1,"async")),2&t&&a.Q6J("ngIf",a.lcZ(1,1,e.texts$))},directives:[l.O5,c.L,d.o,u.v,h.$,p.D,f.x,m.t,g.D],pipes:[l.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},82556:(t,e,n)=>{n.d(e,{p:()=>M});var r=n(5915),o=n(40401),i=n(9112),s=n(88002),a=n(87519),l=n(74788),c=n(42486),d=n(98778),u=n(16331),h=n(18289),p=n(44099),f=n(13938),m=n(10406),g=n(63790),b=n(51928),k=n(12057),v=n(1706),y=n(55788);function w(t,e){if(1&t&&l._UZ(0,"div",7),2&t){const t=l.oxw(2).tuiLet;l.Udp("background",t)}}function x(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"tui-palette",8),l.NdJ("selectedColor",(function(e){l.CHM(t),l.oxw();const n=l.MAs(1);return l.oxw(2).setCellColor(e),n.close()})),l.qZA()}if(2&t){const t=e.$implicit,n=l.oxw(3);l.Q6J("colors",n.colors)("tuiActiveZoneParent",t)}}function C(t,e){if(1&t&&(l.TgZ(0,"tui-hosted-dropdown",2,3),l._UZ(2,"button",4),l.ALo(3,"async"),l.YNc(4,w,1,2,"div",5),l.YNc(5,x,1,2,"ng-template",null,6,l.W1O),l.qZA()),2&t){const t=e.tuiLet,n=l.MAs(1),r=l.MAs(6),o=l.oxw().tuiLet,i=l.oxw();l.Q6J("canOpen",!!t)("content",r)("tuiDropdownMaxHeight",999),l.xp6(2),l.Q6J("disabled",!t)("focusable",n.open)("icon",i.options.icons.paint)("pseudoActive",n.open)("tuiHint",l.lcZ(3,9,i.colorText$)),l.xp6(2),l.Q6J("ngIf",!i.isBlankColor(o||""))}}function A(t,e){if(1&t&&(l.ynx(0),l.YNc(1,C,7,11,"tui-hosted-dropdown",1),l.ALo(2,"async"),l.BQk()),2&t){const t=l.oxw();l.xp6(1),l.Q6J("tuiLet",l.lcZ(2,1,t.isActive$))}}let M=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.colors=this.options.colors,this.colorText$=this.texts$.pipe((0,s.U)((t=>this.editor.isActive("group")&&t.hiliteGroup||this.editor.isActive("table")&&t.cellColor||""))),this.isActive$=(0,i.aj)([this.editor.isActive$("table"),this.editor.isActive$("group")]).pipe((0,s.U)((([t,e])=>t||e))),this.color$=this.editor.stateChange$.pipe((0,s.U)((()=>this.editor.getCellColor()||this.editor.getGroupColor()||this.options.blankColor)),(0,a.x)())}isBlankColor(t){return t===this.options.blankColor}setCellColor(t){this.editor.isActive("group")?this.editor.setGroupHilite(t):this.editor.isActive("table")&&this.editor.setCellColor(t)}}return t.ɵfac=function(e){return new(e||t)(l.Y36(o.mJ),l.Y36(r.$3),l.Y36(o.rf))},t.ɵcmp=l.Xpm({type:t,selectors:[["tui-table-cell-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[[4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight"],["colorSelect",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","pseudoActive","tuiHint"],["class","t-plate t-plate_paint",3,"background",4,"ngIf"],["cellColorDropdown",""],[1,"t-plate","t-plate_paint"],[1,"t-color-picker",3,"colors","tuiActiveZoneParent","selectedColor"]],template:function(t,e){1&t&&(l.YNc(0,A,3,3,"ng-container",0),l.ALo(1,"async")),2&t&&l.Q6J("tuiLet",l.lcZ(1,1,e.color$))},directives:[c.L,d.o,u.Ek,h.v,p.$,f.D,m.x,g.t,b.D,k.O5,v.R,y.e],pipes:[k.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},76310:(t,e,n)=>{n.d(e,{l:()=>k});var r=n(5915),o=n(40401),i=n(88002),s=n(74788),a=n(98778),l=n(16331),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928),m=n(35659),g=n(12057);function b(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"tui-table-size-selector",4),s.NdJ("selectSize",(function(e){return s.CHM(t),s.oxw().addTable(e)})),s.qZA()}}let k=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.insertTableText$=this.texts$.pipe((0,i.U)((t=>t.insertTable)))}addTable({rows:t,cols:e}){this.editor.enter();const n=this.editor.state.selection.anchor;this.editor.enter(),this.editor.enter(),this.editor.setTextSelection(n),this.editor.insertTable(t,e)}}return t.ɵfac=function(e){return new(e||t)(s.Y36(o.mJ),s.Y36(r.$3),s.Y36(o.rf))},t.ɵcmp=s.Xpm({type:t,selectors:[["tui-table-create"]],decls:6,vars:6,consts:[["tuiDropdownAlign","left","tuiDropdownDirection","bottom",3,"content"],["table",""],["appearance","icon","automation-id","toolbar__insert-table-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint"],["tableDropdown",""],[3,"selectSize"]],template:function(t,e){if(1&t&&(s.TgZ(0,"tui-hosted-dropdown",0,1),s._UZ(2,"button",2),s.ALo(3,"async"),s.qZA(),s.YNc(4,b,1,0,"ng-template",null,3,s.W1O)),2&t){const t=s.MAs(1),n=s.MAs(5);s.Q6J("content",n),s.xp6(2),s.Q6J("focusable",t.open)("icon",e.options.icons.insertTable)("tuiHint",s.lcZ(3,4,e.insertTableText$))}},directives:[a.o,l.Ek,c.v,d.$,u.D,h.x,p.t,f.D,m.M],pipes:[g.Ov],encapsulation:2,changeDetection:0}),t})()},60020:(t,e,n)=>{n.d(e,{Y:()=>v});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(42486),c=n(12057),d=n(18289),u=n(44099),h=n(13938),p=n(10406),f=n(63790),m=n(51928);function g(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"button",2),a.NdJ("click",(function(){a.CHM(t);const e=a.oxw().tuiLet,n=a.oxw();return e.mergeCells?n.mergeCells():n.splitCell()})),a.qZA()}if(2&t){const t=e.ngIf,n=a.oxw().tuiLet;a.Q6J("disabled",!n.mergeCells&&!n.splitCells)("focusable",!1)("icon",n.mergeCells?"tuiIconTableMergeLarge":"tuiIconTableSplitLarge")("tuiHint",n.mergeCells?t.mergeCells:t.splitCells)}}function b(t,e){if(1&t&&(a.ynx(0),a.YNc(1,g,1,4,"button",1),a.ALo(2,"async"),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("ngIf",a.lcZ(2,1,t.texts$))}}const k=function(t,e){return{mergeCells:t,splitCells:e}};let v=(()=>{class t{constructor(t,e){this.editor=t,this.texts$=e,this.canMergeCells$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.canMergeCells())),(0,s.x)()),this.canSplitCells$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.canSplitCells())),(0,s.x)())}mergeCells(){this.editor.mergeCells()}splitCell(){this.editor.splitCell()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-table-merge-cells"]],decls:3,vars:8,consts:[[4,"tuiLet"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,b,3,3,"ng-container",0),a.ALo(1,"async"),a.ALo(2,"async")),2&t&&a.Q6J("tuiLet",a.WLB(5,k,a.lcZ(1,1,e.canMergeCells$),a.lcZ(2,3,e.canSplitCells$)))},directives:[l.L,c.O5,d.v,u.$,h.D,p.x,f.t,m.D],pipes:[c.Ov],encapsulation:2,changeDetection:0}),t})()},69023:(t,e,n)=>{n.d(e,{_:()=>A});var r=n(5915),o=n(40401),i=n(88002),s=n(74788),a=n(42486),l=n(98778),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928),m=n(22545),g=n(12057),b=n(94052),k=n(91283);function v(t,e){if(1&t&&(s.TgZ(0,"tui-hosted-dropdown",2,3),s._UZ(2,"button",4),s.ALo(3,"async"),s.qZA()),2&t){const t=e.tuiLet,n=s.MAs(1),r=s.oxw(),o=s.MAs(3);s.Q6J("canOpen",!!t)("content",o),s.xp6(2),s.Q6J("disabled",!t)("focusable",n.open)("icon",r.options.icons.addRowTable)("tuiHint",s.lcZ(3,6,r.rowsColumnsManagingText$))}}function y(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",7),s.NdJ("click",(function(){const e=s.CHM(t).index,n=s.oxw().index;return s.oxw(2).onTableOption(2*n+e)})),s._uU(1),s.qZA()}if(2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",t," ")}}function w(t,e){if(1&t&&(s.TgZ(0,"tui-opt-group"),s.YNc(1,y,2,1,"button",6),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Q6J("ngForOf",t)}}function x(t,e){if(1&t&&(s.TgZ(0,"tui-data-list"),s.YNc(1,w,2,1,"tui-opt-group",5),s.ALo(2,"async"),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngForOf",s.lcZ(2,1,t.tableCommandTexts$))}}var C=(()=>(function(t){t[t.InsertColumnBefore=0]="InsertColumnBefore",t[t.InsertColumnAfter=1]="InsertColumnAfter",t[t.InsertRowBefore=2]="InsertRowBefore",t[t.InsertRowAfter=3]="InsertRowAfter",t[t.DeleteColumn=4]="DeleteColumn",t[t.DeleteRow=5]="DeleteRow"}(C||(C={})),C))();let A=(()=>{class t{constructor(t,e,n,r){this.options=t,this.editor=e,this.texts$=n,this.tableCommandTexts$=r,this.commandsRegistry={[C.InsertColumnAfter]:()=>this.editor.addColumnAfter(),[C.InsertColumnBefore]:()=>this.editor.addColumnBefore(),[C.InsertRowAfter]:()=>this.editor.addRowAfter(),[C.InsertRowBefore]:()=>this.editor.addRowBefore(),[C.DeleteColumn]:()=>this.editor.deleteColumn(),[C.DeleteRow]:()=>this.editor.deleteRow()},this.isActive$=this.editor.isActive$("table"),this.rowsColumnsManagingText$=this.texts$.pipe((0,i.U)((t=>t.rowsColumnsManaging)))}onTableOption(t){this.commandsRegistry[t]()}}return t.ɵfac=function(e){return new(e||t)(s.Y36(o.mJ),s.Y36(r.$3),s.Y36(o.rf),s.Y36(o.$i))},t.ɵcmp=s.Xpm({type:t,selectors:[["tui-table-row-column-manager"]],decls:4,vars:3,consts:[[3,"canOpen","content",4,"tuiLet"],["tableOptionsDropdown",""],[3,"canOpen","content"],["tableCommand",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint"],[4,"ngFor","ngForOf"],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,e){1&t&&(s.YNc(0,v,4,8,"tui-hosted-dropdown",0),s.ALo(1,"async"),s.YNc(2,x,3,3,"ng-template",null,1,s.W1O)),2&t&&s.Q6J("tuiLet",s.lcZ(1,1,e.isActive$))},directives:[a.L,l.o,c.v,d.$,u.D,h.x,p.t,f.D,m.q,g.sg,b.R,k.v],pipes:[g.Ov],encapsulation:2,changeDetection:0}),t})()},35659:(t,e,n)=>{n.d(e,{M:()=>c});var r=n(74788),o=n(62579),i=n(43232),s=n(46648);function a(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",4),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).select()}))("mouseenter",(function(e){const n=r.CHM(t).$implicit,o=r.oxw().$implicit;return r.oxw().updateCurrentSize(n+1,o+1,e)})),r.qZA()}if(2&t){const t=e.$implicit,n=r.oxw().$implicit,o=r.oxw();r.ekj("t-cell_hovered",o.tableSelectHovered(t,n))}}function l(t,e){if(1&t&&(r.TgZ(0,"div",2),r.YNc(1,a,1,2,"div",3),r.qZA()),2&t){const t=r.oxw();r.xp6(1),r.Q6J("tuiRepeatTimesOf",t.rowsNumber)}}let c=(()=>{class t{constructor(t){this.win=t,this.selectSize=new r.vpe,this.onSelectSize=this.selectSize,this.tableSize={rows:1,cols:1}}get columnsNumber(){return Math.min(Math.max(3,this.tableSize.cols+1),15)}get rowsNumber(){return Math.min(Math.max(3,this.tableSize.rows+1),15)}tableSelectHovered(t,e){return t70&&(this.tableSize={rows:t,cols:e})}onClick(){this.select()}select(){this.selectSize.emit(this.tableSize)}}return t.ɵfac=function(e){return new(e||t)(r.Y36(o.m9))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-table-size-selector"]],outputs:{selectSize:"selectSize",onSelectSize:"onSelectSize"},decls:3,vars:3,consts:[["class","t-column",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-description"],[1,"t-column"],["class","t-cell",3,"t-cell_hovered","click","mouseenter",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-cell",3,"click","mouseenter"]],template:function(t,e){1&t&&(r.YNc(0,l,2,1,"div",0),r.TgZ(1,"div",1),r._uU(2),r.qZA()),2&t&&(r.Q6J("tuiRepeatTimesOf",e.columnsNumber),r.xp6(2),r.AsE("",e.tableSize.cols,"×",e.tableSize.rows,""))},directives:[s.X],styles:["[_nghost-%COMP%]{display:block;padding:.75rem}.t-cell[_ngcontent-%COMP%]{display:inline-block;background-color:var(--tui-base-01);width:1.25rem;height:1.25rem;border-radius:.25rem;margin:.125rem;border:1px solid var(--tui-base-04);cursor:pointer}.t-cell_hovered[_ngcontent-%COMP%]{background-color:var(--tui-base-02)}.t-column[_ngcontent-%COMP%]{white-space:nowrap}.t-description[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),t})()},48838:(t,e,n)=>{n.d(e,{G:()=>x});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(42486),c=n(98778),d=n(16331),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928),b=n(1706),k=n(55788),v=n(12057);function y(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"tui-palette",6),a.NdJ("selectedColor",(function(e){return a.CHM(t),a.oxw(2).editor.setFontColor(e)})),a.qZA()}if(2&t){const t=e.$implicit,n=a.oxw(2);a.Q6J("colors",n.colors)("tuiActiveZoneParent",t)}}function w(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",1,2),a._UZ(2,"button",3),a.ALo(3,"async"),a._UZ(4,"div",4),a.YNc(5,y,1,2,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=e.tuiLet,n=a.MAs(1),r=a.MAs(6),o=a.oxw();a.Q6J("content",r)("tuiDropdownMaxHeight",999),a.xp6(2),a.Q6J("focusable",n.open)("icon",o.options.icons.textColor)("pseudoActive",n.open)("tuiHint",a.lcZ(3,8,o.foreColorText$)),a.xp6(2),a.Udp("background",t)}}let x=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.colors=this.options.colors,this.fontColor$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.getFontColor()||this.options.blankColor)),(0,s.x)()),this.foreColorText$=this.texts$.pipe((0,i.U)((t=>t.foreColor)))}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-text-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["color",""],["appearance","icon","automation-id","toolbar__color-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-plate"],["colorDropdown",""],[1,"t-color-picker",3,"colors","tuiActiveZoneParent","selectedColor"]],template:function(t,e){1&t&&(a.YNc(0,w,7,10,"tui-hosted-dropdown",0),a.ALo(1,"async")),2&t&&a.Q6J("tuiLet",a.lcZ(1,1,e.fontColor$))},directives:[l.L,c.o,d.Ek,u.v,h.$,p.D,f.x,m.t,g.D,b.R,k.e],pipes:[v.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},90712:(t,e,n)=>{n.d(e,{M6:()=>r.M,yB:()=>d});var r=n(62490),o=n(12057),i=n(42600),s=n(43232),a=n(1884),l=n(30560),c=n(74788);let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({imports:[[o.ez,s.goS,i.udY,s.fNO,s.jhF,a.Fu,l.er,l.mp,l.__,l.iA,l.p7,l.Zv,l.pu,l.Ur,l._t,l.XC,l.P_,l.y9,i.HOV,l.jP]]}),t})();n(5028)},5028:(t,e,n)=>{n.d(e,{B:()=>i});var r=n(74788),o=n(42600);let i=(()=>{class t{constructor(t){this.el=t}get toolsContainers(){return Array.from(this.el.nativeElement.querySelectorAll("[tuiItem]"))}onHorizontalNavigation(t){const{toolsContainers:e}=this,n=e.findIndex(o.zb4),r=e[(0,o.Kiv)(n+(t?-1:1),0,e.length-1)],i=t?this.findPreviousTool(r):this.findNextTool(r);i&&i.focus()}findFirstFocusableTool(t=!1){const e=t?this.toolsContainers.slice().reverse():this.toolsContainers;for(const t of e){const e=(0,o._hh)(t)?t:(0,o.BWF)({initial:t,root:t,keyboard:!1});if(e)return e}return null}findPreviousTool(t){return(0,o._hh)(t)?t:(0,o.BWF)({initial:t,root:t,keyboard:!1})||(0,o.BWF)({initial:t,root:this.el.nativeElement,previous:!0,keyboard:!1})}findNextTool(t){return(0,o._hh)(t)?t:(0,o.BWF)({initial:t,root:this.el.nativeElement,keyboard:!1})}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq))},t.ɵdir=r.lG2({type:t,selectors:[["","tuiToolbarNavigationManager",""]],hostBindings:function(t,e){1&t&&r.NdJ("keydown.arrowRight.prevent",(function(){return e.onHorizontalNavigation(!1)}))("keydown.arrowLeft.prevent",(function(){return e.onHorizontalNavigation(!0)}))}}),t})()},62490:(t,e,n)=>{n.d(e,{M:()=>mt});var r=n(74788),o=n(42600),i=n(69725),s=n(5915),a=n(72023),l=n(40401),c=n(15257),d=n(46782),u=n(5028),h=n(12057),p=n(63973),f=n(18289),m=n(44099),g=n(32489),b=n(13938),k=n(10406),v=n(63790),y=n(51928),w=n(37982),x=n(10845),C=n(29761),A=n(69201),M=n(98778),S=n(10553),_=n(48838),T=n(78919),O=n(56496),E=n(26929),D=n(47859),N=n(28299),L=n(82556),I=n(76310),R=n(69023),z=n(60020);const P=["dropdown"];function H(t,e){1&t&&r.GkF(0)}function q(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",6),r.TgZ(1,"button",7),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).undo()})),r.qZA(),r.TgZ(2,"button",8),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).redo()})),r.qZA(),r.qZA()}if(2&t){const t=r.oxw().ngIf,e=r.oxw();r.xp6(1),r.Q6J("disabled",e.undoDisabled)("focusable",!1)("icon",e.options.icons.undo)("tuiHint",t.undo),r.xp6(1),r.Q6J("disabled",e.redoDisabled)("focusable",!1)("icon",e.options.icons.redo)("tuiHint",t.redo)}}function B(t,e){1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-font-size",9),r.qZA())}function $(t,e){if(1&t&&r._UZ(0,"tui-font-style",15),2&t){const t=r.oxw(3);r.Q6J("enabledTools",t.toolsSet)}}function F(t,e){1&t&&r._UZ(0,"tui-align-content",9)}function J(t,e){1&t&&r._UZ(0,"tui-list-configs",9)}function j(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",16,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).toggleQuote()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("disabled",e.unorderedList||e.orderedList)("focusable",!1)("icon",e.options.icons.quote)("pseudoActive",e.blockquote)("tuiHint",t.quote)}}function Z(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-edit-link",22,23),r.NdJ("addLink",(function(e){r.CHM(t),r.oxw();const n=r.MAs(1);return r.oxw(3).onLink(n,e)}))("removeLink",(function(){r.CHM(t),r.oxw();const e=r.MAs(1);return r.oxw(3).onLink(e)})),r.qZA()}}function U(t,e){if(1&t&&(r.TgZ(0,"tui-hosted-dropdown",18,19),r._UZ(2,"button",20,17),r.YNc(4,Z,2,0,"ng-template",null,21,r.W1O),r.qZA()),2&t){const t=r.MAs(1),e=r.MAs(5),n=r.oxw(2).ngIf,o=r.oxw();r.Q6J("canOpen",o.canOpenAnchor)("content",e),r.xp6(2),r.Q6J("focusable",t.open)("icon",o.options.icons.link)("pseudoActive",t.open||o.a)("tuiHint",n.link)}}function V(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-edit-link",28),r.NdJ("addLink",(function(e){r.CHM(t),r.oxw();const n=r.MAs(1);return r.oxw(3).setAnchor(n,e)}))("removeLink",(function(){return r.CHM(t),r.oxw(4).removeAnchor()})),r.qZA()}2&t&&r.Q6J("anchorMode",!0)}function Y(t,e){if(1&t&&(r.TgZ(0,"tui-hosted-dropdown",24,25),r._UZ(2,"button",26),r.YNc(3,V,1,1,"ng-template",null,27,r.W1O),r.qZA()),2&t){const t=r.MAs(1),e=r.MAs(4),n=r.oxw(2).ngIf,o=r.oxw();r.Q6J("canOpen",o.canOpenAnchor)("content",e),r.xp6(2),r.Q6J("focusable",!1)("icon",o.options.icons.anchor)("pseudoActive",t.open||o.jumpAnchor)("tuiHint",n.insertAnchor)}}function W(t,e){if(1&t){const t=r.EpF();r.ynx(0),r.TgZ(1,"button",29,17),r.NdJ("click",(function(){return r.CHM(t),r.MAs(4).click()})),r.qZA(),r.TgZ(3,"input",30,31),r.NdJ("change",(function(){r.CHM(t);const e=r.MAs(4);return r.oxw(3).onAttach(e)})),r.qZA(),r.BQk()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.xp6(1),r.Q6J("focusable",!1)("icon",e.options.icons.attach)("tuiHint",t.attach),r.xp6(2),r.Q6J("accept",e.attachOptions.accept)("multiple",e.attachOptions.multiple)("tuiFocusable",!1)}}function G(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,$,1,1,"tui-font-style",10),r.YNc(2,F,1,0,"tui-align-content",11),r.YNc(3,J,1,0,"tui-list-configs",11),r.YNc(4,j,2,5,"button",12),r.YNc(5,U,6,6,"tui-hosted-dropdown",13),r.YNc(6,Y,5,6,"tui-hosted-dropdown",14),r.YNc(7,W,5,6,"ng-container",1),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.formatEnabled),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Align)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.List)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Quote)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Link)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Anchor)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Attach))}}function Q(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",33,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).toggleSubscript()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.sub)("pseudoActive",e.subscript)("tuiHint",t.subscript)}}function K(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",33,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).toggleSuperscript()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.sup)("pseudoActive",e.superscript)("tuiHint",t.superscript)}}function X(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,Q,2,4,"button",32),r.YNc(2,K,2,4,"button",32),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Sub)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Sup))}}function tt(t,e){if(1&t&&r._UZ(0,"tui-text-color",35),2&t){const t=r.oxw(3);r.Q6J("colors",t.colors)}}function et(t,e){if(1&t&&r._UZ(0,"tui-highlight-color",35),2&t){const t=r.oxw(3);r.Q6J("colors",t.colors)}}function nt(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,tt,1,1,"tui-text-color",34),r.YNc(2,et,1,1,"tui-highlight-color",34),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Color)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Hilite))}}function rt(t,e){1&t&&r._UZ(0,"tui-code",9)}function ot(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",39,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).onTeX()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.tex)("tuiHint",t.tex)}}function it(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",40),r.TgZ(1,"button",41,17),r.NdJ("click",(function(){return r.CHM(t),r.MAs(4).click()})),r.qZA(),r.TgZ(3,"input",42,43),r.NdJ("change",(function(){r.CHM(t);const e=r.MAs(4);return r.oxw(3).onImage(e)})),r.qZA(),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.xp6(1),r.Q6J("focusable",!1)("icon",e.options.icons.image)("tuiHint",t.image),r.xp6(2),r.Q6J("tuiFocusable",!1)}}function st(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",29,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).insertHorizontalRule()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.hr)("tuiHint",t.insertHorizontalRule)}}function at(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,rt,1,0,"tui-code",11),r.YNc(2,ot,2,3,"button",36),r.YNc(3,it,5,4,"div",37),r.YNc(4,st,2,3,"button",38),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Code)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Tex)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Img)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.HR))}}function lt(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",6),r.TgZ(1,"button",29,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).removeFormat()})),r.qZA(),r.qZA()}if(2&t){const t=r.oxw().ngIf,e=r.oxw();r.xp6(1),r.Q6J("focusable",!1)("icon",e.options.icons.clear)("tuiHint",t.clear)}}function ct(t,e){1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-details",44),r._UZ(2,"tui-details-remove",44),r.qZA())}function dt(t,e){if(1&t&&r._UZ(0,"tui-table-cell-color",35),2&t){const t=r.oxw(3);r.Q6J("colors",t.colors)}}function ut(t,e){if(1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-editor-group-tool",44),r.YNc(2,dt,1,1,"tui-table-cell-color",34),r.qZA()),2&t){const t=r.oxw(2);r.xp6(2),r.Q6J("ngIf",!t.enabled(t.editorTool.Table))}}function ht(t,e){if(1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-table-create",44),r._UZ(2,"tui-table-row-column-manager",44),r._UZ(3,"tui-table-merge-cells",44),r._UZ(4,"tui-table-cell-color",35),r.qZA()),2&t){const t=r.oxw(2);r.xp6(4),r.Q6J("colors",t.colors)}}function pt(t,e){if(1&t&&(r.TgZ(0,"section",4),r.YNc(1,q,3,8,"div",5),r.YNc(2,B,2,0,"div",5),r.YNc(3,G,8,7,"div",5),r.YNc(4,X,3,2,"div",5),r.YNc(5,nt,3,2,"div",5),r.YNc(6,at,5,4,"div",5),r.YNc(7,lt,3,3,"div",5),r.YNc(8,ct,3,0,"div",5),r.YNc(9,ut,3,1,"div",5),r.YNc(10,ht,5,1,"div",5),r.TgZ(11,"div",6),r.Hsn(12),r.qZA(),r.qZA()),2&t){const t=r.oxw();r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Undo)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Size)),r.xp6(1),r.Q6J("ngIf",t.firstBigBlockEnabled),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Sub)||t.enabled(t.editorTool.Sup)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Color)||t.enabled(t.editorTool.Hilite)),r.xp6(1),r.Q6J("ngIf",t.secondBigBlockEnabled),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Clear)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Details)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Group)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Table))}}const ft=["*"];let mt=(()=>{class t{constructor(t,e,n,s,l,c,d,u){this.el=t,this.editor=e,this.imageLoader=n,this.attachOptions=s,this.filesLoader=l,this.texts$=c,this.options=d,this.destroy$=u,this.dropdowns=o.Mmc,this.colors=this.options.colors,this.disabled=!1,this.linkAdded=new r.vpe,this.texClicked=new r.vpe,this.fileAttached=new r.vpe,this.editorTool=a._,this.toolsSet=new Set(i.Db)}set tools(t){this.toolsSet=new Set(t)}get focused(){return(0,o.zb4)(this.el.nativeElement)||!!this.dropdowns.find((({nativeElement:t})=>(0,o.zb4)(t)))}get focusable(){return!this.focused&&!this.disabled}get unorderedList(){return this.editor.isActive("bulletList")}get orderedList(){return this.editor.isActive("orderedList")}get blockquote(){return this.editor.isActive("blockquote")}get a(){return this.editor.isActive("link")}get jumpAnchor(){return this.editor.isActive("jumpAnchor")}get canOpenAnchor(){return!this.a&&!this.jumpAnchor}get undoDisabled(){return this.editor.undoDisabled()}get redoDisabled(){return this.editor.redoDisabled()}get subscript(){return this.editor.isActive("subscript")}get superscript(){return this.editor.isActive("superscript")}get formatEnabled(){return this.enabled(a._.Bold)||this.enabled(a._.Italic)||this.enabled(a._.Underline)||this.enabled(a._.Strikethrough)}get firstBigBlockEnabled(){return this.formatEnabled||this.enabled(a._.Align)||this.enabled(a._.List)||this.enabled(a._.Quote)||this.enabled(a._.Link)||this.enabled(a._.Anchor)||this.enabled(a._.Attach)}get secondBigBlockEnabled(){return this.enabled(a._.Code)||this.enabled(a._.Tex)||this.enabled(a._.Img)||this.enabled(a._.HR)}onMouseDown(t,e){e.closest("button")||(t.preventDefault(),this.editor.focus())}onBottomFocus(){this.focusLast()}onTopFocus(){this.focusFirst()}onImage(t){var e;const n=null===(e=t.files)||void 0===e?void 0:e[0];t.value="",n&&this.imageLoader(n).pipe((0,c.q)(1),(0,d.R)(this.destroy$)).subscribe((t=>this.addImage(t)))}onAttach(t){var e;const n=Array.from(t.files||[]);t.value="",n&&(null===(e=this.filesLoader)||void 0===e||e.call(this,n).pipe((0,c.q)(1),(0,d.R)(this.destroy$)).subscribe((t=>this.fileAttached.emit(t))))}onTeX(){this.texClicked.emit()}onLink(t,e){t.open=!1,e&&this.editor.toggleLink(e)}setAnchor(t,e){t.open=!1,e&&(this.editor.setAnchor(e),this.editor.selectClosest())}removeAnchor(){this.editor.removeAnchor()}enabled(t){return this.toolsSet.has(t)}undo(){this.editor.undo()}redo(){this.editor.redo()}insertHorizontalRule(){this.editor.setHorizontalRule()}removeFormat(){this.editor.removeFormat()}toggleOrderedList(){this.editor.toggleOrderedList()}toggleQuote(){this.editor.toggleBlockquote()}toggleSubscript(){this.editor.toggleSubscript()}toggleSuperscript(){this.editor.toggleSuperscript()}addImage(t){this.editor.setImage(t)}focusFirst(){var t;const e=null===(t=this.navigationManager)||void 0===t?void 0:t.findFirstFocusableTool();e&&e.focus()}focusLast(){var t;const e=null===(t=this.navigationManager)||void 0===t?void 0:t.findFirstFocusableTool(!0);e&&e.focus()}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq,8),r.Y36(s.$3),r.Y36(l.p7),r.Y36(l.dR),r.Y36(l.zc,8),r.Y36(l.rf),r.Y36(l.mJ),r.Y36(o.a31,2))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-toolbar"]],viewQuery:function(t,e){if(1&t&&(r.Gf(u.B,5),r.Gf(P,5,r.SBq)),2&t){let t;r.iGM(t=r.CRH())&&(e.navigationManager=t.first),r.iGM(t=r.CRH())&&(e.dropdowns=t)}},hostAttrs:["role","toolbar"],hostVars:2,hostBindings:function(t,e){1&t&&r.NdJ("mousedown",(function(t){return e.onMouseDown(t,t.target)})),2&t&&r.ekj("_disabled",e.disabled)},inputs:{colors:"colors",disabled:"disabled",tools:"tools"},outputs:{linkAdded:"linkAdded",texClicked:"texClicked",fileAttached:"fileAttached"},features:[r._Bn([o.a31])],ngContentSelectors:ft,decls:7,vars:8,consts:[["type","button",1,"t-prevent-parent-label-behavior"],[4,"ngIf"],[3,"tuiFocusable","focus"],["tuiToolbarNavigationManager","","class","t-tools-wrapper",4,"ngIf"],["tuiToolbarNavigationManager","",1,"t-tools-wrapper"],["class","t-block",4,"ngIf"],[1,"t-block"],["appearance","icon","automation-id","toolbar__undo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"disabled","focusable","icon","tuiHint","click"],["appearance","icon","automation-id","toolbar__redo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"disabled","focusable","icon","tuiHint","click"],["tuiItem","",1,"t-tool","t-wrapper"],["tuiItem","","class","t-tool t-wrapper",3,"enabledTools",4,"ngIf"],["tuiItem","","class","t-tool t-wrapper",4,"ngIf"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"disabled","focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",3,"canOpen","content",4,"ngIf"],["class","t-wrapper",3,"canOpen","content",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"enabledTools"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"disabled","focusable","icon","pseudoActive","tuiHint","click"],["button",""],["tuiItem","",1,"t-wrapper",3,"canOpen","content"],["link",""],["appearance","icon","automation-id","toolbar__link-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],["linkDropdown",""],[3,"addLink","removeLink"],["dropdown",""],[1,"t-wrapper",3,"canOpen","content"],["anchor",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["anchorDropdown",""],[3,"anchorMode","addLink","removeLink"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"focusable","icon","tuiHint","click"],["type","file",1,"t-file-upload",3,"accept","multiple","tuiFocusable","change"],["fileUpload",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"focusable","icon","pseudoActive","tuiHint","click"],["tuiItem","","class","t-tool t-wrapper",3,"colors",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"colors"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool",3,"focusable","icon","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool",3,"focusable","icon","tuiHint","click"],["tuiItem","",1,"t-wrapper"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","tuiHint","click"],["accept","image/*","type","file",1,"t-image",3,"tuiFocusable","change"],["image",""],["tuiItem","",1,"t-tool","t-tool_margin"]],template:function(t,e){1&t&&(r.F$t(),r._UZ(0,"button",0),r.YNc(1,H,1,0,"ng-container",1),r.ALo(2,"async"),r.TgZ(3,"div",2),r.NdJ("focus",(function(){return e.onTopFocus()})),r.qZA(),r.TgZ(4,"div",2),r.NdJ("focus",(function(){return e.onBottomFocus()})),r.qZA(),r.YNc(5,pt,13,10,"section",3),r.ALo(6,"async")),2&t&&(r.xp6(1),r.Q6J("ngIf",r.lcZ(2,4,e.editor.stateChange$)),r.xp6(2),r.Q6J("tuiFocusable",e.focusable),r.xp6(1),r.Q6J("tuiFocusable",e.focusable),r.xp6(1),r.Q6J("ngIf",r.lcZ(6,6,e.texts$)))},directives:[h.O5,p.t,u.B,f.v,m.$,g.w,b.D,k.x,v.t,y.D,w.m,x.h,C.X,A.w,M.o,S.l,_.G,T.U,O.T,E.y,D.U,N.d,L.p,I.l,R._,z.Y],pipes:[h.Ov],styles:['.t-tools-wrapper[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none;position:-webkit-sticky;position:sticky;top:0;display:flex;padding:.25rem .75rem;overflow:auto;flex-wrap:wrap;box-shadow:0 .125rem .1875rem #0000001a}.t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{display:none}.t-tools-wrapper._disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-block[_ngcontent-%COMP%]{display:flex;padding:.25rem 0}.t-block[_ngcontent-%COMP%]:not(:last-child):after{content:"";display:block;margin:0 .25rem;width:1px;background:var(--tui-secondary-active)}.t-tool[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}button.t-tool[_ngcontent-%COMP%]:hover, .t-tool[_ngcontent-%COMP%] button:hover{background:var(--tui-secondary-hover)}.t-tool_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-font[_ngcontent-%COMP%]{padding:.3em 0;outline:none;width:100%;pointer-events:none}.t-image[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;font-size:0;opacity:0;cursor:pointer}.t-image[_ngcontent-%COMP%]::-webkit-file-upload-button{display:none}.t-file-upload[_ngcontent-%COMP%]{display:none}.t-color-picker[_ngcontent-%COMP%] tui-hosted-dropdown, .t-color-picker[_ngcontent-%COMP%] tui-color-picker, .t-color-picker[_ngcontent-%COMP%] tui-color-edit{display:none}.t-prevent-parent-label-behavior[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),t})()},69725:(t,e,n)=>{n.d(e,{hK:()=>o,pH:()=>c,pL:()=>f,nE:()=>a,_s:()=>d,Ci:()=>u,jU:()=>p,DN:()=>h,sw:()=>r,Db:()=>s,RR:()=>l});const r=new Map([["color-black-100","#909090"],["color-black-200","#666666"],["color-black-300","#333333"],["color-blue-100","#1771e6"],["color-blue-200","#1464cc"],["color-blue-300","#0953b3"],["color-gray-100","#f5f5f6"],["color-gray-200","#e7e8ea"],["color-gray-300","#cbcfd3"],["color-gray-400","#959ba4"],["color-gray-500","#79818c"],["color-gray-600","#616871"],["color-green-100","#39b54a"],["color-green-200","#2ca53a"],["color-green-300","#168a21"],["color-light-blue-100","#ecf1f7"],["color-light-blue-200","#e4ebf3"],["color-light-blue-300","#dde4ed"],["color-red-100","#e01f19"],["color-red-200","#d3120e"],["color-red-300","#c40b08"],["color-yellow-100","#FFDD2C"],["color-yellow-200","#FCC521"],["color-yellow-300","#FAB618"],["transparent","transparent"]]),o="rgb(51, 51, 51)";var i=n(72023);const s=[i._.Undo,i._.Size,i._.Bold,i._.Italic,i._.Underline,i._.Align,i._.List,i._.Quote,i._.Link,i._.Anchor,i._.Color,i._.Hilite,i._.Clear,i._.Strikethrough,i._.Code,i._.Img,i._.HR,i._.Sup,i._.Sub,i._.Table,i._.Details],a=s;function l(t){return[{px:13,name:t.small},{px:15,name:t.normal},{px:17,name:t.large},{px:24,family:"var(--tui-font-heading)",name:t.subtitle,headingLevel:2,weight:"bold"},{px:30,family:"var(--tui-font-heading)",name:t.title,headingLevel:1,weight:"bold"}]}const c=["id","class","src","style","controls","loop","muted","preload","autoplay","width","height","controlsList"],d="#",u="https://",h=":",p="://",f={protocol:u}},5915:(t,e,n)=>{n.d(e,{BN:()=>o,JU:()=>i.JU,mJ:()=>i.mJ,$3:()=>i.$3});var r=n(74788);let o=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=r.oAB({type:t}),t.ɵinj=r.cJS({}),t})();var i=n(46561)},46561:(t,e,n)=>{n.d(e,{JU:()=>r.J,mJ:()=>i,$3:()=>s.$});var r=n(6723),o=n(74788);let i=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=o.oAB({type:t}),t.ɵinj=o.cJS({}),t})();var s=n(20672)},6723:(t,e,n)=>{n.d(e,{J:()=>l});var r=n(74788),o=n(42600),i=n(40401),s=n(46782),a=n(20672);let l=(()=>{class t{constructor(t,e,n,r,o,i){this.el=t,this.renderer=e,this.editor=n,this.editorContainer=r,this.editorLoaded$=o,this.valueChange=this.editor.valueChange$,this.stateChange=this.editor.stateChange$,this.editorLoaded$.pipe((0,s.R)(i)).subscribe((()=>{this.renderer.appendChild(this.el.nativeElement,this.editorContainer)}))}set value(t){this.editor.setValue(t)}set editable(t){this.editor.editable=t}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq),r.Y36(r.Qsj),r.Y36(a.$),r.Y36(i.Y1),r.Y36(i.ZW),r.Y36(o.a31,2))},t.ɵdir=r.lG2({type:t,selectors:[["","tuiTiptapEditor",""]],inputs:{value:"value",editable:"editable"},outputs:{valueChange:"valueChange",stateChange:"stateChange"},features:[r._Bn([o.a31])]}),t})()},20672:(t,e,n)=>{n.d(e,{$:()=>f});var r=n(42600),o=n(79765),i=n(74788);let s=(()=>{class t{constructor(){this.stateChange$=new o.xQ,this.valueChange$=new o.xQ}}return t.ɵfac=function(e){return new(e||t)},t.ɵdir=i.lG2({type:t}),t})();var a=n(69725),l=n(40401),c=n(48178),d=n(62463),u=n(39761),h=n(88002),p=n(87519);let f=(()=>{class t extends s{constructor(t){super(),this.editorRef=t,this.editorRef.subscribe((t=>{this.editor=t;const e=()=>{this.stateChange$.next();const e=t.getHTML(),n=(r=t.getJSON().content,Array.isArray(r)&&1===r.length&&"paragraph"===r[0].type&&!r[0].hasOwnProperty("content")?"":e);var r;this.valueChange$.next(n)};t.on("transaction",e.bind(this)),t.on("update",e.bind(this))}))}get isFocused(){return this.editor.isFocused}get html(){return this.editor.getHTML()}get editable(){return this.editor.isEditable}set editable(t){this.editor.setEditable(t,!1)}get state(){return this.editor.state}getOriginTiptapEditor(){return this.editor}undoDisabled(){return!this.editor.can().undo()}redoDisabled(){return!this.editor.can().redo()}getFontColor(){return this.editor.getAttributes("textStyle").fontColor||a.hK}getFontSize(){return parseInt(this.editor.getAttributes("textStyle").fontSize,10)}setFontSize(t){this.editor.chain().setMark("textStyle",{fontSize:(0,r.O9r)(t)}).run()}getBackgroundColor(){var t;return(null===(t=this.editor)||void 0===t?void 0:t.getAttributes("textStyle").backgroundColor)||"transparent"}getCellColor(){return this.editor.getAttributes("tableCell").background||this.editor.getAttributes("tableHeader").background}getGroupColor(){var t,e,n,r;if(this.editor.isActive("group")){const o=null!==(e=null===(t=this.editor.getAttributes("group"))||void 0===t?void 0:t.style)&&void 0!==e?e:"",i=(0,c.jx)(o);return null!==(r=null!==(n=i["background-color"])&&void 0!==n?n:i.background)&&void 0!==r?r:""}return""}onAlign(t){this.editor.chain().focus().setTextAlign(t).run()}setImage(t){this.editor.chain().focus().command((({commands:e,state:n})=>{var r;const o=null!==(r=e.setEditableImage)&&void 0!==r?r:e.setImage;if(o){const r=n.selection.anchor;return o({src:t}),e.setTextSelection(r),!0}return!1})).run()}undo(){this.editor.chain().undo().run()}redo(){this.editor.chain().redo().run()}setHorizontalRule(){this.editor.chain().focus().setHorizontalRule().run()}removeFormat(){this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes()}setFontColor(t){this.editor.chain().focus().setFontColor(t).run()}setBackgroundColor(t){this.editor.chain().focus().setBackgroundColor(t).run()}toggleUnderline(){this.editor.chain().focus().toggleUnderline().run()}toggleStrike(){this.editor.chain().focus().toggleStrike().run()}toggleOrderedList(){this.editor.chain().focus().toggleOrderedList().run()}toggleUnorderedList(){this.editor.chain().focus().toggleBulletList().run()}togglePre(){this.editor.chain().focus().toggleCodeBlock().run()}toggleTaskList(){this.editor.commands.toggleTaskList()}sinkListItem(){const t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().sinkListItem(t).run()}liftListItem(){const t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().liftListItem(t).run()}isActive(t){return this.editor.isActive(t)}isActive$(t){return this.stateChange$.pipe((0,u.O)(null),(0,h.U)((()=>this.isActive(t))),(0,p.x)())}toggleBold(){this.editor.chain().focus().toggleBold().run()}toggleCode(){this.editor.chain().focus().toggleCode().run()}toggleItalic(){this.editor.chain().focus().toggleItalic().run()}toggleBlockquote(){this.editor.chain().focus().toggleBlockquote().run()}toggleSubscript(){this.editor.chain().focus().toggleSubscript().run()}toggleSuperscript(){this.editor.chain().focus().toggleSuperscript().run()}toggleCodeBlock(){this.editor.chain().focus().toggleCodeBlock().run()}insertTable(t,e){this.editor.chain().focus().insertTable({cols:t,rows:e}).run()}addColumnAfter(){this.editor.chain().focus().addColumnAfter().run()}addColumnBefore(){this.editor.chain().focus().addColumnBefore().run()}addRowAfter(){this.editor.chain().focus().addRowAfter().run()}addRowBefore(){this.editor.chain().focus().addRowBefore().run()}deleteColumn(){this.editor.chain().focus().deleteColumn().run()}deleteRow(){this.editor.chain().focus().deleteRow().run()}mergeCells(){this.editor.chain().focus().mergeCells().run()}splitCell(){this.editor.chain().focus().splitCell().run()}canMergeCells(){return this.editor.can().mergeCells()}canSplitCells(){return this.editor.can().splitCell()}setHeading(t){this.editor.chain().focus().setHeading({level:t}).run()}setParagraph(t){this.editor.chain().focus().setParagraph().run(),t&&this.editor.chain().setMark("textStyle",t).run()}setHardBreak(){this.editor.chain().setHardBreak().run()}setTextSelection(t){this.editor.commands.setTextSelection(t)}toggleLink(t){this.editor.chain().focus().toggleLink({href:t}).run()}setLink(t){this.editor.chain().focus().setLink({href:t}).run()}unsetLink(){this.editor.chain().focus().unsetLink().run()}focus(){this.editor.chain().focus().run()}setValue(t){t===this.html||""===t&&"

"===this.html||(this.editor.commands.setContent(t),this.editor.view.updateState(d.yy.create({schema:this.editor.state.schema,doc:this.editor.state.doc,selection:this.editor.state.selection,storedMarks:this.editor.state.storedMarks,plugins:this.editor.state.plugins})))}destroy(){this.editor.destroy()}setCellColor(t){this.editor.chain().focus().setCellBackground(t).run()}selectClosest(){const t=this.editor.state.selection.anchor,{schema:e,doc:n}=this.editor.state,r=(0,c.Yz)(n.resolve(t),e.marks.link);r&&this.editor.chain().setTextSelection(r).run()}enter(){this.editor.commands.enter()}setDetails(){this.editor.commands.setDetails()}removeDetails(){this.editor.commands.removeDetails()}setGroup(){this.editor.commands.setGroup()}removeGroup(){this.editor.commands.removeGroup()}setGroupHilite(t){this.editor.commands.setGroupHilite(t)}setAnchor(t){this.editor.commands.setAnchor(t.replace("#",""))}removeAnchor(){this.editor.commands.removeAnchor()}setFileLink(t){this.editor.commands.setFileLink(t)}setYoutubeVideo(t){this.editor.commands.setYoutubeVideo(t)}setIframe(t){this.editor.commands.setIframe(t)}removeEmptyTextStyle(){this.editor.commands.removeEmptyTextStyle()}toggleMark(t,e,n){this.editor.commands.toggleMark(t,e,n)}}return t.ɵfac=function(e){return new(e||t)(i.LFG(l.ZW))},t.ɵprov=i.Yz7({token:t,factory:t.ɵfac}),t})()},72023:(t,e,n)=>{n.d(e,{_:()=>r});var r=(()=>(function(t){t.Align="justify",t.Anchor="anchor",t.Attach="attach",t.Bold="bold",t.Clear="clear",t.Code="code",t.Color="foreColor",t.Details="details",t.Group="group",t.HR="insertHorizontalRule",t.Hilite="hiliteColor",t.Img="image",t.Italic="italic",t.Link="link",t.List="list",t.MergeCells="mergeCells",t.Quote="quote",t.RowsColumnsManaging="rowsColumnsManaging",t.Size="fontSize",t.SplitCells="splitCells",t.Strikethrough="strikeThrough",t.Sub="subscript",t.Sup="superscript",t.Table="insertTable",t.Tex="tex",t.Underline="underline",t.Undo="undo"}(r||(r={})),r))()},44:(t,e,n)=>{n.r(e),n.d(e,{BackgroundColor:()=>r}),n(84402);const r=n(11046).Extension.create({name:"backgroundColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,renderHTML:({backgroundColor:t})=>t?{style:`background-color: ${t}`}:{},parseHTML:({style:t})=>t.backgroundColor.replace(/['"]+/g,""),keepOnSplit:!1}}}]},addCommands:()=>({setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).run()})})},58101:(t,e,n)=>{n.r(e),n.d(e,{TuiFileLink:()=>r});const r=n(11046).Extension.create({name:"fileLink",addCommands:()=>({setFileLink:t=>({state:e,chain:n})=>{const{selection:r}=e,o=' ';return(Math.abs(r.to-r.from)>0?n().toggleMark("link",{href:t.link},{extendEmptyMarkRange:!0}).setTextSelection(r.to).insertContent(o):n().insertContent(`${t.name}${o}`)).setTextSelection(r.to).run()}})})},30163:(t,e,n)=>{n.r(e),n.d(e,{FontColor:()=>r}),n(84402);const r=n(11046).Extension.create({name:"fontColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontColor:{default:null,renderHTML:({fontColor:t})=>t?{style:`color: ${t}`}:{},parseHTML:({style:t})=>t.color.replace(/['"]+/g,""),keepOnSplit:!1}}}]},addCommands:()=>({setFontColor:t=>({chain:e})=>e().setMark("textStyle",{fontColor:t}).run(),unsetFontColor:()=>({chain:t})=>t().setMark("textStyle",{fontColor:null}).run()})})},1604:(t,e,n)=>{n.r(e),n.d(e,{TuiFontSize:()=>r}),n(84402);const r=n(11046).Extension.create({name:"fontSize",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:({style:t})=>t.fontSize,renderHTML:({fontSize:t})=>t?{style:`font-size: ${t}`}:{}}}}]},addCommands:()=>({setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()})})},19818:(t,e,n)=>{n.r(e),n.d(e,{TUI_EDITOR_GROUP_DEFAULT_OPTIONS:()=>i,createGroupExtension:()=>s});var r=n(48178),o=n(11046);const i={groupNodeClass:"tui-group-node",groupPointerNodeClass:"tui-group-pointer",nested:!0,draggable:!0,createOnEnter:!1},s=(t={})=>{const{draggable:e,nested:n,groupNodeClass:s,groupPointerNodeClass:a,createOnEnter:l}=Object.assign(Object.assign({},i),t);return o.Node.create({name:"group",draggable:e,group:"block",content:n?"block+":"block",addAttributes:()=>({style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>t.style?{style:t.style}:{}}}),parseHTML:()=>[{tag:'div[data-type="group"]'}],renderHTML:({HTMLAttributes:t})=>["div",(0,o.mergeAttributes)(t,{"data-type":"group"}),0],addNodeView:()=>({HTMLAttributes:t,node:n})=>{const r=document.createElement("div"),o=document.createElement("div");if(r.classList.add(s),o.setAttribute("data-type","group"),t.style&&(n.attrs.style=t.style,o.setAttribute("style",t.style)),e){const t=document.createElement("div");t.classList.add(a),t.innerHTML="",t.contentEditable="false",r.append(t,o)}else r.append(o);return{dom:r,contentDOM:o}},addCommands(){return{setGroup:()=>({commands:t,state:e})=>{this.editor.chain().focus().run();const n=(0,r.Ap)(e,""),o=`
${n.trim().startsWith("

")?n:`

${n}

`}
`;return t.insertContent(o)},setGroupHilite:t=>({editor:e})=>{for(let n=e.state.selection.$anchor,r=n.depth;r>0;r--){const o=n.node(r);if(o.type.name===this.name){setTimeout((()=>e.commands.updateAttributes(o.type,{style:`background: ${t}`})));break}}return!0},removeGroup:()=>({state:t,dispatch:e})=>(0,r.yU)(t,e,this.name)}},addKeyboardShortcuts(){return l?{Enter:this.editor.commands.setGroup}:{}}})}},33626:(t,e,n)=>{n.r(e),n.d(e,{TUI_IFRAME_EDITOR_OPTIONS:()=>a,TuiIframeEditorComponent:()=>c,TuiIframeEditorModule:()=>p,createIframeEditorExtension:()=>h});var r=n(91211),o=n(42600),i=n(8274),s=n(74788);const a=new s.OlP("[TUI_IFRAME_EDITOR_OPTIONS]",{factory:()=>({minWidth:100,maxWidth:1/0,minHeight:100,maxHeight:1/0})});var l=n(22916);let c=(()=>{class t extends i._3{constructor(t,e){super(),this.options=t,this.sanitizer=e}get src(){var t;return this.sanitizer.bypassSecurityTrustResourceUrl(null!==(t=this.attrs.src)&&void 0!==t?t:"")}updateSize([t,e]){this.currentWidth=Math.max(this.options.minWidth,Math.min(this.options.maxWidth,t)),this.currentHeight=Math.max(this.options.minHeight,Math.min(this.options.maxHeight,e)),this.attrs.width=this.currentWidth,this.attrs.height=this.currentHeight,this.editor.commands.setContent(this.editor.getJSON())}}return t.ɵfac=function(e){return new(e||t)(s.Y36(a),s.Y36(r.H7))},t.ɵcmp=s.Xpm({type:t,selectors:[["tui-iframe-editor"]],features:[s._Bn([o.a31]),s.qOj],decls:2,vars:13,consts:[[3,"height","width","sizeChange"],[3,"height","src","width"]],template:function(t,e){1&t&&(s.TgZ(0,"tui-editor-resizable",0),s.NdJ("sizeChange",(function(t){return e.updateSize(t)})),s._UZ(1,"iframe",1),s.qZA()),2&t&&(s.Q6J("height",e.height)("width",e.width),s.xp6(1),s.Udp("max-height",e.options.maxHeight)("max-width",e.options.maxWidth)("min-height",e.options.minHeight)("min-width",e.options.minWidth),s.Q6J("height",e.height)("src",e.src,s.uOi)("width",e.width))},directives:[l.V],styles:["iframe[_ngcontent-%COMP%]{display:inline;pointer-events:none}"],changeDetection:0}),t})();var d=n(13704),u=n(11046);const h=t=>u.Node.create({name:"iframe",group:"block",atom:!0,draggable:!1,parseHTML:()=>[{tag:'iframe[data-type="iframe-editor"]'}],addAttributes(){return{src:{default:null,keepOnSplit:!1,parseHTML:t=>t.getAttribute("src")},frameborder:{default:0,keepOnSplit:!1,parseHTML:t=>t.getAttribute("frameborder")},width:{default:"100%",keepOnSplit:!1,parseHTML:t=>t.getAttribute("width")},height:{default:null,keepOnSplit:!1,parseHTML:t=>t.getAttribute("height")},allowfullscreen:{keepOnSplit:!1,default:this.options.allowFullscreen,parseHTML:t=>t.getAttribute("allowfullscreen")}}},renderHTML:({HTMLAttributes:t})=>["iframe",(0,u.mergeAttributes)(t,{"data-type":"iframe-editor"})],addNodeView:()=>e=>new d.y(c,e,Object.assign({injector:t},e)),addCommands(){return{setIframe:t=>({commands:e,state:n})=>{const r=n.selection.anchor;return e.enter(),e.setTextSelection(r),e.insertContent({type:this.name,attrs:t}),e.setTextSelection(n.selection.anchor),!0}}}});let p=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[i.Sl]]}),t})()},89681:(t,e,n)=>{n.r(e),n.d(e,{TUI_EDITOR_MAX_IMAGE_WIDTH:()=>d,TUI_EDITOR_MIN_IMAGE_WIDTH:()=>c,TUI_IMAGE_EDITOR_OPTIONS:()=>u,TuiImageEditorComponent:()=>p,TuiImageEditorModule:()=>S,createImageEditorExtension:()=>M,tuiCreateImageEditorExtension:()=>A});var r=n(12057),o=n(74788),i=n(91211),s=n(62579),a=n(42600),l=n(8274);const c=new o.OlP("[TUI_EDITOR_MIN_IMAGE_WIDTH]",{factory:()=>null}),d=new o.OlP("[TUI_EDITOR_MAX_IMAGE_WIDTH]",{factory:()=>null}),u=new o.OlP("[TUI_IMAGE_EDITOR_OPTIONS]",{factory:()=>({minWidth:100,maxWidth:1/0})});var h=n(22916);let p=(()=>{class t extends l._3{constructor(t,e,n,r,o,i,s){super(),this.minWidth=t,this.maxWidth=e,this.options=n,this.doc=r,this.sanitizer=o,this.el=i,this.win=s,this.contenteditable=!0,this.focused=!1}get dragHandle(){var t;return null!==(t=this.attrs.draggable)&&void 0!==t?t:null}get height(){return null}get alt(){return this.attrs.alt||""}get title(){return this.attrs.title||""}get src(){return this.sanitizer.bypassSecurityTrustResourceUrl(this.attrs.src)}currentTargetIsFocused(t){this.focused=this.el.nativeElement.contains(t),this.focused&&this.selectFakeText()}updateSize([t]){var e,n;const r=null!==(e=this.minWidth)&&void 0!==e?e:this.options.minWidth,o=null!==(n=this.maxWidth)&&void 0!==n?n:this.options.maxWidth;this.currentWidth=Math.max(r,Math.min(o,t)),this.attrs.width=this.currentWidth,this.editor.commands.setContent(this.editor.getJSON())}selectFakeText(){var t,e,n;const r=this.doc.createRange();null===(t=this.el.nativeElement.querySelector("p"))||void 0===t||t.focus(),r.selectNode(this.el.nativeElement),null===(e=this.win.getSelection())||void 0===e||e.removeAllRanges(),null===(n=this.win.getSelection())||void 0===n||n.addRange(r)}}return t.ɵfac=function(e){return new(e||t)(o.Y36(c),o.Y36(d),o.Y36(u),o.Y36(r.K0),o.Y36(i.H7),o.Y36(o.SBq),o.Y36(s.m9))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-image-editor"]],hostVars:2,hostBindings:function(t,e){1&t&&o.NdJ("click.silent",(function(t){return e.currentTargetIsFocused(t.target)}),!1,o.evT),2&t&&o.uIk("contenteditable",e.contenteditable)("data-drag-handle",e.dragHandle)},features:[o._Bn([a.a31]),o.qOj],decls:4,vars:12,consts:[["contenteditable","false",1,"t-emulate-inline-node"],[3,"autoHeight","width","sizeChange"],["contenteditable","false",3,"alt","src","title","width"]],template:function(t,e){1&t&&(o._UZ(0,"p",0),o.TgZ(1,"tui-editor-resizable",1),o.NdJ("sizeChange",(function(t){return e.updateSize(t)})),o._UZ(2,"img",2),o.qZA(),o._UZ(3,"p",0)),2&t&&(o.xp6(1),o.Q6J("autoHeight",!0)("width",e.width),o.xp6(1),o.Udp("max-width",e.options.maxWidth,"px")("min-width",e.options.minWidth,"px"),o.ekj("ProseMirror-selectednode",e.focused),o.Q6J("alt",e.alt)("src",e.src,o.LSH)("title",e.title)("width",e.width))},directives:[h.V],styles:["[data-drag-handle][_nghost-%COMP%]{cursor:move}img[_ngcontent-%COMP%]{pointer-events:none}.t-emulate-inline-node[_ngcontent-%COMP%]{display:inline-block;margin:0;height:0}"],changeDetection:0}),t})();var f=n(13704),m=n(40401),g=n(11046),b=n(44632),k=n(62463),v=n(15257),y=n(70409);const w=[{tag:'img[data-type="image-editor"]'}],x={src:{default:"",keepOnSplit:!1},width:{default:300,keepOnSplit:!1},alt:{default:"",keepOnSplit:!1},title:{default:"",keepOnSplit:!1}};function C(t){return(e,n)=>{var r;const o=n instanceof DragEvent?n.dataTransfer:n.clipboardData,i=Array.from(null!==(r=null==o?void 0:o.files)&&void 0!==r?r:[]).filter((t=>/image/i.test(t.type)));i.length&&n.preventDefault();const s=t.get(m.p7);i.forEach((t=>{s(t).pipe((0,v.q)(1),(0,y.o)((()=>!e.isDestroyed))).subscribe((t=>{const n=e.state.schema.nodes.imageEditor.create({src:t}),r=e.state.tr.replaceSelectionWith(n);null===setTimeout||void 0===setTimeout||setTimeout((()=>{e.isDestroyed||e.dispatch(r)}))}))}))}}function A({injector:t,draggable:e}){return M(t,{draggable:e})}function M(t,{draggable:e}={}){const n=!(0,a.PcC)(e)||e;return b.Image.extend({name:"imageEditor",group:"inline",inline:!0,atom:!0,priority:0,selectable:!0,draggable:n,parseHTML:()=>w,addAttributes:()=>Object.assign(Object.assign({},x),{draggable:{default:n?"":null,keepOnSplit:!1}}),renderHTML:({HTMLAttributes:t})=>["img",(0,g.mergeAttributes)(t,{"data-type":"image-editor"})],addNodeView:()=>e=>new f.y(p,e,Object.assign({injector:t},e)),addCommands(){return{setEditableImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addProseMirrorPlugins:()=>[new k.Sy({props:{handleDOMEvents:{paste:C(t),drop:C(t)}}})]})}let S=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=o.oAB({type:t}),t.ɵinj=o.cJS({imports:[[r.ez,l.Sl]]}),t})()},13575:(t,e,n)=>{function r(t){return t.isActive("bulletList")||t.isActive("orderedList")}n.r(e),n.d(e,{TuiTabExtension:()=>o,tuiIsOrderedOrBulletList:()=>r});const o=n(11046).Extension.create({name:"indent",addKeyboardShortcuts(){return{Tab:()=>!r(this.editor)&&this.editor.commands.insertContent("\t")}}})},48239:(t,e,n)=>{n.r(e),n.d(e,{TuiLink:()=>Xt});var r=n(48178),o=n(11046);const i="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",s="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",a=(t,e)=>{for(const n in e)t[n]=e[n];return t},l="numeric",c="ascii",d="alpha",u="asciinumeric",h="alphanumeric",p="domain",f="emoji",m="scheme",g="slashscheme",b="whitespace";function k(t,e){return t in e||(e[t]=[]),e[t]}function v(t,e,n){e[l]&&(e[u]=!0,e[h]=!0),e[c]&&(e[u]=!0,e[d]=!0),e[u]&&(e[h]=!0),e[d]&&(e[h]=!0),e[h]&&(e[p]=!0),e[f]&&(e[p]=!0);for(const r in e){const e=k(r,n);e.indexOf(t)<0&&e.push(t)}}function y(t){void 0===t&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}y.groups={},y.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let n=0;n=0&&(n[r]=!0);return n}(s.t,r),n);v(i,t,r)}else n&&v(i,n,r);s.t=i}return o.j[t]=s,s}};const w=(t,e,n,r,o)=>t.ta(e,n,r,o),x=(t,e,n,r,o)=>t.tr(e,n,r,o),C=(t,e,n,r,o)=>t.ts(e,n,r,o),A=(t,e,n,r,o)=>t.tt(e,n,r,o),M="WORD",S="UWORD",_="LOCALHOST",T="TLD",O="UTLD",E="SCHEME",D="SLASH_SCHEME",N="NUM",L="WS",I="NL",R="OPENBRACE",z="CLOSEBRACE",P="OPENBRACKET",H="CLOSEBRACKET",q="OPENPAREN",B="CLOSEPAREN",$="OPENANGLEBRACKET",F="CLOSEANGLEBRACKET",J="FULLWIDTHLEFTPAREN",j="FULLWIDTHRIGHTPAREN",Z="LEFTCORNERBRACKET",U="RIGHTCORNERBRACKET",V="LEFTWHITECORNERBRACKET",Y="RIGHTWHITECORNERBRACKET",W="FULLWIDTHLESSTHAN",G="FULLWIDTHGREATERTHAN",Q="AMPERSAND",K="APOSTROPHE",X="ASTERISK",tt="AT",et="BACKSLASH",nt="BACKTICK",rt="CARET",ot="COLON",it="COMMA",st="DOLLAR",at="DOT",lt="EQUALS",ct="EXCLAMATION",dt="HYPHEN",ut="PERCENT",ht="PIPE",pt="PLUS",ft="POUND",mt="QUERY",gt="QUOTE",bt="SEMI",kt="SLASH",vt="TILDE",yt="UNDERSCORE",wt="EMOJI",xt="SYM";var Ct=Object.freeze({__proto__:null,WORD:M,UWORD:S,LOCALHOST:_,TLD:T,UTLD:O,SCHEME:E,SLASH_SCHEME:D,NUM:N,WS:L,NL:I,OPENBRACE:R,CLOSEBRACE:z,OPENBRACKET:P,CLOSEBRACKET:H,OPENPAREN:q,CLOSEPAREN:B,OPENANGLEBRACKET:$,CLOSEANGLEBRACKET:F,FULLWIDTHLEFTPAREN:J,FULLWIDTHRIGHTPAREN:j,LEFTCORNERBRACKET:Z,RIGHTCORNERBRACKET:U,LEFTWHITECORNERBRACKET:V,RIGHTWHITECORNERBRACKET:Y,FULLWIDTHLESSTHAN:W,FULLWIDTHGREATERTHAN:G,AMPERSAND:Q,APOSTROPHE:K,ASTERISK:X,AT:tt,BACKSLASH:et,BACKTICK:nt,CARET:rt,COLON:ot,COMMA:it,DOLLAR:st,DOT:at,EQUALS:lt,EXCLAMATION:ct,HYPHEN:dt,PERCENT:ut,PIPE:ht,PLUS:pt,POUND:ft,QUERY:mt,QUOTE:gt,SEMI:bt,SLASH:kt,TILDE:vt,UNDERSCORE:yt,EMOJI:wt,SYM:xt});const At=/[a-z]/,Mt=/\p{L}/u,St=/\p{Emoji}/u,_t=/\d/,Tt=/\s/,Ot="\n",Et="️",Dt="‍";let Nt=null,Lt=null;function It(t,e,n,r,o){let i;const s=e.length;for(let n=0;n=0;)o++;if(o>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+o),10);e>0;e--)n.pop();r+=o}else n.push(t[r]),r++}return e}const zt={defaultProtocol:"http",events:null,format:Ht,formatHref:Ht,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Pt(t,e){void 0===e&&(e=null);let n=a({},zt);t&&(n=a(n,t instanceof Pt?t.o:t));const r=n.ignoreTags,o=[];for(let t=0;tt,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=null!=e;let o=this.o[t];return o?("object"==typeof o?(o=n.t in o?o[n.t]:zt[t],"function"==typeof o&&r&&(o=o(e,n))):"function"==typeof o&&r&&(o=o(e,n.t,n)),o):o},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}},qt.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return void 0===t&&(t=zt.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),c=t.get("target",n,e),d=t.get("rel",n,e),u=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),c&&(s.target=c),d&&(s.rel=d),u&&a(s,u),{tagName:o,attributes:s,content:i,eventListeners:h}}};const $t=Bt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ft=Bt("text"),Jt=Bt("nl"),jt=Bt("url",{isLink:!0,toHref(t){return void 0===t&&(t=zt.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==_&&t[1].t===ot}}),Zt=t=>new y(t);function Ut(t,e,n){const r=n[0].s,o=n[n.length-1].e;return new t(e.slice(r,o),n)}const Vt="undefined"!=typeof console&&console&&console.warn||(()=>{}),Yt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Wt(t,e){if(void 0===e&&(e=!1),Yt.initialized&&Vt(`linkifyjs: already initialized - will not register custom scheme "${t}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');Yt.customSchemes.push([t,e])}function Gt(t,e,n){if(void 0===e&&(e=null),void 0===n&&(n=null),e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Pt(n),o=function(t){return Yt.initialized||function(){Yt.scanner=function(t){void 0===t&&(t=[]);const e={};y.groups=e;const n=new y;null==Nt&&(Nt=Rt(i)),null==Lt&&(Lt=Rt(s)),A(n,"'",K),A(n,"{",R),A(n,"}",z),A(n,"[",P),A(n,"]",H),A(n,"(",q),A(n,")",B),A(n,"<",$),A(n,">",F),A(n,"(",J),A(n,")",j),A(n,"「",Z),A(n,"」",U),A(n,"『",V),A(n,"』",Y),A(n,"<",W),A(n,">",G),A(n,"&",Q),A(n,"*",X),A(n,"@",tt),A(n,"`",nt),A(n,"^",rt),A(n,":",ot),A(n,",",it),A(n,"$",st),A(n,".",at),A(n,"=",lt),A(n,"!",ct),A(n,"-",dt),A(n,"%",ut),A(n,"|",ht),A(n,"+",pt),A(n,"#",ft),A(n,"?",mt),A(n,'"',gt),A(n,"/",kt),A(n,";",bt),A(n,"~",vt),A(n,"_",yt),A(n,"\\",et);const r=x(n,_t,N,{[l]:!0});x(r,_t,r);const o=x(n,At,M,{[c]:!0});x(o,At,o);const h=x(n,Mt,S,{[d]:!0});x(h,At),x(h,Mt,h);const k=x(n,Tt,L,{[b]:!0});A(n,Ot,I,{[b]:!0}),A(k,Ot),x(k,Tt,k);const w=x(n,St,wt,{[f]:!0});x(w,St,w),A(w,Et,w);const zt=A(w,Dt);x(zt,St,w);const Pt=[[At,o]],Ht=[[At,null],[Mt,h]];for(let t=0;tt[0]>e[0]?1:-1));for(let e=0;e=0?o[p]=!0:At.test(r)?_t.test(r)?o[u]=!0:o[c]=!0:o[l]=!0,C(n,r,r,o)}return C(n,"localhost",_,{ascii:!0}),n.jd=new y(xt),{start:n,tokens:a({groups:e},Ct)}}(Yt.customSchemes);for(let t=0;t=0&&h++,o++,d++;if(h<0)o-=d,o0&&(i.push(Ut(Ft,e,s)),s=[]),o-=h,d-=h;const t=u.t,r=n.slice(o-d,o);i.push(Ut(t,e,r))}}return s.length>0&&i.push(Ut(Ft,e,s)),i}(Yt.parser.start,t,function(t,e){const n=function(t){const e=[],n=t.length;let r=0;for(;r56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,(t=>t.toLowerCase()))),r=n.length,o=[];let i=0,s=0;for(;s=0&&(u+=n[s].length,h++),c+=n[s].length,i+=n[s].length,s++;i-=u,s-=h,c-=u,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}(Yt.scanner.start,t))}(t),h=[];for(let t=0;t{"string"!=typeof t?Wt(t.scheme,t.optionalSlashes):Wt(t)}))},onDestroy(){y.groups={},Yt.scanner=null,Yt.parser=null,Yt.tokenQueue=[],Yt.pluginQueue=[],Yt.customSchemes=[],Yt.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){var e;return(null===(e=t.href)||void 0===e?void 0:e.startsWith("javascript:"))?["a",(0,o.mergeAttributes)(this.options.HTMLAttributes,{...t,href:""}),0]:["a",(0,o.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,o.markPasteRule)({find:t=>Gt(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:(t,e)=>{var n,r;const o=null===(n=null==e?void 0:e.clipboardData)||void 0===n?void 0:n.getData("text/html"),i=null==o?void 0:o.match(/href="([^"]*)"/);return i?{href:i[1]}:{href:null===(r=t.data)||void 0===r?void 0:r.href}}})]},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push((e={type:this.type,validate:this.options.validate},new Qt.Sy({key:new Qt.H$("autolink"),appendTransaction:(t,n,r)=>{const i=t.some((t=>t.docChanged))&&!n.doc.eq(r.doc),s=t.some((t=>t.getMeta("preventAutolink")));if(!i||s)return;const{tr:a}=r,l=(0,o.combineTransactionSteps)(n.doc,[...t]);return(0,o.getChangedRanges)(l).forEach((({newRange:t})=>{const n=(0,o.findChildrenInRange)(r.doc,t,(t=>t.isTextblock));let i,s;if(n.length>1?(i=n[0],s=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(i=n[0],s=r.doc.textBetween(i.pos,t.to,void 0," ")),i&&s){const t=s.split(" ").filter((t=>""!==t));if(t.length<=0)return!1;const n=t[t.length-1],l=i.pos+s.lastIndexOf(n);if(!n)return!1;Gt(n).filter((t=>t.isLink)).map((t=>({...t,from:l+t.start+1,to:l+t.end+1}))).filter((t=>!r.schema.marks.code||!r.doc.rangeHasMark(t.from,t.to,r.schema.marks.code))).filter((t=>!e.validate||e.validate(t.value))).forEach((t=>{(0,o.getMarksBetween)(t.from,t.to,r.doc).some((t=>t.mark.type===e.type))||a.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),a.steps.length?a:void 0}}))),this.options.openOnClick&&t.push(function(t){return new Qt.Sy({key:new Qt.H$("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(0!==r.button)return!1;if("A"!==r.target.nodeName)return!1;const a=(0,o.getAttributes)(e.state,t.type.name),l=r.target,c=null!==(i=null==l?void 0:l.href)&&void 0!==i?i:a.href,d=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!(!l||!c||(e.editable&&window.open(c,d),0))}}})}({type:this.type})),this.options.linkOnPaste&&t.push(function(t){return new Qt.Sy({key:new Qt.H$("handlePasteLink"),props:{handlePaste:(e,n,r)=>{var o;const{state:i}=e,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach((t=>{l+=t.textContent}));const c=Gt(l).find((t=>t.isLink&&t.value===l));if(!l||!c)return!1;const d=null===(o=n.clipboardData)||void 0===o?void 0:o.getData("text/html"),u=null==d?void 0:d.match(/href="([^"]*)"/),h=u?u[1]:c.href;return t.editor.commands.setMark(t.type,{href:h}),!0}}})}({editor:this.editor,type:this.type})),t;var e}}),Xt=Kt.extend({addAttributes(){var t;return Object.assign(Object.assign({},null===(t=this.parent)||void 0===t?void 0:t.call(this)),(0,r.x6)(["download"]))},addCommands(){var t;return Object.assign(Object.assign({},null===(t=this.parent)||void 0===t?void 0:t.call(this)),{toggleLink:t=>({chain:e,state:n})=>{{const{selection:r,doc:i}=n,s=i.cut(r.to,r.to+1),a=" "===(0,o.getHTMLFromFragment)(s.content,n.schema).replace(/<\/?[^>]+(>|$)/g,""),l=e().toggleMark(this.name,t,{extendEmptyMarkRange:!0});return(a?l.setTextSelection(r.to+1):l.setTextSelection(r.to).insertContent(' ')).run()}}})},addPasteRules(){return[(0,o.markPasteRule)({find:t=>Gt(t).filter((t=>{var e,n,r;return null===(r=null===(n=(e=this.options).validate)||void 0===n?void 0:n.call(e,t.value))||void 0===r||r})).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]}}).configure({openOnClick:!1})},52989:(t,e,n)=>{n.r(e),n.d(e,{TuiMarkdown:()=>yn,TuiMarkdownClipboard:()=>c,TuiMarkdownTightLists:()=>vn});var r={};n.r(r),n.d(r,{arrayReplaceAt:()=>z,assign:()=>R,escapeHtml:()=>Y,escapeRE:()=>G,fromCodePoint:()=>H,has:()=>I,isMdAsciiPunct:()=>tt,isPunctChar:()=>X,isSpace:()=>Q,isString:()=>N,isValidEntityCode:()=>P,isWhiteSpace:()=>K,lib:()=>nt,normalizeReference:()=>et,unescapeAll:()=>J,unescapeMd:()=>F});var o={};n.r(o),n.d(o,{parseLinkDestination:()=>ot,parseLinkLabel:()=>rt,parseLinkTitle:()=>it});var i=n(11046),s=n(27439),a=n(62463);function l(t){return(new window.DOMParser).parseFromString(`${t}`,"text/html").body}const c=i.Extension.create({name:"markdownClipboard",addOptions:()=>({transformPastedText:!1,transformCopiedText:!1}),addProseMirrorPlugins(){return[new a.Sy({key:new a.H$("markdownClipboard"),props:{clipboardTextParser:(t,e,n)=>{if(n||!this.options.transformPastedText)return null;const r=this.editor.storage.markdown.parser.parse(t,{inline:!0});return s.aw.fromSchema(this.editor.schema).parseSlice(l(r),{preserveWhitespace:!0,context:e})},clipboardTextSerializer:t=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(t.content):null}})]}});var d=n(9934),u=n(6855),h=n(74444),p=n(36973);const f=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((t=>t.charCodeAt(0)))),m=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((t=>t.charCodeAt(0))));var g;const b=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),k=null!==(g=String.fromCodePoint)&&void 0!==g?g:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};var v=(()=>(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"}(v||(v={})),v))(),y=(()=>(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(y||(y={})),y))();function w(t){return t>=v.ZERO&&t<=v.NINE}var x=(()=>(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"}(x||(x={})),x))(),C=(()=>{return(t=C||(C={}))[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute",C;var t})();class A{constructor(t,e,n){this.decodeTree=t,this.emitCodePoint=e,this.errors=n,this.state=x.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=C.Strict}startEntity(t){this.decodeMode=t,this.state=x.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case x.EntityStart:return t.charCodeAt(e)===v.NUM?(this.state=x.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=x.NamedEntity,this.stateNamedEntity(t,e));case x.NumericStart:return this.stateNumericStart(t,e);case x.NumericDecimal:return this.stateNumericDecimal(t,e);case x.NumericHex:return this.stateNumericHex(t,e);case x.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===v.LOWER_X?(this.state=x.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=x.NumericDecimal,this.stateNumericDecimal(t,e))}addToNumericResult(t,e,n,r){if(e!==n){const o=n-e;this.result=this.result*Math.pow(r,o)+parseInt(t.substr(e,o),r),this.consumed+=o}}stateNumericHex(t,e){const n=e;for(;e=v.UPPER_A&&r<=v.UPPER_F||r>=v.LOWER_A&&r<=v.LOWER_F)))return this.addToNumericResult(t,n,e,16),this.emitNumericEntity(o,3);e+=1}var r;return this.addToNumericResult(t,n,e,16),-1}stateNumericDecimal(t,e){const n=e;for(;e=55296&&t<=57343||t>1114111?65533:null!==(e=b.get(t))&&void 0!==e?e:t}(this.result),this.consumed),this.errors&&(t!==v.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,e){const{decodeTree:n}=this;let r=n[this.treeIndex],o=(r&y.VALUE_LENGTH)>>14;for(;e=v.UPPER_A&&t<=v.UPPER_Z||t>=v.LOWER_A&&t<=v.LOWER_Z||w(t)}(i))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],o=(r&y.VALUE_LENGTH)>>14,0!==o){if(s===v.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==C.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var i;return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:n}=this,r=(n[e]&y.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,r,this.consumed),null===(t=this.errors)||void 0===t||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,e,n){const{decodeTree:r}=this;return this.emitCodePoint(1===e?r[t]&~y.VALUE_LENGTH:r[t+1],n),3===e&&this.emitCodePoint(r[t+2],n),n}end(){var t;switch(this.state){case x.NamedEntity:return 0===this.result||this.decodeMode===C.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case x.NumericDecimal:return this.emitNumericEntity(0,2);case x.NumericHex:return this.emitNumericEntity(0,3);case x.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case x.EntityStart:return 0}}}function M(t){let e="";const n=new A(t,(t=>e+=k(t)));return function(t,r){let o=0,i=0;for(;(i=t.indexOf("&",i))>=0;){e+=t.slice(o,i),n.startEntity(r);const s=n.write(t,i+1);if(s<0){o=i+n.end();break}o=i+s,i=0===s?o+1:o}const s=e+t.slice(o);return e="",s}}function S(t,e,n,r){const o=(e&y.BRANCH_LENGTH)>>7,i=e&y.JUMP_TABLE;if(0===o)return 0!==i&&r===i?n:-1;if(i){const e=r-i;return e<0||e>=o?-1:t[n+e]-1}let s=n,a=s+o-1;for(;s<=a;){const e=s+a>>>1,n=t[e];if(nr))return t[e+o];a=e-1}}return-1}const _=M(f);function T(t,e=C.Legacy){return _(t,e)}function O(t){for(let e=1;e'"]/g,E),D(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),D(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));const L=Object.prototype.hasOwnProperty;function I(t,e){return L.call(t,e)}function R(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t}function z(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function P(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function H(t){if(t>65535){const e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const q=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,B=new RegExp(q.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),$=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function F(t){return t.indexOf("\\")<0?t:t.replace(q,"$1")}function J(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(B,(function(t,e,n){return e||function(t,e){if(35===e.charCodeAt(0)&&$.test(e)){const n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return P(n)?H(n):t}const n=T(t);return n!==t?n:t}(t,n)}))}const j=/[&<>"]/,Z=/[&<>"]/g,U={"&":"&","<":"<",">":">",'"':"""};function V(t){return U[t]}function Y(t){return j.test(t)?t.replace(Z,V):t}const W=/[.?*+^$[\]\\(){}|-]/g;function G(t){return t.replace(W,"\\$&")}function Q(t){switch(t){case 9:case 32:return!0}return!1}function K(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function X(t){return h.Z.test(t)||p.Z.test(t)}function tt(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function et(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const nt={mdurl:d,ucmicro:u};function rt(t,e,n){let r,o,i,s;const a=t.posMax,l=t.pos;for(t.pos=e+1,r=1;t.pos32))return i;if(41===r){if(0===s)break;s--}o++}return e===o||0!==s||(i.str=J(t.slice(e,o)),i.pos=o,i.ok=!0),i}function it(t,e,n,r){let o,i=e;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let r=t.charCodeAt(i);if(34!==r&&39!==r&&40!==r)return s;e++,i++,40===r&&(r=41),s.marker=r}for(;i"+Y(i.content)+""},st.code_block=function(t,e,n,r,o){const i=t[e];return""+Y(t[e].content)+"\n"},st.fence=function(t,e,n,r,o){const i=t[e],s=i.info?J(i.info).trim():"";let a,l="",c="";if(s){const t=s.split(/(\s+)/g);l=t[0],c=t.slice(2).join("")}if(a=n.highlight&&n.highlight(i.content,l,c)||Y(i.content),0===a.indexOf("${a}\n`}return`
${a}
\n`},st.image=function(t,e,n,r,o){const i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(t,e,n)},st.hardbreak=function(t,e,n){return n.xhtmlOut?"
\n":"
\n"},st.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},st.text=function(t,e){return Y(t[e].content)},st.html_block=function(t,e){return t[e].content},st.html_inline=function(t,e){return t[e].content},at.prototype.renderAttrs=function(t){let e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e\n":">",o},at.prototype.renderInline=function(t,e,n){let r="";const o=this.rules;for(let i=0,s=t.length;i=0&&(n=this.attrs[e][1]),n},ut.prototype.attrJoin=function(t,e){const n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e};const ht=ut;function pt(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}pt.prototype.Token=ht;const ft=pt,mt=/\r\n?|\n/g,gt=/\0/g;function bt(t){return/^<\/a\s*>/i.test(t)}const kt=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,vt=/\((c|tm|r)\)/i,yt=/\((c|tm|r)\)/gi,wt={c:"©",r:"®",tm:"™"};function xt(t,e){return wt[e.toLowerCase()]}function Ct(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];"text"!==r.type||e||(r.content=r.content.replace(yt,xt)),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}function At(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];"text"!==r.type||e||kt.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}const Mt=/['"]/,St=/['"]/g;function _t(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function Tt(t,e){let n;const r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,"text"!==i.type)continue;let a=i.content,l=0,c=a.length;t:for(;l=0)f=a.charCodeAt(d.index-1);else for(n=o-1;n>=0&&"softbreak"!==t[n].type&&"hardbreak"!==t[n].type;n--)if(t[n].content){f=t[n].content.charCodeAt(t[n].content.length-1);break}let m=32;if(l=48&&f<=57&&(h=u=!1),u&&h&&(u=g,h=b),u||h){if(h)for(n=r.length-1;n>=0;n--){let u=r[n];if(r[n].level=0;s--){const a=o[s];if("link_close"!==a.type){if("html_inline"===a.type&&(n=a.content,/^\s]/i.test(n)&&i>0&&i--,bt(a.content)&&i++),!(i>0)&&"text"===a.type&&t.md.linkify.test(a.content)){const n=a.content;let i=t.md.linkify.match(n);const l=[];let c=a.level,d=0;i.length>0&&0===i[0].index&&s>0&&"text_special"===o[s-1].type&&(i=i.slice(1));for(let e=0;ed){const e=new t.Token("text","",0);e.content=n.slice(d,a),e.level=c,l.push(e)}const u=new t.Token("link_open","a",1);u.attrs=[["href",o]],u.level=c++,u.markup="linkify",u.info="auto",l.push(u);const h=new t.Token("text","",0);h.content=s,h.level=c,l.push(h);const p=new t.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",l.push(p),d=i[e].lastIndex}if(d=0;e--)"inline"===t.tokens[e].type&&(vt.test(t.tokens[e].content)&&Ct(t.tokens[e].children),kt.test(t.tokens[e].content)&&At(t.tokens[e].children))}],["smartquotes",function(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&Mt.test(t.tokens[e].content)&&Tt(t.tokens[e].children,t)}],["text_join",function(t){let e,n;const r=t.tokens,o=r.length;for(let t=0;t0&&this.level++,this.tokens.push(r),r},Nt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Nt.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;te;)if(!Q(this.src.charCodeAt(--t)))return t+1;return t},Nt.prototype.skipChars=function(t,e){for(let n=this.src.length;tn;)if(e!==this.src.charCodeAt(--t))return t+1;return t},Nt.prototype.getLines=function(t,e,n,r){if(t>=e)return"";const o=new Array(e-t);for(let i=0,s=t;sn?new Array(t-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return o.join("")},Nt.prototype.Token=ht;const Lt=Nt;function It(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function Rt(t){const e=[],n=t.length;let r=0,o=t.charCodeAt(r),i=!1,s=0,a="";for(;r=r)return-1;let i=t.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=t.src.charCodeAt(o++),!(i>=48&&i<=57)){if(41===i||46===i)break;return-1}if(o-n>=10)return-1}return o`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",qt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Bt=new RegExp("^(?:"+Ht+"|"+qt+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),$t=new RegExp("^(?:"+Ht+"|"+qt+")"),Ft=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp($t.source+"\\s*$"),/^$/,!1]],Jt=[["table",function(t,e,n,r){if(e+2>n)return!1;let o=e+1;if(t.sCount[o]=4)return!1;let i=t.bMarks[o]+t.tShift[o];if(i>=t.eMarks[o])return!1;const s=t.src.charCodeAt(i++);if(124!==s&&45!==s&&58!==s)return!1;if(i>=t.eMarks[o])return!1;const a=t.src.charCodeAt(i++);if(124!==a&&45!==a&&58!==a&&!Q(a))return!1;if(45===s&&Q(a))return!1;for(;i=4)return!1;c=Rt(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const u=c.length;if(0===u||u!==d.length)return!1;if(r)return!0;const h=t.parentType;t.parentType="table";const p=t.md.block.ruler.getRules("blockquote"),f=[e,0];t.push("table_open","table",1).map=f,t.push("thead_open","thead",1).map=[e,e+1],t.push("tr_open","tr",1).map=[e,e+1];for(let e=0;e=4)break;if(c=Rt(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=u-c.length,g>65536)break;o===e+2&&(t.push("tbody_open","tbody",1).map=m=[e+2,0]),t.push("tr_open","tr",1).map=[o,o+1];for(let e=0;e=4))break;r++,o=r}t.line=o;const i=t.push("code_block","code",0);return i.content=t.getLines(e,o,4+t.blkIndent,!1)+"\n",i.map=[e,t.line],!0}],["fence",function(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(o+3>i)return!1;const s=t.src.charCodeAt(o);if(126!==s&&96!==s)return!1;let a=o;o=t.skipChars(o,s);let l=o-a;if(l<3)return!1;const c=t.src.slice(a,o),d=t.src.slice(o,i);if(96===s&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let u=e,h=!1;for(;u++,!(u>=n||(o=a=t.bMarks[u]+t.tShift[u],i=t.eMarks[u],o=4||(o=t.skipChars(o,s),o-a=4)return!1;if(62!==t.src.charCodeAt(o))return!1;if(r)return!0;const a=[],l=[],c=[],d=[],u=t.md.block.ruler.getRules("blockquote"),h=t.parentType;t.parentType="blockquote";let p,f=!1;for(p=e;p=i)break;if(62===t.src.charCodeAt(o++)&&!e){let e,n,r=t.sCount[p]+1;32===t.src.charCodeAt(o)?(o++,r++,n=!1,e=!0):9===t.src.charCodeAt(o)?(e=!0,(t.bsCount[p]+r)%4==3?(o++,r++,n=!1):n=!0):e=!1;let s=r;for(a.push(t.bMarks[p]),t.bMarks[p]=o;o=i,l.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(e?1:0),c.push(t.sCount[p]),t.sCount[p]=s-r,d.push(t.tShift[p]),t.tShift[p]=o-t.bMarks[p];continue}if(f)break;let r=!1;for(let e=0,o=u.length;e";const b=[e,0];g.map=b,t.md.block.tokenize(t,e,p),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=s,t.parentType=h,b[1]=t.line;for(let n=0;n=4)return!1;let i=t.bMarks[e]+t.tShift[e];const s=t.src.charCodeAt(i++);if(42!==s&&45!==s&&95!==s)return!1;let a=1;for(;i=4)return!1;if(t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(p=!0),(h=Pt(t,l))>=0){if(d=!0,s=t.bMarks[l]+t.tShift[l],u=Number(t.src.slice(s,h-1)),p&&1!==u)return!1}else{if(!((h=zt(t,l))>=0))return!1;d=!1}if(p&&t.skipSpaces(h)>=t.eMarks[l])return!1;if(r)return!0;const f=t.src.charCodeAt(h-1),m=t.tokens.length;d?(a=t.push("ordered_list_open","ol",1),1!==u&&(a.attrs=[["start",u]])):a=t.push("bullet_list_open","ul",1);const g=[l,0];a.map=g,a.markup=String.fromCharCode(f);let b=!1;const k=t.md.block.ruler.getRules("list"),v=t.parentType;for(t.parentType="list";l=o?1:r-e,p>4&&(p=1);const m=e+p;a=t.push("list_item_open","li",1),a.markup=String.fromCharCode(f);const g=[l,0];a.map=g,d&&(a.info=t.src.slice(s,h-1));const v=t.tight,y=t.tShift[l],w=t.sCount[l],x=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[l]=u-t.bMarks[l],t.sCount[l]=r,u>=o&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,l,n,!0),t.tight&&!b||(c=!1),b=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=x,t.tShift[l]=y,t.sCount[l]=w,t.tight=v,a=t.push("list_item_close","li",-1),a.markup=String.fromCharCode(f),l=t.line,g[1]=l,l>=n)break;if(t.sCount[l]=4)break;let C=!1;for(let e=0,r=k.length;e=4)return!1;if(91!==t.src.charCodeAt(o))return!1;function a(e){const n=t.lineMax;if(e>=n||t.isEmpty(e))return null;let r=!1;if(t.sCount[e]-t.blkIndent>3&&(r=!0),t.sCount[e]<0&&(r=!0),!r){const r=t.md.block.ruler.getRules("reference"),o=t.parentType;t.parentType="reference";let i=!1;for(let o=0,s=r.length;o=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(o))return!1;let s=t.src.slice(o,i),a=0;for(;a=4)return!1;let s=t.src.charCodeAt(o);if(35!==s||o>=i)return!1;let a=1;for(s=t.src.charCodeAt(++o);35===s&&o6||oo&&Q(t.src.charCodeAt(l-1))&&(i=l),t.line=e+1;const c=t.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[e,t.line];const d=t.push("inline","",0);return d.content=t.src.slice(o,i).trim(),d.map=[e,t.line],d.children=[],t.push("heading_close","h"+String(a),-1).markup="########".slice(0,a),!0},["paragraph","reference","blockquote"]],["lheading",function(t,e,n){const r=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const o=t.parentType;t.parentType="paragraph";let i,s=0,a=e+1;for(;a3)continue;if(t.sCount[a]>=t.blkIndent){let e=t.bMarks[a]+t.tShift[a];const n=t.eMarks[a];if(e=n))){s=61===i?1:2;break}}if(t.sCount[a]<0)continue;let e=!1;for(let o=0,i=r.length;o3)continue;if(t.sCount[i]<0)continue;let e=!1;for(let o=0,s=r.length;o=n))&&!(t.sCount[s]=i){t.line=n;break}const e=t.line;let l=!1;for(let i=0;i=t.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");t.tight=!a,t.isEmpty(t.line-1)&&(a=!0),s=t.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r},Ut.prototype.scanDelims=function(t,e){const n=this.posMax,r=this.src.charCodeAt(t),o=t>0?this.src.charCodeAt(t-1):32;let i=t;for(;i?@[]^_`{|}~-".split("").forEach((function(t){Gt[t.charCodeAt(0)]=1}));const Kt={tokenize:function(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e)return!1;if(126!==r)return!1;const o=t.scanDelims(t.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=t.push("text","",0),a.content=s,i--);for(let e=0;e=0;n--){const r=e[n];if(95!==r.marker&&42!==r.marker)continue;if(-1===r.end)continue;const o=e[r.end],i=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,s=String.fromCharCode(r.marker),a=t.tokens[r.token];a.type=i?"strong_open":"em_open",a.tag=i?"strong":"em",a.nesting=1,a.markup=i?s+s:s,a.content="";const l=t.tokens[o.token];l.type=i?"strong_close":"em_close",l.tag=i?"strong":"em",l.nesting=-1,l.markup=i?s+s:s,l.content="",i&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--)}}const te={tokenize:function(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e)return!1;if(95!==r&&42!==r)return!1;const o=t.scanDelims(t.pos,42===r);for(let e=0;e\x00-\x20]*)$/,re=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,oe=/^&([a-z][a-z0-9]{1,31});/i;function ie(t){const e={},n=t.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;sa;l-=i[l]+1){const e=t[l];if(e.marker===n.marker&&e.open&&e.end<0){let r=!1;if((e.close||n.open)&&(e.length+n.length)%3==0&&(e.length%3==0&&n.length%3==0||(r=!0)),!r){const r=l>0&&!t[l-1].open?i[l-1]+1:0;i[s]=s-l+r,i[l]=r,n.open=!1,e.end=s,e.close=!1,c=-1,o=-2;break}}}-1!==c&&(e[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}const se=[["text",function(t,e){let n=t.pos;for(;n0)return!1;const n=t.pos;if(n+3>t.posMax)return!1;if(58!==t.src.charCodeAt(n))return!1;if(47!==t.src.charCodeAt(n+1))return!1;if(47!==t.src.charCodeAt(n+2))return!1;const r=t.pending.match(Wt);if(!r)return!1;const o=r[1],i=t.md.linkify.matchAtStart(t.src.slice(n-o.length));if(!i)return!1;let s=i.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const a=t.md.normalizeLink(s);if(!t.md.validateLink(a))return!1;if(!e){t.pending=t.pending.slice(0,-o.length);const e=t.push("link_open","a",1);e.attrs=[["href",a]],e.markup="linkify",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(s);const n=t.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return t.pos+=s.length-o.length,!0}],["newline",function(t,e){let n=t.pos;if(10!==t.src.charCodeAt(n))return!1;const r=t.pending.length-1,o=t.posMax;if(!e)if(r>=0&&32===t.pending.charCodeAt(r))if(r>=1&&32===t.pending.charCodeAt(r-1)){let e=r-1;for(;e>=1&&32===t.pending.charCodeAt(e-1);)e--;t.pending=t.pending.slice(0,e),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n=r)return!1;let o=t.src.charCodeAt(n);if(10===o){for(e||t.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&e<=57343&&(i+=t.src[n+1],n++)}const s="\\"+i;if(!e){const e=t.push("text_special","",0);o<256&&0!==Gt[o]?e.content=i:e.content=s,e.markup=s,e.info="escape"}return t.pos=n+1,!0}],["backticks",function(t,e){let n=t.pos;if(96!==t.src.charCodeAt(n))return!1;const r=n;n++;const o=t.posMax;for(;n=u)return!1;if(l=f,o=t.md.helpers.parseLinkDestination(t.src,f,t.posMax),o.ok){for(s=t.md.normalizeLink(o.str),t.md.validateLink(s)?f=o.pos:s="",l=f;f=u||41!==t.src.charCodeAt(f))&&(c=!0),f++}if(c){if(void 0===t.env.references)return!1;if(f=0?r=t.src.slice(l,f++):f=p+1):f=p+1,r||(r=t.src.slice(h,p)),i=t.env.references[et(r)],!i)return t.pos=d,!1;s=i.href,a=i.title}if(!e){t.pos=h,t.posMax=p;const e=[["href",s]];t.push("link_open","a",1).attrs=e,a&&e.push(["title",a]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=f,t.posMax=u,!0}],["image",function(t,e){let n,r,o,i,s,a,l,c,d="";const u=t.pos,h=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;const p=t.pos+2,f=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(f<0)return!1;if(i=f+1,i=h)return!1;for(c=i,a=t.md.helpers.parseLinkDestination(t.src,i,t.posMax),a.ok&&(d=t.md.normalizeLink(a.str),t.md.validateLink(d)?i=a.pos:d=""),c=i;i=h||41!==t.src.charCodeAt(i))return t.pos=u,!1;i++}else{if(void 0===t.env.references)return!1;if(i=0?o=t.src.slice(c,i++):i=f+1):i=f+1,o||(o=t.src.slice(p,f)),s=t.env.references[et(o)],!s)return t.pos=u,!1;d=s.href,l=s.title}if(!e){r=t.src.slice(p,f);const e=[];t.md.inline.parse(r,t.md,t.env,e);const n=t.push("image","img",0),o=[["src",d],["alt",""]];n.attrs=o,n.children=e,n.content=r,l&&o.push(["title",l])}return t.pos=i,t.posMax=h,!0}],["autolink",function(t,e){let n=t.pos;if(60!==t.src.charCodeAt(n))return!1;const r=t.pos,o=t.posMax;for(;;){if(++n>=o)return!1;const e=t.src.charCodeAt(n);if(60===e)return!1;if(62===e)break}const i=t.src.slice(r+1,n);if(ne.test(i)){const n=t.md.normalizeLink(i);if(!t.md.validateLink(n))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",n]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(i);const r=t.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return t.pos+=i.length+2,!0}if(ee.test(i)){const n=t.md.normalizeLink("mailto:"+i);if(!t.md.validateLink(n))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",n]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(i);const r=t.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return t.pos+=i.length+2,!0}return!1}],["html_inline",function(t,e){if(!t.md.options.html)return!1;const n=t.posMax,r=t.pos;if(60!==t.src.charCodeAt(r)||r+2>=n)return!1;const o=t.src.charCodeAt(r+1);if(33!==o&&63!==o&&47!==o&&!function(t){const e=32|t;return e>=97&&e<=122}(o))return!1;const i=t.src.slice(r).match(Bt);if(!i)return!1;if(!e){const e=t.push("html_inline","",0);e.content=i[0],s=e.content,/^\s]/i.test(s)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(e.content)&&t.linkLevel--}var s;return t.pos+=i[0].length,!0}],["entity",function(t,e){const n=t.pos,r=t.posMax;if(38!==t.src.charCodeAt(n))return!1;if(n+1>=r)return!1;if(35===t.src.charCodeAt(n+1)){const r=t.src.slice(n).match(re);if(r){if(!e){const e="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=t.push("text_special","",0);n.content=P(e)?H(e):H(65533),n.markup=r[0],n.info="entity"}return t.pos+=r[0].length,!0}}else{const r=t.src.slice(n).match(oe);if(r){const n=T(r[0]);if(n!==r[0]){if(!e){const e=t.push("text_special","",0);e.content=n,e.markup=r[0],e.info="entity"}return t.pos+=r[0].length,!0}}}return!1}]],ae=[["balance_pairs",function(t){const e=t.tokens_meta,n=t.tokens_meta.length;ie(t.delimiters);for(let t=0;t0&&r++,"text"===o[e].type&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;s||t.pos++,i[e]=t.pos},le.prototype.tokenize=function(t){const e=this.ruler.getRules(""),n=e.length,r=t.posMax,o=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(s){if(t.pos>=r)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},le.prototype.parse=function(t,e,n,r){const o=new this.State(t,e,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let t=0;t=0))try{e.hostname=ue.ZP.toASCII(e.hostname)}catch(t){}return d.encode(d.format(e))}function ke(t){const e=d.parse(t,!0);if(e.hostname&&(!e.protocol||ge.indexOf(e.protocol)>=0))try{e.hostname=ue.ZP.toUnicode(e.hostname)}catch(t){}return d.decode(d.format(e),d.decode.defaultChars+"%")}function ve(t,e){if(!(this instanceof ve))return new ve(t,e);e||N(t)||(e=t||{},t="default"),this.inline=new ce,this.block=new Zt,this.core=new Dt,this.renderer=new lt,this.linkify=new de.Z,this.validateLink=me,this.normalizeLink=be,this.normalizeLinkText=ke,this.utils=r,this.helpers=R({},o),this.options={},this.configure(t),e&&this.set(e)}ve.prototype.set=function(t){return R(this.options,t),this},ve.prototype.configure=function(t){const e=this;if(N(t)){const e=t;if(!(t=he[e]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach((function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)})),this},ve.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.enable(t,!0))}),this),n=n.concat(this.inline.ruler2.enable(t,!0));const r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},ve.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.disable(t,!0))}),this),n=n.concat(this.inline.ruler2.disable(t,!0));const r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},ve.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},ve.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");const n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},ve.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},ve.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},ve.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const ye=ve;var we=n(82033);const xe=new s.V_({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["div",["hr"]]},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:t=>["h"+t.attrs.level,0]},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>({params:t.getAttribute("data-params")||""})}],toDOM:t=>["pre",t.attrs.params?{"data-params":t.attrs.params}:{},["code",0]]},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1,tight:t.hasAttribute("data-tight")})}],toDOM:t=>["ol",{start:1==t.attrs.order?null:t.attrs.order,"data-tight":t.attrs.tight?"true":null},0]},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>({tight:t.hasAttribute("data-tight")})}],toDOM:t=>["ul",{"data-tight":t.attrs.tight?"true":null},0]},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:t=>({src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")})}],toDOM:t=>["img",t.attrs]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:t=>"em"==t.type.name}],toDOM:()=>["em"]},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!=t.style.fontWeight&&null},{style:"font-weight=400",clearMark:t=>"strong"==t.type.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:()=>["strong"]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:t=>({href:t.getAttribute("href"),title:t.getAttribute("title")})}],toDOM:t=>["a",t.attrs]},code:{parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}});class Ce{constructor(t,e){this.schema=t,this.tokenHandlers=e,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:s.vc.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let e,n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks);o&&(e=function(t,e){if(t.isText&&e.isText&&s.vc.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}(o,i))?r[r.length-1]=e:r.push(i)}openMark(t){let e=this.top();e.marks=t.addToSet(e.marks)}closeMark(t){let e=this.top();e.marks=t.removeFromSet(e.marks)}parseTokens(t){for(let e=0;e{t.openNode(e,Ae(o,n,r,i)),t.addText(Se(n.content)),t.closeNode()}:(n[r+"_open"]=(t,n,r,i)=>t.openNode(e,Ae(o,n,r,i)),n[r+"_close"]=t=>t.closeNode())}else if(o.node){let e=t.nodeType(o.node);n[r]=(t,n,r,i)=>t.addNode(e,Ae(o,n,r,i))}else if(o.mark){let e=t.marks[o.mark];Me(o,r)?n[r]=(t,n,r,i)=>{t.openMark(e.create(Ae(o,n,r,i))),t.addText(Se(n.content)),t.closeMark(e)}:(n[r+"_open"]=(t,n,r,i)=>t.openMark(e.create(Ae(o,n,r,i))),n[r+"_close"]=t=>t.closeMark(e))}else{if(!o.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o));Me(o,r)?n[r]=_e:(n[r+"_open"]=_e,n[r+"_close"]=_e)}}return n.text=(t,e)=>t.addText(e.content),n.inline=(t,e)=>t.parseTokens(e.children),n.softbreak=n.softbreak||(t=>t.addText(" ")),n}(t,n)}parse(t,e={}){let n,r=new Ce(this.schema,this.tokenHandlers);r.parseTokens(this.tokenizer.parse(t,e));do{n=r.closeNode()}while(r.stack.length);return n||this.schema.topNodeType.createAndFill()}}(xe,we("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(t,e,n)=>({tight:Te(e,n)})},ordered_list:{block:"ordered_list",getAttrs:(t,e,n)=>({order:+t.attrGet("start")||1,tight:Te(e,n)})},heading:{block:"heading",getAttrs:t=>({level:+t.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:t=>({params:t.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:t=>({src:t.attrGet("src"),title:t.attrGet("title")||null,alt:t.children[0]&&t.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:t=>({href:t.attrGet("href"),title:t.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});const Oe=new class{constructor(t,e,n={}){this.nodes=t,this.marks=e,this.options=n}serialize(t,e={}){e=Object.assign({},this.options,e);let n=new De(this.nodes,this.marks,e);return n.renderContent(t),n.out}}({blockquote(t,e){t.wrapBlock("> ",null,e,(()=>t.renderContent(e)))},code_block(t,e){const n=e.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";t.write(r+(e.attrs.params||"")+"\n"),t.text(e.textContent,!1),t.write("\n"),t.write(r),t.closeBlock(e)},heading(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e),t.closeBlock(e)},horizontal_rule(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list(t,e){t.renderList(e," ",(()=>(e.attrs.bullet||"*")+" "))},ordered_list(t,e){let n=e.attrs.order||1,r=String(n+e.childCount-1).length,o=t.repeat(" ",r+2);t.renderList(e,o,(e=>{let o=String(n+e);return t.repeat(" ",r-o.length)+o+". "}))},list_item(t,e){t.renderContent(e)},paragraph(t,e){t.renderInline(e),t.closeBlock(e)},image(t,e){t.write("!["+t.esc(e.attrs.alt||"")+"]("+e.attrs.src.replace(/[\(\)]/g,"\\$&")+(e.attrs.title?' "'+e.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(t,e,n,r){for(let o=r+1;o(t.inAutolink=function(t,e,n){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;let r=e.child(n);return!(!r.isText||r.text!=t.attrs.href||r.marks[r.marks.length-1]!=t||n!=e.childCount-1&&t.isInSet(e.child(n+1).marks))}(e,n,r),t.inAutolink?"<":"["),close(t,e,n,r){let{inAutolink:o}=t;return t.inAutolink=void 0,o?">":"]("+e.attrs.href.replace(/[\(\)"]/g,"\\$&")+(e.attrs.title?` "${e.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open:(t,e,n,r)=>Ee(n.child(r),-1),close:(t,e,n,r)=>Ee(n.child(r-1),1),escape:!1}});function Ee(t,e){let n,r=/`+/g,o=0;if(t.isText)for(;n=r.exec(t.text);)o=Math.max(o,n[0].length);let i=o>0&&e>0?" `":"`";for(let t=0;t0&&e<0&&(i+=" "),i}class De{constructor(t,e,n){this.nodes=t,this.marks=e,this.options=n,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,void 0===this.options.tightLists&&(this.options.tightLists=!1),void 0===this.options.hardBreakNodeName&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+="\n"),t>1){let e=this.delim,n=/\s+$/.exec(e);n&&(e=e.slice(0,e.length-n[0].length));for(let n=1;nthis.render(e,t,r)))}renderInline(t){this.atBlockStart=!0;let e=[],n="",r=(r,o,i)=>{let s=r?r.marks:[];r&&r.type.name===this.options.hardBreakNodeName&&(s=s.filter((e=>{if(i+1==t.childCount)return!1;let n=t.child(i+1);return e.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))})));let a=n;if(n="",r&&r.isText&&s.some((t=>{let n=this.marks[t.type.name];return n&&n.expelEnclosingWhitespace&&!t.isInSet(e)}))){let[t,n,o]=/^(\s*)(.*)$/m.exec(r.text);n&&(a+=n,(r=o?r.withText(o):null)||(s=e))}if(r&&r.isText&&s.some((e=>{let n=this.marks[e.type.name];return n&&n.expelEnclosingWhitespace&&(i==t.childCount-1||!e.isInSet(t.child(i+1).marks))}))){let[t,o,i]=/^(.*?)(\s*)$/m.exec(r.text);i&&(n=i,(r=o?r.withText(o):null)||(s=e))}let l=s.length?s[s.length-1]:null,c=l&&!1===this.marks[l.type.name].escape,d=s.length-(c?1:0);t:for(let t=0;tr?s=s.slice(0,r).concat(n).concat(s.slice(r,t)).concat(s.slice(t+1,d)):r>t&&(s=s.slice(0,t).concat(s.slice(t+1,r)).concat(n).concat(s.slice(r,d)));continue t}}}let u=0;for(;u0&&(this.atBlockStart=!1)};t.forEach(r),r(null,0,t.childCount),this.atBlockStart=!1}renderList(t,e,n){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=void 0!==t.attrs.tight?t.attrs.tight:this.options.tightLists,o=this.inTightList;this.inTightList=r,t.forEach(((o,i,s)=>{s&&r&&this.flushClose(1),this.wrapBlock(e,n(s),t,(()=>this.render(o,t,s)))})),this.inTightList=o}esc(t,e=!1){return t=t.replace(/[`*\\~\[\]_]/g,((e,n)=>"_"==e&&n>0&&n+1]/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let e=-1==t.indexOf('"')?'""':-1==t.indexOf("'")?"''":"()";return e[0]+t+e[1]}repeat(t,e){let n="";for(let r=0;r({markdown:{serialize:Oe.marks.strong,parse:{}}})}),Le=i.Mark.create({name:"code"}).extend({addStorage:()=>({markdown:{serialize:Oe.marks.code,parse:{}}})});function Ie(t){const e=t.type.schema,n=e.text(" ",[t]),r=(0,i.getHTMLFromFragment)(s.HY.from(n),e).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}const Re=i.Mark.create({name:"markdownHTMLMark",addStorage:()=>({markdown:{serialize:{open(t,e){var n,r,o;return(null===(n=this.editor)||void 0===n?void 0:n.storage.markdown.options.html)?null!==(o=null===(r=Ie(e))||void 0===r?void 0:r[0])&&void 0!==o?o:"":(console.warn(`Tiptap Markdown: "${e.type.name}" mark is only available in html mode`),"")},close(t,e){var n,r,o;return(null===(n=this.editor)||void 0===n?void 0:n.storage.markdown.options.html)&&null!==(o=null===(r=Ie(e))||void 0===r?void 0:r[1])&&void 0!==o?o:""}},parse:{}}})}),ze=i.Mark.create({name:"italic"}).extend({addStorage:()=>({markdown:{serialize:Oe.marks.em,parse:{}}})}),Pe=i.Mark.create({name:"link"}).extend({addStorage:()=>({markdown:{serialize:Oe.marks.link,parse:{}}})}),He=i.Mark.create({name:"strike"}).extend({addStorage:()=>({markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}})}),qe=i.Node.create({name:"blockquote"}).extend({addStorage:()=>({markdown:{serialize:Oe.nodes.blockquote,parse:{}}})}),Be=i.Node.create({name:"bulletList"}).extend({addStorage:()=>({markdown:{serialize(t,e){return t.renderList(e," ",(()=>{var t;return`${(null===(t=this.editor)||void 0===t?void 0:t.storage.markdown.options.bulletListMarker)||"-"} `}))},parse:{}}})}),$e=i.Node.create({name:"codeBlock"}).extend({addStorage:()=>({markdown:{serialize(t,e){t.write(`\`\`\`${e.attrs.language||""}\n`),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},parse:{setup(t){var e,n;t.set({langPrefix:null!==(n=null===(e=this.options)||void 0===e?void 0:e.languageClassPrefix)&&void 0!==n?n:"language-"})},updateDOM(t){t.innerHTML=t.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}})}),Fe=i.Node.create({name:"markdownHTMLNode",addStorage:()=>({markdown:{serialize(t,e,n){this.editor.storage.markdown.options.html?t.write(function(t,e){const n=t.type.schema,r=(0,i.getHTMLFromFragment)(s.HY.from(t),n);return t.isBlock&&(e instanceof s.HY||e.type.name===n.topNodeType.name)?function(t){var e;const n=l(t).firstElementChild;return n&&(n.innerHTML=n.innerHTML.trim()?`\n${n.innerHTML}\n`:"\n"),null!==(e=null==n?void 0:n.outerHTML)&&void 0!==e?e:""}(r):r}(e,n)):(console.warn(`Tiptap Markdown: "${e.type.name}" node is only available in html mode`),t.write(`[${e.type.name}]`)),e.isBlock&&t.closeBlock(e)},parse:{}}})}),Je=i.Node.create({name:"hardBreak"}).extend({addStorage:()=>({markdown:{serialize(t,e,n,r){for(let o=r+1;o({markdown:{serialize:Oe.nodes.heading,parse:{}}})}),Ze=i.Node.create({name:"horizontalRule"}).extend({addStorage:()=>({markdown:{serialize:Oe.nodes.horizontal_rule,parse:{}}})}),Ue=i.Node.create({name:"image"}).extend({addStorage:()=>({markdown:{serialize:Oe.nodes.image,parse:{}}})}),Ve=i.Node.create({name:"listItem"}).extend({addStorage:()=>({markdown:{serialize:Oe.nodes.list_item,parse:{}}})}),Ye=i.Node.create({name:"orderedList"}).extend({addStorage:()=>({markdown:{serialize(t,e,n,r){const o=e.attrs.start||1,i=String(o+e.childCount-1).length,s=t.repeat(" ",i+2),a=function(t,e,n){let r=0;for(;n-r>0&&e.child(n-r-1).type.name===t.type.name;r++);return r}(e,n,r),l=a%2?") ":". ";t.renderList(e,s,(e=>{const n=String(o+e);return t.repeat(" ",i-n.length)+n+l}))},parse:{}}})}),We=i.Node.create({name:"paragraph"}).extend({addStorage:()=>({markdown:{serialize:Oe.nodes.paragraph,parse:{}}})});function Ge(t){var e,n;return null!==(n=null===(e=null==t?void 0:t.content)||void 0===e?void 0:e.content)&&void 0!==n?n:[]}const Qe=i.Node.create({name:"table"}).extend({addStorage:()=>({markdown:{serialize(t,e,n){!function(t){const e=Ge(t),n=e[0],r=e.slice(1);return!Ge(n).some((t=>"tableHeader"!==t.type.name||Ke(t)||t.childCount>1))&&!r.some((t=>Ge(t).some((t=>"tableHeader"===t.type.name||Ke(t)||t.childCount>1))))}(e)?Fe.storage.markdown.serialize.call(this,t,e,n):(t.inTable=!0,e.forEach(((e,n,r)=>{if(t.write("| "),e.forEach(((e,n,r)=>{r&&t.write(" | ");const o=e.firstChild;(null==o?void 0:o.textContent.trim())&&t.renderInline(o)})),t.write(" |"),t.ensureNewLine(),!r){const n=Array.from({length:e.childCount}).map((()=>"---")).join(" | ");t.write(`| ${n} |`),t.ensureNewLine()}})),t.closeBlock(e),t.inTable=!1)},parse:{}}})});function Ke(t){return t.attrs.colspan>1||t.attrs.rowspan>1}const Xe=i.Node.create({name:"taskItem"}).extend({addStorage:()=>({markdown:{serialize(t,e){const n=e.attrs.checked?"[x]":"[ ]";t.write(`${n} `),t.renderContent(e)},parse:{updateDOM(t){Array.from(t.querySelectorAll(".task-list-item")).forEach((t=>{const e=t.querySelector("input");t.setAttribute("data-type","taskItem"),e&&(t.setAttribute("data-checked",e.checked.toString()),e.remove())}))}}}})});let tn=!0,en=!1,nn=!1;function rn(t,e){e&&(tn=!e.enabled,en=!!e.label,nn=!!e.labelAfter),t.core.ruler.after("inline","github-task-lists",(t=>{const e=t.tokens;for(let n=2;n=0;r--)if(t[r].level===n)return r;return-1}function an(t,e){return"inline"===t[e].type&&"paragraph_open"===t[e-1].type&&"list_item_open"===t[e-2].type&&function(t){return t.content.startsWith("[ ] ")||t.content.startsWith("[x] ")||t.content.startsWith("[X] ")}(t[e])}function ln(t,e){var n,r,o,i,s;if(null===(n=t.children)||void 0===n||n.unshift(function(t,e){const n=new e("html_inline","",0),r=tn?' disabled="" ':"";return(null==t?void 0:t.content.startsWith("[ ] "))?n.content=``:((null==t?void 0:t.content.startsWith("[x] "))||(null==t?void 0:t.content.startsWith("[X] ")))&&(n.content=``),n}(t,e)),t.children&&(t.children[1].content=t.children[1].content.slice(3)),t.content&&(t.content=t.content.slice(3)),en)if(nn){null===(r=t.children)||void 0===r||r.pop();const n=`task-item-${Math.ceil(1e7*Math.random()-1e3)}`;t.children&&(t.children[0].content=`${t.children[0].content.slice(0,-1)} id="${n}">`),null===(o=t.children)||void 0===o||o.push(function(t,e,n){const r=new n("html_inline","",0);return r.content=``,r.attrs=[{for:e}],r}(t.content,n,e))}else null===(i=t.children)||void 0===i||i.unshift(function(t){const e=new t("html_inline","",0);return e.content="",e}(e))}const cn=i.Node.create({name:"taskList"}).extend({addStorage:()=>({markdown:{serialize:Be.storage.markdown.serialize,parse:{setup(t){t.use(rn)},updateDOM(t){Array.from(t.querySelectorAll(".contains-task-list")).forEach((t=>{t.setAttribute("data-type","taskList")}))}}}})}),dn=i.Node.create({name:"text"}).extend({addStorage:()=>({markdown:{serialize(t,e){t.text(function(t){var e;return null!==(e=null==t?void 0:t.replace(//g,">"))&&void 0!==e?e:""}(e.text))},parse:{}}})}),un=[qe,Be,$e,Je,je,Ze,Fe,Ue,Ve,Ye,We,Qe,Xe,cn,dn,Ne,Le,Re,ze,Pe,He];function hn(t){var e,n;const r=null===(e=t.storage)||void 0===e?void 0:e.markdown,o=null===(n=un.find((e=>e.name===t.name)))||void 0===n?void 0:n.storage.markdown;return r||o?Object.assign(Object.assign({},o),r):null}class pn{constructor(t,{html:e,linkify:n,breaks:r}){this.editor=t,this.md=this.withPatchedRenderer(ye({html:e,linkify:n,breaks:r}))}parse(t,{inline:e}={}){if("string"==typeof t){this.editor.extensionManager.extensions.forEach((t=>{var e,n,r;return null===(r=null===(n=null===(e=hn(t))||void 0===e?void 0:e.parse)||void 0===n?void 0:n.setup)||void 0===r?void 0:r.call({editor:this.editor,options:t.options},this.md)}));const n=l(this.md.render(t));return this.editor.extensionManager.extensions.forEach((t=>{var e,r,o;return null===(o=null===(r=null===(e=hn(t))||void 0===e?void 0:e.parse)||void 0===r?void 0:r.updateDOM)||void 0===o?void 0:o.call({editor:this.editor,options:t.options},n)})),this.normalizeDOM(n,{inline:e,content:t}),n.innerHTML}return t}normalizeDOM(t,{inline:e,content:n}){return this.normalizeBlocks(t),t.querySelectorAll("*").forEach((t=>{var e,n,r;(null===(e=t.nextSibling)||void 0===e?void 0:e.nodeType)!==Node.TEXT_NODE||t.closest("pre")||(t.nextSibling.textContent=null!==(r=null===(n=t.nextSibling.textContent)||void 0===n?void 0:n.replace(/^\n/,""))&&void 0!==r?r:"")})),e&&this.normalizeInline(t,n),t}normalizeBlocks(t){const e=Object.values(this.editor.schema.nodes).filter((t=>t.isBlock)),n=e.map((t=>{var e;return null===(e=t.spec.parseDOM)||void 0===e?void 0:e.map((t=>t.tag))})).flat().filter(Boolean).join(",");n&&Array.from(t.querySelectorAll(n)).forEach((t=>{var e;(null===(e=t.parentElement)||void 0===e?void 0:e.matches("p"))&&function(t){var e,n,r,o;const i=t.parentElement,s=null==i?void 0:i.cloneNode();for(;(null==i?void 0:i.firstChild)&&i.firstChild!==t;)null==s||s.appendChild(i.firstChild);(null!==(n=null===(e=null==s?void 0:s.childNodes)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&s&&(null===(r=null==i?void 0:i.parentElement)||void 0===r||r.insertBefore(s,i)),null===(o=null==i?void 0:i.parentElement)||void 0===o||o.insertBefore(t,i),0===(null==i?void 0:i.childNodes.length)&&i.remove()}(t)}))}normalizeInline(t,e){var n,r,o,i,s;if(null===(n=t.firstElementChild)||void 0===n?void 0:n.matches("p")){const n=t.firstElementChild,{nextElementSibling:a}=n,l=null!==(o=null===(r=e.match(/^\s+/))||void 0===r?void 0:r[0])&&void 0!==o?o:"",c=a?"":null!==(s=null===(i=e.match(/\s+$/))||void 0===i?void 0:i[0])&&void 0!==s?s:"";if(e.match(/^\n\n/))return void(n.innerHTML=`${n.innerHTML}${c}`);!function(t){const e=t.parentNode;for(;null==t?void 0:t.firstChild;)null==e||e.insertBefore(t.firstChild,t);null==e||e.removeChild(t)}(n),t.innerHTML=`${l}${t.innerHTML}${c}`}}withPatchedRenderer(t){const e=t=>(...e)=>{const n=null==t?void 0:t(...e);return"\n"===n?n:(null==n?void 0:n.endsWith("\n"))?n.slice(0,-1):null!=n?n:""};return t.renderer.rules.hardbreak=e(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=e(t.renderer.rules.softbreak),t.renderer.rules.fence=e(t.renderer.rules.fence),t.renderer.rules.code_block=e(t.renderer.rules.code_block),t.renderer.renderToken=e(t.renderer.renderToken.bind(t.renderer)),t}}const fn=ye();function mn(t,e){return fn.inline.State.prototype.scanDelims.call({src:t,posMax:t.length}),new fn.inline.State(t,null,null,[]).scanDelims(e,!0)}function gn(t,e,n,r){let o=t.slice(0,Math.max(0,n))+t.slice(Math.max(0,n+e.length));return o=o.slice(0,Math.max(0,n+r))+e+o.slice(Math.max(0,n+r)),o}class bn extends De{constructor(t,e,n){super(t,e,null!=n?n:{}),this.inTable=!1,this.inlines=[]}render(t,e,n){super.render(t,e,n);const r=this.inlines[this.inlines.length-1];if((null==r?void 0:r.start)&&(null==r?void 0:r.end)){const{delimiter:t,start:e,end:n}=this.normalizeInline(r);this.out=function(t,e,n,r){let o={text:t,from:n,to:r};return o=function(t,e,n,r){let o=n,i=t;for(;on&&!mn(i,o).can_close;)i=gn(i,e,o,-1),o--;return{text:i,from:n,to:o}}(o.text,e,o.from,o.to),o.to-o.from[t,this.serializeNode(Fe)])))),Object.fromEntries(null!==(t=this.editor.extensionManager.extensions.filter((t=>"node"===t.type&&this.serializeNode(t))).map((t=>[t.name,this.serializeNode(t)])))&&void 0!==t?t:[]))}get marks(){var t;return Object.assign(Object.assign({},Object.fromEntries(Object.keys(this.editor.schema.marks).map((t=>[t,this.serializeMark(Re)])))),Object.fromEntries(null!==(t=this.editor.extensionManager.extensions.filter((t=>"mark"===t.type&&this.serializeMark(t))).map((t=>[t.name,this.serializeMark(t)])))&&void 0!==t?t:[]))}serializeNode(t){var e,n;return null===(n=null===(e=hn(t))||void 0===e?void 0:e.serialize)||void 0===n?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var e;const n=null===(e=hn(t))||void 0===e?void 0:e.serialize;return n?Object.assign(Object.assign({},n),{open:"function"==typeof n.open?n.open.bind({editor:this.editor,options:t.options}):n.open,close:"function"==typeof n.close?n.close.bind({editor:this.editor,options:t.options}):n.close}):null}}const vn=i.Extension.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:t=>"true"===t.getAttribute("data-tight")||!t.querySelector("p"),renderHTML:t=>({class:t.tight?this.options.tightClass:null,"data-tight":t.tight?"true":null})}}}]},addCommands(){return{toggleTight:(t=null)=>({editor:e,commands:n})=>this.options.listTypes.some((r=>{if(!e.isActive(r))return!1;const o=e.getAttributes(r);return n.updateAttributes(r,{tight:null!=t?t:!(null==o?void 0:o.tight)})}))}}}),yn=i.Extension.create({name:"markdown",priority:50,addOptions:()=>({html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}),addCommands(){var t,e,n;const r=null===(n=null===(e=null===(t=null===i.extensions||void 0===i.extensions?void 0:i.extensions.Commands)||void 0===t?void 0:t.config)||void 0===e?void 0:e.addCommands)||void 0===n?void 0:n.call(e);return{setContent:(t,e,n)=>o=>{var i;return null===(i=null==r?void 0:r.setContent)||void 0===i?void 0:i.call(r,o.editor.storage.markdown.parser.parse(t),e,n)(o)},insertContentAt:(t,e,n)=>o=>{var i;return null===(i=null==r?void 0:r.insertContentAt)||void 0===i?void 0:i.call(r,t,o.editor.storage.markdown.parser.parse(e,{inline:!0}),n)(o)}}},onBeforeCreate(){this.editor.storage.markdown={options:Object.assign({},this.options),parser:new pn(this.editor,this.options),serializer:new kn(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage:()=>({}),addExtensions(){return[vn.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),c.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}})},39069:(t,e,n)=>{n.r(e),n.d(e,{TuiAudio:()=>s,TuiSource:()=>a,TuiVideo:()=>l});var r=n(69725),o=n(48178),i=n(11046);const s=i.Node.create({name:"audio",group:"block",content:"source+",addAttributes:()=>(0,o.x6)(r.pH),parseHTML:()=>[{tag:"audio"}],renderHTML:({node:t,HTMLAttributes:e})=>["audio",e,...(0,o.YX)(t)]}),a=i.Node.create({name:"source",addAttributes:()=>(0,o.x6)(["src","type","width","height","media","sizes","srcset"]),parseHTML:()=>[{tag:"source"}],renderHTML:({HTMLAttributes:t})=>["source",(0,i.mergeAttributes)(t)]}),l=i.Node.create({name:"video",group:"block",content:"source+",addAttributes:()=>(0,o.x6)(r.pH),parseHTML:()=>[{tag:"video"}],renderHTML:({node:t,HTMLAttributes:e})=>["video",e,...(0,o.YX)(t)]})},52807:(t,e,n)=>{n.r(e),n.d(e,{TuiMention:()=>o});var r=n(11046);const o=r.Node.create({name:"mention",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions:()=>({HTMLAttributes:{},renderHTML({node:t}){var e;return["span",this.HTMLAttributes,`@${null!==(e=t.attrs.label)&&void 0!==e?e:t.attrs.id}`.replace(/@+/g,"@")]}}),addAttributes(){return{id:{default:null,keepOnSplit:!0,parseHTML:t=>t.innerText,renderHTML:()=>({"data-type":this.name})}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){var n;const o=this.options.renderHTML({options:this.options,node:t});return"string"==typeof o?["span",(0,r.mergeAttributes)({"data-type":this.name},this.options.HTMLAttributes,e),o]:["span",(0,r.mergeAttributes)({"data-type":this.name},this.options.HTMLAttributes,e),null===(n=o)||void 0===n?void 0:n[2]]}})},25923:(t,e,n)=>{n.r(e),n.d(e,{StarterKit:()=>M});var r=n(11046),o=n(65828),i=n(48144),s=n(35441),a=n(33977),l=n(30588),c=n(83374),d=n(20366),u=n(10988),h=n(46741),p=n(54424),f=n(74361),m=n(82136),g=n(46057),b=n(80452),k=n(54133),v=n(87660),y=n(27719);const w=/^\s*(\[([( |x])?\])\s$/,x=r.Node.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>"true"===t.getAttribute("data-checked"),renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",a.type="checkbox",a.addEventListener("change",(e=>{if(!r.isEditable&&!this.options.onReadOnlyChecked)return void(a.checked=!a.checked);const{checked:o}=e.target;r.isEditable&&"function"==typeof n&&r.chain().focus(void 0,{scrollIntoView:!1}).command((({tr:t})=>{const e=n(),r=t.doc.nodeAt(e);return t.setNodeMarkup(e,void 0,{...null==r?void 0:r.attrs,checked:o}),!0})).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,o)||(a.checked=!a.checked))})),Object.entries(this.options.HTMLAttributes).forEach((([t,e])=>{o.setAttribute(t,e)})),o.dataset.checked=t.attrs.checked,t.attrs.checked&&a.setAttribute("checked","checked"),i.append(a,s),o.append(i,l),Object.entries(e).forEach((([t,e])=>{o.setAttribute(t,e)})),{dom:o,contentDOM:l,update:t=>t.type===this.type&&(o.dataset.checked=t.attrs.checked,t.attrs.checked?a.setAttribute("checked","checked"):a.removeAttribute("checked"),!0)}}},addInputRules(){return[(0,r.wrappingInputRule)({find:w,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),C=r.Node.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",(0,r.mergeAttributes)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});var A=n(20239);const M=r.Extension.create({name:"starterKit",addExtensions(){const t=[],e=this.options;return!1!==(null==e?void 0:e.blockquote)&&t.push(o.V6.configure(null==e?void 0:e.blockquote)),!1!==(null==e?void 0:e.bold)&&t.push(i.d8.configure(null==e?void 0:e.bold)),!1!==(null==e?void 0:e.bulletList)&&t.push(s.DY.configure(null==e?void 0:e.bulletList)),!1!==(null==e?void 0:e.code)&&t.push(a.EK.configure(null==e?void 0:e.code)),!1!==(null==e?void 0:e.codeBlock)&&t.push(l.dn.configure(null==e?void 0:e.codeBlock)),!1!==(null==e?void 0:e.document)&&t.push(c.B.configure(null==e?void 0:e.document)),!1!==(null==e?void 0:e.dropcursor)&&t.push(d.m.configure(null==e?void 0:e.dropcursor)),!1!==(null==e?void 0:e.gapcursor)&&t.push(u.f.configure(null==e?void 0:e.gapcursor)),!1!==(null==e?void 0:e.hardBreak)&&t.push(h.U.configure(null==e?void 0:e.hardBreak)),!1!==(null==e?void 0:e.heading)&&t.push(p.Heading.configure(Object.assign({levels:[1,2,3,4,5,6]},null==e?void 0:e.heading)).extend({addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>Object.assign(Object.assign({},t||{}),{[`Mod-Alt-${e}`]:()=>null==this?void 0:this.editor.commands.toggleHeading({level:e})})),{})}})),!1!==(null==e?void 0:e.history)&&t.push(f.A.configure(Object.assign({depth:100,newGroupDelay:500},null==e?void 0:e.history))),!1!==(null==e?void 0:e.horizontalRule)&&t.push(m.b.configure(null==e?void 0:e.horizontalRule)),!1!==(null==e?void 0:e.italic)&&t.push(g.Tx.configure(null==e?void 0:e.italic)),!1!==(null==e?void 0:e.listItem)&&t.push(b.H.configure(null==e?void 0:e.listItem)),!1!==(null==e?void 0:e.taskList)&&t.push(C.configure(null==e?void 0:e.taskList)),!1!==(null==e?void 0:e.taskItem)&&t.push(x.configure(Object.assign({nested:!0},null==e?void 0:e.taskItem))),!1!==(null==e?void 0:e.orderedList)&&t.push(k.GS.configure(null==e?void 0:e.orderedList)),!1!==(null==e?void 0:e.paragraph)&&t.push(v.n.configure(null==e?void 0:e.paragraph)),!1!==(null==e?void 0:e.strike)&&t.push(y.Re.configure(null==e?void 0:e.strike)),!1!==(null==e?void 0:e.text)&&t.push(A.x.configure(null==e?void 0:e.text)),t}})},28227:(t,e,n)=>{n.r(e),n.d(e,{TableCellBackground:()=>r});const r=n(11046).Extension.create({addGlobalAttributes:()=>[{types:["tableCell","tableHeader"],attributes:{background:{default:null,renderHTML:({background:t})=>t?{style:`background: ${t}`}:null,parseHTML:({style:t})=>t.background,keepOnSplit:!1}}}],addCommands:()=>({setCellBackground:t=>({chain:e})=>e().updateAttributes("tableCell",{background:t}).updateAttributes("tableHeader",{background:t}).run(),unsetCellBackground:()=>({chain:t})=>t().updateAttributes("tableCell",{background:null}).updateAttributes("tableHeader",{background:null}).run()})})},90551:(t,e,n)=>{n.r(e),n.d(e,{TuiTable:()=>mt});var r,o,i=n(11046),s=n(62463),a=n(27439),l=n(43594),c=n(31690),d=n(38480);if("undefined"!=typeof WeakMap){let t=new WeakMap;r=e=>t.get(e),o=(e,n)=>(t.set(e,n),n)}else{const t=[],e=10;let n=0;r=e=>{for(let n=0;n(n==e&&(n=0),t[n++]=r,t[n++]=o)}var u=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;er&&(i+=o.attrs.colspan)}}for(let t=0;t1&&(n=!0)}-1==e?e=i:e!=i&&(e=Math.max(e,i))}return e}(t),n=t.childCount,r=[];let o=0,i=null;const s=[];for(let t=0,o=e*n;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:h-t});break}const c=o+t*e;for(let t=0;t0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function g(t){const e=t.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function b(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const n=m(e.$head)||function(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n-e.nodeSize)}}(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function k(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function v(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function y(t,e,n){const r=t.node(-1),o=u.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return null==s?null:t.node(0).resolve(i+s)}function w(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some((t=>t>0))||(r.colwidth=null)),r}function x(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let t=0;tt!=e.pos-o));l.unshift(e.pos-o);const c=l.map((t=>{const e=n.nodeAt(t);if(!e)throw RangeError(`No cell with offset ${t} found`);const r=o+t+1;return new s.xm(a.resolve(r),a.resolve(r+e.content.size))}));super(c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=e}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(k(r)&&k(o)&&v(r,o)){const e=this.$anchorCell.node(-1)!=r.node(-1);return e&&this.isRowSelection()?t.rowSelection(r,o):e&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return s.Bs.between(r,o)}content(){const t=this.$anchorCell.node(-1),e=u.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[];for(let n=r.top;n0||d>0){let t=l.attrs;if(c>0&&(t=w(t,0,c)),d>0&&(t=w(t,t.colspan-d,d)),a.leftr.bottom){const t={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top0)return!1;const n=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=u.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(i+o.map[s.left])),a.bottom0&&(n=l.resolve(i+o.map[a.left])),s.bottom0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=u.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(i+o.map[s.top*o.width])),a.right0&&(n=l.resolve(i+o.map[a.top*o.width])),s.right{e.push(l.p.node(n,n+t.nodeSize,{class:"selectedCell"}))})),l.EH.create(t.doc,e)}var S=new s.H$("fix-tables");function _(t,e,n,r){const o=t.childCount,i=e.childCount;t:for(let s=0,a=0;s{"table"==e.type.spec.tableRole&&(n=function(t,e,n,r){const o=u.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let t=0;t0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;ne.width)for(let i=0,a=0;ie.height){const u=[];for(let t=0,r=(e.height-1)*e.width;t=e.width)&&n.nodeAt(e.map[r+t]).type==l.header_cell;u.push(o?d||(d=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,a.HY.from(u)),p=[];for(let t=e.height;t{if(!o)return!1;const i=n.selection;if(i instanceof C)return I(n,r,s.Y1.near(i.$headCell,e));if("horiz"!=t&&!i.empty)return!1;const a=$(o,t,e);if(null==a)return!1;if("horiz"==t)return I(n,r,s.Y1.near(n.doc.resolve(i.head+e),e));{const o=n.doc.resolve(a),i=y(o,t,e);let l;return l=i?s.Y1.near(i,1):e<0?s.Y1.near(n.doc.resolve(o.before(-1)),-1):s.Y1.near(n.doc.resolve(o.after(-1)),1),I(n,r,l)}}}function z(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof C)s=i;else{const r=$(o,t,e);if(null==r)return!1;s=new C(n.doc.resolve(r))}const a=y(s.$headCell,t,e);return!!a&&I(n,r,new C(s.$anchorCell,a))}}function P(t,e){const n=t.selection;if(!(n instanceof C))return!1;if(e){const r=t.tr,o=p(t.schema).cell.createAndFill().content;n.forEachCell(((t,e)=>{t.content.eq(o)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new a.p2(o,0,0))})),r.docChanged&&e(r)}return!0}function H(t,e){const n=m(t.state.doc.resolve(e));return!!n&&(t.dispatch(t.state.tr.setSelection(new C(n))),!0)}function q(t,e,n){if(!g(t.state))return!1;let r=function(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;1==e.childCount&&(n>0&&r>0||"table"==e.child(0).type.spec.tableRole);)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if("row"==i)for(let t=0;t=0;e--){const{rowspan:o,colspan:i}=r.child(e).attrs;for(let e=t;e=e.length&&e.push(a.HY.empty),n[o]r&&(a=a.type.createChecked(w(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;no&&(e=e.type.create({...e.attrs,rowspan:Math.max(1,o-e.attrs.rowspan)},e.content)),s.push(e)}t.push(a.HY.from(s))}n=t,e=o}return{width:t,height:e,rows:n}}(r,s.right-s.left,s.bottom-s.top),N(t.state,t.dispatch,i,s,r),!0}if(r){const e=b(t.state),n=e.start(-1);return N(t.state,t.dispatch,n,u.get(e.node(-1)).findCell(e.pos-n),r),!0}return!1}function B(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=F(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof C)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&null!=(o=m(t.state.selection.$anchor))&&(null==(n=J(t,e))?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(e,n){let r=J(t,n);const o=null==f.getState(t.state);if(!r||!v(e,r)){if(!o)return;r=e}const i=new C(e,r);if(o||!t.state.selection.eq(i)){const n=t.state.tr.setSelection(i);o&&n.setMeta(f,e.pos),t.dispatch(n)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),null!=f.getState(t.state)&&t.dispatch(t.state.tr.setMeta(f,-1))}function a(n){const o=n,a=f.getState(t.state);let l;if(null!=a)l=t.state.doc.resolve(a);else if(F(t,o.target)!=r&&(l=J(t,e),!l))return s();l&&i(l,o)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",a)}function $(t,e,n){if(!(t.state.selection instanceof s.Bs))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=r.before(o),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?i:null}}return null}function F(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function J(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?m(t.state.doc.resolve(n.pos)):null}var j=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Z(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,Z(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function Z(t,e,n,r,o,i){var s;let a=0,l=!0,c=e.firstChild;const d=t.firstChild;if(d){for(let t=0,n=0;t(o.spec.props.nodeViews[p(r.schema).table.name]=(t,r)=>new n(t,e,r),new Y(-1,!1)),apply:(t,e)=>e.apply(t)},props:{attributes:t=>{const e=U.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(e,n)=>{!function(t,e,n,r,o){const i=U.getState(t.state);if(i&&!i.dragging){const r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target);let s=-1;if(r){const{left:o,right:i}=r.getBoundingClientRect();e.clientX-o<=n?s=W(t,e,"left",n):i-e.clientX<=n&&(s=W(t,e,"right",n))}if(s!=i.activeHandle){if(!o&&-1!==s){const e=t.state.doc.resolve(s),n=e.node(-1),r=u.get(n),o=e.start(-1);if(r.colCount(e.pos-o)+e.nodeAfter.attrs.colspan-1==r.width-1)return}Q(t,s)}}}(e,n,t,0,r)},mouseleave:t=>{!function(t){const e=U.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Q(t,-1)}(t)},mousedown:(t,n)=>{!function(t,e,n){const r=U.getState(t.state);if(!r||-1==r.activeHandle||r.dragging)return!1;const o=t.state.doc.nodeAt(r.activeHandle),i=function(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let t=0;t{const e=U.getState(t);if(e&&e.activeHandle>-1)return function(t,e){const n=[],r=t.doc.resolve(e),o=r.node(-1);if(!o)return l.EH.empty;const i=u.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let t=0;t-1&&e.docChanged){let r=e.mapping.map(n.activeHandle,-1);return k(e.doc.resolve(r))||(r=-1),new t(r,n.dragging)}return n}};function W(t,e,n,r){const o="right"==n?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:s}=i,a=m(t.state.doc.resolve(s));if(!a)return-1;if("right"==n)return a.pos;const l=u.get(a.node(-1)),c=a.start(-1),d=l.map.indexOf(a.pos-c);return d%l.width==0?-1:c+l.map[d-1]}function G(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Q(t,e){t.dispatch(t.state.tr.setMeta(U,{setHandle:e}))}function K(t){const e=t.selection,n=b(t),r=n.node(-1),o=n.start(-1),i=u.get(r);return{...e instanceof C?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function X(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;(function(t,e,n){const r=p(e.type.schema).header_cell;for(let o=0;o0&&o0&&e.map[a-1]==l||o0?-1:0;(function(t,e,n){var r;const o=p(e.type.schema).header_cell;for(let i=0;i0&&o0&&c==e.map[s-e.width]){const e=n.nodeAt(c).attrs;t.setNodeMarkup(t.mapping.slice(a).map(c+r),null,{...e,rowspan:e.rowspan-1}),i+=e.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-t]||r.bottomn[t.type.spec.tableRole],(t,e)=>{var n;const o=t.selection;let i,s;if(o instanceof C){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,s=o.$anchorCell.pos}else{if(i=function(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}(o.$from),!i)return!1;s=null==(n=m(o.$from))?void 0:n.pos}if(null==i||null==s)return!1;if(1==i.attrs.colspan&&1==i.attrs.rowspan)return!1;if(e){let n=i.attrs;const a=[],l=n.colwidth;n.rowspan>1&&(n={...n,rowspan:1}),n.colspan>1&&(n={...n,colspan:1});const c=K(t),d=t.tr;for(let t=0;to.table.nodeAt(t)));for(let t=0;t{const e=t+o.tableStart,n=i.doc.nodeAt(e);n&&i.setNodeMarkup(e,d,n.attrs)})),n(i)}return!0}}at("row",{useDeprecatedLogic:!0}),at("column",{useDeprecatedLogic:!0});var lt=at("cell",{useDeprecatedLogic:!0});function ct(t){return function(e,n){if(!g(e))return!1;const r=function(t,e){if(e<0){const e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let e=t.index(-1)-1,n=t.before();e>=0;e--){const r=t.node(-1).child(e),o=r.lastChild;if(o)return n-1-o.nodeSize;n-=r.nodeSize}}else{if(t.index()null,apply(t,e){const n=t.getMeta(f);if(null!=n)return-1==n?null:n;if(null==e||!t.docChanged)return e;const{deleted:r,pos:o}=t.mapping.mapResult(e);return r?null:o}},props:{decorations:M,handleDOMEvents:{mousedown:B},createSelectionBetween:t=>null!=f.getState(t.state)?t.state.selection:null,handleTripleClick:H,handleKeyDown:L,handlePaste:q},appendTransaction:(e,n,r)=>function(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,a;if(r instanceof s.qv&&(a=r.node.type.spec.tableRole)){if("cell"==a||"header_cell"==a)i=C.create(o,r.from);else if("row"==a){const t=o.resolve(r.from+1);i=C.rowSelection(t,t)}else if(!n){const t=u.get(r.node),e=r.from+1,n=e+t.map[t.width*t.height-1];i=C.create(o,e+1,n)}}else r instanceof s.Bs&&function({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0&&!(t.after(o+1)=0&&!(e.before(t+1)>e.start(t));t--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}(r)?i=s.Bs.create(o,r.from):r instanceof s.Bs&&function({$from:t,$to:e}){let n,r;for(let e=t.depth;e>0;e--){const r=t.node(e);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let t=e.depth;t>0;t--){const n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===e.parentOffset}(r)&&(i=s.Bs.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}(r,T(r,n),t)})}function ut(t,e,n,r,o,i){let s=0,a=!0,l=e.firstChild;const c=t.firstChild;for(let t=0,n=0;t{const{selection:e}=t.state;if(!(e instanceof C))return!1;let n=0;const r=(0,i.findParentNodeClosestToPos)(e.ranges[0].$from,(t=>"table"===t.type.name));return null==r||r.node.descendants((t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(n+=1)})),n===e.ranges.length&&(t.commands.deleteTable(),!0)},mt=i.Node.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:ht,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:t}){return["table",(0,i.mergeAttributes)(this.options.HTMLAttributes,t),["tbody",0]]},addCommands:()=>({insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=function(t,e,n,r,o){const i=function(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach((n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)})),t.cached.tableNodeTypes=e,e}(t),s=[],a=[];for(let t=0;t({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(X(t.tr,n,n.left))}return!0}(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(X(t.tr,n,n.right))}return!0}(t,e),deleteColumn:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t),r=t.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let t=n.right-1;tt(r,n,t),t!=n.left;t--){const t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw RangeError("No table found");n.table=t,n.map=u.get(t)}e(r)}return!0}(t,e),addRowBefore:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(et(t.tr,n,n.top))}return!0}(t,e),addRowAfter:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(et(t.tr,n,n.bottom))}return!0}(t,e),deleteRow:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t),r=t.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let t=n.bottom-1;nt(r,n,t),t!=n.top;t--){const t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw RangeError("No table found");n.table=t,n.map=u.get(n.table)}e(r)}return!0}(t,e),deleteTable:()=>({state:t,dispatch:e})=>function(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(t,e),mergeCells:()=>({state:t,dispatch:e})=>ot(t,e),splitCell:()=>({state:t,dispatch:e})=>it(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>at("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>at("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>lt(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>!!ot(t,e)||it(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>function(t,e){return function(n,r){if(!g(n))return!1;const o=b(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof C?n.selection.forEachCell(((n,r)=>{n.attrs[t]!==e&&i.setNodeMarkup(r,null,{...n.attrs,[t]:e})})):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>ct(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>ct(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&T(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const n=C.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ft,"Mod-Backspace":ft,Delete:ft,"Mod-Delete":ft}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[V({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],dt({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:(0,i.callOrReturn)((0,i.getExtensionField)(t,"tableRole",e))}}}).extend({renderHTML({node:t,HTMLAttributes:e}){var n,r;let o=0,s=!0;try{const e=(null===(n=t.content)||void 0===n?void 0:n.content)[0];null===(r=null==e?void 0:e.content)||void 0===r||r.content.forEach((t=>{if(t.attrs.colwidth)t.attrs.colwidth.forEach((t=>{t?o+=t:(s=!1,o+=this.options.cellMinWidth)}));else{s=!1;const e=t.attrs.colspan||1;o+=this.options.cellMinWidth*e}}))}catch(t){s=!1}return e.style=s&&o>0?`width: ${o}px;`:o&&o>0?`min-width: ${o}px`:null,["div",{class:"tui-table-wrapper"},["table",(0,i.mergeAttributes)(this.options.HTMLAttributes,e),["tbody",0]]]}})},13704:(t,e,n)=>{n.d(e,{y:()=>l,d:()=>a});var r=n(12057),o=n(11046),i=n(74788);class s{constructor(t,e,n){const r=e.get(i.z2F),o=e.get(i._Vd).resolveComponentFactory(t);this.componentRef=o.create(e,[]),this.updateProps(n),r.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get el(){return this.componentRef.injector.get(i.SBq)}get dom(){return this.el.nativeElement}updateProps(t){Object.entries(t).forEach((([t,e])=>{this.instance[t]=e}))}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy()}}class a{}class l extends o.NodeView{constructor(t,e,n){super(t,e,n),this.contentDOMElement=null}mount(){const t=this.options.injector,e=t.get(r.K0),n={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(t={})=>this.updateAttributes(t),deleteNode:()=>this.deleteNode()};this.editor.on("selectionUpdate",this.handleSelectionUpdate.bind(this)),this.renderer=new s(this.component,t,n),this.extension.config.draggable&&(this.renderer.el.nativeElement.ondragstart=t=>{this.onDragStart(t)}),this.contentDOMElement=this.node.isLeaf?null:e.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges()),this.appendContendDom()}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}update(t,e){return this.options.update?this.options.update(t,e):t.type===this.node.type&&(t===this.node&&this.decorations===e||(this.node=t,this.decorations=e,this.renderer.updateProps({node:t,decorations:e}),this.appendContendDom()),!0)}handleSelectionUpdate(){const{from:t,to:e}=this.editor.state.selection;t<=this.getPos()&&e>=this.getPos()+this.node.nodeSize?this.selectNode():this.deselectNode()}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate.bind(this)),this.contentDOMElement=null}appendContendDom(){const t=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&t&&!t.contains(this.contentDOMElement)&&t.appendChild(this.contentDOMElement)}}},37195:(t,e,n)=>{n.d(e,{zc:()=>w.zc,dR:()=>w.dR,F1:()=>w.F1,nE:()=>g.nE,Xw:()=>v,Wf:()=>w.Wf,VE:()=>y.TUI_EDITOR_MAX_IMAGE_WIDTH,kB:()=>y.TUI_EDITOR_MIN_IMAGE_WIDTH,mJ:()=>w.mJ,bK:()=>w.bK,p7:()=>w.p7,H9:()=>r.H9,wl:()=>r.wl,aI:()=>i.a,BN:()=>h.BN,T_:()=>p,GK:()=>d,_2:()=>b._,Sz:()=>m,VM:()=>r.VM,$3:()=>h.$3,yB:()=>u.yB,sw:()=>g.sw,PD:()=>k,Uv:()=>w.Uv,Er:()=>x.Er});var r=n(83950),o=n(1884),i=(n(13099),n(8820)),s=n(12057),a=n(42600),l=n(43232),c=(n(76690),n(74788));let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({}),t})();var u=n(90712),h=n(5915);let p=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({imports:[[a.HOV,s.ez,u.yB,l.WUl,l.Jyu,o.Fu,a.Ah6,l.dpK,h.mJ,d]]}),t})();n(1566),n(57495),n(53058),n(21335),n(8274),n(69057);var f=n(45642);let m=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({imports:[[s.ez,l.KWI,l.cnw,l.jhF,r.wl,a.Ah6,f.U5]]}),t})();n(30560);var g=n(69725),b=n(72023);n(44);const k=[Promise.resolve().then(n.bind(n,25923)).then((({StarterKit:t})=>t)).then((t=>t.configure({heading:{levels:[1,2,3,4,5,6]}}))),n.e(3336).then(n.bind(n,73336)).then((({default:t})=>t.configure({types:["heading","paragraph"]}))),Promise.resolve().then(n.bind(n,84402)).then((({default:t})=>t)),n.e(7991).then(n.bind(n,17991)).then((({default:t})=>t)),n.e(7147).then(n.bind(n,77147)).then((({default:t})=>t)),n.e(5034).then(n.bind(n,25034)).then((({default:t})=>t)),Promise.resolve().then(n.bind(n,30163)).then((({FontColor:t})=>t)),Promise.resolve().then(n.bind(n,44632)).then((({default:t})=>t.configure({inline:!0,allowBase64:!0}))),Promise.resolve().then(n.bind(n,48239)).then((({TuiLink:t})=>t)),n.e(6633).then(n.bind(n,96633)).then((({TuiJumpAnchor:t})=>t)),Promise.resolve().then(n.bind(n,58101)).then((({TuiFileLink:t})=>t)),Promise.resolve().then(n.bind(n,44)).then((({BackgroundColor:t})=>t)),Promise.resolve().then(n.bind(n,90551)).then((({TuiTable:t})=>t.configure({resizable:!0}))),n.e(5213).then(n.bind(n,45213)).then((({default:t})=>t)),n.e(1397).then(n.bind(n,71397)).then((({default:t})=>t)),n.e(8840).then(n.bind(n,38840)).then((({TableHeader:t})=>t)),Promise.resolve().then(n.bind(n,13575)).then((({TuiTabExtension:t})=>t)),Promise.resolve().then(n.bind(n,28227)).then((({TableCellBackground:t})=>t)),n.e(5681).then(n.bind(n,5681)).then((({TuiDetailsContent:t})=>t)),n.e(5681).then(n.bind(n,5681)).then((({TuiDetails:t})=>t)),n.e(5681).then(n.bind(n,5681)).then((({TuiSummary:t})=>t)),Promise.resolve().then(n.bind(n,1604)).then((({TuiFontSize:t})=>t))],v=k;n(58101),n(30163),n(1604),n(19818),n(33626);var y=n(89681),w=(n(13575),n(48239),n(52989),n(39069),n(52807),n(25923),n(90551),n(28227),n(40401)),x=n(48178)},87901:(t,e,n)=>{n.d(e,{i:()=>h});var r=n(12057),o=n(74788),i=n(42600),s=n(48178),a=n(29856),l=n(43190),c=n(88002),d=n(46782),u=n(39761);let h=(()=>{class t extends a.y{constructor(t,{nativeElement:e},n){const r=(0,i.mLY)(e,"mousedown").pipe((0,i.mp3)(),(0,l.w)((t=>{const r=(0,i.mLY)(n,"mousemove").pipe((0,c.U)((({clientX:t,clientY:n})=>(0,s.Ws)(t,n,e))),(0,d.R)((0,i.mLY)(n,"mouseup")));return t.target===e?r.pipe((0,u.O)((0,s.Ws)(t.clientX,t.clientY,e))):r})),(0,d.R)(t));super((t=>r.subscribe(t)))}}return t.ɵfac=function(e){return new(e||t)(o.LFG(i.a31,2),o.LFG(o.SBq),o.LFG(r.K0))},t.ɵprov=o.Yz7({token:t,factory:t.ɵfac}),t})()},40401:(t,e,n)=>{n.d(e,{Y1:()=>T,F4:()=>i,bG:()=>_,ZW:()=>S,zc:()=>m,dR:()=>f,Mr:()=>w,dj:()=>b,F1:()=>h,Wf:()=>o,UN:()=>x,b$:()=>y,mJ:()=>c,$i:()=>v,rf:()=>k,bK:()=>p,p7:()=>A,Uv:()=>d});var r=n(74788);const o=new r.OlP("[TUI_EDITOR_EXTENSIONS]"),i=new r.OlP("[LAZY_EDITOR_EXTENSIONS]");var s=n(42600),a=n(69725);const l={translate:"no",appearence:"textfield",spellcheck:!1,enableDefaultStyles:!0,colors:a.sw,blankColor:a.hK,linkOptions:a.pL,fontOptions:a.RR,icons:{undo:"tuiIconUndoLarge",redo:"tuiIconRedoLarge",quote:"tuiIconQuoteLarge",link:"tuiIconLinkLarge",anchor:"tuiIconAnchorLarge",attach:"tuiIconPaperclipLarge",sub:"tuiIconSubscriptLarge",sup:"tuiIconSuperscriptLarge",tex:"tuiIconTeXLarge",image:"tuiIconImageLarge",hr:"tuiIconHrLarge",clear:"tuiIconClearFormatLarge",groupAdd:"tuiIconPlusLarge",groupRemove:"tuiIconCloseLarge",detailsAdd:"tuiIconSpoilerLarge",detailsRemove:"tuiIconSpoilerDeleteLarge",popupLinkSave:"tuiIconCheckCircleLarge",popupLinkRemove:"tuiIconCloseLarge",popupPreviewLinkEdit:"tuiIconEdit2Large",popupPreviewLinkClear:"tuiIconUnlinkLarge",paint:"tuiIconPaintLarge",textAlignPreview:"tuiIconAlignLeftLarge",textAlignLeft:"tuiIconAlignLeftLarge",textAlignCenter:"tuiIconAlignCenterLarge",textAlignRight:"tuiIconAlignRightLarge",textAlignJustify:"tuiIconAlignJustifyLarge",textColor:"tuiIconColorLarge",textHilite:"tuiIconHiliteLarge",listPreview:"tuiIconListLarge",listUnOrdered:"tuiIconListLarge",listOrdered:"tuiIconOLLarge",taskList:"tuiIconCheckSquare",indent:"tuiIconIndentLarge",outdent:"tuiIconOutdentLarge",fontSize:"tuiIconFontLarge",insertTable:"tuiIconTableLarge",addRowTable:"tuiIconAddRowLarge",code:"tuiIconCodeLarge",fontStylePreview:"tuiIconFormatLarge",fontStyleBold:"tuiIconBoldLarge",fontStyleItalic:"tuiIconItalicLarge",fontStyleUnderline:"tuiIconUnderlineLarge",fontStyleStrike:"tuiIconStrikeThroughLarge",colorSelectorDropdownChevron:"tuiIconChevronDown",colorSelectorDropdownCheck:"tuiIconCheck"}},c=(0,s.jHx)(l);function d(t){return(0,s.vKU)(c,t,l)}var u=n(54487);const h=new r.OlP("[TUI_EDITOR_CONTENT_PROCESSOR]",{factory:()=>u.y}),p=new r.OlP("[TUI_EDITOR_VALUE_TRANSFORMER]"),f=new r.OlP("[TUI_ATTACH_FILES_OPTIONS]",{factory:()=>({accept:"*/*",multiple:!0})}),m=new r.OlP("[TUI_ATTACH_FILES_LOADER]");var g=n(19633);const b=new r.OlP("[TUI_EDITOR_COLOR_SELECTOR_MODE_NAMES]",{factory:()=>["Solid color","Gradient"]}),k=new r.OlP("[TUI_EDITOR_TOOLBAR_TEXTS]",{factory:(0,g.vv)("toolbarTools")}),v=new r.OlP("[TUI_EDITOR_TABLE_COMMANDS]",{factory:(0,g.vv)("editorTableCommands")}),y=new r.OlP("[TUI_EDITOR_LINK_TEXTS]",{factory:(0,g.vv)("editorEditLink")}),w=new r.OlP("[TUI_EDITOR_CODE_OPTIONS]",{factory:(0,g.vv)("editorCodeOptions")}),x=new r.OlP("[TUI_EDITOR_FONT_OPTIONS]",{factory:(0,g.vv)("editorFontOptions")});var C=n(88002);const A=new r.OlP("[TUI_IMAGE_LOADER]",{factory:()=>t=>{const e=new FileReader;return e.readAsDataURL(t),(0,s.mLY)(e,"load").pipe((0,C.U)((()=>String(e.result))))}});var M=n(74235);const S=new r.OlP("[TIPTAP_EDITOR]"),_=new r.OlP("[LAZY_TIPTAP_EDITOR]",{factory:()=>{const t=new M.t(1);return Promise.resolve().then(n.bind(n,11046)).then((e=>t.next(e.Editor))),t}}),T=new r.OlP("[INITIALIZATION_TIPTAP_CONTAINER]")},48178:(t,e,n)=>{function r(t,e,n){const r=t.selection.$anchor;for(let o=r.depth;o>0;o--)if(r.node(o).type.name===n)return e&&e(t.tr.delete(r.before(o),r.after(o)).scrollIntoView()),!0;return!1}n.d(e,{yU:()=>r,Ws:()=>i,U5:()=>s,Yz:()=>l,YX:()=>d,Ap:()=>h,Q4:()=>p,nC:()=>C,Er:()=>b,_N:()=>y,x6:()=>w,jx:()=>x,CH:()=>A});var o=n(42600);function i(t,e,n){const{left:r,top:i,width:s,height:a}=n.getBoundingClientRect();return[(0,o.Kiv)(t-r,0,s)/s,(0,o.Kiv)(e-i,0,a)/a]}function s(t){return t.slice(0,Math.max(0,t.length-1)).replace("linear-gradient(","")}function a(t,e,n={}){return t.find((({attrs:t,type:r})=>r===e&&function(t,e){const n=Object.keys(e);return!n.length||!!n.filter((n=>e[n]===t[n])).length}(t,n)))||null}function l(t,e,n={}){if(!t||!e)return null;const{node:r,offset:o}=t.parent.childAfter(t.parentOffset);if(!r)return null;const i=a(r.marks,e,n);if(!i)return null;let s=t.index(),l=t.start()+o,c=s+1,d=l+r.nodeSize;for(a(r.marks,e,n);s>0&&i.isInSet(t.parent.child(s-1).marks);)s-=1,l-=t.parent.child(s).nodeSize;for(;c{t instanceof c.NB&&e.push([t.type.name,t.attrs])})),e}var u=n(11046);function h(t,e){const n=null!=e?e:t.selection.$head.parent.textContent,r=t.doc.cut(t.selection.from,t.selection.to);return r.content.size?(0,u.getHTMLFromFragment)(r.content,t.schema):n}function p(t){var e,n,r;if(!t)return{before:"",after:""};const{$from:o,$to:i}=t.state.selection;let s=null===(e=o.nodeBefore)||void 0===e?void 0:e.textContent;return s=((null==s?void 0:s.slice((null!==(n=(null==s?void 0:s.lastIndexOf(" "))||(null==s?void 0:s.lastIndexOf("\n")))&&void 0!==n?n:0)+1))||"").trim(),{before:s,after:(null===(r=i.nodeAfter)||void 0===r?void 0:r.textContent.trim())||""}}function f(t){Array.from(t.children).forEach((t=>{if(t.children.length&&f(t),"FONT"===t.tagName)if(t.hasAttribute("size"))switch(t.getAttribute("size")){case"6":m("h1",t);break;case"5":m("h2",t);break;case"4":g("17px",t);break;case"3":g("15px",t);break;case"2":g("13px",t)}else t.hasAttribute("color")&&function(t){var e;const n=document.createElement("span");n.setAttribute("style",`color: ${t.getAttribute("color")}`),n.innerHTML=t.innerHTML,null===(e=t.parentElement)||void 0===e||e.replaceChild(n,t)}(t)}))}function m(t,e){var n,r,o,i,s,a,l,c,d;const u=document.createElement(t);if(u.innerHTML=e.innerHTML,"P"===(null===(n=e.parentElement)||void 0===n?void 0:n.tagName)){const t=null===(o=null===(r=e.parentElement)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.insertBefore(u,e.parentElement);null===(i=e.parentElement)||void 0===i||i.removeChild(e),(null==t?void 0:t.nextSibling)&&!(null===(a=null===(s=null==t?void 0:t.nextSibling)||void 0===s?void 0:s.textContent)||void 0===a?void 0:a.trim())&&(null===(c=null===(l=t.nextSibling)||void 0===l?void 0:l.parentElement)||void 0===c||c.removeChild(t.nextSibling))}else null===(d=e.parentElement)||void 0===d||d.replaceChild(u,e)}function g(t,e){var n;const r=document.createElement("p"),o=document.createElement("span");o.setAttribute("style",`font-size: ${t}`),o.innerHTML=e.innerHTML,r.append(o),null===(n=e.parentElement)||void 0===n||n.replaceChild("P"===e.parentElement.tagName?o:r,e)}function b(t){const e=(new DOMParser).parseFromString(t,"text/html");return f(e.body),e.body.innerHTML}const k=["\\s*(","(?:","#(?:[a-f0-9]{6}|[a-f0-9]{3})","|","(?:rgb|hsl)","\\(\\s*(?:\\d{1,3}\\s*,\\s*){2}\\d{1,3}\\s*\\)","|","(?:rgba|hsla)","\\(\\s*(?:\\d{1,3}\\s*,\\s*){2}\\d{1,3}\\s*,\\s*\\d*\\.?\\d+\\)","|","[_a-z-][_a-z0-9-]*",")",")","(?:\\s+","(","(?:[+-]?\\d*\\.?\\d+)(?:%|[a-z]+)?","))?","(?:","\\s*,\\s*","\\s*)?"];function v(t,e){const n=1===e?"100%":`${e}%`;return(null==t?void 0:t.includes("%"))?t:n}function y(t){const e=new RegExp(k.join(""),"gi"),n=t.startsWith("to")||t.match(/^\d/)?t.slice(Math.max(0,t.indexOf(",")+1)).trim():t,r=t.startsWith("to")?t.split(",")[0]:"to bottom";let o=[],i=e.exec(n);for(;null!==i;)o=o.concat({color:i[1],position:v(i[2],o.length)}),i=e.exec(n);return o=o.filter((({color:t})=>t.startsWith("#")||t.startsWith("rgb"))),{stops:o,side:r}}function w(t){return t.reduce(((t,e)=>(t[e]={parseHTML:t=>null==t?void 0:t.getAttribute(`${e}`)},t)),{})}function x(t){return t.split(";").reduce(((t,e)=>{var n;const[r,o]=null!==(n=e.split(":"))&&void 0!==n?n:[];return r&&o&&(t[r.trim()]=o.trim()),t}),{})}function C(t){var e;const n=(null===(e=t.endContainer.nodeValue)||void 0===e?void 0:e.length)||0;return t.endOffset-t.startOffset>0||t.endOffset-t.startOffset==0&&1===n||0!==t.startOffset&&n>1&&t.endOffset!==n}function A({stops:t,side:e}){return`linear-gradient(${e}, ${t.map((({color:t,position:e})=>`rgba(${(0,o.MpC)(t).join(", ")}) ${e}`)).join(", ")})`}},11046:(t,e,n)=>{n.r(e),n.d(e,{CommandManager:()=>N,Editor:()=>ge,Extension:()=>ct,InputRule:()=>Q,Mark:()=>xe,Node:()=>Ce,NodeView:()=>Ae,PasteRule:()=>nt,Tracker:()=>Ee,callOrReturn:()=>$,combineTransactionSteps:()=>Dt,createChainableState:()=>D,createDocument:()=>Ot,createNodeFromContent:()=>Ct,createStyleTag:()=>me,defaultBlockAt:()=>Nt,deleteProps:()=>Tt,elementFromString:()=>xt,escapeForRegEx:()=>Se,extensions:()=>fe,findChildren:()=>Lt,findChildrenInRange:()=>It,findDuplicates:()=>it,findParentNode:()=>zt,findParentNodeClosestToPos:()=>Rt,fromString:()=>J,generateHTML:()=>qt,generateJSON:()=>Bt,generateText:()=>Ft,getAttributes:()=>jt,getAttributesFromExtensions:()=>z,getChangedRanges:()=>Ut,getDebugJSON:()=>Vt,getExtensionField:()=>I,getHTMLFromFragment:()=>Pt,getMarkAttributes:()=>Et,getMarkRange:()=>gt,getMarkType:()=>bt,getMarksBetween:()=>Yt,getNodeAtPosition:()=>Wt,getNodeAttributes:()=>Jt,getNodeType:()=>P,getRenderedAttributes:()=>q,getSchema:()=>Ht,getSchemaByResolvedExtensions:()=>U,getSchemaTypeByName:()=>V,getSchemaTypeNameByName:()=>_t,getSplittedAttributes:()=>Gt,getText:()=>$t,getTextBetween:()=>dt,getTextContentFromNodes:()=>W,getTextSerializersFromSchema:()=>ut,injectExtensionAttributesToParseRule:()=>j,inputRulesPlugin:()=>tt,isActive:()=>Kt,isAtEndOfNode:()=>Xt,isAtStartOfNode:()=>te,isEmptyObject:()=>F,isExtensionRulesEnabled:()=>Y,isFunction:()=>B,isList:()=>ee,isMacOS:()=>Mt,isMarkActive:()=>Qt,isNodeActive:()=>St,isNodeEmpty:()=>ne,isNodeSelection:()=>re,isNumber:()=>et,isPlainObject:()=>at,isRegExp:()=>G,isString:()=>_e,isTextSelection:()=>kt,isiOS:()=>wt,markInputRule:()=>be,markPasteRule:()=>Me,mergeAttributes:()=>H,mergeDeep:()=>lt,minMax:()=>vt,nodeInputRule:()=>ke,nodePasteRule:()=>Te,objectIncludes:()=>pt,pasteRulesPlugin:()=>ot,posToDOMRect:()=>oe,removeDuplicates:()=>Zt,resolveFocusPosition:()=>yt,selectionToInsertionEnd:()=>At,splitExtensions:()=>R,textInputRule:()=>ye,textPasteRule:()=>Oe,textblockTypeInputRule:()=>ve,wrappingInputRule:()=>we});var r=n(62463),o=n(43594),i=n(31690),s=n(27439),a=n(38480);const l=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0),c=(t,e,n)=>{let o=function(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}(t,n);if(!o)return!1;let i=h(o);if(!i){let n=o.blockRange(),r=n&&(0,a.k9)(n);return null!=r&&(e&&e(t.tr.lift(n,r).scrollIntoView()),!0)}let l=i.nodeBefore;if(!l.type.spec.isolating&&w(t,i,e))return!0;if(0==o.parent.content.size&&(d(l,"end")||r.qv.isSelectable(l))){let n=(0,a.dR)(t.doc,o.before(),o.after(),s.p2.empty);if(n&&n.slice.size{let{$head:o,empty:i}=t.selection,s=o;if(!i)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):o.parentOffset>0)return!1;s=h(o)}let a=s&&s.nodeBefore;return!(!a||!r.qv.isSelectable(a)||(e&&e(t.tr.setSelection(r.qv.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),0))};function h(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}const p=(t,e,n)=>{let o=function(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let{$head:o,empty:i}=t.selection,s=o;if(!i)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):o.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(e&&e(t.tr.insertText("\n").scrollIntoView()),0))};function b(t){for(let e=0;e{let{$head:n,$anchor:o}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(o))return!1;let i=n.node(-1),s=n.indexAfter(-1),a=b(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,a))return!1;if(e){let o=n.after(),i=t.tr.replaceWith(o,o,a.createAndFill());i.setSelection(r.Y1.near(i.doc.resolve(o),1)),e(i.scrollIntoView())}return!0},v=(t,e)=>{let n=t.selection,{$from:o,$to:i}=n;if(n instanceof r.C1||o.parent.inlineContent||i.parent.inlineContent)return!1;let s=b(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let n=(!o.parentOffset&&i.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if((0,a.Ax)(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&(0,a.k9)(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function w(t,e,n){let o,i,l=e.nodeBefore,c=e.nodeAfter;if(l.type.spec.isolating||c.type.spec.isolating)return!1;if(function(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(i,i+1)||!o.isTextblock&&!(0,a.Mn)(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let u=e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(i=l.contentMatchAt(l.childCount)).findWrapping(c.type))&&i.matchType(o[0]||c.type).validEnd){if(n){let r=e.pos+c.nodeSize,i=s.HY.empty;for(let t=o.length-1;t>=0;t--)i=s.HY.from(o[t].create(null,i));i=s.HY.from(l.copy(i));let d=t.tr.step(new a.FC(e.pos-1,r,e.pos,r,new s.p2(i,1,0),o.length,!0)),u=r+2*o.length;(0,a.Mn)(d.doc,u)&&d.join(u),n(d.scrollIntoView())}return!0}let h=r.Y1.findFrom(e,1),p=h&&h.$from.blockRange(h.$to),f=p&&(0,a.k9)(p);if(null!=f&&f>=e.depth)return n&&n(t.tr.lift(p,f).scrollIntoView()),!0;if(u&&d(c,"start",!0)&&d(l,"end")){let r=l,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let i=c,d=1;for(;!i.isTextblock;i=i.firstChild)d++;if(r.canReplace(r.childCount,r.childCount,i.content)){if(n){let r=s.HY.empty;for(let t=o.length-1;t>=0;t--)r=s.HY.from(o[t].copy(r));n(t.tr.step(new a.FC(e.pos-o.length,e.pos+c.nodeSize,e.pos+d,e.pos+c.nodeSize-d,new s.p2(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function x(t){return function(e,n){let o=e.selection,i=t<0?o.$from:o.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(n&&n(e.tr.setSelection(r.Bs.create(e.doc,t<0?i.start(s):i.end(s)))),!0)}}const C=x(-1),A=x(1);function M(t,e=null){return function(n,r){let o=!1;for(let r=0;r{if(o)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)o=!0;else{let e=n.doc.resolve(i),r=e.index();o=e.parent.canReplaceWith(r,r+1,t)}}))}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r{let{$from:n,$to:o}=t.selection;if(t.selection instanceof r.qv&&t.selection.node.isBlock)return!(!n.parentOffset||!(0,a.Ax)(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){let i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof r.Bs||t.selection instanceof r.C1)&&s.deleteSelection();let l=0==n.depth?null:b(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=i&&l?[{type:l}]:void 0,d=(0,a.Ax)(s.doc,s.mapping.map(n.pos),1,c);if(c||d||!(0,a.Ax)(s.doc,s.mapping.map(n.pos),1,l?[{type:l}]:void 0)||(l&&(c=[{type:l}]),d=!0),d&&(s.split(s.mapping.map(n.pos),1,c),!i&&!n.parentOffset&&n.parent.type!=l)){let t=s.mapping.map(n.before()),e=s.doc.resolve(t);l&&n.node(-1).canReplaceWith(e.index(),e.index()+1,l)&&s.setNodeMarkup(s.mapping.map(n.before()),l)}e(s.scrollIntoView())}return!0})),"Mod-Enter":k,Backspace:_,"Mod-Backspace":_,"Shift-Backspace":_,Delete:T,"Mod-Delete":T,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new r.C1(t.doc))),!0)},E={"Ctrl-h":O.Backspace,"Alt-Backspace":O["Mod-Backspace"],"Ctrl-d":O.Delete,"Ctrl-Alt-Backspace":O["Mod-Delete"],"Alt-Delete":O["Mod-Delete"],"Alt-d":O["Mod-Delete"],"Ctrl-a":C,"Ctrl-e":A};for(let t in O)E[t]=O[t];function D(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class N{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(...t)=>{const n=e(...t)(i);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!t,l=t||o.tr,c={...Object.fromEntries(Object.entries(n).map((([t,n])=>[t,(...t)=>{const r=this.buildProps(l,e),o=n(...t)(r);return s.push(o),c}]))),run:()=>(a||!e||l.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(l),s.every((t=>!0===t)))};return c}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)({...i,dispatch:void 0})]))),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:D({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map((([t,e])=>[t,(...t)=>e(...t)(s)])))}};return s}}class L{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function I(t,e,n){return void 0===t.config[e]&&t.parent?I(t.parent,e,n):"function"==typeof t.config[e]?t.config[e].bind({...n,parent:t.parent?I(t.parent,e,n):null}):t.config[e]}function R(t){return{baseExtensions:t.filter((t=>"extension"===t.type)),nodeExtensions:t.filter((t=>"node"===t.type)),markExtensions:t.filter((t=>"mark"===t.type))}}function z(t){const e=[],{nodeExtensions:n,markExtensions:r}=R(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach((t=>{const n=I(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage});n&&n().forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,r])=>{e.push({type:n,name:t,attribute:{...i,...r}})}))}))}))})),o.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},r=I(t,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...i,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&void 0===(null==o?void 0:o.default)&&delete o.default,e.push({type:t.name,name:n,attribute:o})}))})),e}function P(t,e){if("string"==typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function H(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n={...t};return Object.entries(e).forEach((([t,e])=>{if(n[t])if("class"===t){const r=e?e.split(" "):[],o=n[t]?n[t].split(" "):[],i=r.filter((t=>!o.includes(t)));n[t]=[...o,...i].join(" ")}else n[t]="style"===t?[n[t],e].join("; "):e;else n[t]=e})),n}),{})}function q(t,e){return e.filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>H(t,e)),{})}function B(t){return"function"==typeof t}function $(t,e=void 0,...n){return B(t)?e?t.bind(e)(...n):t(...n):t}function F(t={}){return 0===Object.keys(t).length&&t.constructor===Object}function J(t){return"string"!=typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}function j(t,e){return t.style?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const o=e.reduce(((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n):J(n.getAttribute(e.name));return null==r?t:{...t,[e.name]:r}}),{});return{...r,...o}}}}function Z(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!F(e))&&null!=e)))}function U(t,e){var n;const r=z(t),{nodeExtensions:o,markExtensions:i}=R(t),a=null===(n=o.find((t=>I(t,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(o.map((n=>{const o=r.filter((t=>t.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:e},s=Z({...t.reduce(((t,e)=>{const r=I(e,"extendNodeSchema",i);return{...t,...r?r(n):{}}}),{}),content:$(I(n,"content",i)),marks:$(I(n,"marks",i)),group:$(I(n,"group",i)),inline:$(I(n,"inline",i)),atom:$(I(n,"atom",i)),selectable:$(I(n,"selectable",i)),draggable:$(I(n,"draggable",i)),code:$(I(n,"code",i)),defining:$(I(n,"defining",i)),isolating:$(I(n,"isolating",i)),attrs:Object.fromEntries(o.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=$(I(n,"parseHTML",i));a&&(s.parseDOM=a.map((t=>j(t,o))));const l=I(n,"renderHTML",i);l&&(s.toDOM=t=>l({node:t,HTMLAttributes:q(t,o)}));const c=I(n,"renderText",i);return c&&(s.toText=c),[n.name,s]}))),c=Object.fromEntries(i.map((n=>{const o=r.filter((t=>t.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:e},s=Z({...t.reduce(((t,e)=>{const r=I(e,"extendMarkSchema",i);return{...t,...r?r(n):{}}}),{}),inclusive:$(I(n,"inclusive",i)),excludes:$(I(n,"excludes",i)),group:$(I(n,"group",i)),spanning:$(I(n,"spanning",i)),code:$(I(n,"code",i)),attrs:Object.fromEntries(o.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=$(I(n,"parseHTML",i));a&&(s.parseDOM=a.map((t=>j(t,o))));const l=I(n,"renderHTML",i);return l&&(s.toDOM=t=>l({mark:t,HTMLAttributes:q(t,o)})),[n.name,s]})));return new s.V_({topNode:a,nodes:l,marks:c})}function V(t,e){return e.nodes[t]||e.marks[t]||null}function Y(t,e){return Array.isArray(e)?e.some((e=>("string"==typeof e?e:e.name)===t.name)):e}const W=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,((t,e,o,i)=>{var s,a;const l=(null===(a=(s=t.type.spec).toText)||void 0===a?void 0:a.call(s,{node:t,pos:e,parent:o,index:i}))||t.textContent||"%leaf%";n+=l.slice(0,Math.max(0,r-e))})),n};function G(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class Q{constructor(t){this.find=t.find,this.handler=t.handler}}const K=(t,e)=>{if(G(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function X(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find((t=>t.type.spec.code))))return!1;let d=!1;const u=W(c)+i;return s.forEach((t=>{if(d)return;const e=K(u,t.find);if(!e)return;const s=l.state.tr,c=D({state:l.state,transaction:s}),h={from:r-(e[0].length-i.length),to:o},{commands:p,chain:f,can:m}=new N({editor:n,state:c});null!==t.handler({state:c,range:h,match:e,commands:p,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:o,text:i}),l.dispatch(s),d=!0)})),d}function tt(t){const{editor:e,rules:n}=t,o=new r.Sy({state:{init:()=>null,apply:(t,e)=>t.getMeta(o)||(t.selectionSet||t.docChanged?null:e)},props:{handleTextInput:(t,r,i,s)=>X({editor:e,from:r,to:i,text:s,rules:n,plugin:o}),handleDOMEvents:{compositionend:t=>(setTimeout((()=>{const{$cursor:r}=t.state.selection;r&&X({editor:e,from:r.pos,to:r.pos,text:"",rules:n,plugin:o})})),!1)},handleKeyDown(t,r){if("Enter"!==r.key)return!1;const{$cursor:i}=t.state.selection;return!!i&&X({editor:e,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:o})}},isInputRules:!0});return o}function et(t){return"number"==typeof t}class nt{constructor(t){this.find=t.find,this.handler=t.handler}}const rt=(t,e)=>{if(G(e))return[...t.matchAll(e)];const n=e(t);return n?n.map((e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n})):[]};function ot(t){const{editor:e,rules:n}=t;let o=null,i=!1,s=!1,a=new ClipboardEvent("paste"),l=new DragEvent("drop");const c=n.map((t=>new r.Sy({view(t){const e=e=>{var n;o=(null===(n=t.dom.parentElement)||void 0===n?void 0:n.contains(e.target))?t.dom.parentElement:null};return window.addEventListener("dragstart",e),{destroy(){window.removeEventListener("dragstart",e)}}},props:{handleDOMEvents:{drop:(t,e)=>(s=o===t.dom.parentElement,l=e,!1),paste:(t,e)=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return a=e,i=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,o)=>{const c=n[0],d="paste"===c.getMeta("uiEvent")&&!i,u="drop"===c.getMeta("uiEvent")&&!s;if(!d&&!u)return;const h=r.doc.content.findDiffStart(o.doc.content),p=r.doc.content.findDiffEnd(o.doc.content);if(!et(h)||!p||h===p.b)return;const f=o.tr,m=D({state:o,transaction:f}),g=function(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:d}=new N({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,((t,e)=>{if(!t.isTextblock||t.type.spec.code)return;const h=Math.max(r,e),p=Math.min(o,e+t.content.size),f=t.textBetween(h-e,p-e,void 0,"");rt(f,i.find).forEach((t=>{if(void 0===t.index)return;const e=h+t.index+1,r=e+t[0].length,o={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},p=i.handler({state:n,range:o,match:t,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});u.push(p)}))})),u.every((t=>null!==t))}({editor:e,state:m,from:Math.max(h-1,0),to:p.b-1,rule:t,pasteEvent:a,dropEvent:l});return g&&f.steps.length?(l=new DragEvent("drop"),a=new ClipboardEvent("paste"),f):void 0}})));return c}function it(t){const e=t.filter(((e,n)=>t.indexOf(e)!==n));return[...new Set(e)]}class st{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=st.resolve(t),this.schema=U(this.extensions,e),this.extensions.forEach((t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:V(t.name,this.schema)};"mark"===t.type&&(null===(e=$(I(t,"keepOnSplit",n)))||void 0===e||e)&&this.splittableMarks.push(t.name);const r=I(t,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const o=I(t,"onCreate",n);o&&this.editor.on("create",o);const i=I(t,"onUpdate",n);i&&this.editor.on("update",i);const s=I(t,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=I(t,"onTransaction",n);a&&this.editor.on("transaction",a);const l=I(t,"onFocus",n);l&&this.editor.on("focus",l);const c=I(t,"onBlur",n);c&&this.editor.on("blur",c);const d=I(t,"onDestroy",n);d&&this.editor.on("destroy",d)}))}static resolve(t){const e=st.sort(st.flatten(t)),n=it(e.map((t=>t.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((t=>`'${t}'`)).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map((t=>{const e=I(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...this.flatten(e())]:t})).flat(10)}static sort(t){return t.sort(((t,e)=>{const n=I(t,"priority")||100,r=I(e,"priority")||100;return n>r?-1:n{const n=I(e,"addCommands",{name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:V(e.name,this.schema)});return n?{...t,...n()}:t}),{})}get plugins(){const{editor:t}=this,e=st.sort([...this.extensions].reverse()),n=[],r=[],o=e.map((e=>{const o={name:e.name,options:e.options,storage:e.storage,editor:t,type:V(e.name,this.schema)},s=[],a=I(e,"addKeyboardShortcuts",o);let l={};if("mark"===e.type&&e.config.exitable&&(l.ArrowRight=()=>xe.handleExit({editor:t,mark:e})),a){const e=Object.fromEntries(Object.entries(a()).map((([e,n])=>[e,()=>n({editor:t})])));l={...l,...e}}const c=(0,i.h)(l);s.push(c);const d=I(e,"addInputRules",o);Y(e,t.options.enableInputRules)&&d&&n.push(...d());const u=I(e,"addPasteRules",o);Y(e,t.options.enablePasteRules)&&u&&r.push(...u());const h=I(e,"addProseMirrorPlugins",o);if(h){const t=h();s.push(...t)}return s})).flat();return[tt({editor:t,rules:n}),...ot({editor:t,rules:r}),...o]}get attributes(){return z(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=R(this.extensions);return Object.fromEntries(e.filter((t=>!!I(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,storage:e.storage,editor:t,type:P(e.name,this.schema)},o=I(e,"addNodeView",r);return o?[e.name,(r,i,s,a)=>{const l=q(r,n);return o()({editor:t,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:e})}]:[]})))}}function at(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function lt(t,e){const n={...t};return at(t)&&at(e)&&Object.keys(e).forEach((r=>{at(e[r])?r in t?n[r]=lt(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}class ct{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=$(I(this,"addOptions",{name:this.name}))),this.storage=$(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ct(t)}configure(t={}){const e=this.extend();return e.options=lt(this.options,t),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new ct(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=$(I(e,"addOptions",{name:e.name})),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}}function dt(t,e,n){const{from:r,to:o}=e,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return t.nodesBetween(r,o,((t,n,c,d)=>{var u;const h=null==s?void 0:s[t.type.name];h?(t.isBlock&&!l&&(a+=i,l=!0),c&&(a+=h({node:t,pos:n,parent:c,index:d,range:e}))):t.isText?(a+=null===(u=null==t?void 0:t.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n),l=!1):t.isBlock&&!l&&(a+=i,l=!0)})),a}function ut(t){return Object.fromEntries(Object.entries(t.nodes).filter((([,t])=>t.spec.toText)).map((([t,e])=>[t,e.spec.toText])))}const ht=ct.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o;return dt(r,{from:Math.min(...i.map((t=>t.$from.pos))),to:Math.max(...i.map((t=>t.$to.pos)))},{textSerializers:ut(n)})}}})]}});function pt(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every((r=>n.strict?e[r]===t[r]:G(e[r])?e[r].test(t[r]):e[r]===t[r]))}function ft(t,e,n={}){return t.find((t=>t.type===e&&pt(t.attrs,n)))}function mt(t,e,n={}){return!!ft(t,e,n)}function gt(t,e,n={}){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if(t.parentOffset===r.offset&&0!==r.offset&&(r=t.parent.childBefore(t.parentOffset)),!r.node)return;const o=ft([...r.node.marks],e,n);if(!o)return;let i=r.index,s=t.start()+r.offset,a=i+1,l=s+r.node.nodeSize;for(ft([...r.node.marks],e,n);i>0&&o.isInSet(t.parent.child(i-1).marks);)i-=1,s-=t.parent.child(i).nodeSize;for(;a${t}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function Ct(t,e,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof t&&null!==t)try{return Array.isArray(t)&&t.length>0?s.HY.fromArray(t.map((t=>e.nodeFromJSON(t)))):e.nodeFromJSON(t)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),Ct("",e,n)}if("string"==typeof t){const r=s.aw.fromSchema(e);return n.slice?r.parseSlice(xt(t),n.parseOptions).content:r.parse(xt(t),n.parseOptions)}return Ct("",e,n)}function At(t,e,n){const o=t.steps.length-1;if(o{0===l&&(l=r)})),t.setSelection(r.Y1.near(t.doc.resolve(l),n))}function Mt(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function St(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?P(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,((t,e)=>{if(t.isText)return;const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);a.push({node:t,from:n,to:i})}));const l=o-r,c=a.filter((t=>!s||s.name===t.node.type.name)).filter((t=>pt(t.node.attrs,n,{strict:!1})));return i?!!c.length:c.reduce(((t,e)=>t+e.to-e.from),0)>=l}function _t(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Tt(t,e){const n="string"==typeof e?[e]:e;return Object.keys(t).reduce(((e,r)=>(n.includes(r)||(e[r]=t[r]),e)),{})}function Ot(t,e,n={}){return Ct(t,e,{slice:!1,parseOptions:n})}function Et(t,e){const n=bt(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,(t=>{s.push(...t.marks)}));const a=s.find((t=>t.type.name===n.name));return a?{...a.attrs}:{}}function Dt(t,e){const n=new a.wx(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}function Nt(t){for(let e=0;e{e(t)&&n.push({node:t,pos:r})})),n}function It(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}function Rt(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function zt(t){return e=>Rt(e.$from,t)}function Pt(t,e){const n=s.PW.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function Ht(t,e){return U(st.resolve(t),e)}function qt(t,e){const n=Ht(e);return Pt(s.NB.fromJSON(n,t).content,n)}function Bt(t,e){const n=Ht(e),r=xt(t);return s.aw.fromSchema(n).parse(r).toJSON()}function $t(t,e){return dt(t,{from:0,to:t.content.size},e)}function Ft(t,e,n){const{blockSeparator:r="\n\n",textSerializers:o={}}=n||{},i=Ht(e);return $t(s.NB.fromJSON(i,t),{blockSeparator:r,textSerializers:{...ut(i),...o}})}function Jt(t,e){const n=P(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,(t=>{i.push(t)}));const s=i.reverse().find((t=>t.type.name===n.name));return s?{...s.attrs}:{}}function jt(t,e){const n=_t("string"==typeof e?e:e.name,t.schema);return"node"===n?Jt(t,e):"mark"===n?Et(t,e):{}}function Zt(t,e=JSON.stringify){const n={};return t.filter((t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}function Ut(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(o).map(t,-1),s=e.slice(o).map(n),a=e.invert().map(i,-1),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),function(t){const e=Zt(t);return 1===e.length?e:e.filter(((t,n)=>!e.filter(((t,e)=>e!==n)).some((e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))))}(r)}function Vt(t,e=0){const n=t.type===t.type.schema.topNodeType?0:1,r=e,o=r+t.nodeSize,i=t.marks.map((t=>{const e={type:t.type.name};return Object.keys(t.attrs).length&&(e.attrs={...t.attrs}),e})),s={...t.attrs},a={type:t.type.name,from:r,to:o};return Object.keys(s).length&&(a.attrs=s),i.length&&(a.marks=i),t.content.childCount&&(a.content=[],t.forEach(((t,r)=>{var o;null===(o=a.content)||void 0===o||o.push(Vt(t,e+r+n))}))),t.text&&(a.text=t.text),a}function Yt(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach((e=>{const o=gt(n.resolve(t-1),e.type);o&&r.push({mark:e,...o})})):n.nodesBetween(t,e,((t,e)=>{r.push(...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n}))))})),r}const Wt=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let i=r,s=null;for(;i>0&&null===s;){const t=o.node(i);(null==t?void 0:t.type.name)===e?s=t:i-=1}return[s,i]};function Gt(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=t.find((t=>t.type===e&&t.name===n));return!!r&&r.attribute.keepOnSplit})))}function Qt(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?bt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!i||i.name===t.type.name)).find((t=>pt(t.attrs,n,{strict:!1})));let s=0;const a=[];if(o.forEach((({$from:e,$to:n})=>{const r=e.pos,o=n.pos;t.doc.nodesBetween(r,o,((t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);s+=i-n,a.push(...t.marks.map((t=>({mark:t,from:n,to:i}))))}))})),0===s)return!1;const l=a.filter((t=>!i||i.name===t.mark.type.name)).filter((t=>pt(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+e.to-e.from),0),c=a.filter((t=>!i||t.mark.type!==i&&t.mark.type.excludes(i))).reduce(((t,e)=>t+e.to-e.from),0);return(l>0?l+c:l)>=s}function Kt(t,e,n={}){if(!e)return St(t,null,n)||Qt(t,null,n);const r=_t(e,t.schema);return"node"===r?St(t,e,n):"mark"===r&&Qt(t,e,n)}const Xt=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const n=zt((t=>t.type.name===e))(t.selection);if(!n)return!1;const r=t.doc.resolve(n.pos+1);return o.pos+1===r.end()}return!(r.parentOffset{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function ee(t,e){const{nodeExtensions:n}=R(e),r=n.find((e=>e.name===t));if(!r)return!1;const o=$(I(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function ne(t){var e;const n=null===(e=t.type.createAndFill())||void 0===e?void 0:e.toJSON(),r=t.toJSON();return JSON.stringify(n)===JSON.stringify(r)}function re(t){return t instanceof r.qv}function oe(t,e,n){const r=t.state.doc.content.size,o=vt(e,0,r),i=vt(n,0,r),s=t.coordsAtPos(o),a=t.coordsAtPos(i,-1),l=Math.min(s.top,a.top),c=Math.max(s.bottom,a.bottom),d=Math.min(s.left,a.left),u=Math.max(s.right,a.right),h={top:l,bottom:c,left:d,right:u,width:u-d,height:c-l,x:d,y:l};return{...h,toJSON:()=>h}}function ie(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter((t=>null==e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(r)}}const se=(t,e)=>{const n=zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!(0,a.Mn)(t.doc,n.pos)||(t.join(n.pos),!0)},ae=(t,e)=>{const n=zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!(0,a.Mn)(t.doc,r)||(t.join(r),!0)};var le=Object.freeze({__proto__:null,blur:()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{var n;t.isDestroyed||(e.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(t=!1)=>({commands:e})=>e.setContent("",t),clearNodes:()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{t.doc.nodesBetween(n.pos,r.pos,((t,n)=>{if(t.type.isText)return;const{doc:r,mapping:o}=e,i=r.resolve(o.map(n)),s=r.resolve(o.map(n+t.nodeSize)),l=i.blockRange(s);if(!l)return;const c=(0,a.k9)(l);if(t.type.isTextblock){const{defaultType:t}=i.parent.contentMatchAt(i.index());e.setNodeMarkup(l.start,t)}(c||0===c)&&e.lift(l,c)}))})),!0)},command:t=>e=>t(e),createParagraphNear:()=>({state:t,dispatch:e})=>v(t,e),cut:(t,e)=>({editor:n,tr:o})=>{const{state:i}=n,s=i.doc.slice(t.from,t.to);o.deleteRange(t.from,t.to);const a=o.mapping.map(e);return o.insert(a,s.content),o.setSelection(new r.Bs(o.doc.resolve(a-1))),!0},deleteCurrentNode:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let n=o.depth;n>0;n-=1)if(o.node(n).type===r.type){if(e){const e=o.before(n),r=o.after(n);t.delete(e,r).scrollIntoView()}return!0}return!1},deleteNode:t=>({tr:e,state:n,dispatch:r})=>{const o=P(t,n.schema),i=e.selection.$anchor;for(let t=i.depth;t>0;t-=1)if(i.node(t).type===o){if(r){const n=i.before(t),r=i.after(t);e.delete(n,r).scrollIntoView()}return!0}return!1},deleteRange:t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},deleteSelection:()=>({state:t,dispatch:e})=>l(t,e),enter:()=>({commands:t})=>t.keyboardShortcut("Enter"),exitCode:()=>({state:t,dispatch:e})=>k(t,e),extendMarkRange:(t,e={})=>({tr:n,state:o,dispatch:i})=>{const s=bt(t,o.schema),{doc:a,selection:l}=n,{$from:c,from:d,to:u}=l;if(i){const t=gt(c,s,e);if(t&&t.from<=d&&t.to>=u){const e=r.Bs.create(a,t.from,t.to);n.setSelection(e)}}return!0},first:t=>e=>{const n="function"==typeof t?t(e):t;for(let t=0;t({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{wt()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===t||!1===t)return!0;if(i&&null===t&&!kt(n.state.selection))return s(),!0;const a=yt(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},forEach:(t,e)=>n=>t.every(((t,r)=>e(t,{...n,index:r}))),insertContent:(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),insertContentAt:(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const o=Ct(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:s,to:a}="number"==typeof t?{from:t,to:t}:{from:t.from,to:t.to},l=!0,c=!0;if((o.toString().startsWith("<")?o:[o]).forEach((t=>{t.check(),l=!!l&&t.isText&&0===t.marks.length,c=!!c&&t.isBlock})),s===a&&c){const{parent:t}=r.doc.resolve(s);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(s-=1,a+=1)}l?Array.isArray(e)?r.insertText(e.map((t=>t.text||"")).join(""),s,a):"object"==typeof e&&e&&e.text?r.insertText(e.text,s,a):r.insertText(e,s,a):r.replaceWith(s,a,o),n.updateSelection&&At(r,r.steps.length-1,-1)}return!0},joinUp:()=>({state:t,dispatch:e})=>((t,e)=>{let n,o=t.selection,i=o instanceof r.qv;if(i){if(o.node.isTextblock||!(0,a.Mn)(t.doc,o.from))return!1;n=o.from}else if(n=(0,a.GJ)(t.doc,o.from,-1),null==n)return!1;if(e){let o=t.tr.join(n);i&&o.setSelection(r.qv.create(o.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0})(t,e),joinDown:()=>({state:t,dispatch:e})=>((t,e)=>{let n,o=t.selection;if(o instanceof r.qv){if(o.node.isTextblock||!(0,a.Mn)(t.doc,o.to))return!1;n=o.to}else if(n=(0,a.GJ)(t.doc,o.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0})(t,e),joinBackward:()=>({state:t,dispatch:e})=>c(t,e),joinForward:()=>({state:t,dispatch:e})=>p(t,e),joinItemBackward:()=>({tr:t,state:e,dispatch:n})=>{try{const r=(0,a.GJ)(e.doc,e.selection.$from.pos,-1);return null!=r&&(t.join(r,2),n&&n(t),!0)}catch{return!1}},joinItemForward:()=>({state:t,dispatch:e,tr:n})=>{try{const r=(0,a.GJ)(t.doc,t.selection.$from.pos,1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch(t){return!1}},keyboardShortcut:t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=function(t){const e=t.split(/-(?!$)/);let n,r,o,i,s=e[e.length-1];"Space"===s&&(s=" ");for(let t=0;t!["Alt","Ctrl","Meta","Shift"].includes(t))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,a)))}));return null==l||l.steps.forEach((t=>{const e=t.map(r.mapping);e&&o&&r.maybeStep(e)})),!0},lift:(t,e={})=>({state:n,dispatch:r})=>!!St(n,P(t,n.schema),e)&&((t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&(0,a.k9)(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:t,dispatch:e})=>y(t,e),liftListItem:t=>({state:e,dispatch:n})=>{return(r=P(t,e.schema),function(t,e){let{$from:n,$to:o}=t.selection,i=n.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==r));return!!i&&(!e||(n.node(i.depth-1).type==r?function(t,e,n,r){let o=t.tr,i=r.end,l=r.$to.end(r.depth);ii;e--)t-=o.child(e).nodeSize,r.delete(t-1,t+1);let i=r.doc.resolve(n.start),l=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,d=n.endIndex==o.childCount,u=i.node(-1),h=i.index(-1);if(!u.canReplace(h+(c?0:1),h+1,l.content.append(d?s.HY.empty:s.HY.from(o))))return!1;let p=i.pos,f=p+l.nodeSize;return r.step(new a.FC(p-(c?1:0),f+(d?1:0),p+1,f-1,new s.p2((c?s.HY.empty:s.HY.from(o.copy(s.HY.empty))).append(d?s.HY.empty:s.HY.from(o.copy(s.HY.empty))),c?0:1,d?0:1),c?0:1)),e(r.scrollIntoView()),!0}(t,e,i)))})(e,n);var r},newlineInCode:()=>({state:t,dispatch:e})=>g(t,e),resetAttributes:(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=_t("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=P(t,r.schema)),"mark"===a&&(s=bt(t,r.schema)),o&&n.selection.ranges.forEach((t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,Tt(t.attrs,e)),s&&t.marks.length&&t.marks.forEach((o=>{s===o.type&&n.addMark(r,r+t.nodeSize,s.create(Tt(o.attrs,e)))}))}))})),!0)},scrollIntoView:()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),selectAll:()=>({tr:t,commands:e})=>e.setTextSelection({from:0,to:t.doc.content.size}),selectNodeBackward:()=>({state:t,dispatch:e})=>u(t,e),selectNodeForward:()=>({state:t,dispatch:e})=>f(t,e),selectParentNode:()=>({state:t,dispatch:e})=>((t,e)=>{let n,{$from:o,to:i}=t.selection,s=o.sharedDepth(i);return 0!=s&&(n=o.before(s),e&&e(t.tr.setSelection(r.qv.create(t.doc,n))),!0)})(t,e),selectTextblockEnd:()=>({state:t,dispatch:e})=>A(t,e),selectTextblockStart:()=>({state:t,dispatch:e})=>C(t,e),setContent:(t,e=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=Ot(t,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!e),!0},setMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=bt(t,r.schema);if(o)if(s){const t=Et(r,l);n.addStoredMark(l.create({...t,...e}))}else a.forEach((t=>{const o=t.$from.pos,i=t.$to.pos;r.doc.nodesBetween(o,i,((t,r)=>{const s=Math.max(r,o),a=Math.min(r+t.nodeSize,i);t.marks.find((t=>t.type===l))?t.marks.forEach((t=>{l===t.type&&n.addMark(s,a,l.create({...t.attrs,...e}))})):n.addMark(s,a,l.create(e))}))}));return function(t,e,n){var r;const{selection:o}=e;let i=null;if(kt(o)&&(i=o.$cursor),i){const e=null!==(r=t.storedMarks)&&void 0!==r?r:i.marks();return!!n.isInSet(e)||!e.some((t=>t.type.excludes(n)))}const{ranges:s}=o;return s.some((({$from:e,$to:r})=>{let o=0===e.depth&&t.doc.inlineContent&&t.doc.type.allowsMarkType(n);return t.doc.nodesBetween(e.pos,r.pos,((t,e,r)=>{if(o)return!1;if(t.isInline){const e=!r||r.type.allowsMarkType(n),i=!!n.isInSet(t.marks)||!t.marks.some((t=>t.type.excludes(n)));o=e&&i}return!o})),o}))}(r,n,l)},setMeta:(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),setNode:(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=P(t,n.schema);return i.isTextblock?o().command((({commands:t})=>!!M(i,e)(n)||t.clearNodes())).command((({state:t})=>M(i,e)(t,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,o=vt(t,0,n.content.size),i=r.qv.create(n,o);e.setSelection(i)}return!0},setTextSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:o,to:i}="number"==typeof t?{from:t,to:t}:t,s=r.Bs.atStart(n).from,a=r.Bs.atEnd(n).to,l=vt(o,s,a),c=vt(i,s,a),d=r.Bs.create(n,l,c);e.setSelection(d)}return!0},sinkListItem:t=>({state:e,dispatch:n})=>{const r=P(t,e.schema);return(o=r,function(t,e){let{$from:n,$to:r}=t.selection,i=n.blockRange(r,(t=>t.childCount>0&&t.firstChild.type==o));if(!i)return!1;let l=i.startIndex;if(0==l)return!1;let c=i.parent,d=c.child(l-1);if(d.type!=o)return!1;if(e){let n=d.lastChild&&d.lastChild.type==c.type,r=s.HY.from(n?o.create():null),l=new s.p2(s.HY.from(o.create(null,s.HY.from(c.type.create(null,r)))),n?3:1,0),u=i.start,h=i.end;e(t.tr.step(new a.FC(u-(n?3:1),h,u,h,l,1,!0)).scrollIntoView())}return!0})(e,n);var o},splitBlock:({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:o,editor:i})=>{const{selection:s,doc:l}=e,{$from:c,$to:d}=s,u=Gt(i.extensionManager.attributes,c.node().type.name,c.node().attrs);if(s instanceof r.qv&&s.node.isBlock)return!(!c.parentOffset||!(0,a.Ax)(l,c.pos)||(o&&(t&&ie(n,i.extensionManager.splittableMarks),e.split(c.pos).scrollIntoView()),0));if(!c.parent.isBlock)return!1;if(o){const o=d.parentOffset===d.parent.content.size;s instanceof r.Bs&&e.deleteSelection();const l=0===c.depth?void 0:Nt(c.node(-1).contentMatchAt(c.indexAfter(-1)));let h=o&&l?[{type:l,attrs:u}]:void 0,p=(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,h);if(h||p||!(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,l?[{type:l}]:void 0)||(p=!0,h=l?[{type:l,attrs:u}]:void 0),p&&(e.split(e.mapping.map(c.pos),1,h),l&&!o&&!c.parentOffset&&c.parent.type!==l)){const t=e.mapping.map(c.before()),n=e.doc.resolve(t);c.node(-1).canReplaceWith(n.index(),n.index()+1,l)&&e.setNodeMarkup(e.mapping.map(c.before()),l)}t&&ie(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},splitListItem:t=>({tr:e,state:n,dispatch:o,editor:i})=>{var l;const c=P(t,n.schema),{$from:d,$to:u}=n.selection,h=n.selection.node;if(h&&h.isBlock||d.depth<2||!d.sameParent(u))return!1;const p=d.node(-1);if(p.type!==c)return!1;const f=i.extensionManager.attributes;if(0===d.parent.content.size&&d.node(-1).childCount===d.indexAfter(-1)){if(2===d.depth||d.node(-3).type!==c||d.index(-2)!==d.node(-2).childCount-1)return!1;if(o){let t=s.HY.empty;const n=d.index(-1)?1:d.index(-2)?2:3;for(let e=d.depth-n;e>=d.depth-3;e-=1)t=s.HY.from(d.node(e).copy(t));const o=d.indexAfter(-1){if(h>-1)return!1;t.isTextblock&&0===t.content.size&&(h=e+1)})),h>-1&&e.setSelection(r.Bs.near(e.doc.resolve(h))),e.scrollIntoView()}return!0}const m=u.pos===d.end()?p.contentMatchAt(0).defaultType:null,g=Gt(f,p.type.name,p.attrs),b=Gt(f,d.node().type.name,d.node().attrs);e.delete(d.pos,u.pos);const k=m?[{type:c,attrs:g},{type:m,attrs:b}]:[{type:c,attrs:g}];if(!(0,a.Ax)(e.doc,d.pos,2))return!1;if(o){const{selection:t,storedMarks:r}=n,{splittableMarks:s}=i.extensionManager,a=r||t.$to.parentOffset&&t.$from.marks();if(e.split(d.pos,2,k).scrollIntoView(),!a||!o)return!0;const l=a.filter((t=>s.includes(t.type.name)));e.ensureMarks(l)}return!0},toggleList:(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:u,splittableMarks:h}=o.extensionManager,p=P(t,s.schema),f=P(e,s.schema),{selection:m,storedMarks:g}=s,{$from:b,$to:k}=m,v=b.blockRange(k),y=g||m.$to.parentOffset&&m.$from.marks();if(!v)return!1;const w=zt((t=>ee(t.type.name,u)))(m);if(v.depth>=1&&w&&v.depth-w.depth<=1){if(w.node.type===p)return c.liftListItem(f);if(ee(w.node.type.name,u)&&p.validContent(w.node.content)&&a)return l().command((()=>(i.setNodeMarkup(w.pos,p),!0))).command((()=>se(i,p))).command((()=>ae(i,p))).run()}return n&&y&&a?l().command((()=>{const t=d().wrapInList(p,r),e=y.filter((t=>h.includes(t.type.name)));return i.ensureMarks(e),!!t||c.clearNodes()})).wrapInList(p,r).command((()=>se(i,p))).command((()=>ae(i,p))).run():l().command((()=>!!d().wrapInList(p,r)||c.clearNodes())).wrapInList(p,r).command((()=>se(i,p))).command((()=>ae(i,p))).run()},toggleMark:(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=bt(t,r.schema);return Qt(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:o})=>{const i=P(t,r.schema),s=P(e,r.schema);return St(r,i,n)?o.setNode(s):o.setNode(i,n)},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const o=P(t,n.schema);return St(n,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(i.text){const n=e.doc.resolve(i.from).marks();e.replaceWith(i.from,i.to,t.schema.text(i.text,n))}else e.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach((e=>{t.removeMark(e.$from.pos,e.$to.pos)})),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=bt(t,r.schema),{$from:c,empty:d,ranges:u}=a;if(!o)return!0;if(d&&s){let{from:t,to:e}=a;const r=null===(i=c.marks().find((t=>t.type===l)))||void 0===i?void 0:i.attrs,o=gt(c,l,r);o&&(t=o.from,e=o.to),n.removeMark(t,e,l)}else u.forEach((t=>{n.removeMark(t.$from.pos,t.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=_t("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=P(t,r.schema)),"mark"===a&&(s=bt(t,r.schema)),o&&n.selection.ranges.forEach((t=>{const o=t.$from.pos,a=t.$to.pos;r.doc.nodesBetween(o,a,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,{...t.attrs,...e}),s&&t.marks.length&&t.marks.forEach((i=>{if(s===i.type){const l=Math.max(r,o),c=Math.min(r+t.nodeSize,a);n.addMark(l,c,s.create({...i.attrs,...e}))}}))}))})),!0)},wrapIn:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&(0,a.nd)(s,t,e);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}(P(t,n.schema),e)(n,r),wrapInList:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,l=o.blockRange(i),c=!1,d=l;if(!l)return!1;if(l.depth>=2&&o.node(l.depth-1).type.compatibleContent(t)&&0==l.startIndex){if(0==o.index(l.depth-1))return!1;let t=n.doc.resolve(l.start-2);d=new s.Ts(t,t,l.depth),l.endIndex=0;t--)i=s.HY.from(n[t].type.create(n[t].attrs,i));t.step(new a.FC(e.start-(r?2:0),e.end,e.start,e.end,new s.p2(i,0,0),n.length,!0));let l=0;for(let t=0;t({...le})}),de=ct.create({name:"editable",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),ue=ct.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new r.Sy({key:new r.H$("focusEvents"),props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),he=ct.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.command((({tr:e})=>{const{selection:n,doc:o}=e,{empty:i,$anchor:s}=n,{pos:a,parent:l}=s,c=s.parent.isTextblock?e.doc.resolve(a-1):s,d=c.parent.type.spec.isolating,u=s.pos-s.parentOffset,h=d&&1===c.parent.childCount?u===s.pos:r.Y1.atStart(o).from===a;return!(!(i&&h&&l.type.isTextblock)||l.textContent.length)&&t.clearNodes()})),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...n},i={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return wt()||Mt()?i:o},addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clearDocument"),appendTransaction:(t,e,n)=>{if(!t.some((t=>t.docChanged))||e.doc.eq(n.doc))return;const{empty:o,from:i,to:s}=e.selection,a=r.Y1.atStart(e.doc).from,l=r.Y1.atEnd(e.doc).to;if(o||i!==a||s!==l)return;if(0!==n.doc.textBetween(0,n.doc.content.size," "," ").length)return;const c=n.tr,d=D({state:n,transaction:c}),{commands:u}=new N({editor:this.editor,state:d});return u.clearNodes(),c.steps.length?c:void 0}})]}}),pe=ct.create({name:"tabindex",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var fe=Object.freeze({__proto__:null,ClipboardTextSerializer:ht,Commands:ce,Editable:de,FocusEvents:ue,Keymap:he,Tabindex:pe});function me(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class ge extends L{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=me('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=B(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(t){if(this.isDestroyed)return;const e="string"==typeof t?`${t}$`:t.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((t=>!t.key.startsWith(e)))});this.view.updateState(n)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(fe):[],...this.options.extensions].filter((t=>["extension","node","mark"].includes(null==t?void 0:t.type)));this.extensionManager=new st(t,this)}createCommandManager(){this.commandManager=new N({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=Ot(this.options.content,this.schema,this.options.parseOptions),e=yt(t,this.options.autofocus);this.view=new o.tk(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:r.yy.create({doc:t,selection:e||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),o=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return jt(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,r="string"==typeof t?e:t;return Kt(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Pt(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return $t(this.state.doc,{blockSeparator:e,textSerializers:{...ut(this.schema),...n}})}get isEmpty(){return ne(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}}function be(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{const o=$(t.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];if(s){const r=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(Yt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>l)).length)return null;cn.from&&i.delete(n.from+r,l);const d=n.from+r+s.length;i.addMark(n.from+r,d,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function ke(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{const o=$(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let a=n.to;const l=t.type.create(o);if(r[1]){let t=s+r[0].lastIndexOf(r[1]);t>a?t=a:a=t+r[1].length;const e=r[0][r[0].length-1];i.insertText(e,s+r[0].length-1),i.replaceWith(t,a,l)}else r[0]&&i.insert(s-1,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a));i.scrollIntoView()}})}function ve(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=$(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function ye(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from;const s=n.to;if(r[1]){const t=r[0].lastIndexOf(r[1]);o+=r[0].slice(t+r[1].length),i+=t;const e=i-s;e>0&&(o=r[0].slice(t-e,t)+o,i=s)}e.tr.insertText(o,i,s)}})}function we(t){return new Q({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=$(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&(0,a.nd)(l,t.type,i);if(!c)return null;if(s.wrap(l,c),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:o}=t.editor.extensionManager,i=r||n.$to.parentOffset&&n.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";o().updateAttributes(e,i).run()}const d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&(0,a.Mn)(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)}})}class xe{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=$(I(this,"addOptions",{name:this.name}))),this.storage=$(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new xe(t)}configure(t={}){const e=this.extend();return e.options=lt(this.options,t),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new xe(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=$(I(e,"addOptions",{name:e.name})),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!o.find((t=>(null==t?void 0:t.type.name)===e.name)))return!1;const i=o.find((t=>(null==t?void 0:t.type.name)===e.name));return i&&n.removeStoredMark(i),n.insertText(" ",r.pos),t.view.dispatch(n),!0}return!1}}class Ce{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=$(I(this,"addOptions",{name:this.name}))),this.storage=$(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ce(t)}configure(t={}){const e=this.extend();return e.options=lt(this.options,t),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Ce(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=$(I(e,"addOptions",{name:e.name})),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}}class Ae{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,o,i,s,a,l;const{view:c}=this.editor,d=t.target,u=3===d.nodeType?null===(e=d.parentElement)||void 0===e?void 0:e.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(d))||!u)return;let h=0,p=0;if(this.dom!==u){const e=this.dom.getBoundingClientRect(),n=u.getBoundingClientRect(),r=null!==(o=t.offsetX)&&void 0!==o?o:null===(i=t.nativeEvent)||void 0===i?void 0:i.offsetX,l=null!==(s=t.offsetY)&&void 0!==s?s:null===(a=t.nativeEvent)||void 0===a?void 0:a.offsetY;h=n.x-e.x+r,p=n.y-e.y+l}null===(l=t.dataTransfer)||void 0===l||l.setDragImage(this.dom,h,p);const f=r.qv.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(f);c.dispatch(m)}stopEvent(t){var e;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:t});const n=t.target;if(!this.dom.contains(n)||(null===(e=this.contentDOM)||void 0===e?void 0:e.contains(n)))return!1;const o=t.type.startsWith("drag"),i="drop"===t.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;const{isEditable:s}=this.editor,{isDragging:a}=this,l=!!this.node.type.spec.draggable,c=r.qv.isSelectable(this.node),d="copy"===t.type,u="paste"===t.type,h="cut"===t.type,p="mousedown"===t.type;if(!l&&c&&o&&t.preventDefault(),l&&o&&!a)return t.preventDefault(),!1;if(l&&s&&!a&&p){const t=n.closest("[data-drag-handle]");t&&(this.dom===t||this.dom.contains(t))&&(this.isDragging=!0,document.addEventListener("dragend",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("drop",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(()=>{this.isDragging=!1}),{once:!0}))}return!(a||i||d||u||h||p&&c)}ignoreMutation(t){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:t}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===t.type||this.dom.contains(t.target)&&"childList"===t.type&&(wt()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every((t=>t.isContentEditable))||(this.contentDOM!==t.target||"attributes"!==t.type)&&this.contentDOM.contains(t.target))))}updateAttributes(t){this.editor.commands.command((({tr:e})=>{const n=this.getPos();return e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0}))}deleteNode(){const t=this.getPos(),e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}}function Me(t){return new nt({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=$(t.getAttributes,void 0,r,o);if(!1===i||null===i)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const r=l.search(/\S/),o=n.from+l.indexOf(a),d=o+a.length;if(Yt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>o)).length)return null;dn.from&&s.delete(n.from+r,o),c=n.from+r+a.length,s.addMark(n.from+r,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function Se(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function _e(t){return"string"==typeof t}function Te(t){return new nt({find:t.find,handler({match:e,chain:n,range:r,pasteEvent:o}){const i=$(t.getAttributes,void 0,e,o);if(!1===i||null===i)return null;e.input&&n().deleteRange(r).insertContentAt(r.from,{type:t.type.name,attrs:i})}})}function Oe(t){return new nt({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from;const s=n.to;if(r[1]){const t=r[0].lastIndexOf(r[1]);o+=r[0].slice(t+r[1].length),i+=t;const e=i-s;e>0&&(o=r[0].slice(t-e,t)+o,i=s)}e.tr.insertText(o,i,s)}})}class Ee{constructor(t){this.transaction=t,this.currentStep=this.transaction.steps.length}map(t){let e=!1;return{position:this.transaction.steps.slice(this.currentStep).reduce(((t,n)=>{const r=n.getMap().mapResult(t);return r.deleted&&(e=!0),r.pos}),t),deleted:e}}}},65828:(t,e,n)=>{n.d(e,{V6:()=>i});var r=n(11046);const o=/^\s*>\s$/,i=r.Node.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.wrappingInputRule)({find:o,type:this.type})]}})},48144:(t,e,n)=>{n.d(e,{d8:()=>l});var r=n(11046);const o=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,i=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,s=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,a=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,l=r.Mark.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],renderHTML({HTMLAttributes:t}){return["strong",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type}),(0,r.markInputRule)({find:s,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type}),(0,r.markPasteRule)({find:a,type:this.type})]}})},35441:(t,e,n)=>{n.d(e,{DY:()=>a});var r=n(11046);const o=r.Node.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),i=r.Mark.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=(0,r.getMarkAttributes)(t,this.type);return!!Object.entries(n).some((([,t])=>!!t))||e.unsetMark(this.name)}}}}),s=/^\s*([-+*])\s$/,a=r.Node.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o.name,this.editor.getAttributes(i.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=(0,r.wrappingInputRule)({find:s,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.wrappingInputRule)({find:s,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(i.name),editor:this.editor})),[t]}})},30588:(t,e,n)=>{n.d(e,{dn:()=>a});var r=n(11046),o=n(62463);const i=/^```([a-z]+)?[\s\n]$/,s=/^~~~([a-z]+)?[\s\n]$/,a=r.Node.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;return[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter((t=>t.startsWith(n))).map((t=>t.replace(n,"")))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,r.mergeAttributes)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!i||!s)&&t.chain().command((({tr:t})=>(t.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type)return!1;if(o.parentOffset!==o.parent.nodeSize-2)return!1;const s=o.after();return void 0!==s&&!r.nodeAt(s)&&t.commands.exitCode()}}},addInputRules(){return[(0,r.textblockTypeInputRule)({find:i,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.textblockTypeInputRule)({find:s,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=null==i?void 0:i.mode;if(!n||!s)return!1;const{tr:a}=t.state;return a.replaceSelectionWith(this.type.create({language:s})),a.setSelection(o.Bs.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.insertText(n.replace(/\r\n?/g,"\n")),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}})},33977:(t,e,n)=>{n.d(e,{EK:()=>s});var r=n(11046);const o=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,i=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,s=r.Mark.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type})]}})},83374:(t,e,n)=>{n.d(e,{B:()=>r});const r=n(11046).Node.create({name:"doc",topNode:!0,content:"block+"})},20366:(t,e,n)=>{n.d(e,{m:()=>l});var r=n(11046),o=n(62463),i=n(38480);function s(t={}){return new o.Sy({view:e=>new a(e,t)})}class a{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map((e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}destroy(){this.handlers.forEach((({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e)))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent;if(n){let n=e.nodeBefore,r=e.nodeAfter;if(n||r){let e=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(e){let o=e.getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos);t={left:e.left-this.width/2,right:e.left+this.width/2,top:e.top,bottom:e.bottom}}let r,o,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!i||i==document.body&&"static"==getComputedStyle(i).position)r=-pageXOffset,o=-pageYOffset;else{let t=i.getBoundingClientRect();r=t.left-i.scrollLeft,o=t.top-i.scrollTop}this.element.style.left=t.left-r+"px",this.element.style.top=t.top-o+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,i.nj)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}const l=r.Extension.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[s(this.options)]}})},10988:(t,e,n)=>{n.d(e,{f:()=>m});var r=n(11046),o=n(31690),i=n(62463),s=n(27439),a=n(43594);class l extends i.Y1{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return l.valid(n)?new l(n):i.Y1.near(n)}content(){return s.p2.empty}eq(t){return t instanceof l&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new l(t.resolve(e.pos))}getBookmark(){return new c(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0!=n)for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&l.valid(t))return t;let r=t.pos,o=null;for(let n=t.depth;;n--){let i=t.node(n);if(e>0?t.indexAfter(n)0){o=i.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let s=t.doc.resolve(r);if(l.valid(s))return s}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!i.qv.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),n=!1;continue t}break}o=s,r+=e;let a=t.doc.resolve(r);if(l.valid(a))return a}return null}}}l.prototype.visible=!1,l.findFrom=l.findGapCursorFrom,i.Y1.jsonID("gapcursor",l);class c{constructor(t){this.pos=t}map(t){return new c(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return l.valid(e)?new l(e):i.Y1.near(e)}}const d=(0,o.$)({ArrowLeft:u("horiz",-1),ArrowRight:u("horiz",1),ArrowUp:u("vert",-1),ArrowDown:u("vert",1)});function u(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,o){let s=t.selection,a=e>0?s.$to:s.$from,c=s.empty;if(s instanceof i.Bs){if(!o.endOfTextblock(n)||0==a.depth)return!1;c=!1,a=t.doc.resolve(e>0?a.after():a.before())}let d=l.findGapCursorFrom(a,e,c);return!!d&&(r&&r(t.tr.setSelection(new l(d))),!0)}}function h(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!l.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&i.qv.isSelectable(t.state.doc.nodeAt(o.inside))||(t.dispatch(t.state.tr.setSelection(new l(r))),0))}function p(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof l))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=s.HY.empty;for(let t=r.length-1;t>=0;t--)o=s.HY.from(r[t].createAndFill(null,o));let a=t.state.tr.replace(n.pos,n.pos,new s.p2(o,0,0));return a.setSelection(i.Bs.near(a.doc.resolve(n.pos+1))),t.dispatch(a),!1}function f(t){if(!(t.selection instanceof l))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",a.EH.create(t.doc,[a.p.widget(t.selection.head,e,{key:"gapcursor"})])}const m=r.Extension.create({name:"gapCursor",addProseMirrorPlugins:()=>[new i.Sy({props:{decorations:f,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&l.valid(n)?new l(n):null,handleClick:h,handleKeyDown:d,handleDOMEvents:{beforeinput:p}}})],extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,r.callOrReturn)((0,r.getExtensionField)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}})},46741:(t,e,n)=>{n.d(e,{U:()=>o});var r=n(11046);const o=r.Node.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,r.mergeAttributes)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command((()=>{const{selection:t,storedMarks:o}=n;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,a=o||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command((({tr:t,dispatch:e})=>{if(e&&a&&i){const e=a.filter((t=>s.includes(t.type.name)));t.ensureMarks(e)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})},54424:(t,e,n)=>{n.r(e),n.d(e,{Heading:()=>o,default:()=>o});var r=n(11046);const o=r.Node.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,(0,r.mergeAttributes)(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>(0,r.textblockTypeInputRule)({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}})},74361:(t,e,n)=>{n.d(e,{A:()=>S});var r=n(11046),o=200,i=function(){};i.prototype.append=function(t){return t.length?(t=i.from(t),!this.length&&t||t.length=e?i.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},i.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},i.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},i.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},i.from=function(t){return t instanceof i?t:t&&t.length?new s(t):i.empty};var s=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=o)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=o)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(i);i.empty=new s([]);var a=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return to&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(i);const l=i;var c=n(38480),d=n(62463);class u{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}e&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=t.tr,l=[],c=[];return this.items.forEach(((t,e)=>{if(!t.step)return n||(n=this.remapping(o,e+1),r=n.maps.length),r--,void c.push(t);if(n){c.push(new h(t.map));let e,o=t.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(e=a.mapping.maps[a.mapping.maps.length-1],l.push(new h(e,void 0,void 0,l.length+c.length))),r--,e&&n.appendMap(e,r)}else a.maybeStep(t.step);return t.selection?(i=n?t.selection.map(n.slice(r)):t.selection,s=new u(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(t,e,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;nf&&(s=function(t,e){let n;return t.forEach(((t,r)=>{if(t.selection&&0==e--)return n=r,!1})),t.slice(n)}(s,l),i-=l),new u(s.append(o),i)}remapping(t,e){let n=new c.vs;return this.items.forEach(((e,r)=>{let o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,o)}),t,e),n}addMaps(t){return 0==this.eventCount?this:new u(this.items.append(t.map((t=>new h(t)))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach((t=>{t.selection&&s--}),r);let a=e;this.items.forEach((e=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(e.step){let i=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(o.slice(a+1,r));c&&s++,n.push(new h(l,i,c))}else n.push(new h(l))}),r);let l=[];for(let t=e;t500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let t=0;return this.items.forEach((e=>{e.step||t++})),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=t)r.push(i),i.selection&&o++;else if(i.step){let t=i.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let a=i.selection&&i.selection.map(e.slice(n));a&&o++;let l,c=new h(s.invert(),t,a),d=r.length-1;(l=r.length&&r[d].merge(c))?r[d]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new u(l.from(r.reverse()),o)}}u.empty=new u(l.empty,0);class h{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new h(e.getMap().invert(),e,this.selection)}}}class p{constructor(t,e,n,r,o){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const f=20;function m(t){let e=[];return t.forEach(((t,n,r,o)=>e.push(r,o))),e}function g(t,e){if(!t)return null;let n=[];for(let r=0;rnew p(u.empty,u.empty,null,0,-1),apply:(e,n,r)=>function(t,e,n,r){let o,i=n.getMeta(w);if(i)return i.historyState;n.getMeta(x)&&(t=new p(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(w))return s.getMeta(w).redo?new p(t.done.addTransform(n,void 0,r,y(e)),t.undone,m(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new p(t.done,t.undone.addTransform(n,void 0,r,y(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new p(t.done.rebased(n,o),t.undone.rebased(n,o),g(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new p(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),g(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let o=n.getMeta("composition"),i=0==t.prevTime||!s&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach(((t,r)=>{for(let o=0;o=e[o]&&(n=!0)})),n}(n,t.prevRanges)),a=s?g(t.prevRanges,n.mapping):m(n.mapping.maps[n.steps.length-1]);return new p(t.done.addTransform(n,i?e.selection.getBookmark():void 0,r,y(e)),u.empty,a,n.time,null==o?t.prevComposition:o)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?A:"historyRedo"==n?M:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const A=(t,e)=>{let n=w.getState(t);return!(!n||0==n.done.eventCount||(e&&b(n,t,e,!1),0))},M=(t,e)=>{let n=w.getState(t);return!(!n||0==n.undone.eventCount||(e&&b(n,t,e,!0),0))},S=r.Extension.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>A(t,e),redo:()=>({state:t,dispatch:e})=>M(t,e)}),addProseMirrorPlugins(){return[C(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},82136:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(11046),o=n(62463);const i=r.Node.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",(0,r.mergeAttributes)(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{$to:n}=e.selection,r=t();return 0===n.parentOffset?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command((({tr:t,dispatch:e})=>{var n;if(e){const{$to:e}=t.selection,r=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?t.setSelection(o.Bs.create(t.doc,e.pos+1)):e.nodeAfter.isBlock?t.setSelection(o.qv.create(t.doc,e.pos)):t.setSelection(o.Bs.create(t.doc,e.pos));else{const i=null===(n=e.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(t.insert(r,i),t.setSelection(o.Bs.create(t.doc,r+1)))}t.scrollIntoView()}return!0})).run()}}},addInputRules(){return[(0,r.nodeInputRule)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}})},44632:(t,e,n)=>{n.r(e),n.d(e,{Image:()=>i,default:()=>i,inputRegex:()=>o});var r=n(11046);const o=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,i=r.Node.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",(0,r.mergeAttributes)(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[(0,r.nodeInputRule)({find:o,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}})},46057:(t,e,n)=>{n.d(e,{Tx:()=>l});var r=n(11046);const o=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,i=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,s=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,a=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,l=r.Mark.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:t}){return["em",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type}),(0,r.markInputRule)({find:s,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type}),(0,r.markPasteRule)({find:a,type:this.type})]}})},80452:(t,e,n)=>{n.d(e,{H:()=>o});var r=n(11046);const o=r.Node.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}})},54133:(t,e,n)=>{n.d(e,{GS:()=>a});var r=n(11046);const o=r.Node.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),i=r.Mark.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=(0,r.getMarkAttributes)(t,this.type);return!!Object.entries(n).some((([,t])=>!!t))||e.unsetMark(this.name)}}}}),s=/^(\d+)\.\s$/,a=r.Node.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return 1===e?["ol",(0,r.mergeAttributes)(this.options.HTMLAttributes,n),0]:["ol",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o.name,this.editor.getAttributes(i.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=(0,r.wrappingInputRule)({find:s,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.wrappingInputRule)({find:s,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(i.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}})},87660:(t,e,n)=>{n.d(e,{n:()=>o});var r=n(11046);const o=r.Node.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})},27719:(t,e,n)=>{n.d(e,{Re:()=>s});var r=n(11046);const o=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,i=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,s=r.Mark.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){const t={};return(0,r.isMacOS)()?t["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():t["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),t},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type})]}})},84402:(t,e,n)=>{n.r(e),n.d(e,{TextStyle:()=>o,default:()=>o});var r=n(11046);const o=r.Mark.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=(0,r.getMarkAttributes)(t,this.type);return!!Object.entries(n).some((([,t])=>!!t))||e.unsetMark(this.name)}}}})},20239:(t,e,n)=>{n.d(e,{x:()=>r});const r=n(11046).Node.create({name:"text",group:"inline"})},31690:(t,e,n)=>{n.d(e,{$:()=>f,h:()=>p});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(a=1;a<=24;a++)r[a+111]="F"+a;for(a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),o[a]=String.fromCharCode(a);for(var l in r)o.hasOwnProperty(l)||(o[l]=r[l]);var c=n(62463);const d="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function u(t){let e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let t=0;t127)&&(a=r[n.keyCode])&&a!=l){let r=e[h(a,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},27439:(t,e,n)=>{function r(t){this.content=t}n.d(e,{aw:()=>Q,PW:()=>at,HY:()=>a,vc:()=>u,ZU:()=>Y,NB:()=>D,Ts:()=>O,e4:()=>h,V_:()=>W,p2:()=>p}),r.prototype={constructor:r,find:function(t){for(var e=0;e>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};const o=r;function i(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),s=e.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let t=0;o.text[t]==s.text[t];t++)n++;return n}if(o.content.size||s.content.size){let t=i(o.content,s.content,n+1);if(null!=t)return t}n+=o.nodeSize}else n+=o.nodeSize}}function s(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let a=t.child(--o),l=e.child(--i),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let t=0,e=Math.min(a.text.length,l.text.length);for(;tt&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,t-o),Math.min(a.content.size,e-o),n,r+o)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let o="",i=!0;return this.nodesBetween(t,e,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(t,a)-a,e-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);ot)for(let o=0,i=0;it&&((ie)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),r+=s.nodeSize),i=a}return new a(n,r)}cutByIndex(t,e){return t==e?a.empty:0==t&&e==this.content.length?this:new a(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new a(r,o)}addToStart(t){return new a([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new a(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return a.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return a.empty;let e,n=0;for(let r=0;r{class t{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;rthis.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;et.type.rank-e.type.rank)),n}}return t.none=[],t})();class h extends Error{}class p{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=m(this.content,t+this.openStart,e);return n&&new p(n,this.openStart,this.openEnd)}removeBetween(t,e){return new p(f(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return p.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(a.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new p(t,n,r)}}function f(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(f(i.content,e-o-1,n-o-1)))}function m(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=m(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function g(t,e,n){if(n.openStart>t.depth)throw new h("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths");return b(t,e,n,0)}function b(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0;t--)r=e.node(t).copy(a.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return x(i,C(t,o,s,e,r))}{let r=t.parent,o=r.content;return x(r,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}}return x(i,A(t,e,r))}function k(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function v(t,e,n){let r=t.node(n);return k(r,e.node(n)),r}function y(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function w(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(y(t.nodeAfter,r),i++));for(let t=i;to&&v(t,e,o+1),s=r.depth>o&&v(n,r,o+1),l=[];return w(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(k(i,s),y(x(i,C(t,e,n,r,o+1)),l)):(i&&y(x(i,A(t,e,o+1)),l),w(e,n,o,l),s&&y(x(s,A(n,r,o+1)),l)),w(r,null,o,l),new a(l)}function A(t,e,n){let r=[];return w(null,t,n,r),t.depth>n&&y(x(v(t,e,n+1),A(t,e,n+1)),r),w(e,null,n,r),new a(r)}p.empty=new p(a.empty,0,0);class M{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new O(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,o=e;for(let e=t;;){let{index:t,offset:i}=e.content.findIndex(o),s=o-i;if(n.push(e,t,r+i),!s)break;if(e=e.child(t),e.isText)break;o=s-1,r+=i+1}return new M(e,n,o)}static resolveCached(t,e){for(let n=0;nt&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),L(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=a.empty,r=0,o=n.childCount){let i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let t=r;tt.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=a.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}D.prototype.text=void 0;class N extends D{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):L(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new N(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new N(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function L(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class I{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new R(t,e);if(null==n.next)return I.empty;let r=z(n);n.next&&n.err("Unexpected trailing text");let o=function(t){let e=Object.create(null);return function n(r){let o=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t{r||o.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let i=e[r.join(",")]=new I(r.indexOf(t.length-1)>-1);for(let t=0;te.concat(t(n,i))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(i,s),o(t(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(t(e.expr,i),s),o(t(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(i)].concat(t(e.expr,i));if("range"==e.type){let s=i;for(let r=0;rt.to=e))}}(r));return function(t,e){for(let n=0,r=[t];nt.createAndFill())));for(let t=0;t=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n"+t.indexOf(e.next[n].next);return r})).join("\n")}}I.empty=new I(!0);class R{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function z(t){let e=[];do{e.push(P(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function P(t){let e=[];do{e.push(H(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function H(t){let e=function(t){if(t.eat("(")){let e=z(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let t in n){let r=n[t];r.groups.indexOf(e)>-1&&o.push(r)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=B(t,e)}return e}function q(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function B(t,e){let n=q(t),r=n;return t.eat(",")&&(r="}"!=t.next?q(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function $(t,e){return e-t}function F(t,e){let n=[];return function e(r){let o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(let t=0;t-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;en[t]=new U(t,e,r)));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class V{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Y{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=Z(r.attrs),this.excluded=null;let o=J(this.attrs);this.instance=o?new u(this,o):null}create(t=null){return!t&&this.instance?this.instance:new u(this,j(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,o)=>n[t]=new Y(t,r++,e,o))),n}removeFromSet(t){for(var e=0;e-1}}class W{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=o.from(t.nodes),e.marks=o.from(t.marks||{}),this.nodes=U.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",o=e.spec.marks;e.contentMatch=n[r]||(n[r]=I.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==o?null:o?G(this,o.split(" ")):""!=o&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:G(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof U))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new N(n,n.defaultAttrs,t,u.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return D.fromJSON(this,t)}markFromJSON(t){return u.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function G(t,e){let n=[];for(let r=0;r-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Q{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((t=>{t.tag?this.tags.push(t):t.style&&this.styles.push(t)})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new rt(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new rt(this,e,!0);return n.addAll(t,e.from,e.to),p.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;rt.length&&(61!=i.charCodeAt(t.length)||i.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r{n(t=it(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)}))}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach((t=>{n(t=it(t)),t.node||t.ignore||t.mark||(t.node=e)}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Q(t,Q.schemaRules(t)))}}const K={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},X={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tt={ol:!0,ul:!0};function et(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class nt{constructor(t,e,n,r,o,i,s){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=u.none,this.stashMarks=[],this.match=i||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(a.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=a.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;ethis.addAll(t))),e&&this.sync(n),this.needsBlock=i}else this.withStyleRules(t,(()=>{this.addElementByRule(t,o,!1===o.consuming?n:void 0)}))}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=u.none,n=u.none;for(let r=0;r{i.clearMark(t)&&(n=t.addToSet(n))})):e=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(e),!1!==i.consuming)break;o=i}return[e,n]}addElementByRule(t,e,n){let r,o,i;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(i=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(i));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t)));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(t,e,n){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,i=null==n?null:t.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(let t=0;tthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=o;s--)if(i(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!t||t.name!=a&&-1==t.groups.indexOf(a))return!1;s--}}return!0};return i(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(t){let e=function(t,e){for(let n=0;n=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let e=r.popFromStashMark(t);e&&r.type&&r.type.allowsMarkType(e.type)&&(r.activeMarks=e.addToSet(r.activeMarks))}if(r==e)break}}}function ot(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function it(t){let e={};for(let n in t)e[n]=t[n];return e}function st(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=t=>{i.push(t);for(let n=0;n{if(o.length||t.marks.length){let n=0,i=0;for(;n=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&at.renderSpec(ct(n),r(t,e))}static renderSpec(t,e,n=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r,o=e[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?t.createElementNS(n,o):t.createElement(o),a=e[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let t in a)if(null!=a[t]){let e=t.indexOf(" ");e>0?s.setAttributeNS(t.slice(0,e),t.slice(e+1),a[t]):s.setAttribute(t,a[t])}}for(let o=l;ol)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:e,contentDOM:o}=at.renderSpec(t,i,n);if(s.appendChild(e),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new at(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=lt(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return lt(t.marks)}}function lt(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ct(t){return t.document||window.document}},62463:(t,e,n)=>{n.d(e,{C1:()=>f,yy:()=>C,qv:()=>h,Sy:()=>M,H$:()=>T,Y1:()=>s,xm:()=>a,Bs:()=>d});var r=n(27439),o=n(38480);const i=Object.create(null);class s{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new a(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e=0;r--){let o=e<0?g(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):g(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(o)return o}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=i[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in i)throw new RangeError("Duplicate use of selection JSON ID "+t);return i[t]=e,e.prototype.jsonID=t,e}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(t,e){this.$from=t,this.$to=e}}let l=!1;function c(t){l||t.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class d extends s{constructor(t,e=t){c(t),c(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=t.resolve(e.map(this.anchor));return new d(r.parent.inlineContent?r:n,n)}replace(t,e=r.p2.empty){if(super.replace(t,e),e==r.p2.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof d&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new u(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new d(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=s.findFrom(e,n,!0)||s.findFrom(e,-n,!0);if(!t)return s.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r||(t=(s.findFrom(t,-n,!0)||s.findFrom(t,n,!0)).$anchor).posnew f(t)};function g(t,e,n,r,o,i=!1){if(e.inlineContent)return d.create(t,n);for(let s=r-(o>0?0:1);o>0?s=0;s+=o){let r=e.child(s);if(r.isAtom){if(!i&&h.isSelectable(r))return h.create(t,n-(o<0?r.nodeSize:0))}else{let e=g(t,r,n+o,o<0?r.childCount:0,o,i);if(e)return e}n+=r.nodeSize*o}return null}function b(t,e,n){let r=t.steps.length-1;if(r{null==i&&(i=r)})),t.setSelection(s.near(t.doc.resolve(i),n)))}class k extends o.wx{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let o=this.storedMarks;if(!o){let t=this.doc.resolve(e);o=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function v(t,e){return e&&t?t.bind(e):t}class y{constructor(t,e,n){this.name=t,this.init=v(e.init,n),this.apply=v(e.apply,n)}}const w=[new y("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new y("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new y("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new y("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class x{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=w.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new y(t.key,t.spec.state,t))}))}}class C{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;nt.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],o=r.spec.state;o&&o.toJSON&&(e[n]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new x(t.schema,t.plugins),i=new C(o);return o.fields.forEach((o=>{if("doc"==o.name)i.doc=r.NB.fromJSON(t.schema,e.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,e.selection);else if("storedMarks"==o.name)e.storedMarks&&(i.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],a=s.spec.state;if(s.key==o.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,r))return void(i[o.name]=a.fromJSON.call(s,t,e[r],i))}i[o.name]=o.init(t,i)}})),i}}function A(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=A(o,e,{})),n[r]=o}return n}class M{constructor(t){this.spec=t,this.props={},t.props&&A(t.props,this,this.props),this.key=t.key?t.key.key:_("plugin")}getState(t){return t[this.key]}}const S=Object.create(null);function _(t){return t in S?t+"$"+ ++S[t]:(S[t]=0,t+"$")}class T{constructor(t="key"){this.key=_(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},38480:(t,e,n)=>{n.d(e,{vs:()=>l,FC:()=>k,Pu:()=>b,wx:()=>F,Mn:()=>M,Ax:()=>A,nj:()=>T,nd:()=>x,GJ:()=>_,k9:()=>w,dR:()=>O});var r=n(27439);const o=Math.pow(2,16);function i(t){return 65535&t}class s{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class a{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&a.empty)return a.empty}recover(t){let e=0,n=i(t);if(!this.inverted)for(let t=0;tt)break;let d=this.ranges[l+i],u=this.ranges[l+a],h=c+d;if(t<=h){let i=c+r+((d?t==c?-1:t==h?1:e:e)<0?0:u);if(n)return i;let a=t==c?2:t==h?1:4;return(e<0?t!=c:t!=h)&&(a|=8),new s(i,a,t==(e<0?c:h)?null:l/3+(t-c)*o)}r+=u-d}return n?t+r:new s(t+r,0,null)}touches(t,e){let n=0,r=i(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let e=0;et)break;let a=this.ranges[e+o];if(t<=i+a&&e==3*r)return!0;n+=this.ranges[e+s]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new l;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;nn&&et.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),o),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,i)}invert(){return new f(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new p(e.pos,n.pos,this.mark)}merge(t){return t instanceof p&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new p(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new p(e.from,e.to,t.markFromJSON(e.mark))}}d.jsonID("addMark",p);class f extends d{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new r.p2(h(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,n)}invert(){return new p(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new f(e.pos,n.pos,this.mark)}merge(t){return t instanceof f&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new f(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new f(e.from,e.to,t.markFromJSON(e.mark))}}d.jsonID("removeMark",f);class m extends d{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;nn.pos?null:new k(e.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new k(e.from,e.to,e.gapFrom,e.gapTo,r.p2.fromJSON(t,e.slice),e.insert,!!e.structure)}}function v(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let t=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}function y(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function w(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(ni;t--,e--){let n=o.node(t),i=o.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),a=r&&r[e+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[e]||n;if(!n.canReplace(i+1,n.childCount)||!l.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function M(t,e){let n=t.resolve(e),r=n.index();return S(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function S(t,e){return!(!t||!e||t.isLeaf||!t.canAppend(e))}function _(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let o,i,s=r.index(t);if(t==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(t+1),s++,i=r.node(t).maybeChild(s)):(o=r.node(t).maybeChild(s-1),i=r.node(t+1)),o&&!o.isTextblock&&S(o,i)&&r.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function T(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let t=0;t=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,i=r.index(e)+(n>0?1:0),s=r.node(e),a=!1;if(1==t)a=s.canReplace(i,i,o);else{let t=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=t&&s.canReplaceWith(i,i,t[0])}if(a)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function O(t,e,n=e,o=r.p2.empty){if(e==n&&!o.size)return null;let i=t.resolve(e),s=t.resolve(n);return E(i,s,o)?new b(e,n,o):new D(i,s,o).fit()}function E(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}d.jsonID("replaceAround",k);class D{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=r.HY.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(t<0?this.$to:n.doc.resolve(t));if(!o)return null;let i=this.placed,s=n.depth,a=o.depth;for(;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;let l=new r.p2(i,s,a);return t>-1?new k(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new b(n.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n1&&(r=0),o.type.spec.isolating&&r<=n){t=n;break}e=o.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,o=null;n?(o=I(this.unplaced.content,n-1).firstChild,t=o.content):t=this.unplaced.content;let i=t.firstChild;for(let t=this.depth;t>=0;t--){let s,{type:a,match:l}=this.frontier[t],c=null;if(1==e&&(i?l.matchType(i.type)||(c=l.fillBefore(r.HY.from(i),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:t,parent:o,inject:c};if(2==e&&i&&(s=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:t,parent:o,wrap:s};if(o&&l.matchType(o.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,o=I(t,e);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new r.p2(t,e+1,Math.max(n,o.size+e>=t.size-n?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,o=I(t,e);if(o.childCount<=1&&e>0){let i=t.size-e<=e+o.size;this.unplaced=new r.p2(N(t,e-1,1),e-1,i?e-1:n)}else this.unplaced=new r.p2(N(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:o,wrap:i}){for(;this.depth>e;)this.closeFrontierNode();if(i)for(let t=0;t1||0==l||t.content.size)&&(u=e,d.push(R(t.mark(h.allowedMarks(t.marks)),1==c?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=L(this.placed,e,r.HY.from(d)),this.frontier[e].match=u,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=a;t1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],o=e=0;n--){let{match:e,type:r}=this.frontier[n],o=z(t,n,r,e,!0);if(!o||o.childCount)continue t}return{depth:e,fit:i,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=L(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=L(this.placed,this.depth,r.HY.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.HY.empty,!0);t.childCount&&(this.placed=L(this.placed,this.frontier.length,t))}}function N(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(N(t.firstChild.content,e-1,n)))}function L(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(L(t.lastChild.content,e-1,n)))}function I(t,e){for(let n=0;n1&&(o=o.replaceChild(0,R(o.firstChild,e-1,1==o.childCount?n-1:0))),e>0&&(o=t.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(r.HY.empty,!0)))),t.copy(o)}function z(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(t,e,n){for(let r=n;ro){let e=i.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}function H(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let o=t.start(r);if(oe.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}class q extends d{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let o=e.type.create(n,null,e.marks);return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(o),0,e.isLeaf?0:1))}getMap(){return a.empty}invert(t){return new q(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new q(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new q(e.pos,e.attr,e.value)}}d.jsonID("attr",q);class B extends d{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return u.ok(n)}getMap(){return a.empty}invert(t){return new B(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new B(e.attr,e.value)}}d.jsonID("docAttr",B);let $=class extends Error{};$=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},($.prototype=Object.create(Error.prototype)).constructor=$,$.prototype.name="TransformError";class F{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new l}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new $(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=r.p2.empty){let o=O(this.doc,t,e,n);return o&&this.step(o),this}replaceWith(t,e,n){return this.replace(t,e,new r.p2(r.HY.from(n),0,0))}delete(t,e){return this.replace(t,e,r.p2.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,o){if(!o.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),s=t.doc.resolve(n);if(E(i,s,o))return t.step(new b(e,n,o));let a=H(i,t.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(i.depth+1);a.unshift(l);for(let t=i.depth,e=i.pos-1;t>0;t--,e--){let n=i.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(t)>-1?l=t:i.before(t)==e&&a.splice(1,0,-t)}let c=a.indexOf(l),d=[],u=o.openStart;for(let t=o.content,e=0;;e++){let n=t.firstChild;if(d.push(n),e==o.openStart)break;t=n.content}for(let t=u-1;t>=0;t--){let e=d[t],n=(h=e.type).spec.defining||h.spec.definingForContent;if(n&&!e.sameMarkup(i.node(Math.abs(l)-1)))u=t;else if(n||!e.type.isTextblock)break}var h;for(let e=o.openStart;e>=0;e--){let l=(e+u+1)%(o.openStart+1),h=d[l];if(h)for(let e=0;e=0&&(t.replace(e,n,o),!(t.steps.length>p));r--){let t=a[r];t<0||(e=i.before(t),n=s.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,o){if(!o.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return t.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return t.delete(r.before(i),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:o,$to:i,depth:s}=e,a=o.before(s+1),l=i.after(s+1),c=a,d=l,u=r.HY.empty,h=0;for(let t=s,e=!1;t>n;t--)e||o.index(t)>0?(e=!0,u=r.HY.from(o.node(t).copy(u)),h++):c--;let p=r.HY.empty,f=0;for(let t=s,e=!1;t>n;t--)e||i.after(t+1)=0;t--){if(o.size){let e=n[t].type.contentMatch.matchFragment(o);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.HY.from(n[t].type.create(n[t].attrs,o))}let i=e.start,s=e.end;t.step(new k(i,s,i,s,new r.p2(o,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,o=null){return function(t,e,n,o,i){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,((e,n)=>{if(e.isTextblock&&!e.hasMarkup(o,i)&&function(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(t.doc,t.mapping.slice(s).map(n),o)){t.clearIncompatible(t.mapping.slice(s).map(n,1),o);let a=t.mapping.slice(s),l=a.map(n,1),c=a.map(n+e.nodeSize,1);return t.step(new k(l,c,l+1,c-1,new r.p2(r.HY.from(o.create(i,null,e.marks)),0,0),1,!0)),!1}}))}(this,t,e,n,o),this}setNodeMarkup(t,e,n=null,o){return function(t,e,n,o,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(o,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new k(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new r.p2(r.HY.from(a),0,0),1,!0))}(this,t,e,n,o),this}setNodeAttribute(t,e,n){return this.step(new q(t,e,n)),this}setDocAttribute(t,e){return this.step(new B(t,e)),this}addNodeMark(t,e){return this.step(new m(t,e)),this}removeNodeMark(t,e){if(!(e instanceof r.vc)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(n.marks)))return this}return this.step(new g(t,e)),this}split(t,e=1,n){return function(t,e,n=1,o){let i=t.doc.resolve(e),s=r.HY.empty,a=r.HY.empty;for(let t=i.depth,e=i.depth-n,l=n-1;t>e;t--,l--){s=r.HY.from(i.node(t).copy(s));let e=o&&o[l];a=r.HY.from(e?e.type.create(e.attrs,a):i.node(t).copy(a))}t.step(new b(e,e,new r.p2(s.append(a),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let o,i,s=[],a=[];t.doc.nodesBetween(e,n,((t,l,c)=>{if(!t.isInline)return;let d=t.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),u=Math.min(l+t.nodeSize,n),h=r.addToSet(d);for(let t=0;tt.step(e))),a.forEach((e=>t.step(e)))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,o){let i=[],s=0;t.doc.nodesBetween(e,n,((t,a)=>{if(!t.isInline)return;s++;let l=null;if(o instanceof r.ZU){let e,n=t.marks;for(;e=o.isInSet(n);)(l||(l=[])).push(e),n=e.removeFromSet(n)}else o?o.isInSet(t.marks)&&(l=[o]):l=t.marks;if(l&&l.length){let r=Math.min(a+t.nodeSize,n);for(let t=0;tt.step(new f(e.from,e.to,e.style))))}(this,t,e,n),this}clearIncompatible(t,e,n){return function(t,e,n,o=n.contentMatch){let i=t.doc.nodeAt(e),s=[],a=e+1;for(let e=0;e=0;e--)t.step(s[e])}(this,t,e,n),this}}},43594:(t,e,n)=>{n.d(e,{p:()=>ze,EH:()=>qe,tk:()=>ln});var r=n(62463),o=n(27439),i=n(38480);const s=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},a=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let l=null;const c=function(t,e,n){let r=l||(l=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},d=function(t,e,n,r){return n&&(h(t,e,n,r,-1)||h(t,e,n,r,1))},u=/^(img|br|input|textarea|hr)$/i;function h(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:p(t))){let n=t.parentNode;if(!n||1!=n.nodeType||f(t)||u.test(t.nodeName)||"false"==t.contentEditable)return!1;e=s(t)+(o<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?p(t):0}}}function p(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function f(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const m=function(t){return t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function g(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const b="undefined"!=typeof navigator?navigator:null,k="undefined"!=typeof document?document:null,v=b&&b.userAgent||"",y=/Edge\/(\d+)/.exec(v),w=/MSIE \d/.exec(v),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(v),C=!!(w||x||y),A=w?document.documentMode:x?+x[1]:y?+y[1]:0,M=!C&&/gecko\/(\d+)/i.test(v);M&&(/Firefox\/(\d+)/.exec(v)||[0,0])[1];const S=!C&&/Chrome\/(\d+)/.exec(v),_=!!S,T=S?+S[1]:0,O=!C&&!!b&&/Apple Computer/.test(b.vendor),E=O&&(/Mobile\/\w+/.test(v)||!!b&&b.maxTouchPoints>2),D=E||!!b&&/Mac/.test(b.platform),N=!!b&&/Win/.test(b.platform),L=/Android \d/.test(v),I=!!k&&"webkitFontSmoothing"in k.documentElement.style,R=I?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function z(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function P(t,e){return"number"==typeof t?t:t[e]}function H(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function q(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=a(s)){if(1!=s.nodeType)continue;let t=s,n=t==i.body,a=n?z(i):H(t),l=0,c=0;if(e.topa.bottom-P(r,"bottom")&&(c=e.bottom-e.top>a.bottom-a.top?e.top+P(o,"top")-a.top:e.bottom-a.bottom+P(o,"bottom")),e.lefta.right-P(r,"right")&&(l=e.right-a.right+P(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=t.scrollLeft,r=t.scrollTop;c&&(t.scrollTop+=c),l&&(t.scrollLeft+=l);let o=t.scrollLeft-n,i=t.scrollTop-r;e={left:e.left-o,top:e.top-i,right:e.right-o,bottom:e.bottom-i}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function B(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=a(r));return e}function $(t,e){for(let n=0;n=d){l=Math.max(p.bottom,l),d=Math.min(p.top,d);let t=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!o&&p.left<=e.left&&p.right>=e.left&&(o=u,i={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(a=h+1)}}return!n&&o&&(n=o,r=i,s=0),n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:t,offset:a}:J(n,r)}function j(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Z(t,e,n){let r=t.childNodes.length;if(r&&n.tope.top&&o++}let r;I&&o&&1==n.nodeType&&1==(r=n.childNodes[o-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=e.top&&o--,n==t.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(t,e,n,r){let o=-1;for(let n=e,i=!1;n!=t.dom;){let e=t.docView.nearestDesc(n,!0);if(!e)return null;if(1==e.dom.nodeType&&(e.node.isBlock&&e.parent&&!i||!e.contentDOM)){let t=e.dom.getBoundingClientRect();if(e.node.isBlock&&e.parent&&!i&&(i=!0,t.left>r.left||t.top>r.top?o=e.posBefore:(t.right-1?o:t.docView.posFromDOM(e,n,-1)}(t,n,o,e))}null==s&&(s=function(t,e,n){let{node:r,offset:o}=J(e,n),i=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();i=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}(t,l,e));let c=t.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function V(t){return t.top=0&&o==r.nodeValue.length?(t--,i=1):n<0?t--:e++,Q(Y(c(r,t,e),i),i<0)}{let t=Y(c(r,o,o),n);if(M&&o&&/\s/.test(r.nodeValue[o-1])&&o=0)}if(null==i&&o&&(n<0||o==p(r))){let t=r.childNodes[o-1],e=3==t.nodeType?c(t,p(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return Q(Y(e,1),!1)}if(null==i&&o=0)}function Q(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function K(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function X(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}const tt=/[\u0590-\u08ac]/;let et=null,nt=null,rt=!1;class ot{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;es(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!e||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==t.nodeType?t:t.parentNode):o==t))return i;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;et||o instanceof ut){r=t-e;break}e=i}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(let t;n&&!(t=this.children[n-1]).size&&t instanceof it&&t.side>=0;n--);if(e<=0){let t,r=!0;for(;t=n?this.children[n-1]:null,t&&t.dom.parentNode!=this.contentDOM;n--,r=!1);return t&&e&&r&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?s(t.dom)+1:0}}{let t,r=!0;for(;t=n=o&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,o);t=i;for(let e=a;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=s(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(l>e||a==this.children.length-1)){e=l;for(let t=a+1;ta&&ie){let t=a;a=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r=n:tn){let r=n+o.border,s=i-o.border;if(t>=r&&e<=s)return this.dirty=t==n||e==i?2:1,void(t!=r||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-r,e-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r))),!e.type.spec.raw){if(1!=i.nodeType){let t=document.createElement("span");t.appendChild(i),i=t}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class st extends ot{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class at extends ot{constructor(t,e,n,r){super(t,[],n,r),this.mark=e}static create(t,e,n,r){let i=r.nodeViews[e.type.name],s=i&&i(e,r,n);return s&&s.dom||(s=o.PW.renderSpec(document,e.type.spec.toDOM(e,n))),new at(t,e,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty0&&(o=At(o,0,t,n));for(let t=0;ta?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),d=c&&c.dom,u=c&&c.contentDOM;if(e.isText)if(d){if(3!=d.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(e.text);else d||({dom:d,contentDOM:u}=o.PW.renderSpec(document,e.type.spec.toDOM(e)));u||e.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable="false"),e.type.spec.draggable&&(d.draggable=!0));let h=d;return d=vt(d,n,e),c?a=new ht(t,e,n,r,d,u||null,h,c,i,s+1):e.isText?new dt(t,e,n,r,d,h,i):new lt(t,e,n,r,d,u||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>o.HY.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&yt(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,i=t.composing?this.localCompositionInfo(t,e):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new xt(this,s&&s.node,t);!function(t,e,n,r){let o=e.locals(t),i=0;if(0==o.length){for(let n=0;ni;)a.push(o[s++]);let f=i+h.nodeSize;if(h.isText){let t=f;s!t.inline)):a.slice(),e.forChild(i,h),p),i=f}}(this.node,this.innerDeco,((e,i,s)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!s&&l.syncToMarks(i==this.node.childCount?o.vc.none:this.node.child(i).marks,n,t),l.placeWidget(e,t,r)}),((e,o,s,c)=>{let d;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,o,s,c)||a&&t.state.selection.from>r&&t.state.selection.to-1&&l.updateNodeAt(e,o,s,d,t)||l.updateNextNode(e,o,s,t,c,r)||l.addNode(e,o,s,t,r),r+=e.nodeSize})),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),pt(this.contentDOM,this.children,t),E&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:o}=t.state.selection;if(!(t.state.selection instanceof r.Bs)||ne+this.node.content.size)return null;let i=t.domSelectionRange(),s=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=p(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let t=a=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,o-e);return r<0?null:{node:s,pos:r,text:t}}return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let o=e;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new st(this,o,e,r);t.input.compositionNodes.push(i),this.children=At(this.children,n,n+r.length,t,i)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node)||(this.updateInner(t,e,n,r),0))}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(yt(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=bt(this.dom,this.nodeDOM,gt(this.outerDeco,this.node,e),gt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ct(t,e,n,r,o){vt(r,e,t);let i=new lt(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class dt extends lt{constructor(t,e,n,r,o,i,s){super(t,e,n,r,o,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node)||(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,0))}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new dt(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class ut extends ot{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class ht extends lt{constructor(t,e,n,r,o,i,s,a,l,c){super(t,e,n,r,o,i,s,l,c),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(t,e,n);return o&&this.updateInner(t,e,n,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function pt(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof at)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n>1,i=Math.min(o,t.length);for(;r-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=at.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r=n||d<=e?i.push(l):(cn&&i.push(l.slice(n-c,l.size,r)))}return i}function Mt(t,e=null){let n=t.domSelectionRange(),o=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),a=i&&0==i.size,l=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,d,u=o.resolve(l);if(m(n)){for(c=u;i&&!i.node;)i=i.parent;let t=i.node;if(i&&t.isAtom&&r.qv.isSelectable(t)&&i.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,o=e==p(t);r||o;){if(t==n)return!0;let e=s(t);if(!(t=t.parentNode))return!1;r=r&&0==e,o=o&&e==p(t)}}(n.focusNode,n.focusOffset,i.dom))){let t=i.posBefore;d=new r.qv(l==t?u:o.resolve(t))}}else{let e=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(e<0)return null;c=o.resolve(e)}return d||(d=It(t,c,u,"pointer"==e||t.state.selection.head{n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{St(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Tt=O||_&&T<63;function Ot(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=rr(t,e,n)))||r.Bs.between(e,n,o)}function Rt(t){return!(t.editable&&!t.hasFocus())&&zt(t)}function zt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function Pt(t,e){let{$anchor:n,$head:o}=t.selection,i=e>0?n.max(o):n.min(o),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&r.Y1.findFrom(s,e)}function Ht(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function qt(t,e,n){let o=t.state.selection;if(!(o instanceof r.Bs)){if(o instanceof r.qv&&o.node.isInline)return Ht(t,new r.Bs(e>0?o.$to:o.$from));{let n=Pt(t.state,e);return!!n&&Ht(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=o,i=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(n.pos+i.nodeSize*(e<0?-1:1));return Ht(t,new r.Bs(o.$anchor,s))}if(!o.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Pt(t.state,e);return!!(n&&n instanceof r.qv)&&Ht(t,n)}if(!(D&&n.indexOf("m")>-1)){let n,i=o.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText)return!1;let a=e<0?i.pos-s.nodeSize:i.pos;return!!(s.isAtom||(n=t.docView.descAt(a))&&!n.contentDOM)&&(r.qv.isSelectable(s)?Ht(t,new r.qv(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):!!I&&Ht(t,new r.Bs(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function Bt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function $t(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function Ft(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,a=!1;for(M&&1==n.nodeType&&r0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if($t(t,-1))o=n,i=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Jt(n))break;{let e=n.previousSibling;for(;e&&$t(e,-1);)o=n.parentNode,i=s(e),e=e.previousSibling;if(e)n=e,r=Bt(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?jt(t,n,r):o&&jt(t,o,i)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,a=Bt(n);for(;;)if(r{t.state==o&&_t(t)}),50)}function Zt(t,e){let n=t.state.doc.resolve(e);if(!_&&!N&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),o=(n.top+n.bottom)/2;if(o>r.top&&o1)return n.leftr.top&&o1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function Ut(t,e,n){let o=t.state.selection;if(o instanceof r.Bs&&!o.empty||n.indexOf("s")>-1)return!1;if(D&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Pt(t.state,e);if(n&&n instanceof r.qv)return Ht(t,n)}if(!i.parent.inlineContent){let n=e<0?i:s,a=o instanceof r.C1?r.Y1.near(n,e):r.Y1.findFrom(n,e);return!!a&&Ht(t,a)}return!1}function Vt(t,e){if(!(t.state.selection instanceof r.Bs))return!0;let{$head:n,$anchor:o,empty:i}=t.state.selection;if(!n.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=t.state.tr;return e<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),t.dispatch(r),!0}return!1}function Yt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Wt(t,e){t.someProp("transformCopied",(n=>{e=n(e,t)}));let n=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let a=t.someProp("clipboardSerializer")||o.PW.fromSchema(t.state.schema),l=ie(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let d,u=c.firstChild,h=0;for(;u&&1==u.nodeType&&(d=re[u.nodeName.toLowerCase()]);){for(let t=d.length-1;t>=0;t--){let e=l.createElement(d[t]);for(;c.firstChild;)e.appendChild(c.firstChild);c.appendChild(e),h++}u=c.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${s}${h?` -${h}`:""} ${JSON.stringify(n)}`),{dom:c,text:t.someProp("clipboardTextSerializer",(n=>n(e,t)))||e.content.textBetween(0,e.content.size,"\n\n")}}function Gt(t,e,n,r,i){let s,a,l=i.parent.type.spec.code;if(!n&&!e)return null;let c=e&&(r||l||!n);if(c){if(t.someProp("transformPastedText",(n=>{e=n(e,l||r,t)})),l)return e?new o.p2(o.HY.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):o.p2.empty;let n=t.someProp("clipboardTextParser",(n=>n(e,i,r,t)));if(n)a=n;else{let n=i.marks(),{schema:r}=t.state,a=o.PW.fromSchema(r);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(a.serializeNode(r.text(t,n)))}))}}else t.someProp("transformPastedHTML",(e=>{n=e(n,t)})),s=function(t){let e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=ie().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);if((n=o&&re[o[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"")).reverse().join("")),r.innerHTML=t,n)for(let t=0;t0;t--){let t=s.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;s=t}if(!a){let e=t.someProp("clipboardParser")||t.someProp("domParser")||o.aw.fromSchema(t.state.schema);a=e.parseSlice(s,{preserveWhitespace:!(!c&&!u),context:i,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||Qt.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(u)a=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(e){return t}let{content:i,openStart:s,openEnd:a}=t;for(let t=n.length-2;t>=0;t-=2){let e=r.nodes[n[t]];if(!e||e.hasRequiredAttrs())break;i=o.HY.from(e.create(n[t+1],i)),s++,a++}return new o.p2(i,s,a)}(ne(a,+u[1],+u[2]),u[4]);else if(a=o.p2.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,i=e.node(n).contentMatchAt(e.index(n)),s=[];if(t.forEach((t=>{if(!s)return;let e,n=i.findWrapping(t.type);if(!n)return s=null;if(e=s.length&&r.length&&Xt(n,r,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=te(s[s.length-1],r.length));let e=Kt(t,n);s.push(e),i=i.matchType(e.type),r=n}})),s)return o.HY.from(s)}return t}(a.content,i),!0),a.openStart||a.openEnd){let t=0,e=0;for(let e=a.content.firstChild;t{a=e(a,t)})),a}const Qt=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Kt(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,o.HY.from(t));return t}function Xt(t,e,n,r,i){if(i1&&(s=0),i=n&&(l=e<0?a.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(o.HY.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(l))}function ne(t,e,n){return e{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>he(t,e))}))}function he(t,e){return t.someProp("handleDOMEvents",(n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function pe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function fe(t){return{left:t.clientX,top:t.clientY}}function me(t,e,n,r,o){if(-1==r)return!1;let i=t.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(t.someProp(e,(e=>r>i.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function ge(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function be(t,e,n,r){return me(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(n=>n(t,e,r)))}function ke(t,e,n,o){return me(t,"handleTripleClickOn",e,n,o)||t.someProp("handleTripleClick",(n=>n(t,e,o)))||function(t,e,n){if(0!=n.button)return!1;let o=t.state.doc;if(-1==e)return!!o.inlineContent&&(ge(t,r.Bs.create(o,0,o.content.size),"pointer"),!0);let i=o.resolve(e);for(let e=i.depth+1;e>0;e--){let n=e>i.depth?i.nodeAfter:i.node(e),s=i.before(e);if(n.inlineContent)ge(t,r.Bs.create(o,s+1,s+1+n.content.size),"pointer");else{if(!r.qv.isSelectable(n))continue;ge(t,r.qv.create(o,s),"pointer")}return!0}}(t,n,o)}function ve(t){return Se(t)}ae.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!xe(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!L||!_||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!E||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||function(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);if(8==n||D&&72==n&&"c"==r)return Vt(t,-1)||Ft(t,-1);if(46==n&&!e.shiftKey||D&&68==n&&"c"==r)return Vt(t,1)||Ft(t,1);if(13==n||27==n)return!0;if(37==n||D&&66==n&&"c"==r){let e=37==n?"ltr"==Zt(t,t.state.selection.from)?-1:1:-1;return qt(t,e,r)||Ft(t,e)}if(39==n||D&&70==n&&"c"==r){let e=39==n?"ltr"==Zt(t,t.state.selection.from)?1:-1:1;return qt(t,e,r)||Ft(t,e)}return 38==n||D&&80==n&&"c"==r?Ut(t,-1,r)||Ft(t,-1):40==n||D&&78==n&&"c"==r?function(t){if(!O||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Yt(t,n,"true"),setTimeout((()=>Yt(t,n,"false")),20)}return!1}(t)||Ut(t,1,r)||Ft(t,1):r==(D?"m":"c")&&(66==n||73==n||89==n||90==n)}(t,n)?n.preventDefault():de(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},ae.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},ae.keypress=(t,e)=>{let n=e;if(xe(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||D&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let o=t.state.selection;if(!(o instanceof r.Bs&&o.$from.sameParent(o.$to))){let e=String.fromCharCode(n.charCode);/[\r\n]/.test(e)||t.someProp("handleTextInput",(n=>n(t,o.$from.pos,o.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const ye=D?"metaKey":"ctrlKey";se.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=ve(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[ye]&&("singleClick"==t.input.lastClick.type?i="doubleClick":"doubleClick"==t.input.lastClick.type&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(fe(n));s&&("singleClick"==i?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new we(t,s,n,!!r)):("doubleClick"==i?be:ke)(t,s.pos,s.inside,n)?n.preventDefault():de(t,"pointer"))};class we{constructor(t,e,n,o){let i,s;if(this.view=t,this.pos=e,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[ye],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),s=e.inside;else{let n=t.state.doc.resolve(e.pos);i=n.parent,s=n.depth?n.before():0}const a=o?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||c instanceof r.qv&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!M||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),de(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>_t(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(fe(t))),this.updateAllowDefault(t),this.allowDefault||!e?de(this.view,"pointer"):function(t,e,n,o,i){return me(t,"handleClickOn",e,n,o)||t.someProp("handleClick",(n=>n(t,e,o)))||(i?function(t,e){if(-1==e)return!1;let n,o,i=t.state.selection;i instanceof r.qv&&(n=i.node);let s=t.state.doc.resolve(e);for(let t=s.depth+1;t>0;t--){let e=t>s.depth?s.nodeAfter:s.node(t);if(r.qv.isSelectable(e)){o=n&&i.$from.depth>0&&t>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(t);break}}return null!=o&&(ge(t,r.qv.create(t.state.doc,o),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),o=n.nodeAfter;return!!(o&&o.isAtom&&r.qv.isSelectable(o))&&(ge(t,new r.qv(n),"pointer"),!0)}(t,n))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||O&&this.mightDrag&&!this.mightDrag.node.isAtom||_&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(ge(this.view,r.Y1.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):de(this.view,"pointer")}move(t){this.updateAllowDefault(t),de(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function xe(t,e){return!!t.composing||!!(O&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}se.touchstart=t=>{t.input.lastTouch=Date.now(),ve(t),de(t,"pointer")},se.touchmove=t=>{t.input.lastTouch=Date.now(),de(t,"pointer")},se.contextmenu=t=>ve(t);const Ce=L?5e3:-1;function Ae(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>Se(t)),e))}function Me(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Se(t,e=!1){if(!(L&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Me(t),e||t.docView&&t.docView.dirty){let e=Mt(t);return e&&!e.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(e)):t.updateState(t.state),!0}return!1}}ae.compositionstart=ae.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),Se(t,!0),t.markCursor=null;else if(Se(t),M&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){t.domSelection().collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}Ae(t,Ce)},ae.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionPendingChanges&&Promise.resolve().then((()=>t.domObserver.flush())),t.input.compositionID++,Ae(t,20))};const _e=C&&A<15||E&&R<604;function Te(t,e,n,r,i){let s=Gt(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,i,s||o.p2.empty))))return!0;if(!s)return!1;let a=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(s),l=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Oe(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}se.copy=ae.cut=(t,e)=>{let n=e,r=t.state.selection,o="cut"==n.type;if(r.empty)return;let i=_e?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Wt(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ae.paste=(t,e)=>{let n=e;if(t.composing&&!L)return;let r=_e?null:n.clipboardData,o=t.input.shiftKey&&45!=t.input.lastKeyCode;r&&Te(t,Oe(r),r.getData("text/html"),o,n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout((()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Te(t,r.value,null,o,e):Te(t,r.textContent,r.innerHTML,o,e)}),50)}(t,n)};class Ee{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const De=D?"altKey":"ctrlKey";se.dragstart=(t,e)=>{let n=e,o=t.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i,s=t.state.selection,a=s.empty?null:t.posAtCoords(fe(n));if(a&&a.pos>=s.from&&a.pos<=(s instanceof r.qv?s.to-1:s.to));else if(o&&o.mightDrag)i=r.qv.create(t.state.doc,o.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(i=r.qv.create(t.state.doc,e.posBefore))}let l=(i||t.state.selection).content(),{dom:c,text:d}=Wt(t,l);n.dataTransfer.clearData(),n.dataTransfer.setData(_e?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",_e||n.dataTransfer.setData("text/plain",d),t.dragging=new Ee(l,!n[De],i)},se.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},ae.dragover=ae.dragenter=(t,e)=>e.preventDefault(),ae.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let a=t.posAtCoords(fe(n));if(!a)return;let l=t.state.doc.resolve(a.pos),c=s&&s.slice;c?t.someProp("transformPasted",(e=>{c=e(c,t)})):c=Gt(t,Oe(n.dataTransfer),_e?null:n.dataTransfer.getData("text/html"),!1,l);let d=!(!s||n[De]);if(t.someProp("handleDrop",(e=>e(t,n,c||o.p2.empty,d))))return void n.preventDefault();if(!c)return;n.preventDefault();let u=c?(0,i.nj)(t.state.doc,l.pos,c):l.pos;null==u&&(u=l.pos);let h=t.state.tr;if(d){let{node:t}=s;t?t.replace(h):h.deleteSelection()}let p=h.mapping.map(u),f=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=h.doc;if(f?h.replaceRangeWith(p,p,c.content.firstChild):h.replaceRange(p,p,c),h.doc.eq(m))return;let g=h.doc.resolve(p);if(f&&r.qv.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))h.setSelection(new r.qv(g));else{let e=h.mapping.map(u);h.mapping.maps[h.mapping.maps.length-1].forEach(((t,n,r,o)=>e=o)),h.setSelection(It(t,g,h.doc.resolve(e)))}t.focus(),t.dispatch(h.setMeta("uiEvent","drop"))},se.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&_t(t)}),20))},se.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},se.beforeinput=(t,e)=>{if(_&&L&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,g(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let t in ae)se[t]=ae[t];function Ne(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Le{constructor(t,e){this.toDOM=t,this.spec=e||He,this.side=this.spec.side||0}map(t,e,n,r){let{pos:o,deleted:i}=t.mapResult(e.from+r,this.side<0?-1:1);return i?null:new ze(o-n,o-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Le&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ne(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ie{constructor(t,e){this.attrs=t,this.spec=e||He}map(t,e,n,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new ze(o,i,this)}valid(t,e){return e.from=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;it){let s=this.children[i]+1;this.children[i+2].findInner(t-s,e-s,n,r+s,o)}}map(t,e,n){return this==Be||0==t.maps.length?this:this.mapInner(t,e,0,0,n||He)}mapInner(t,e,n,r,o){let i;for(let s=0;s{let s=i-o-(n-t);for(let o=0;oi+e-r)continue;let l=a[o]+e-r;n>=l?a[o+1]=t<=l?-2:-1:t>=e&&s&&(a[o]+=s,a[o+1]+=s)}r+=s})),e=n.maps[t].map(e,-1)}let l=!1;for(let e=0;e=r.content.size){l=!0;continue}let u=n.map(t[e+1]+i,-1)-o,{index:h,offset:p}=r.content.findIndex(d),f=r.maybeChild(h);if(f&&p==d&&p+f.nodeSize==u){let r=a[e+2].mapInner(n,f,c+1,t[e]+i+1,s);r!=Be?(a[e]=d,a[e+1]=u,a[e+2]=r):(a[e+1]=-2,l=!0)}else l=!0}if(l){let l=function(t,e,n,r,o,i,s){function a(t,e){for(let i=0;i{let s,a=i+n;if(s=Je(e,t,a)){for(r||(r=this.children.slice());oi&&e.to=t){this.children[e]==t&&(n=this.children[e+2]);break}let o=t+1,i=o+e.content.size;for(let t=0;to&&e.type instanceof Ie){let t=Math.max(o,e.from)-o,n=Math.min(i,e.to)-o;tn.map(t,e,He)));return $e.from(n)}forChild(t,e){if(e.isLeaf)return qe.empty;let n=[];for(let r=0;rt instanceof qe))?t:t.reduce(((t,e)=>t.concat(e instanceof qe?e:e.members)),[]))}}}function Fe(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;rn&&e.to{let a=Je(t,e,s+n);if(a){i=!0;let t=Ze(a,e,n+s+1,r);t!=Be&&o.push(s,s+e.nodeSize,t)}}));let s=Fe(i?je(t):t,-n).sort(Ue);for(let t=0;t0;)e++;t.splice(e,0,n)}function We(t){let e=[];return t.someProp("decorations",(n=>{let r=n(t.state);r&&r!=Be&&e.push(r)})),t.cursorWrapper&&e.push(qe.create(t.state.doc,[t.cursorWrapper.deco])),$e.from(e)}const Ge={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Qe=C&&A<=11;class Ke{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Xe{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Ke,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),Qe&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Ge)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Rt(this.view)){if(this.suppressingSelectionUpdates)return _t(this.view);if(C&&A<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let e=t.focusNode;e;e=a(e))n.add(e);for(let r=t.anchorNode;r;r=a(r))if(n.has(r)){e=r;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Rt(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let t=0;t1){let t=l.filter((t=>"BR"==t.nodeName));if(2==t.length){let e=t[0],n=t[1];e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),function(t){if(!tn.has(t)&&(tn.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace))){if(t.requiresGeckoHackNode=M,en)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),en=!0}}(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||_t(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;ne.content.size?null:It(t,e.resolve(n.anchor),e.resolve(n.head))}function sn(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,o++}return o}function an(t){if(2!=t.length)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class ln{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ce,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(pn),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=un(this),dn(this),this.nodeViews=hn(this),this.docView=ct(this.state.doc,cn(this),We(this),this.dom,this),this.domObserver=new Xe(this,((t,e,n,i)=>function(t,e,n,i,s){let a=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=Mt(t,e);if(n&&!t.state.selection.eq(n)){if(_&&L&&13===t.input.lastKeyCode&&Date.now()-100e(t,g(13,"Enter")))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),a&&r.setMeta("composition",a),t.dispatch(r)}return}let l=t.state.doc.resolve(e),c=l.sharedDepth(n);e=l.before(c+1),n=t.state.doc.resolve(n).after(c+1);let d,u,h=t.state.selection,p=function(t,e,n){let r,{node:i,fromOffset:s,toOffset:a,from:l,to:c}=t.docView.parseRange(e,n),d=t.domSelectionRange(),u=d.anchorNode;if(u&&t.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:d.anchorOffset}],m(d)||r.push({node:d.focusNode,offset:d.focusOffset})),_&&8===t.input.lastKeyCode)for(let t=a;t>s;t--){let e=i.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){a=t;break}if(!n||n.size)break}let h=t.state.doc,p=t.someProp("domParser")||o.aw.fromSchema(t.state.schema),f=h.resolve(l),g=null,b=p.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:nn,context:f});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),g={anchor:t+l,head:e+l}}return{doc:b,sel:g,from:l,to:c}}(t,e,n),f=t.state.doc,b=f.slice(p.from,p.to);8===t.input.lastKeyCode&&Date.now()-100=s?i-r:0;i-=t,i&&i=a?i-r:0;i-=e,i&&iDate.now()-225||L)&&s.some((t=>1==t.nodeType&&!rn.test(t.nodeName)))&&(!k||k.endA>=k.endB)&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!k){if(!(i&&h instanceof r.Bs&&!h.empty&&h.$head.sameParent(h.$anchor))||t.composing||p.sel&&p.sel.anchor!=p.sel.head){if(p.sel){let e=on(t,t.state.doc,p.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);a&&n.setMeta("composition",a),t.dispatch(n)}}return}k={start:h.from,endA:h.to,endB:h.to}}if(_&&t.cursorWrapper&&p.sel&&p.sel.anchor==t.cursorWrapper.deco.from&&p.sel.head==p.sel.anchor){let t=k.endB-k.start;p.sel={anchor:p.sel.anchor+t,head:p.sel.anchor+t}}t.input.domChangeCount++,t.state.selection.fromt.state.selection.from&&k.start<=t.state.selection.from+2&&t.state.selection.from>=p.from?k.start=t.state.selection.from:k.endA=t.state.selection.to-2&&t.state.selection.to<=p.to&&(k.endB+=t.state.selection.to-k.endA,k.endA=t.state.selection.to)),C&&A<=11&&k.endB==k.start+1&&k.endA==k.start&&k.start>p.from&&"  "==p.doc.textBetween(k.start-p.from-1,k.start-p.from+1)&&(k.start--,k.endA--,k.endB--);let v,y=p.doc.resolveNoCache(k.start-p.from),w=p.doc.resolveNoCache(k.endB-p.from),x=f.resolve(k.start),M=y.sameParent(w)&&y.parent.inlineContent&&x.end()>=k.endA;if((E&&t.input.lastIOSEnter>Date.now()-225&&(!M||s.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!M&&y.pose(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>k.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||sn(r,!0,!1)n||sn(s,!0,!1)e(t,g(8,"Backspace")))))return void(L&&_&&t.domObserver.suppressSelectionUpdates());_&&L&&k.endB==k.start&&(t.input.lastAndroidDelete=Date.now()),L&&!M&&y.start()!=w.start()&&0==w.parentOffset&&y.depth==w.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==k.endA&&(k.endB-=2,w=p.doc.resolveNoCache(k.endB-p.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,g(13,"Enter"))}))}),20));let S,T,O,D=k.start,N=k.endA;if(M)if(y.pos==w.pos)C&&A<=11&&0==y.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>_t(t)),20)),S=t.state.tr.delete(D,N),T=f.resolve(k.start).marksAcross(f.resolve(k.endA));else if(k.endA==k.endB&&(O=function(t,e){let n,r,i,s=t.firstChild.marks,a=e.firstChild.marks,l=s,c=a;for(let t=0;tt.mark(r.addToSet(t.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",i=t=>t.mark(r.removeFromSet(t.marks))}let d=[];for(let t=0;tn(t,D,N,e))))return;S=t.state.tr.insertText(e,D,N)}if(S||(S=t.state.tr.replace(D,N,p.doc.slice(k.start-p.from,k.endB-p.from))),p.sel){let e=on(t,S.doc,p.sel);e&&!(_&&L&&t.composing&&e.empty&&(k.start!=k.endB||t.input.lastAndroidDelete{!pe(t,e)||he(t,e)||!t.editable&&e.type in ae||n(t,e)},le[e]?{passive:!0}:void 0)}O&&t.dom.addEventListener("input",(()=>null)),ue(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&ue(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(pn),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let r=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(Me(this),i=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=hn(this);(function(t,e){let n=0,r=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let t in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,o=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&ue(this),this.editable=un(this),dn(this);let a=We(this),l=cn(this),c=r.plugins==t.plugins||r.doc.eq(t.doc)?t.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",u=o||!this.docView.matchesNode(t.doc,l,a);!u&&t.selection.eq(r.selection)||(i=!0);let h="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s=o-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:B(t.dom)}}(this);if(i){this.domObserver.stop();let e=u&&(C||_)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(r.selection,t.selection);if(u){let n=_?this.trackWrites=this.domSelectionRange().focusNode:null;!o&&this.docView.update(t.doc,l,a,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ct(t.doc,l,a,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return d(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?_t(this,e):(Nt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():h&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;$(n,0==r?0:r-e)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(this.state.selection instanceof r.qv){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&q(this,e.getBoundingClientRect(),t)}else q(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e0&&this.state.doc.nodeAt(t))==n.node&&(o=t)}this.dragging=new Ee(t.slice,t.move,o<0?void 0:r.qv.create(this.state.doc,o))}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let r=0;rt.ownerDocument.getSelection()),this._root=t;return t||document}updateRoot(){this._root=null}posAtCoords(t){return U(this,t)}coordsAtPos(t,e=1){return G(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return function(t,e,n){return et==e&&nt==n?rt:(et=e,nt=n,rt="up"==n||"down"==n?function(t,e,n){let r=e.selection,o="up"==n?r.$from:r.$to;return X(t,e,(()=>{let{node:e}=t.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let r=G(t,o.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=c(t,0,t.nodeValue.length).getClientRects()}for(let t=0;to.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=t.domSelection();return tt.test(r.parent.textContent)&&a.modify?X(t,e,(()=>{let{focusNode:e,focusOffset:o,anchorNode:i,anchorOffset:s}=t.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:u}=t.domSelectionRange(),h=d&&!c.contains(1==d.nodeType?d:d.parentNode)||e==d&&o==u;try{a.collapse(i,s),e&&(e!=i||o!=s)&&a.extend&&a.extend(e,o)}catch(t){}return null!=l&&(a.caretBidiLevel=l),h})):"left"==n||"backward"==n?i:s}(t,e,n))}(this,e||this.state,t)}pasteHTML(t,e){return Te(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Te(this,t,null,!0,e||new ClipboardEvent("paste"))}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],We(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){he(t,e)||!se[e.type]||!t.editable&&e.type in ae||se[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return O&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom?function(t){let e;function n(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0);let r=e.startContainer,o=e.startOffset,i=e.endContainer,s=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return d(a.node,a.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function cn(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),e.translate||(e.translate="no"),[ze.node(0,t.state.doc.content.size,e)]}function dn(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:ze.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function un(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function hn(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function pn(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},93854:t=>{t.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')}}]); \ No newline at end of file diff --git a/7195.94c7e156baaa7c206013.js b/7195.94c7e156baaa7c206013.js new file mode 100644 index 000000000..6a3ada2b3 --- /dev/null +++ b/7195.94c7e156baaa7c206013.js @@ -0,0 +1 @@ +(self.webpackChunktui_editor=self.webpackChunktui_editor||[]).push([[7195],{43283:(t,e,n)=>{function r(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))})),t}function o(t){return Object.prototype.toString.call(t)}function i(t){return"[object Function]"===o(t)}function s(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var a={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(t,e,n){var r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){var r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&":"===t[e-3]||e>=3&&"/"===t[e-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){var r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",d="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(t){var e=t.re=n(82264)(t.__opts__),r=t.__tlds__.slice();function a(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||r.push(c),r.push(e.src_xn),e.src_tlds=r.join("|"),e.email_fuzzy=RegExp(a(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(a(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(a(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(a(e.tpl_host_fuzzy_test),"i");var l=[];function d(t,e){throw new Error('(LinkifyIt) Invalid schema "'+t+'": '+e)}t.__compiled__={},Object.keys(t.__schemas__).forEach((function(e){var n=t.__schemas__[e];if(null!==n){var r={validate:null,link:null};if(t.__compiled__[e]=r,"[object Object]"===o(n))return"[object RegExp]"!==o(n.validate)?i(n.validate)?r.validate=n.validate:d(e,n):r.validate=function(t){return function(e,n){var r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}(n.validate),void(i(n.normalize)?r.normalize=n.normalize:n.normalize?d(e,n):r.normalize=function(t,e){e.normalize(t)});"[object String]"!==o(n)?d(e,n):l.push(e)}})),l.forEach((function(e){t.__compiled__[t.__schemas__[e]]&&(t.__compiled__[e].validate=t.__compiled__[t.__schemas__[e]].validate,t.__compiled__[e].normalize=t.__compiled__[t.__schemas__[e]].normalize)})),t.__compiled__[""]={validate:null,normalize:function(t,e){e.normalize(t)}};var u=Object.keys(t.__compiled__).filter((function(e){return e.length>0&&t.__compiled__[e]})).map(s).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+u+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+u+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),function(t){t.__index__=-1,t.__text_cache__=""}(t)}function h(t,e){var n=t.__index__,r=t.__last_index__,o=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=o,this.text=o,this.url=o}function p(t,e){var n=new h(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function f(t,e){if(!(this instanceof f))return new f(t,e);var n;e||(n=t,Object.keys(n||{}).reduce((function(t,e){return t||a.hasOwnProperty(e)}),!1)&&(e=t,t={})),this.__opts__=r({},a,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,t),this.__compiled__={},this.__tlds__=d,this.__tlds_replaced__=!1,this.re={},u(this)}f.prototype.add=function(t,e){return this.__schemas__[t]=e,u(this),this},f.prototype.set=function(t){return this.__opts__=r(this.__opts__,t),this},f.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var e,n,r,o,i,s,a,l;if(this.re.schema_test.test(t))for((a=this.re.schema_search).lastIndex=0;null!==(e=a.exec(t));)if(o=this.testSchemaAt(t,e[2],a.lastIndex)){this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l=0&&null!==(r=t.match(this.re.email_fuzzy))&&(i=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||ithis.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=s)),this.__index__>=0},f.prototype.pretest=function(t){return this.re.pretest.test(t)},f.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0},f.prototype.match=function(t){var e=0,n=[];this.__index__>=0&&this.__text_cache__===t&&(n.push(p(this,e)),e=this.__last_index__);for(var r=e?t.slice(e):t;this.test(r);)n.push(p(this,e)),r=r.slice(this.__last_index__),e+=this.__last_index__;return n.length?n:null},f.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;var e=this.re.schema_at_start.exec(t);if(!e)return null;var n=this.testSchemaAt(t,e[2],e[0].length);return n?(this.__schema__=e[2],this.__index__=e.index+e[1].length,this.__last_index__=e.index+e[0].length+n,p(this,0)):null},f.prototype.tlds=function(t,e){return t=Array.isArray(t)?t:[t],e?(this.__tlds__=this.__tlds__.concat(t).sort().filter((function(t,e,n){return t!==n[e-1]})).reverse(),u(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,u(this),this)},f.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url="mailto:"+t.url)},f.prototype.onCompile=function(){},t.exports=f},82264:(t,e,n)=>{t.exports=function(t){var e={};return t=t||{},e.src_Any=n(47531).source,e.src_Cc=n(87701).source,e.src_Z=n(72927).source,e.src_P=n(76155).source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|"),e.src_pseudo_letter="(?:(?![><|]|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|[><|]|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy='(^|[><|]|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}},82033:(t,e,n)=>{t.exports=n(53612)},27973:(t,e,n)=>{t.exports=n(93854)},7661:t=>{t.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},91418:t=>{var e="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+e+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),o=new RegExp("^(?:"+e+"|"+n+")");t.exports.n=r,t.exports.q=o},1128:(t,e,n)=>{var r=Object.prototype.hasOwnProperty;function o(t,e){return r.call(t,e)}function i(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function s(t){if(t>65535){var e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i,d=n(27973),u=/[&<>"]/,h=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function f(t){return p[t]}var m=/[.?*+^$[\]\\(){}|-]/g,g=n(76155);e.lib={},e.lib.mdurl=n(59213),e.lib.ucmicro=n(98786),e.assign=function(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t},e.isString=function(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)},e.has=o,e.unescapeMd=function(t){return t.indexOf("\\")<0?t:t.replace(a,"$1")},e.unescapeAll=function(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(l,(function(t,e,n){return e||function(t,e){var n;return o(d,e)?d[e]:35===e.charCodeAt(0)&&c.test(e)&&i(n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10))?s(n):t}(t,n)}))},e.isValidEntityCode=i,e.fromCodePoint=s,e.escapeHtml=function(t){return u.test(t)?t.replace(h,f):t},e.arrayReplaceAt=function(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))},e.isSpace=function(t){switch(t){case 9:case 32:return!0}return!1},e.isWhiteSpace=function(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},e.isMdAsciiPunct=function(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},e.isPunctChar=function(t){return g.test(t)},e.escapeRE=function(t){return t.replace(m,"\\$&")},e.normalizeReference=function(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}},83415:(t,e,n)=>{e.parseLinkLabel=n(82111),e.parseLinkDestination=n(42565),e.parseLinkTitle=n(24364)},42565:(t,e,n)=>{var r=n(1128).unescapeAll;t.exports=function(t,e,n){var o,i,s=e,a={ok:!1,pos:0,lines:0,str:""};if(60===t.charCodeAt(s)){for(s++;s32)return a;if(41===o){if(0===i)break;i--}s++}return e===s||0!==i||(a.str=r(t.slice(e,s)),a.pos=s,a.ok=!0),a}},82111:t=>{t.exports=function(t,e,n){var r,o,i,s,a=-1,l=t.posMax,c=t.pos;for(t.pos=e+1,r=1;t.pos{var r=n(1128).unescapeAll;t.exports=function(t,e,n){var o,i,s=0,a=e,l={ok:!1,pos:0,lines:0,str:""};if(a>=n)return l;if(34!==(i=t.charCodeAt(a))&&39!==i&&40!==i)return l;for(a++,40===i&&(i=41);a{var r=n(1128),o=n(83415),i=n(8696),s=n(88785),a=n(79304),l=n(76596),c=n(43283),d=n(59213),u=n(61911),h={default:n(18910),zero:n(85123),commonmark:n(16535)},p=/^(vbscript|javascript|file|data):/,f=/^data:image\/(gif|png|jpeg|webp);/;function m(t){var e=t.trim().toLowerCase();return!p.test(e)||!!f.test(e)}var g=["http:","https:","mailto:"];function b(t){var e=d.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toASCII(e.hostname)}catch(t){}return d.encode(d.format(e))}function k(t){var e=d.parse(t,!0);if(e.hostname&&(!e.protocol||g.indexOf(e.protocol)>=0))try{e.hostname=u.toUnicode(e.hostname)}catch(t){}return d.decode(d.format(e),d.decode.defaultChars+"%")}function v(t,e){if(!(this instanceof v))return new v(t,e);e||r.isString(t)||(e=t||{},t="default"),this.inline=new l,this.block=new a,this.core=new s,this.renderer=new i,this.linkify=new c,this.validateLink=m,this.normalizeLink=b,this.normalizeLinkText=k,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(t),e&&this.set(e)}v.prototype.set=function(t){return r.assign(this.options,t),this},v.prototype.configure=function(t){var e,n=this;if(r.isString(t)&&!(t=h[e=t]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach((function(e){t.components[e].rules&&n[e].ruler.enableOnly(t.components[e].rules),t.components[e].rules2&&n[e].ruler2.enableOnly(t.components[e].rules2)})),this},v.prototype.enable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.enable(t,!0))}),this),n=n.concat(this.inline.ruler2.enable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},v.prototype.disable=function(t,e){var n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.disable(t,!0))}),this),n=n.concat(this.inline.ruler2.disable(t,!0));var r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},v.prototype.use=function(t){var e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},v.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");var n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},v.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},v.prototype.parseInline=function(t,e){var n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},v.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)},t.exports=v},79304:(t,e,n)=>{var r=n(49199),o=[["table",n(6938),["paragraph","reference"]],["code",n(13670)],["fence",n(18306),["paragraph","reference","blockquote","list"]],["blockquote",n(49699),["paragraph","reference","blockquote","list"]],["hr",n(15297),["paragraph","reference","blockquote","list"]],["list",n(81890),["paragraph","reference","blockquote"]],["reference",n(78731)],["html_block",n(5849),["paragraph","reference","blockquote"]],["heading",n(91002),["paragraph","reference","blockquote"]],["lheading",n(14781)],["paragraph",n(14408)]];function i(){this.ruler=new r;for(var t=0;t=n))&&!(t.sCount[l]=d){t.line=n;break}for(i=t.line,o=0;o=t.line)throw new Error("block rule didn't increment state.line");break}if(!r)throw new Error("none of the block rules matched");t.tight=!c,t.isEmpty(t.line-1)&&(c=!0),(l=t.line){var r=n(49199),o=[["normalize",n(15863)],["block",n(52770)],["inline",n(95390)],["linkify",n(91145)],["replacements",n(17928)],["smartquotes",n(5442)],["text_join",n(58919)]];function i(){this.ruler=new r;for(var t=0;t{var r=n(49199),o=[["text",n(58060)],["linkify",n(42876)],["newline",n(11078)],["escape",n(33747)],["backticks",n(94980)],["strikethrough",n(83182).w],["emphasis",n(80997).w],["link",n(14159)],["image",n(75012)],["autolink",n(51905)],["html_inline",n(53636)],["entity",n(97459)]],i=[["balance_pairs",n(21614)],["strikethrough",n(83182).g],["emphasis",n(80997).g],["fragments_join",n(97494)]];function s(){var t;for(this.ruler=new r,t=0;t=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;e||t.pos++,a[r]=t.pos}else t.pos=a[r]},s.prototype.tokenize=function(t){for(var e,n,r,o=this.ruler.getRules(""),i=o.length,s=t.posMax,a=t.md.options.maxNesting;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(e){if(t.pos>=s)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},s.prototype.parse=function(t,e,n,r){var o,i,s,a=new this.State(t,e,n,r);for(this.tokenize(a),s=(i=this.ruler2.getRules("")).length,o=0;o{t.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},18910:t=>{t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},85123:t=>{t.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}}},8696:(t,e,n)=>{var r=n(1128).assign,o=n(1128).unescapeAll,i=n(1128).escapeHtml,s={};function a(){this.rules=r({},s)}s.code_inline=function(t,e,n,r,o){var s=t[e];return""+i(s.content)+""},s.code_block=function(t,e,n,r,o){var s=t[e];return""+i(t[e].content)+"\n"},s.fence=function(t,e,n,r,s){var a,l,c,d,u,h=t[e],p=h.info?o(h.info).trim():"",f="",m="";return p&&(f=(c=p.split(/(\s+)/g))[0],m=c.slice(2).join("")),0===(a=n.highlight&&n.highlight(h.content,f,m)||i(h.content)).indexOf(""+a+"\n"):"
"+a+"
\n"},s.image=function(t,e,n,r,o){var i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(t,e,n)},s.hardbreak=function(t,e,n){return n.xhtmlOut?"
\n":"
\n"},s.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},s.text=function(t,e){return i(t[e].content)},s.html_block=function(t,e){return t[e].content},s.html_inline=function(t,e){return t[e].content},a.prototype.renderAttrs=function(t){var e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e\n":">")},a.prototype.renderInline=function(t,e,n){for(var r,o="",i=this.rules,s=0,a=t.length;s{function e(){this.__rules__=[],this.__cache__=null}e.prototype.__find__=function(t){for(var e=0;e{var r=n(1128).isSpace;t.exports=function(t,e,n,o){var i,s,a,l,c,d,u,h,p,f,m,g,b,k,v,y,w,x,C,A,M=t.lineMax,S=t.bMarks[e]+t.tShift[e],_=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(62!==t.src.charCodeAt(S))return!1;if(o)return!0;for(f=[],m=[],k=[],v=[],x=t.md.block.ruler.getRules("blockquote"),b=t.parentType,t.parentType="blockquote",h=e;h=(_=t.eMarks[h])));h++)if(62!==t.src.charCodeAt(S++)||A){if(d)break;for(w=!1,a=0,c=x.length;a=_,m.push(t.bsCount[h]),t.bsCount[h]=t.sCount[h]+1+(y?1:0),k.push(t.sCount[h]),t.sCount[h]=p-l,v.push(t.tShift[h]),t.tShift[h]=S-t.bMarks[h]}for(g=t.blkIndent,t.blkIndent=0,(C=t.push("blockquote_open","blockquote",1)).markup=">",C.map=u=[e,0],t.md.block.tokenize(t,e,h),(C=t.push("blockquote_close","blockquote",-1)).markup=">",t.lineMax=M,t.parentType=b,u[1]=t.line,a=0;a{t.exports=function(t,e,n){var r,o,i;if(t.sCount[e]-t.blkIndent<4)return!1;for(o=r=e+1;r=4))break;o=++r}return t.line=o,(i=t.push("code_block","code",0)).content=t.getLines(e,o,4+t.blkIndent,!1)+"\n",i.map=[e,t.line],!0}},18306:t=>{t.exports=function(t,e,n,r){var o,i,s,a,l,c,d,u=!1,h=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(h+3>p)return!1;if(126!==(o=t.src.charCodeAt(h))&&96!==o)return!1;if(l=h,(i=(h=t.skipChars(h,o))-l)<3)return!1;if(d=t.src.slice(l,h),s=t.src.slice(h,p),96===o&&s.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(a=e;!(++a>=n||(h=l=t.bMarks[a]+t.tShift[a])<(p=t.eMarks[a])&&t.sCount[a]=4||(h=t.skipChars(h,o))-l{var r=n(1128).isSpace;t.exports=function(t,e,n,o){var i,s,a,l,c=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(35!==(i=t.src.charCodeAt(c))||c>=d)return!1;for(s=1,i=t.src.charCodeAt(++c);35===i&&c6||cc&&r(t.src.charCodeAt(a-1))&&(d=a),t.line=e+1,(l=t.push("heading_open","h"+String(s),1)).markup="########".slice(0,s),l.map=[e,t.line],(l=t.push("inline","",0)).content=t.src.slice(c,d).trim(),l.map=[e,t.line],l.children=[],(l=t.push("heading_close","h"+String(s),-1)).markup="########".slice(0,s)),0))}},15297:(t,e,n)=>{var r=n(1128).isSpace;t.exports=function(t,e,n,o){var i,s,a,l,c=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(42!==(i=t.src.charCodeAt(c++))&&45!==i&&95!==i)return!1;for(s=1;c{var r=n(7661),o=n(91418).q,i=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];t.exports=function(t,e,n,r){var o,s,a,l,c=t.bMarks[e]+t.tShift[e],d=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(c))return!1;for(l=t.src.slice(c,d),o=0;o{t.exports=function(t,e,n){var r,o,i,s,a,l,c,d,u,h,p=e+1,f=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;for(h=t.parentType,t.parentType="paragraph";p3)){if(t.sCount[p]>=t.blkIndent&&(l=t.bMarks[p]+t.tShift[p])<(c=t.eMarks[p])&&(45===(u=t.src.charCodeAt(l))||61===u)&&(l=t.skipChars(l,u),(l=t.skipSpaces(l))>=c)){d=61===u?1:2;break}if(!(t.sCount[p]<0)){for(o=!1,i=0,s=f.length;i{var r=n(1128).isSpace;function o(t,e){var n,o,i,s;return o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e],42!==(n=t.src.charCodeAt(o++))&&45!==n&&43!==n||o=s)return-1;if((n=t.src.charCodeAt(i++))<48||n>57)return-1;for(;;){if(i>=s)return-1;if(!((n=t.src.charCodeAt(i++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(i-o>=10)return-1}return i=4)return!1;if(t.listIndent>=0&&t.sCount[L]-t.listIndent>=4&&t.sCount[L]=t.blkIndent&&(I=!0),(_=i(t,L))>=0){if(h=!0,E=t.bMarks[L]+t.tShift[L],k=Number(t.src.slice(E,_-1)),I&&1!==k)return!1}else{if(!((_=o(t,L))>=0))return!1;h=!1}if(I&&t.skipSpaces(_)>=t.eMarks[L])return!1;if(r)return!0;for(b=t.src.charCodeAt(_-1),g=t.tokens.length,h?(N=t.push("ordered_list_open","ol",1),1!==k&&(N.attrs=[["start",k]])):N=t.push("bullet_list_open","ul",1),N.map=m=[L,0],N.markup=String.fromCharCode(b),T=!1,D=t.md.block.ruler.getRules("list"),x=t.parentType,t.parentType="list";L=v?1:y-u)>4&&(d=1),c=u+d,(N=t.push("list_item_open","li",1)).markup=String.fromCharCode(b),N.map=p=[L,0],h&&(N.info=t.src.slice(E,_-1)),M=t.tight,A=t.tShift[L],C=t.sCount[L],w=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=c,t.tight=!0,t.tShift[L]=a-t.bMarks[L],t.sCount[L]=y,a>=v&&t.isEmpty(L+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,L,n,!0),t.tight&&!T||(R=!1),T=t.line-L>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=w,t.tShift[L]=A,t.sCount[L]=C,t.tight=M,(N=t.push("list_item_close","li",-1)).markup=String.fromCharCode(b),L=t.line,p[1]=L,L>=n)break;if(t.sCount[L]=4)break;for(O=!1,l=0,f=D.length;l{t.exports=function(t,e,n){var r,o,i,s,a,l,c=e+1,d=t.md.block.ruler.getRules("paragraph");for(l=t.parentType,t.parentType="paragraph";c3||t.sCount[c]<0)){for(o=!1,i=0,s=d.length;i{var r=n(1128).normalizeReference,o=n(1128).isSpace;t.exports=function(t,e,n,i){var s,a,l,c,d,u,h,p,f,m,g,b,k,v,y,w,x=0,C=t.bMarks[e]+t.tShift[e],A=t.eMarks[e],M=e+1;if(t.sCount[e]-t.blkIndent>=4)return!1;if(91!==t.src.charCodeAt(C))return!1;for(;++C3||t.sCount[M]<0)){for(v=!1,u=0,h=y.length;u{var r=n(77762),o=n(1128).isSpace;function i(t,e,n,r){var i,s,a,l,c,d,u,h;for(this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",h=!1,a=l=d=u=0,c=(s=this.src).length;l0&&this.level++,this.tokens.push(o),o},i.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},i.prototype.skipEmptyLines=function(t){for(var e=this.lineMax;te;)if(!o(this.src.charCodeAt(--t)))return t+1;return t},i.prototype.skipChars=function(t,e){for(var n=this.src.length;tn;)if(e!==this.src.charCodeAt(--t))return t+1;return t},i.prototype.getLines=function(t,e,n,r){var i,s,a,l,c,d,u,h=t;if(t>=e)return"";for(d=new Array(e-t),i=0;hn?new Array(s-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return d.join("")},i.prototype.Token=r,t.exports=i},6938:(t,e,n)=>{var r=n(1128).isSpace;function o(t,e){var n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function i(t){var e,n=[],r=0,o=t.length,i=!1,s=0,a="";for(e=t.charCodeAt(r);rn)return!1;if(h=e+1,t.sCount[h]=4)return!1;if((c=t.bMarks[h]+t.tShift[h])>=t.eMarks[h])return!1;if(124!==(C=t.src.charCodeAt(c++))&&45!==C&&58!==C)return!1;if(c>=t.eMarks[h])return!1;if(124!==(A=t.src.charCodeAt(c++))&&45!==A&&58!==A&&!r(A))return!1;if(45===C&&r(A))return!1;for(;c=4)return!1;if((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),0===(f=p.length)||f!==g.length)return!1;if(s)return!0;for(y=t.parentType,t.parentType="table",x=t.md.block.ruler.getRules("blockquote"),(m=t.push("table_open","table",1)).map=k=[e,0],(m=t.push("thead_open","thead",1)).map=[e,e+1],(m=t.push("tr_open","tr",1)).map=[e,e+1],d=0;d=4)break;for((p=i(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),h===e+2&&((m=t.push("tbody_open","tbody",1)).map=v=[e+2,0]),(m=t.push("tr_open","tr",1)).map=[h,h+1],d=0;d{t.exports=function(t){var e;t.inlineMode?((e=new t.Token("inline","",0)).content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}},95390:t=>{t.exports=function(t){var e,n,r,o=t.tokens;for(n=0,r=o.length;n{var r=n(1128).arrayReplaceAt;function o(t){return/^<\/a\s*>/i.test(t)}t.exports=function(t){var e,n,i,s,a,l,c,d,u,h,p,f,m,g,b,k,v,y,w=t.tokens;if(t.md.options.linkify)for(n=0,i=w.length;n=0;e--)if("link_close"!==(l=s[e]).type){if("html_inline"===l.type&&(y=l.content,/^\s]/i.test(y)&&m>0&&m--,o(l.content)&&m++),!(m>0)&&"text"===l.type&&t.md.linkify.test(l.content)){for(u=l.content,v=t.md.linkify.match(u),c=[],f=l.level,p=0,v.length>0&&0===v[0].index&&e>0&&"text_special"===s[e-1].type&&(v=v.slice(1)),d=0;dp&&((a=new t.Token("text","",0)).content=u.slice(p,h),a.level=f,c.push(a)),(a=new t.Token("link_open","a",1)).attrs=[["href",b]],a.level=f++,a.markup="linkify",a.info="auto",c.push(a),(a=new t.Token("text","",0)).content=k,a.level=f,c.push(a),(a=new t.Token("link_close","a",-1)).level=--f,a.markup="linkify",a.info="auto",c.push(a),p=v[d].lastIndex);p{var e=/\r\n?|\n/g,n=/\0/g;t.exports=function(t){var r;r=(r=t.src.replace(e,"\n")).replace(n,"�"),t.src=r}},17928:t=>{var e=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r)\)/i,r=/\((c|tm|r)\)/gi,o={c:"©",r:"®",tm:"™"};function i(t,e){return o[e.toLowerCase()]}function s(t){var e,n,o=0;for(e=t.length-1;e>=0;e--)"text"!==(n=t[e]).type||o||(n.content=n.content.replace(r,i)),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}function a(t){var n,r,o=0;for(n=t.length-1;n>=0;n--)"text"!==(r=t[n]).type||o||e.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&o--,"link_close"===r.type&&"auto"===r.info&&o++}t.exports=function(t){var r;if(t.md.options.typographer)for(r=t.tokens.length-1;r>=0;r--)"inline"===t.tokens[r].type&&(n.test(t.tokens[r].content)&&s(t.tokens[r].children),e.test(t.tokens[r].content)&&a(t.tokens[r].children))}},5442:(t,e,n)=>{var r=n(1128).isWhiteSpace,o=n(1128).isPunctChar,i=n(1128).isMdAsciiPunct,s=/['"]/,a=/['"]/g;function l(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function c(t,e){var n,s,c,d,u,h,p,f,m,g,b,k,v,y,w,x,C,A,M,S,_;for(M=[],n=0;n=0&&!(M[C].level<=p);C--);if(M.length=C+1,"text"===s.type){u=0,h=(c=s.content).length;t:for(;u=0)m=c.charCodeAt(d.index-1);else for(C=n-1;C>=0&&"softbreak"!==t[C].type&&"hardbreak"!==t[C].type;C--)if(t[C].content){m=t[C].content.charCodeAt(t[C].content.length-1);break}if(g=32,u=48&&m<=57&&(x=w=!1),w&&x&&(w=b,x=k),w||x){if(x)for(C=M.length-1;C>=0&&(f=M[C],!(M[C].level=0;e--)"inline"===t.tokens[e].type&&s.test(t.tokens[e].content)&&c(t.tokens[e].children,t)}},19124:(t,e,n)=>{var r=n(77762);function o(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}o.prototype.Token=r,t.exports=o},58919:t=>{t.exports=function(t){var e,n,r,o,i,s,a=t.tokens;for(e=0,n=a.length;e{var e=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;t.exports=function(t,r){var o,i,s,a,l,c,d=t.pos;if(60!==t.src.charCodeAt(d))return!1;for(l=t.pos,c=t.posMax;;){if(++d>=c)return!1;if(60===(a=t.src.charCodeAt(d)))return!1;if(62===a)break}return o=t.src.slice(l+1,d),n.test(o)?(i=t.md.normalizeLink(o),!!t.md.validateLink(i)&&(r||((s=t.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=t.push("text","",0)).content=t.md.normalizeLinkText(o),(s=t.push("link_close","a",-1)).markup="autolink",s.info="auto"),t.pos+=o.length+2,!0)):!!e.test(o)&&(i=t.md.normalizeLink("mailto:"+o),!!t.md.validateLink(i)&&(r||((s=t.push("link_open","a",1)).attrs=[["href",i]],s.markup="autolink",s.info="auto",(s=t.push("text","",0)).content=t.md.normalizeLinkText(o),(s=t.push("link_close","a",-1)).markup="autolink",s.info="auto"),t.pos+=o.length+2,!0))}},94980:t=>{t.exports=function(t,e){var n,r,o,i,s,a,l,c,d=t.pos;if(96!==t.src.charCodeAt(d))return!1;for(n=d,d++,r=t.posMax;d{function e(t){var e,n,r,o,i,s,a,l,c={},d=t.length;if(d){var u=0,h=-2,p=[];for(e=0;ei;n-=p[n]+1)if((o=t[n]).marker===r.marker&&o.open&&o.end<0&&(a=!1,(o.close||r.open)&&(o.length+r.length)%3==0&&(o.length%3==0&&r.length%3==0||(a=!0)),!a)){l=n>0&&!t[n-1].open?p[n-1]+1:0,p[e]=e-n+l,p[n]=l,r.open=!1,o.end=e,o.close=!1,s=-1,h=-2;break}-1!==s&&(c[r.marker][(r.open?3:0)+(r.length||0)%3]=s)}}}t.exports=function(t){var n,r=t.tokens_meta,o=t.tokens_meta.length;for(e(t.delimiters),n=0;n{function e(t,e){var n,r,o,i,s,a;for(n=e.length-1;n>=0;n--)95!==(r=e[n]).marker&&42!==r.marker||-1!==r.end&&(o=e[r.end],a=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,s=String.fromCharCode(r.marker),(i=t.tokens[r.token]).type=a?"strong_open":"em_open",i.tag=a?"strong":"em",i.nesting=1,i.markup=a?s+s:s,i.content="",(i=t.tokens[o.token]).type=a?"strong_close":"em_close",i.tag=a?"strong":"em",i.nesting=-1,i.markup=a?s+s:s,i.content="",a&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--))}t.exports.w=function(t,e){var n,r,o=t.pos,i=t.src.charCodeAt(o);if(e)return!1;if(95!==i&&42!==i)return!1;for(r=t.scanDelims(t.pos,42===i),n=0;n{var r=n(27973),o=n(1128).has,i=n(1128).isValidEntityCode,s=n(1128).fromCodePoint,a=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;t.exports=function(t,e){var n,c,d,u=t.pos,h=t.posMax;if(38!==t.src.charCodeAt(u))return!1;if(u+1>=h)return!1;if(35===t.src.charCodeAt(u+1)){if(c=t.src.slice(u).match(a))return e||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),(d=t.push("text_special","",0)).content=i(n)?s(n):s(65533),d.markup=c[0],d.info="entity"),t.pos+=c[0].length,!0}else if((c=t.src.slice(u).match(l))&&o(r,c[1]))return e||((d=t.push("text_special","",0)).content=r[c[1]],d.markup=c[0],d.info="entity"),t.pos+=c[0].length,!0;return!1}},33747:(t,e,n)=>{for(var r=n(1128).isSpace,o=[],i=0;i<256;i++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(t){o[t.charCodeAt(0)]=1})),t.exports=function(t,e){var n,i,s,a,l,c=t.pos,d=t.posMax;if(92!==t.src.charCodeAt(c))return!1;if(++c>=d)return!1;if(10===(n=t.src.charCodeAt(c))){for(e||t.push("hardbreak","br",0),c++;c=55296&&n<=56319&&c+1=56320&&i<=57343&&(a+=t.src[c+1],c++),s="\\"+a,e||(l=t.push("text_special","",0),n<256&&0!==o[n]?l.content=a:l.content=s,l.markup=s,l.info="escape"),t.pos=c+1,!0}},97494:t=>{t.exports=function(t){var e,n,r=0,o=t.tokens,i=t.tokens.length;for(e=n=0;e0&&r++,"text"===o[e].type&&e+1{var r=n(91418).n;t.exports=function(t,e){var n,o,i,s,a,l=t.pos;return!(!t.md.options.html||(i=t.posMax,60!==t.src.charCodeAt(l)||l+2>=i||33!==(n=t.src.charCodeAt(l+1))&&63!==n&&47!==n&&!function(t){var e=32|t;return e>=97&&e<=122}(n)||!(o=t.src.slice(l).match(r))||(e||((s=t.push("html_inline","",0)).content=o[0],a=s.content,/^\s]/i.test(a)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(s.content)&&t.linkLevel--),t.pos+=o[0].length,0)))}},75012:(t,e,n)=>{var r=n(1128).normalizeReference,o=n(1128).isSpace;t.exports=function(t,e){var n,i,s,a,l,c,d,u,h,p,f,m,g,b="",k=t.pos,v=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;if(c=t.pos+2,(l=t.md.helpers.parseLinkLabel(t,t.pos+1,!1))<0)return!1;if((d=l+1)=v)return!1;for(g=d,(h=t.md.helpers.parseLinkDestination(t.src,d,t.posMax)).ok&&(b=t.md.normalizeLink(h.str),t.md.validateLink(b)?d=h.pos:b=""),g=d;d=v||41!==t.src.charCodeAt(d))return t.pos=k,!1;d++}else{if(void 0===t.env.references)return!1;if(d=0?a=t.src.slice(g,d++):d=l+1):d=l+1,a||(a=t.src.slice(c,l)),!(u=t.env.references[r(a)]))return t.pos=k,!1;b=u.href,p=u.title}return e||(s=t.src.slice(c,l),t.md.inline.parse(s,t.md,t.env,m=[]),(f=t.push("image","img",0)).attrs=n=[["src",b],["alt",""]],f.children=m,f.content=s,p&&n.push(["title",p])),t.pos=d,t.posMax=v,!0}},14159:(t,e,n)=>{var r=n(1128).normalizeReference,o=n(1128).isSpace;t.exports=function(t,e){var n,i,s,a,l,c,d,u,h="",p="",f=t.pos,m=t.posMax,g=t.pos,b=!0;if(91!==t.src.charCodeAt(t.pos))return!1;if(l=t.pos+1,(a=t.md.helpers.parseLinkLabel(t,t.pos,!0))<0)return!1;if((c=a+1)=m)return!1;if(g=c,(d=t.md.helpers.parseLinkDestination(t.src,c,t.posMax)).ok){for(h=t.md.normalizeLink(d.str),t.md.validateLink(h)?c=d.pos:h="",g=c;c=m||41!==t.src.charCodeAt(c))&&(b=!0),c++}if(b){if(void 0===t.env.references)return!1;if(c=0?s=t.src.slice(g,c++):c=a+1):c=a+1,s||(s=t.src.slice(l,a)),!(u=t.env.references[r(s)]))return t.pos=f,!1;h=u.href,p=u.title}return e||(t.pos=l,t.posMax=a,t.push("link_open","a",1).attrs=n=[["href",h]],p&&n.push(["title",p]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)),t.pos=c,t.posMax=m,!0}},42876:t=>{var e=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;t.exports=function(t,n){var r,o,i,s,a,l,c;return!(!t.md.options.linkify||t.linkLevel>0||(r=t.pos)+3>t.posMax||58!==t.src.charCodeAt(r)||47!==t.src.charCodeAt(r+1)||47!==t.src.charCodeAt(r+2)||!(o=t.pending.match(e))||(i=o[1],!(s=t.md.linkify.matchAtStart(t.src.slice(r-i.length)))||(a=s.url).length<=i.length||(a=a.replace(/\*+$/,""),l=t.md.normalizeLink(a),!t.md.validateLink(l)||(n||(t.pending=t.pending.slice(0,-i.length),(c=t.push("link_open","a",1)).attrs=[["href",l]],c.markup="linkify",c.info="auto",(c=t.push("text","",0)).content=t.md.normalizeLinkText(a),(c=t.push("link_close","a",-1)).markup="linkify",c.info="auto"),t.pos+=a.length-i.length,0))))}},11078:(t,e,n)=>{var r=n(1128).isSpace;t.exports=function(t,e){var n,o,i,s=t.pos;if(10!==t.src.charCodeAt(s))return!1;if(n=t.pending.length-1,o=t.posMax,!e)if(n>=0&&32===t.pending.charCodeAt(n))if(n>=1&&32===t.pending.charCodeAt(n-1)){for(i=n-1;i>=1&&32===t.pending.charCodeAt(i-1);)i--;t.pending=t.pending.slice(0,i),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(s++;s{var r=n(77762),o=n(1128).isWhiteSpace,i=n(1128).isPunctChar,s=n(1128).isMdAsciiPunct;function a(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}a.prototype.pushPending=function(){var t=new r("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},a.prototype.push=function(t,e,n){this.pending&&this.pushPending();var o=new r(t,e,n),i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(i),o},a.prototype.scanDelims=function(t,e){var n,r,a,l,c,d,u,h,p,f=t,m=!0,g=!0,b=this.posMax,k=this.src.charCodeAt(t);for(n=t>0?this.src.charCodeAt(t-1):32;f{function e(t,e){var n,r,o,i,s,a=[],l=e.length;for(n=0;n{function e(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}t.exports=function(t,n){for(var r=t.pos;r{function e(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}e.prototype.attrIndex=function(t){var e,n,r;if(!this.attrs)return-1;for(n=0,r=(e=this.attrs).length;n=0&&(n=this.attrs[e][1]),n},e.prototype.attrJoin=function(t,e){var n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e},t.exports=e},32279:t=>{var e={};function n(t,r){var o;return"string"!=typeof r&&(r=n.defaultChars),o=function(t){var n,r,o=e[t];if(o)return o;for(o=e[t]=[],n=0;n<128;n++)r=String.fromCharCode(n),o.push(r);for(n=0;n=55296&&l<=57343?"���":String.fromCharCode(l),e+=6):240==(248&r)&&e+91114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),e+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",t.exports=n},3978:t=>{var e={};function n(t,r,o){var i,s,a,l,c,d="";for("string"!=typeof r&&(o=r,r=n.defaultChars),void 0===o&&(o=!0),c=function(t){var n,r,o=e[t];if(o)return o;for(o=e[t]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?o.push(r):o.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n=55296&&a<=57343){if(a>=55296&&a<=56319&&i+1=56320&&l<=57343){d+=encodeURIComponent(t[i]+t[i+1]),i++;continue}d+="%EF%BF%BD"}else d+=encodeURIComponent(t[i]);return d}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",t.exports=n},54850:t=>{t.exports=function(t){var e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&-1!==t.hostname.indexOf(":")?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",(e+=t.search||"")+(t.hash||"")}},59213:(t,e,n)=>{t.exports.encode=n(3978),t.exports.decode=n(32279),t.exports.format=n(54850),t.exports.parse=n(47642)},47642:t=>{function e(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,i=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),s=["'"].concat(i),a=["%","/","?",";","#"].concat(s),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,u={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};e.prototype.parse=function(t,e){var r,i,s,p,f,m=t;if(m=m.trim(),!e&&1===t.split("#").length){var g=o.exec(m);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var b=n.exec(m);if(b&&(s=(b=b[0]).toLowerCase(),this.protocol=b,m=m.substr(b.length)),(e||b||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(f="//"===m.substr(0,2))||b&&u[b]||(m=m.substr(2),this.slashes=!0)),!u[b]&&(f||b&&!h[b])){var k,v,y=-1;for(r=0;r127?M+="x":M+=A[S];if(!M.match(c)){var T=C.slice(0,r),E=C.slice(r+1),O=A.match(d);O&&(T.push(O[1]),E.unshift(O[2])),E.length&&(m=E.join(".")+m),this.hostname=T.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=m.indexOf("#");-1!==D&&(this.hash=m.substr(D),m=m.slice(0,D));var N=m.indexOf("?");return-1!==N&&(this.search=m.substr(N),m=m.slice(0,N)),m&&(this.pathname=m),h[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this},e.prototype.parseHost=function(t){var e=r.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},t.exports=function(t,n){if(t&&t instanceof e)return t;var r=new e;return r.parse(t,n),r}},87701:t=>{t.exports=/[\0-\x1F\x7F-\x9F]/},54066:t=>{t.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},76155:t=>{t.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},72927:t=>{t.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},98786:(t,e,n)=>{e.Any=n(47531),e.Cc=n(87701),e.Cf=n(54066),e.P=n(76155),e.Z=n(72927)},47531:t=>{t.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},61911:(t,e,n)=>{n.r(e),n.d(e,{ucs2decode:()=>p,ucs2encode:()=>f,decode:()=>b,encode:()=>k,toASCII:()=>y,toUnicode:()=>v,default:()=>w});const r=2147483647,o=36,i=/^xn--/,s=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,d=String.fromCharCode;function u(t){throw new RangeError(l[t])}function h(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]);const o=function(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}((t=t.replace(a,".")).split("."),e).join(".");return r+o}function p(t){const e=[];let n=0;const r=t.length;for(;n=55296&&o<=56319&&nString.fromCodePoint(...t),m=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},g=function(t,e,n){let r=0;for(t=n?c(t/700):t>>1,t+=c(t/e);t>455;r+=o)t=c(t/35);return c(r+36*t/(t+38))},b=function(t){const e=[],n=t.length;let i=0,s=128,a=72,l=t.lastIndexOf("-");l<0&&(l=0);for(let n=0;n=128&&u("not-basic"),e.push(t.charCodeAt(n));for(let h=l>0?l+1:0;h=n&&u("invalid-input");const l=(d=t.charCodeAt(h++))>=48&&d<58?d-48+26:d>=65&&d<91?d-65:d>=97&&d<123?d-97:o;l>=o&&u("invalid-input"),l>c((r-i)/e)&&u("overflow"),i+=l*e;const p=s<=a?1:s>=a+26?26:s-a;if(lc(r/f)&&u("overflow"),e*=f}const p=e.length+1;a=g(i-l,p,0==l),c(i/p)>r-s&&u("overflow"),s+=c(i/p),i%=p,e.splice(i++,0,s)}var d;return String.fromCodePoint(...e)},k=function(t){const e=[],n=(t=p(t)).length;let i=128,s=0,a=72;for(const n of t)n<128&&e.push(d(n));const l=e.length;let h=l;for(l&&e.push("-");h=i&&ec((r-s)/p)&&u("overflow"),s+=(n-i)*p,i=n;for(const n of t)if(nr&&u("overflow"),n===i){let t=s;for(let n=o;;n+=o){const r=n<=a?1:n>=a+26?26:n-a;if(t{n.d(e,{h:()=>S});var r=n(74788),o=n(42600),i=n(1065),s=n(75747),a=n(16331),l=n(28986),c=n(99036),d=n(24751),u=n(65266),h=n(12057),p=n(71753),f=n(21032),m=n(38190),g=n(22545),b=n(91283),k=n(75526),v=n(19042),y=n(4642),w=n(45642);function x(t,e){if(1&t&&(r.TgZ(0,"button",7),r._uU(1),r.qZA()),2&t){const t=e.$implicit;r.Q6J("value",t),r.xp6(1),r.hij(" ",t," ")}}function C(t,e){if(1&t&&(r.TgZ(0,"tui-data-list",5),r.YNc(1,x,2,2,"button",6),r.qZA()),2&t){const t=r.oxw();r.xp6(1),r.Q6J("ngForOf",t.modes)}}function A(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-primitive-textfield",8),r.NdJ("valueChange",(function(e){return r.CHM(t),r.oxw().onHexChange(e)})),r.qZA()}if(2&t){const t=r.oxw();r.Q6J("maskito",t.hexMask)("tuiTextfieldLabelOutside",!0)("value",t.hex)}}function M(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-input-number",9),r.NdJ("ngModelChange",(function(e){r.CHM(t);const n=r.oxw();return n.onRgbChange(e,n.color[1],n.color[2],n.color[3])})),r.qZA(),r.TgZ(1,"tui-input-number",9),r.NdJ("ngModelChange",(function(e){r.CHM(t);const n=r.oxw();return n.onRgbChange(n.color[0],e,n.color[2],n.color[3])})),r.qZA(),r.TgZ(2,"tui-input-number",9),r.NdJ("ngModelChange",(function(e){r.CHM(t);const n=r.oxw();return n.onRgbChange(n.color[0],n.color[1],e,n.color[3])})),r.qZA()}if(2&t){const t=r.oxw();r.Q6J("max",255)("min",0)("ngModel",t.color[0])("tuiTextfieldLabelOutside",!0),r.xp6(1),r.Q6J("max",255)("min",0)("ngModel",t.color[1])("tuiTextfieldLabelOutside",!0),r.xp6(1),r.Q6J("max",255)("min",0)("ngModel",t.color[2])("tuiTextfieldLabelOutside",!0)}}let S=(()=>{class t{constructor(){this.color=[0,0,0,1],this.colorChange=new r.vpe,this.hexMask={mask:new RegExp("^[A-F\\d]{0,6}$","gi")},this.modes=["HEX","RGB"],this.mode=this.modes[0]}get isHex(){return this.mode===this.modes[0]}get hex(){return(0,o.WSX)(this.color[0],this.color[1],this.color[2]).replace("#","")}get opacity(){return Math.round(100*this.color[3])}onHexChange(t){if(6!==t.length)return;const e=(0,o.ROF)(t);this.updateColor([e[0],e[1],e[2],this.color[3]])}onRgbChange(...t){this.updateColor(t)}updateColor(t){this.color=t,this.colorChange.emit(t)}}return t.ɵfac=function(e){return new(e||t)},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-color-edit"]],inputs:{color:"color"},outputs:{colorChange:"colorChange"},decls:6,vars:8,consts:[["tuiDropdownAlign","left","tuiDropdownLimitWidth","min","tuiTextfieldSize","m",1,"t-select","tui-group__auto-width-item",3,"tuiTextfieldLabelOutside","ngModel","ngModelChange"],["size","s",4,"tuiDataList"],["tuiTextfieldSize","m","tuiValueAccessor","",3,"maskito","tuiTextfieldLabelOutside","value","valueChange",4,"ngIf","ngIfElse"],["rgb",""],["decimal","never","tuiTextfieldPostfix","%","tuiTextfieldSize","m",1,"t-opacity","tui-group__auto-width-item",3,"max","min","ngModel","tuiTextfieldLabelOutside","ngModelChange"],["size","s"],["tuiOption","",3,"value",4,"ngFor","ngForOf"],["tuiOption","",3,"value"],["tuiTextfieldSize","m","tuiValueAccessor","",3,"maskito","tuiTextfieldLabelOutside","value","valueChange"],["decimal","never","tuiTextfieldSize","m",1,"t-rgb",3,"max","min","ngModel","tuiTextfieldLabelOutside","ngModelChange"]],template:function(t,e){if(1&t&&(r.TgZ(0,"tui-select",0),r.NdJ("ngModelChange",(function(t){return e.mode=t})),r.YNc(1,C,2,1,"tui-data-list",1),r.qZA(),r.YNc(2,A,1,3,"tui-primitive-textfield",2),r.YNc(3,M,3,12,"ng-template",null,3,r.W1O),r.TgZ(5,"tui-input-number",4),r.NdJ("ngModelChange",(function(t){return e.onRgbChange(e.color[0],e.color[1],e.color[2],t/100)})),r.qZA()),2&t){const t=r.MAs(4);r.Q6J("tuiTextfieldLabelOutside",!0)("ngModel",e.mode),r.xp6(2),r.Q6J("ngIf",e.isHex)("ngIfElse",t),r.xp6(3),r.Q6J("max",100)("min",0)("ngModel",e.opacity)("tuiTextfieldLabelOutside",!0)}},directives:[i.u,s.O,a.Ek,l.s,c.x,d.JJ,d.On,u.g,h.O5,p.q,f.g,m.T,g.q,h.sg,b.v,k.y,v.B,y.n,w.ro],styles:["[_nghost-%COMP%]{display:flex}.t-select[_ngcontent-%COMP%]{width:5.875rem}.t-opacity[_ngcontent-%COMP%]{width:4.275rem}.t-rgb[_ngcontent-%COMP%], .t-opacity[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),t})()},22540:(t,e,n)=>{n.d(e,{$:()=>c});var r=n(97582),o=n(74788),i=n(91211),s=n(42600),a=n(97398),l=n(19157);class c{constructor(t){this.sanitizer=t,this.colorChange=new o.vpe,this.point=[0,1],this.hue=0,this.opacity=1}set color(t){if(this.currentColor.every(((e,n)=>e===t[n]))&&t[3]===this.opacity)return;const[e,n,r]=(0,s.bDt)(t[0],t[1],t[2]);this.opacity=t[3],this.hue=e/360,this.point=[n,1-r/255]}get currentColor(){return this.getCurrentColor(this.hue,this.point)}get base(){return`rgb(${(0,s.qZG)(360*this.hue,1,255)})`}get gradient(){return this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to right, rgba(${this.currentColor.join(",")}, 0), rgb(${this.currentColor.join(",")}))`)}onPointChange(t){this.point=t,this.updateColor()}onHueChange(t){this.hue=t,this.updateColor()}onOpacityChange(t){this.opacity=(0,s.FGw)(t,2),this.updateColor()}getCurrentColor(t,e){return(0,s.qZG)(360*t,e[0],255*(1-e[1]))}updateColor(){this.colorChange.emit([...this.currentColor,this.opacity])}}c.ɵfac=function(t){return new(t||c)(o.Y36(i.H7))},c.ɵcmp=o.Xpm({type:c,selectors:[["tui-color-picker"]],inputs:{color:"color"},outputs:{colorChange:"colorChange"},decls:5,vars:7,consts:[[1,"t-flat",3,"value","valueChange"],[1,"t-wrapper","t-wrapper_hue"],[1,"t-hue",3,"value","valueChange"],[1,"t-wrapper","t-wrapper_opacity"],[1,"t-opacity",3,"value","valueChange"]],template:function(t,e){1&t&&(o.TgZ(0,"tui-flat-picker",0),o.NdJ("valueChange",(function(t){return e.onPointChange(t)})),o.qZA(),o.TgZ(1,"div",1),o.TgZ(2,"tui-linear-picker",2),o.NdJ("valueChange",(function(t){return e.onHueChange(t)})),o.qZA(),o.qZA(),o.TgZ(3,"div",3),o.TgZ(4,"tui-linear-picker",4),o.NdJ("valueChange",(function(t){return e.onOpacityChange(t)})),o.qZA(),o.qZA()),2&t&&(o.Udp("background-color",e.base),o.Q6J("value",e.point),o.xp6(2),o.Q6J("value",e.hue),o.xp6(1),o.Udp("background",e.gradient),o.xp6(1),o.Q6J("value",e.opacity))},directives:[a.J,l.P],styles:['[_nghost-%COMP%]{position:relative;z-index:0;display:block}.t-flat[_ngcontent-%COMP%]{height:14rem;background:linear-gradient(rgba(0,0,0,0),#000000),linear-gradient(to right,#ffffff,rgba(255,255,255,0));margin-bottom:.25rem;overflow:hidden}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:"";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue[_ngcontent-%COMP%]{background:#ff0000}.t-wrapper_opacity[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:"";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue[_ngcontent-%COMP%]{background:linear-gradient(to right,#ff0000,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000);border-radius:inherit;margin:0 .5rem}.t-opacity[_ngcontent-%COMP%]{border-radius:inherit;margin:0 .5rem}'],changeDetection:0}),(0,r.gn)([s.UMq],c.prototype,"getCurrentColor",null)},58333:(t,e,n)=>{n.d(e,{s:()=>z});var r=n(97582),o=n(74788),i=n(91211),s=n(42600),a=n(40401),l=n(48178),c=n(98778),d=n(18289),u=n(12057),h=n(22540),p=n(77825),f=n(22545),m=n(91283),g=n(27626),b=n(44099),k=n(13938),v=n(10406),y=n(63790),w=n(51928),x=n(84219),C=n(20690),A=n(1706);function M(t,e){if(1&t&&o._UZ(0,"tui-svg",9),2&t){const t=o.oxw(),e=o.MAs(1);o.ekj("t-arrow_rotated",e.open),o.Q6J("src",t.options.icons.colorSelectorDropdownChevron)}}function S(t,e){if(1&t&&o._UZ(0,"tui-svg",14),2&t){const t=o.oxw(3);o.Q6J("src",t.options.icons.colorSelectorDropdownCheck)}}function _(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",12),o.NdJ("click",(function(){const e=o.CHM(t).$implicit,n=o.oxw(2),r=o.MAs(1);return n.onModeSelect(e,r)}))("keydown.enter.prevent",(function(){const e=o.CHM(t).$implicit,n=o.oxw(2),r=o.MAs(1);return n.onModeSelect(e,r)}))("keydown.space.prevent",(function(){const e=o.CHM(t).$implicit,n=o.oxw(2),r=o.MAs(1);return n.onModeSelect(e,r)})),o._uU(1),o.YNc(2,S,1,1,"tui-svg",13),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.uIk("aria-checked",n.isModeActive(t)),o.xp6(1),o.hij(" ",t," "),o.xp6(1),o.Q6J("ngIf",n.isModeActive(t))}}function T(t,e){if(1&t&&(o.TgZ(0,"tui-data-list",10),o.YNc(1,_,3,3,"button",11),o.qZA()),2&t){const t=o.oxw();o.xp6(1),o.Q6J("ngForOf",t.modes)}}function E(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",20),o.NdJ("click",(function(){const e=o.CHM(t).$implicit;return o.oxw(2).onDirectionChange(e)})),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw(2);o.ekj("t-direction_active",n.isDirectionActive(t)),o.Q6J("icon",n.getIcon(t))("tuiHint",t)}}function O(t,e){if(1&t){const t=o.EpF();o.ynx(0),o._UZ(1,"hr",15),o.TgZ(2,"div",16),o.TgZ(3,"tui-linear-multi-picker",17),o.NdJ("indexChange",(function(e){return o.CHM(t),o.oxw().onIndexChange(e)}))("valueChange",(function(e){return o.CHM(t),o.oxw().onStopsChange(e)})),o.qZA(),o.qZA(),o.TgZ(4,"div",18),o.YNc(5,E,1,4,"button",19),o.qZA(),o.BQk()}if(2&t){const t=o.oxw();o.xp6(2),o.Udp("background",t.gradient),o.xp6(1),o.Q6J("value",t.stopsKeys),o.xp6(2),o.Q6J("ngForOf",t.buttons)}}function D(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-color-edit",21),o.NdJ("colorChange",(function(e){return o.CHM(t),o.oxw().onColorChange(e)})),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("color",t.color)}}function N(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-palette",22),o.NdJ("selectedColor",(function(e){return o.CHM(t),o.oxw().onPalettePick(e)})),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("colors",t.palette)}}const L=[0,0,0,0],I=[[0,[0,0,0,1]],[1,[255,255,255,1]]],R={"to top right":"tuiIconArrowUpRight","to right":"tuiIconArrowRight","to bottom right":"tuiIconArrowDownRight","to bottom":"tuiIconArrowDown","to bottom left":"tuiIconArrowDownLeft","to left":"tuiIconArrowLeft","to top left":"tuiIconArrowUpLeft","to top":"tuiIconArrowUp"};class z{constructor(t,e,n){this.options=t,this.sanitizer=e,this.modes=n,this.stops=new Map(I),this.currentStop=0,this.direction="to bottom",this.colors=new Map,this.colorChange=new o.vpe,this.color=[0,0,0,1],this.currentMode=this.modes[0],this.buttons=["to top right","to right","to bottom right","to bottom","to bottom left","to left","to top left","to top"]}set colorSetter(t){this.parse(t)}get palette(){return this.filterPalette(this.colors,this.isGradient)}get stopsKeys(){return this.getStopsKeys(this.stops)}get currentColor(){return this.isGradient?this.getStop(this.currentStop):this.color}get gradient(){return this.sanitizer.bypassSecurityTrustStyle(this.getGradient("to right"))}get isGradient(){return this.currentMode===this.modes[1]}getIcon(t){return R[t]}isModeActive(t){return this.currentMode===t}isDirectionActive(t){return this.direction===t}onPalettePick(t){this.updateColor(t)}onDirectionChange(t){this.direction=t,this.updateColor(this.getGradient(t))}onModeSelect(t,e){this.currentMode=t,e.open=!1,this.updateColor(t===this.modes[0]?`rgba(${this.color.join(", ")})`:this.getGradient(this.direction))}onIndexChange(t){this.currentStop=this.stopsKeys[t]}onColorChange(t){this.isGradient?(this.stops.set(this.currentStop,t),this.updateColor(this.getGradient(this.direction))):this.updateColor(`rgba(${t.join(", ")})`)}onStopsChange(t){const e=this.stopsKeys.find((e=>!t.includes(e))),n=t.find((t=>!this.stopsKeys.includes(t)));void 0===e&&void 0!==n&&this.addStop(n),void 0!==e&&void 0===n&&this.removeStop(e),void 0!==e&&void 0!==n&&this.replaceStop(e,n),this.updateColor(this.getGradient(this.direction))}getStopsKeys(t){return Array.from(t.keys())}filterPalette(t,e){const n=new Map(t);return n.forEach(((t,r)=>{(t.startsWith("linear-gradient")&&!e||!t.startsWith("linear-gradient")&&e)&&n.delete(r)})),n}updateColor(t){this.colorChange.emit(t)}getGradient(t){return`linear-gradient(${t}, ${[...this.stopsKeys].sort(s.A2j).map((t=>`rgba(${this.getStop(t).join(", ")}) ${100*t}%`)).join(", ")})`}getStop(t){return this.stops.get(t)||L}addStop(t){const e=this.stopsKeys.reduce(((e,n)=>Math.abs(n-t)r===t?[e,n]:[r,this.getStop(r)])))}parse(t){t.startsWith("linear-gradient")?this.parseGradient(t):this.parseColor(t)}parseGradient(t){if(t===this.getGradient(this.direction))return;const e=(0,l._N)((0,l.U5)(t));this.currentMode=this.modes[1],this.direction=e.side,this.currentStop=0,this.stops=new Map(e.stops.length?e.stops.map((({color:t,position:e})=>[parseFloat(e)/100,(0,s.MpC)(t)])):I)}parseColor(t){this.currentMode=this.modes[0],this.currentStop=0,this.color=(0,s.MpC)(t)}}z.ɵfac=function(t){return new(t||z)(o.Y36(a.mJ),o.Y36(i.H7),o.Y36(a.dj))},z.ɵcmp=o.Xpm({type:z,selectors:[["tui-color-selector"]],inputs:{colors:"colors",colorSetter:["color","colorSetter"]},outputs:{colorChange:"colorChange"},decls:12,vars:7,consts:[[1,"t-select",3,"content"],["dropdown",""],["appearance","","size","s","tuiButton","","type","button",3,"iconRight"],["arrow",""],["menu",""],[4,"ngIf"],[3,"color","colorChange"],["tuiGroup","","class","t-edit",3,"color","colorChange",4,"ngIf"],["class","t-palette",3,"colors","selectedColor",4,"ngIf"],[1,"t-arrow",3,"src"],["role","menu","size","s",1,"t-menu"],["role","menuitemradio","tuiOption","",3,"click","keydown.enter.prevent","keydown.space.prevent",4,"ngFor","ngForOf"],["role","menuitemradio","tuiOption","",3,"click","keydown.enter.prevent","keydown.space.prevent"],["class","t-checkmark",3,"src",4,"ngIf"],[1,"t-checkmark",3,"src"],[1,"t-hr"],[1,"t-wrapper"],[1,"t-gradient",3,"value","indexChange","valueChange"],[1,"t-buttons"],["appearance","","size","xs","tuiHintDescribe","","tuiIconButton","","type","button","class","t-direction",3,"t-direction_active","icon","tuiHint","click",4,"ngFor","ngForOf"],["appearance","","size","xs","tuiHintDescribe","","tuiIconButton","","type","button",1,"t-direction",3,"icon","tuiHint","click"],["tuiGroup","",1,"t-edit",3,"color","colorChange"],[1,"t-palette",3,"colors","selectedColor"]],template:function(t,e){if(1&t&&(o.TgZ(0,"tui-hosted-dropdown",0,1),o.TgZ(2,"button",2),o._uU(3),o.qZA(),o.YNc(4,M,1,3,"ng-template",null,3,o.W1O),o.YNc(6,T,2,1,"ng-template",null,4,o.W1O),o.qZA(),o.YNc(8,O,6,4,"ng-container",5),o.TgZ(9,"tui-color-picker",6),o.NdJ("colorChange",(function(t){return e.onColorChange(t)})),o.qZA(),o.YNc(10,D,1,1,"tui-color-edit",7),o.YNc(11,N,1,1,"tui-palette",8)),2&t){const t=o.MAs(5),n=o.MAs(7);o.Q6J("content",n),o.xp6(2),o.Q6J("iconRight",t),o.xp6(1),o.hij(" ",e.currentMode," "),o.xp6(5),o.Q6J("ngIf",e.isGradient),o.xp6(1),o.Q6J("color",e.currentColor),o.xp6(1),o.Q6J("ngIf",!e.isGradient),o.xp6(1),o.Q6J("ngIf",e.palette.size)}},directives:[c.o,d.v,u.O5,h.$,p.P,f.q,u.sg,m.v,g.e,b.$,k.D,v.x,y.t,w.D,x.h,C.g,A.R],styles:['[_nghost-%COMP%]{position:relative;z-index:0;display:block;width:22.6rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:"";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:"";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr[_ngcontent-%COMP%]{height:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient[_ngcontent-%COMP%]{margin:0 .5rem;border-radius:inherit}.t-select[_ngcontent-%COMP%]{margin:.75rem .5rem}.t-arrow[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated[_ngcontent-%COMP%]{transform:rotate(180deg)}.t-menu[_ngcontent-%COMP%]{width:11.25rem}.t-checkmark[_ngcontent-%COMP%]{margin-left:auto;width:1rem;height:1rem}.t-buttons[_ngcontent-%COMP%]{display:flex;padding:0 .75rem 1.25rem}.t-direction[_ngcontent-%COMP%]{color:var(--tui-text-02);margin:0 .375rem}.t-direction[_ngcontent-%COMP%]:hover, .t-direction_active[_ngcontent-%COMP%]{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit[_ngcontent-%COMP%]{margin:1.25rem}.t-palette[_ngcontent-%COMP%]{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}'],changeDetection:0}),(0,r.gn)([s.UMq],z.prototype,"getStopsKeys",null),(0,r.gn)([s.UMq],z.prototype,"filterPalette",null)},97398:(t,e,n)=>{n.d(e,{J:()=>s});var r=n(74788),o=n(42600),i=n(87901);let s=(()=>{class t{constructor(t){this.value=[0,0],this.valueChange=new r.vpe,t.subscribe((t=>{this.value=t,this.valueChange.emit([t[0],t[1]])}))}get left(){return 100*this.value[0]}get top(){return 100*this.value[1]}}return t.ɵfac=function(e){return new(e||t)(r.Y36(i.i))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-flat-picker"]],inputs:{value:"value"},outputs:{valueChange:"valueChange"},features:[r._Bn([o.a31,i.i])],decls:1,vars:4,consts:[[1,"t-circle"]],template:function(t,e){1&t&&r._UZ(0,"div",0),2&t&&r.Udp("left",e.left,"%")("top",e.top,"%")},styles:["[_nghost-%COMP%]{position:relative;display:block}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}"],changeDetection:0}),t})()},83950:(t,e,n)=>{n.d(e,{H9:()=>h,wl:()=>g,VM:()=>m}),n(84219);var r=n(12057),o=n(24751),i=n(45642),s=n(43232),a=n(67934),l=n(74788);let c=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,o.u5,i.U5,a.SCC,a.Jyo,s.KWI,s.cnw,s.dpK,s.pcV,a._Hh]]}),t})();n(22540);let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez]]}),t})(),u=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez]]}),t})(),h=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,d,u]]}),t})();n(58333);var p=n(42600);let f=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez]]}),t})(),m=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,s.goS]]}),t})(),g=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,s.fNO,s.jhF,h,f,s.goS,s.EIu,s.pcV,p.Ah6,c,s.n6B,m]]}),t})();n(97398),n(27626),n(19157),n(1706)},27626:(t,e,n)=>{n.d(e,{e:()=>l});var r=n(74788),o=n(42600),i=n(87901),s=n(12057);function a(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",1),r.NdJ("dblclick",(function(){const e=r.CHM(t).index;return r.oxw().onClick(e)}))("mousedown",(function(){const e=r.CHM(t).index;return r.oxw().onMouseDown(e)})),r.qZA()}if(2&t){const t=e.$implicit;r.Udp("left",100*t,"%")}}let l=(()=>{class t{constructor(t){this.value=[0,1],this.valueChange=new r.vpe,this.indexChange=new r.vpe,this.index=NaN,t.subscribe((([t])=>{this.onPicker(t)}))}onMouseUp(){this.index=NaN}onMouseDown(t){this.updateIndex(t)}onClick(t){this.value.length>2&&this.updateValue(this.value.filter(((e,n)=>n!==t)))}onPicker(t){Number.isNaN(this.index)&&(this.updateIndex(this.value.length),this.value=[...this.value,0]),this.value.some(((e,n)=>e===t&&n!==this.index))||this.updateValue(this.value.map(((e,n)=>n===this.index?t:e)))}updateIndex(t){this.index=t,this.indexChange.emit(t)}updateValue(t){this.value=t,this.valueChange.emit(t)}}return t.ɵfac=function(e){return new(e||t)(r.Y36(i.i))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-linear-multi-picker"]],hostBindings:function(t,e){1&t&&r.NdJ("mouseup",(function(){return e.onMouseUp()}),!1,r.evT)},inputs:{value:"value"},outputs:{valueChange:"valueChange",indexChange:"indexChange"},features:[r._Bn([o.a31,i.i])],decls:1,vars:1,consts:[["class","t-circle",3,"left","dblclick","mousedown",4,"ngFor","ngForOf"],[1,"t-circle",3,"dblclick","mousedown"]],template:function(t,e){1&t&&r.YNc(0,a,1,2,"div",0),2&t&&r.Q6J("ngForOf",e.value)},directives:[s.sg],styles:["[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}"],changeDetection:0}),t})()},19157:(t,e,n)=>{n.d(e,{P:()=>s});var r=n(74788),o=n(42600),i=n(87901);let s=(()=>{class t{constructor(t){this.value=0,this.valueChange=new r.vpe,t.subscribe((([t])=>{this.value=t,this.valueChange.emit(t)}))}get left(){return 100*this.value}}return t.ɵfac=function(e){return new(e||t)(r.Y36(i.i))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-linear-picker"]],inputs:{value:"value"},outputs:{valueChange:"valueChange"},features:[r._Bn([o.a31,i.i])],decls:1,vars:2,consts:[[1,"t-circle"]],template:function(t,e){1&t&&r._UZ(0,"div",0),2&t&&r.Udp("left",e.left,"%")},styles:["[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}"],changeDetection:0}),t})()},1706:(t,e,n)=>{n.d(e,{R:()=>u});var r=n(74788),o=n(12057),i=n(13938),s=n(10406),a=n(63790),l=n(51928),c=n(44099);function d(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",1),r.NdJ("click",(function(){const e=r.CHM(t).$implicit;return r.oxw().selectedColor.emit(e.value)})),r.qZA()}if(2&t){const t=e.$implicit;r.Udp("background",t.value),r.Q6J("id",t.key)("tuiHint",t.key)("tuiHintDescribe",t.key)}}let u=(()=>{class t{constructor(){this.colors=new Map,this.selectedColor=new r.vpe,this.originalOrder=(t,e)=>0}}return t.ɵfac=function(e){return new(e||t)},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-palette"]],inputs:{colors:"colors"},outputs:{selectedColor:"selectedColor"},decls:2,vars:4,consts:[["type","button","class","t-button",3,"id","background","tuiHint","tuiHintDescribe","click",4,"ngFor","ngForOf"],["type","button",1,"t-button",3,"id","tuiHint","tuiHintDescribe","click"]],template:function(t,e){1&t&&(r.YNc(0,d,1,5,"button",0),r.ALo(1,"keyvalue")),2&t&&r.Q6J("ngForOf",r.xi3(1,1,e.colors,e.originalOrder))},directives:[o.sg,i.D,s.x,a.t,l.D,c.$],pipes:[o.Nd],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap;padding:.875rem}.t-button[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;width:1.5625rem;height:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}"],changeDetection:0}),t})()},10553:(t,e,n)=>{n.d(e,{l:()=>T});var r=n(12057),o=n(74788),i=n(42600),s=n(69725),a=n(5915),l=n(40401),c=n(45400),d=n(36866),u=n(30528),h=n(24751),p=n(77825),f=n(18289),m=n(73460),g=n(96281),b=n(65538);let k=(()=>{class t{transform(t,e,n){return"#"===e?t.filter((t=>t!==n)):t}}return t.ɵfac=function(e){return new(e||t)},t.ɵpipe=o.Yjl({name:"tuiFilterAnchors",type:t,pure:!0}),t})();function v(t,e){1&t&&(o.ynx(0),o._uU(1,"Edit anchor"),o.BQk())}function y(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"Link to anchor"),o.qZA())}function w(t,e){1&t&&(o.TgZ(0,"span"),o._uU(1,"URL"),o.qZA())}function x(t,e){if(1&t&&(o.YNc(0,y,2,0,"span",1),o.YNc(1,w,2,0,"ng-template",null,12,o.W1O)),2&t){const t=o.MAs(2),e=o.oxw(2);o.Q6J("ngIf",e.prefixIsHashMode)("ngIfElse",t)}}function C(t,e){if(1&t&&(o.ynx(0),o._uU(1),o.BQk()),2&t){const t=e.ngIf,n=o.oxw(2);o.xp6(1),o.hij(" ",n.prefixIsHashMode?t.anchorExample:t.urlExample," ")}}function A(t,e){if(1&t){const t=o.EpF();o.ynx(0),o.TgZ(1,"label",4),o.TgZ(2,"div",5),o.YNc(3,v,2,0,"ng-container",1),o.YNc(4,x,3,2,"ng-template",null,6,o.W1O),o.qZA(),o.TgZ(6,"div",7),o.TgZ(7,"div",8),o._uU(8),o.qZA(),o.TgZ(9,"tui-input-inline",9),o.NdJ("ngModelChange",(function(e){return o.CHM(t),o.oxw().url=e}))("input",(function(e){let n;return o.CHM(t),o.oxw().onChange(null==(n=e.target)?null:n.value)}))("keydown.backspace",(function(){return o.CHM(t),o.oxw().onBackspace()}))("keydown.prevent.enter",(function(){return o.CHM(t),o.oxw().onSave()})),o.YNc(10,C,2,1,"ng-container",3),o.ALo(11,"async"),o.qZA(),o.qZA(),o.qZA(),o.TgZ(12,"tui-svg",10),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onClear()})),o.qZA(),o.TgZ(13,"button",11),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onSave()})),o.qZA(),o.BQk()}if(2&t){const t=o.MAs(5),e=o.oxw();o.xp6(3),o.Q6J("ngIf",e.anchorMode)("ngIfElse",t),o.xp6(5),o.Oqu(e.prefix),o.xp6(1),o.ekj("t-input_filled",e.hasUrl),o.Q6J("ngModel",e.url),o.xp6(1),o.Q6J("ngIf",o.lcZ(11,11,e.texts$)),o.xp6(2),o.ekj("t-cleaner_hidden",!e.hasUrl),o.Q6J("src",e.options.icons.popupLinkRemove),o.xp6(1),o.Q6J("icon",e.options.icons.popupLinkSave)}}function M(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"a",13),o._uU(1),o.ALo(2,"tuiShortUrl"),o.qZA(),o.TgZ(3,"button",14),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onEdit()})),o.qZA(),o.TgZ(4,"button",15),o.NdJ("click",(function(){return o.CHM(t),o.oxw().onRemove()})),o.qZA()}if(2&t){const t=o.oxw();o.Q6J("href",t.href,o.LSH)("icon",t.prefixIsHashMode?"tuiIconHash":"tuiIconExternalLink"),o.xp6(1),o.hij(" ",o.lcZ(2,5,t.url)," "),o.xp6(2),o.Q6J("icon",t.options.icons.popupPreviewLinkEdit),o.xp6(1),o.Q6J("icon",t.options.icons.popupPreviewLinkClear)}}function S(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"button",19),o.NdJ("click",(function(){const e=o.CHM(t).$implicit;return o.oxw(2).setAnchor(e)})),o._uU(1),o.qZA()}if(2&t){const t=e.$implicit;o.xp6(1),o.hij(" #",t," ")}}function _(t,e){if(1&t&&(o.ynx(0),o._UZ(1,"hr",16),o.TgZ(2,"tui-scrollbar"),o.TgZ(3,"div",17),o.YNc(4,S,2,1,"button",18),o.ALo(5,"tuiFilterAnchors"),o.qZA(),o.qZA(),o.BQk()),2&t){const t=o.oxw();o.xp6(4),o.Q6J("ngForOf",o.Dn7(5,1,t.anchorIds,t.prefix,t.url))}}let T=(()=>{class t{constructor(t,e,n,r){this.doc=t,this.texts$=e,this.editor=n,this.options=r,this.isOnlyAnchorMode=this.detectAnchorMode(),this.addLink=new o.vpe,this.removeLink=new o.vpe,this.url=this.getHrefOrAnchorId(),this.edit=!this.url,this.prefix=this.makeDefaultPrefix(),this.anchorIds=this.getAllAnchorsIds()}get defaultProtocol(){var t,e;return null!==(e=null===(t=this.options.linkOptions)||void 0===t?void 0:t.protocol)&&void 0!==e?e:s.Ci}set anchorMode(t){this.isOnlyAnchorMode=t,this.prefix=t?s._s:this.makeDefaultPrefix()}get anchorMode(){return this.isOnlyAnchorMode}get prefixIsHashMode(){return this.prefix===s._s}get hasUrl(){return!!this.url}get href(){return`${this.prefix}${this.url}`}get showAnchorsList(){return!this.anchorMode&&this.edit&&this.anchorIds.length>0}get isViewMode(){return!this.edit}onSelectionChange(){this.isViewMode&&(this.url=this.getHrefOrAnchorId(),this.anchorMode=this.detectAnchorMode())}onMouseDown(t){(0,i.veZ)(t.target)&&!t.target.matches("a, button, input")&&t.preventDefault()}setAnchor(t){this.url=t,this.changePrefix(!0)}changePrefix(t){this.prefix=t?s._s:this.defaultProtocol}onSave(){this.url?this.addLink.emit(this.href):this.removeLink.emit()}onBackspace(){this.url||(this.prefix=this.isOnlyAnchorMode?s._s:this.defaultProtocol)}onEdit(){this.edit=!0}onRemove(){this.removeLink.emit()}onChange(t){this.url=this.removePrefix(t)}onClear(){this.url=""}makeDefaultPrefix(){var t,e;const n=this.getAnchorElement(),r=(0,c.$)(null!==(t=null==n?void 0:n.getAttribute("href"))&&void 0!==t?t:"").prefix||this.defaultProtocol;return n&&(!n.getAttribute("href")&&n.getAttribute("id")||(null===(e=n.getAttribute("href"))||void 0===e?void 0:e.startsWith(s._s)))?s._s:r}detectAnchorMode(){const t=this.getAnchorElement();return!(null==t?void 0:t.href)&&!!(null==t?void 0:t.getAttribute("id"))}getFocusedParentElement(){var t,e;return(null===(e=null===(t=this.doc.getSelection())||void 0===t?void 0:t.focusNode)||void 0===e?void 0:e.parentElement)||null}getAnchorElement(){var t,e,n;const r=this.getFocusedParentElement();return null!==(n=null!==(t=null==r?void 0:r.closest("a"))&&void 0!==t?t:null===(e=null==r?void 0:r.querySelector("img"))||void 0===e?void 0:e.closest("a"))&&void 0!==n?n:null}getHrefOrAnchorId(){const t=this.getAnchorElement();return t?this.removePrefix(t.getAttribute("href")||t.getAttribute("id")||""):this.url}removePrefix(t){var e;const n=t.startsWith(s._s)||this.prefix===s._s?t:`${null!==(e=this.prefix)&&void 0!==e?e:""}${t}`,{prefix:r,path:o}=(0,c.$)(n),i=this.isOnlyAnchorMode||r===s._s||""===r&&this.prefix===s._s;return this.prefix=i?s._s:""===r?this.defaultProtocol:r,o}getAllAnchorsIds(){var t;const e=Array.from(null!==(t=this.editor.getOriginTiptapEditor().view.dom.querySelectorAll('[data-type="jump-anchor"]'))&&void 0!==t?t:[]);return Array.from(e).map((t=>t.getAttribute("id")||"")).filter(Boolean)}}return t.ɵfac=function(e){return new(e||t)(o.Y36(r.K0),o.Y36(l.b$),o.Y36(a.$3),o.Y36(l.mJ))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-edit-link"]],hostBindings:function(t,e){1&t&&o.NdJ("selectionchange",(function(){return e.onSelectionChange()}),!1,o.evT)("mousedown",(function(t){return e.onMouseDown(t)}))},inputs:{anchorMode:"anchorMode"},outputs:{addLink:"addLink",removeLink:"removeLink"},decls:5,vars:3,consts:[[1,"t-edit-link",3,"mousedown"],[4,"ngIf","ngIfElse"],["view",""],[4,"ngIf"],[1,"t-label"],[1,"t-label-properties"],["fullOptions",""],[1,"t-url"],[1,"t-prefix"],["tuiAutoFocus","",1,"t-input",3,"ngModel","ngModelChange","input","keydown.backspace","keydown.prevent.enter"],[1,"t-cleaner",3,"src","click"],["appearance","icon","shape","rounded","size","s","title","Insert link","tuiIconButton","","type","button",1,"t-button",3,"icon","click"],["urlTitle",""],["iconAlign","left","target","_blank","tuiLink","",1,"t-link",3,"href","icon"],["appearance","icon","shape","rounded","size","s","title","Change link","tuiIconButton","","type","button",1,"t-button","t-edit-button",3,"icon","click"],["appearance","icon","automation-id","toolbar__popup-link-clear-button","shape","rounded","size","s","title","Remove link","tuiIconButton","","type","button",1,"t-button",3,"icon","click"],[1,"t-hr"],[1,"t-anchor-list"],["type","button","class","t-anchor",3,"click",4,"ngFor","ngForOf"],["type","button",1,"t-anchor",3,"click"]],template:function(t,e){if(1&t&&(o.TgZ(0,"div",0),o.NdJ("mousedown",(function(t){return t.stopImmediatePropagation()})),o.YNc(1,A,14,13,"ng-container",1),o.YNc(2,M,5,7,"ng-template",null,2,o.W1O),o.qZA(),o.YNc(4,_,6,5,"ng-container",3)),2&t){const t=o.MAs(3);o.xp6(1),o.Q6J("ngIf",e.edit)("ngIfElse",t),o.xp6(3),o.Q6J("ngIf",e.showAnchorsList)}},directives:[r.O5,d.l,u.k,h.JJ,h.On,p.P,f.v,m.V,g.I,r.sg],pipes:[r.Ov,b.X,k],styles:["[_nghost-%COMP%]{display:block;min-width:18.75rem}.t-edit-link[_ngcontent-%COMP%]{display:flex;min-height:4rem;align-items:center;padding-right:.75rem}.t-label[_ngcontent-%COMP%]{font:var(--tui-font-text-s);height:var(--tui-height-l);box-sizing:border-box;padding:.4375rem 1rem;min-width:12.5rem;max-width:25rem;width:100%}.t-label-properties[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:8.375rem;justify-content:space-between}.t-property_inactive[_ngcontent-%COMP%]{opacity:.5}.t-url[_ngcontent-%COMP%]{display:flex;font:var(--tui-font-text-m);color:var(--tui-text-02)}.t-input[_ngcontent-%COMP%]{flex:1}.t-input_filled[_ngcontent-%COMP%]{color:var(--tui-text-01)}.t-button[_ngcontent-%COMP%]{width:2rem;height:2rem;margin:0 .25rem;transition:background .2s}.t-edit-button[_ngcontent-%COMP%]{margin-left:auto}.t-link[_ngcontent-%COMP%]{margin:0 1rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.t-cleaner[_ngcontent-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-base-06);cursor:pointer;margin-left:auto}.t-cleaner[_ngcontent-%COMP%]:hover{color:var(--tui-base-07)}.t-cleaner_hidden[_ngcontent-%COMP%]{visibility:hidden}.t-anchor-list[_ngcontent-%COMP%]{display:flex;max-height:12.5rem;flex-direction:column}.t-anchor[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;min-height:2.75rem;padding:.375rem .5rem;margin:.125rem .5rem;border-radius:var(--tui-radius-m);text-align:left}.t-anchor[_ngcontent-%COMP%]:hover{background:var(--tui-base-02);cursor:pointer}"],changeDetection:0}),t})()},1884:(t,e,n)=>{n.d(e,{Fu:()=>c}),n(10553);var r=n(12057),o=n(24751),i=n(42600),s=n(43232),a=n(67934),l=n(74788);let c=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=l.oAB({type:t}),t.ɵinj=l.cJS({imports:[[r.ez,o.u5,i.Q7V,s.fNO,s.EIu,s.jzK,a.z$l,a.YMv,s.Jyu]]}),t})();n(65538),n(45400)},65538:(t,e,n)=>{n.d(e,{X:()=>o});var r=n(74788);let o=(()=>{class t{transform(t){return t.length<60?t:`${t.slice(0,Math.max(0,40))}...${t.slice(t.length-10)}`}}return t.ɵfac=function(e){return new(e||t)},t.ɵpipe=r.Yjl({name:"tuiShortUrl",type:t,pure:!0}),t})()},45400:(t,e,n)=>{n.d(e,{$:()=>a});var r=n(42600),o=n(69725);function i(t=""){var e;const n=null!==(e=t.indexOf(o.jU))&&void 0!==e?e:-1,[r,s]=n>-1?[t.slice(0,n+o.jU.length),t.slice(n+o.jU.length,t.length)]:["",t],a=[r,s].filter(Boolean);return(null==s?void 0:s.includes("://"))&&a.length>1?i(s):a}function s(t=""){const[e,n]=t.split(/:/).slice(-2).filter(Boolean);return e&&n&&!(0,r.lj0)(t)?[`${e}:`,n]:[]}function a(t=""){if(t.startsWith(o._s))return{prefix:o._s,path:t.slice(1)};const[e="",n=""]=t.includes(o.jU)?i(t):s(t);if(n.includes(o.DN)){const[t,e]=s(n);if(t&&e)return{prefix:t,path:e}}return{prefix:e,path:""===e?t:n}}},22916:(t,e,n)=>{n.d(e,{V:()=>p});var r=n(74788),o=n(42600),i=n(76995),s=n(51703),a=n(12057);const l=function(){return[0,1]};function c(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",4),r.NdJ("tuiSizeChange",(function(e){return r.CHM(t),r.oxw().sizeChange.emit(e)})),r.qZA()}2&t&&r.Q6J("tuiResizer",r.DdM(1,l))}const d=function(t){return[t,0]},u=function(){return[1,0]},h=["*"];let p=(()=>{class t{constructor(){this.autoHeight=!1,this.width=null,this.height=null,this.sizeChange=new r.vpe}get hostWidth(){return(0,o.dtH)(this.width)?(0,o.O9r)(this.width):this.width}get hostHeight(){return this.autoHeight?null:(0,o.dtH)(this.height)?(0,o.O9r)(this.height):this.height}}return t.ɵfac=function(e){return new(e||t)},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-editor-resizable"]],hostVars:4,hostBindings:function(t,e){2&t&&r.Udp("width",e.hostWidth)("height",e.hostHeight)},inputs:{autoHeight:"autoHeight",width:"width",height:"height"},outputs:{sizeChange:"sizeChange"},ngContentSelectors:h,decls:5,vars:8,consts:[["tuiResizeable","",1,"t-resizable"],[1,"t-handle","t-handle-left-side",3,"tuiResizer","tuiSizeChange"],["class","t-handle t-handle-bottom-side",3,"tuiResizer","tuiSizeChange",4,"ngIf"],[1,"t-handle","t-handle-right-side",3,"tuiResizer","tuiSizeChange"],[1,"t-handle","t-handle-bottom-side",3,"tuiResizer","tuiSizeChange"]],template:function(t,e){1&t&&(r.F$t(),r.TgZ(0,"div",0),r.Hsn(1),r.TgZ(2,"div",1),r.NdJ("tuiSizeChange",(function(t){return e.sizeChange.emit(t)})),r.qZA(),r.YNc(3,c,1,2,"div",2),r.TgZ(4,"div",3),r.NdJ("tuiSizeChange",(function(t){return e.sizeChange.emit(t)})),r.qZA(),r.qZA()),2&t&&(r.ekj("t-resizable-auto-height",e.autoHeight),r.xp6(2),r.Q6J("tuiResizer",r.VKq(5,d,-1)),r.xp6(1),r.Q6J("ngIf",!e.autoHeight),r.xp6(1),r.Q6J("tuiResizer",r.DdM(7,u)))},directives:[i.U,s.L,a.O5],styles:['[_nghost-%COMP%]{position:relative;display:inline-block;box-sizing:border-box}[_nghost-%COMP%] .t-resizable[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%] .t-resizable-auto-height[_ngcontent-%COMP%]{height:auto!important}[_nghost-%COMP%] iframe[_ngcontent-%COMP%]{display:inline;pointer-events:none}[_nghost-%COMP%]:hover .t-handle[_ngcontent-%COMP%]:after{opacity:1}.t-handle[_ngcontent-%COMP%]{position:absolute;top:0;display:flex;width:.75rem;cursor:col-resize;justify-content:center;align-items:center;height:100%}.t-handle[_ngcontent-%COMP%]:after{transition-property:opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:"";width:50%;height:33%;box-sizing:border-box;border-radius:var(--tui-radius-m);background:var(--tui-base-08);border:1px solid var(--tui-base-03);opacity:0}.t-handle-left-side[_ngcontent-%COMP%]{left:0}.t-handle-bottom-side[_ngcontent-%COMP%]{top:unset;bottom:.3125rem;height:.95rem;width:100%}.t-handle-right-side[_ngcontent-%COMP%]{right:0}'],changeDetection:0}),t})()},8274:(t,e,n)=>{n.d(e,{_3:()=>i,Sl:()=>l});var r=n(13704),o=n(74788);let i=(()=>{class t extends r.d{constructor(){super(...arguments),this.currentHeight=0,this.currentWidth=0}get attrs(){var t;return(null===(t=this.node)||void 0===t?void 0:t.attrs)||{src:""}}get width(){return this.currentWidth||this.attrs.width||null}get height(){return this.currentHeight||this.attrs.height||null}}return t.ɵfac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.ɵdir=o.lG2({type:t,features:[o.qOj]}),t})();n(22916);var s=n(12057),a=n(42600);let l=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=o.oAB({type:t}),t.ɵinj=o.cJS({imports:[[s.ez,a.k54,a.gjW]]}),t})()},76690:(t,e,n)=>{n.d(e,{D:()=>c});var r=n(12057),o=n(74788),i=n(42600),s=n(43232),a=n(46561),l=n(40401);let c=(()=>{class t{constructor(t,e,n,r,o,i,s){this.el=t,this.renderer=e,this.sanitizer=n,this.tuiSanitizer=r,this.document=o,this.editor=i,this.options=s}set content(t){var e;this.renderer.setProperty(this.el.nativeElement,"innerHTML",this.tuiSanitizer?this.tuiSanitizer.sanitize(o.q3G.HTML,null!==(e=null==t?void 0:t.replace(/colwidth/g,"width"))&&void 0!==e?e:""):this.sanitizer.sanitize(o.q3G.HTML,null!=t?t:""))}click(t){var e,n;if(this.editor||!(0,i.veZ)(t.target))return;const r=(null===(n=null===(e=t.target)||void 0===e?void 0:e.closest("a"))||void 0===n?void 0:n.getAttribute("href"))||"";r.startsWith("#")&&(this.document.location.hash=r.replace("#",""),t.preventDefault())}}return t.ɵfac=function(e){return new(e||t)(o.Y36(o.SBq),o.Y36(o.Qsj),o.Y36(o.Tiy),o.Y36(s.hmb,8),o.Y36(r.K0),o.Y36(a.JU,8),o.Y36(l.mJ))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-editor-socket"]],hostVars:2,hostBindings:function(t,e){1&t&&o.NdJ("click",(function(t){return e.click(t)})),2&t&&o.ekj("tui-editor-socket",e.options.enableDefaultStyles)},inputs:{content:"content"},decls:0,vars:0,template:function(t,e){},styles:['.tui-editor-socket{display:block;margin:0;color:var(--tui-text-01);font:var(--tui-font-text-m)}.tui-editor-socket[tuiTiptapEditor]{overflow:hidden}.tui-editor-socket .ProseMirror{min-height:5.375rem;padding:.2rem 1rem;outline:none;white-space:pre-wrap}.tui-editor-socket .resize-cursor{cursor:ew-resize;cursor:col-resize}.tui-editor-socket h1,.tui-editor-socket h2,.tui-editor-socket h3,.tui-editor-socket h4,.tui-editor-socket h5,.tui-editor-socket h6{word-break:break-word;line-height:normal}.tui-editor-socket h1:first-child,.tui-editor-socket h2:first-child,.tui-editor-socket p:last-child{margin-bottom:0}.tui-editor-socket p:last-child,.tui-editor-socket pre:last-child{margin-bottom:0}.tui-editor-socket p:empty:after{content:" ";white-space:pre}.tui-editor-socket p:first-child{margin-top:0;min-width:1px}.tui-editor-socket p{margin:1rem 0}.tui-editor-socket p>span{line-height:initial}.tui-editor-socket blockquote{margin:1.25rem 0 1.25rem 1.5rem;padding-left:1.0625rem;border-left:1px solid var(--tui-base-04)}.tui-editor-socket hr{border:none;border-top:1px solid var(--tui-base-03);margin:1rem 0}.tui-editor-socket mark{background:unset;color:inherit}.tui-editor-socket font[face="Courier New"]{display:inline-block;padding:.25rem .5rem;border-radius:.25rem;background-color:#ecf1f7;word-break:break-word}.tui-editor-socket a:not([data-type="jump-anchor"]){color:var(--tui-link);text-decoration:none;outline:none}.tui-editor-socket a:not([data-type="jump-anchor"]):hover{color:var(--tui-link-hover);text-decoration:underline}.tui-editor-socket a:not([data-type="jump-anchor"]):active{color:var(--tui-primary-active)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]{text-decoration:underline;-webkit-text-decoration-color:var(--tui-link);text-decoration-color:var(--tui-link)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:before{content:"#"}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:hover{color:var(--tui-link)}.tui-editor-socket .ProseMirror a:hover img[contenteditable=false]{cursor:pointer;outline:.25rem solid var(--tui-link)}.tui-editor-socket ul:not([data-type]),.tui-editor-socket ol:not([data-type]){list-style-type:none;margin:1rem 1rem 1rem 1.5rem;padding:0}.tui-editor-socket ul:not([data-type]) li,.tui-editor-socket ol:not([data-type]) li{margin:.75rem 0}.tui-editor-socket ul:not([data-type]) li>p,.tui-editor-socket ol:not([data-type]) li>p{display:inline;margin:0 auto;word-break:break-word}.tui-editor-socket ul:not([data-type]) li:before,.tui-editor-socket ol:not([data-type]) li:before{unicode-bidi:-webkit-isolate;unicode-bidi:isolate;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;text-transform:none;text-indent:0;text-align:start;text-align-last:start}.tui-editor-socket ul:not([data-type]) li>p{display:block}.tui-editor-socket ul:not([data-type])>li:before{content:"";display:inline-block;width:.5rem;height:.5rem;border-radius:100%;margin:.5rem .875rem .0625rem -1.375rem;background-color:var(--tui-primary);vertical-align:top;box-sizing:border-box;float:left}.tui-editor-socket li ul:not([data-type])>li:before{background:none;border:.125rem solid var(--tui-primary)}.tui-editor-socket li ul:not([data-type])>li>ul:not([data-type])>li:before{background:var(--tui-primary);border-radius:0;width:.375rem;height:.375rem}.tui-editor-socket ol:not([data-type]){counter-reset:item}.tui-editor-socket ol:not([data-type])>li:before{content:counters(item,".") ".";display:block;margin:0 .75rem 0 -1.5rem;counter-increment:item;color:var(--tui-base-05);vertical-align:top;float:left;white-space:nowrap}.tui-editor-socket ul[data-type] li[data-checked]{display:flex;grid-gap:.5rem;gap:.5rem}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]{position:relative;width:var(--t-size, 1rem);height:var(--t-size, 1rem);border-radius:var(--tui-radius-xs, .25rem);transition-property:color,background,opacity,box-shadow,border;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:.125rem solid transparent;outline-offset:-.125rem;margin-top:.25rem;cursor:pointer}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:currentColor;-webkit-mask:url(\'data:image/svg+xml,\') center / 100%;mask:url(\'data:image/svg+xml,\') center / 100%;transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked{background:var(--tui-primary, #526ed3);color:var(--tui-primary-text, #fff)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked:before{-webkit-mask-image:url(\'data:image/svg+xml,\');mask-image:url(\'data:image/svg+xml,\');transform:scale(1)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]{box-shadow:inset 0 0 0 1px var(--tui-base-04);color:var(--tui-text-01)}.tui-editor-socket._preview-image img{cursor:pointer}.tui-editor-socket .ProseMirror video,.tui-editor-socket .ProseMirror audio{pointer-events:none}.tui-editor-socket img.ProseMirror-selectednode{outline:.25rem solid var(--tui-primary-hover)}.tui-editor-socket .t-editor-placeholder:before{content:attr(data-placeholder);float:left;color:var(--tui-base-05);pointer-events:none;height:0}.tui-editor-socket table{border-collapse:collapse;table-layout:fixed;width:100%;margin:0;overflow:hidden}.tui-editor-socket table .tableWrapper{overflow-x:auto}.tui-editor-socket .tableWrapper,.tui-editor-socket .tui-table-wrapper{overflow-x:auto}.tui-editor-socket table td{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word}.tui-editor-socket table th{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word;font-weight:bold;text-align:left;background-color:var(--tui-base-02);min-height:2rem}.tui-editor-socket table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background-color:#adf;pointer-events:none}.tui-editor-socket table td>*{margin-top:0;margin-bottom:0}.tui-editor-socket table th>*{margin-top:0;margin-bottom:0}.tui-editor-socket .selectedCell:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--tui-selection);pointer-events:none}.tui-editor-socket summary{display:flex;align-items:center;min-height:3.5rem;width:100%;padding:0 1.25rem;box-sizing:border-box;border-radius:var(--tui-radius-l);pointer-events:none;outline:none}.tui-editor-socket summary:focus-visible{outline:2px solid var(--tui-link)}.tui-editor-socket summary p{min-width:1px;margin:0}.tui-editor-socket summary::-webkit-details-marker{display:none}.tui-editor-socket details[open] summary{border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-editor-socket .details-arrow,.tui-editor-socket .t-details-arrow{position:absolute;top:1.5rem;right:1.25rem;height:.575rem;width:.575rem;border:1px solid var(--tui-base-06);border-width:0 2px 2px 0;transform:rotate(45deg);transition:var(--tui-duration, .3s);-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:0;background:none;cursor:pointer;outline:none}.tui-editor-socket details{width:100%;border:1px solid var(--tui-base-04);border-radius:var(--tui-radius-l)}.tui-editor-socket div[data-type=details-content]{padding:1.25rem;min-height:3rem;border:1px solid var(--tui-base-04);border-width:1px 0 0}.tui-editor-socket div[data-type=details-content] h1:first-child,.tui-editor-socket div[data-type=details-content] h2:first-child,.tui-editor-socket div[data-type=details-content] pre:first-child,.tui-editor-socket div[data-type=details-content] ul:first-child,.tui-editor-socket div[data-type=details-content] ol:first-child,.tui-editor-socket div[data-type=details-content] ol li:first-child,.tui-editor-socket div[data-type=details-content] ul li:first-child{margin-top:0}.tui-editor-socket .details-wrapper,.tui-editor-socket .t-details-wrapper{margin-bottom:.5rem;position:relative;display:flex}.tui-editor-socket .details-wrapper_rendered .details-arrow,.tui-editor-socket .t-details-wrapper_rendered .details-arrow,.tui-editor-socket .details-wrapper_rendered .t-details-arrow,.tui-editor-socket .t-details-wrapper_rendered .t-details-arrow{pointer-events:none}.tui-editor-socket .details-wrapper_rendered summary,.tui-editor-socket .t-details-wrapper_rendered summary{transition:transform var(--tui-duration, .3s);cursor:pointer;pointer-events:auto}.tui-editor-socket .details-wrapper_rendered summary:hover,.tui-editor-socket .t-details-wrapper_rendered summary:hover{background:var(--tui-base-02)}.tui-editor-socket details[open]+.details-arrow,.tui-editor-socket details[open]+.t-details-arrow{top:1.75rem;transform:rotate(225deg)}.tui-editor-socket pre{white-space:pre-wrap;word-break:break-word;border-radius:.25rem;margin:1rem 0;padding:.75rem 1rem;font-family:Courier,monospace;color:var(--tui-text-02);background:var(--tui-base-02)}.tui-editor-socket .tui-group-node{display:flex;flex-direction:row}.tui-editor-socket .tui-group-node:hover>.tui-group-pointer{pointer-events:auto;opacity:1}.tui-editor-socket .tui-group-pointer{opacity:0;min-height:.8125rem;max-height:.8125rem;min-width:.8125rem;max-width:.8125rem;margin:.3125rem .3125rem 0 0;cursor:grab;background-image:url(\'data:image/svg+xml;charset=UTF-8,\');background-repeat:no-repeat;background-size:contain;background-position:center}.tui-editor-socket [data-mode=onDark] .tui-group-pointer{background-image:url(\'data:image/svg+xml;charset=UTF-8,\')}\n'],encapsulation:2,changeDetection:0}),t})()},13099:(t,e,n)=>{n.d(e,{W:()=>c});var r=n(42600),o=n(43232),i=n(9112),s=n(88002),a=n(87519),l=n(74788);let c=(()=>{class t extends o.ydp{constructor(){super(...arguments),this.previousTagPosition=null,this.stream$=(0,i.aj)([this.handler$,this.selection$.pipe((0,s.U)((()=>this.getRange())),(0,a.x)(((t,e)=>t.startOffset===e.startOffset&&t.endOffset===e.endOffset)))]).pipe((0,s.U)((([t,e])=>{var n;const o=this.el.nativeElement.contains(e.commonAncestorContainer)||(null===(n=e.commonAncestorContainer.parentElement)||void 0===n?void 0:n.closest("tui-dropdown"));return this.range=o&&(0,r.wqZ)(e.commonAncestorContainer)?e:this.range,o&&t(this.range)||this.inDropdown(e)}))),this.position="selection"}set tuiToolbarDropdown(t){this.tuiDropdownSelection=t}getClientRect(){var t,e,n,i;switch(this.position){case"tag":{const{commonAncestorContainer:o}=this.range,i=(0,r.veZ)(o)?o:o.parentNode;return(null===(t=null==i?void 0:i.parentElement)||void 0===t?void 0:t.closest("tui-dropdown"))?null!==(e=this.previousTagPosition)&&void 0!==e?e:r.Jy9:(this.previousTagPosition=i&&(0,r.veZ)(i)?(null===(n=this.doc.querySelector(".ProseMirror-selectednode"))||void 0===n?void 0:n.getBoundingClientRect())||i.getBoundingClientRect():r.Jy9,this.previousTagPosition)}case"word":return(0,o.DII)(this.range).getBoundingClientRect();default:{const t=this.range.getBoundingClientRect();return 0===t.x&&0===t.y&&0===t.width&&0===t.height?(null!==(i=this.el.nativeElement.querySelector("p"))&&void 0!==i?i:this.el.nativeElement).getBoundingClientRect():t}}}}return t.ɵfac=function(){let e;return function(n){return(e||(e=l.n5z(t)))(n||t)}}(),t.ɵdir=l.lG2({type:t,selectors:[["","tuiToolbarDropdown",""]],inputs:{position:["tuiToolbarDropdownPosition","position"],tuiToolbarDropdown:"tuiToolbarDropdown"},features:[l._Bn([(0,o.UKU)(t),(0,o.Ic9)(t)]),l.qOj]}),t})()},8820:(t,e,n)=>{n.d(e,{a:()=>J});var r=n(12057),o=n(74788),i=n(24751),s=n(42600),a=n(43232),l=n(90712),c=n(69725),d=n(5915),u=n(40401),h=n(48178),p=n(87874),f=n(46782),m=n(1566),g=n(42),b=n(55788),k=n(62490),v=n(96281),y=n(57495),w=n(21335),x=n(16331),C=n(82335),A=n(80475),M=n(62541),S=n(13099),_=n(76690),T=n(6723),E=n(10553);function O(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-toolbar",7),o.NdJ("fileAttached",(function(e){return o.CHM(t),o.oxw(2).fileAttached.emit(e)})),o.Hsn(1,1),o.qZA()}if(2&t){const t=o.oxw(2);o.Q6J("disabled",!t.interactive)("tools",t.tools)}}function D(t,e){if(1&t&&(o.TgZ(0,"div",8),o._uU(1),o.qZA()),2&t){const t=o.oxw(2);o.xp6(1),o.hij(" ",t.exampleText," ")}}function N(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-scrollbar",12),o.NdJ("mousedown",(function(e){return o.CHM(t),o.oxw(3).focus(e)})),o.GkF(1,13),o.qZA()}if(2&t){o.oxw();const t=o.MAs(4);o.xp6(1),o.Q6J("ngTemplateOutlet",t)}}function L(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-scrollbar",14),o.NdJ("mousedown",(function(e){return o.CHM(t),o.oxw(3).focus(e)})),o.GkF(1,13),o._UZ(2,"tui-editor-portal-host"),o.qZA()}if(2&t){o.oxw();const t=o.MAs(4);o.xp6(1),o.Q6J("ngTemplateOutlet",t)}}function I(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-toolbar",20),o.NdJ("fileAttached",(function(e){return o.CHM(t),o.oxw(5).fileAttached.emit(e)})),o.Hsn(1,2),o.qZA()}if(2&t){const t=o.oxw().$implicit,e=o.oxw(4);o.Q6J("disabled",!e.interactive)("tools",e.tools)("tuiActiveZoneParent",t)}}function R(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-edit-link",21,22),o.NdJ("addLink",(function(e){o.CHM(t);const n=o.MAs(1),r=o.oxw(5);return n.anchorMode?r.addAnchor(e):r.addLink(e)}))("removeLink",(function(){o.CHM(t);const e=o.MAs(1),n=o.oxw(5);return e.anchorMode?n.removeAnchor():n.removeLink()})),o.qZA()}}function z(t,e){1&t&&(o.ynx(0),o.Hsn(1,3),o.BQk())}function P(t,e){if(1&t&&(o.TgZ(0,"div"),o.YNc(1,I,2,3,"tui-toolbar",18),o.YNc(2,R,2,0,"tui-edit-link",19),o.YNc(3,z,2,0,"ng-container",6),o.qZA()),2&t){const t=o.oxw(3).ngIf,e=o.oxw();o.ekj("t-floating",e.floatingToolbar),o.xp6(1),o.Q6J("ngIf",t&&e.tools.length&&e.floatingToolbar),o.xp6(1),o.Q6J("ngIf",e.isLinkSelected),o.xp6(1),o.Q6J("ngIf",e.mentionSuggestions)}}function H(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",15),o.TgZ(1,"tui-editor-socket",16),o.NdJ("stateChange",(function(){return 0}))("valueChange",(function(e){return o.CHM(t),o.oxw(3).onModelChange(e)})),o.qZA(),o.qZA(),o.YNc(2,P,4,5,"ng-template",null,17,o.W1O)}if(2&t){const t=o.MAs(3),e=o.oxw(3);o.Q6J("tuiDropdown",t)("tuiToolbarDropdown",e.dropdownSelectionHandler)("tuiToolbarDropdownPosition",e.floatingToolbar?"selection":"tag"),o.xp6(1),o.Q6J("editable",e.interactive)("value",e.value)}}function q(t,e){if(1&t&&(o.ynx(0),o.YNc(1,N,2,1,"tui-scrollbar",9),o.YNc(2,L,3,1,"tui-scrollbar",10),o.YNc(3,H,4,5,"ng-template",null,11,o.W1O),o.BQk()),2&t){const t=o.oxw(2);o.xp6(1),o.Q6J("ngIf",t.floatingToolbar),o.xp6(1),o.Q6J("ngIf",!t.floatingToolbar)}}function B(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"div",1),o.NdJ("tuiActiveZoneChange",(function(e){return o.CHM(t),o.oxw().onActiveZone(e)})),o.TgZ(1,"div",2),o.YNc(2,O,2,2,"tui-toolbar",3),o.TgZ(3,"div",4),o.Hsn(4),o.qZA(),o.YNc(5,D,2,1,"div",5),o.qZA(),o.YNc(6,q,5,2,"ng-container",6),o.qZA()}if(2&t){const t=e.ngIf,n=o.oxw();o.Q6J("appearance",n.options.appearence)("disabled",n.disabled)("focus",n.computedFocused)("hover",n.pseudoHover)("invalid",n.computedInvalid)("readOnly",n.readOnly),o.xp6(2),o.Q6J("ngIf",t&&n.tools.length&&!n.floatingToolbar),o.xp6(1),o.ekj("t-placeholder_raised",n.placeholderRaised),o.xp6(2),o.Q6J("ngIf",n.hasExampleText),o.xp6(1),o.Q6J("ngIf",t)}}const $=["*",[["tools"]],[["tools"]],[["mention"]]],F=["*","tools","tools","mention"];let J=(()=>{class t extends s.M$T{constructor(t,e,n,r,i,s,a,l){super(t,e,a),this.editorLoaded$=n,this.editorService=r,this.contentProcessor=i,this.doc=s,this.options=l,this.exampleText="",this.tools=c.Db,this.floatingToolbar=!1,this.fileAttached=new o.vpe,this.focused=!1,this.openDropdownWhen=t=>this.currentFocusedNodeIsTextAnchor(t)||this.currentFocusedNodeIsImageAnchor||this.mentionSuggestions.length>0,this.editorLoaded$.pipe((0,p.g)(0),(0,f.R)(this.destroy$)).subscribe((()=>this.patchContentEditableElement()))}get nativeFocusableElement(){var t,e;return this.computedDisabled?null:(null===(e=null===(t=this.el)||void 0===t?void 0:t.nativeElement)||void 0===e?void 0:e.querySelector("[contenteditable].ProseMirror"))||null}get dropdownSelectionHandler(){return this.floatingToolbar?s.YeN:this.focused?this.openDropdownWhen:s.IyD}get editor(){return this.editorService.getOriginTiptapEditor()?this.editorService:null}get placeholderRaised(){return this.computedFocused&&!this.readOnly||this.hasValue}get hasExampleText(){return!!this.exampleText&&this.computedFocused&&!this.hasValue&&!this.readOnly}get isLinkSelected(){var t,e,n;const r=null===(t=this.doc.getSelection())||void 0===t?void 0:t.focusNode,o=null==r?void 0:r.parentNode;return"a"===(null==o?void 0:o.nodeName.toLowerCase())||"a"===(null===(e=null==o?void 0:o.parentNode)||void 0===e?void 0:e.nodeName.toLowerCase())||"a"===(null==r?void 0:r.nodeName.toLowerCase())||!!(null===(n=null==o?void 0:o.parentElement)||void 0===n?void 0:n.closest("tui-edit-link"))}get mentionSuggestions(){const t=this.selectionState.before;return(null==t?void 0:t.startsWith("@"))&&t.length>1&&(null==t?void 0:t.replace("@",""))||""}writeValue(t){var e,n;if(t===this.value)return;const r=this.contentProcessor(t||"");super.writeValue(r),r!==t&&(null===(e=this.control)||void 0===e||e.setValue(r,{onlySelf:!1,emitEvent:!1,emitModelToViewChange:!1,emitViewToModelChange:!1})),this.focused||null===(n=this.doc.getSelection())||void 0===n||n.removeAllRanges()}onActiveZone(t){var e;this.focused=t,this.updateFocused(t),null===(e=this.control)||void 0===e||e.updateValueAndValidity()}onModelChange(t){this.value=t}addAnchor(t){var e;null===(e=this.editor)||void 0===e||e.setAnchor(t)}removeAnchor(){var t;null===(t=this.editor)||void 0===t||t.removeAnchor()}addLink(t){var e,n;null===(e=this.editor)||void 0===e||e.selectClosest(),null===(n=this.editor)||void 0===n||n.setLink(t)}removeLink(){var t;null===(t=this.editor)||void 0===t||t.unsetLink()}get selectionState(){return(0,h.Q4)(this.editor)}focus(t){var e,n;(null===(e=this.nativeFocusableElement)||void 0===e?void 0:e.contains(t.target))||(t.preventDefault(),null===(n=this.nativeFocusableElement)||void 0===n||n.focus())}ngOnDestroy(){var t;null===(t=this.editor)||void 0===t||t.destroy()}getFallbackValue(){return""}currentFocusedNodeIsTextAnchor(t){var e,n;return!!(null===(n=null===(e=t.startContainer.parentElement)||void 0===e?void 0:e.closest("a"))||void 0===n?void 0:n.contains(this.focusNode))&&(0,h.nC)(t)}get focusNode(){var t,e;return null!==(e=null===(t=this.doc.getSelection())||void 0===t?void 0:t.focusNode)&&void 0!==e?e:null}get hasValue(){return!!this.value}get currentFocusedNodeIsImageAnchor(){var t,e,n;return"A"===(null===(t=this.focusNode)||void 0===t?void 0:t.nodeName)&&["IMG","TUI-IMAGE-EDITOR"].includes(null===(n=null===(e=this.focusNode)||void 0===e?void 0:e.childNodes[0])||void 0===n?void 0:n.nodeName)}patchContentEditableElement(){var t,e;null===(t=this.nativeFocusableElement)||void 0===t||t.setAttribute("translate",this.options.translate),null===(e=this.nativeFocusableElement)||void 0===e||e.setAttribute("spellcheck",String(this.options.spellcheck))}}return t.ɵfac=function(e){return new(e||t)(o.Y36(i.a5,10),o.Y36(o.sBO),o.Y36(u.ZW),o.Y36(d.$3),o.Y36(u.F1),o.Y36(r.K0),o.Y36(u.bK,8),o.Y36(u.mJ))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-editor"]],viewQuery:function(t,e){if(1&t&&(o.Gf(d.JU,5,o.SBq),o.Gf(l.M6,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.el=t.first),o.iGM(t=o.CRH())&&(e.toolbar=t.first)}},inputs:{exampleText:"exampleText",tools:"tools",floatingToolbar:"floatingToolbar"},outputs:{fileAttached:"fileAttached"},features:[o._Bn([(0,s.FTc)(t),(0,s.f$T)({delay:a.GcO}),m.m]),o.qOj],ngContentSelectors:F,decls:2,vars:3,consts:[["tuiWrapper","","class","t-wrapper",3,"appearance","disabled","focus","hover","invalid","readOnly","tuiActiveZoneChange",4,"ngIf"],["tuiWrapper","",1,"t-wrapper",3,"appearance","disabled","focus","hover","invalid","readOnly","tuiActiveZoneChange"],[1,"t-toolbar-wrapper"],[3,"disabled","tools","fileAttached",4,"ngIf"],[1,"t-placeholder"],["class","t-example-text",4,"ngIf"],[4,"ngIf"],[3,"disabled","tools","fileAttached"],[1,"t-example-text"],["class","t-scrollbar",3,"mousedown",4,"ngIf"],["tuiEditorPortal","","class","t-scrollbar",3,"mousedown",4,"ngIf"],["editor",""],[1,"t-scrollbar",3,"mousedown"],[3,"ngTemplateOutlet"],["tuiEditorPortal","",1,"t-scrollbar",3,"mousedown"],["tuiDropdownLimitWidth","auto",3,"tuiDropdown","tuiToolbarDropdown","tuiToolbarDropdownPosition"],["tuiTiptapEditor","",3,"editable","value","stateChange","valueChange"],["dropdown",""],[3,"disabled","tools","tuiActiveZoneParent","fileAttached",4,"ngIf"],[3,"addLink","removeLink",4,"ngIf"],[3,"disabled","tools","tuiActiveZoneParent","fileAttached"],[3,"addLink","removeLink"],["link",""]],template:function(t,e){1&t&&(o.F$t($),o.YNc(0,B,7,11,"div",0),o.ALo(1,"async")),2&t&&o.Q6J("ngIf",o.lcZ(1,1,e.editorLoaded$))},directives:[r.O5,g.o,b.e,k.M,v.I,r.tP,y.A,w.d,x.Ek,C.t,A.V,M.A,S.W,_.D,T.J,E.l],pipes:[r.Ov],styles:["[_nghost-%COMP%]{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);border-radius:var(--tui-radius-m);max-height:inherit;min-height:10rem;box-sizing:border-box;overflow:clip}.t-wrapper[_ngcontent-%COMP%]{display:flex;max-height:inherit;min-height:inherit;cursor:text;overflow:clip;flex-direction:column;border-radius:inherit}.t-placeholder[_ngcontent-%COMP%]{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-02);pointer-events:none;will-change:transform;transform:translateY(0);margin:1rem 1rem -1rem;min-height:1.625rem;width:95%;font-size:.9375rem}@supports (-webkit-hyphens: none){.t-placeholder[_ngcontent-%COMP%]{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised[_ngcontent-%COMP%]{transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}._invalid[_nghost-%COMP%]:not(._focused) .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill)}._invalid[_nghost-%COMP%]:not(._focused) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%], ._invalid[_nghost-%COMP%]:not(._focused):hover [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{color:var(--tui-error-fill-night)}._focused[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-03)}[data-size=l][_nghost-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font:var(--tui-font-text-m);line-height:1.25rem}[data-size=l][_nghost-%COMP%] .t-placeholder_raised[_ngcontent-%COMP%]{font-size:.8156rem}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01)}[tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}[data-size=m]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused[_nghost-%COMP%]:not(._label-outside) [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-01-night)}._focused[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=m]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%], [data-size=l]._focused._label-outside[_nghost-%COMP%] [tuiWrapper][data-mode=onDark][_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{color:var(--tui-text-02-night)}.t-placeholder_raised[_ngcontent-%COMP%]{width:110%}.t-placeholder[_ngcontent-%COMP%]:empty{min-height:.8rem}.t-example-text[_ngcontent-%COMP%]{position:absolute;left:1rem;margin-top:1.6rem;color:var(--tui-base-06);letter-spacing:normal;text-transform:none}.t-example-text_light[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}.t-example-text_dark[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-scrollbar[_ngcontent-%COMP%]{display:flex;border-bottom:.3125rem solid transparent;padding-bottom:1.3125rem;box-sizing:border-box;flex:1}.t-floating[_ngcontent-%COMP%], .t-floating[_ngcontent-%COMP%] .t-tools-wrapper{max-width:var(--tui-floating-toolbar-max-width, 31.25rem);flex-wrap:nowrap}"],changeDetection:0}),t})()},1566:(t,e,n)=>{n.d(e,{m:()=>h});var r=n(74788),o=n(5915),i=n(40401),s=n(74235),a=n(9112),l=n(15257),c=n(88002),d=n(47349),u=n(53058);const h=[{provide:i.F4,deps:[i.Wf],useFactory:t=>{const e=new s.t(1);return Promise.all(t).then((t=>e.next(t))),e}},{provide:i.Y1,deps:[r.Qsj],useFactory:t=>t.createElement("div")},{provide:i.ZW,deps:[i.Y1,i.F4,i.bG],useFactory:(t,e,n)=>(0,a.aj)([n,e]).pipe((0,l.q)(1),(0,c.U)((([e,n])=>new e({element:t,extensions:n}))),(0,d.d)({bufferSize:1,refCount:!0}))},o.$3,u.Y]},21335:(t,e,n)=>{n.d(e,{d:()=>i});var r=n(42600),o=n(74788);let i=(()=>{class t extends r.ErH{}return t.ɵfac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.ɵcmp=o.Xpm({type:t,selectors:[["tui-editor-portal-host"]],features:[o._Bn([{provide:r.N9Y,useExisting:r.ae2},{provide:r.ErH,useExisting:t}]),o.qOj],decls:2,vars:0,consts:[["viewContainer",""]],template:function(t,e){1&t&&o.GkF(0,null,0)},styles:["[_nghost-%COMP%]{position:absolute;top:0;left:0;display:block;height:100%;width:100%;pointer-events:none}"],changeDetection:0}),t})()},57495:(t,e,n)=>{n.d(e,{A:()=>a});var r=n(74788),o=n(42600),i=n(43232),s=n(53058);let a=(()=>{class t extends i.O4x{constructor(t){super(),this.el=t,this.type="viewport"}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq))},t.ɵdir=r.lG2({type:t,selectors:[["","tuiEditorPortal",""]],features:[r._Bn([{provide:o.ae2,useExisting:s.Y},(0,i.ckU)(t)]),r.qOj]}),t})()},53058:(t,e,n)=>{n.d(e,{Y:()=>i});var r=n(42600),o=n(74788);let i=(()=>{class t extends r.N9Y{}return t.ɵfac=function(){let e;return function(n){return(e||(e=o.n5z(t)))(n||t)}}(),t.ɵprov=o.Yz7({token:t,factory:t.ɵfac}),t})()},69057:(t,e,n)=>{n.d(e,{j:()=>v});var r=n(97582),o=n(74788),i=n(24751),s=n(91211),a=n(42600),l=n(43232),c=n(48178),d=n(98778),u=n(75526),h=n(19042),p=n(45642),f=n(61183),m=n(58333),g=n(55788);function b(t,e){if(1&t&&o._UZ(0,"div",4),2&t){const t=o.oxw();o.Udp("background",t.background)}}function k(t,e){if(1&t){const t=o.EpF();o.TgZ(0,"tui-color-selector",5),o.NdJ("colorChange",(function(e){return o.CHM(t),o.oxw().value=e})),o.qZA()}if(2&t){const t=e.$implicit,n=o.oxw();o.Q6J("colors",n.colors)("tuiActiveZoneParent",t)("color",n.value)}}class v extends a.M$T{constructor(t,e,n){super(t,e),this.domSanitizer=n,this.colors=new Map,this.open=!1}get nativeFocusableElement(){return this.computedDisabled||!this.textfield?null:this.textfield.nativeFocusableElement}get focused(){return!!this.dropdown&&this.dropdown.focused}get background(){return this.sanitize(this.value,this.domSanitizer)}get mode(){return this.value.startsWith("#")?"hex":this.value.startsWith("rgb")?"rgb":"gradient"}onClick(){this.open=!this.open}maskitoOptions(t){return"hex"===t?{mask:["#",...new Array(6).fill(/[0-9a-f]/i)]}:null}onValueChange(t){this.value=t}onFocused(t){this.updateFocused(t)}getFallbackValue(){return"#000000"}sanitize(t,e){return t.startsWith("linear-gradient(")?e.bypassSecurityTrustStyle((0,c.CH)((0,c._N)((0,c.U5)(t)))):t}}v.ɵfac=function(t){return new(t||v)(o.Y36(i.a5,10),o.Y36(o.sBO),o.Y36(s.H7))},v.ɵcmp=o.Xpm({type:v,selectors:[["tui-input-color"]],viewQuery:function(t,e){if(1&t&&(o.Gf(l.ycg,5),o.Gf(l.o1K,5)),2&t){let t;o.iGM(t=o.CRH())&&(e.textfield=t.first),o.iGM(t=o.CRH())&&(e.dropdown=t.first)}},hostBindings:function(t,e){1&t&&o.NdJ("click",(function(){return e.onClick()}))},inputs:{colors:"colors"},features:[o._Bn([],[(0,l.fxH)({maxHeight:600})]),o.qOj],ngContentSelectors:["*"],decls:7,vars:13,consts:[[1,"t-wrapper",3,"content","open","openChange"],[1,"t-textfield",3,"disabled","focusable","invalid","maskito","nativeId","pseudoActive","pseudoFocus","pseudoHover","readOnly","tuiTextfieldIconLeft","value","valueChange","focusedChange"],["color",""],["picker",""],[1,"t-color"],[3,"colors","tuiActiveZoneParent","color","colorChange"]],template:function(t,e){if(1&t&&(o.F$t(),o.TgZ(0,"tui-hosted-dropdown",0),o.NdJ("openChange",(function(t){return e.open=t})),o.TgZ(1,"tui-primitive-textfield",1),o.NdJ("valueChange",(function(t){return e.value=t}))("focusedChange",(function(t){return e.onFocused(t)})),o.Hsn(2),o.qZA(),o.qZA(),o.YNc(3,b,1,2,"ng-template",null,2,o.W1O),o.YNc(5,k,1,3,"ng-template",null,3,o.W1O)),2&t){const t=o.MAs(4),n=o.MAs(6);o.Q6J("content",n)("open",e.open),o.xp6(1),o.Q6J("disabled",e.disabled)("focusable",e.focusable)("invalid",e.computedInvalid)("maskito",e.maskitoOptions(e.mode))("nativeId",e.nativeId)("pseudoActive",e.pseudoActive)("pseudoFocus",e.computedFocused)("pseudoHover",e.pseudoHover)("readOnly",e.readOnly)("tuiTextfieldIconLeft",t)("value",e.value)}},directives:[d.o,u.y,h.B,p.ro,f.a,m.s,g.e],styles:["[_nghost-%COMP%]{display:block;border-radius:var(--tui-radius-m);text-align:left}.t-wrapper[_ngcontent-%COMP%]{display:flex;border-radius:inherit}.t-textfield[_ngcontent-%COMP%]{border-radius:inherit;text-align:inherit}.t-textfield[_ngcontent-%COMP%] .t-input{text-transform:lowercase!important}.t-color[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-03-dark);border-radius:.125rem;pointer-events:auto!important}"],changeDetection:0}),(0,r.gn)([a.UMq],v.prototype,"maskitoOptions",null),(0,r.gn)([a.UMq],v.prototype,"sanitize",null)},29761:(t,e,n)=>{n.d(e,{X:()=>y});var r=n(5915),o=n(40401),i=n(9112),s=n(88002),a=n(74788),l=n(12057),c=n(42486),d=n(98778),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928);function b(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",6),a.TgZ(1,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("left")})),a.qZA(),a.TgZ(2,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("center")})),a.qZA(),a.TgZ(3,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("right")})),a.qZA(),a.TgZ(4,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.onAlign("justify")})),a.qZA(),a.qZA()}if(2&t){const t=a.oxw().tuiLet,e=a.oxw().ngIf,n=a.oxw();a.xp6(1),a.Q6J("icon",n.options.icons.textAlignLeft)("pseudoActive",!(null==t||!t.left))("tuiHint",e.justifyLeft),a.xp6(1),a.Q6J("icon",n.options.icons.textAlignCenter)("pseudoActive",!(null==t||!t.center))("tuiHint",e.justifyCenter),a.xp6(1),a.Q6J("icon",n.options.icons.textAlignRight)("pseudoActive",!(null==t||!t.right))("tuiHint",e.justifyRight),a.xp6(1),a.Q6J("icon",n.options.icons.textAlignJustify)("pseudoActive",!(null==t||!t.justify))("tuiHint",e.justifyFull)}}function k(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",2,3),a._UZ(2,"button",4),a.YNc(3,b,5,12,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=a.MAs(1),e=a.MAs(4),n=a.oxw().ngIf,r=a.oxw();a.Q6J("content",e),a.xp6(2),a.Q6J("focusable",t.open)("icon",r.options.icons.textAlignPreview)("pseudoActive",t.open)("tuiHint",n.justify)}}function v(t,e){if(1&t&&(a.ynx(0),a.YNc(1,k,5,5,"tui-hosted-dropdown",1),a.ALo(2,"async"),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("tuiLet",a.lcZ(2,1,t.alignState$))}}let y=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.alignState$=(0,i.aj)([this.editor.isActive$({textAlign:"left"}),this.editor.isActive$({textAlign:"right"}),this.editor.isActive$({textAlign:"center"}),this.editor.isActive$({textAlign:"justify"})]).pipe((0,s.U)((([t,e,n,r])=>({left:t,right:e,center:n,justify:r}))))}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-align-content"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["align",""],["appearance","icon","automation-id","toolbar__align-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["alignDropdown",""],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,v,3,3,"ng-container",0),a.ALo(1,"async")),2&t&&a.Q6J("ngIf",a.lcZ(1,1,e.texts$))},directives:[l.O5,c.L,d.o,u.v,h.$,p.D,f.x,m.t,g.D],pipes:[l.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},56496:(t,e,n)=>{n.d(e,{T:()=>y});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(98778),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928),m=n(22545),g=n(12057),b=n(91283);function k(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"button",5),a.NdJ("click",(function(){const e=a.CHM(t).index;return a.oxw(2).onCode(!!e)})),a._uU(1),a.qZA()}if(2&t){const t=e.$implicit;a.xp6(1),a.hij(" ",t," ")}}function v(t,e){if(1&t&&(a.TgZ(0,"tui-data-list"),a.YNc(1,k,2,1,"button",4),a.ALo(2,"async"),a.qZA()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("ngForOf",a.lcZ(2,1,t.codeOptionsTexts$))}}let y=(()=>{class t{constructor(t,e,n,r){this.options=t,this.editor=e,this.texts$=n,this.codeOptionsTexts$=r,this.hintText$=this.texts$.pipe((0,i.U)((t=>t.code))),this.insideCode$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.isActive("code")||this.editor.isActive("codeBlock"))),(0,s.x)())}onCode(t){t?this.editor.toggleCodeBlock():this.editor.toggleCode()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf),a.Y36(o.Mr))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-code"]],decls:7,vars:9,consts:[[3,"content"],["codes",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["codesDropdown",""],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",0,1),a._UZ(2,"button",2),a.ALo(3,"async"),a.ALo(4,"async"),a.YNc(5,v,3,3,"ng-template",null,3,a.W1O),a.qZA()),2&t){const t=a.MAs(1),n=a.MAs(6);a.Q6J("content",n),a.xp6(2),a.Q6J("focusable",t.open)("icon",e.options.icons.code)("pseudoActive",t.open||a.lcZ(3,5,e.insideCode$))("tuiHint",a.lcZ(4,7,e.hintText$))}},directives:[l.o,c.v,d.$,u.D,h.x,p.t,f.D,m.q,g.sg,b.v],pipes:[g.Ov],encapsulation:2,changeDetection:0}),t})()},47859:(t,e,n)=>{n.d(e,{U:()=>g});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(12057),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928);function m(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"button",1),a.NdJ("click",(function(){return a.CHM(t),a.oxw().removeDetails()})),a.ALo(1,"async"),a.qZA()}if(2&t){const t=e.ngIf,n=a.oxw();a.Q6J("disabled",!!a.lcZ(1,4,n.disabled$))("focusable",!1)("icon",n.options.icons.detailsRemove)("tuiHint",t.removeDetails)}}let g=(()=>{class t{constructor(t,e,n){this.editor=t,this.texts$=e,this.options=n,this.disabled$=this.editor.stateChange$.pipe((0,i.U)((()=>!this.editor.isActive("details"))),(0,s.x)())}removeDetails(){this.editor.removeDetails()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(r.$3),a.Y36(o.rf),a.Y36(o.mJ))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-details-remove"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,m,2,6,"button",0),a.ALo(1,"async")),2&t&&a.Q6J("ngIf",a.lcZ(1,1,e.texts$))},directives:[l.O5,c.v,d.$,u.D,h.x,p.t,f.D],pipes:[l.Ov],encapsulation:2,changeDetection:0}),t})()},26929:(t,e,n)=>{n.d(e,{y:()=>f});var r=n(5915),o=n(40401),i=n(74788),s=n(12057),a=n(18289),l=n(44099),c=n(13938),d=n(10406),u=n(63790),h=n(51928);function p(t,e){if(1&t){const t=i.EpF();i.TgZ(0,"button",1),i.NdJ("click",(function(){return i.CHM(t),i.oxw().setDetails()})),i.qZA()}if(2&t){const t=e.ngIf,n=i.oxw();i.Q6J("focusable",!1)("icon",n.options.icons.detailsAdd)("tuiHint",t.setDetails)}}let f=(()=>{class t{constructor(t,e,n){this.editor=t,this.texts$=e,this.options=n}setDetails(){this.editor.setDetails()}}return t.ɵfac=function(e){return new(e||t)(i.Y36(r.$3),i.Y36(o.rf),i.Y36(o.mJ))},t.ɵcmp=i.Xpm({type:t,selectors:[["tui-details"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(i.YNc(0,p,1,3,"button",0),i.ALo(1,"async")),2&t&&i.Q6J("ngIf",i.lcZ(1,1,e.texts$))},directives:[s.O5,a.v,l.$,c.D,d.x,u.t,h.D],pipes:[s.Ov],encapsulation:2,changeDetection:0}),t})()},37982:(t,e,n)=>{n.d(e,{m:()=>x});var r=n(42600),o=n(69725),i=n(5915),s=n(40401),a=n(88002),l=n(74788),c=n(98778),d=n(18289),u=n(44099),h=n(13938),p=n(10406),f=n(63790),m=n(51928),g=n(22545),b=n(12057),k=n(91283);const v=function(){return{}};function y(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"button",5),l.NdJ("click",(function(){const e=l.CHM(t).$implicit;return l.oxw(2).setFontOption(e)})),l.ALo(1,"lowercase"),l._uU(2),l.qZA()}if(2&t){const t=e.$implicit;l.Udp("font-family",t.family)("font-size",t.px,"px")("font-weight",t.weight),l.Q6J("ngClass",(null==t?null:t.ngClass)||l.DdM(12,v))("ngStyle",(null==t?null:t.ngStyle)||l.DdM(13,v)),l.uIk("automation-id","tui_font__"+l.lcZ(1,10,t.name||"")),l.xp6(2),l.hij(" ",t.name," ")}}function w(t,e){if(1&t&&(l.TgZ(0,"tui-data-list"),l.YNc(1,y,3,14,"button",4),l.ALo(2,"async"),l.qZA()),2&t){const t=l.oxw();l.xp6(1),l.Q6J("ngForOf",l.lcZ(2,1,t.fontsOptions$))}}let x=(()=>{class t{constructor(t,e,n,r){this.options=t,this.editor=e,this.texts$=n,this.fontOptionsTexts$=r,this.fontsOptions$=this.fontOptionsTexts$.pipe((0,a.U)((t=>this.options.fontOptions(t)))),this.fontText$=this.texts$.pipe((0,a.U)((t=>t.font)))}onClick({headingLevel:t,px:e}){this.setFontOption({headingLevel:t,px:e})}setFontOption({headingLevel:t,px:e}){const n=this.editor.getFontColor();this.clearPreviousTextStyles(),t?this.editor.setHeading(t):this.editor.setParagraph({fontSize:(0,r.O9r)(e||0)}),n!==o.hK&&this.editor.setFontColor(n)}clearPreviousTextStyles(){this.editor.removeEmptyTextStyle(),this.editor.toggleMark("textStyle")}}return t.ɵfac=function(e){return new(e||t)(l.Y36(s.mJ),l.Y36(i.$3),l.Y36(s.rf),l.Y36(s.UN))},t.ɵcmp=l.Xpm({type:t,selectors:[["tui-font-size"]],decls:6,vars:7,consts:[[3,"content"],["fonts",""],["appearance","icon","automation-id","toolbar__font-size-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["fontsDropdown",""],["tuiOption","",3,"ngClass","ngStyle","fontFamily","fontSize","fontWeight","click",4,"ngFor","ngForOf"],["tuiOption","",3,"ngClass","ngStyle","click"]],template:function(t,e){if(1&t&&(l.TgZ(0,"tui-hosted-dropdown",0,1),l._UZ(2,"button",2),l.ALo(3,"async"),l.YNc(4,w,3,3,"ng-template",null,3,l.W1O),l.qZA()),2&t){const t=l.MAs(1),n=l.MAs(5);l.Q6J("content",n),l.xp6(2),l.Q6J("focusable",t.open)("icon",e.options.icons.fontSize)("pseudoActive",t.open)("tuiHint",l.lcZ(3,5,e.fontText$))}},directives:[c.o,d.v,u.$,h.D,p.x,f.t,m.D,g.q,b.sg,k.v,b.mk,b.PC],pipes:[b.Ov,b.i8],encapsulation:2,changeDetection:0}),t})()},10845:(t,e,n)=>{n.d(e,{h:()=>M});var r=n(69725),o=n(5915),i=n(72023),s=n(40401),a=n(9112),l=n(88002),c=n(74788),d=n(12057),u=n(98778),h=n(18289),p=n(44099),f=n(13938),m=n(10406),g=n(63790),b=n(51928);function k(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleBold()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleBold)("pseudoActive",t.bold)("tuiHint",e.bold)}}function v(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleItalic()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleItalic)("pseudoActive",t.italic)("tuiHint",e.italic)}}function y(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleUnderline()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleUnderline)("pseudoActive",t.underline)("tuiHint",e.underline)}}function w(t,e){if(1&t){const t=c.EpF();c.TgZ(0,"button",8),c.NdJ("click",(function(){return c.CHM(t),c.oxw(4).editor.toggleStrike()})),c.qZA()}if(2&t){const t=c.oxw(2).ngIf,e=c.oxw().ngIf,n=c.oxw();c.Q6J("icon",n.options.icons.fontStyleStrike)("pseudoActive",t.strike)("tuiHint",e.strikeThrough)}}function x(t,e){if(1&t&&(c.TgZ(0,"div",6),c.YNc(1,k,1,3,"button",7),c.YNc(2,v,1,3,"button",7),c.YNc(3,y,1,3,"button",7),c.YNc(4,w,1,3,"button",7),c.qZA()),2&t){const t=c.oxw(3);c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Bold)),c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Italic)),c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Underline)),c.xp6(1),c.Q6J("ngIf",t.isEnabled(t.editorTool.Strikethrough))}}function C(t,e){if(1&t&&(c.TgZ(0,"tui-hosted-dropdown",2,3),c._UZ(2,"button",4),c.YNc(3,x,5,4,"ng-template",null,5,c.W1O),c.qZA()),2&t){const t=e.ngIf,n=c.MAs(1),r=c.MAs(4),o=c.oxw().ngIf,i=c.oxw();c.Q6J("content",r),c.xp6(2),c.Q6J("focusable",n.open)("icon",i.options.icons.fontStylePreview)("pseudoActive",n.open||t.bold||t.italic||t.underline||t.strike)("tuiHint",o.fontStyle)}}function A(t,e){if(1&t&&(c.ynx(0),c.YNc(1,C,5,5,"tui-hosted-dropdown",1),c.ALo(2,"async"),c.BQk()),2&t){const t=c.oxw();c.xp6(1),c.Q6J("ngIf",c.lcZ(2,1,t.fontStyleState$))}}let M=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.toolsSet=new Set(r.Db),this.editorTool=i._,this.fontStyleState$=(0,a.aj)([this.editor.isActive$("bold"),this.editor.isActive$("italic"),this.editor.isActive$("underline"),this.editor.isActive$("strike")]).pipe((0,l.U)((([t,e,n,r])=>({bold:t,italic:e,underline:n,strike:r}))))}set enabledTools(t){this.toolsSet=new Set(t)}isEnabled(t){return this.toolsSet.has(t)}}return t.ɵfac=function(e){return new(e||t)(c.Y36(s.mJ),c.Y36(o.$3),c.Y36(s.rf))},t.ɵcmp=c.Xpm({type:t,selectors:[["tui-font-style"]],inputs:{enabledTools:"enabledTools"},decls:2,vars:3,consts:[[4,"ngIf"],[3,"content",4,"ngIf"],[3,"content"],["format",""],["appearance","icon","automation-id","toolbar__font-style-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["formatDropdown",""],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button","class","t-option t-option_margin",3,"icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"]],template:function(t,e){1&t&&(c.YNc(0,A,3,3,"ng-container",0),c.ALo(1,"async")),2&t&&c.Q6J("ngIf",c.lcZ(1,1,e.texts$))},directives:[d.O5,u.o,h.v,p.$,f.D,m.x,g.t,b.D],pipes:[d.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},28299:(t,e,n)=>{n.d(e,{d:()=>m});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(18289),c=n(44099),d=n(13938),u=n(10406),h=n(63790),p=n(51928),f=n(12057);let m=(()=>{class t{constructor(t,e,n){this.editor=t,this.texts$=e,this.options=n,this.insertGroupText$=this.texts$.pipe((0,i.U)((t=>t.insertGroup))),this.removeGroupText$=this.texts$.pipe((0,i.U)((t=>t.removeGroup))),this.disabled$=this.editor.stateChange$.pipe((0,i.U)((()=>!this.editor.isActive("group"))),(0,s.x)())}addGroup(){this.editor.setGroup()}removeGroup(){this.editor.removeGroup()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(r.$3),a.Y36(o.rf),a.Y36(o.mJ))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-editor-group-tool"]],decls:5,vars:13,consts:[["appearance","icon","automation-id","toolbar__group-add-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click"],["appearance","icon","automation-id","toolbar__group-remove-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(a.TgZ(0,"button",0),a.NdJ("click",(function(){return e.addGroup()})),a.ALo(1,"async"),a.qZA(),a.TgZ(2,"button",1),a.NdJ("click",(function(){return e.removeGroup()})),a.ALo(3,"async"),a.ALo(4,"async"),a.qZA()),2&t&&(a.Q6J("focusable",!1)("icon",e.options.icons.groupAdd)("tuiHint",a.lcZ(1,7,e.insertGroupText$)),a.xp6(2),a.Q6J("disabled",!!a.lcZ(3,9,e.disabled$))("focusable",!1)("icon",e.options.icons.groupRemove)("tuiHint",a.lcZ(4,11,e.removeGroupText$)))},directives:[l.v,c.$,d.D,u.x,h.t,p.D],pipes:[f.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},78919:(t,e,n)=>{n.d(e,{U:()=>C});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(42486),c=n(98778),d=n(16331),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928),b=n(12057),k=n(1706),v=n(55788);function y(t,e){if(1&t&&a._UZ(0,"div",6),2&t){const t=a.oxw().tuiLet;a.Udp("background",t)}}function w(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"tui-palette",7),a.NdJ("selectedColor",(function(e){return a.CHM(t),a.oxw(2).editor.setBackgroundColor(e)})),a.qZA()}if(2&t){const t=e.$implicit,n=a.oxw(2);a.Q6J("colors",n.colors)("tuiActiveZoneParent",t)}}function x(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",1,2),a._UZ(2,"button",3),a.ALo(3,"async"),a.YNc(4,y,1,2,"div",4),a.YNc(5,w,1,2,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=e.tuiLet,n=a.MAs(1),r=a.MAs(6),o=a.oxw();a.Q6J("content",r)("tuiDropdownMaxHeight",999),a.xp6(2),a.Q6J("focusable",n.open)("icon",o.options.icons.textHilite)("pseudoActive",n.open)("tuiHint",a.lcZ(3,7,o.backColorText$)),a.xp6(2),a.Q6J("ngIf",!o.isBlankColor(t||""))}}let C=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.colors=this.options.colors,this.backgroundColor$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.getBackgroundColor()||this.options.blankColor)),(0,s.x)()),this.backColorText$=this.texts$.pipe((0,i.U)((t=>t.backColor)))}isBlankColor(t){return t===this.options.blankColor}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-highlight-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["hilite",""],["appearance","icon","automation-id","toolbar__hilite-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],["class","t-plate",3,"background",4,"ngIf"],["hiliteDropdown",""],[1,"t-plate"],[1,"t-color-picker",3,"colors","tuiActiveZoneParent","selectedColor"]],template:function(t,e){1&t&&(a.YNc(0,x,7,9,"tui-hosted-dropdown",0),a.ALo(1,"async")),2&t&&a.Q6J("tuiLet",a.lcZ(1,1,e.backgroundColor$))},directives:[l.L,c.o,d.Ek,u.v,h.$,p.D,f.x,m.t,g.D,b.O5,k.R,v.e],pipes:[b.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},30560:(t,e,n)=>{n.d(e,{pu:()=>a,P_:()=>l,y9:()=>c,jP:()=>h,p7:()=>d,Zv:()=>u,XC:()=>f,Ur:()=>m,mp:()=>g,iA:()=>k,er:()=>v,__:()=>y,_t:()=>w}),n(29761);var r=n(12057),o=n(42600),i=n(43232),s=n(74788);let a=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,o.WDk]]}),t})();n(56496);let l=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,i.pcV]]}),t})();n(26929);let c=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.goS]]}),t})();n(47859),n(37982);let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,i.pcV]]}),t})();n(10845);let u=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS]]}),t})();n(28299);let h=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.goS]]}),t})();n(78919);var p=n(83950);let f=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,p.VM,i.goS,i.dpK,o.Ah6,o.WDk]]}),t})();n(69201);let m=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.fNO,i.goS,o.WDk]]}),t})();n(82556);let g=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,p.VM,i.fNO,i.goS,o.Ah6,i.dpK,o.WDk]]}),t})();n(76310),n(35659);let b=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,o.IhY]]}),t})(),k=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.dpK,i.fNO,i.goS,b]]}),t})();n(60020);let v=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.goS,o.WDk]]}),t})();n(69023);let y=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.jhF,i.goS,i.fNO,i.pcV,o.WDk]]}),t})();n(48838);let w=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[r.ez,i.fNO,i.jhF,i.dpK,i.goS,p.VM,o.Ah6,o.WDk]]}),t})()},69201:(t,e,n)=>{n.d(e,{w:()=>y});var r=n(5915),o=n(40401),i=n(9112),s=n(88002),a=n(74788),l=n(12057),c=n(42486),d=n(98778),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928);function b(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"div",6),a.TgZ(1,"button",7),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.toggleUnorderedList()})),a.qZA(),a.TgZ(2,"button",8),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.toggleOrderedList()})),a.qZA(),a.TgZ(3,"button",9),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).editor.toggleTaskList()})),a.qZA(),a.TgZ(4,"button",10),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).sinkListItem()})),a.qZA(),a.TgZ(5,"button",11),a.NdJ("click",(function(){return a.CHM(t),a.oxw(3).liftListItem()})),a.qZA(),a.qZA()}if(2&t){const t=a.oxw().tuiLet,e=a.oxw().ngIf,n=a.oxw();a.xp6(1),a.Q6J("icon",n.options.icons.listUnOrdered)("pseudoActive",!(null==t||!t.unordered))("tuiHint",e.unorderedList),a.xp6(1),a.Q6J("icon",n.options.icons.listOrdered)("pseudoActive",!(null==t||!t.ordered))("tuiHint",e.orderedList),a.xp6(1),a.Q6J("icon",n.options.icons.taskList)("pseudoActive",!(null==t||!t.tasked)),a.xp6(1),a.Q6J("icon",n.options.icons.indent)("tuiHint",e.indent),a.xp6(1),a.Q6J("icon",n.options.icons.outdent)("tuiHint",e.outdent)}}function k(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",2,3),a._UZ(2,"button",4),a.YNc(3,b,6,12,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=e.tuiLet,n=a.MAs(1),r=a.MAs(4),o=a.oxw().ngIf,i=a.oxw();a.Q6J("content",r),a.xp6(2),a.Q6J("focusable",n.open)("icon",i.options.icons.listPreview)("pseudoActive",(null==n?null:n.open)||(null==t?null:t.unordered)||(null==t?null:t.ordered)||!1)("tuiHint",o.list)}}function v(t,e){if(1&t&&(a.ynx(0),a.YNc(1,k,5,5,"tui-hosted-dropdown",1),a.ALo(2,"async"),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("tuiLet",a.lcZ(2,1,t.listState$))}}let y=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.listState$=(0,i.aj)([this.editor.isActive$("orderedList"),this.editor.isActive$("bulletList"),this.editor.isActive$("taskList")]).pipe((0,s.U)((([t,e,n])=>({ordered:t,unordered:e,tasked:n}))))}sinkListItem(){this.editor.sinkListItem()}liftListItem(){this.editor.liftListItem()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-list-configs"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["list",""],["appearance","icon","automation-id","toolbar__ordering-list-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["listDropdown",""],[1,"t-dropdown","t-dropdown-list"],["appearance","icon","automation-id","toolbar__un-ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"],["appearance","icon","automation-id","toolbar__ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","tuiHint","click"],["appearance","icon","automation-id","toolbar__task-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","pseudoActive","click"],["appearance","icon","automation-id","toolbar_indent-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"icon","tuiHint","click"],["appearance","icon","automation-id","toolbar_outdent-button","size","s","tuiIconButton","","type","button",1,"t-option",3,"icon","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,v,3,3,"ng-container",0),a.ALo(1,"async")),2&t&&a.Q6J("ngIf",a.lcZ(1,1,e.texts$))},directives:[l.O5,c.L,d.o,u.v,h.$,p.D,f.x,m.t,g.D],pipes:[l.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},82556:(t,e,n)=>{n.d(e,{p:()=>M});var r=n(5915),o=n(40401),i=n(9112),s=n(88002),a=n(87519),l=n(74788),c=n(42486),d=n(98778),u=n(16331),h=n(18289),p=n(44099),f=n(13938),m=n(10406),g=n(63790),b=n(51928),k=n(12057),v=n(1706),y=n(55788);function w(t,e){if(1&t&&l._UZ(0,"div",7),2&t){const t=l.oxw(2).tuiLet;l.Udp("background",t)}}function x(t,e){if(1&t){const t=l.EpF();l.TgZ(0,"tui-palette",8),l.NdJ("selectedColor",(function(e){l.CHM(t),l.oxw();const n=l.MAs(1);return l.oxw(2).setCellColor(e),n.close()})),l.qZA()}if(2&t){const t=e.$implicit,n=l.oxw(3);l.Q6J("colors",n.colors)("tuiActiveZoneParent",t)}}function C(t,e){if(1&t&&(l.TgZ(0,"tui-hosted-dropdown",2,3),l._UZ(2,"button",4),l.ALo(3,"async"),l.YNc(4,w,1,2,"div",5),l.YNc(5,x,1,2,"ng-template",null,6,l.W1O),l.qZA()),2&t){const t=e.tuiLet,n=l.MAs(1),r=l.MAs(6),o=l.oxw().tuiLet,i=l.oxw();l.Q6J("canOpen",!!t)("content",r)("tuiDropdownMaxHeight",999),l.xp6(2),l.Q6J("disabled",!t)("focusable",n.open)("icon",i.options.icons.paint)("pseudoActive",n.open)("tuiHint",l.lcZ(3,9,i.colorText$)),l.xp6(2),l.Q6J("ngIf",!i.isBlankColor(o||""))}}function A(t,e){if(1&t&&(l.ynx(0),l.YNc(1,C,7,11,"tui-hosted-dropdown",1),l.ALo(2,"async"),l.BQk()),2&t){const t=l.oxw();l.xp6(1),l.Q6J("tuiLet",l.lcZ(2,1,t.isActive$))}}let M=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.colors=this.options.colors,this.colorText$=this.texts$.pipe((0,s.U)((t=>this.editor.isActive("group")&&t.hiliteGroup||this.editor.isActive("table")&&t.cellColor||""))),this.isActive$=(0,i.aj)([this.editor.isActive$("table"),this.editor.isActive$("group")]).pipe((0,s.U)((([t,e])=>t||e))),this.color$=this.editor.stateChange$.pipe((0,s.U)((()=>this.editor.getCellColor()||this.editor.getGroupColor()||this.options.blankColor)),(0,a.x)())}isBlankColor(t){return t===this.options.blankColor}setCellColor(t){this.editor.isActive("group")?this.editor.setGroupHilite(t):this.editor.isActive("table")&&this.editor.setCellColor(t)}}return t.ɵfac=function(e){return new(e||t)(l.Y36(o.mJ),l.Y36(r.$3),l.Y36(o.rf))},t.ɵcmp=l.Xpm({type:t,selectors:[["tui-table-cell-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[[4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight"],["colorSelect",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","pseudoActive","tuiHint"],["class","t-plate t-plate_paint",3,"background",4,"ngIf"],["cellColorDropdown",""],[1,"t-plate","t-plate_paint"],[1,"t-color-picker",3,"colors","tuiActiveZoneParent","selectedColor"]],template:function(t,e){1&t&&(l.YNc(0,A,3,3,"ng-container",0),l.ALo(1,"async")),2&t&&l.Q6J("tuiLet",l.lcZ(1,1,e.color$))},directives:[c.L,d.o,u.Ek,h.v,p.$,f.D,m.x,g.t,b.D,k.O5,v.R,y.e],pipes:[k.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},76310:(t,e,n)=>{n.d(e,{l:()=>k});var r=n(5915),o=n(40401),i=n(88002),s=n(74788),a=n(98778),l=n(16331),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928),m=n(35659),g=n(12057);function b(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"tui-table-size-selector",4),s.NdJ("selectSize",(function(e){return s.CHM(t),s.oxw().addTable(e)})),s.qZA()}}let k=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.insertTableText$=this.texts$.pipe((0,i.U)((t=>t.insertTable)))}addTable({rows:t,cols:e}){this.editor.enter();const n=this.editor.state.selection.anchor;this.editor.enter(),this.editor.enter(),this.editor.setTextSelection(n),this.editor.insertTable(t,e)}}return t.ɵfac=function(e){return new(e||t)(s.Y36(o.mJ),s.Y36(r.$3),s.Y36(o.rf))},t.ɵcmp=s.Xpm({type:t,selectors:[["tui-table-create"]],decls:6,vars:6,consts:[["tuiDropdownAlign","left","tuiDropdownDirection","bottom",3,"content"],["table",""],["appearance","icon","automation-id","toolbar__insert-table-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint"],["tableDropdown",""],[3,"selectSize"]],template:function(t,e){if(1&t&&(s.TgZ(0,"tui-hosted-dropdown",0,1),s._UZ(2,"button",2),s.ALo(3,"async"),s.qZA(),s.YNc(4,b,1,0,"ng-template",null,3,s.W1O)),2&t){const t=s.MAs(1),n=s.MAs(5);s.Q6J("content",n),s.xp6(2),s.Q6J("focusable",t.open)("icon",e.options.icons.insertTable)("tuiHint",s.lcZ(3,4,e.insertTableText$))}},directives:[a.o,l.Ek,c.v,d.$,u.D,h.x,p.t,f.D,m.M],pipes:[g.Ov],encapsulation:2,changeDetection:0}),t})()},60020:(t,e,n)=>{n.d(e,{Y:()=>v});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(42486),c=n(12057),d=n(18289),u=n(44099),h=n(13938),p=n(10406),f=n(63790),m=n(51928);function g(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"button",2),a.NdJ("click",(function(){a.CHM(t);const e=a.oxw().tuiLet,n=a.oxw();return e.mergeCells?n.mergeCells():n.splitCell()})),a.qZA()}if(2&t){const t=e.ngIf,n=a.oxw().tuiLet;a.Q6J("disabled",!n.mergeCells&&!n.splitCells)("focusable",!1)("icon",n.mergeCells?"tuiIconTableMergeLarge":"tuiIconTableSplitLarge")("tuiHint",n.mergeCells?t.mergeCells:t.splitCells)}}function b(t,e){if(1&t&&(a.ynx(0),a.YNc(1,g,1,4,"button",1),a.ALo(2,"async"),a.BQk()),2&t){const t=a.oxw();a.xp6(1),a.Q6J("ngIf",a.lcZ(2,1,t.texts$))}}const k=function(t,e){return{mergeCells:t,splitCells:e}};let v=(()=>{class t{constructor(t,e){this.editor=t,this.texts$=e,this.canMergeCells$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.canMergeCells())),(0,s.x)()),this.canSplitCells$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.canSplitCells())),(0,s.x)())}mergeCells(){this.editor.mergeCells()}splitCell(){this.editor.splitCell()}}return t.ɵfac=function(e){return new(e||t)(a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-table-merge-cells"]],decls:3,vars:8,consts:[[4,"tuiLet"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click"]],template:function(t,e){1&t&&(a.YNc(0,b,3,3,"ng-container",0),a.ALo(1,"async"),a.ALo(2,"async")),2&t&&a.Q6J("tuiLet",a.WLB(5,k,a.lcZ(1,1,e.canMergeCells$),a.lcZ(2,3,e.canSplitCells$)))},directives:[l.L,c.O5,d.v,u.$,h.D,p.x,f.t,m.D],pipes:[c.Ov],encapsulation:2,changeDetection:0}),t})()},69023:(t,e,n)=>{n.d(e,{_:()=>A});var r=n(5915),o=n(40401),i=n(88002),s=n(74788),a=n(42486),l=n(98778),c=n(18289),d=n(44099),u=n(13938),h=n(10406),p=n(63790),f=n(51928),m=n(22545),g=n(12057),b=n(94052),k=n(91283);function v(t,e){if(1&t&&(s.TgZ(0,"tui-hosted-dropdown",2,3),s._UZ(2,"button",4),s.ALo(3,"async"),s.qZA()),2&t){const t=e.tuiLet,n=s.MAs(1),r=s.oxw(),o=s.MAs(3);s.Q6J("canOpen",!!t)("content",o),s.xp6(2),s.Q6J("disabled",!t)("focusable",n.open)("icon",r.options.icons.addRowTable)("tuiHint",s.lcZ(3,6,r.rowsColumnsManagingText$))}}function y(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",7),s.NdJ("click",(function(){const e=s.CHM(t).index,n=s.oxw().index;return s.oxw(2).onTableOption(2*n+e)})),s._uU(1),s.qZA()}if(2&t){const t=e.$implicit;s.xp6(1),s.hij(" ",t," ")}}function w(t,e){if(1&t&&(s.TgZ(0,"tui-opt-group"),s.YNc(1,y,2,1,"button",6),s.qZA()),2&t){const t=e.$implicit;s.xp6(1),s.Q6J("ngForOf",t)}}function x(t,e){if(1&t&&(s.TgZ(0,"tui-data-list"),s.YNc(1,w,2,1,"tui-opt-group",5),s.ALo(2,"async"),s.qZA()),2&t){const t=s.oxw();s.xp6(1),s.Q6J("ngForOf",s.lcZ(2,1,t.tableCommandTexts$))}}var C=(()=>(function(t){t[t.InsertColumnBefore=0]="InsertColumnBefore",t[t.InsertColumnAfter=1]="InsertColumnAfter",t[t.InsertRowBefore=2]="InsertRowBefore",t[t.InsertRowAfter=3]="InsertRowAfter",t[t.DeleteColumn=4]="DeleteColumn",t[t.DeleteRow=5]="DeleteRow"}(C||(C={})),C))();let A=(()=>{class t{constructor(t,e,n,r){this.options=t,this.editor=e,this.texts$=n,this.tableCommandTexts$=r,this.commandsRegistry={[C.InsertColumnAfter]:()=>this.editor.addColumnAfter(),[C.InsertColumnBefore]:()=>this.editor.addColumnBefore(),[C.InsertRowAfter]:()=>this.editor.addRowAfter(),[C.InsertRowBefore]:()=>this.editor.addRowBefore(),[C.DeleteColumn]:()=>this.editor.deleteColumn(),[C.DeleteRow]:()=>this.editor.deleteRow()},this.isActive$=this.editor.isActive$("table"),this.rowsColumnsManagingText$=this.texts$.pipe((0,i.U)((t=>t.rowsColumnsManaging)))}onTableOption(t){this.commandsRegistry[t]()}}return t.ɵfac=function(e){return new(e||t)(s.Y36(o.mJ),s.Y36(r.$3),s.Y36(o.rf),s.Y36(o.$i))},t.ɵcmp=s.Xpm({type:t,selectors:[["tui-table-row-column-manager"]],decls:4,vars:3,consts:[[3,"canOpen","content",4,"tuiLet"],["tableOptionsDropdown",""],[3,"canOpen","content"],["tableCommand",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint"],[4,"ngFor","ngForOf"],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,e){1&t&&(s.YNc(0,v,4,8,"tui-hosted-dropdown",0),s.ALo(1,"async"),s.YNc(2,x,3,3,"ng-template",null,1,s.W1O)),2&t&&s.Q6J("tuiLet",s.lcZ(1,1,e.isActive$))},directives:[a.L,l.o,c.v,d.$,u.D,h.x,p.t,f.D,m.q,g.sg,b.R,k.v],pipes:[g.Ov],encapsulation:2,changeDetection:0}),t})()},35659:(t,e,n)=>{n.d(e,{M:()=>c});var r=n(74788),o=n(62579),i=n(43232),s=n(46648);function a(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",4),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).select()}))("mouseenter",(function(e){const n=r.CHM(t).$implicit,o=r.oxw().$implicit;return r.oxw().updateCurrentSize(n+1,o+1,e)})),r.qZA()}if(2&t){const t=e.$implicit,n=r.oxw().$implicit,o=r.oxw();r.ekj("t-cell_hovered",o.tableSelectHovered(t,n))}}function l(t,e){if(1&t&&(r.TgZ(0,"div",2),r.YNc(1,a,1,2,"div",3),r.qZA()),2&t){const t=r.oxw();r.xp6(1),r.Q6J("tuiRepeatTimesOf",t.rowsNumber)}}let c=(()=>{class t{constructor(t){this.win=t,this.selectSize=new r.vpe,this.onSelectSize=this.selectSize,this.tableSize={rows:1,cols:1}}get columnsNumber(){return Math.min(Math.max(3,this.tableSize.cols+1),15)}get rowsNumber(){return Math.min(Math.max(3,this.tableSize.rows+1),15)}tableSelectHovered(t,e){return t70&&(this.tableSize={rows:t,cols:e})}onClick(){this.select()}select(){this.selectSize.emit(this.tableSize)}}return t.ɵfac=function(e){return new(e||t)(r.Y36(o.m9))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-table-size-selector"]],outputs:{selectSize:"selectSize",onSelectSize:"onSelectSize"},decls:3,vars:3,consts:[["class","t-column",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-description"],[1,"t-column"],["class","t-cell",3,"t-cell_hovered","click","mouseenter",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-cell",3,"click","mouseenter"]],template:function(t,e){1&t&&(r.YNc(0,l,2,1,"div",0),r.TgZ(1,"div",1),r._uU(2),r.qZA()),2&t&&(r.Q6J("tuiRepeatTimesOf",e.columnsNumber),r.xp6(2),r.AsE("",e.tableSize.cols,"×",e.tableSize.rows,""))},directives:[s.X],styles:["[_nghost-%COMP%]{display:block;padding:.75rem}.t-cell[_ngcontent-%COMP%]{display:inline-block;background-color:var(--tui-base-01);width:1.25rem;height:1.25rem;border-radius:.25rem;margin:.125rem;border:1px solid var(--tui-base-04);cursor:pointer}.t-cell_hovered[_ngcontent-%COMP%]{background-color:var(--tui-base-02)}.t-column[_ngcontent-%COMP%]{white-space:nowrap}.t-description[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),t})()},48838:(t,e,n)=>{n.d(e,{G:()=>x});var r=n(5915),o=n(40401),i=n(88002),s=n(87519),a=n(74788),l=n(42486),c=n(98778),d=n(16331),u=n(18289),h=n(44099),p=n(13938),f=n(10406),m=n(63790),g=n(51928),b=n(1706),k=n(55788),v=n(12057);function y(t,e){if(1&t){const t=a.EpF();a.TgZ(0,"tui-palette",6),a.NdJ("selectedColor",(function(e){return a.CHM(t),a.oxw(2).editor.setFontColor(e)})),a.qZA()}if(2&t){const t=e.$implicit,n=a.oxw(2);a.Q6J("colors",n.colors)("tuiActiveZoneParent",t)}}function w(t,e){if(1&t&&(a.TgZ(0,"tui-hosted-dropdown",1,2),a._UZ(2,"button",3),a.ALo(3,"async"),a._UZ(4,"div",4),a.YNc(5,y,1,2,"ng-template",null,5,a.W1O),a.qZA()),2&t){const t=e.tuiLet,n=a.MAs(1),r=a.MAs(6),o=a.oxw();a.Q6J("content",r)("tuiDropdownMaxHeight",999),a.xp6(2),a.Q6J("focusable",n.open)("icon",o.options.icons.textColor)("pseudoActive",n.open)("tuiHint",a.lcZ(3,8,o.foreColorText$)),a.xp6(2),a.Udp("background",t)}}let x=(()=>{class t{constructor(t,e,n){this.options=t,this.editor=e,this.texts$=n,this.colors=this.options.colors,this.fontColor$=this.editor.stateChange$.pipe((0,i.U)((()=>this.editor.getFontColor()||this.options.blankColor)),(0,s.x)()),this.foreColorText$=this.texts$.pipe((0,i.U)((t=>t.foreColor)))}}return t.ɵfac=function(e){return new(e||t)(a.Y36(o.mJ),a.Y36(r.$3),a.Y36(o.rf))},t.ɵcmp=a.Xpm({type:t,selectors:[["tui-text-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["color",""],["appearance","icon","automation-id","toolbar__color-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-plate"],["colorDropdown",""],[1,"t-color-picker",3,"colors","tuiActiveZoneParent","selectedColor"]],template:function(t,e){1&t&&(a.YNc(0,w,7,10,"tui-hosted-dropdown",0),a.ALo(1,"async")),2&t&&a.Q6J("tuiLet",a.lcZ(1,1,e.fontColor$))},directives:[l.L,c.o,d.Ek,u.v,h.$,p.D,f.x,m.t,g.D,b.R,k.e],pipes:[v.Ov],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),t})()},90712:(t,e,n)=>{n.d(e,{M6:()=>r.M,yB:()=>d});var r=n(62490),o=n(12057),i=n(42600),s=n(43232),a=n(1884),l=n(30560),c=n(74788);let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({imports:[[o.ez,s.goS,i.udY,s.fNO,s.jhF,a.Fu,l.er,l.mp,l.__,l.iA,l.p7,l.Zv,l.pu,l.Ur,l._t,l.XC,l.P_,l.y9,i.HOV,l.jP]]}),t})();n(5028)},5028:(t,e,n)=>{n.d(e,{B:()=>i});var r=n(74788),o=n(42600);let i=(()=>{class t{constructor(t){this.el=t}get toolsContainers(){return Array.from(this.el.nativeElement.querySelectorAll("[tuiItem]"))}onHorizontalNavigation(t){const{toolsContainers:e}=this,n=e.findIndex(o.zb4),r=e[(0,o.Kiv)(n+(t?-1:1),0,e.length-1)],i=t?this.findPreviousTool(r):this.findNextTool(r);i&&i.focus()}findFirstFocusableTool(t=!1){const e=t?this.toolsContainers.slice().reverse():this.toolsContainers;for(const t of e){const e=(0,o._hh)(t)?t:(0,o.BWF)({initial:t,root:t,keyboard:!1});if(e)return e}return null}findPreviousTool(t){return(0,o._hh)(t)?t:(0,o.BWF)({initial:t,root:t,keyboard:!1})||(0,o.BWF)({initial:t,root:this.el.nativeElement,previous:!0,keyboard:!1})}findNextTool(t){return(0,o._hh)(t)?t:(0,o.BWF)({initial:t,root:this.el.nativeElement,keyboard:!1})}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq))},t.ɵdir=r.lG2({type:t,selectors:[["","tuiToolbarNavigationManager",""]],hostBindings:function(t,e){1&t&&r.NdJ("keydown.arrowRight.prevent",(function(){return e.onHorizontalNavigation(!1)}))("keydown.arrowLeft.prevent",(function(){return e.onHorizontalNavigation(!0)}))}}),t})()},62490:(t,e,n)=>{n.d(e,{M:()=>mt});var r=n(74788),o=n(42600),i=n(69725),s=n(5915),a=n(72023),l=n(40401),c=n(15257),d=n(46782),u=n(5028),h=n(12057),p=n(63973),f=n(18289),m=n(44099),g=n(32489),b=n(13938),k=n(10406),v=n(63790),y=n(51928),w=n(37982),x=n(10845),C=n(29761),A=n(69201),M=n(98778),S=n(10553),_=n(48838),T=n(78919),E=n(56496),O=n(26929),D=n(47859),N=n(28299),L=n(82556),I=n(76310),R=n(69023),z=n(60020);const P=["dropdown"];function H(t,e){1&t&&r.GkF(0)}function q(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",6),r.TgZ(1,"button",7),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).undo()})),r.qZA(),r.TgZ(2,"button",8),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).redo()})),r.qZA(),r.qZA()}if(2&t){const t=r.oxw().ngIf,e=r.oxw();r.xp6(1),r.Q6J("disabled",e.undoDisabled)("focusable",!1)("icon",e.options.icons.undo)("tuiHint",t.undo),r.xp6(1),r.Q6J("disabled",e.redoDisabled)("focusable",!1)("icon",e.options.icons.redo)("tuiHint",t.redo)}}function B(t,e){1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-font-size",9),r.qZA())}function $(t,e){if(1&t&&r._UZ(0,"tui-font-style",15),2&t){const t=r.oxw(3);r.Q6J("enabledTools",t.toolsSet)}}function F(t,e){1&t&&r._UZ(0,"tui-align-content",9)}function J(t,e){1&t&&r._UZ(0,"tui-list-configs",9)}function j(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",16,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).toggleQuote()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("disabled",e.unorderedList||e.orderedList)("focusable",!1)("icon",e.options.icons.quote)("pseudoActive",e.blockquote)("tuiHint",t.quote)}}function Z(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-edit-link",22,23),r.NdJ("addLink",(function(e){r.CHM(t),r.oxw();const n=r.MAs(1);return r.oxw(3).onLink(n,e)}))("removeLink",(function(){r.CHM(t),r.oxw();const e=r.MAs(1);return r.oxw(3).onLink(e)})),r.qZA()}}function U(t,e){if(1&t&&(r.TgZ(0,"tui-hosted-dropdown",18,19),r._UZ(2,"button",20,17),r.YNc(4,Z,2,0,"ng-template",null,21,r.W1O),r.qZA()),2&t){const t=r.MAs(1),e=r.MAs(5),n=r.oxw(2).ngIf,o=r.oxw();r.Q6J("canOpen",o.canOpenAnchor)("content",e),r.xp6(2),r.Q6J("focusable",t.open)("icon",o.options.icons.link)("pseudoActive",t.open||o.a)("tuiHint",n.link)}}function V(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"tui-edit-link",28),r.NdJ("addLink",(function(e){r.CHM(t),r.oxw();const n=r.MAs(1);return r.oxw(3).setAnchor(n,e)}))("removeLink",(function(){return r.CHM(t),r.oxw(4).removeAnchor()})),r.qZA()}2&t&&r.Q6J("anchorMode",!0)}function Y(t,e){if(1&t&&(r.TgZ(0,"tui-hosted-dropdown",24,25),r._UZ(2,"button",26),r.YNc(3,V,1,1,"ng-template",null,27,r.W1O),r.qZA()),2&t){const t=r.MAs(1),e=r.MAs(4),n=r.oxw(2).ngIf,o=r.oxw();r.Q6J("canOpen",o.canOpenAnchor)("content",e),r.xp6(2),r.Q6J("focusable",!1)("icon",o.options.icons.anchor)("pseudoActive",t.open||o.jumpAnchor)("tuiHint",n.insertAnchor)}}function W(t,e){if(1&t){const t=r.EpF();r.ynx(0),r.TgZ(1,"button",29,17),r.NdJ("click",(function(){return r.CHM(t),r.MAs(4).click()})),r.qZA(),r.TgZ(3,"input",30,31),r.NdJ("change",(function(){r.CHM(t);const e=r.MAs(4);return r.oxw(3).onAttach(e)})),r.qZA(),r.BQk()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.xp6(1),r.Q6J("focusable",!1)("icon",e.options.icons.attach)("tuiHint",t.attach),r.xp6(2),r.Q6J("accept",e.attachOptions.accept)("multiple",e.attachOptions.multiple)("tuiFocusable",!1)}}function G(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,$,1,1,"tui-font-style",10),r.YNc(2,F,1,0,"tui-align-content",11),r.YNc(3,J,1,0,"tui-list-configs",11),r.YNc(4,j,2,5,"button",12),r.YNc(5,U,6,6,"tui-hosted-dropdown",13),r.YNc(6,Y,5,6,"tui-hosted-dropdown",14),r.YNc(7,W,5,6,"ng-container",1),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.formatEnabled),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Align)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.List)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Quote)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Link)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Anchor)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Attach))}}function Q(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",33,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).toggleSubscript()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.sub)("pseudoActive",e.subscript)("tuiHint",t.subscript)}}function K(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",33,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).toggleSuperscript()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.sup)("pseudoActive",e.superscript)("tuiHint",t.superscript)}}function X(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,Q,2,4,"button",32),r.YNc(2,K,2,4,"button",32),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Sub)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Sup))}}function tt(t,e){if(1&t&&r._UZ(0,"tui-text-color",35),2&t){const t=r.oxw(3);r.Q6J("colors",t.colors)}}function et(t,e){if(1&t&&r._UZ(0,"tui-highlight-color",35),2&t){const t=r.oxw(3);r.Q6J("colors",t.colors)}}function nt(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,tt,1,1,"tui-text-color",34),r.YNc(2,et,1,1,"tui-highlight-color",34),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Color)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Hilite))}}function rt(t,e){1&t&&r._UZ(0,"tui-code",9)}function ot(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",39,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).onTeX()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.tex)("tuiHint",t.tex)}}function it(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",40),r.TgZ(1,"button",41,17),r.NdJ("click",(function(){return r.CHM(t),r.MAs(4).click()})),r.qZA(),r.TgZ(3,"input",42,43),r.NdJ("change",(function(){r.CHM(t);const e=r.MAs(4);return r.oxw(3).onImage(e)})),r.qZA(),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.xp6(1),r.Q6J("focusable",!1)("icon",e.options.icons.image)("tuiHint",t.image),r.xp6(2),r.Q6J("tuiFocusable",!1)}}function st(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"button",29,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(3).insertHorizontalRule()})),r.qZA()}if(2&t){const t=r.oxw(2).ngIf,e=r.oxw();r.Q6J("focusable",!1)("icon",e.options.icons.hr)("tuiHint",t.insertHorizontalRule)}}function at(t,e){if(1&t&&(r.TgZ(0,"div",6),r.YNc(1,rt,1,0,"tui-code",11),r.YNc(2,ot,2,3,"button",36),r.YNc(3,it,5,4,"div",37),r.YNc(4,st,2,3,"button",38),r.qZA()),2&t){const t=r.oxw(2);r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Code)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Tex)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Img)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.HR))}}function lt(t,e){if(1&t){const t=r.EpF();r.TgZ(0,"div",6),r.TgZ(1,"button",29,17),r.NdJ("click",(function(){return r.CHM(t),r.oxw(2).removeFormat()})),r.qZA(),r.qZA()}if(2&t){const t=r.oxw().ngIf,e=r.oxw();r.xp6(1),r.Q6J("focusable",!1)("icon",e.options.icons.clear)("tuiHint",t.clear)}}function ct(t,e){1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-details",44),r._UZ(2,"tui-details-remove",44),r.qZA())}function dt(t,e){if(1&t&&r._UZ(0,"tui-table-cell-color",35),2&t){const t=r.oxw(3);r.Q6J("colors",t.colors)}}function ut(t,e){if(1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-editor-group-tool",44),r.YNc(2,dt,1,1,"tui-table-cell-color",34),r.qZA()),2&t){const t=r.oxw(2);r.xp6(2),r.Q6J("ngIf",!t.enabled(t.editorTool.Table))}}function ht(t,e){if(1&t&&(r.TgZ(0,"div",6),r._UZ(1,"tui-table-create",44),r._UZ(2,"tui-table-row-column-manager",44),r._UZ(3,"tui-table-merge-cells",44),r._UZ(4,"tui-table-cell-color",35),r.qZA()),2&t){const t=r.oxw(2);r.xp6(4),r.Q6J("colors",t.colors)}}function pt(t,e){if(1&t&&(r.TgZ(0,"section",4),r.YNc(1,q,3,8,"div",5),r.YNc(2,B,2,0,"div",5),r.YNc(3,G,8,7,"div",5),r.YNc(4,X,3,2,"div",5),r.YNc(5,nt,3,2,"div",5),r.YNc(6,at,5,4,"div",5),r.YNc(7,lt,3,3,"div",5),r.YNc(8,ct,3,0,"div",5),r.YNc(9,ut,3,1,"div",5),r.YNc(10,ht,5,1,"div",5),r.TgZ(11,"div",6),r.Hsn(12),r.qZA(),r.qZA()),2&t){const t=r.oxw();r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Undo)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Size)),r.xp6(1),r.Q6J("ngIf",t.firstBigBlockEnabled),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Sub)||t.enabled(t.editorTool.Sup)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Color)||t.enabled(t.editorTool.Hilite)),r.xp6(1),r.Q6J("ngIf",t.secondBigBlockEnabled),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Clear)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Details)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Group)),r.xp6(1),r.Q6J("ngIf",t.enabled(t.editorTool.Table))}}const ft=["*"];let mt=(()=>{class t{constructor(t,e,n,s,l,c,d,u){this.el=t,this.editor=e,this.imageLoader=n,this.attachOptions=s,this.filesLoader=l,this.texts$=c,this.options=d,this.destroy$=u,this.dropdowns=o.Mmc,this.colors=this.options.colors,this.disabled=!1,this.linkAdded=new r.vpe,this.texClicked=new r.vpe,this.fileAttached=new r.vpe,this.editorTool=a._,this.toolsSet=new Set(i.Db)}set tools(t){this.toolsSet=new Set(t)}get focused(){return(0,o.zb4)(this.el.nativeElement)||!!this.dropdowns.find((({nativeElement:t})=>(0,o.zb4)(t)))}get focusable(){return!this.focused&&!this.disabled}get unorderedList(){return this.editor.isActive("bulletList")}get orderedList(){return this.editor.isActive("orderedList")}get blockquote(){return this.editor.isActive("blockquote")}get a(){return this.editor.isActive("link")}get jumpAnchor(){return this.editor.isActive("jumpAnchor")}get canOpenAnchor(){return!this.a&&!this.jumpAnchor}get undoDisabled(){return this.editor.undoDisabled()}get redoDisabled(){return this.editor.redoDisabled()}get subscript(){return this.editor.isActive("subscript")}get superscript(){return this.editor.isActive("superscript")}get formatEnabled(){return this.enabled(a._.Bold)||this.enabled(a._.Italic)||this.enabled(a._.Underline)||this.enabled(a._.Strikethrough)}get firstBigBlockEnabled(){return this.formatEnabled||this.enabled(a._.Align)||this.enabled(a._.List)||this.enabled(a._.Quote)||this.enabled(a._.Link)||this.enabled(a._.Anchor)||this.enabled(a._.Attach)}get secondBigBlockEnabled(){return this.enabled(a._.Code)||this.enabled(a._.Tex)||this.enabled(a._.Img)||this.enabled(a._.HR)}onMouseDown(t,e){e.closest("button")||(t.preventDefault(),this.editor.focus())}onBottomFocus(){this.focusLast()}onTopFocus(){this.focusFirst()}onImage(t){var e;const n=null===(e=t.files)||void 0===e?void 0:e[0];t.value="",n&&this.imageLoader(n).pipe((0,c.q)(1),(0,d.R)(this.destroy$)).subscribe((t=>this.addImage(t)))}onAttach(t){var e;const n=Array.from(t.files||[]);t.value="",n&&(null===(e=this.filesLoader)||void 0===e||e.call(this,n).pipe((0,c.q)(1),(0,d.R)(this.destroy$)).subscribe((t=>this.fileAttached.emit(t))))}onTeX(){this.texClicked.emit()}onLink(t,e){t.open=!1,e&&this.editor.toggleLink(e)}setAnchor(t,e){t.open=!1,e&&(this.editor.setAnchor(e),this.editor.selectClosest())}removeAnchor(){this.editor.removeAnchor()}enabled(t){return this.toolsSet.has(t)}undo(){this.editor.undo()}redo(){this.editor.redo()}insertHorizontalRule(){this.editor.setHorizontalRule()}removeFormat(){this.editor.removeFormat()}toggleOrderedList(){this.editor.toggleOrderedList()}toggleQuote(){this.editor.toggleBlockquote()}toggleSubscript(){this.editor.toggleSubscript()}toggleSuperscript(){this.editor.toggleSuperscript()}addImage(t){this.editor.setImage(t)}focusFirst(){var t;const e=null===(t=this.navigationManager)||void 0===t?void 0:t.findFirstFocusableTool();e&&e.focus()}focusLast(){var t;const e=null===(t=this.navigationManager)||void 0===t?void 0:t.findFirstFocusableTool(!0);e&&e.focus()}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq,8),r.Y36(s.$3),r.Y36(l.p7),r.Y36(l.dR),r.Y36(l.zc,8),r.Y36(l.rf),r.Y36(l.mJ),r.Y36(o.a31,2))},t.ɵcmp=r.Xpm({type:t,selectors:[["tui-toolbar"]],viewQuery:function(t,e){if(1&t&&(r.Gf(u.B,5),r.Gf(P,5,r.SBq)),2&t){let t;r.iGM(t=r.CRH())&&(e.navigationManager=t.first),r.iGM(t=r.CRH())&&(e.dropdowns=t)}},hostAttrs:["role","toolbar"],hostVars:2,hostBindings:function(t,e){1&t&&r.NdJ("mousedown",(function(t){return e.onMouseDown(t,t.target)})),2&t&&r.ekj("_disabled",e.disabled)},inputs:{colors:"colors",disabled:"disabled",tools:"tools"},outputs:{linkAdded:"linkAdded",texClicked:"texClicked",fileAttached:"fileAttached"},features:[r._Bn([o.a31])],ngContentSelectors:ft,decls:7,vars:8,consts:[["type","button",1,"t-prevent-parent-label-behavior"],[4,"ngIf"],[3,"tuiFocusable","focus"],["tuiToolbarNavigationManager","","class","t-tools-wrapper",4,"ngIf"],["tuiToolbarNavigationManager","",1,"t-tools-wrapper"],["class","t-block",4,"ngIf"],[1,"t-block"],["appearance","icon","automation-id","toolbar__undo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"disabled","focusable","icon","tuiHint","click"],["appearance","icon","automation-id","toolbar__redo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"disabled","focusable","icon","tuiHint","click"],["tuiItem","",1,"t-tool","t-wrapper"],["tuiItem","","class","t-tool t-wrapper",3,"enabledTools",4,"ngIf"],["tuiItem","","class","t-tool t-wrapper",4,"ngIf"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"disabled","focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",3,"canOpen","content",4,"ngIf"],["class","t-wrapper",3,"canOpen","content",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"enabledTools"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"disabled","focusable","icon","pseudoActive","tuiHint","click"],["button",""],["tuiItem","",1,"t-wrapper",3,"canOpen","content"],["link",""],["appearance","icon","automation-id","toolbar__link-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],["linkDropdown",""],[3,"addLink","removeLink"],["dropdown",""],[1,"t-wrapper",3,"canOpen","content"],["anchor",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["anchorDropdown",""],[3,"anchorMode","addLink","removeLink"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"focusable","icon","tuiHint","click"],["type","file",1,"t-file-upload",3,"accept","multiple","tuiFocusable","change"],["fileUpload",""],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"focusable","icon","pseudoActive","tuiHint","click"],["tuiItem","","class","t-tool t-wrapper",3,"colors",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"colors"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool",3,"focusable","icon","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool",3,"focusable","icon","tuiHint","click"],["tuiItem","",1,"t-wrapper"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","tuiHint","click"],["accept","image/*","type","file",1,"t-image",3,"tuiFocusable","change"],["image",""],["tuiItem","",1,"t-tool","t-tool_margin"]],template:function(t,e){1&t&&(r.F$t(),r._UZ(0,"button",0),r.YNc(1,H,1,0,"ng-container",1),r.ALo(2,"async"),r.TgZ(3,"div",2),r.NdJ("focus",(function(){return e.onTopFocus()})),r.qZA(),r.TgZ(4,"div",2),r.NdJ("focus",(function(){return e.onBottomFocus()})),r.qZA(),r.YNc(5,pt,13,10,"section",3),r.ALo(6,"async")),2&t&&(r.xp6(1),r.Q6J("ngIf",r.lcZ(2,4,e.editor.stateChange$)),r.xp6(2),r.Q6J("tuiFocusable",e.focusable),r.xp6(1),r.Q6J("tuiFocusable",e.focusable),r.xp6(1),r.Q6J("ngIf",r.lcZ(6,6,e.texts$)))},directives:[h.O5,p.t,u.B,f.v,m.$,g.w,b.D,k.x,v.t,y.D,w.m,x.h,C.X,A.w,M.o,S.l,_.G,T.U,E.T,O.y,D.U,N.d,L.p,I.l,R._,z.Y],pipes:[h.Ov],styles:['.t-tools-wrapper[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none;position:-webkit-sticky;position:sticky;top:0;display:flex;padding:.25rem .75rem;overflow:auto;flex-wrap:wrap;box-shadow:0 .125rem .1875rem #0000001a}.t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{display:none}.t-tools-wrapper._disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-block[_ngcontent-%COMP%]{display:flex;padding:.25rem 0}.t-block[_ngcontent-%COMP%]:not(:last-child):after{content:"";display:block;margin:0 .25rem;width:1px;background:var(--tui-secondary-active)}.t-tool[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}button.t-tool[_ngcontent-%COMP%]:hover, .t-tool[_ngcontent-%COMP%] button:hover{background:var(--tui-secondary-hover)}.t-tool_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-font[_ngcontent-%COMP%]{padding:.3em 0;outline:none;width:100%;pointer-events:none}.t-image[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;font-size:0;opacity:0;cursor:pointer}.t-image[_ngcontent-%COMP%]::-webkit-file-upload-button{display:none}.t-file-upload[_ngcontent-%COMP%]{display:none}.t-color-picker[_ngcontent-%COMP%] tui-hosted-dropdown, .t-color-picker[_ngcontent-%COMP%] tui-color-picker, .t-color-picker[_ngcontent-%COMP%] tui-color-edit{display:none}.t-prevent-parent-label-behavior[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),t})()},69725:(t,e,n)=>{n.d(e,{hK:()=>o,pH:()=>c,pL:()=>f,nE:()=>a,_s:()=>d,Ci:()=>u,jU:()=>p,DN:()=>h,sw:()=>r,Db:()=>s,RR:()=>l});const r=new Map([["color-black-100","#909090"],["color-black-200","#666666"],["color-black-300","#333333"],["color-blue-100","#1771e6"],["color-blue-200","#1464cc"],["color-blue-300","#0953b3"],["color-gray-100","#f5f5f6"],["color-gray-200","#e7e8ea"],["color-gray-300","#cbcfd3"],["color-gray-400","#959ba4"],["color-gray-500","#79818c"],["color-gray-600","#616871"],["color-green-100","#39b54a"],["color-green-200","#2ca53a"],["color-green-300","#168a21"],["color-light-blue-100","#ecf1f7"],["color-light-blue-200","#e4ebf3"],["color-light-blue-300","#dde4ed"],["color-red-100","#e01f19"],["color-red-200","#d3120e"],["color-red-300","#c40b08"],["color-yellow-100","#FFDD2C"],["color-yellow-200","#FCC521"],["color-yellow-300","#FAB618"],["transparent","transparent"]]),o="rgb(51, 51, 51)";var i=n(72023);const s=[i._.Undo,i._.Size,i._.Bold,i._.Italic,i._.Underline,i._.Align,i._.List,i._.Quote,i._.Link,i._.Anchor,i._.Color,i._.Hilite,i._.Clear,i._.Strikethrough,i._.Code,i._.Img,i._.HR,i._.Sup,i._.Sub,i._.Table,i._.Details],a=s;function l(t){return[{px:13,name:t.small},{px:15,name:t.normal},{px:17,name:t.large},{px:24,family:"var(--tui-font-heading)",name:t.subtitle,headingLevel:2,weight:"bold"},{px:30,family:"var(--tui-font-heading)",name:t.title,headingLevel:1,weight:"bold"}]}const c=["id","class","src","style","controls","loop","muted","preload","autoplay","width","height","controlsList"],d="#",u="https://",h=":",p="://",f={protocol:u}},5915:(t,e,n)=>{n.d(e,{BN:()=>o,JU:()=>i.JU,mJ:()=>i.mJ,$3:()=>i.$3});var r=n(74788);let o=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=r.oAB({type:t}),t.ɵinj=r.cJS({}),t})();var i=n(46561)},46561:(t,e,n)=>{n.d(e,{JU:()=>r.J,mJ:()=>i,$3:()=>s.$});var r=n(6723),o=n(74788);let i=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=o.oAB({type:t}),t.ɵinj=o.cJS({}),t})();var s=n(20672)},6723:(t,e,n)=>{n.d(e,{J:()=>l});var r=n(74788),o=n(42600),i=n(40401),s=n(46782),a=n(20672);let l=(()=>{class t{constructor(t,e,n,r,o,i){this.el=t,this.renderer=e,this.editor=n,this.editorContainer=r,this.editorLoaded$=o,this.valueChange=this.editor.valueChange$,this.stateChange=this.editor.stateChange$,this.editorLoaded$.pipe((0,s.R)(i)).subscribe((()=>{this.renderer.appendChild(this.el.nativeElement,this.editorContainer)}))}set value(t){this.editor.setValue(t)}set editable(t){this.editor.editable=t}}return t.ɵfac=function(e){return new(e||t)(r.Y36(r.SBq),r.Y36(r.Qsj),r.Y36(a.$),r.Y36(i.Y1),r.Y36(i.ZW),r.Y36(o.a31,2))},t.ɵdir=r.lG2({type:t,selectors:[["","tuiTiptapEditor",""]],inputs:{value:"value",editable:"editable"},outputs:{valueChange:"valueChange",stateChange:"stateChange"},features:[r._Bn([o.a31])]}),t})()},20672:(t,e,n)=>{n.d(e,{$:()=>f});var r=n(42600),o=n(79765),i=n(74788);let s=(()=>{class t{constructor(){this.stateChange$=new o.xQ,this.valueChange$=new o.xQ}}return t.ɵfac=function(e){return new(e||t)},t.ɵdir=i.lG2({type:t}),t})();var a=n(69725),l=n(40401),c=n(48178),d=n(62463),u=n(39761),h=n(88002),p=n(87519);let f=(()=>{class t extends s{constructor(t){super(),this.editorRef=t,this.editorRef.subscribe((t=>{this.editor=t;const e=()=>{this.stateChange$.next();const e=t.getHTML(),n=(r=t.getJSON().content,Array.isArray(r)&&1===r.length&&"paragraph"===r[0].type&&!r[0].hasOwnProperty("content")?"":e);var r;this.valueChange$.next(n)};t.on("transaction",e.bind(this)),t.on("update",e.bind(this))}))}get isFocused(){return this.editor.isFocused}get html(){return this.editor.getHTML()}get editable(){return this.editor.isEditable}set editable(t){this.editor.setEditable(t,!1)}get state(){return this.editor.state}getOriginTiptapEditor(){return this.editor}undoDisabled(){return!this.editor.can().undo()}redoDisabled(){return!this.editor.can().redo()}getFontColor(){return this.editor.getAttributes("textStyle").fontColor||a.hK}getFontSize(){return parseInt(this.editor.getAttributes("textStyle").fontSize,10)}setFontSize(t){this.editor.chain().setMark("textStyle",{fontSize:(0,r.O9r)(t)}).run()}getBackgroundColor(){var t;return(null===(t=this.editor)||void 0===t?void 0:t.getAttributes("textStyle").backgroundColor)||"transparent"}getCellColor(){return this.editor.getAttributes("tableCell").background||this.editor.getAttributes("tableHeader").background}getGroupColor(){var t,e,n,r;if(this.editor.isActive("group")){const o=null!==(e=null===(t=this.editor.getAttributes("group"))||void 0===t?void 0:t.style)&&void 0!==e?e:"",i=(0,c.jx)(o);return null!==(r=null!==(n=i["background-color"])&&void 0!==n?n:i.background)&&void 0!==r?r:""}return""}onAlign(t){this.editor.chain().focus().setTextAlign(t).run()}setImage(t){this.editor.chain().focus().command((({commands:e,state:n})=>{var r;const o=null!==(r=e.setEditableImage)&&void 0!==r?r:e.setImage;if(o){const r=n.selection.anchor;return o({src:t}),e.setTextSelection(r),!0}return!1})).run()}undo(){this.editor.chain().undo().run()}redo(){this.editor.chain().redo().run()}setHorizontalRule(){this.editor.chain().focus().setHorizontalRule().run()}removeFormat(){this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes()}setFontColor(t){this.editor.chain().focus().setFontColor(t).run()}setBackgroundColor(t){this.editor.chain().focus().setBackgroundColor(t).run()}toggleUnderline(){this.editor.chain().focus().toggleUnderline().run()}toggleStrike(){this.editor.chain().focus().toggleStrike().run()}toggleOrderedList(){this.editor.chain().focus().toggleOrderedList().run()}toggleUnorderedList(){this.editor.chain().focus().toggleBulletList().run()}togglePre(){this.editor.chain().focus().toggleCodeBlock().run()}toggleTaskList(){this.editor.commands.toggleTaskList()}sinkListItem(){const t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().sinkListItem(t).run()}liftListItem(){const t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().liftListItem(t).run()}isActive(t){return this.editor.isActive(t)}isActive$(t){return this.stateChange$.pipe((0,u.O)(null),(0,h.U)((()=>this.isActive(t))),(0,p.x)())}toggleBold(){this.editor.chain().focus().toggleBold().run()}toggleCode(){this.editor.chain().focus().toggleCode().run()}toggleItalic(){this.editor.chain().focus().toggleItalic().run()}toggleBlockquote(){this.editor.chain().focus().toggleBlockquote().run()}toggleSubscript(){this.editor.chain().focus().toggleSubscript().run()}toggleSuperscript(){this.editor.chain().focus().toggleSuperscript().run()}toggleCodeBlock(){this.editor.chain().focus().toggleCodeBlock().run()}insertTable(t,e){this.editor.chain().focus().insertTable({cols:t,rows:e}).run()}addColumnAfter(){this.editor.chain().focus().addColumnAfter().run()}addColumnBefore(){this.editor.chain().focus().addColumnBefore().run()}addRowAfter(){this.editor.chain().focus().addRowAfter().run()}addRowBefore(){this.editor.chain().focus().addRowBefore().run()}deleteColumn(){this.editor.chain().focus().deleteColumn().run()}deleteRow(){this.editor.chain().focus().deleteRow().run()}mergeCells(){this.editor.chain().focus().mergeCells().run()}splitCell(){this.editor.chain().focus().splitCell().run()}canMergeCells(){return this.editor.can().mergeCells()}canSplitCells(){return this.editor.can().splitCell()}setHeading(t){this.editor.chain().focus().setHeading({level:t}).run()}setParagraph(t){this.editor.chain().focus().setParagraph().run(),t&&this.editor.chain().setMark("textStyle",t).run()}setHardBreak(){this.editor.chain().setHardBreak().run()}setTextSelection(t){this.editor.commands.setTextSelection(t)}toggleLink(t){this.editor.chain().focus().toggleLink({href:t}).run()}setLink(t){this.editor.chain().focus().setLink({href:t}).run()}unsetLink(){this.editor.chain().focus().unsetLink().run()}focus(){this.editor.chain().focus().run()}setValue(t){t===this.html||""===t&&"

"===this.html||(this.editor.commands.setContent(t),this.editor.view.updateState(d.yy.create({schema:this.editor.state.schema,doc:this.editor.state.doc,selection:this.editor.state.selection,storedMarks:this.editor.state.storedMarks,plugins:this.editor.state.plugins})))}destroy(){this.editor.destroy()}setCellColor(t){this.editor.chain().focus().setCellBackground(t).run()}selectClosest(){const t=this.editor.state.selection.anchor,{schema:e,doc:n}=this.editor.state,r=(0,c.Yz)(n.resolve(t),e.marks.link);r&&this.editor.chain().setTextSelection(r).run()}enter(){this.editor.commands.enter()}setDetails(){this.editor.commands.setDetails()}removeDetails(){this.editor.commands.removeDetails()}setGroup(){this.editor.commands.setGroup()}removeGroup(){this.editor.commands.removeGroup()}setGroupHilite(t){this.editor.commands.setGroupHilite(t)}setAnchor(t){this.editor.commands.setAnchor(t.replace("#",""))}removeAnchor(){this.editor.commands.removeAnchor()}setFileLink(t){this.editor.commands.setFileLink(t)}setYoutubeVideo(t){this.editor.commands.setYoutubeVideo(t)}setIframe(t){this.editor.commands.setIframe(t)}removeEmptyTextStyle(){this.editor.commands.removeEmptyTextStyle()}toggleMark(t,e,n){this.editor.commands.toggleMark(t,e,n)}}return t.ɵfac=function(e){return new(e||t)(i.LFG(l.ZW))},t.ɵprov=i.Yz7({token:t,factory:t.ɵfac}),t})()},72023:(t,e,n)=>{n.d(e,{_:()=>r});var r=(()=>(function(t){t.Align="justify",t.Anchor="anchor",t.Attach="attach",t.Bold="bold",t.Clear="clear",t.Code="code",t.Color="foreColor",t.Details="details",t.Group="group",t.HR="insertHorizontalRule",t.Hilite="hiliteColor",t.Img="image",t.Italic="italic",t.Link="link",t.List="list",t.MergeCells="mergeCells",t.Quote="quote",t.RowsColumnsManaging="rowsColumnsManaging",t.Size="fontSize",t.SplitCells="splitCells",t.Strikethrough="strikeThrough",t.Sub="subscript",t.Sup="superscript",t.Table="insertTable",t.Tex="tex",t.Underline="underline",t.Undo="undo"}(r||(r={})),r))()},44:(t,e,n)=>{n.r(e),n.d(e,{BackgroundColor:()=>r}),n(84402);const r=n(11046).Extension.create({name:"backgroundColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,renderHTML:({backgroundColor:t})=>t?{style:`background-color: ${t}`}:{},parseHTML:({style:t})=>t.backgroundColor.replace(/['"]+/g,""),keepOnSplit:!1}}}]},addCommands:()=>({setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).run()})})},58101:(t,e,n)=>{n.r(e),n.d(e,{TuiFileLink:()=>r});const r=n(11046).Extension.create({name:"fileLink",addCommands:()=>({setFileLink:t=>({state:e,chain:n})=>{const{selection:r}=e,o=' ';return(Math.abs(r.to-r.from)>0?n().toggleMark("link",{href:t.link},{extendEmptyMarkRange:!0}).setTextSelection(r.to).insertContent(o):n().insertContent(`${t.name}${o}`)).setTextSelection(r.to).run()}})})},30163:(t,e,n)=>{n.r(e),n.d(e,{FontColor:()=>r}),n(84402);const r=n(11046).Extension.create({name:"fontColor",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontColor:{default:null,renderHTML:({fontColor:t})=>t?{style:`color: ${t}`}:{},parseHTML:({style:t})=>t.color.replace(/['"]+/g,""),keepOnSplit:!1}}}]},addCommands:()=>({setFontColor:t=>({chain:e})=>e().setMark("textStyle",{fontColor:t}).run(),unsetFontColor:()=>({chain:t})=>t().setMark("textStyle",{fontColor:null}).run()})})},1604:(t,e,n)=>{n.r(e),n.d(e,{TuiFontSize:()=>r}),n(84402);const r=n(11046).Extension.create({name:"fontSize",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:({style:t})=>t.fontSize,renderHTML:({fontSize:t})=>t?{style:`font-size: ${t}`}:{}}}}]},addCommands:()=>({setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()})})},19818:(t,e,n)=>{n.r(e),n.d(e,{TUI_EDITOR_GROUP_DEFAULT_OPTIONS:()=>i,createGroupExtension:()=>s});var r=n(48178),o=n(11046);const i={groupNodeClass:"tui-group-node",groupPointerNodeClass:"tui-group-pointer",nested:!0,draggable:!0,createOnEnter:!1},s=(t={})=>{const{draggable:e,nested:n,groupNodeClass:s,groupPointerNodeClass:a,createOnEnter:l}=Object.assign(Object.assign({},i),t);return o.Node.create({name:"group",draggable:e,group:"block",content:n?"block+":"block",addAttributes:()=>({style:{default:null,parseHTML:t=>t.getAttribute("style"),renderHTML:t=>t.style?{style:t.style}:{}}}),parseHTML:()=>[{tag:'div[data-type="group"]'}],renderHTML:({HTMLAttributes:t})=>["div",(0,o.mergeAttributes)(t,{"data-type":"group"}),0],addNodeView:()=>({HTMLAttributes:t,node:n})=>{const r=document.createElement("div"),o=document.createElement("div");if(r.classList.add(s),o.setAttribute("data-type","group"),t.style&&(n.attrs.style=t.style,o.setAttribute("style",t.style)),e){const t=document.createElement("div");t.classList.add(a),t.innerHTML="",t.contentEditable="false",r.append(t,o)}else r.append(o);return{dom:r,contentDOM:o}},addCommands(){return{setGroup:()=>({commands:t,state:e})=>{this.editor.chain().focus().run();const n=(0,r.Ap)(e,""),o=`
${n.trim().startsWith("

")?n:`

${n}

`}
`;return t.insertContent(o)},setGroupHilite:t=>({editor:e})=>{for(let n=e.state.selection.$anchor,r=n.depth;r>0;r--){const o=n.node(r);if(o.type.name===this.name){setTimeout((()=>e.commands.updateAttributes(o.type,{style:`background: ${t}`})));break}}return!0},removeGroup:()=>({state:t,dispatch:e})=>(0,r.yU)(t,e,this.name)}},addKeyboardShortcuts(){return l?{Enter:this.editor.commands.setGroup}:{}}})}},33626:(t,e,n)=>{n.r(e),n.d(e,{TUI_IFRAME_EDITOR_OPTIONS:()=>a,TuiIframeEditorComponent:()=>c,TuiIframeEditorModule:()=>p,createIframeEditorExtension:()=>h});var r=n(91211),o=n(42600),i=n(8274),s=n(74788);const a=new s.OlP("[TUI_IFRAME_EDITOR_OPTIONS]",{factory:()=>({minWidth:100,maxWidth:1/0,minHeight:100,maxHeight:1/0})});var l=n(22916);let c=(()=>{class t extends i._3{constructor(t,e){super(),this.options=t,this.sanitizer=e}get src(){var t;return this.sanitizer.bypassSecurityTrustResourceUrl(null!==(t=this.attrs.src)&&void 0!==t?t:"")}updateSize([t,e]){this.currentWidth=Math.max(this.options.minWidth,Math.min(this.options.maxWidth,t)),this.currentHeight=Math.max(this.options.minHeight,Math.min(this.options.maxHeight,e)),this.attrs.width=this.currentWidth,this.attrs.height=this.currentHeight,this.editor.commands.setContent(this.editor.getJSON())}}return t.ɵfac=function(e){return new(e||t)(s.Y36(a),s.Y36(r.H7))},t.ɵcmp=s.Xpm({type:t,selectors:[["tui-iframe-editor"]],features:[s._Bn([o.a31]),s.qOj],decls:2,vars:13,consts:[[3,"height","width","sizeChange"],[3,"height","src","width"]],template:function(t,e){1&t&&(s.TgZ(0,"tui-editor-resizable",0),s.NdJ("sizeChange",(function(t){return e.updateSize(t)})),s._UZ(1,"iframe",1),s.qZA()),2&t&&(s.Q6J("height",e.height)("width",e.width),s.xp6(1),s.Udp("max-height",e.options.maxHeight)("max-width",e.options.maxWidth)("min-height",e.options.minHeight)("min-width",e.options.minWidth),s.Q6J("height",e.height)("src",e.src,s.uOi)("width",e.width))},directives:[l.V],styles:["iframe[_ngcontent-%COMP%]{display:inline;pointer-events:none}"],changeDetection:0}),t})();var d=n(13704),u=n(11046);const h=t=>u.Node.create({name:"iframe",group:"block",atom:!0,draggable:!1,parseHTML:()=>[{tag:'iframe[data-type="iframe-editor"]'}],addAttributes(){return{src:{default:null,keepOnSplit:!1,parseHTML:t=>t.getAttribute("src")},frameborder:{default:0,keepOnSplit:!1,parseHTML:t=>t.getAttribute("frameborder")},width:{default:"100%",keepOnSplit:!1,parseHTML:t=>t.getAttribute("width")},height:{default:null,keepOnSplit:!1,parseHTML:t=>t.getAttribute("height")},allowfullscreen:{keepOnSplit:!1,default:this.options.allowFullscreen,parseHTML:t=>t.getAttribute("allowfullscreen")}}},renderHTML:({HTMLAttributes:t})=>["iframe",(0,u.mergeAttributes)(t,{"data-type":"iframe-editor"})],addNodeView:()=>e=>new d.y(c,e,Object.assign({injector:t},e)),addCommands(){return{setIframe:t=>({commands:e,state:n})=>{const r=n.selection.anchor;return e.enter(),e.setTextSelection(r),e.insertContent({type:this.name,attrs:t}),e.setTextSelection(n.selection.anchor),!0}}}});let p=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=s.oAB({type:t}),t.ɵinj=s.cJS({imports:[[i.Sl]]}),t})()},89681:(t,e,n)=>{n.r(e),n.d(e,{TUI_EDITOR_MAX_IMAGE_WIDTH:()=>d,TUI_EDITOR_MIN_IMAGE_WIDTH:()=>c,TUI_IMAGE_EDITOR_OPTIONS:()=>u,TuiImageEditorComponent:()=>p,TuiImageEditorModule:()=>S,createImageEditorExtension:()=>M,tuiCreateImageEditorExtension:()=>A});var r=n(12057),o=n(74788),i=n(91211),s=n(62579),a=n(42600),l=n(8274);const c=new o.OlP("[TUI_EDITOR_MIN_IMAGE_WIDTH]",{factory:()=>null}),d=new o.OlP("[TUI_EDITOR_MAX_IMAGE_WIDTH]",{factory:()=>null}),u=new o.OlP("[TUI_IMAGE_EDITOR_OPTIONS]",{factory:()=>({minWidth:100,maxWidth:1/0})});var h=n(22916);let p=(()=>{class t extends l._3{constructor(t,e,n,r,o,i,s){super(),this.minWidth=t,this.maxWidth=e,this.options=n,this.doc=r,this.sanitizer=o,this.el=i,this.win=s,this.contenteditable=!0,this.focused=!1}get dragHandle(){var t;return null!==(t=this.attrs.draggable)&&void 0!==t?t:null}get height(){return null}get alt(){return this.attrs.alt||""}get title(){return this.attrs.title||""}get src(){return this.sanitizer.bypassSecurityTrustResourceUrl(this.attrs.src)}currentTargetIsFocused(t){this.focused=this.el.nativeElement.contains(t),this.focused&&this.selectFakeText()}updateSize([t]){var e,n;const r=null!==(e=this.minWidth)&&void 0!==e?e:this.options.minWidth,o=null!==(n=this.maxWidth)&&void 0!==n?n:this.options.maxWidth;this.currentWidth=Math.max(r,Math.min(o,t)),this.attrs.width=this.currentWidth,this.editor.commands.setContent(this.editor.getJSON())}selectFakeText(){var t,e,n;const r=this.doc.createRange();null===(t=this.el.nativeElement.querySelector("p"))||void 0===t||t.focus(),r.selectNode(this.el.nativeElement),null===(e=this.win.getSelection())||void 0===e||e.removeAllRanges(),null===(n=this.win.getSelection())||void 0===n||n.addRange(r)}}return t.ɵfac=function(e){return new(e||t)(o.Y36(c),o.Y36(d),o.Y36(u),o.Y36(r.K0),o.Y36(i.H7),o.Y36(o.SBq),o.Y36(s.m9))},t.ɵcmp=o.Xpm({type:t,selectors:[["tui-image-editor"]],hostVars:2,hostBindings:function(t,e){1&t&&o.NdJ("click.silent",(function(t){return e.currentTargetIsFocused(t.target)}),!1,o.evT),2&t&&o.uIk("contenteditable",e.contenteditable)("data-drag-handle",e.dragHandle)},features:[o._Bn([a.a31]),o.qOj],decls:4,vars:12,consts:[["contenteditable","false",1,"t-emulate-inline-node"],[3,"autoHeight","width","sizeChange"],["contenteditable","false",3,"alt","src","title","width"]],template:function(t,e){1&t&&(o._UZ(0,"p",0),o.TgZ(1,"tui-editor-resizable",1),o.NdJ("sizeChange",(function(t){return e.updateSize(t)})),o._UZ(2,"img",2),o.qZA(),o._UZ(3,"p",0)),2&t&&(o.xp6(1),o.Q6J("autoHeight",!0)("width",e.width),o.xp6(1),o.Udp("max-width",e.options.maxWidth,"px")("min-width",e.options.minWidth,"px"),o.ekj("ProseMirror-selectednode",e.focused),o.Q6J("alt",e.alt)("src",e.src,o.LSH)("title",e.title)("width",e.width))},directives:[h.V],styles:["[data-drag-handle][_nghost-%COMP%]{cursor:move}img[_ngcontent-%COMP%]{pointer-events:none}.t-emulate-inline-node[_ngcontent-%COMP%]{display:inline-block;margin:0;height:0}"],changeDetection:0}),t})();var f=n(13704),m=n(40401),g=n(11046),b=n(44632),k=n(62463),v=n(15257),y=n(70409);const w=[{tag:'img[data-type="image-editor"]'}],x={src:{default:"",keepOnSplit:!1},width:{default:300,keepOnSplit:!1},alt:{default:"",keepOnSplit:!1},title:{default:"",keepOnSplit:!1}};function C(t){return(e,n)=>{var r;const o=n instanceof DragEvent?n.dataTransfer:n.clipboardData,i=Array.from(null!==(r=null==o?void 0:o.files)&&void 0!==r?r:[]).filter((t=>/image/i.test(t.type)));i.length&&n.preventDefault();const s=t.get(m.p7);i.forEach((t=>{s(t).pipe((0,v.q)(1),(0,y.o)((()=>!e.isDestroyed))).subscribe((t=>{const n=e.state.schema.nodes.imageEditor.create({src:t}),r=e.state.tr.replaceSelectionWith(n);null===setTimeout||void 0===setTimeout||setTimeout((()=>{e.isDestroyed||e.dispatch(r)}))}))}))}}function A({injector:t,draggable:e}){return M(t,{draggable:e})}function M(t,{draggable:e}={}){const n=!(0,a.PcC)(e)||e;return b.Image.extend({name:"imageEditor",group:"inline",inline:!0,atom:!0,priority:0,selectable:!0,draggable:n,parseHTML:()=>w,addAttributes:()=>Object.assign(Object.assign({},x),{draggable:{default:n?"":null,keepOnSplit:!1}}),renderHTML:({HTMLAttributes:t})=>["img",(0,g.mergeAttributes)(t,{"data-type":"image-editor"})],addNodeView:()=>e=>new f.y(p,e,Object.assign({injector:t},e)),addCommands(){return{setEditableImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addProseMirrorPlugins:()=>[new k.Sy({props:{handleDOMEvents:{paste:C(t),drop:C(t)}}})]})}let S=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=o.oAB({type:t}),t.ɵinj=o.cJS({imports:[[r.ez,l.Sl]]}),t})()},13575:(t,e,n)=>{function r(t){return t.isActive("bulletList")||t.isActive("orderedList")}n.r(e),n.d(e,{TuiTabExtension:()=>o,tuiIsOrderedOrBulletList:()=>r});const o=n(11046).Extension.create({name:"indent",addKeyboardShortcuts(){return{Tab:()=>!r(this.editor)&&this.editor.commands.insertContent("\t")}}})},48239:(t,e,n)=>{n.r(e),n.d(e,{TuiLink:()=>Xt});var r=n(48178),o=n(11046);const i="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",s="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",a=(t,e)=>{for(const n in e)t[n]=e[n];return t},l="numeric",c="ascii",d="alpha",u="asciinumeric",h="alphanumeric",p="domain",f="emoji",m="scheme",g="slashscheme",b="whitespace";function k(t,e){return t in e||(e[t]=[]),e[t]}function v(t,e,n){e[l]&&(e[u]=!0,e[h]=!0),e[c]&&(e[u]=!0,e[d]=!0),e[u]&&(e[h]=!0),e[d]&&(e[h]=!0),e[h]&&(e[p]=!0),e[f]&&(e[p]=!0);for(const r in e){const e=k(r,n);e.indexOf(t)<0&&e.push(t)}}function y(t){void 0===t&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}y.groups={},y.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let n=0;n=0&&(n[r]=!0);return n}(s.t,r),n);v(i,t,r)}else n&&v(i,n,r);s.t=i}return o.j[t]=s,s}};const w=(t,e,n,r,o)=>t.ta(e,n,r,o),x=(t,e,n,r,o)=>t.tr(e,n,r,o),C=(t,e,n,r,o)=>t.ts(e,n,r,o),A=(t,e,n,r,o)=>t.tt(e,n,r,o),M="WORD",S="UWORD",_="LOCALHOST",T="TLD",E="UTLD",O="SCHEME",D="SLASH_SCHEME",N="NUM",L="WS",I="NL",R="OPENBRACE",z="CLOSEBRACE",P="OPENBRACKET",H="CLOSEBRACKET",q="OPENPAREN",B="CLOSEPAREN",$="OPENANGLEBRACKET",F="CLOSEANGLEBRACKET",J="FULLWIDTHLEFTPAREN",j="FULLWIDTHRIGHTPAREN",Z="LEFTCORNERBRACKET",U="RIGHTCORNERBRACKET",V="LEFTWHITECORNERBRACKET",Y="RIGHTWHITECORNERBRACKET",W="FULLWIDTHLESSTHAN",G="FULLWIDTHGREATERTHAN",Q="AMPERSAND",K="APOSTROPHE",X="ASTERISK",tt="AT",et="BACKSLASH",nt="BACKTICK",rt="CARET",ot="COLON",it="COMMA",st="DOLLAR",at="DOT",lt="EQUALS",ct="EXCLAMATION",dt="HYPHEN",ut="PERCENT",ht="PIPE",pt="PLUS",ft="POUND",mt="QUERY",gt="QUOTE",bt="SEMI",kt="SLASH",vt="TILDE",yt="UNDERSCORE",wt="EMOJI",xt="SYM";var Ct=Object.freeze({__proto__:null,WORD:M,UWORD:S,LOCALHOST:_,TLD:T,UTLD:E,SCHEME:O,SLASH_SCHEME:D,NUM:N,WS:L,NL:I,OPENBRACE:R,CLOSEBRACE:z,OPENBRACKET:P,CLOSEBRACKET:H,OPENPAREN:q,CLOSEPAREN:B,OPENANGLEBRACKET:$,CLOSEANGLEBRACKET:F,FULLWIDTHLEFTPAREN:J,FULLWIDTHRIGHTPAREN:j,LEFTCORNERBRACKET:Z,RIGHTCORNERBRACKET:U,LEFTWHITECORNERBRACKET:V,RIGHTWHITECORNERBRACKET:Y,FULLWIDTHLESSTHAN:W,FULLWIDTHGREATERTHAN:G,AMPERSAND:Q,APOSTROPHE:K,ASTERISK:X,AT:tt,BACKSLASH:et,BACKTICK:nt,CARET:rt,COLON:ot,COMMA:it,DOLLAR:st,DOT:at,EQUALS:lt,EXCLAMATION:ct,HYPHEN:dt,PERCENT:ut,PIPE:ht,PLUS:pt,POUND:ft,QUERY:mt,QUOTE:gt,SEMI:bt,SLASH:kt,TILDE:vt,UNDERSCORE:yt,EMOJI:wt,SYM:xt});const At=/[a-z]/,Mt=/\p{L}/u,St=/\p{Emoji}/u,_t=/\d/,Tt=/\s/,Et="\n",Ot="️",Dt="‍";let Nt=null,Lt=null;function It(t,e,n,r,o){let i;const s=e.length;for(let n=0;n=0;)o++;if(o>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+o),10);e>0;e--)n.pop();r+=o}else n.push(t[r]),r++}return e}const zt={defaultProtocol:"http",events:null,format:Ht,formatHref:Ht,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Pt(t,e){void 0===e&&(e=null);let n=a({},zt);t&&(n=a(n,t instanceof Pt?t.o:t));const r=n.ignoreTags,o=[];for(let t=0;tt,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=null!=e;let o=this.o[t];return o?("object"==typeof o?(o=n.t in o?o[n.t]:zt[t],"function"==typeof o&&r&&(o=o(e,n))):"function"==typeof o&&r&&(o=o(e,n.t,n)),o):o},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}},qt.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return void 0===t&&(t=zt.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),c=t.get("target",n,e),d=t.get("rel",n,e),u=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),c&&(s.target=c),d&&(s.rel=d),u&&a(s,u),{tagName:o,attributes:s,content:i,eventListeners:h}}};const $t=Bt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ft=Bt("text"),Jt=Bt("nl"),jt=Bt("url",{isLink:!0,toHref(t){return void 0===t&&(t=zt.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==_&&t[1].t===ot}}),Zt=t=>new y(t);function Ut(t,e,n){const r=n[0].s,o=n[n.length-1].e;return new t(e.slice(r,o),n)}const Vt="undefined"!=typeof console&&console&&console.warn||(()=>{}),Yt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Wt(t,e){if(void 0===e&&(e=!1),Yt.initialized&&Vt(`linkifyjs: already initialized - will not register custom scheme "${t}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');Yt.customSchemes.push([t,e])}function Gt(t,e,n){if(void 0===e&&(e=null),void 0===n&&(n=null),e&&"object"==typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Pt(n),o=function(t){return Yt.initialized||function(){Yt.scanner=function(t){void 0===t&&(t=[]);const e={};y.groups=e;const n=new y;null==Nt&&(Nt=Rt(i)),null==Lt&&(Lt=Rt(s)),A(n,"'",K),A(n,"{",R),A(n,"}",z),A(n,"[",P),A(n,"]",H),A(n,"(",q),A(n,")",B),A(n,"<",$),A(n,">",F),A(n,"(",J),A(n,")",j),A(n,"「",Z),A(n,"」",U),A(n,"『",V),A(n,"』",Y),A(n,"<",W),A(n,">",G),A(n,"&",Q),A(n,"*",X),A(n,"@",tt),A(n,"`",nt),A(n,"^",rt),A(n,":",ot),A(n,",",it),A(n,"$",st),A(n,".",at),A(n,"=",lt),A(n,"!",ct),A(n,"-",dt),A(n,"%",ut),A(n,"|",ht),A(n,"+",pt),A(n,"#",ft),A(n,"?",mt),A(n,'"',gt),A(n,"/",kt),A(n,";",bt),A(n,"~",vt),A(n,"_",yt),A(n,"\\",et);const r=x(n,_t,N,{[l]:!0});x(r,_t,r);const o=x(n,At,M,{[c]:!0});x(o,At,o);const h=x(n,Mt,S,{[d]:!0});x(h,At),x(h,Mt,h);const k=x(n,Tt,L,{[b]:!0});A(n,Et,I,{[b]:!0}),A(k,Et),x(k,Tt,k);const w=x(n,St,wt,{[f]:!0});x(w,St,w),A(w,Ot,w);const zt=A(w,Dt);x(zt,St,w);const Pt=[[At,o]],Ht=[[At,null],[Mt,h]];for(let t=0;tt[0]>e[0]?1:-1));for(let e=0;e=0?o[p]=!0:At.test(r)?_t.test(r)?o[u]=!0:o[c]=!0:o[l]=!0,C(n,r,r,o)}return C(n,"localhost",_,{ascii:!0}),n.jd=new y(xt),{start:n,tokens:a({groups:e},Ct)}}(Yt.customSchemes);for(let t=0;t=0&&h++,o++,d++;if(h<0)o-=d,o0&&(i.push(Ut(Ft,e,s)),s=[]),o-=h,d-=h;const t=u.t,r=n.slice(o-d,o);i.push(Ut(t,e,r))}}return s.length>0&&i.push(Ut(Ft,e,s)),i}(Yt.parser.start,t,function(t,e){const n=function(t){const e=[],n=t.length;let r=0;for(;r56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}(e.replace(/[A-Z]/g,(t=>t.toLowerCase()))),r=n.length,o=[];let i=0,s=0;for(;s=0&&(u+=n[s].length,h++),c+=n[s].length,i+=n[s].length,s++;i-=u,s-=h,c-=u,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}(Yt.scanner.start,t))}(t),h=[];for(let t=0;t{"string"!=typeof t?Wt(t.scheme,t.optionalSlashes):Wt(t)}))},onDestroy(){y.groups={},Yt.scanner=null,Yt.parser=null,Yt.tokenQueue=[],Yt.pluginQueue=[],Yt.customSchemes=[],Yt.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){var e;return(null===(e=t.href)||void 0===e?void 0:e.startsWith("javascript:"))?["a",(0,o.mergeAttributes)(this.options.HTMLAttributes,{...t,href:""}),0]:["a",(0,o.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,o.markPasteRule)({find:t=>Gt(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:(t,e)=>{var n,r;const o=null===(n=null==e?void 0:e.clipboardData)||void 0===n?void 0:n.getData("text/html"),i=null==o?void 0:o.match(/href="([^"]*)"/);return i?{href:i[1]}:{href:null===(r=t.data)||void 0===r?void 0:r.href}}})]},addProseMirrorPlugins(){const t=[];return this.options.autolink&&t.push((e={type:this.type,validate:this.options.validate},new Qt.Sy({key:new Qt.H$("autolink"),appendTransaction:(t,n,r)=>{const i=t.some((t=>t.docChanged))&&!n.doc.eq(r.doc),s=t.some((t=>t.getMeta("preventAutolink")));if(!i||s)return;const{tr:a}=r,l=(0,o.combineTransactionSteps)(n.doc,[...t]);return(0,o.getChangedRanges)(l).forEach((({newRange:t})=>{const n=(0,o.findChildrenInRange)(r.doc,t,(t=>t.isTextblock));let i,s;if(n.length>1?(i=n[0],s=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(i=n[0],s=r.doc.textBetween(i.pos,t.to,void 0," ")),i&&s){const t=s.split(" ").filter((t=>""!==t));if(t.length<=0)return!1;const n=t[t.length-1],l=i.pos+s.lastIndexOf(n);if(!n)return!1;Gt(n).filter((t=>t.isLink)).map((t=>({...t,from:l+t.start+1,to:l+t.end+1}))).filter((t=>!r.schema.marks.code||!r.doc.rangeHasMark(t.from,t.to,r.schema.marks.code))).filter((t=>!e.validate||e.validate(t.value))).forEach((t=>{(0,o.getMarksBetween)(t.from,t.to,r.doc).some((t=>t.mark.type===e.type))||a.addMark(t.from,t.to,e.type.create({href:t.href}))}))}})),a.steps.length?a:void 0}}))),this.options.openOnClick&&t.push(function(t){return new Qt.Sy({key:new Qt.H$("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(0!==r.button)return!1;if("A"!==r.target.nodeName)return!1;const a=(0,o.getAttributes)(e.state,t.type.name),l=r.target,c=null!==(i=null==l?void 0:l.href)&&void 0!==i?i:a.href,d=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!(!l||!c||(e.editable&&window.open(c,d),0))}}})}({type:this.type})),this.options.linkOnPaste&&t.push(function(t){return new Qt.Sy({key:new Qt.H$("handlePasteLink"),props:{handlePaste:(e,n,r)=>{var o;const{state:i}=e,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach((t=>{l+=t.textContent}));const c=Gt(l).find((t=>t.isLink&&t.value===l));if(!l||!c)return!1;const d=null===(o=n.clipboardData)||void 0===o?void 0:o.getData("text/html"),u=null==d?void 0:d.match(/href="([^"]*)"/),h=u?u[1]:c.href;return t.editor.commands.setMark(t.type,{href:h}),!0}}})}({editor:this.editor,type:this.type})),t;var e}}),Xt=Kt.extend({addAttributes(){var t;return Object.assign(Object.assign({},null===(t=this.parent)||void 0===t?void 0:t.call(this)),(0,r.x6)(["download"]))},addCommands(){var t;return Object.assign(Object.assign({},null===(t=this.parent)||void 0===t?void 0:t.call(this)),{toggleLink:t=>({chain:e,state:n})=>{{const{selection:r,doc:i}=n,s=i.cut(r.to,r.to+1),a=" "===(0,o.getHTMLFromFragment)(s.content,n.schema).replace(/<\/?[^>]+(>|$)/g,""),l=e().toggleMark(this.name,t,{extendEmptyMarkRange:!0});return(a?l.setTextSelection(r.to+1):l.setTextSelection(r.to).insertContent(' ')).run()}}})},addPasteRules(){return[(0,o.markPasteRule)({find:t=>Gt(t).filter((t=>{var e,n,r;return null===(r=null===(n=(e=this.options).validate)||void 0===n?void 0:n.call(e,t.value))||void 0===r||r})).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]}}).configure({openOnClick:!1})},52989:(t,e,n)=>{n.r(e),n.d(e,{TuiMarkdown:()=>yn,TuiMarkdownClipboard:()=>c,TuiMarkdownTightLists:()=>vn});var r={};n.r(r),n.d(r,{arrayReplaceAt:()=>z,assign:()=>R,escapeHtml:()=>Y,escapeRE:()=>G,fromCodePoint:()=>H,has:()=>I,isMdAsciiPunct:()=>tt,isPunctChar:()=>X,isSpace:()=>Q,isString:()=>N,isValidEntityCode:()=>P,isWhiteSpace:()=>K,lib:()=>nt,normalizeReference:()=>et,unescapeAll:()=>J,unescapeMd:()=>F});var o={};n.r(o),n.d(o,{parseLinkDestination:()=>ot,parseLinkLabel:()=>rt,parseLinkTitle:()=>it});var i=n(11046),s=n(27439),a=n(62463);function l(t){return(new window.DOMParser).parseFromString(`${t}`,"text/html").body}const c=i.Extension.create({name:"markdownClipboard",addOptions:()=>({transformPastedText:!1,transformCopiedText:!1}),addProseMirrorPlugins(){return[new a.Sy({key:new a.H$("markdownClipboard"),props:{clipboardTextParser:(t,e,n)=>{if(n||!this.options.transformPastedText)return null;const r=this.editor.storage.markdown.parser.parse(t,{inline:!0});return s.aw.fromSchema(this.editor.schema).parseSlice(l(r),{preserveWhitespace:!0,context:e})},clipboardTextSerializer:t=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(t.content):null}})]}});var d=n(9934),u=n(6855),h=n(74444),p=n(36973);const f=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((t=>t.charCodeAt(0)))),m=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((t=>t.charCodeAt(0))));var g;const b=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),k=null!==(g=String.fromCodePoint)&&void 0!==g?g:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+=String.fromCharCode(t),e};var v=(()=>(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"}(v||(v={})),v))(),y=(()=>(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(y||(y={})),y))();function w(t){return t>=v.ZERO&&t<=v.NINE}var x=(()=>(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"}(x||(x={})),x))(),C=(()=>{return(t=C||(C={}))[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute",C;var t})();class A{constructor(t,e,n){this.decodeTree=t,this.emitCodePoint=e,this.errors=n,this.state=x.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=C.Strict}startEntity(t){this.decodeMode=t,this.state=x.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case x.EntityStart:return t.charCodeAt(e)===v.NUM?(this.state=x.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=x.NamedEntity,this.stateNamedEntity(t,e));case x.NumericStart:return this.stateNumericStart(t,e);case x.NumericDecimal:return this.stateNumericDecimal(t,e);case x.NumericHex:return this.stateNumericHex(t,e);case x.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===v.LOWER_X?(this.state=x.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=x.NumericDecimal,this.stateNumericDecimal(t,e))}addToNumericResult(t,e,n,r){if(e!==n){const o=n-e;this.result=this.result*Math.pow(r,o)+parseInt(t.substr(e,o),r),this.consumed+=o}}stateNumericHex(t,e){const n=e;for(;e=v.UPPER_A&&r<=v.UPPER_F||r>=v.LOWER_A&&r<=v.LOWER_F)))return this.addToNumericResult(t,n,e,16),this.emitNumericEntity(o,3);e+=1}var r;return this.addToNumericResult(t,n,e,16),-1}stateNumericDecimal(t,e){const n=e;for(;e=55296&&t<=57343||t>1114111?65533:null!==(e=b.get(t))&&void 0!==e?e:t}(this.result),this.consumed),this.errors&&(t!==v.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,e){const{decodeTree:n}=this;let r=n[this.treeIndex],o=(r&y.VALUE_LENGTH)>>14;for(;e=v.UPPER_A&&t<=v.UPPER_Z||t>=v.LOWER_A&&t<=v.LOWER_Z||w(t)}(i))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],o=(r&y.VALUE_LENGTH)>>14,0!==o){if(s===v.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==C.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var i;return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:n}=this,r=(n[e]&y.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,r,this.consumed),null===(t=this.errors)||void 0===t||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,e,n){const{decodeTree:r}=this;return this.emitCodePoint(1===e?r[t]&~y.VALUE_LENGTH:r[t+1],n),3===e&&this.emitCodePoint(r[t+2],n),n}end(){var t;switch(this.state){case x.NamedEntity:return 0===this.result||this.decodeMode===C.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case x.NumericDecimal:return this.emitNumericEntity(0,2);case x.NumericHex:return this.emitNumericEntity(0,3);case x.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case x.EntityStart:return 0}}}function M(t){let e="";const n=new A(t,(t=>e+=k(t)));return function(t,r){let o=0,i=0;for(;(i=t.indexOf("&",i))>=0;){e+=t.slice(o,i),n.startEntity(r);const s=n.write(t,i+1);if(s<0){o=i+n.end();break}o=i+s,i=0===s?o+1:o}const s=e+t.slice(o);return e="",s}}function S(t,e,n,r){const o=(e&y.BRANCH_LENGTH)>>7,i=e&y.JUMP_TABLE;if(0===o)return 0!==i&&r===i?n:-1;if(i){const e=r-i;return e<0||e>=o?-1:t[n+e]-1}let s=n,a=s+o-1;for(;s<=a;){const e=s+a>>>1,n=t[e];if(nr))return t[e+o];a=e-1}}return-1}const _=M(f);function T(t,e=C.Legacy){return _(t,e)}function E(t){for(let e=1;e'"]/g,O),D(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),D(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));const L=Object.prototype.hasOwnProperty;function I(t,e){return L.call(t,e)}function R(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object");Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t}function z(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function P(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||!(65535&~t&&65534!=(65535&t))||t>=0&&t<=8||11===t||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function H(t){if(t>65535){const e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const q=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,B=new RegExp(q.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),$=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function F(t){return t.indexOf("\\")<0?t:t.replace(q,"$1")}function J(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(B,(function(t,e,n){return e||function(t,e){if(35===e.charCodeAt(0)&&$.test(e)){const n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return P(n)?H(n):t}const n=T(t);return n!==t?n:t}(t,n)}))}const j=/[&<>"]/,Z=/[&<>"]/g,U={"&":"&","<":"<",">":">",'"':"""};function V(t){return U[t]}function Y(t){return j.test(t)?t.replace(Z,V):t}const W=/[.?*+^$[\]\\(){}|-]/g;function G(t){return t.replace(W,"\\$&")}function Q(t){switch(t){case 9:case 32:return!0}return!1}function K(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function X(t){return h.Z.test(t)||p.Z.test(t)}function tt(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function et(t){return t=t.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const nt={mdurl:d,ucmicro:u};function rt(t,e,n){let r,o,i,s;const a=t.posMax,l=t.pos;for(t.pos=e+1,r=1;t.pos32))return i;if(41===r){if(0===s)break;s--}o++}return e===o||0!==s||(i.str=J(t.slice(e,o)),i.pos=o,i.ok=!0),i}function it(t,e,n,r){let o,i=e;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(i>=n)return s;let r=t.charCodeAt(i);if(34!==r&&39!==r&&40!==r)return s;e++,i++,40===r&&(r=41),s.marker=r}for(;i"+Y(i.content)+""},st.code_block=function(t,e,n,r,o){const i=t[e];return""+Y(t[e].content)+"\n"},st.fence=function(t,e,n,r,o){const i=t[e],s=i.info?J(i.info).trim():"";let a,l="",c="";if(s){const t=s.split(/(\s+)/g);l=t[0],c=t.slice(2).join("")}if(a=n.highlight&&n.highlight(i.content,l,c)||Y(i.content),0===a.indexOf("${a}\n`}return`
${a}
\n`},st.image=function(t,e,n,r,o){const i=t[e];return i.attrs[i.attrIndex("alt")][1]=o.renderInlineAsText(i.children,n,r),o.renderToken(t,e,n)},st.hardbreak=function(t,e,n){return n.xhtmlOut?"
\n":"
\n"},st.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"
\n":"
\n":"\n"},st.text=function(t,e){return Y(t[e].content)},st.html_block=function(t,e){return t[e].content},st.html_inline=function(t,e){return t[e].content},at.prototype.renderAttrs=function(t){let e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e\n":">",o},at.prototype.renderInline=function(t,e,n){let r="";const o=this.rules;for(let i=0,s=t.length;i=0&&(n=this.attrs[e][1]),n},ut.prototype.attrJoin=function(t,e){const n=this.attrIndex(t);n<0?this.attrPush([t,e]):this.attrs[n][1]=this.attrs[n][1]+" "+e};const ht=ut;function pt(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}pt.prototype.Token=ht;const ft=pt,mt=/\r\n?|\n/g,gt=/\0/g;function bt(t){return/^<\/a\s*>/i.test(t)}const kt=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,vt=/\((c|tm|r)\)/i,yt=/\((c|tm|r)\)/gi,wt={c:"©",r:"®",tm:"™"};function xt(t,e){return wt[e.toLowerCase()]}function Ct(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];"text"!==r.type||e||(r.content=r.content.replace(yt,xt)),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}function At(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];"text"!==r.type||e||kt.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}const Mt=/['"]/,St=/['"]/g;function _t(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function Tt(t,e){let n;const r=[];for(let o=0;o=0&&!(r[n].level<=s);n--);if(r.length=n+1,"text"!==i.type)continue;let a=i.content,l=0,c=a.length;t:for(;l=0)f=a.charCodeAt(d.index-1);else for(n=o-1;n>=0&&"softbreak"!==t[n].type&&"hardbreak"!==t[n].type;n--)if(t[n].content){f=t[n].content.charCodeAt(t[n].content.length-1);break}let m=32;if(l=48&&f<=57&&(h=u=!1),u&&h&&(u=g,h=b),u||h){if(h)for(n=r.length-1;n>=0;n--){let u=r[n];if(r[n].level=0;s--){const a=o[s];if("link_close"!==a.type){if("html_inline"===a.type&&(n=a.content,/^\s]/i.test(n)&&i>0&&i--,bt(a.content)&&i++),!(i>0)&&"text"===a.type&&t.md.linkify.test(a.content)){const n=a.content;let i=t.md.linkify.match(n);const l=[];let c=a.level,d=0;i.length>0&&0===i[0].index&&s>0&&"text_special"===o[s-1].type&&(i=i.slice(1));for(let e=0;ed){const e=new t.Token("text","",0);e.content=n.slice(d,a),e.level=c,l.push(e)}const u=new t.Token("link_open","a",1);u.attrs=[["href",o]],u.level=c++,u.markup="linkify",u.info="auto",l.push(u);const h=new t.Token("text","",0);h.content=s,h.level=c,l.push(h);const p=new t.Token("link_close","a",-1);p.level=--c,p.markup="linkify",p.info="auto",l.push(p),d=i[e].lastIndex}if(d=0;e--)"inline"===t.tokens[e].type&&(vt.test(t.tokens[e].content)&&Ct(t.tokens[e].children),kt.test(t.tokens[e].content)&&At(t.tokens[e].children))}],["smartquotes",function(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&Mt.test(t.tokens[e].content)&&Tt(t.tokens[e].children,t)}],["text_join",function(t){let e,n;const r=t.tokens,o=r.length;for(let t=0;t0&&this.level++,this.tokens.push(r),r},Nt.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Nt.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;te;)if(!Q(this.src.charCodeAt(--t)))return t+1;return t},Nt.prototype.skipChars=function(t,e){for(let n=this.src.length;tn;)if(e!==this.src.charCodeAt(--t))return t+1;return t},Nt.prototype.getLines=function(t,e,n,r){if(t>=e)return"";const o=new Array(e-t);for(let i=0,s=t;sn?new Array(t-n+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return o.join("")},Nt.prototype.Token=ht;const Lt=Nt;function It(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function Rt(t){const e=[],n=t.length;let r=0,o=t.charCodeAt(r),i=!1,s=0,a="";for(;r=r)return-1;let i=t.src.charCodeAt(o++);if(i<48||i>57)return-1;for(;;){if(o>=r)return-1;if(i=t.src.charCodeAt(o++),!(i>=48&&i<=57)){if(41===i||46===i)break;return-1}if(o-n>=10)return-1}return o`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",qt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Bt=new RegExp("^(?:"+Ht+"|"+qt+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),$t=new RegExp("^(?:"+Ht+"|"+qt+")"),Ft=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp($t.source+"\\s*$"),/^$/,!1]],Jt=[["table",function(t,e,n,r){if(e+2>n)return!1;let o=e+1;if(t.sCount[o]=4)return!1;let i=t.bMarks[o]+t.tShift[o];if(i>=t.eMarks[o])return!1;const s=t.src.charCodeAt(i++);if(124!==s&&45!==s&&58!==s)return!1;if(i>=t.eMarks[o])return!1;const a=t.src.charCodeAt(i++);if(124!==a&&45!==a&&58!==a&&!Q(a))return!1;if(45===s&&Q(a))return!1;for(;i=4)return!1;c=Rt(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const u=c.length;if(0===u||u!==d.length)return!1;if(r)return!0;const h=t.parentType;t.parentType="table";const p=t.md.block.ruler.getRules("blockquote"),f=[e,0];t.push("table_open","table",1).map=f,t.push("thead_open","thead",1).map=[e,e+1],t.push("tr_open","tr",1).map=[e,e+1];for(let e=0;e=4)break;if(c=Rt(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=u-c.length,g>65536)break;o===e+2&&(t.push("tbody_open","tbody",1).map=m=[e+2,0]),t.push("tr_open","tr",1).map=[o,o+1];for(let e=0;e=4))break;r++,o=r}t.line=o;const i=t.push("code_block","code",0);return i.content=t.getLines(e,o,4+t.blkIndent,!1)+"\n",i.map=[e,t.line],!0}],["fence",function(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;if(o+3>i)return!1;const s=t.src.charCodeAt(o);if(126!==s&&96!==s)return!1;let a=o;o=t.skipChars(o,s);let l=o-a;if(l<3)return!1;const c=t.src.slice(a,o),d=t.src.slice(o,i);if(96===s&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let u=e,h=!1;for(;u++,!(u>=n||(o=a=t.bMarks[u]+t.tShift[u],i=t.eMarks[u],o=4||(o=t.skipChars(o,s),o-a=4)return!1;if(62!==t.src.charCodeAt(o))return!1;if(r)return!0;const a=[],l=[],c=[],d=[],u=t.md.block.ruler.getRules("blockquote"),h=t.parentType;t.parentType="blockquote";let p,f=!1;for(p=e;p=i)break;if(62===t.src.charCodeAt(o++)&&!e){let e,n,r=t.sCount[p]+1;32===t.src.charCodeAt(o)?(o++,r++,n=!1,e=!0):9===t.src.charCodeAt(o)?(e=!0,(t.bsCount[p]+r)%4==3?(o++,r++,n=!1):n=!0):e=!1;let s=r;for(a.push(t.bMarks[p]),t.bMarks[p]=o;o=i,l.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(e?1:0),c.push(t.sCount[p]),t.sCount[p]=s-r,d.push(t.tShift[p]),t.tShift[p]=o-t.bMarks[p];continue}if(f)break;let r=!1;for(let e=0,o=u.length;e";const b=[e,0];g.map=b,t.md.block.tokenize(t,e,p),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=s,t.parentType=h,b[1]=t.line;for(let n=0;n=4)return!1;let i=t.bMarks[e]+t.tShift[e];const s=t.src.charCodeAt(i++);if(42!==s&&45!==s&&95!==s)return!1;let a=1;for(;i=4)return!1;if(t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]=t.blkIndent&&(p=!0),(h=Pt(t,l))>=0){if(d=!0,s=t.bMarks[l]+t.tShift[l],u=Number(t.src.slice(s,h-1)),p&&1!==u)return!1}else{if(!((h=zt(t,l))>=0))return!1;d=!1}if(p&&t.skipSpaces(h)>=t.eMarks[l])return!1;if(r)return!0;const f=t.src.charCodeAt(h-1),m=t.tokens.length;d?(a=t.push("ordered_list_open","ol",1),1!==u&&(a.attrs=[["start",u]])):a=t.push("bullet_list_open","ul",1);const g=[l,0];a.map=g,a.markup=String.fromCharCode(f);let b=!1;const k=t.md.block.ruler.getRules("list"),v=t.parentType;for(t.parentType="list";l=o?1:r-e,p>4&&(p=1);const m=e+p;a=t.push("list_item_open","li",1),a.markup=String.fromCharCode(f);const g=[l,0];a.map=g,d&&(a.info=t.src.slice(s,h-1));const v=t.tight,y=t.tShift[l],w=t.sCount[l],x=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[l]=u-t.bMarks[l],t.sCount[l]=r,u>=o&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,l,n,!0),t.tight&&!b||(c=!1),b=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=x,t.tShift[l]=y,t.sCount[l]=w,t.tight=v,a=t.push("list_item_close","li",-1),a.markup=String.fromCharCode(f),l=t.line,g[1]=l,l>=n)break;if(t.sCount[l]=4)break;let C=!1;for(let e=0,r=k.length;e=4)return!1;if(91!==t.src.charCodeAt(o))return!1;function a(e){const n=t.lineMax;if(e>=n||t.isEmpty(e))return null;let r=!1;if(t.sCount[e]-t.blkIndent>3&&(r=!0),t.sCount[e]<0&&(r=!0),!r){const r=t.md.block.ruler.getRules("reference"),o=t.parentType;t.parentType="reference";let i=!1;for(let o=0,s=r.length;o=4)return!1;if(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(o))return!1;let s=t.src.slice(o,i),a=0;for(;a=4)return!1;let s=t.src.charCodeAt(o);if(35!==s||o>=i)return!1;let a=1;for(s=t.src.charCodeAt(++o);35===s&&o6||oo&&Q(t.src.charCodeAt(l-1))&&(i=l),t.line=e+1;const c=t.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[e,t.line];const d=t.push("inline","",0);return d.content=t.src.slice(o,i).trim(),d.map=[e,t.line],d.children=[],t.push("heading_close","h"+String(a),-1).markup="########".slice(0,a),!0},["paragraph","reference","blockquote"]],["lheading",function(t,e,n){const r=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const o=t.parentType;t.parentType="paragraph";let i,s=0,a=e+1;for(;a3)continue;if(t.sCount[a]>=t.blkIndent){let e=t.bMarks[a]+t.tShift[a];const n=t.eMarks[a];if(e=n))){s=61===i?1:2;break}}if(t.sCount[a]<0)continue;let e=!1;for(let o=0,i=r.length;o3)continue;if(t.sCount[i]<0)continue;let e=!1;for(let o=0,s=r.length;o=n))&&!(t.sCount[s]=i){t.line=n;break}const e=t.line;let l=!1;for(let i=0;i=t.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");t.tight=!a,t.isEmpty(t.line-1)&&(a=!0),s=t.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(o),r},Ut.prototype.scanDelims=function(t,e){const n=this.posMax,r=this.src.charCodeAt(t),o=t>0?this.src.charCodeAt(t-1):32;let i=t;for(;i?@[]^_`{|}~-".split("").forEach((function(t){Gt[t.charCodeAt(0)]=1}));const Kt={tokenize:function(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e)return!1;if(126!==r)return!1;const o=t.scanDelims(t.pos,!0);let i=o.length;const s=String.fromCharCode(r);if(i<2)return!1;let a;i%2&&(a=t.push("text","",0),a.content=s,i--);for(let e=0;e=0;n--){const r=e[n];if(95!==r.marker&&42!==r.marker)continue;if(-1===r.end)continue;const o=e[r.end],i=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,s=String.fromCharCode(r.marker),a=t.tokens[r.token];a.type=i?"strong_open":"em_open",a.tag=i?"strong":"em",a.nesting=1,a.markup=i?s+s:s,a.content="";const l=t.tokens[o.token];l.type=i?"strong_close":"em_close",l.tag=i?"strong":"em",l.nesting=-1,l.markup=i?s+s:s,l.content="",i&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--)}}const te={tokenize:function(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e)return!1;if(95!==r&&42!==r)return!1;const o=t.scanDelims(t.pos,42===r);for(let e=0;e\x00-\x20]*)$/,re=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,oe=/^&([a-z][a-z0-9]{1,31});/i;function ie(t){const e={},n=t.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;sa;l-=i[l]+1){const e=t[l];if(e.marker===n.marker&&e.open&&e.end<0){let r=!1;if((e.close||n.open)&&(e.length+n.length)%3==0&&(e.length%3==0&&n.length%3==0||(r=!0)),!r){const r=l>0&&!t[l-1].open?i[l-1]+1:0;i[s]=s-l+r,i[l]=r,n.open=!1,e.end=s,e.close=!1,c=-1,o=-2;break}}}-1!==c&&(e[n.marker][(n.open?3:0)+(n.length||0)%3]=c)}}const se=[["text",function(t,e){let n=t.pos;for(;n0)return!1;const n=t.pos;if(n+3>t.posMax)return!1;if(58!==t.src.charCodeAt(n))return!1;if(47!==t.src.charCodeAt(n+1))return!1;if(47!==t.src.charCodeAt(n+2))return!1;const r=t.pending.match(Wt);if(!r)return!1;const o=r[1],i=t.md.linkify.matchAtStart(t.src.slice(n-o.length));if(!i)return!1;let s=i.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const a=t.md.normalizeLink(s);if(!t.md.validateLink(a))return!1;if(!e){t.pending=t.pending.slice(0,-o.length);const e=t.push("link_open","a",1);e.attrs=[["href",a]],e.markup="linkify",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(s);const n=t.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return t.pos+=s.length-o.length,!0}],["newline",function(t,e){let n=t.pos;if(10!==t.src.charCodeAt(n))return!1;const r=t.pending.length-1,o=t.posMax;if(!e)if(r>=0&&32===t.pending.charCodeAt(r))if(r>=1&&32===t.pending.charCodeAt(r-1)){let e=r-1;for(;e>=1&&32===t.pending.charCodeAt(e-1);)e--;t.pending=t.pending.slice(0,e),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n=r)return!1;let o=t.src.charCodeAt(n);if(10===o){for(e||t.push("hardbreak","br",0),n++;n=55296&&o<=56319&&n+1=56320&&e<=57343&&(i+=t.src[n+1],n++)}const s="\\"+i;if(!e){const e=t.push("text_special","",0);o<256&&0!==Gt[o]?e.content=i:e.content=s,e.markup=s,e.info="escape"}return t.pos=n+1,!0}],["backticks",function(t,e){let n=t.pos;if(96!==t.src.charCodeAt(n))return!1;const r=n;n++;const o=t.posMax;for(;n=u)return!1;if(l=f,o=t.md.helpers.parseLinkDestination(t.src,f,t.posMax),o.ok){for(s=t.md.normalizeLink(o.str),t.md.validateLink(s)?f=o.pos:s="",l=f;f=u||41!==t.src.charCodeAt(f))&&(c=!0),f++}if(c){if(void 0===t.env.references)return!1;if(f=0?r=t.src.slice(l,f++):f=p+1):f=p+1,r||(r=t.src.slice(h,p)),i=t.env.references[et(r)],!i)return t.pos=d,!1;s=i.href,a=i.title}if(!e){t.pos=h,t.posMax=p;const e=[["href",s]];t.push("link_open","a",1).attrs=e,a&&e.push(["title",a]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=f,t.posMax=u,!0}],["image",function(t,e){let n,r,o,i,s,a,l,c,d="";const u=t.pos,h=t.posMax;if(33!==t.src.charCodeAt(t.pos))return!1;if(91!==t.src.charCodeAt(t.pos+1))return!1;const p=t.pos+2,f=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(f<0)return!1;if(i=f+1,i=h)return!1;for(c=i,a=t.md.helpers.parseLinkDestination(t.src,i,t.posMax),a.ok&&(d=t.md.normalizeLink(a.str),t.md.validateLink(d)?i=a.pos:d=""),c=i;i=h||41!==t.src.charCodeAt(i))return t.pos=u,!1;i++}else{if(void 0===t.env.references)return!1;if(i=0?o=t.src.slice(c,i++):i=f+1):i=f+1,o||(o=t.src.slice(p,f)),s=t.env.references[et(o)],!s)return t.pos=u,!1;d=s.href,l=s.title}if(!e){r=t.src.slice(p,f);const e=[];t.md.inline.parse(r,t.md,t.env,e);const n=t.push("image","img",0),o=[["src",d],["alt",""]];n.attrs=o,n.children=e,n.content=r,l&&o.push(["title",l])}return t.pos=i,t.posMax=h,!0}],["autolink",function(t,e){let n=t.pos;if(60!==t.src.charCodeAt(n))return!1;const r=t.pos,o=t.posMax;for(;;){if(++n>=o)return!1;const e=t.src.charCodeAt(n);if(60===e)return!1;if(62===e)break}const i=t.src.slice(r+1,n);if(ne.test(i)){const n=t.md.normalizeLink(i);if(!t.md.validateLink(n))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",n]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(i);const r=t.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return t.pos+=i.length+2,!0}if(ee.test(i)){const n=t.md.normalizeLink("mailto:"+i);if(!t.md.validateLink(n))return!1;if(!e){const e=t.push("link_open","a",1);e.attrs=[["href",n]],e.markup="autolink",e.info="auto",t.push("text","",0).content=t.md.normalizeLinkText(i);const r=t.push("link_close","a",-1);r.markup="autolink",r.info="auto"}return t.pos+=i.length+2,!0}return!1}],["html_inline",function(t,e){if(!t.md.options.html)return!1;const n=t.posMax,r=t.pos;if(60!==t.src.charCodeAt(r)||r+2>=n)return!1;const o=t.src.charCodeAt(r+1);if(33!==o&&63!==o&&47!==o&&!function(t){const e=32|t;return e>=97&&e<=122}(o))return!1;const i=t.src.slice(r).match(Bt);if(!i)return!1;if(!e){const e=t.push("html_inline","",0);e.content=i[0],s=e.content,/^\s]/i.test(s)&&t.linkLevel++,function(t){return/^<\/a\s*>/i.test(t)}(e.content)&&t.linkLevel--}var s;return t.pos+=i[0].length,!0}],["entity",function(t,e){const n=t.pos,r=t.posMax;if(38!==t.src.charCodeAt(n))return!1;if(n+1>=r)return!1;if(35===t.src.charCodeAt(n+1)){const r=t.src.slice(n).match(re);if(r){if(!e){const e="x"===r[1][0].toLowerCase()?parseInt(r[1].slice(1),16):parseInt(r[1],10),n=t.push("text_special","",0);n.content=P(e)?H(e):H(65533),n.markup=r[0],n.info="entity"}return t.pos+=r[0].length,!0}}else{const r=t.src.slice(n).match(oe);if(r){const n=T(r[0]);if(n!==r[0]){if(!e){const e=t.push("text_special","",0);e.content=n,e.markup=r[0],e.info="entity"}return t.pos+=r[0].length,!0}}}return!1}]],ae=[["balance_pairs",function(t){const e=t.tokens_meta,n=t.tokens_meta.length;ie(t.delimiters);for(let t=0;t0&&r++,"text"===o[e].type&&e+1=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;s||t.pos++,i[e]=t.pos},le.prototype.tokenize=function(t){const e=this.ruler.getRules(""),n=e.length,r=t.posMax,o=t.md.options.maxNesting;for(;t.pos=t.pos)throw new Error("inline rule didn't increment state.pos");break}if(s){if(t.pos>=r)break}else t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()},le.prototype.parse=function(t,e,n,r){const o=new this.State(t,e,n,r);this.tokenize(o);const i=this.ruler2.getRules(""),s=i.length;for(let t=0;t=0))try{e.hostname=ue.ZP.toASCII(e.hostname)}catch(t){}return d.encode(d.format(e))}function ke(t){const e=d.parse(t,!0);if(e.hostname&&(!e.protocol||ge.indexOf(e.protocol)>=0))try{e.hostname=ue.ZP.toUnicode(e.hostname)}catch(t){}return d.decode(d.format(e),d.decode.defaultChars+"%")}function ve(t,e){if(!(this instanceof ve))return new ve(t,e);e||N(t)||(e=t||{},t="default"),this.inline=new ce,this.block=new Zt,this.core=new Dt,this.renderer=new lt,this.linkify=new de.Z,this.validateLink=me,this.normalizeLink=be,this.normalizeLinkText=ke,this.utils=r,this.helpers=R({},o),this.options={},this.configure(t),e&&this.set(e)}ve.prototype.set=function(t){return R(this.options,t),this},ve.prototype.configure=function(t){const e=this;if(N(t)){const e=t;if(!(t=he[e]))throw new Error('Wrong `markdown-it` preset "'+e+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach((function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)})),this},ve.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.enable(t,!0))}),this),n=n.concat(this.inline.ruler2.enable(t,!0));const r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},ve.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach((function(e){n=n.concat(this[e].ruler.disable(t,!0))}),this),n=n.concat(this.inline.ruler2.disable(t,!0));const r=t.filter((function(t){return n.indexOf(t)<0}));if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},ve.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},ve.prototype.parse=function(t,e){if("string"!=typeof t)throw new Error("Input data should be a String");const n=new this.core.State(t,this,e);return this.core.process(n),n.tokens},ve.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},ve.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},ve.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const ye=ve;var we=n(82033);const xe=new s.V_({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:()=>["p",0]},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM:()=>["blockquote",0]},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM:()=>["div",["hr"]]},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM:t=>["h"+t.attrs.level,0]},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>({params:t.getAttribute("data-params")||""})}],toDOM:t=>["pre",t.attrs.params?{"data-params":t.attrs.params}:{},["code",0]]},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1,tight:t.hasAttribute("data-tight")})}],toDOM:t=>["ol",{start:1==t.attrs.order?null:t.attrs.order,"data-tight":t.attrs.tight?"true":null},0]},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>({tight:t.hasAttribute("data-tight")})}],toDOM:t=>["ul",{"data-tight":t.attrs.tight?"true":null},0]},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM:()=>["li",0]},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs:t=>({src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")})}],toDOM:t=>["img",t.attrs]},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM:()=>["br"]}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:t=>"em"==t.type.name}],toDOM:()=>["em"]},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!=t.style.fontWeight&&null},{style:"font-weight=400",clearMark:t=>"strong"==t.type.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM:()=>["strong"]},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:t=>({href:t.getAttribute("href"),title:t.getAttribute("title")})}],toDOM:t=>["a",t.attrs]},code:{parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}});class Ce{constructor(t,e){this.schema=t,this.tokenHandlers=e,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:s.vc.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let e,n=this.top(),r=n.content,o=r[r.length-1],i=this.schema.text(t,n.marks);o&&(e=function(t,e){if(t.isText&&e.isText&&s.vc.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}(o,i))?r[r.length-1]=e:r.push(i)}openMark(t){let e=this.top();e.marks=t.addToSet(e.marks)}closeMark(t){let e=this.top();e.marks=t.removeFromSet(e.marks)}parseTokens(t){for(let e=0;e{t.openNode(e,Ae(o,n,r,i)),t.addText(Se(n.content)),t.closeNode()}:(n[r+"_open"]=(t,n,r,i)=>t.openNode(e,Ae(o,n,r,i)),n[r+"_close"]=t=>t.closeNode())}else if(o.node){let e=t.nodeType(o.node);n[r]=(t,n,r,i)=>t.addNode(e,Ae(o,n,r,i))}else if(o.mark){let e=t.marks[o.mark];Me(o,r)?n[r]=(t,n,r,i)=>{t.openMark(e.create(Ae(o,n,r,i))),t.addText(Se(n.content)),t.closeMark(e)}:(n[r+"_open"]=(t,n,r,i)=>t.openMark(e.create(Ae(o,n,r,i))),n[r+"_close"]=t=>t.closeMark(e))}else{if(!o.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o));Me(o,r)?n[r]=_e:(n[r+"_open"]=_e,n[r+"_close"]=_e)}}return n.text=(t,e)=>t.addText(e.content),n.inline=(t,e)=>t.parseTokens(e.children),n.softbreak=n.softbreak||(t=>t.addText(" ")),n}(t,n)}parse(t,e={}){let n,r=new Ce(this.schema,this.tokenHandlers);r.parseTokens(this.tokenizer.parse(t,e));do{n=r.closeNode()}while(r.stack.length);return n||this.schema.topNodeType.createAndFill()}}(xe,we("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(t,e,n)=>({tight:Te(e,n)})},ordered_list:{block:"ordered_list",getAttrs:(t,e,n)=>({order:+t.attrGet("start")||1,tight:Te(e,n)})},heading:{block:"heading",getAttrs:t=>({level:+t.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:t=>({params:t.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:t=>({src:t.attrGet("src"),title:t.attrGet("title")||null,alt:t.children[0]&&t.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:t=>({href:t.attrGet("href"),title:t.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});const Ee=new class{constructor(t,e,n={}){this.nodes=t,this.marks=e,this.options=n}serialize(t,e={}){e=Object.assign({},this.options,e);let n=new De(this.nodes,this.marks,e);return n.renderContent(t),n.out}}({blockquote(t,e){t.wrapBlock("> ",null,e,(()=>t.renderContent(e)))},code_block(t,e){const n=e.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";t.write(r+(e.attrs.params||"")+"\n"),t.text(e.textContent,!1),t.write("\n"),t.write(r),t.closeBlock(e)},heading(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e),t.closeBlock(e)},horizontal_rule(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list(t,e){t.renderList(e," ",(()=>(e.attrs.bullet||"*")+" "))},ordered_list(t,e){let n=e.attrs.order||1,r=String(n+e.childCount-1).length,o=t.repeat(" ",r+2);t.renderList(e,o,(e=>{let o=String(n+e);return t.repeat(" ",r-o.length)+o+". "}))},list_item(t,e){t.renderContent(e)},paragraph(t,e){t.renderInline(e),t.closeBlock(e)},image(t,e){t.write("!["+t.esc(e.attrs.alt||"")+"]("+e.attrs.src.replace(/[\(\)]/g,"\\$&")+(e.attrs.title?' "'+e.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(t,e,n,r){for(let o=r+1;o(t.inAutolink=function(t,e,n){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;let r=e.child(n);return!(!r.isText||r.text!=t.attrs.href||r.marks[r.marks.length-1]!=t||n!=e.childCount-1&&t.isInSet(e.child(n+1).marks))}(e,n,r),t.inAutolink?"<":"["),close(t,e,n,r){let{inAutolink:o}=t;return t.inAutolink=void 0,o?">":"]("+e.attrs.href.replace(/[\(\)"]/g,"\\$&")+(e.attrs.title?` "${e.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open:(t,e,n,r)=>Oe(n.child(r),-1),close:(t,e,n,r)=>Oe(n.child(r-1),1),escape:!1}});function Oe(t,e){let n,r=/`+/g,o=0;if(t.isText)for(;n=r.exec(t.text);)o=Math.max(o,n[0].length);let i=o>0&&e>0?" `":"`";for(let t=0;t0&&e<0&&(i+=" "),i}class De{constructor(t,e,n){this.nodes=t,this.marks=e,this.options=n,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,void 0===this.options.tightLists&&(this.options.tightLists=!1),void 0===this.options.hardBreakNodeName&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+="\n"),t>1){let e=this.delim,n=/\s+$/.exec(e);n&&(e=e.slice(0,e.length-n[0].length));for(let n=1;nthis.render(e,t,r)))}renderInline(t){this.atBlockStart=!0;let e=[],n="",r=(r,o,i)=>{let s=r?r.marks:[];r&&r.type.name===this.options.hardBreakNodeName&&(s=s.filter((e=>{if(i+1==t.childCount)return!1;let n=t.child(i+1);return e.isInSet(n.marks)&&(!n.isText||/\S/.test(n.text))})));let a=n;if(n="",r&&r.isText&&s.some((t=>{let n=this.marks[t.type.name];return n&&n.expelEnclosingWhitespace&&!t.isInSet(e)}))){let[t,n,o]=/^(\s*)(.*)$/m.exec(r.text);n&&(a+=n,(r=o?r.withText(o):null)||(s=e))}if(r&&r.isText&&s.some((e=>{let n=this.marks[e.type.name];return n&&n.expelEnclosingWhitespace&&(i==t.childCount-1||!e.isInSet(t.child(i+1).marks))}))){let[t,o,i]=/^(.*?)(\s*)$/m.exec(r.text);i&&(n=i,(r=o?r.withText(o):null)||(s=e))}let l=s.length?s[s.length-1]:null,c=l&&!1===this.marks[l.type.name].escape,d=s.length-(c?1:0);t:for(let t=0;tr?s=s.slice(0,r).concat(n).concat(s.slice(r,t)).concat(s.slice(t+1,d)):r>t&&(s=s.slice(0,t).concat(s.slice(t+1,r)).concat(n).concat(s.slice(r,d)));continue t}}}let u=0;for(;u0&&(this.atBlockStart=!1)};t.forEach(r),r(null,0,t.childCount),this.atBlockStart=!1}renderList(t,e,n){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let r=void 0!==t.attrs.tight?t.attrs.tight:this.options.tightLists,o=this.inTightList;this.inTightList=r,t.forEach(((o,i,s)=>{s&&r&&this.flushClose(1),this.wrapBlock(e,n(s),t,(()=>this.render(o,t,s)))})),this.inTightList=o}esc(t,e=!1){return t=t.replace(/[`*\\~\[\]_]/g,((e,n)=>"_"==e&&n>0&&n+1]/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let e=-1==t.indexOf('"')?'""':-1==t.indexOf("'")?"''":"()";return e[0]+t+e[1]}repeat(t,e){let n="";for(let r=0;r({markdown:{serialize:Ee.marks.strong,parse:{}}})}),Le=i.Mark.create({name:"code"}).extend({addStorage:()=>({markdown:{serialize:Ee.marks.code,parse:{}}})});function Ie(t){const e=t.type.schema,n=e.text(" ",[t]),r=(0,i.getHTMLFromFragment)(s.HY.from(n),e).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}const Re=i.Mark.create({name:"markdownHTMLMark",addStorage:()=>({markdown:{serialize:{open(t,e){var n,r,o;return(null===(n=this.editor)||void 0===n?void 0:n.storage.markdown.options.html)?null!==(o=null===(r=Ie(e))||void 0===r?void 0:r[0])&&void 0!==o?o:"":(console.warn(`Tiptap Markdown: "${e.type.name}" mark is only available in html mode`),"")},close(t,e){var n,r,o;return(null===(n=this.editor)||void 0===n?void 0:n.storage.markdown.options.html)&&null!==(o=null===(r=Ie(e))||void 0===r?void 0:r[1])&&void 0!==o?o:""}},parse:{}}})}),ze=i.Mark.create({name:"italic"}).extend({addStorage:()=>({markdown:{serialize:Ee.marks.em,parse:{}}})}),Pe=i.Mark.create({name:"link"}).extend({addStorage:()=>({markdown:{serialize:Ee.marks.link,parse:{}}})}),He=i.Mark.create({name:"strike"}).extend({addStorage:()=>({markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}})}),qe=i.Node.create({name:"blockquote"}).extend({addStorage:()=>({markdown:{serialize:Ee.nodes.blockquote,parse:{}}})}),Be=i.Node.create({name:"bulletList"}).extend({addStorage:()=>({markdown:{serialize(t,e){return t.renderList(e," ",(()=>{var t;return`${(null===(t=this.editor)||void 0===t?void 0:t.storage.markdown.options.bulletListMarker)||"-"} `}))},parse:{}}})}),$e=i.Node.create({name:"codeBlock"}).extend({addStorage:()=>({markdown:{serialize(t,e){t.write(`\`\`\`${e.attrs.language||""}\n`),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},parse:{setup(t){var e,n;t.set({langPrefix:null!==(n=null===(e=this.options)||void 0===e?void 0:e.languageClassPrefix)&&void 0!==n?n:"language-"})},updateDOM(t){t.innerHTML=t.innerHTML.replace(/\n<\/code><\/pre>/g,"")}}}})}),Fe=i.Node.create({name:"markdownHTMLNode",addStorage:()=>({markdown:{serialize(t,e,n){this.editor.storage.markdown.options.html?t.write(function(t,e){const n=t.type.schema,r=(0,i.getHTMLFromFragment)(s.HY.from(t),n);return t.isBlock&&(e instanceof s.HY||e.type.name===n.topNodeType.name)?function(t){var e;const n=l(t).firstElementChild;return n&&(n.innerHTML=n.innerHTML.trim()?`\n${n.innerHTML}\n`:"\n"),null!==(e=null==n?void 0:n.outerHTML)&&void 0!==e?e:""}(r):r}(e,n)):(console.warn(`Tiptap Markdown: "${e.type.name}" node is only available in html mode`),t.write(`[${e.type.name}]`)),e.isBlock&&t.closeBlock(e)},parse:{}}})}),Je=i.Node.create({name:"hardBreak"}).extend({addStorage:()=>({markdown:{serialize(t,e,n,r){for(let o=r+1;o({markdown:{serialize:Ee.nodes.heading,parse:{}}})}),Ze=i.Node.create({name:"horizontalRule"}).extend({addStorage:()=>({markdown:{serialize:Ee.nodes.horizontal_rule,parse:{}}})}),Ue=i.Node.create({name:"image"}).extend({addStorage:()=>({markdown:{serialize:Ee.nodes.image,parse:{}}})}),Ve=i.Node.create({name:"listItem"}).extend({addStorage:()=>({markdown:{serialize:Ee.nodes.list_item,parse:{}}})}),Ye=i.Node.create({name:"orderedList"}).extend({addStorage:()=>({markdown:{serialize(t,e,n,r){const o=e.attrs.start||1,i=String(o+e.childCount-1).length,s=t.repeat(" ",i+2),a=function(t,e,n){let r=0;for(;n-r>0&&e.child(n-r-1).type.name===t.type.name;r++);return r}(e,n,r),l=a%2?") ":". ";t.renderList(e,s,(e=>{const n=String(o+e);return t.repeat(" ",i-n.length)+n+l}))},parse:{}}})}),We=i.Node.create({name:"paragraph"}).extend({addStorage:()=>({markdown:{serialize:Ee.nodes.paragraph,parse:{}}})});function Ge(t){var e,n;return null!==(n=null===(e=null==t?void 0:t.content)||void 0===e?void 0:e.content)&&void 0!==n?n:[]}const Qe=i.Node.create({name:"table"}).extend({addStorage:()=>({markdown:{serialize(t,e,n){!function(t){const e=Ge(t),n=e[0],r=e.slice(1);return!Ge(n).some((t=>"tableHeader"!==t.type.name||Ke(t)||t.childCount>1))&&!r.some((t=>Ge(t).some((t=>"tableHeader"===t.type.name||Ke(t)||t.childCount>1))))}(e)?Fe.storage.markdown.serialize.call(this,t,e,n):(t.inTable=!0,e.forEach(((e,n,r)=>{if(t.write("| "),e.forEach(((e,n,r)=>{r&&t.write(" | ");const o=e.firstChild;(null==o?void 0:o.textContent.trim())&&t.renderInline(o)})),t.write(" |"),t.ensureNewLine(),!r){const n=Array.from({length:e.childCount}).map((()=>"---")).join(" | ");t.write(`| ${n} |`),t.ensureNewLine()}})),t.closeBlock(e),t.inTable=!1)},parse:{}}})});function Ke(t){return t.attrs.colspan>1||t.attrs.rowspan>1}const Xe=i.Node.create({name:"taskItem"}).extend({addStorage:()=>({markdown:{serialize(t,e){const n=e.attrs.checked?"[x]":"[ ]";t.write(`${n} `),t.renderContent(e)},parse:{updateDOM(t){Array.from(t.querySelectorAll(".task-list-item")).forEach((t=>{const e=t.querySelector("input");t.setAttribute("data-type","taskItem"),e&&(t.setAttribute("data-checked",e.checked.toString()),e.remove())}))}}}})});let tn=!0,en=!1,nn=!1;function rn(t,e){e&&(tn=!e.enabled,en=!!e.label,nn=!!e.labelAfter),t.core.ruler.after("inline","github-task-lists",(t=>{const e=t.tokens;for(let n=2;n=0;r--)if(t[r].level===n)return r;return-1}function an(t,e){return"inline"===t[e].type&&"paragraph_open"===t[e-1].type&&"list_item_open"===t[e-2].type&&function(t){return t.content.startsWith("[ ] ")||t.content.startsWith("[x] ")||t.content.startsWith("[X] ")}(t[e])}function ln(t,e){var n,r,o,i,s;if(null===(n=t.children)||void 0===n||n.unshift(function(t,e){const n=new e("html_inline","",0),r=tn?' disabled="" ':"";return(null==t?void 0:t.content.startsWith("[ ] "))?n.content=``:((null==t?void 0:t.content.startsWith("[x] "))||(null==t?void 0:t.content.startsWith("[X] ")))&&(n.content=``),n}(t,e)),t.children&&(t.children[1].content=t.children[1].content.slice(3)),t.content&&(t.content=t.content.slice(3)),en)if(nn){null===(r=t.children)||void 0===r||r.pop();const n=`task-item-${Math.ceil(1e7*Math.random()-1e3)}`;t.children&&(t.children[0].content=`${t.children[0].content.slice(0,-1)} id="${n}">`),null===(o=t.children)||void 0===o||o.push(function(t,e,n){const r=new n("html_inline","",0);return r.content=``,r.attrs=[{for:e}],r}(t.content,n,e))}else null===(i=t.children)||void 0===i||i.unshift(function(t){const e=new t("html_inline","",0);return e.content="",e}(e))}const cn=i.Node.create({name:"taskList"}).extend({addStorage:()=>({markdown:{serialize:Be.storage.markdown.serialize,parse:{setup(t){t.use(rn)},updateDOM(t){Array.from(t.querySelectorAll(".contains-task-list")).forEach((t=>{t.setAttribute("data-type","taskList")}))}}}})}),dn=i.Node.create({name:"text"}).extend({addStorage:()=>({markdown:{serialize(t,e){t.text(function(t){var e;return null!==(e=null==t?void 0:t.replace(//g,">"))&&void 0!==e?e:""}(e.text))},parse:{}}})}),un=[qe,Be,$e,Je,je,Ze,Fe,Ue,Ve,Ye,We,Qe,Xe,cn,dn,Ne,Le,Re,ze,Pe,He];function hn(t){var e,n;const r=null===(e=t.storage)||void 0===e?void 0:e.markdown,o=null===(n=un.find((e=>e.name===t.name)))||void 0===n?void 0:n.storage.markdown;return r||o?Object.assign(Object.assign({},o),r):null}class pn{constructor(t,{html:e,linkify:n,breaks:r}){this.editor=t,this.md=this.withPatchedRenderer(ye({html:e,linkify:n,breaks:r}))}parse(t,{inline:e}={}){if("string"==typeof t){this.editor.extensionManager.extensions.forEach((t=>{var e,n,r;return null===(r=null===(n=null===(e=hn(t))||void 0===e?void 0:e.parse)||void 0===n?void 0:n.setup)||void 0===r?void 0:r.call({editor:this.editor,options:t.options},this.md)}));const n=l(this.md.render(t));return this.editor.extensionManager.extensions.forEach((t=>{var e,r,o;return null===(o=null===(r=null===(e=hn(t))||void 0===e?void 0:e.parse)||void 0===r?void 0:r.updateDOM)||void 0===o?void 0:o.call({editor:this.editor,options:t.options},n)})),this.normalizeDOM(n,{inline:e,content:t}),n.innerHTML}return t}normalizeDOM(t,{inline:e,content:n}){return this.normalizeBlocks(t),t.querySelectorAll("*").forEach((t=>{var e,n,r;(null===(e=t.nextSibling)||void 0===e?void 0:e.nodeType)!==Node.TEXT_NODE||t.closest("pre")||(t.nextSibling.textContent=null!==(r=null===(n=t.nextSibling.textContent)||void 0===n?void 0:n.replace(/^\n/,""))&&void 0!==r?r:"")})),e&&this.normalizeInline(t,n),t}normalizeBlocks(t){const e=Object.values(this.editor.schema.nodes).filter((t=>t.isBlock)),n=e.map((t=>{var e;return null===(e=t.spec.parseDOM)||void 0===e?void 0:e.map((t=>t.tag))})).flat().filter(Boolean).join(",");n&&Array.from(t.querySelectorAll(n)).forEach((t=>{var e;(null===(e=t.parentElement)||void 0===e?void 0:e.matches("p"))&&function(t){var e,n,r,o;const i=t.parentElement,s=null==i?void 0:i.cloneNode();for(;(null==i?void 0:i.firstChild)&&i.firstChild!==t;)null==s||s.appendChild(i.firstChild);(null!==(n=null===(e=null==s?void 0:s.childNodes)||void 0===e?void 0:e.length)&&void 0!==n?n:0)>0&&s&&(null===(r=null==i?void 0:i.parentElement)||void 0===r||r.insertBefore(s,i)),null===(o=null==i?void 0:i.parentElement)||void 0===o||o.insertBefore(t,i),0===(null==i?void 0:i.childNodes.length)&&i.remove()}(t)}))}normalizeInline(t,e){var n,r,o,i,s;if(null===(n=t.firstElementChild)||void 0===n?void 0:n.matches("p")){const n=t.firstElementChild,{nextElementSibling:a}=n,l=null!==(o=null===(r=e.match(/^\s+/))||void 0===r?void 0:r[0])&&void 0!==o?o:"",c=a?"":null!==(s=null===(i=e.match(/\s+$/))||void 0===i?void 0:i[0])&&void 0!==s?s:"";if(e.match(/^\n\n/))return void(n.innerHTML=`${n.innerHTML}${c}`);!function(t){const e=t.parentNode;for(;null==t?void 0:t.firstChild;)null==e||e.insertBefore(t.firstChild,t);null==e||e.removeChild(t)}(n),t.innerHTML=`${l}${t.innerHTML}${c}`}}withPatchedRenderer(t){const e=t=>(...e)=>{const n=null==t?void 0:t(...e);return"\n"===n?n:(null==n?void 0:n.endsWith("\n"))?n.slice(0,-1):null!=n?n:""};return t.renderer.rules.hardbreak=e(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=e(t.renderer.rules.softbreak),t.renderer.rules.fence=e(t.renderer.rules.fence),t.renderer.rules.code_block=e(t.renderer.rules.code_block),t.renderer.renderToken=e(t.renderer.renderToken.bind(t.renderer)),t}}const fn=ye();function mn(t,e){return fn.inline.State.prototype.scanDelims.call({src:t,posMax:t.length}),new fn.inline.State(t,null,null,[]).scanDelims(e,!0)}function gn(t,e,n,r){let o=t.slice(0,Math.max(0,n))+t.slice(Math.max(0,n+e.length));return o=o.slice(0,Math.max(0,n+r))+e+o.slice(Math.max(0,n+r)),o}class bn extends De{constructor(t,e,n){super(t,e,null!=n?n:{}),this.inTable=!1,this.inlines=[]}render(t,e,n){super.render(t,e,n);const r=this.inlines[this.inlines.length-1];if((null==r?void 0:r.start)&&(null==r?void 0:r.end)){const{delimiter:t,start:e,end:n}=this.normalizeInline(r);this.out=function(t,e,n,r){let o={text:t,from:n,to:r};return o=function(t,e,n,r){let o=n,i=t;for(;on&&!mn(i,o).can_close;)i=gn(i,e,o,-1),o--;return{text:i,from:n,to:o}}(o.text,e,o.from,o.to),o.to-o.from[t,this.serializeNode(Fe)])))),Object.fromEntries(null!==(t=this.editor.extensionManager.extensions.filter((t=>"node"===t.type&&this.serializeNode(t))).map((t=>[t.name,this.serializeNode(t)])))&&void 0!==t?t:[]))}get marks(){var t;return Object.assign(Object.assign({},Object.fromEntries(Object.keys(this.editor.schema.marks).map((t=>[t,this.serializeMark(Re)])))),Object.fromEntries(null!==(t=this.editor.extensionManager.extensions.filter((t=>"mark"===t.type&&this.serializeMark(t))).map((t=>[t.name,this.serializeMark(t)])))&&void 0!==t?t:[]))}serializeNode(t){var e,n;return null===(n=null===(e=hn(t))||void 0===e?void 0:e.serialize)||void 0===n?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var e;const n=null===(e=hn(t))||void 0===e?void 0:e.serialize;return n?Object.assign(Object.assign({},n),{open:"function"==typeof n.open?n.open.bind({editor:this.editor,options:t.options}):n.open,close:"function"==typeof n.close?n.close.bind({editor:this.editor,options:t.options}):n.close}):null}}const vn=i.Extension.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:t=>"true"===t.getAttribute("data-tight")||!t.querySelector("p"),renderHTML:t=>({class:t.tight?this.options.tightClass:null,"data-tight":t.tight?"true":null})}}}]},addCommands(){return{toggleTight:(t=null)=>({editor:e,commands:n})=>this.options.listTypes.some((r=>{if(!e.isActive(r))return!1;const o=e.getAttributes(r);return n.updateAttributes(r,{tight:null!=t?t:!(null==o?void 0:o.tight)})}))}}}),yn=i.Extension.create({name:"markdown",priority:50,addOptions:()=>({html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}),addCommands(){var t,e,n;const r=null===(n=null===(e=null===(t=null===i.extensions||void 0===i.extensions?void 0:i.extensions.Commands)||void 0===t?void 0:t.config)||void 0===e?void 0:e.addCommands)||void 0===n?void 0:n.call(e);return{setContent:(t,e,n)=>o=>{var i;return null===(i=null==r?void 0:r.setContent)||void 0===i?void 0:i.call(r,o.editor.storage.markdown.parser.parse(t),e,n)(o)},insertContentAt:(t,e,n)=>o=>{var i;return null===(i=null==r?void 0:r.insertContentAt)||void 0===i?void 0:i.call(r,t,o.editor.storage.markdown.parser.parse(e,{inline:!0}),n)(o)}}},onBeforeCreate(){this.editor.storage.markdown={options:Object.assign({},this.options),parser:new pn(this.editor,this.options),serializer:new kn(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage:()=>({}),addExtensions(){return[vn.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),c.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}})},39069:(t,e,n)=>{n.r(e),n.d(e,{TuiAudio:()=>s,TuiSource:()=>a,TuiVideo:()=>l});var r=n(69725),o=n(48178),i=n(11046);const s=i.Node.create({name:"audio",group:"block",content:"source+",addAttributes:()=>(0,o.x6)(r.pH),parseHTML:()=>[{tag:"audio"}],renderHTML:({node:t,HTMLAttributes:e})=>["audio",e,...(0,o.YX)(t)]}),a=i.Node.create({name:"source",addAttributes:()=>(0,o.x6)(["src","type","width","height","media","sizes","srcset"]),parseHTML:()=>[{tag:"source"}],renderHTML:({HTMLAttributes:t})=>["source",(0,i.mergeAttributes)(t)]}),l=i.Node.create({name:"video",group:"block",content:"source+",addAttributes:()=>(0,o.x6)(r.pH),parseHTML:()=>[{tag:"video"}],renderHTML:({node:t,HTMLAttributes:e})=>["video",e,...(0,o.YX)(t)]})},52807:(t,e,n)=>{n.r(e),n.d(e,{TuiMention:()=>o});var r=n(11046);const o=r.Node.create({name:"mention",group:"inline",inline:!0,selectable:!0,atom:!0,addOptions:()=>({HTMLAttributes:{},renderHTML({node:t}){var e;return["span",this.HTMLAttributes,`@${null!==(e=t.attrs.label)&&void 0!==e?e:t.attrs.id}`.replace(/@+/g,"@")]}}),addAttributes(){return{id:{default:null,keepOnSplit:!0,parseHTML:t=>t.innerText,renderHTML:()=>({"data-type":this.name})}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){var n;const o=this.options.renderHTML({options:this.options,node:t});return"string"==typeof o?["span",(0,r.mergeAttributes)({"data-type":this.name},this.options.HTMLAttributes,e),o]:["span",(0,r.mergeAttributes)({"data-type":this.name},this.options.HTMLAttributes,e),null===(n=o)||void 0===n?void 0:n[2]]}})},25923:(t,e,n)=>{n.r(e),n.d(e,{StarterKit:()=>M});var r=n(11046),o=n(65828),i=n(48144),s=n(35441),a=n(33977),l=n(30588),c=n(83374),d=n(20366),u=n(10988),h=n(46741),p=n(54424),f=n(74361),m=n(82136),g=n(46057),b=n(80452),k=n(54133),v=n(87660),y=n(27719);const w=/^\s*(\[([( |x])?\])\s$/,x=r.Node.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>"true"===t.getAttribute("data-checked"),renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");return i.contentEditable="false",a.type="checkbox",a.addEventListener("change",(e=>{if(!r.isEditable&&!this.options.onReadOnlyChecked)return void(a.checked=!a.checked);const{checked:o}=e.target;r.isEditable&&"function"==typeof n&&r.chain().focus(void 0,{scrollIntoView:!1}).command((({tr:t})=>{const e=n(),r=t.doc.nodeAt(e);return t.setNodeMarkup(e,void 0,{...null==r?void 0:r.attrs,checked:o}),!0})).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,o)||(a.checked=!a.checked))})),Object.entries(this.options.HTMLAttributes).forEach((([t,e])=>{o.setAttribute(t,e)})),o.dataset.checked=t.attrs.checked,t.attrs.checked&&a.setAttribute("checked","checked"),i.append(a,s),o.append(i,l),Object.entries(e).forEach((([t,e])=>{o.setAttribute(t,e)})),{dom:o,contentDOM:l,update:t=>t.type===this.type&&(o.dataset.checked=t.attrs.checked,t.attrs.checked?a.setAttribute("checked","checked"):a.removeAttribute("checked"),!0)}}},addInputRules(){return[(0,r.wrappingInputRule)({find:w,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),C=r.Node.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",(0,r.mergeAttributes)(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});var A=n(20239);const M=r.Extension.create({name:"starterKit",addExtensions(){const t=[],e=this.options;return!1!==(null==e?void 0:e.blockquote)&&t.push(o.V6.configure(null==e?void 0:e.blockquote)),!1!==(null==e?void 0:e.bold)&&t.push(i.d8.configure(null==e?void 0:e.bold)),!1!==(null==e?void 0:e.bulletList)&&t.push(s.DY.configure(null==e?void 0:e.bulletList)),!1!==(null==e?void 0:e.code)&&t.push(a.EK.configure(null==e?void 0:e.code)),!1!==(null==e?void 0:e.codeBlock)&&t.push(l.dn.configure(null==e?void 0:e.codeBlock)),!1!==(null==e?void 0:e.document)&&t.push(c.B.configure(null==e?void 0:e.document)),!1!==(null==e?void 0:e.dropcursor)&&t.push(d.m.configure(null==e?void 0:e.dropcursor)),!1!==(null==e?void 0:e.gapcursor)&&t.push(u.f.configure(null==e?void 0:e.gapcursor)),!1!==(null==e?void 0:e.hardBreak)&&t.push(h.U.configure(null==e?void 0:e.hardBreak)),!1!==(null==e?void 0:e.heading)&&t.push(p.Heading.configure(Object.assign({levels:[1,2,3,4,5,6]},null==e?void 0:e.heading)).extend({addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>Object.assign(Object.assign({},t||{}),{[`Mod-Alt-${e}`]:()=>null==this?void 0:this.editor.commands.toggleHeading({level:e})})),{})}})),!1!==(null==e?void 0:e.history)&&t.push(f.A.configure(Object.assign({depth:100,newGroupDelay:500},null==e?void 0:e.history))),!1!==(null==e?void 0:e.horizontalRule)&&t.push(m.b.configure(null==e?void 0:e.horizontalRule)),!1!==(null==e?void 0:e.italic)&&t.push(g.Tx.configure(null==e?void 0:e.italic)),!1!==(null==e?void 0:e.listItem)&&t.push(b.H.configure(null==e?void 0:e.listItem)),!1!==(null==e?void 0:e.taskList)&&t.push(C.configure(null==e?void 0:e.taskList)),!1!==(null==e?void 0:e.taskItem)&&t.push(x.configure(Object.assign({nested:!0},null==e?void 0:e.taskItem))),!1!==(null==e?void 0:e.orderedList)&&t.push(k.GS.configure(null==e?void 0:e.orderedList)),!1!==(null==e?void 0:e.paragraph)&&t.push(v.n.configure(null==e?void 0:e.paragraph)),!1!==(null==e?void 0:e.strike)&&t.push(y.Re.configure(null==e?void 0:e.strike)),!1!==(null==e?void 0:e.text)&&t.push(A.x.configure(null==e?void 0:e.text)),t}})},28227:(t,e,n)=>{n.r(e),n.d(e,{TableCellBackground:()=>r});const r=n(11046).Extension.create({addGlobalAttributes:()=>[{types:["tableCell","tableHeader"],attributes:{background:{default:null,renderHTML:({background:t})=>t?{style:`background: ${t}`}:null,parseHTML:({style:t})=>t.background,keepOnSplit:!1}}}],addCommands:()=>({setCellBackground:t=>({chain:e})=>e().updateAttributes("tableCell",{background:t}).updateAttributes("tableHeader",{background:t}).run(),unsetCellBackground:()=>({chain:t})=>t().updateAttributes("tableCell",{background:null}).updateAttributes("tableHeader",{background:null}).run()})})},90551:(t,e,n)=>{n.r(e),n.d(e,{TuiTable:()=>mt});var r,o,i=n(11046),s=n(62463),a=n(27439),l=n(43594),c=n(31690),d=n(38480);if("undefined"!=typeof WeakMap){let t=new WeakMap;r=e=>t.get(e),o=(e,n)=>(t.set(e,n),n)}else{const t=[],e=10;let n=0;r=e=>{for(let n=0;n(n==e&&(n=0),t[n++]=r,t[n++]=o)}var u=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;er&&(i+=o.attrs.colspan)}}for(let t=0;t1&&(n=!0)}-1==e?e=i:e!=i&&(e=Math.max(e,i))}return e}(t),n=t.childCount,r=[];let o=0,i=null;const s=[];for(let t=0,o=e*n;t=n){(i||(i=[])).push({type:"overlong_rowspan",pos:l,n:h-t});break}const c=o+t*e;for(let t=0;t0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function g(t){const e=t.selection.$head;for(let t=e.depth;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return!0;return!1}function b(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&"cell"==e.node.type.spec.tableRole)return e.$anchor;const n=m(e.$head)||function(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if("cell"==r||"header_cell"==r)return t.doc.resolve(n-e.nodeSize)}}(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function k(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function v(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function y(t,e,n){const r=t.node(-1),o=u.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return null==s?null:t.node(0).resolve(i+s)}function w(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some((t=>t>0))||(r.colwidth=null)),r}function x(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let t=0;tt!=e.pos-o));l.unshift(e.pos-o);const c=l.map((t=>{const e=n.nodeAt(t);if(!e)throw RangeError(`No cell with offset ${t} found`);const r=o+t+1;return new s.xm(a.resolve(r),a.resolve(r+e.content.size))}));super(c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=e}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(k(r)&&k(o)&&v(r,o)){const e=this.$anchorCell.node(-1)!=r.node(-1);return e&&this.isRowSelection()?t.rowSelection(r,o):e&&this.isColSelection()?t.colSelection(r,o):new t(r,o)}return s.Bs.between(r,o)}content(){const t=this.$anchorCell.node(-1),e=u.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},i=[];for(let n=r.top;n0||d>0){let t=l.attrs;if(c>0&&(t=w(t,0,c)),d>0&&(t=w(t,t.colspan-d,d)),a.leftr.bottom){const t={...l.attrs,rowspan:Math.min(a.bottom,r.bottom)-Math.max(a.top,r.top)};l=a.top0)return!1;const n=t+this.$anchorCell.nodeAfter.attrs.rowspan,r=e+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=u.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(i+o.map[s.left])),a.bottom0&&(n=l.resolve(i+o.map[a.left])),s.bottom0)return!1;const i=r+this.$anchorCell.nodeAfter.attrs.colspan,s=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(i,s)==e.width}eq(e){return e instanceof t&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=u.get(r),i=e.start(-1),s=o.findCell(e.pos-i),a=o.findCell(n.pos-i),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(i+o.map[s.top*o.width])),a.right0&&(n=l.resolve(i+o.map[a.top*o.width])),s.right{e.push(l.p.node(n,n+t.nodeSize,{class:"selectedCell"}))})),l.EH.create(t.doc,e)}var S=new s.H$("fix-tables");function _(t,e,n,r){const o=t.childCount,i=e.childCount;t:for(let s=0,a=0;s{"table"==e.type.spec.tableRole&&(n=function(t,e,n,r){const o=u.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let t=0;t0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;ne.width)for(let i=0,a=0;ie.height){const u=[];for(let t=0,r=(e.height-1)*e.width;t=e.width)&&n.nodeAt(e.map[r+t]).type==l.header_cell;u.push(o?d||(d=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,a.HY.from(u)),p=[];for(let t=e.height;t{if(!o)return!1;const i=n.selection;if(i instanceof C)return I(n,r,s.Y1.near(i.$headCell,e));if("horiz"!=t&&!i.empty)return!1;const a=$(o,t,e);if(null==a)return!1;if("horiz"==t)return I(n,r,s.Y1.near(n.doc.resolve(i.head+e),e));{const o=n.doc.resolve(a),i=y(o,t,e);let l;return l=i?s.Y1.near(i,1):e<0?s.Y1.near(n.doc.resolve(o.before(-1)),-1):s.Y1.near(n.doc.resolve(o.after(-1)),1),I(n,r,l)}}}function z(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof C)s=i;else{const r=$(o,t,e);if(null==r)return!1;s=new C(n.doc.resolve(r))}const a=y(s.$headCell,t,e);return!!a&&I(n,r,new C(s.$anchorCell,a))}}function P(t,e){const n=t.selection;if(!(n instanceof C))return!1;if(e){const r=t.tr,o=p(t.schema).cell.createAndFill().content;n.forEachCell(((t,e)=>{t.content.eq(o)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new a.p2(o,0,0))})),r.docChanged&&e(r)}return!0}function H(t,e){const n=m(t.state.doc.resolve(e));return!!n&&(t.dispatch(t.state.tr.setSelection(new C(n))),!0)}function q(t,e,n){if(!g(t.state))return!1;let r=function(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;1==e.childCount&&(n>0&&r>0||"table"==e.child(0).type.spec.tableRole);)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if("row"==i)for(let t=0;t=0;e--){const{rowspan:o,colspan:i}=r.child(e).attrs;for(let e=t;e=e.length&&e.push(a.HY.empty),n[o]r&&(a=a.type.createChecked(w(a.attrs,a.attrs.colspan,n+a.attrs.colspan-r),a.content)),s.push(a),n+=a.attrs.colspan;for(let n=1;no&&(e=e.type.create({...e.attrs,rowspan:Math.max(1,o-e.attrs.rowspan)},e.content)),s.push(e)}t.push(a.HY.from(s))}n=t,e=o}return{width:t,height:e,rows:n}}(r,s.right-s.left,s.bottom-s.top),N(t.state,t.dispatch,i,s,r),!0}if(r){const e=b(t.state),n=e.start(-1);return N(t.state,t.dispatch,n,u.get(e.node(-1)).findCell(e.pos-n),r),!0}return!1}function B(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=F(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof C)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&null!=(o=m(t.state.selection.$anchor))&&(null==(n=J(t,e))?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(e,n){let r=J(t,n);const o=null==f.getState(t.state);if(!r||!v(e,r)){if(!o)return;r=e}const i=new C(e,r);if(o||!t.state.selection.eq(i)){const n=t.state.tr.setSelection(i);o&&n.setMeta(f,e.pos),t.dispatch(n)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",a),null!=f.getState(t.state)&&t.dispatch(t.state.tr.setMeta(f,-1))}function a(n){const o=n,a=f.getState(t.state);let l;if(null!=a)l=t.state.doc.resolve(a);else if(F(t,o.target)!=r&&(l=J(t,e),!l))return s();l&&i(l,o)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",a)}function $(t,e,n){if(!(t.state.selection instanceof s.Bs))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=r.before(o),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?i:null}}return null}function F(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function J(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?m(t.state.doc.resolve(n.pos)):null}var j=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Z(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type==this.node.type&&(this.node=t,Z(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function Z(t,e,n,r,o,i){var s;let a=0,l=!0,c=e.firstChild;const d=t.firstChild;if(d){for(let t=0,n=0;t(o.spec.props.nodeViews[p(r.schema).table.name]=(t,r)=>new n(t,e,r),new Y(-1,!1)),apply:(t,e)=>e.apply(t)},props:{attributes:t=>{const e=U.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(e,n)=>{!function(t,e,n,r,o){const i=U.getState(t.state);if(i&&!i.dragging){const r=function(t){for(;t&&"TD"!=t.nodeName&&"TH"!=t.nodeName;)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}(e.target);let s=-1;if(r){const{left:o,right:i}=r.getBoundingClientRect();e.clientX-o<=n?s=W(t,e,"left",n):i-e.clientX<=n&&(s=W(t,e,"right",n))}if(s!=i.activeHandle){if(!o&&-1!==s){const e=t.state.doc.resolve(s),n=e.node(-1),r=u.get(n),o=e.start(-1);if(r.colCount(e.pos-o)+e.nodeAfter.attrs.colspan-1==r.width-1)return}Q(t,s)}}}(e,n,t,0,r)},mouseleave:t=>{!function(t){const e=U.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&Q(t,-1)}(t)},mousedown:(t,n)=>{!function(t,e,n){const r=U.getState(t.state);if(!r||-1==r.activeHandle||r.dragging)return!1;const o=t.state.doc.nodeAt(r.activeHandle),i=function(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,a=n;if(r)for(let t=0;t{const e=U.getState(t);if(e&&e.activeHandle>-1)return function(t,e){const n=[],r=t.doc.resolve(e),o=r.node(-1);if(!o)return l.EH.empty;const i=u.get(o),s=r.start(-1),a=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan;for(let t=0;t-1&&e.docChanged){let r=e.mapping.map(n.activeHandle,-1);return k(e.doc.resolve(r))||(r=-1),new t(r,n.dragging)}return n}};function W(t,e,n,r){const o="right"==n?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:s}=i,a=m(t.state.doc.resolve(s));if(!a)return-1;if("right"==n)return a.pos;const l=u.get(a.node(-1)),c=a.start(-1),d=l.map.indexOf(a.pos-c);return d%l.width==0?-1:c+l.map[d-1]}function G(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function Q(t,e){t.dispatch(t.state.tr.setMeta(U,{setHandle:e}))}function K(t){const e=t.selection,n=b(t),r=n.node(-1),o=n.start(-1),i=u.get(r);return{...e instanceof C?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function X(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;(function(t,e,n){const r=p(e.type.schema).header_cell;for(let o=0;o0&&o0&&e.map[a-1]==l||o0?-1:0;(function(t,e,n){var r;const o=p(e.type.schema).header_cell;for(let i=0;i0&&o0&&c==e.map[s-e.width]){const e=n.nodeAt(c).attrs;t.setNodeMarkup(t.mapping.slice(a).map(c+r),null,{...e,rowspan:e.rowspan-1}),i+=e.colspan-1}else if(o0&&n[i]==n[i-1]||r.right0&&n[o]==n[o-t]||r.bottomn[t.type.spec.tableRole],(t,e)=>{var n;const o=t.selection;let i,s;if(o instanceof C){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;i=o.$anchorCell.nodeAfter,s=o.$anchorCell.pos}else{if(i=function(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if("cell"===n||"header_cell"===n)return t.node(e)}return null}(o.$from),!i)return!1;s=null==(n=m(o.$from))?void 0:n.pos}if(null==i||null==s)return!1;if(1==i.attrs.colspan&&1==i.attrs.rowspan)return!1;if(e){let n=i.attrs;const a=[],l=n.colwidth;n.rowspan>1&&(n={...n,rowspan:1}),n.colspan>1&&(n={...n,colspan:1});const c=K(t),d=t.tr;for(let t=0;to.table.nodeAt(t)));for(let t=0;t{const e=t+o.tableStart,n=i.doc.nodeAt(e);n&&i.setNodeMarkup(e,d,n.attrs)})),n(i)}return!0}}at("row",{useDeprecatedLogic:!0}),at("column",{useDeprecatedLogic:!0});var lt=at("cell",{useDeprecatedLogic:!0});function ct(t){return function(e,n){if(!g(e))return!1;const r=function(t,e){if(e<0){const e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let e=t.index(-1)-1,n=t.before();e>=0;e--){const r=t.node(-1).child(e),o=r.lastChild;if(o)return n-1-o.nodeSize;n-=r.nodeSize}}else{if(t.index()null,apply(t,e){const n=t.getMeta(f);if(null!=n)return-1==n?null:n;if(null==e||!t.docChanged)return e;const{deleted:r,pos:o}=t.mapping.mapResult(e);return r?null:o}},props:{decorations:M,handleDOMEvents:{mousedown:B},createSelectionBetween:t=>null!=f.getState(t.state)?t.state.selection:null,handleTripleClick:H,handleKeyDown:L,handlePaste:q},appendTransaction:(e,n,r)=>function(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,a;if(r instanceof s.qv&&(a=r.node.type.spec.tableRole)){if("cell"==a||"header_cell"==a)i=C.create(o,r.from);else if("row"==a){const t=o.resolve(r.from+1);i=C.rowSelection(t,t)}else if(!n){const t=u.get(r.node),e=r.from+1,n=e+t.map[t.width*t.height-1];i=C.create(o,e+1,n)}}else r instanceof s.Bs&&function({$from:t,$to:e}){if(t.pos==e.pos||t.pos=0&&!(t.after(o+1)=0&&!(e.before(t+1)>e.start(t));t--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}(r)?i=s.Bs.create(o,r.from):r instanceof s.Bs&&function({$from:t,$to:e}){let n,r;for(let e=t.depth;e>0;e--){const r=t.node(e);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let t=e.depth;t>0;t--){const n=e.node(t);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===e.parentOffset}(r)&&(i=s.Bs.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}(r,T(r,n),t)})}function ut(t,e,n,r,o,i){let s=0,a=!0,l=e.firstChild;const c=t.firstChild;for(let t=0,n=0;t{const{selection:e}=t.state;if(!(e instanceof C))return!1;let n=0;const r=(0,i.findParentNodeClosestToPos)(e.ranges[0].$from,(t=>"table"===t.type.name));return null==r||r.node.descendants((t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(n+=1)})),n===e.ranges.length&&(t.commands.deleteTable(),!0)},mt=i.Node.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:ht,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:t}){return["table",(0,i.mergeAttributes)(this.options.HTMLAttributes,t),["tbody",0]]},addCommands:()=>({insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const a=function(t,e,n,r,o){const i=function(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach((n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)})),t.cached.tableNodeTypes=e,e}(t),s=[],a=[];for(let t=0;t({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(X(t.tr,n,n.left))}return!0}(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(X(t.tr,n,n.right))}return!0}(t,e),deleteColumn:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t),r=t.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let t=n.right-1;tt(r,n,t),t!=n.left;t--){const t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw RangeError("No table found");n.table=t,n.map=u.get(t)}e(r)}return!0}(t,e),addRowBefore:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(et(t.tr,n,n.top))}return!0}(t,e),addRowAfter:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t);e(et(t.tr,n,n.bottom))}return!0}(t,e),deleteRow:()=>({state:t,dispatch:e})=>function(t,e){if(!g(t))return!1;if(e){const n=K(t),r=t.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let t=n.bottom-1;nt(r,n,t),t!=n.top;t--){const t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw RangeError("No table found");n.table=t,n.map=u.get(n.table)}e(r)}return!0}(t,e),deleteTable:()=>({state:t,dispatch:e})=>function(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(t,e),mergeCells:()=>({state:t,dispatch:e})=>ot(t,e),splitCell:()=>({state:t,dispatch:e})=>it(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>at("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>at("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>lt(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>!!ot(t,e)||it(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>function(t,e){return function(n,r){if(!g(n))return!1;const o=b(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof C?n.selection.forEachCell(((n,r)=>{n.attrs[t]!==e&&i.setNodeMarkup(r,null,{...n.attrs,[t]:e})})):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>ct(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>ct(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&T(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const n=C.create(e.doc,t.anchorCell,t.headCell);e.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ft,"Mod-Backspace":ft,Delete:ft,"Mod-Delete":ft}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[V({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],dt({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:(0,i.callOrReturn)((0,i.getExtensionField)(t,"tableRole",e))}}}).extend({renderHTML({node:t,HTMLAttributes:e}){var n,r;let o=0,s=!0;try{const e=(null===(n=t.content)||void 0===n?void 0:n.content)[0];null===(r=null==e?void 0:e.content)||void 0===r||r.content.forEach((t=>{if(t.attrs.colwidth)t.attrs.colwidth.forEach((t=>{t?o+=t:(s=!1,o+=this.options.cellMinWidth)}));else{s=!1;const e=t.attrs.colspan||1;o+=this.options.cellMinWidth*e}}))}catch(t){s=!1}return e.style=s&&o>0?`width: ${o}px;`:o&&o>0?`min-width: ${o}px`:null,["div",{class:"tui-table-wrapper"},["table",(0,i.mergeAttributes)(this.options.HTMLAttributes,e),["tbody",0]]]}})},13704:(t,e,n)=>{n.d(e,{y:()=>l,d:()=>a});var r=n(12057),o=n(11046),i=n(74788);class s{constructor(t,e,n){const r=e.get(i.z2F),o=e.get(i._Vd).resolveComponentFactory(t);this.componentRef=o.create(e,[]),this.updateProps(n),r.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get el(){return this.componentRef.injector.get(i.SBq)}get dom(){return this.el.nativeElement}updateProps(t){Object.entries(t).forEach((([t,e])=>{this.instance[t]=e}))}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy()}}class a{}class l extends o.NodeView{constructor(t,e,n){super(t,e,n),this.contentDOMElement=null}mount(){const t=this.options.injector,e=t.get(r.K0),n={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(t={})=>this.updateAttributes(t),deleteNode:()=>this.deleteNode()};this.editor.on("selectionUpdate",this.handleSelectionUpdate.bind(this)),this.renderer=new s(this.component,t,n),this.extension.config.draggable&&(this.renderer.el.nativeElement.ondragstart=t=>{this.onDragStart(t)}),this.contentDOMElement=this.node.isLeaf?null:e.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges()),this.appendContendDom()}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}update(t,e){return this.options.update?this.options.update(t,e):t.type===this.node.type&&(t===this.node&&this.decorations===e||(this.node=t,this.decorations=e,this.renderer.updateProps({node:t,decorations:e}),this.appendContendDom()),!0)}handleSelectionUpdate(){const{from:t,to:e}=this.editor.state.selection;t<=this.getPos()&&e>=this.getPos()+this.node.nodeSize?this.selectNode():this.deselectNode()}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate.bind(this)),this.contentDOMElement=null}appendContendDom(){const t=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&t&&!t.contains(this.contentDOMElement)&&t.appendChild(this.contentDOMElement)}}},37195:(t,e,n)=>{n.d(e,{zc:()=>w.zc,dR:()=>w.dR,F1:()=>w.F1,nE:()=>g.nE,Xw:()=>v,Wf:()=>w.Wf,VE:()=>y.TUI_EDITOR_MAX_IMAGE_WIDTH,kB:()=>y.TUI_EDITOR_MIN_IMAGE_WIDTH,mJ:()=>w.mJ,bK:()=>w.bK,p7:()=>w.p7,H9:()=>r.H9,wl:()=>r.wl,aI:()=>i.a,BN:()=>h.BN,T_:()=>p,GK:()=>d,_2:()=>b._,Sz:()=>m,VM:()=>r.VM,$3:()=>h.$3,yB:()=>u.yB,sw:()=>g.sw,PD:()=>k,Uv:()=>w.Uv,Er:()=>x.Er});var r=n(83950),o=n(1884),i=(n(13099),n(8820)),s=n(12057),a=n(42600),l=n(43232),c=(n(76690),n(74788));let d=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({}),t})();var u=n(90712),h=n(5915);let p=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({imports:[[a.HOV,s.ez,u.yB,l.WUl,l.Jyu,o.Fu,a.Ah6,l.dpK,h.mJ,d]]}),t})();n(1566),n(57495),n(53058),n(21335),n(8274),n(69057);var f=n(45642);let m=(()=>{class t{}return t.ɵfac=function(e){return new(e||t)},t.ɵmod=c.oAB({type:t}),t.ɵinj=c.cJS({imports:[[s.ez,l.KWI,l.cnw,l.jhF,r.wl,a.Ah6,f.U5]]}),t})();n(30560);var g=n(69725),b=n(72023);n(44);const k=[Promise.resolve().then(n.bind(n,25923)).then((({StarterKit:t})=>t)).then((t=>t.configure({heading:{levels:[1,2,3,4,5,6]}}))),n.e(3336).then(n.bind(n,73336)).then((({default:t})=>t.configure({types:["heading","paragraph"]}))),Promise.resolve().then(n.bind(n,84402)).then((({default:t})=>t)),n.e(7991).then(n.bind(n,17991)).then((({default:t})=>t)),n.e(7147).then(n.bind(n,77147)).then((({default:t})=>t)),n.e(5034).then(n.bind(n,25034)).then((({default:t})=>t)),Promise.resolve().then(n.bind(n,30163)).then((({FontColor:t})=>t)),Promise.resolve().then(n.bind(n,44632)).then((({default:t})=>t.configure({inline:!0,allowBase64:!0}))),Promise.resolve().then(n.bind(n,48239)).then((({TuiLink:t})=>t)),n.e(6633).then(n.bind(n,96633)).then((({TuiJumpAnchor:t})=>t)),Promise.resolve().then(n.bind(n,58101)).then((({TuiFileLink:t})=>t)),Promise.resolve().then(n.bind(n,44)).then((({BackgroundColor:t})=>t)),Promise.resolve().then(n.bind(n,90551)).then((({TuiTable:t})=>t.configure({resizable:!0}))),n.e(5213).then(n.bind(n,45213)).then((({default:t})=>t)),n.e(1397).then(n.bind(n,71397)).then((({default:t})=>t)),n.e(8840).then(n.bind(n,38840)).then((({TableHeader:t})=>t)),Promise.resolve().then(n.bind(n,13575)).then((({TuiTabExtension:t})=>t)),Promise.resolve().then(n.bind(n,28227)).then((({TableCellBackground:t})=>t)),n.e(5681).then(n.bind(n,5681)).then((({TuiDetailsContent:t})=>t)),n.e(5681).then(n.bind(n,5681)).then((({TuiDetails:t})=>t)),n.e(5681).then(n.bind(n,5681)).then((({TuiSummary:t})=>t)),Promise.resolve().then(n.bind(n,1604)).then((({TuiFontSize:t})=>t))],v=k;n(58101),n(30163),n(1604),n(19818),n(33626);var y=n(89681),w=(n(13575),n(48239),n(52989),n(39069),n(52807),n(25923),n(90551),n(28227),n(40401)),x=n(48178)},87901:(t,e,n)=>{n.d(e,{i:()=>h});var r=n(12057),o=n(74788),i=n(42600),s=n(48178),a=n(29856),l=n(43190),c=n(88002),d=n(46782),u=n(39761);let h=(()=>{class t extends a.y{constructor(t,{nativeElement:e},n){const r=(0,i.mLY)(e,"mousedown").pipe((0,i.mp3)(),(0,l.w)((t=>{const r=(0,i.mLY)(n,"mousemove").pipe((0,c.U)((({clientX:t,clientY:n})=>(0,s.Ws)(t,n,e))),(0,d.R)((0,i.mLY)(n,"mouseup")));return t.target===e?r.pipe((0,u.O)((0,s.Ws)(t.clientX,t.clientY,e))):r})),(0,d.R)(t));super((t=>r.subscribe(t)))}}return t.ɵfac=function(e){return new(e||t)(o.LFG(i.a31,2),o.LFG(o.SBq),o.LFG(r.K0))},t.ɵprov=o.Yz7({token:t,factory:t.ɵfac}),t})()},40401:(t,e,n)=>{n.d(e,{Y1:()=>T,F4:()=>i,bG:()=>_,ZW:()=>S,zc:()=>m,dR:()=>f,Mr:()=>w,dj:()=>b,F1:()=>h,Wf:()=>o,UN:()=>x,b$:()=>y,mJ:()=>c,$i:()=>v,rf:()=>k,bK:()=>p,p7:()=>A,Uv:()=>d});var r=n(74788);const o=new r.OlP("[TUI_EDITOR_EXTENSIONS]"),i=new r.OlP("[LAZY_EDITOR_EXTENSIONS]");var s=n(42600),a=n(69725);const l={translate:"no",appearence:"textfield",spellcheck:!1,enableDefaultStyles:!0,colors:a.sw,blankColor:a.hK,linkOptions:a.pL,fontOptions:a.RR,icons:{undo:"tuiIconUndoLarge",redo:"tuiIconRedoLarge",quote:"tuiIconQuoteLarge",link:"tuiIconLinkLarge",anchor:"tuiIconAnchorLarge",attach:"tuiIconPaperclipLarge",sub:"tuiIconSubscriptLarge",sup:"tuiIconSuperscriptLarge",tex:"tuiIconTeXLarge",image:"tuiIconImageLarge",hr:"tuiIconHrLarge",clear:"tuiIconClearFormatLarge",groupAdd:"tuiIconPlusLarge",groupRemove:"tuiIconCloseLarge",detailsAdd:"tuiIconSpoilerLarge",detailsRemove:"tuiIconSpoilerDeleteLarge",popupLinkSave:"tuiIconCheckCircleLarge",popupLinkRemove:"tuiIconCloseLarge",popupPreviewLinkEdit:"tuiIconEdit2Large",popupPreviewLinkClear:"tuiIconUnlinkLarge",paint:"tuiIconPaintLarge",textAlignPreview:"tuiIconAlignLeftLarge",textAlignLeft:"tuiIconAlignLeftLarge",textAlignCenter:"tuiIconAlignCenterLarge",textAlignRight:"tuiIconAlignRightLarge",textAlignJustify:"tuiIconAlignJustifyLarge",textColor:"tuiIconColorLarge",textHilite:"tuiIconHiliteLarge",listPreview:"tuiIconListLarge",listUnOrdered:"tuiIconListLarge",listOrdered:"tuiIconOLLarge",taskList:"tuiIconCheckSquare",indent:"tuiIconIndentLarge",outdent:"tuiIconOutdentLarge",fontSize:"tuiIconFontLarge",insertTable:"tuiIconTableLarge",addRowTable:"tuiIconAddRowLarge",code:"tuiIconCodeLarge",fontStylePreview:"tuiIconFormatLarge",fontStyleBold:"tuiIconBoldLarge",fontStyleItalic:"tuiIconItalicLarge",fontStyleUnderline:"tuiIconUnderlineLarge",fontStyleStrike:"tuiIconStrikeThroughLarge",colorSelectorDropdownChevron:"tuiIconChevronDown",colorSelectorDropdownCheck:"tuiIconCheck"}},c=(0,s.jHx)(l);function d(t){return(0,s.vKU)(c,t,l)}var u=n(54487);const h=new r.OlP("[TUI_EDITOR_CONTENT_PROCESSOR]",{factory:()=>u.y}),p=new r.OlP("[TUI_EDITOR_VALUE_TRANSFORMER]"),f=new r.OlP("[TUI_ATTACH_FILES_OPTIONS]",{factory:()=>({accept:"*/*",multiple:!0})}),m=new r.OlP("[TUI_ATTACH_FILES_LOADER]");var g=n(19633);const b=new r.OlP("[TUI_EDITOR_COLOR_SELECTOR_MODE_NAMES]",{factory:()=>["Solid color","Gradient"]}),k=new r.OlP("[TUI_EDITOR_TOOLBAR_TEXTS]",{factory:(0,g.vv)("toolbarTools")}),v=new r.OlP("[TUI_EDITOR_TABLE_COMMANDS]",{factory:(0,g.vv)("editorTableCommands")}),y=new r.OlP("[TUI_EDITOR_LINK_TEXTS]",{factory:(0,g.vv)("editorEditLink")}),w=new r.OlP("[TUI_EDITOR_CODE_OPTIONS]",{factory:(0,g.vv)("editorCodeOptions")}),x=new r.OlP("[TUI_EDITOR_FONT_OPTIONS]",{factory:(0,g.vv)("editorFontOptions")});var C=n(88002);const A=new r.OlP("[TUI_IMAGE_LOADER]",{factory:()=>t=>{const e=new FileReader;return e.readAsDataURL(t),(0,s.mLY)(e,"load").pipe((0,C.U)((()=>String(e.result))))}});var M=n(74235);const S=new r.OlP("[TIPTAP_EDITOR]"),_=new r.OlP("[LAZY_TIPTAP_EDITOR]",{factory:()=>{const t=new M.t(1);return Promise.resolve().then(n.bind(n,11046)).then((e=>t.next(e.Editor))),t}}),T=new r.OlP("[INITIALIZATION_TIPTAP_CONTAINER]")},48178:(t,e,n)=>{function r(t,e,n){const r=t.selection.$anchor;for(let o=r.depth;o>0;o--)if(r.node(o).type.name===n)return e&&e(t.tr.delete(r.before(o),r.after(o)).scrollIntoView()),!0;return!1}n.d(e,{yU:()=>r,Ws:()=>i,U5:()=>s,Yz:()=>l,YX:()=>d,Ap:()=>h,Q4:()=>p,nC:()=>C,Er:()=>b,_N:()=>y,x6:()=>w,jx:()=>x,CH:()=>A});var o=n(42600);function i(t,e,n){const{left:r,top:i,width:s,height:a}=n.getBoundingClientRect();return[(0,o.Kiv)(t-r,0,s)/s,(0,o.Kiv)(e-i,0,a)/a]}function s(t){return t.slice(0,Math.max(0,t.length-1)).replace("linear-gradient(","")}function a(t,e,n={}){return t.find((({attrs:t,type:r})=>r===e&&function(t,e){const n=Object.keys(e);return!n.length||!!n.filter((n=>e[n]===t[n])).length}(t,n)))||null}function l(t,e,n={}){if(!t||!e)return null;const{node:r,offset:o}=t.parent.childAfter(t.parentOffset);if(!r)return null;const i=a(r.marks,e,n);if(!i)return null;let s=t.index(),l=t.start()+o,c=s+1,d=l+r.nodeSize;for(a(r.marks,e,n);s>0&&i.isInSet(t.parent.child(s-1).marks);)s-=1,l-=t.parent.child(s).nodeSize;for(;c{t instanceof c.NB&&e.push([t.type.name,t.attrs])})),e}var u=n(11046);function h(t,e){const n=null!=e?e:t.selection.$head.parent.textContent,r=t.doc.cut(t.selection.from,t.selection.to);return r.content.size?(0,u.getHTMLFromFragment)(r.content,t.schema):n}function p(t){var e,n,r;if(!t)return{before:"",after:""};const{$from:o,$to:i}=t.state.selection;let s=null===(e=o.nodeBefore)||void 0===e?void 0:e.textContent;return s=((null==s?void 0:s.slice((null!==(n=(null==s?void 0:s.lastIndexOf(" "))||(null==s?void 0:s.lastIndexOf("\n")))&&void 0!==n?n:0)+1))||"").trim(),{before:s,after:(null===(r=i.nodeAfter)||void 0===r?void 0:r.textContent.trim())||""}}function f(t){Array.from(t.children).forEach((t=>{if(t.children.length&&f(t),"FONT"===t.tagName)if(t.hasAttribute("size"))switch(t.getAttribute("size")){case"6":m("h1",t);break;case"5":m("h2",t);break;case"4":g("17px",t);break;case"3":g("15px",t);break;case"2":g("13px",t)}else t.hasAttribute("color")&&function(t){var e;const n=document.createElement("span");n.setAttribute("style",`color: ${t.getAttribute("color")}`),n.innerHTML=t.innerHTML,null===(e=t.parentElement)||void 0===e||e.replaceChild(n,t)}(t)}))}function m(t,e){var n,r,o,i,s,a,l,c,d;const u=document.createElement(t);if(u.innerHTML=e.innerHTML,"P"===(null===(n=e.parentElement)||void 0===n?void 0:n.tagName)){const t=null===(o=null===(r=e.parentElement)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.insertBefore(u,e.parentElement);null===(i=e.parentElement)||void 0===i||i.removeChild(e),(null==t?void 0:t.nextSibling)&&!(null===(a=null===(s=null==t?void 0:t.nextSibling)||void 0===s?void 0:s.textContent)||void 0===a?void 0:a.trim())&&(null===(c=null===(l=t.nextSibling)||void 0===l?void 0:l.parentElement)||void 0===c||c.removeChild(t.nextSibling))}else null===(d=e.parentElement)||void 0===d||d.replaceChild(u,e)}function g(t,e){var n;const r=document.createElement("p"),o=document.createElement("span");o.setAttribute("style",`font-size: ${t}`),o.innerHTML=e.innerHTML,r.append(o),null===(n=e.parentElement)||void 0===n||n.replaceChild("P"===e.parentElement.tagName?o:r,e)}function b(t){const e=(new DOMParser).parseFromString(t,"text/html");return f(e.body),e.body.innerHTML}const k=["\\s*(","(?:","#(?:[a-f0-9]{6}|[a-f0-9]{3})","|","(?:rgb|hsl)","\\(\\s*(?:\\d{1,3}\\s*,\\s*){2}\\d{1,3}\\s*\\)","|","(?:rgba|hsla)","\\(\\s*(?:\\d{1,3}\\s*,\\s*){2}\\d{1,3}\\s*,\\s*\\d*\\.?\\d+\\)","|","[_a-z-][_a-z0-9-]*",")",")","(?:\\s+","(","(?:[+-]?\\d*\\.?\\d+)(?:%|[a-z]+)?","))?","(?:","\\s*,\\s*","\\s*)?"];function v(t,e){const n=1===e?"100%":`${e}%`;return(null==t?void 0:t.includes("%"))?t:n}function y(t){const e=new RegExp(k.join(""),"gi"),n=t.startsWith("to")||t.match(/^\d/)?t.slice(Math.max(0,t.indexOf(",")+1)).trim():t,r=t.startsWith("to")?t.split(",")[0]:"to bottom";let o=[],i=e.exec(n);for(;null!==i;)o=o.concat({color:i[1],position:v(i[2],o.length)}),i=e.exec(n);return o=o.filter((({color:t})=>t.startsWith("#")||t.startsWith("rgb"))),{stops:o,side:r}}function w(t){return t.reduce(((t,e)=>(t[e]={parseHTML:t=>null==t?void 0:t.getAttribute(`${e}`)},t)),{})}function x(t){return t.split(";").reduce(((t,e)=>{var n;const[r,o]=null!==(n=e.split(":"))&&void 0!==n?n:[];return r&&o&&(t[r.trim()]=o.trim()),t}),{})}function C(t){var e;const n=(null===(e=t.endContainer.nodeValue)||void 0===e?void 0:e.length)||0;return t.endOffset-t.startOffset>0||t.endOffset-t.startOffset==0&&1===n||0!==t.startOffset&&n>1&&t.endOffset!==n}function A({stops:t,side:e}){return`linear-gradient(${e}, ${t.map((({color:t,position:e})=>`rgba(${(0,o.MpC)(t).join(", ")}) ${e}`)).join(", ")})`}},11046:(t,e,n)=>{n.r(e),n.d(e,{CommandManager:()=>N,Editor:()=>ge,Extension:()=>ct,InputRule:()=>Q,Mark:()=>xe,Node:()=>Ce,NodeView:()=>Ae,PasteRule:()=>nt,Tracker:()=>Oe,callOrReturn:()=>$,combineTransactionSteps:()=>Dt,createChainableState:()=>D,createDocument:()=>Et,createNodeFromContent:()=>Ct,createStyleTag:()=>me,defaultBlockAt:()=>Nt,deleteProps:()=>Tt,elementFromString:()=>xt,escapeForRegEx:()=>Se,extensions:()=>fe,findChildren:()=>Lt,findChildrenInRange:()=>It,findDuplicates:()=>it,findParentNode:()=>zt,findParentNodeClosestToPos:()=>Rt,fromString:()=>J,generateHTML:()=>qt,generateJSON:()=>Bt,generateText:()=>Ft,getAttributes:()=>jt,getAttributesFromExtensions:()=>z,getChangedRanges:()=>Ut,getDebugJSON:()=>Vt,getExtensionField:()=>I,getHTMLFromFragment:()=>Pt,getMarkAttributes:()=>Ot,getMarkRange:()=>gt,getMarkType:()=>bt,getMarksBetween:()=>Yt,getNodeAtPosition:()=>Wt,getNodeAttributes:()=>Jt,getNodeType:()=>P,getRenderedAttributes:()=>q,getSchema:()=>Ht,getSchemaByResolvedExtensions:()=>U,getSchemaTypeByName:()=>V,getSchemaTypeNameByName:()=>_t,getSplittedAttributes:()=>Gt,getText:()=>$t,getTextBetween:()=>dt,getTextContentFromNodes:()=>W,getTextSerializersFromSchema:()=>ut,injectExtensionAttributesToParseRule:()=>j,inputRulesPlugin:()=>tt,isActive:()=>Kt,isAtEndOfNode:()=>Xt,isAtStartOfNode:()=>te,isEmptyObject:()=>F,isExtensionRulesEnabled:()=>Y,isFunction:()=>B,isList:()=>ee,isMacOS:()=>Mt,isMarkActive:()=>Qt,isNodeActive:()=>St,isNodeEmpty:()=>ne,isNodeSelection:()=>re,isNumber:()=>et,isPlainObject:()=>at,isRegExp:()=>G,isString:()=>_e,isTextSelection:()=>kt,isiOS:()=>wt,markInputRule:()=>be,markPasteRule:()=>Me,mergeAttributes:()=>H,mergeDeep:()=>lt,minMax:()=>vt,nodeInputRule:()=>ke,nodePasteRule:()=>Te,objectIncludes:()=>pt,pasteRulesPlugin:()=>ot,posToDOMRect:()=>oe,removeDuplicates:()=>Zt,resolveFocusPosition:()=>yt,selectionToInsertionEnd:()=>At,splitExtensions:()=>R,textInputRule:()=>ye,textPasteRule:()=>Ee,textblockTypeInputRule:()=>ve,wrappingInputRule:()=>we});var r=n(62463),o=n(43594),i=n(31690),s=n(27439),a=n(38480);const l=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0),c=(t,e,n)=>{let o=function(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}(t,n);if(!o)return!1;let i=h(o);if(!i){let n=o.blockRange(),r=n&&(0,a.k9)(n);return null!=r&&(e&&e(t.tr.lift(n,r).scrollIntoView()),!0)}let l=i.nodeBefore;if(!l.type.spec.isolating&&w(t,i,e))return!0;if(0==o.parent.content.size&&(d(l,"end")||r.qv.isSelectable(l))){let n=(0,a.dR)(t.doc,o.before(),o.after(),s.p2.empty);if(n&&n.slice.size{let{$head:o,empty:i}=t.selection,s=o;if(!i)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):o.parentOffset>0)return!1;s=h(o)}let a=s&&s.nodeBefore;return!(!a||!r.qv.isSelectable(a)||(e&&e(t.tr.setSelection(r.qv.create(t.doc,s.pos-a.nodeSize)).scrollIntoView()),0))};function h(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}const p=(t,e,n)=>{let o=function(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset{let{$head:o,empty:i}=t.selection,s=o;if(!i)return!1;if(o.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):o.parentOffset=0;e--){let n=t.node(e);if(t.index(e)+1{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(e&&e(t.tr.insertText("\n").scrollIntoView()),0))};function b(t){for(let e=0;e{let{$head:n,$anchor:o}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(o))return!1;let i=n.node(-1),s=n.indexAfter(-1),a=b(i.contentMatchAt(s));if(!a||!i.canReplaceWith(s,s,a))return!1;if(e){let o=n.after(),i=t.tr.replaceWith(o,o,a.createAndFill());i.setSelection(r.Y1.near(i.doc.resolve(o),1)),e(i.scrollIntoView())}return!0},v=(t,e)=>{let n=t.selection,{$from:o,$to:i}=n;if(n instanceof r.C1||o.parent.inlineContent||i.parent.inlineContent)return!1;let s=b(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let n=(!o.parentOffset&&i.index(){let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if((0,a.Ax)(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&(0,a.k9)(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function w(t,e,n){let o,i,l=e.nodeBefore,c=e.nodeAfter;if(l.type.spec.isolating||c.type.spec.isolating)return!1;if(function(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(i,i+1)||!o.isTextblock&&!(0,a.Mn)(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let u=e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(i=l.contentMatchAt(l.childCount)).findWrapping(c.type))&&i.matchType(o[0]||c.type).validEnd){if(n){let r=e.pos+c.nodeSize,i=s.HY.empty;for(let t=o.length-1;t>=0;t--)i=s.HY.from(o[t].create(null,i));i=s.HY.from(l.copy(i));let d=t.tr.step(new a.FC(e.pos-1,r,e.pos,r,new s.p2(i,1,0),o.length,!0)),u=r+2*o.length;(0,a.Mn)(d.doc,u)&&d.join(u),n(d.scrollIntoView())}return!0}let h=r.Y1.findFrom(e,1),p=h&&h.$from.blockRange(h.$to),f=p&&(0,a.k9)(p);if(null!=f&&f>=e.depth)return n&&n(t.tr.lift(p,f).scrollIntoView()),!0;if(u&&d(c,"start",!0)&&d(l,"end")){let r=l,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let i=c,d=1;for(;!i.isTextblock;i=i.firstChild)d++;if(r.canReplace(r.childCount,r.childCount,i.content)){if(n){let r=s.HY.empty;for(let t=o.length-1;t>=0;t--)r=s.HY.from(o[t].copy(r));n(t.tr.step(new a.FC(e.pos-o.length,e.pos+c.nodeSize,e.pos+d,e.pos+c.nodeSize-d,new s.p2(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function x(t){return function(e,n){let o=e.selection,i=t<0?o.$from:o.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(n&&n(e.tr.setSelection(r.Bs.create(e.doc,t<0?i.start(s):i.end(s)))),!0)}}const C=x(-1),A=x(1);function M(t,e=null){return function(n,r){let o=!1;for(let r=0;r{if(o)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)o=!0;else{let e=n.doc.resolve(i),r=e.index();o=e.parent.canReplaceWith(r,r+1,t)}}))}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r{let{$from:n,$to:o}=t.selection;if(t.selection instanceof r.qv&&t.selection.node.isBlock)return!(!n.parentOffset||!(0,a.Ax)(t.doc,n.pos)||(e&&e(t.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(e){let i=o.parentOffset==o.parent.content.size,s=t.tr;(t.selection instanceof r.Bs||t.selection instanceof r.C1)&&s.deleteSelection();let l=0==n.depth?null:b(n.node(-1).contentMatchAt(n.indexAfter(-1))),c=i&&l?[{type:l}]:void 0,d=(0,a.Ax)(s.doc,s.mapping.map(n.pos),1,c);if(c||d||!(0,a.Ax)(s.doc,s.mapping.map(n.pos),1,l?[{type:l}]:void 0)||(l&&(c=[{type:l}]),d=!0),d&&(s.split(s.mapping.map(n.pos),1,c),!i&&!n.parentOffset&&n.parent.type!=l)){let t=s.mapping.map(n.before()),e=s.doc.resolve(t);l&&n.node(-1).canReplaceWith(e.index(),e.index()+1,l)&&s.setNodeMarkup(s.mapping.map(n.before()),l)}e(s.scrollIntoView())}return!0})),"Mod-Enter":k,Backspace:_,"Mod-Backspace":_,"Shift-Backspace":_,Delete:T,"Mod-Delete":T,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new r.C1(t.doc))),!0)},O={"Ctrl-h":E.Backspace,"Alt-Backspace":E["Mod-Backspace"],"Ctrl-d":E.Delete,"Ctrl-Alt-Backspace":E["Mod-Delete"],"Alt-Delete":E["Mod-Delete"],"Alt-d":E["Mod-Delete"],"Ctrl-a":C,"Ctrl-e":A};for(let t in E)O[t]=E[t];function D(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class N{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map((([t,e])=>[t,(...t)=>{const n=e(...t)(i);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!t,l=t||o.tr,c={...Object.fromEntries(Object.entries(n).map((([t,n])=>[t,(...t)=>{const r=this.buildProps(l,e),o=n(...t)(r);return s.push(o),c}]))),run:()=>(a||!e||l.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(l),s.every((t=>!0===t)))};return c}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map((([t,e])=>[t,(...t)=>e(...t)({...i,dispatch:void 0})]))),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:D({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map((([t,e])=>[t,(...t)=>e(...t)(s)])))}};return s}}class L{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach((t=>t.apply(this,e))),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter((t=>t!==e)):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function I(t,e,n){return void 0===t.config[e]&&t.parent?I(t.parent,e,n):"function"==typeof t.config[e]?t.config[e].bind({...n,parent:t.parent?I(t.parent,e,n):null}):t.config[e]}function R(t){return{baseExtensions:t.filter((t=>"extension"===t.type)),nodeExtensions:t.filter((t=>"node"===t.type)),markExtensions:t.filter((t=>"mark"===t.type))}}function z(t){const e=[],{nodeExtensions:n,markExtensions:r}=R(t),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach((t=>{const n=I(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage});n&&n().forEach((t=>{t.types.forEach((n=>{Object.entries(t.attributes).forEach((([t,r])=>{e.push({type:n,name:t,attribute:{...i,...r}})}))}))}))})),o.forEach((t=>{const n={name:t.name,options:t.options,storage:t.storage},r=I(t,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...i,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&void 0===(null==o?void 0:o.default)&&delete o.default,e.push({type:t.name,name:n,attribute:o})}))})),e}function P(t,e){if("string"==typeof t){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}function H(...t){return t.filter((t=>!!t)).reduce(((t,e)=>{const n={...t};return Object.entries(e).forEach((([t,e])=>{if(n[t])if("class"===t){const r=e?e.split(" "):[],o=n[t]?n[t].split(" "):[],i=r.filter((t=>!o.includes(t)));n[t]=[...o,...i].join(" ")}else n[t]="style"===t?[n[t],e].join("; "):e;else n[t]=e})),n}),{})}function q(t,e){return e.filter((t=>t.attribute.rendered)).map((e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]})).reduce(((t,e)=>H(t,e)),{})}function B(t){return"function"==typeof t}function $(t,e=void 0,...n){return B(t)?e?t.bind(e)(...n):t(...n):t}function F(t={}){return 0===Object.keys(t).length&&t.constructor===Object}function J(t){return"string"!=typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}function j(t,e){return t.style?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(!1===r)return!1;const o=e.reduce(((t,e)=>{const r=e.attribute.parseHTML?e.attribute.parseHTML(n):J(n.getAttribute(e.name));return null==r?t:{...t,[e.name]:r}}),{});return{...r,...o}}}}function Z(t){return Object.fromEntries(Object.entries(t).filter((([t,e])=>("attrs"!==t||!F(e))&&null!=e)))}function U(t,e){var n;const r=z(t),{nodeExtensions:o,markExtensions:i}=R(t),a=null===(n=o.find((t=>I(t,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(o.map((n=>{const o=r.filter((t=>t.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:e},s=Z({...t.reduce(((t,e)=>{const r=I(e,"extendNodeSchema",i);return{...t,...r?r(n):{}}}),{}),content:$(I(n,"content",i)),marks:$(I(n,"marks",i)),group:$(I(n,"group",i)),inline:$(I(n,"inline",i)),atom:$(I(n,"atom",i)),selectable:$(I(n,"selectable",i)),draggable:$(I(n,"draggable",i)),code:$(I(n,"code",i)),defining:$(I(n,"defining",i)),isolating:$(I(n,"isolating",i)),attrs:Object.fromEntries(o.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=$(I(n,"parseHTML",i));a&&(s.parseDOM=a.map((t=>j(t,o))));const l=I(n,"renderHTML",i);l&&(s.toDOM=t=>l({node:t,HTMLAttributes:q(t,o)}));const c=I(n,"renderText",i);return c&&(s.toText=c),[n.name,s]}))),c=Object.fromEntries(i.map((n=>{const o=r.filter((t=>t.type===n.name)),i={name:n.name,options:n.options,storage:n.storage,editor:e},s=Z({...t.reduce(((t,e)=>{const r=I(e,"extendMarkSchema",i);return{...t,...r?r(n):{}}}),{}),inclusive:$(I(n,"inclusive",i)),excludes:$(I(n,"excludes",i)),group:$(I(n,"group",i)),spanning:$(I(n,"spanning",i)),code:$(I(n,"code",i)),attrs:Object.fromEntries(o.map((t=>{var e;return[t.name,{default:null===(e=null==t?void 0:t.attribute)||void 0===e?void 0:e.default}]})))}),a=$(I(n,"parseHTML",i));a&&(s.parseDOM=a.map((t=>j(t,o))));const l=I(n,"renderHTML",i);return l&&(s.toDOM=t=>l({mark:t,HTMLAttributes:q(t,o)})),[n.name,s]})));return new s.V_({topNode:a,nodes:l,marks:c})}function V(t,e){return e.nodes[t]||e.marks[t]||null}function Y(t,e){return Array.isArray(e)?e.some((e=>("string"==typeof e?e:e.name)===t.name)):e}const W=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,((t,e,o,i)=>{var s,a;const l=(null===(a=(s=t.type.spec).toText)||void 0===a?void 0:a.call(s,{node:t,pos:e,parent:o,index:i}))||t.textContent||"%leaf%";n+=l.slice(0,Math.max(0,r-e))})),n};function G(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class Q{constructor(t){this.find=t.find,this.handler=t.handler}}const K=(t,e)=>{if(G(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function X(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(e=c.nodeBefore||c.nodeAfter)||void 0===e?void 0:e.marks.find((t=>t.type.spec.code))))return!1;let d=!1;const u=W(c)+i;return s.forEach((t=>{if(d)return;const e=K(u,t.find);if(!e)return;const s=l.state.tr,c=D({state:l.state,transaction:s}),h={from:r-(e[0].length-i.length),to:o},{commands:p,chain:f,can:m}=new N({editor:n,state:c});null!==t.handler({state:c,range:h,match:e,commands:p,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:o,text:i}),l.dispatch(s),d=!0)})),d}function tt(t){const{editor:e,rules:n}=t,o=new r.Sy({state:{init:()=>null,apply:(t,e)=>t.getMeta(o)||(t.selectionSet||t.docChanged?null:e)},props:{handleTextInput:(t,r,i,s)=>X({editor:e,from:r,to:i,text:s,rules:n,plugin:o}),handleDOMEvents:{compositionend:t=>(setTimeout((()=>{const{$cursor:r}=t.state.selection;r&&X({editor:e,from:r.pos,to:r.pos,text:"",rules:n,plugin:o})})),!1)},handleKeyDown(t,r){if("Enter"!==r.key)return!1;const{$cursor:i}=t.state.selection;return!!i&&X({editor:e,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:o})}},isInputRules:!0});return o}function et(t){return"number"==typeof t}class nt{constructor(t){this.find=t.find,this.handler=t.handler}}const rt=(t,e)=>{if(G(e))return[...t.matchAll(e)];const n=e(t);return n?n.map((e=>{const n=[e.text];return n.index=e.index,n.input=t,n.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(e.replaceWith)),n})):[]};function ot(t){const{editor:e,rules:n}=t;let o=null,i=!1,s=!1,a=new ClipboardEvent("paste"),l=new DragEvent("drop");const c=n.map((t=>new r.Sy({view(t){const e=e=>{var n;o=(null===(n=t.dom.parentElement)||void 0===n?void 0:n.contains(e.target))?t.dom.parentElement:null};return window.addEventListener("dragstart",e),{destroy(){window.removeEventListener("dragstart",e)}}},props:{handleDOMEvents:{drop:(t,e)=>(s=o===t.dom.parentElement,l=e,!1),paste:(t,e)=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return a=e,i=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,o)=>{const c=n[0],d="paste"===c.getMeta("uiEvent")&&!i,u="drop"===c.getMeta("uiEvent")&&!s;if(!d&&!u)return;const h=r.doc.content.findDiffStart(o.doc.content),p=r.doc.content.findDiffEnd(o.doc.content);if(!et(h)||!p||h===p.b)return;const f=o.tr,m=D({state:o,transaction:f}),g=function(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:a}=t,{commands:l,chain:c,can:d}=new N({editor:e,state:n}),u=[];return n.doc.nodesBetween(r,o,((t,e)=>{if(!t.isTextblock||t.type.spec.code)return;const h=Math.max(r,e),p=Math.min(o,e+t.content.size),f=t.textBetween(h-e,p-e,void 0,"");rt(f,i.find).forEach((t=>{if(void 0===t.index)return;const e=h+t.index+1,r=e+t[0].length,o={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},p=i.handler({state:n,range:o,match:t,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});u.push(p)}))})),u.every((t=>null!==t))}({editor:e,state:m,from:Math.max(h-1,0),to:p.b-1,rule:t,pasteEvent:a,dropEvent:l});return g&&f.steps.length?(l=new DragEvent("drop"),a=new ClipboardEvent("paste"),f):void 0}})));return c}function it(t){const e=t.filter(((e,n)=>t.indexOf(e)!==n));return[...new Set(e)]}class st{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=st.resolve(t),this.schema=U(this.extensions,e),this.extensions.forEach((t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:V(t.name,this.schema)};"mark"===t.type&&(null===(e=$(I(t,"keepOnSplit",n)))||void 0===e||e)&&this.splittableMarks.push(t.name);const r=I(t,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const o=I(t,"onCreate",n);o&&this.editor.on("create",o);const i=I(t,"onUpdate",n);i&&this.editor.on("update",i);const s=I(t,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=I(t,"onTransaction",n);a&&this.editor.on("transaction",a);const l=I(t,"onFocus",n);l&&this.editor.on("focus",l);const c=I(t,"onBlur",n);c&&this.editor.on("blur",c);const d=I(t,"onDestroy",n);d&&this.editor.on("destroy",d)}))}static resolve(t){const e=st.sort(st.flatten(t)),n=it(e.map((t=>t.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((t=>`'${t}'`)).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map((t=>{const e=I(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...this.flatten(e())]:t})).flat(10)}static sort(t){return t.sort(((t,e)=>{const n=I(t,"priority")||100,r=I(e,"priority")||100;return n>r?-1:n{const n=I(e,"addCommands",{name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:V(e.name,this.schema)});return n?{...t,...n()}:t}),{})}get plugins(){const{editor:t}=this,e=st.sort([...this.extensions].reverse()),n=[],r=[],o=e.map((e=>{const o={name:e.name,options:e.options,storage:e.storage,editor:t,type:V(e.name,this.schema)},s=[],a=I(e,"addKeyboardShortcuts",o);let l={};if("mark"===e.type&&e.config.exitable&&(l.ArrowRight=()=>xe.handleExit({editor:t,mark:e})),a){const e=Object.fromEntries(Object.entries(a()).map((([e,n])=>[e,()=>n({editor:t})])));l={...l,...e}}const c=(0,i.h)(l);s.push(c);const d=I(e,"addInputRules",o);Y(e,t.options.enableInputRules)&&d&&n.push(...d());const u=I(e,"addPasteRules",o);Y(e,t.options.enablePasteRules)&&u&&r.push(...u());const h=I(e,"addProseMirrorPlugins",o);if(h){const t=h();s.push(...t)}return s})).flat();return[tt({editor:t,rules:n}),...ot({editor:t,rules:r}),...o]}get attributes(){return z(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=R(this.extensions);return Object.fromEntries(e.filter((t=>!!I(t,"addNodeView"))).map((e=>{const n=this.attributes.filter((t=>t.type===e.name)),r={name:e.name,options:e.options,storage:e.storage,editor:t,type:P(e.name,this.schema)},o=I(e,"addNodeView",r);return o?[e.name,(r,i,s,a)=>{const l=q(r,n);return o()({editor:t,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:e})}]:[]})))}}function at(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function lt(t,e){const n={...t};return at(t)&&at(e)&&Object.keys(e).forEach((r=>{at(e[r])?r in t?n[r]=lt(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})})),n}class ct{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=$(I(this,"addOptions",{name:this.name}))),this.storage=$(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new ct(t)}configure(t={}){const e=this.extend();return e.options=lt(this.options,t),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new ct(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=$(I(e,"addOptions",{name:e.name})),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}}function dt(t,e,n){const{from:r,to:o}=e,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return t.nodesBetween(r,o,((t,n,c,d)=>{var u;const h=null==s?void 0:s[t.type.name];h?(t.isBlock&&!l&&(a+=i,l=!0),c&&(a+=h({node:t,pos:n,parent:c,index:d,range:e}))):t.isText?(a+=null===(u=null==t?void 0:t.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n),l=!1):t.isBlock&&!l&&(a+=i,l=!0)})),a}function ut(t){return Object.fromEntries(Object.entries(t.nodes).filter((([,t])=>t.spec.toText)).map((([t,e])=>[t,e.spec.toText])))}const ht=ct.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o;return dt(r,{from:Math.min(...i.map((t=>t.$from.pos))),to:Math.max(...i.map((t=>t.$to.pos)))},{textSerializers:ut(n)})}}})]}});function pt(t,e,n={strict:!0}){const r=Object.keys(e);return!r.length||r.every((r=>n.strict?e[r]===t[r]:G(e[r])?e[r].test(t[r]):e[r]===t[r]))}function ft(t,e,n={}){return t.find((t=>t.type===e&&pt(t.attrs,n)))}function mt(t,e,n={}){return!!ft(t,e,n)}function gt(t,e,n={}){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if(t.parentOffset===r.offset&&0!==r.offset&&(r=t.parent.childBefore(t.parentOffset)),!r.node)return;const o=ft([...r.node.marks],e,n);if(!o)return;let i=r.index,s=t.start()+r.offset,a=i+1,l=s+r.node.nodeSize;for(ft([...r.node.marks],e,n);i>0&&o.isInSet(t.parent.child(i-1).marks);)i-=1,s-=t.parent.child(i).nodeSize;for(;a${t}`;return(new window.DOMParser).parseFromString(e,"text/html").body}function Ct(t,e,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof t&&null!==t)try{return Array.isArray(t)&&t.length>0?s.HY.fromArray(t.map((t=>e.nodeFromJSON(t)))):e.nodeFromJSON(t)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),Ct("",e,n)}if("string"==typeof t){const r=s.aw.fromSchema(e);return n.slice?r.parseSlice(xt(t),n.parseOptions).content:r.parse(xt(t),n.parseOptions)}return Ct("",e,n)}function At(t,e,n){const o=t.steps.length-1;if(o{0===l&&(l=r)})),t.setSelection(r.Y1.near(t.doc.resolve(l),n))}function Mt(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function St(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?P(e,t.schema):null,a=[];t.doc.nodesBetween(r,o,((t,e)=>{if(t.isText)return;const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);a.push({node:t,from:n,to:i})}));const l=o-r,c=a.filter((t=>!s||s.name===t.node.type.name)).filter((t=>pt(t.node.attrs,n,{strict:!1})));return i?!!c.length:c.reduce(((t,e)=>t+e.to-e.from),0)>=l}function _t(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Tt(t,e){const n="string"==typeof e?[e]:e;return Object.keys(t).reduce(((e,r)=>(n.includes(r)||(e[r]=t[r]),e)),{})}function Et(t,e,n={}){return Ct(t,e,{slice:!1,parseOptions:n})}function Ot(t,e){const n=bt(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,(t=>{s.push(...t.marks)}));const a=s.find((t=>t.type.name===n.name));return a?{...a.attrs}:{}}function Dt(t,e){const n=new a.wx(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}function Nt(t){for(let e=0;e{e(t)&&n.push({node:t,pos:r})})),n}function It(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}function Rt(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function zt(t){return e=>Rt(e.$from,t)}function Pt(t,e){const n=s.PW.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function Ht(t,e){return U(st.resolve(t),e)}function qt(t,e){const n=Ht(e);return Pt(s.NB.fromJSON(n,t).content,n)}function Bt(t,e){const n=Ht(e),r=xt(t);return s.aw.fromSchema(n).parse(r).toJSON()}function $t(t,e){return dt(t,{from:0,to:t.content.size},e)}function Ft(t,e,n){const{blockSeparator:r="\n\n",textSerializers:o={}}=n||{},i=Ht(e);return $t(s.NB.fromJSON(i,t),{blockSeparator:r,textSerializers:{...ut(i),...o}})}function Jt(t,e){const n=P(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,(t=>{i.push(t)}));const s=i.reverse().find((t=>t.type.name===n.name));return s?{...s.attrs}:{}}function jt(t,e){const n=_t("string"==typeof e?e:e.name,t.schema);return"node"===n?Jt(t,e):"mark"===n?Ot(t,e):{}}function Zt(t,e=JSON.stringify){const n={};return t.filter((t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}function Ut(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(o).map(t,-1),s=e.slice(o).map(n),a=e.invert().map(i,-1),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),function(t){const e=Zt(t);return 1===e.length?e:e.filter(((t,n)=>!e.filter(((t,e)=>e!==n)).some((e=>t.oldRange.from>=e.oldRange.from&&t.oldRange.to<=e.oldRange.to&&t.newRange.from>=e.newRange.from&&t.newRange.to<=e.newRange.to))))}(r)}function Vt(t,e=0){const n=t.type===t.type.schema.topNodeType?0:1,r=e,o=r+t.nodeSize,i=t.marks.map((t=>{const e={type:t.type.name};return Object.keys(t.attrs).length&&(e.attrs={...t.attrs}),e})),s={...t.attrs},a={type:t.type.name,from:r,to:o};return Object.keys(s).length&&(a.attrs=s),i.length&&(a.marks=i),t.content.childCount&&(a.content=[],t.forEach(((t,r)=>{var o;null===(o=a.content)||void 0===o||o.push(Vt(t,e+r+n))}))),t.text&&(a.text=t.text),a}function Yt(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach((e=>{const o=gt(n.resolve(t-1),e.type);o&&r.push({mark:e,...o})})):n.nodesBetween(t,e,((t,e)=>{r.push(...t.marks.map((n=>({from:e,to:e+t.nodeSize,mark:n}))))})),r}const Wt=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let i=r,s=null;for(;i>0&&null===s;){const t=o.node(i);(null==t?void 0:t.type.name)===e?s=t:i-=1}return[s,i]};function Gt(t,e,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=t.find((t=>t.type===e&&t.name===n));return!!r&&r.attribute.keepOnSplit})))}function Qt(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?bt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter((t=>!i||i.name===t.type.name)).find((t=>pt(t.attrs,n,{strict:!1})));let s=0;const a=[];if(o.forEach((({$from:e,$to:n})=>{const r=e.pos,o=n.pos;t.doc.nodesBetween(r,o,((t,e)=>{if(!t.isText&&!t.marks.length)return;const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);s+=i-n,a.push(...t.marks.map((t=>({mark:t,from:n,to:i}))))}))})),0===s)return!1;const l=a.filter((t=>!i||i.name===t.mark.type.name)).filter((t=>pt(t.mark.attrs,n,{strict:!1}))).reduce(((t,e)=>t+e.to-e.from),0),c=a.filter((t=>!i||t.mark.type!==i&&t.mark.type.excludes(i))).reduce(((t,e)=>t+e.to-e.from),0);return(l>0?l+c:l)>=s}function Kt(t,e,n={}){if(!e)return St(t,null,n)||Qt(t,null,n);const r=_t(e,t.schema);return"node"===r?St(t,e,n):"mark"===r&&Qt(t,e,n)}const Xt=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const n=zt((t=>t.type.name===e))(t.selection);if(!n)return!1;const r=t.doc.resolve(n.pos+1);return o.pos+1===r.end()}return!(r.parentOffset{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function ee(t,e){const{nodeExtensions:n}=R(e),r=n.find((e=>e.name===t));if(!r)return!1;const o=$(I(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function ne(t){var e;const n=null===(e=t.type.createAndFill())||void 0===e?void 0:e.toJSON(),r=t.toJSON();return JSON.stringify(n)===JSON.stringify(r)}function re(t){return t instanceof r.qv}function oe(t,e,n){const r=t.state.doc.content.size,o=vt(e,0,r),i=vt(n,0,r),s=t.coordsAtPos(o),a=t.coordsAtPos(i,-1),l=Math.min(s.top,a.top),c=Math.max(s.bottom,a.bottom),d=Math.min(s.left,a.left),u=Math.max(s.right,a.right),h={top:l,bottom:c,left:d,right:u,width:u-d,height:c-l,x:d,y:l};return{...h,toJSON:()=>h}}function ie(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter((t=>null==e?void 0:e.includes(t.type.name)));t.tr.ensureMarks(r)}}const se=(t,e)=>{const n=zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!(0,a.Mn)(t.doc,n.pos)||(t.join(n.pos),!0)},ae=(t,e)=>{const n=zt((t=>t.type===e))(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=t.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!(0,a.Mn)(t.doc,r)||(t.join(r),!0)};var le=Object.freeze({__proto__:null,blur:()=>({editor:t,view:e})=>(requestAnimationFrame((()=>{var n;t.isDestroyed||(e.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(t=!1)=>({commands:e})=>e.setContent("",t),clearNodes:()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{t.doc.nodesBetween(n.pos,r.pos,((t,n)=>{if(t.type.isText)return;const{doc:r,mapping:o}=e,i=r.resolve(o.map(n)),s=r.resolve(o.map(n+t.nodeSize)),l=i.blockRange(s);if(!l)return;const c=(0,a.k9)(l);if(t.type.isTextblock){const{defaultType:t}=i.parent.contentMatchAt(i.index());e.setNodeMarkup(l.start,t)}(c||0===c)&&e.lift(l,c)}))})),!0)},command:t=>e=>t(e),createParagraphNear:()=>({state:t,dispatch:e})=>v(t,e),cut:(t,e)=>({editor:n,tr:o})=>{const{state:i}=n,s=i.doc.slice(t.from,t.to);o.deleteRange(t.from,t.to);const a=o.mapping.map(e);return o.insert(a,s.content),o.setSelection(new r.Bs(o.doc.resolve(a-1))),!0},deleteCurrentNode:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let n=o.depth;n>0;n-=1)if(o.node(n).type===r.type){if(e){const e=o.before(n),r=o.after(n);t.delete(e,r).scrollIntoView()}return!0}return!1},deleteNode:t=>({tr:e,state:n,dispatch:r})=>{const o=P(t,n.schema),i=e.selection.$anchor;for(let t=i.depth;t>0;t-=1)if(i.node(t).type===o){if(r){const n=i.before(t),r=i.after(t);e.delete(n,r).scrollIntoView()}return!0}return!1},deleteRange:t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},deleteSelection:()=>({state:t,dispatch:e})=>l(t,e),enter:()=>({commands:t})=>t.keyboardShortcut("Enter"),exitCode:()=>({state:t,dispatch:e})=>k(t,e),extendMarkRange:(t,e={})=>({tr:n,state:o,dispatch:i})=>{const s=bt(t,o.schema),{doc:a,selection:l}=n,{$from:c,from:d,to:u}=l;if(i){const t=gt(c,s,e);if(t&&t.from<=d&&t.to>=u){const e=r.Bs.create(a,t.from,t.to);n.setSelection(e)}}return!0},first:t=>e=>{const n="function"==typeof t?t(e):t;for(let t=0;t({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{wt()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==e?void 0:e.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===t||!1===t)return!0;if(i&&null===t&&!kt(n.state.selection))return s(),!0;const a=yt(o.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},forEach:(t,e)=>n=>t.every(((t,r)=>e(t,{...n,index:r}))),insertContent:(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),insertContentAt:(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const o=Ct(e,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:s,to:a}="number"==typeof t?{from:t,to:t}:{from:t.from,to:t.to},l=!0,c=!0;if((o.toString().startsWith("<")?o:[o]).forEach((t=>{t.check(),l=!!l&&t.isText&&0===t.marks.length,c=!!c&&t.isBlock})),s===a&&c){const{parent:t}=r.doc.resolve(s);t.isTextblock&&!t.type.spec.code&&!t.childCount&&(s-=1,a+=1)}l?Array.isArray(e)?r.insertText(e.map((t=>t.text||"")).join(""),s,a):"object"==typeof e&&e&&e.text?r.insertText(e.text,s,a):r.insertText(e,s,a):r.replaceWith(s,a,o),n.updateSelection&&At(r,r.steps.length-1,-1)}return!0},joinUp:()=>({state:t,dispatch:e})=>((t,e)=>{let n,o=t.selection,i=o instanceof r.qv;if(i){if(o.node.isTextblock||!(0,a.Mn)(t.doc,o.from))return!1;n=o.from}else if(n=(0,a.GJ)(t.doc,o.from,-1),null==n)return!1;if(e){let o=t.tr.join(n);i&&o.setSelection(r.qv.create(o.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0})(t,e),joinDown:()=>({state:t,dispatch:e})=>((t,e)=>{let n,o=t.selection;if(o instanceof r.qv){if(o.node.isTextblock||!(0,a.Mn)(t.doc,o.to))return!1;n=o.to}else if(n=(0,a.GJ)(t.doc,o.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0})(t,e),joinBackward:()=>({state:t,dispatch:e})=>c(t,e),joinForward:()=>({state:t,dispatch:e})=>p(t,e),joinItemBackward:()=>({tr:t,state:e,dispatch:n})=>{try{const r=(0,a.GJ)(e.doc,e.selection.$from.pos,-1);return null!=r&&(t.join(r,2),n&&n(t),!0)}catch{return!1}},joinItemForward:()=>({state:t,dispatch:e,tr:n})=>{try{const r=(0,a.GJ)(t.doc,t.selection.$from.pos,1);return null!=r&&(n.join(r,2),e&&e(n),!0)}catch(t){return!1}},keyboardShortcut:t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=function(t){const e=t.split(/-(?!$)/);let n,r,o,i,s=e[e.length-1];"Space"===s&&(s=" ");for(let t=0;t!["Alt","Ctrl","Meta","Shift"].includes(t))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction((()=>{n.someProp("handleKeyDown",(t=>t(n,a)))}));return null==l||l.steps.forEach((t=>{const e=t.map(r.mapping);e&&o&&r.maybeStep(e)})),!0},lift:(t,e={})=>({state:n,dispatch:r})=>!!St(n,P(t,n.schema),e)&&((t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&(0,a.k9)(o);return null!=i&&(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:t,dispatch:e})=>y(t,e),liftListItem:t=>({state:e,dispatch:n})=>{return(r=P(t,e.schema),function(t,e){let{$from:n,$to:o}=t.selection,i=n.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==r));return!!i&&(!e||(n.node(i.depth-1).type==r?function(t,e,n,r){let o=t.tr,i=r.end,l=r.$to.end(r.depth);ii;e--)t-=o.child(e).nodeSize,r.delete(t-1,t+1);let i=r.doc.resolve(n.start),l=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,d=n.endIndex==o.childCount,u=i.node(-1),h=i.index(-1);if(!u.canReplace(h+(c?0:1),h+1,l.content.append(d?s.HY.empty:s.HY.from(o))))return!1;let p=i.pos,f=p+l.nodeSize;return r.step(new a.FC(p-(c?1:0),f+(d?1:0),p+1,f-1,new s.p2((c?s.HY.empty:s.HY.from(o.copy(s.HY.empty))).append(d?s.HY.empty:s.HY.from(o.copy(s.HY.empty))),c?0:1,d?0:1),c?0:1)),e(r.scrollIntoView()),!0}(t,e,i)))})(e,n);var r},newlineInCode:()=>({state:t,dispatch:e})=>g(t,e),resetAttributes:(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=_t("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=P(t,r.schema)),"mark"===a&&(s=bt(t,r.schema)),o&&n.selection.ranges.forEach((t=>{r.doc.nodesBetween(t.$from.pos,t.$to.pos,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,Tt(t.attrs,e)),s&&t.marks.length&&t.marks.forEach((o=>{s===o.type&&n.addMark(r,r+t.nodeSize,s.create(Tt(o.attrs,e)))}))}))})),!0)},scrollIntoView:()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),selectAll:()=>({tr:t,commands:e})=>e.setTextSelection({from:0,to:t.doc.content.size}),selectNodeBackward:()=>({state:t,dispatch:e})=>u(t,e),selectNodeForward:()=>({state:t,dispatch:e})=>f(t,e),selectParentNode:()=>({state:t,dispatch:e})=>((t,e)=>{let n,{$from:o,to:i}=t.selection,s=o.sharedDepth(i);return 0!=s&&(n=o.before(s),e&&e(t.tr.setSelection(r.qv.create(t.doc,n))),!0)})(t,e),selectTextblockEnd:()=>({state:t,dispatch:e})=>A(t,e),selectTextblockStart:()=>({state:t,dispatch:e})=>C(t,e),setContent:(t,e=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=Et(t,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!e),!0},setMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=bt(t,r.schema);if(o)if(s){const t=Ot(r,l);n.addStoredMark(l.create({...t,...e}))}else a.forEach((t=>{const o=t.$from.pos,i=t.$to.pos;r.doc.nodesBetween(o,i,((t,r)=>{const s=Math.max(r,o),a=Math.min(r+t.nodeSize,i);t.marks.find((t=>t.type===l))?t.marks.forEach((t=>{l===t.type&&n.addMark(s,a,l.create({...t.attrs,...e}))})):n.addMark(s,a,l.create(e))}))}));return function(t,e,n){var r;const{selection:o}=e;let i=null;if(kt(o)&&(i=o.$cursor),i){const e=null!==(r=t.storedMarks)&&void 0!==r?r:i.marks();return!!n.isInSet(e)||!e.some((t=>t.type.excludes(n)))}const{ranges:s}=o;return s.some((({$from:e,$to:r})=>{let o=0===e.depth&&t.doc.inlineContent&&t.doc.type.allowsMarkType(n);return t.doc.nodesBetween(e.pos,r.pos,((t,e,r)=>{if(o)return!1;if(t.isInline){const e=!r||r.type.allowsMarkType(n),i=!!n.isInSet(t.marks)||!t.marks.some((t=>t.type.excludes(n)));o=e&&i}return!o})),o}))}(r,n,l)},setMeta:(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),setNode:(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=P(t,n.schema);return i.isTextblock?o().command((({commands:t})=>!!M(i,e)(n)||t.clearNodes())).command((({state:t})=>M(i,e)(t,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,o=vt(t,0,n.content.size),i=r.qv.create(n,o);e.setSelection(i)}return!0},setTextSelection:t=>({tr:e,dispatch:n})=>{if(n){const{doc:n}=e,{from:o,to:i}="number"==typeof t?{from:t,to:t}:t,s=r.Bs.atStart(n).from,a=r.Bs.atEnd(n).to,l=vt(o,s,a),c=vt(i,s,a),d=r.Bs.create(n,l,c);e.setSelection(d)}return!0},sinkListItem:t=>({state:e,dispatch:n})=>{const r=P(t,e.schema);return(o=r,function(t,e){let{$from:n,$to:r}=t.selection,i=n.blockRange(r,(t=>t.childCount>0&&t.firstChild.type==o));if(!i)return!1;let l=i.startIndex;if(0==l)return!1;let c=i.parent,d=c.child(l-1);if(d.type!=o)return!1;if(e){let n=d.lastChild&&d.lastChild.type==c.type,r=s.HY.from(n?o.create():null),l=new s.p2(s.HY.from(o.create(null,s.HY.from(c.type.create(null,r)))),n?3:1,0),u=i.start,h=i.end;e(t.tr.step(new a.FC(u-(n?3:1),h,u,h,l,1,!0)).scrollIntoView())}return!0})(e,n);var o},splitBlock:({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:o,editor:i})=>{const{selection:s,doc:l}=e,{$from:c,$to:d}=s,u=Gt(i.extensionManager.attributes,c.node().type.name,c.node().attrs);if(s instanceof r.qv&&s.node.isBlock)return!(!c.parentOffset||!(0,a.Ax)(l,c.pos)||(o&&(t&&ie(n,i.extensionManager.splittableMarks),e.split(c.pos).scrollIntoView()),0));if(!c.parent.isBlock)return!1;if(o){const o=d.parentOffset===d.parent.content.size;s instanceof r.Bs&&e.deleteSelection();const l=0===c.depth?void 0:Nt(c.node(-1).contentMatchAt(c.indexAfter(-1)));let h=o&&l?[{type:l,attrs:u}]:void 0,p=(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,h);if(h||p||!(0,a.Ax)(e.doc,e.mapping.map(c.pos),1,l?[{type:l}]:void 0)||(p=!0,h=l?[{type:l,attrs:u}]:void 0),p&&(e.split(e.mapping.map(c.pos),1,h),l&&!o&&!c.parentOffset&&c.parent.type!==l)){const t=e.mapping.map(c.before()),n=e.doc.resolve(t);c.node(-1).canReplaceWith(n.index(),n.index()+1,l)&&e.setNodeMarkup(e.mapping.map(c.before()),l)}t&&ie(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},splitListItem:t=>({tr:e,state:n,dispatch:o,editor:i})=>{var l;const c=P(t,n.schema),{$from:d,$to:u}=n.selection,h=n.selection.node;if(h&&h.isBlock||d.depth<2||!d.sameParent(u))return!1;const p=d.node(-1);if(p.type!==c)return!1;const f=i.extensionManager.attributes;if(0===d.parent.content.size&&d.node(-1).childCount===d.indexAfter(-1)){if(2===d.depth||d.node(-3).type!==c||d.index(-2)!==d.node(-2).childCount-1)return!1;if(o){let t=s.HY.empty;const n=d.index(-1)?1:d.index(-2)?2:3;for(let e=d.depth-n;e>=d.depth-3;e-=1)t=s.HY.from(d.node(e).copy(t));const o=d.indexAfter(-1){if(h>-1)return!1;t.isTextblock&&0===t.content.size&&(h=e+1)})),h>-1&&e.setSelection(r.Bs.near(e.doc.resolve(h))),e.scrollIntoView()}return!0}const m=u.pos===d.end()?p.contentMatchAt(0).defaultType:null,g=Gt(f,p.type.name,p.attrs),b=Gt(f,d.node().type.name,d.node().attrs);e.delete(d.pos,u.pos);const k=m?[{type:c,attrs:g},{type:m,attrs:b}]:[{type:c,attrs:g}];if(!(0,a.Ax)(e.doc,d.pos,2))return!1;if(o){const{selection:t,storedMarks:r}=n,{splittableMarks:s}=i.extensionManager,a=r||t.$to.parentOffset&&t.$from.marks();if(e.split(d.pos,2,k).scrollIntoView(),!a||!o)return!0;const l=a.filter((t=>s.includes(t.type.name)));e.ensureMarks(l)}return!0},toggleList:(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:u,splittableMarks:h}=o.extensionManager,p=P(t,s.schema),f=P(e,s.schema),{selection:m,storedMarks:g}=s,{$from:b,$to:k}=m,v=b.blockRange(k),y=g||m.$to.parentOffset&&m.$from.marks();if(!v)return!1;const w=zt((t=>ee(t.type.name,u)))(m);if(v.depth>=1&&w&&v.depth-w.depth<=1){if(w.node.type===p)return c.liftListItem(f);if(ee(w.node.type.name,u)&&p.validContent(w.node.content)&&a)return l().command((()=>(i.setNodeMarkup(w.pos,p),!0))).command((()=>se(i,p))).command((()=>ae(i,p))).run()}return n&&y&&a?l().command((()=>{const t=d().wrapInList(p,r),e=y.filter((t=>h.includes(t.type.name)));return i.ensureMarks(e),!!t||c.clearNodes()})).wrapInList(p,r).command((()=>se(i,p))).command((()=>ae(i,p))).run():l().command((()=>!!d().wrapInList(p,r)||c.clearNodes())).wrapInList(p,r).command((()=>se(i,p))).command((()=>ae(i,p))).run()},toggleMark:(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=bt(t,r.schema);return Qt(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},toggleNode:(t,e,n={})=>({state:r,commands:o})=>{const i=P(t,r.schema),s=P(e,r.schema);return St(r,i,n)?o.setNode(s):o.setNode(i,n)},toggleWrap:(t,e={})=>({state:n,commands:r})=>{const o=P(t,n.schema);return St(n,o,e)?r.lift(o):r.wrapIn(o,e)},undoInputRule:()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r=0;t-=1)e.step(n.steps[t].invert(n.docs[t]));if(i.text){const n=e.doc.resolve(i.from).marks();e.replaceWith(i.from,i.to,t.schema.text(i.text,n))}else e.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach((e=>{t.removeMark(e.$from.pos,e.$to.pos)})),!0},unsetMark:(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:a}=n,l=bt(t,r.schema),{$from:c,empty:d,ranges:u}=a;if(!o)return!0;if(d&&s){let{from:t,to:e}=a;const r=null===(i=c.marks().find((t=>t.type===l)))||void 0===i?void 0:i.attrs,o=gt(c,l,r);o&&(t=o.from,e=o.to),n.removeMark(t,e,l)}else u.forEach((t=>{n.removeMark(t.$from.pos,t.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=_t("string"==typeof t?t:t.name,r.schema);return!!a&&("node"===a&&(i=P(t,r.schema)),"mark"===a&&(s=bt(t,r.schema)),o&&n.selection.ranges.forEach((t=>{const o=t.$from.pos,a=t.$to.pos;r.doc.nodesBetween(o,a,((t,r)=>{i&&i===t.type&&n.setNodeMarkup(r,void 0,{...t.attrs,...e}),s&&t.marks.length&&t.marks.forEach((i=>{if(s===i.type){const l=Math.max(r,o),c=Math.min(r+t.nodeSize,a);n.addMark(l,c,s.create({...i.attrs,...e}))}}))}))})),!0)},wrapIn:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&(0,a.nd)(s,t,e);return!!l&&(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0)}}(P(t,n.schema),e)(n,r),wrapInList:(t,e={})=>({state:n,dispatch:r})=>function(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,l=o.blockRange(i),c=!1,d=l;if(!l)return!1;if(l.depth>=2&&o.node(l.depth-1).type.compatibleContent(t)&&0==l.startIndex){if(0==o.index(l.depth-1))return!1;let t=n.doc.resolve(l.start-2);d=new s.Ts(t,t,l.depth),l.endIndex=0;t--)i=s.HY.from(n[t].type.create(n[t].attrs,i));t.step(new a.FC(e.start-(r?2:0),e.end,e.start,e.end,new s.p2(i,0,0),n.length,!0));let l=0;for(let t=0;t({...le})}),de=ct.create({name:"editable",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("editable"),props:{editable:()=>this.editor.options.editable}})]}}),ue=ct.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new r.Sy({key:new r.H$("focusEvents"),props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),he=ct.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first((({commands:t})=>[()=>t.undoInputRule(),()=>t.command((({tr:e})=>{const{selection:n,doc:o}=e,{empty:i,$anchor:s}=n,{pos:a,parent:l}=s,c=s.parent.isTextblock?e.doc.resolve(a-1):s,d=c.parent.type.spec.isolating,u=s.pos-s.parentOffset,h=d&&1===c.parent.childCount?u===s.pos:r.Y1.atStart(o).from===a;return!(!(i&&h&&l.type.isTextblock)||l.textContent.length)&&t.clearNodes()})),()=>t.deleteSelection(),()=>t.joinBackward(),()=>t.selectNodeBackward()])),e=()=>this.editor.commands.first((({commands:t})=>[()=>t.deleteSelection(),()=>t.deleteCurrentNode(),()=>t.joinForward(),()=>t.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:t})=>[()=>t.newlineInCode(),()=>t.createParagraphNear(),()=>t.liftEmptyBlock(),()=>t.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...n},i={...n,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return wt()||Mt()?i:o},addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("clearDocument"),appendTransaction:(t,e,n)=>{if(!t.some((t=>t.docChanged))||e.doc.eq(n.doc))return;const{empty:o,from:i,to:s}=e.selection,a=r.Y1.atStart(e.doc).from,l=r.Y1.atEnd(e.doc).to;if(o||i!==a||s!==l)return;if(0!==n.doc.textBetween(0,n.doc.content.size," "," ").length)return;const c=n.tr,d=D({state:n,transaction:c}),{commands:u}=new N({editor:this.editor,state:d});return u.clearNodes(),c.steps.length?c:void 0}})]}}),pe=ct.create({name:"tabindex",addProseMirrorPlugins(){return[new r.Sy({key:new r.H$("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var fe=Object.freeze({__proto__:null,ClipboardTextSerializer:ht,Commands:ce,Editable:de,FocusEvents:ue,Keymap:he,Tabindex:pe});function me(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);if(null!==r)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style"+(n?`-${n}`:""),""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}class ge extends L{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=me('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const n=B(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(t){if(this.isDestroyed)return;const e="string"==typeof t?`${t}$`:t.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((t=>!t.key.startsWith(e)))});this.view.updateState(n)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(fe):[],...this.options.extensions].filter((t=>["extension","node","mark"].includes(null==t?void 0:t.type)));this.extensionManager=new st(t,this)}createCommandManager(){this.commandManager=new N({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const t=Et(this.options.content,this.schema,this.options.parseOptions),e=yt(t,this.options.autofocus);this.view=new o.tk(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:r.yy.create({doc:t,selection:e||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass(),this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e;return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t);const e=this.state.apply(t),n=!this.state.selection.eq(e.selection);this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t});const r=t.getMeta("focus"),o=t.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return jt(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,r="string"==typeof t?e:t;return Kt(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Pt(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return $t(this.state.doc,{blockSeparator:e,textSerializers:{...ut(this.schema),...n}})}get isEmpty(){return ne(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(null===(t=this.view)||void 0===t?void 0:t.docView)}}function be(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{const o=$(t.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];if(s){const r=a.search(/\S/),l=n.from+a.indexOf(s),c=l+s.length;if(Yt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>l)).length)return null;cn.from&&i.delete(n.from+r,l);const d=n.from+r+s.length;i.addMark(n.from+r,d,t.type.create(o||{})),i.removeStoredMark(t.type)}}})}function ke(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{const o=$(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let a=n.to;const l=t.type.create(o);if(r[1]){let t=s+r[0].lastIndexOf(r[1]);t>a?t=a:a=t+r[1].length;const e=r[0][r[0].length-1];i.insertText(e,s+r[0].length-1),i.replaceWith(t,a,l)}else r[0]&&i.insert(s-1,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a));i.scrollIntoView()}})}function ve(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=$(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)}})}function ye(t){return new Q({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from;const s=n.to;if(r[1]){const t=r[0].lastIndexOf(r[1]);o+=r[0].slice(t+r[1].length),i+=t;const e=i-s;e>0&&(o=r[0].slice(t-e,t)+o,i=s)}e.tr.insertText(o,i,s)}})}function we(t){return new Q({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=$(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&(0,a.nd)(l,t.type,i);if(!c)return null;if(s.wrap(l,c),t.keepMarks&&t.editor){const{selection:n,storedMarks:r}=e,{splittableMarks:o}=t.editor.extensionManager,i=r||n.$to.parentOffset&&n.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";o().updateAttributes(e,i).run()}const d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&(0,a.Mn)(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&s.join(n.from-1)}})}class xe{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=$(I(this,"addOptions",{name:this.name}))),this.storage=$(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new xe(t)}configure(t={}){const e=this.extend();return e.options=lt(this.options,t),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new xe(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=$(I(e,"addOptions",{name:e.name})),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:n}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!o.find((t=>(null==t?void 0:t.type.name)===e.name)))return!1;const i=o.find((t=>(null==t?void 0:t.type.name)===e.name));return i&&n.removeStoredMark(i),n.insertText(" ",r.pos),t.view.dispatch(n),!0}return!1}}class Ce{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=$(I(this,"addOptions",{name:this.name}))),this.storage=$(I(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ce(t)}configure(t={}){const e=this.extend();return e.options=lt(this.options,t),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Ce(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=$(I(e,"addOptions",{name:e.name})),e.storage=$(I(e,"addStorage",{name:e.name,options:e.options})),e}}class Ae{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,o,i,s,a,l;const{view:c}=this.editor,d=t.target,u=3===d.nodeType?null===(e=d.parentElement)||void 0===e?void 0:e.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(d))||!u)return;let h=0,p=0;if(this.dom!==u){const e=this.dom.getBoundingClientRect(),n=u.getBoundingClientRect(),r=null!==(o=t.offsetX)&&void 0!==o?o:null===(i=t.nativeEvent)||void 0===i?void 0:i.offsetX,l=null!==(s=t.offsetY)&&void 0!==s?s:null===(a=t.nativeEvent)||void 0===a?void 0:a.offsetY;h=n.x-e.x+r,p=n.y-e.y+l}null===(l=t.dataTransfer)||void 0===l||l.setDragImage(this.dom,h,p);const f=r.qv.create(c.state.doc,this.getPos()),m=c.state.tr.setSelection(f);c.dispatch(m)}stopEvent(t){var e;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:t});const n=t.target;if(!this.dom.contains(n)||(null===(e=this.contentDOM)||void 0===e?void 0:e.contains(n)))return!1;const o=t.type.startsWith("drag"),i="drop"===t.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!o)return!0;const{isEditable:s}=this.editor,{isDragging:a}=this,l=!!this.node.type.spec.draggable,c=r.qv.isSelectable(this.node),d="copy"===t.type,u="paste"===t.type,h="cut"===t.type,p="mousedown"===t.type;if(!l&&c&&o&&t.preventDefault(),l&&o&&!a)return t.preventDefault(),!1;if(l&&s&&!a&&p){const t=n.closest("[data-drag-handle]");t&&(this.dom===t||this.dom.contains(t))&&(this.isDragging=!0,document.addEventListener("dragend",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("drop",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(()=>{this.isDragging=!1}),{once:!0}))}return!(a||i||d||u||h||p&&c)}ignoreMutation(t){return!this.dom||!this.contentDOM||("function"==typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:t}):!(!this.node.isLeaf&&!this.node.isAtom&&("selection"===t.type||this.dom.contains(t.target)&&"childList"===t.type&&(wt()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every((t=>t.isContentEditable))||(this.contentDOM!==t.target||"attributes"!==t.type)&&this.contentDOM.contains(t.target))))}updateAttributes(t){this.editor.commands.command((({tr:e})=>{const n=this.getPos();return e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0}))}deleteNode(){const t=this.getPos(),e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}}function Me(t){return new nt({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=$(t.getAttributes,void 0,r,o);if(!1===i||null===i)return null;const{tr:s}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const r=l.search(/\S/),o=n.from+l.indexOf(a),d=o+a.length;if(Yt(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>o)).length)return null;dn.from&&s.delete(n.from+r,o),c=n.from+r+a.length,s.addMark(n.from+r,c,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function Se(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function _e(t){return"string"==typeof t}function Te(t){return new nt({find:t.find,handler({match:e,chain:n,range:r,pasteEvent:o}){const i=$(t.getAttributes,void 0,e,o);if(!1===i||null===i)return null;e.input&&n().deleteRange(r).insertContentAt(r.from,{type:t.type.name,attrs:i})}})}function Ee(t){return new nt({find:t.find,handler:({state:e,range:n,match:r})=>{let o=t.replace,i=n.from;const s=n.to;if(r[1]){const t=r[0].lastIndexOf(r[1]);o+=r[0].slice(t+r[1].length),i+=t;const e=i-s;e>0&&(o=r[0].slice(t-e,t)+o,i=s)}e.tr.insertText(o,i,s)}})}class Oe{constructor(t){this.transaction=t,this.currentStep=this.transaction.steps.length}map(t){let e=!1;return{position:this.transaction.steps.slice(this.currentStep).reduce(((t,n)=>{const r=n.getMap().mapResult(t);return r.deleted&&(e=!0),r.pos}),t),deleted:e}}}},65828:(t,e,n)=>{n.d(e,{V6:()=>i});var r=n(11046);const o=/^\s*>\s$/,i=r.Node.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:t}){return["blockquote",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[(0,r.wrappingInputRule)({find:o,type:this.type})]}})},48144:(t,e,n)=>{n.d(e,{d8:()=>l});var r=n(11046);const o=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,i=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,s=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,a=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,l=r.Mark.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],renderHTML({HTMLAttributes:t}){return["strong",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type}),(0,r.markInputRule)({find:s,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type}),(0,r.markPasteRule)({find:a,type:this.type})]}})},35441:(t,e,n)=>{n.d(e,{DY:()=>a});var r=n(11046);const o=r.Node.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),i=r.Mark.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=(0,r.getMarkAttributes)(t,this.type);return!!Object.entries(n).some((([,t])=>!!t))||e.unsetMark(this.name)}}}}),s=/^\s*([-+*])\s$/,a=r.Node.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:t}){return["ul",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o.name,this.editor.getAttributes(i.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=(0,r.wrappingInputRule)({find:s,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.wrappingInputRule)({find:s,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(i.name),editor:this.editor})),[t]}})},30588:(t,e,n)=>{n.d(e,{dn:()=>a});var r=n(11046),o=n(62463);const i=/^```([a-z]+)?[\s\n]$/,s=/^~~~([a-z]+)?[\s\n]$/,a=r.Node.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;return[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter((t=>t.startsWith(n))).map((t=>t.replace(n,"")))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:t,HTMLAttributes:e}){return["pre",(0,r.mergeAttributes)(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=1===e.pos;return!(!t||e.parent.type.name!==this.name)&&!(!n&&e.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!i||!s)&&t.chain().command((({tr:t})=>(t.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type)return!1;if(o.parentOffset!==o.parent.nodeSize-2)return!1;const s=o.after();return void 0!==s&&!r.nodeAt(s)&&t.commands.exitCode()}}},addInputRules(){return[(0,r.textblockTypeInputRule)({find:i,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.textblockTypeInputRule)({find:s,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new o.Sy({key:new o.H$("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=null==i?void 0:i.mode;if(!n||!s)return!1;const{tr:a}=t.state;return a.replaceSelectionWith(this.type.create({language:s})),a.setSelection(o.Bs.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.insertText(n.replace(/\r\n?/g,"\n")),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}})},33977:(t,e,n)=>{n.d(e,{EK:()=>s});var r=n(11046);const o=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,i=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,s=r.Mark.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:t}){return["code",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type})]}})},83374:(t,e,n)=>{n.d(e,{B:()=>r});const r=n(11046).Node.create({name:"doc",topNode:!0,content:"block+"})},20366:(t,e,n)=>{n.d(e,{m:()=>l});var r=n(11046),o=n(62463),i=n(38480);function s(t={}){return new o.Sy({view:e=>new a(e,t)})}class a{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=e.width)&&void 0!==n?n:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map((e=>{let n=t=>{this[e](t)};return t.dom.addEventListener(e,n),{name:e,handler:n}}))}destroy(){this.handlers.forEach((({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e)))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t,e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent;if(n){let n=e.nodeBefore,r=e.nodeAfter;if(n||r){let e=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(e){let o=e.getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),t={left:o.left,right:o.right,top:i-this.width/2,bottom:i+this.width/2}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos);t={left:e.left-this.width/2,right:e.left+this.width/2,top:e.top,bottom:e.bottom}}let r,o,i=this.editorView.dom.offsetParent;if(this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!i||i==document.body&&"static"==getComputedStyle(i).position)r=-pageXOffset,o=-pageYOffset;else{let t=i.getBoundingClientRect();r=t.left-i.scrollLeft,o=t.top-i.scrollTop}this.element.style.left=t.left-r+"px",this.element.style.top=t.top-o+"px",this.element.style.width=t.right-t.left+"px",this.element.style.height=t.bottom-t.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),n=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let t=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=(0,i.nj)(this.editorView.state.doc,t,this.editorView.dragging.slice);null!=e&&(t=e)}this.setCursor(t),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){t.target!=this.editorView.dom&&this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}const l=r.Extension.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[s(this.options)]}})},10988:(t,e,n)=>{n.d(e,{f:()=>m});var r=n(11046),o=n(31690),i=n(62463),s=n(27439),a=n(43594);class l extends i.Y1{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return l.valid(n)?new l(n):i.Y1.near(n)}content(){return s.p2.empty}eq(t){return t instanceof l&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new l(t.resolve(e.pos))}getBookmark(){return new c(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(0!=n)for(let t=r.child(n-1);;t=t.lastChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t)||!function(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n!=r.childCount)for(let t=r.child(n);;t=t.firstChild){if(0==t.childCount&&!t.inlineContent||t.isAtom||t.type.spec.isolating)return!0;if(t.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(t))return!1;let n=e.type.spec.allowGapCursor;if(null!=n)return n;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,n=!1){t:for(;;){if(!n&&l.valid(t))return t;let r=t.pos,o=null;for(let n=t.depth;;n--){let i=t.node(n);if(e>0?t.indexAfter(n)0){o=i.child(e>0?t.indexAfter(n):t.index(n)-1);break}if(0==n)return null;r+=e;let s=t.doc.resolve(r);if(l.valid(s))return s}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!i.qv.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),n=!1;continue t}break}o=s,r+=e;let a=t.doc.resolve(r);if(l.valid(a))return a}return null}}}l.prototype.visible=!1,l.findFrom=l.findGapCursorFrom,i.Y1.jsonID("gapcursor",l);class c{constructor(t){this.pos=t}map(t){return new c(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return l.valid(e)?new l(e):i.Y1.near(e)}}const d=(0,o.$)({ArrowLeft:u("horiz",-1),ArrowRight:u("horiz",1),ArrowUp:u("vert",-1),ArrowDown:u("vert",1)});function u(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,o){let s=t.selection,a=e>0?s.$to:s.$from,c=s.empty;if(s instanceof i.Bs){if(!o.endOfTextblock(n)||0==a.depth)return!1;c=!1,a=t.doc.resolve(e>0?a.after():a.before())}let d=l.findGapCursorFrom(a,e,c);return!!d&&(r&&r(t.tr.setSelection(new l(d))),!0)}}function h(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!l.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&i.qv.isSelectable(t.state.doc.nodeAt(o.inside))||(t.dispatch(t.state.tr.setSelection(new l(r))),0))}function p(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof l))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=s.HY.empty;for(let t=r.length-1;t>=0;t--)o=s.HY.from(r[t].createAndFill(null,o));let a=t.state.tr.replace(n.pos,n.pos,new s.p2(o,0,0));return a.setSelection(i.Bs.near(a.doc.resolve(n.pos+1))),t.dispatch(a),!1}function f(t){if(!(t.selection instanceof l))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",a.EH.create(t.doc,[a.p.widget(t.selection.head,e,{key:"gapcursor"})])}const m=r.Extension.create({name:"gapCursor",addProseMirrorPlugins:()=>[new i.Sy({props:{decorations:f,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&l.valid(n)?new l(n):null,handleClick:h,handleKeyDown:d,handleDOMEvents:{beforeinput:p}}})],extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,r.callOrReturn)((0,r.getExtensionField)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}})},46741:(t,e,n)=>{n.d(e,{U:()=>o});var r=n(11046);const o=r.Node.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:t}){return["br",(0,r.mergeAttributes)(this.options.HTMLAttributes,t)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command((()=>{const{selection:t,storedMarks:o}=n;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,a=o||t.$to.parentOffset&&t.$from.marks();return e().insertContent({type:this.name}).command((({tr:t,dispatch:e})=>{if(e&&a&&i){const e=a.filter((t=>s.includes(t.type.name)));t.ensureMarks(e)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})},54424:(t,e,n)=>{n.r(e),n.d(e,{Heading:()=>o,default:()=>o});var r=n(11046);const o=r.Node.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,(0,r.mergeAttributes)(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>(0,r.textblockTypeInputRule)({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}})))}})},74361:(t,e,n)=>{n.d(e,{A:()=>S});var r=n(11046),o=200,i=function(){};i.prototype.append=function(t){return t.length?(t=i.from(t),!this.length&&t||t.length=e?i.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},i.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},i.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},i.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},i.from=function(t){return t instanceof i?t:t&&t.length?new s(t):i.empty};var s=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=o)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=o)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(i);i.empty=new s([]);var a=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return to&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&!(n=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(i);const l=i;var c=n(38480),d=n(62463);class u{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}e&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=t.tr,l=[],c=[];return this.items.forEach(((t,e)=>{if(!t.step)return n||(n=this.remapping(o,e+1),r=n.maps.length),r--,void c.push(t);if(n){c.push(new h(t.map));let e,o=t.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(e=a.mapping.maps[a.mapping.maps.length-1],l.push(new h(e,void 0,void 0,l.length+c.length))),r--,e&&n.appendMap(e,r)}else a.maybeStep(t.step);return t.selection?(i=n?t.selection.map(n.slice(r)):t.selection,s=new u(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(t,e,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;nf&&(s=function(t,e){let n;return t.forEach(((t,r)=>{if(t.selection&&0==e--)return n=r,!1})),t.slice(n)}(s,l),i-=l),new u(s.append(o),i)}remapping(t,e){let n=new c.vs;return this.items.forEach(((e,r)=>{let o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,o)}),t,e),n}addMaps(t){return 0==this.eventCount?this:new u(this.items.append(t.map((t=>new h(t)))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach((t=>{t.selection&&s--}),r);let a=e;this.items.forEach((e=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(e.step){let i=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(o.slice(a+1,r));c&&s++,n.push(new h(l,i,c))}else n.push(new h(l))}),r);let l=[];for(let t=e;t500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let t=0;return this.items.forEach((e=>{e.step||t++})),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=t)r.push(i),i.selection&&o++;else if(i.step){let t=i.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let a=i.selection&&i.selection.map(e.slice(n));a&&o++;let l,c=new h(s.invert(),t,a),d=r.length-1;(l=r.length&&r[d].merge(c))?r[d]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new u(l.from(r.reverse()),o)}}u.empty=new u(l.empty,0);class h{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new h(e.getMap().invert(),e,this.selection)}}}class p{constructor(t,e,n,r,o){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const f=20;function m(t){let e=[];return t.forEach(((t,n,r,o)=>e.push(r,o))),e}function g(t,e){if(!t)return null;let n=[];for(let r=0;rnew p(u.empty,u.empty,null,0,-1),apply:(e,n,r)=>function(t,e,n,r){let o,i=n.getMeta(w);if(i)return i.historyState;n.getMeta(x)&&(t=new p(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(w))return s.getMeta(w).redo?new p(t.done.addTransform(n,void 0,r,y(e)),t.undone,m(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new p(t.done,t.undone.addTransform(n,void 0,r,y(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new p(t.done.rebased(n,o),t.undone.rebased(n,o),g(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new p(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),g(t.prevRanges,n.mapping),t.prevTime,t.prevComposition);{let o=n.getMeta("composition"),i=0==t.prevTime||!s&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach(((t,r)=>{for(let o=0;o=e[o]&&(n=!0)})),n}(n,t.prevRanges)),a=s?g(t.prevRanges,n.mapping):m(n.mapping.maps[n.steps.length-1]);return new p(t.done.addTransform(n,i?e.selection.getBookmark():void 0,r,y(e)),u.empty,a,n.time,null==o?t.prevComposition:o)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?A:"historyRedo"==n?M:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const A=(t,e)=>{let n=w.getState(t);return!(!n||0==n.done.eventCount||(e&&b(n,t,e,!1),0))},M=(t,e)=>{let n=w.getState(t);return!(!n||0==n.undone.eventCount||(e&&b(n,t,e,!0),0))},S=r.Extension.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:t,dispatch:e})=>A(t,e),redo:()=>({state:t,dispatch:e})=>M(t,e)}),addProseMirrorPlugins(){return[C(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-Z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Shift-Mod-Z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},82136:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(11046),o=n(62463);const i=r.Node.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:t}){return["hr",(0,r.mergeAttributes)(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{$to:n}=e.selection,r=t();return 0===n.parentOffset?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command((({tr:t,dispatch:e})=>{var n;if(e){const{$to:e}=t.selection,r=e.end();if(e.nodeAfter)e.nodeAfter.isTextblock?t.setSelection(o.Bs.create(t.doc,e.pos+1)):e.nodeAfter.isBlock?t.setSelection(o.qv.create(t.doc,e.pos)):t.setSelection(o.Bs.create(t.doc,e.pos));else{const i=null===(n=e.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();i&&(t.insert(r,i),t.setSelection(o.Bs.create(t.doc,r+1)))}t.scrollIntoView()}return!0})).run()}}},addInputRules(){return[(0,r.nodeInputRule)({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}})},44632:(t,e,n)=>{n.r(e),n.d(e,{Image:()=>i,default:()=>i,inputRegex:()=>o});var r=n(11046);const o=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,i=r.Node.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",(0,r.mergeAttributes)(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[(0,r.nodeInputRule)({find:o,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}})},46057:(t,e,n)=>{n.d(e,{Tx:()=>l});var r=n(11046);const o=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,i=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,s=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,a=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,l=r.Mark.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:t}){return["em",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type}),(0,r.markInputRule)({find:s,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type}),(0,r.markPasteRule)({find:a,type:this.type})]}})},80452:(t,e,n)=>{n.d(e,{H:()=>o});var r=n(11046);const o=r.Node.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}})},54133:(t,e,n)=>{n.d(e,{GS:()=>a});var r=n(11046);const o=r.Node.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),i=r.Mark.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=(0,r.getMarkAttributes)(t,this.type);return!!Object.entries(n).some((([,t])=>!!t))||e.unsetMark(this.name)}}}}),s=/^(\d+)\.\s$/,a=r.Node.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return 1===e?["ol",(0,r.mergeAttributes)(this.options.HTMLAttributes,n),0]:["ol",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o.name,this.editor.getAttributes(i.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=(0,r.wrappingInputRule)({find:s,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.wrappingInputRule)({find:s,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(i.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[t]}})},87660:(t,e,n)=>{n.d(e,{n:()=>o});var r=n(11046);const o=r.Node.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})},27719:(t,e,n)=>{n.d(e,{Re:()=>s});var r=n(11046);const o=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,i=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,s=r.Mark.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML({HTMLAttributes:t}){return["s",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){const t={};return(0,r.isMacOS)()?t["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():t["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),t},addInputRules(){return[(0,r.markInputRule)({find:o,type:this.type})]},addPasteRules(){return[(0,r.markPasteRule)({find:i,type:this.type})]}})},84402:(t,e,n)=>{n.r(e),n.d(e,{TextStyle:()=>o,default:()=>o});var r=n(11046);const o=r.Mark.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:t=>!!t.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:t}){return["span",(0,r.mergeAttributes)(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=(0,r.getMarkAttributes)(t,this.type);return!!Object.entries(n).some((([,t])=>!!t))||e.unsetMark(this.name)}}}})},20239:(t,e,n)=>{n.d(e,{x:()=>r});const r=n(11046).Node.create({name:"text",group:"inline"})},31690:(t,e,n)=>{n.d(e,{$:()=>f,h:()=>p});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),s="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),a=0;a<10;a++)r[48+a]=r[96+a]=String(a);for(a=1;a<=24;a++)r[a+111]="F"+a;for(a=65;a<=90;a++)r[a]=String.fromCharCode(a+32),o[a]=String.fromCharCode(a);for(var l in r)o.hasOwnProperty(l)||(o[l]=r[l]);var c=n(62463);const d="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function u(t){let e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let t=0;t127)&&(a=r[n.keyCode])&&a!=l){let r=e[h(a,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},27439:(t,e,n)=>{function r(t){this.content=t}n.d(e,{aw:()=>Q,PW:()=>at,HY:()=>a,vc:()=>u,ZU:()=>Y,NB:()=>D,Ts:()=>E,e4:()=>h,V_:()=>W,p2:()=>p}),r.prototype={constructor:r,find:function(t){for(var e=0;e>1}},r.from=function(t){if(t instanceof r)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new r(e)};const o=r;function i(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),s=e.child(r);if(o!=s){if(!o.sameMarkup(s))return n;if(o.isText&&o.text!=s.text){for(let t=0;o.text[t]==s.text[t];t++)n++;return n}if(o.content.size||s.content.size){let t=i(o.content,s.content,n+1);if(null!=t)return t}n+=o.nodeSize}else n+=o.nodeSize}}function s(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let a=t.child(--o),l=e.child(--i),c=a.nodeSize;if(a!=l){if(!a.sameMarkup(l))return{a:n,b:r};if(a.isText&&a.text!=l.text){let t=0,e=Math.min(a.text.length,l.text.length);for(;tt&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,t-o),Math.min(a.content.size,e-o),n,r+o)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let o="",i=!0;return this.nodesBetween(t,e,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(t,a)-a,e-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);ot)for(let o=0,i=0;it&&((ie)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),r+=s.nodeSize),i=a}return new a(n,r)}cutByIndex(t,e){return t==e?a.empty:0==t&&e==this.content.length?this:new a(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new a(r,o)}addToStart(t){return new a([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new a(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?c(n+1,o):c(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return a.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new a(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return a.empty;let e,n=0;for(let r=0;r{class t{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;rthis.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;et.type.rank-e.type.rank)),n}}return t.none=[],t})();class h extends Error{}class p{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=m(this.content,t+this.openStart,e);return n&&new p(n,this.openStart,this.openEnd)}removeBetween(t,e){return new p(f(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return p.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new p(a.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let r=t.firstChild;r&&!r.isLeaf&&(e||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=t.lastChild;n&&!n.isLeaf&&(e||!n.type.spec.isolating);n=n.lastChild)r++;return new p(t,n,r)}}function f(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(f(i.content,e-o-1,n-o-1)))}function m(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=m(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function g(t,e,n){if(n.openStart>t.depth)throw new h("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new h("Inconsistent open depths");return b(t,e,n,0)}function b(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r=0;t--)r=e.node(t).copy(a.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return x(i,C(t,o,s,e,r))}{let r=t.parent,o=r.content;return x(r,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}}return x(i,A(t,e,r))}function k(t,e){if(!e.type.compatibleContent(t.type))throw new h("Cannot join "+e.type.name+" onto "+t.type.name)}function v(t,e,n){let r=t.node(n);return k(r,e.node(n)),r}function y(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function w(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(y(t.nodeAfter,r),i++));for(let t=i;to&&v(t,e,o+1),s=r.depth>o&&v(n,r,o+1),l=[];return w(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(k(i,s),y(x(i,C(t,e,n,r,o+1)),l)):(i&&y(x(i,A(t,e,o+1)),l),w(e,n,o,l),s&&y(x(s,A(n,r,o+1)),l)),w(r,null,o,l),new a(l)}function A(t,e,n){let r=[];return w(null,t,n,r),t.depth>n&&y(x(v(t,e,n+1),A(t,e,n+1)),r),w(e,null,n,r),new a(r)}p.empty=new p(a.empty,0,0);class M{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let e=0;e0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new E(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,o=e;for(let e=t;;){let{index:t,offset:i}=e.content.findIndex(o),s=o-i;if(n.push(e,t,r+i),!s)break;if(e=e.child(t),e.isText)break;o=s-1,r+=i+1}return new M(e,n,o)}static resolveCached(t,e){for(let n=0;nt&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),L(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=a.empty,r=0,o=n.childCount){let i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let t=r;tt.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=a.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}D.prototype.text=void 0;class N extends D{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):L(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new N(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new N(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function L(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class I{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new R(t,e);if(null==n.next)return I.empty;let r=z(n);n.next&&n.err("Unexpected trailing text");let o=function(t){let e=Object.create(null);return function n(r){let o=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t{r||o.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let i=e[r.join(",")]=new I(r.indexOf(t.length-1)>-1);for(let t=0;te.concat(t(n,i))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(i,s),o(t(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(t(e.expr,i),s),o(t(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(i)].concat(t(e.expr,i));if("range"==e.type){let s=i;for(let r=0;rt.to=e))}}(r));return function(t,e){for(let n=0,r=[t];nt.createAndFill())));for(let t=0;t=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r{let r=n+(e.validEnd?"*":" ")+" ";for(let n=0;n"+t.indexOf(e.next[n].next);return r})).join("\n")}}I.empty=new I(!0);class R{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function z(t){let e=[];do{e.push(P(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function P(t){let e=[];do{e.push(H(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function H(t){let e=function(t){if(t.eat("(")){let e=z(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let t in n){let r=n[t];r.groups.indexOf(e)>-1&&o.push(r)}return 0==o.length&&t.err("No node type or group '"+e+"' found"),o}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=B(t,e)}return e}function q(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function B(t,e){let n=q(t),r=n;return t.eat(",")&&(r="}"!=t.next?q(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function $(t,e){return e-t}function F(t,e){let n=[];return function e(r){let o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(let t=0;t-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;en[t]=new U(t,e,r)));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let t in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class V{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Y{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=Z(r.attrs),this.excluded=null;let o=J(this.attrs);this.instance=o?new u(this,o):null}create(t=null){return!t&&this.instance?this.instance:new u(this,j(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,o)=>n[t]=new Y(t,r++,e,o))),n}removeFromSet(t){for(var e=0;e-1}}class W{constructor(t){this.cached=Object.create(null);let e=this.spec={};for(let n in t)e[n]=t[n];e.nodes=o.from(t.nodes),e.marks=o.from(t.marks||{}),this.nodes=U.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);let n=Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],r=e.spec.content||"",o=e.spec.marks;e.contentMatch=n[r]||(n[r]=I.parse(r,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.markSet="_"==o?null:o?G(this,o.split(" ")):""!=o&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:G(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof U))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new N(n,n.defaultAttrs,t,u.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return D.fromJSON(this,t)}markFromJSON(t){return u.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function G(t,e){let n=[];for(let r=0;r-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Q{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((t=>{t.tag?this.tags.push(t):t.style&&this.styles.push(t)})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new rt(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new rt(this,e,!0);return n.addAll(t,e.from,e.to),p.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;rt.length&&(61!=i.charCodeAt(t.length)||i.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r{n(t=it(t)),t.mark||t.ignore||t.clearMark||(t.mark=e)}))}for(let e in t.nodes){let r=t.nodes[e].spec.parseDOM;r&&r.forEach((t=>{n(t=it(t)),t.node||t.ignore||t.mark||(t.node=e)}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Q(t,Q.schemaRules(t)))}}const K={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},X={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},tt={ol:!0,ul:!0};function et(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class nt{constructor(t,e,n,r,o,i,s){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=u.none,this.stashMarks=[],this.match=i||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(a.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=a.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(a.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;ethis.addAll(t))),e&&this.sync(n),this.needsBlock=i}else this.withStyleRules(t,(()=>{this.addElementByRule(t,o,!1===o.consuming?n:void 0)}))}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=u.none,n=u.none;for(let r=0;r{i.clearMark(t)&&(n=t.addToSet(n))})):e=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(e),!1!==i.consuming)break;o=i}return[e,n]}addElementByRule(t,e,n){let r,o,i;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(i=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(i));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t)));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(t,e,n){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,i=null==n?null:t.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(let t=0;tthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=o;s--)if(i(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!t||t.name!=a&&-1==t.groups.indexOf(a))return!1;s--}}return!0};return i(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(t){let e=function(t,e){for(let n=0;n=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let e=r.popFromStashMark(t);e&&r.type&&r.type.allowsMarkType(e.type)&&(r.activeMarks=e.addToSet(r.activeMarks))}if(r==e)break}}}function ot(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function it(t){let e={};for(let n in t)e[n]=t[n];return e}function st(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=t=>{i.push(t);for(let n=0;n{if(o.length||t.marks.length){let n=0,i=0;for(;n=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&at.renderSpec(ct(n),r(t,e))}static renderSpec(t,e,n=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r,o=e[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?t.createElementNS(n,o):t.createElement(o),a=e[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let t in a)if(null!=a[t]){let e=t.indexOf(" ");e>0?s.setAttributeNS(t.slice(0,e),t.slice(e+1),a[t]):s.setAttribute(t,a[t])}}for(let o=l;ol)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:e,contentDOM:o}=at.renderSpec(t,i,n);if(s.appendChild(e),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new at(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=lt(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return lt(t.marks)}}function lt(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ct(t){return t.document||window.document}},62463:(t,e,n)=>{n.d(e,{C1:()=>f,yy:()=>C,qv:()=>h,Sy:()=>M,H$:()=>T,Y1:()=>s,xm:()=>a,Bs:()=>d});var r=n(27439),o=n(38480);const i=Object.create(null);class s{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new a(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e=0;r--){let o=e<0?g(t.node(0),t.node(r),t.before(r+1),t.index(r),e,n):g(t.node(0),t.node(r),t.after(r+1),t.index(r)+1,e,n);if(o)return o}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new f(t.node(0))}static atStart(t){return g(t,t,0,0,1)||new f(t)}static atEnd(t){return g(t,t,t.content.size,t.childCount,-1)||new f(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=i[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in i)throw new RangeError("Duplicate use of selection JSON ID "+t);return i[t]=e,e.prototype.jsonID=t,e}getBookmark(){return d.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class a{constructor(t,e){this.$from=t,this.$to=e}}let l=!1;function c(t){l||t.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class d extends s{constructor(t,e=t){c(t),c(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=t.resolve(e.map(this.anchor));return new d(r.parent.inlineContent?r:n,n)}replace(t,e=r.p2.empty){if(super.replace(t,e),e==r.p2.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof d&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new u(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new d(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=s.findFrom(e,n,!0)||s.findFrom(e,-n,!0);if(!t)return s.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r||(t=(s.findFrom(t,-n,!0)||s.findFrom(t,n,!0)).$anchor).posnew f(t)};function g(t,e,n,r,o,i=!1){if(e.inlineContent)return d.create(t,n);for(let s=r-(o>0?0:1);o>0?s=0;s+=o){let r=e.child(s);if(r.isAtom){if(!i&&h.isSelectable(r))return h.create(t,n-(o<0?r.nodeSize:0))}else{let e=g(t,r,n+o,o<0?r.childCount:0,o,i);if(e)return e}n+=r.nodeSize*o}return null}function b(t,e,n){let r=t.steps.length-1;if(r{null==i&&(i=r)})),t.setSelection(s.near(t.doc.resolve(i),n)))}class k extends o.wx{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.vc.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.vc.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let o=this.storedMarks;if(!o){let t=this.doc.resolve(e);o=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function v(t,e){return e&&t?t.bind(e):t}class y{constructor(t,e,n){this.name=t,this.init=v(e.init,n),this.apply=v(e.apply,n)}}const w=[new y("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new y("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new y("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new y("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class x{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=w.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new y(t.key,t.spec.state,t))}))}}class C{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;nt.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],o=r.spec.state;o&&o.toJSON&&(e[n]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let o=new x(t.schema,t.plugins),i=new C(o);return o.fields.forEach((o=>{if("doc"==o.name)i.doc=r.NB.fromJSON(t.schema,e.doc);else if("selection"==o.name)i.selection=s.fromJSON(i.doc,e.selection);else if("storedMarks"==o.name)e.storedMarks&&(i.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],a=s.spec.state;if(s.key==o.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,r))return void(i[o.name]=a.fromJSON.call(s,t,e[r],i))}i[o.name]=o.init(t,i)}})),i}}function A(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=A(o,e,{})),n[r]=o}return n}class M{constructor(t){this.spec=t,this.props={},t.props&&A(t.props,this,this.props),this.key=t.key?t.key.key:_("plugin")}getState(t){return t[this.key]}}const S=Object.create(null);function _(t){return t in S?t+"$"+ ++S[t]:(S[t]=0,t+"$")}class T{constructor(t="key"){this.key=_(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},38480:(t,e,n)=>{n.d(e,{vs:()=>l,FC:()=>k,Pu:()=>b,wx:()=>F,Mn:()=>M,Ax:()=>A,nj:()=>T,nd:()=>x,GJ:()=>_,k9:()=>w,dR:()=>E});var r=n(27439);const o=Math.pow(2,16);function i(t){return 65535&t}class s{constructor(t,e,n){this.pos=t,this.delInfo=e,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class a{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&a.empty)return a.empty}recover(t){let e=0,n=i(t);if(!this.inverted)for(let t=0;tt)break;let d=this.ranges[l+i],u=this.ranges[l+a],h=c+d;if(t<=h){let i=c+r+((d?t==c?-1:t==h?1:e:e)<0?0:u);if(n)return i;let a=t==c?2:t==h?1:4;return(e<0?t!=c:t!=h)&&(a|=8),new s(i,a,t==(e<0?c:h)?null:l/3+(t-c)*o)}r+=u-d}return n?t+r:new s(t+r,0,null)}touches(t,e){let n=0,r=i(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let e=0;et)break;let a=this.ranges[e+o];if(t<=i+a&&e==3*r)return!0;n+=this.ranges[e+s]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new l;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;nn&&et.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),o),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,i)}invert(){return new f(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new p(e.pos,n.pos,this.mark)}merge(t){return t instanceof p&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new p(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new p(e.from,e.to,t.markFromJSON(e.mark))}}d.jsonID("addMark",p);class f extends d{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new r.p2(h(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return u.fromReplace(t,this.from,this.to,n)}invert(){return new p(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new f(e.pos,n.pos,this.mark)}merge(t){return t instanceof f&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new f(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new f(e.from,e.to,t.markFromJSON(e.mark))}}d.jsonID("removeMark",f);class m extends d{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at mark step's position");let n=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let t=this.mark.addToSet(e.marks);if(t.length==e.marks.length){for(let n=0;nn.pos?null:new k(e.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new k(e.from,e.to,e.gapFrom,e.gapTo,r.p2.fromJSON(t,e.slice),e.insert,!!e.structure)}}function v(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let t=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}function y(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function w(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(ni;t--,e--){let n=o.node(t),i=o.index(t);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),a=r&&r[e+1];a&&(s=s.replaceChild(0,a.type.create(a.attrs)));let l=r&&r[e]||n;if(!n.canReplace(i+1,n.childCount)||!l.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function M(t,e){let n=t.resolve(e),r=n.index();return S(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function S(t,e){return!(!t||!e||t.isLeaf||!t.canAppend(e))}function _(t,e,n=-1){let r=t.resolve(e);for(let t=r.depth;;t--){let o,i,s=r.index(t);if(t==r.depth?(o=r.nodeBefore,i=r.nodeAfter):n>0?(o=r.node(t+1),s++,i=r.node(t).maybeChild(s)):(o=r.node(t).maybeChild(s-1),i=r.node(t+1)),o&&!o.isTextblock&&S(o,i)&&r.node(t).canReplace(s,s+1))return e;if(0==t)break;e=n<0?r.before(t):r.after(t)}}function T(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let t=0;t=0;e--){let n=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,i=r.index(e)+(n>0?1:0),s=r.node(e),a=!1;if(1==t)a=s.canReplace(i,i,o);else{let t=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=t&&s.canReplaceWith(i,i,t[0])}if(a)return 0==n?r.pos:n<0?r.before(e+1):r.after(e+1)}return null}function E(t,e,n=e,o=r.p2.empty){if(e==n&&!o.size)return null;let i=t.resolve(e),s=t.resolve(n);return O(i,s,o)?new b(e,n,o):new D(i,s,o).fit()}function O(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}d.jsonID("replaceAround",k);class D{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.HY.empty;for(let e=0;e<=t.depth;e++){let n=t.node(e);this.frontier.push({type:n.type,match:n.contentMatchAt(t.indexAfter(e))})}for(let e=t.depth;e>0;e--)this.placed=r.HY.from(t.node(e).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,o=this.close(t<0?this.$to:n.doc.resolve(t));if(!o)return null;let i=this.placed,s=n.depth,a=o.depth;for(;s&&a&&1==i.childCount;)i=i.firstChild.content,s--,a--;let l=new r.p2(i,s,a);return t>-1?new k(n.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||n.pos!=this.$to.pos?new b(n.pos,o.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n1&&(r=0),o.type.spec.isolating&&r<=n){t=n;break}e=o.content}for(let e=1;e<=2;e++)for(let n=1==e?t:this.unplaced.openStart;n>=0;n--){let t,o=null;n?(o=I(this.unplaced.content,n-1).firstChild,t=o.content):t=this.unplaced.content;let i=t.firstChild;for(let t=this.depth;t>=0;t--){let s,{type:a,match:l}=this.frontier[t],c=null;if(1==e&&(i?l.matchType(i.type)||(c=l.fillBefore(r.HY.from(i),!1)):o&&a.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:t,parent:o,inject:c};if(2==e&&i&&(s=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:t,parent:o,wrap:s};if(o&&l.matchType(o.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,o=I(t,e);return!(!o.childCount||o.firstChild.isLeaf||(this.unplaced=new r.p2(t,e+1,Math.max(n,o.size+e>=t.size-n?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,o=I(t,e);if(o.childCount<=1&&e>0){let i=t.size-e<=e+o.size;this.unplaced=new r.p2(N(t,e-1,1),e-1,i?e-1:n)}else this.unplaced=new r.p2(N(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:o,wrap:i}){for(;this.depth>e;)this.closeFrontierNode();if(i)for(let t=0;t1||0==l||t.content.size)&&(u=e,d.push(R(t.mark(h.allowedMarks(t.marks)),1==c?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=L(this.placed,e,r.HY.from(d)),this.frontier[e].match=u,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let t=0,e=a;t1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],o=e=0;n--){let{match:e,type:r}=this.frontier[n],o=z(t,n,r,e,!0);if(!o||o.childCount)continue t}return{depth:e,fit:i,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=L(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=L(this.placed,this.depth,r.HY.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.HY.empty,!0);t.childCount&&(this.placed=L(this.placed,this.frontier.length,t))}}function N(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(N(t.firstChild.content,e-1,n)))}function L(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(L(t.lastChild.content,e-1,n)))}function I(t,e){for(let n=0;n1&&(o=o.replaceChild(0,R(o.firstChild,e-1,1==o.childCount?n-1:0))),e>0&&(o=t.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(r.HY.empty,!0)))),t.copy(o)}function z(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(t,e,n){for(let r=n;ro){let e=i.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.HY.empty,!0))}return t}function H(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let o=t.start(r);if(oe.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}class q extends d{constructor(t,e,n){super(),this.pos=t,this.attr=e,this.value=n}apply(t){let e=t.nodeAt(this.pos);if(!e)return u.fail("No node at attribute step's position");let n=Object.create(null);for(let t in e.attrs)n[t]=e.attrs[t];n[this.attr]=this.value;let o=e.type.create(n,null,e.marks);return u.fromReplace(t,this.pos,this.pos+1,new r.p2(r.HY.from(o),0,e.isLeaf?0:1))}getMap(){return a.empty}invert(t){return new q(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new q(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new q(e.pos,e.attr,e.value)}}d.jsonID("attr",q);class B extends d{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let n in t.attrs)e[n]=t.attrs[n];e[this.attr]=this.value;let n=t.type.create(e,t.content,t.marks);return u.ok(n)}getMap(){return a.empty}invert(t){return new B(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,e){if("string"!=typeof e.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new B(e.attr,e.value)}}d.jsonID("docAttr",B);let $=class extends Error{};$=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},($.prototype=Object.create(Error.prototype)).constructor=$,$.prototype.name="TransformError";class F{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new l}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new $(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=r.p2.empty){let o=E(this.doc,t,e,n);return o&&this.step(o),this}replaceWith(t,e,n){return this.replace(t,e,new r.p2(r.HY.from(n),0,0))}delete(t,e){return this.replace(t,e,r.p2.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,o){if(!o.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),s=t.doc.resolve(n);if(O(i,s,o))return t.step(new b(e,n,o));let a=H(i,t.doc.resolve(n));0==a[a.length-1]&&a.pop();let l=-(i.depth+1);a.unshift(l);for(let t=i.depth,e=i.pos-1;t>0;t--,e--){let n=i.node(t).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;a.indexOf(t)>-1?l=t:i.before(t)==e&&a.splice(1,0,-t)}let c=a.indexOf(l),d=[],u=o.openStart;for(let t=o.content,e=0;;e++){let n=t.firstChild;if(d.push(n),e==o.openStart)break;t=n.content}for(let t=u-1;t>=0;t--){let e=d[t],n=(h=e.type).spec.defining||h.spec.definingForContent;if(n&&!e.sameMarkup(i.node(Math.abs(l)-1)))u=t;else if(n||!e.type.isTextblock)break}var h;for(let e=o.openStart;e>=0;e--){let l=(e+u+1)%(o.openStart+1),h=d[l];if(h)for(let e=0;e=0&&(t.replace(e,n,o),!(t.steps.length>p));r--){let t=a[r];t<0||(e=i.before(t),n=s.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,o){if(!o.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let r=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let t=r.depth-1;t>=0;t--){let e=r.index(t);if(r.node(t).canReplaceWith(e,e,n))return r.before(t+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let t=r.depth-1;t>=0;t--){let e=r.indexAfter(t);if(r.node(t).canReplaceWith(e,e,n))return r.after(t+1);if(e0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return t.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return t.delete(r.before(i),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:o,$to:i,depth:s}=e,a=o.before(s+1),l=i.after(s+1),c=a,d=l,u=r.HY.empty,h=0;for(let t=s,e=!1;t>n;t--)e||o.index(t)>0?(e=!0,u=r.HY.from(o.node(t).copy(u)),h++):c--;let p=r.HY.empty,f=0;for(let t=s,e=!1;t>n;t--)e||i.after(t+1)=0;t--){if(o.size){let e=n[t].type.contentMatch.matchFragment(o);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.HY.from(n[t].type.create(n[t].attrs,o))}let i=e.start,s=e.end;t.step(new k(i,s,i,s,new r.p2(o,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,o=null){return function(t,e,n,o,i){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,((e,n)=>{if(e.isTextblock&&!e.hasMarkup(o,i)&&function(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(t.doc,t.mapping.slice(s).map(n),o)){t.clearIncompatible(t.mapping.slice(s).map(n,1),o);let a=t.mapping.slice(s),l=a.map(n,1),c=a.map(n+e.nodeSize,1);return t.step(new k(l,c,l+1,c-1,new r.p2(r.HY.from(o.create(i,null,e.marks)),0,0),1,!0)),!1}}))}(this,t,e,n,o),this}setNodeMarkup(t,e,n=null,o){return function(t,e,n,o,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let a=n.create(o,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,a);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new k(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new r.p2(r.HY.from(a),0,0),1,!0))}(this,t,e,n,o),this}setNodeAttribute(t,e,n){return this.step(new q(t,e,n)),this}setDocAttribute(t,e){return this.step(new B(t,e)),this}addNodeMark(t,e){return this.step(new m(t,e)),this}removeNodeMark(t,e){if(!(e instanceof r.vc)){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(n.marks)))return this}return this.step(new g(t,e)),this}split(t,e=1,n){return function(t,e,n=1,o){let i=t.doc.resolve(e),s=r.HY.empty,a=r.HY.empty;for(let t=i.depth,e=i.depth-n,l=n-1;t>e;t--,l--){s=r.HY.from(i.node(t).copy(s));let e=o&&o[l];a=r.HY.from(e?e.type.create(e.attrs,a):i.node(t).copy(a))}t.step(new b(e,e,new r.p2(s.append(a),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let o,i,s=[],a=[];t.doc.nodesBetween(e,n,((t,l,c)=>{if(!t.isInline)return;let d=t.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),u=Math.min(l+t.nodeSize,n),h=r.addToSet(d);for(let t=0;tt.step(e))),a.forEach((e=>t.step(e)))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,o){let i=[],s=0;t.doc.nodesBetween(e,n,((t,a)=>{if(!t.isInline)return;s++;let l=null;if(o instanceof r.ZU){let e,n=t.marks;for(;e=o.isInSet(n);)(l||(l=[])).push(e),n=e.removeFromSet(n)}else o?o.isInSet(t.marks)&&(l=[o]):l=t.marks;if(l&&l.length){let r=Math.min(a+t.nodeSize,n);for(let t=0;tt.step(new f(e.from,e.to,e.style))))}(this,t,e,n),this}clearIncompatible(t,e,n){return function(t,e,n,o=n.contentMatch){let i=t.doc.nodeAt(e),s=[],a=e+1;for(let e=0;e=0;e--)t.step(s[e])}(this,t,e,n),this}}},43594:(t,e,n)=>{n.d(e,{p:()=>ze,EH:()=>qe,tk:()=>ln});var r=n(62463),o=n(27439),i=n(38480);const s=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},a=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let l=null;const c=function(t,e,n){let r=l||(l=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},d=function(t,e,n,r){return n&&(h(t,e,n,r,-1)||h(t,e,n,r,1))},u=/^(img|br|input|textarea|hr)$/i;function h(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:p(t))){let n=t.parentNode;if(!n||1!=n.nodeType||f(t)||u.test(t.nodeName)||"false"==t.contentEditable)return!1;e=s(t)+(o<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?p(t):0}}}function p(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function f(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const m=function(t){return t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function g(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const b="undefined"!=typeof navigator?navigator:null,k="undefined"!=typeof document?document:null,v=b&&b.userAgent||"",y=/Edge\/(\d+)/.exec(v),w=/MSIE \d/.exec(v),x=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(v),C=!!(w||x||y),A=w?document.documentMode:x?+x[1]:y?+y[1]:0,M=!C&&/gecko\/(\d+)/i.test(v);M&&(/Firefox\/(\d+)/.exec(v)||[0,0])[1];const S=!C&&/Chrome\/(\d+)/.exec(v),_=!!S,T=S?+S[1]:0,E=!C&&!!b&&/Apple Computer/.test(b.vendor),O=E&&(/Mobile\/\w+/.test(v)||!!b&&b.maxTouchPoints>2),D=O||!!b&&/Mac/.test(b.platform),N=!!b&&/Win/.test(b.platform),L=/Android \d/.test(v),I=!!k&&"webkitFontSmoothing"in k.documentElement.style,R=I?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function z(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function P(t,e){return"number"==typeof t?t:t[e]}function H(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function q(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=a(s)){if(1!=s.nodeType)continue;let t=s,n=t==i.body,a=n?z(i):H(t),l=0,c=0;if(e.topa.bottom-P(r,"bottom")&&(c=e.bottom-e.top>a.bottom-a.top?e.top+P(o,"top")-a.top:e.bottom-a.bottom+P(o,"bottom")),e.lefta.right-P(r,"right")&&(l=e.right-a.right+P(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=t.scrollLeft,r=t.scrollTop;c&&(t.scrollTop+=c),l&&(t.scrollLeft+=l);let o=t.scrollLeft-n,i=t.scrollTop-r;e={left:e.left-o,top:e.top-i,right:e.right-o,bottom:e.bottom-i}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function B(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=a(r));return e}function $(t,e){for(let n=0;n=d){l=Math.max(p.bottom,l),d=Math.min(p.top,d);let t=p.left>e.left?p.left-e.left:p.right=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!o&&p.left<=e.left&&p.right>=e.left&&(o=u,i={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(a=h+1)}}return!n&&o&&(n=o,r=i,s=0),n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||s&&1==n.nodeType?{node:t,offset:a}:J(n,r)}function j(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Z(t,e,n){let r=t.childNodes.length;if(r&&n.tope.top&&o++}let r;I&&o&&1==n.nodeType&&1==(r=n.childNodes[o-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=e.top&&o--,n==t.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(s=function(t,e,n,r){let o=-1;for(let n=e,i=!1;n!=t.dom;){let e=t.docView.nearestDesc(n,!0);if(!e)return null;if(1==e.dom.nodeType&&(e.node.isBlock&&e.parent&&!i||!e.contentDOM)){let t=e.dom.getBoundingClientRect();if(e.node.isBlock&&e.parent&&!i&&(i=!0,t.left>r.left||t.top>r.top?o=e.posBefore:(t.right-1?o:t.docView.posFromDOM(e,n,-1)}(t,n,o,e))}null==s&&(s=function(t,e,n){let{node:r,offset:o}=J(e,n),i=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();i=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}(t,l,e));let c=t.docView.nearestDesc(l,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function V(t){return t.top=0&&o==r.nodeValue.length?(t--,i=1):n<0?t--:e++,Q(Y(c(r,t,e),i),i<0)}{let t=Y(c(r,o,o),n);if(M&&o&&/\s/.test(r.nodeValue[o-1])&&o=0)}if(null==i&&o&&(n<0||o==p(r))){let t=r.childNodes[o-1],e=3==t.nodeType?c(t,p(t)-(s?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return Q(Y(e,1),!1)}if(null==i&&o=0)}function Q(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function K(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function X(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}const tt=/[\u0590-\u08ac]/;let et=null,nt=null,rt=!1;class ot{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;es(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!e||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==t.nodeType?t:t.parentNode):o==t))return i;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let t=e;t;t=t.parent)if(t==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;et||o instanceof ut){r=t-e;break}e=i}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(let t;n&&!(t=this.children[n-1]).size&&t instanceof it&&t.side>=0;n--);if(e<=0){let t,r=!0;for(;t=n?this.children[n-1]:null,t&&t.dom.parentNode!=this.contentDOM;n--,r=!1);return t&&e&&r&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?s(t.dom)+1:0}}{let t,r=!0;for(;t=n=o&&e<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,o);t=i;for(let e=a;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=s(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(l>e||a==this.children.length-1)){e=l;for(let t=a+1;ta&&ie){let t=a;a=l,l=t}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r=n:tn){let r=n+o.border,s=i-o.border;if(t>=r&&e<=s)return this.dirty=t==n||e==i?2:1,void(t!=r||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-r,e-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirtyo?o.parent?o.parent.posBeforeChild(o):void 0:r))),!e.type.spec.raw){if(1!=i.nodeType){let t=document.createElement("span");t.appendChild(i),i=t}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class st extends ot{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class at extends ot{constructor(t,e,n,r){super(t,[],n,r),this.mark=e}static create(t,e,n,r){let i=r.nodeViews[e.type.name],s=i&&i(e,r,n);return s&&s.dom||(s=o.PW.renderSpec(document,e.type.spec.toDOM(e,n))),new at(t,e,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty0&&(o=At(o,0,t,n));for(let t=0;ta?a.parent?a.parent.posBeforeChild(a):void 0:s),n,r),d=c&&c.dom,u=c&&c.contentDOM;if(e.isText)if(d){if(3!=d.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(e.text);else d||({dom:d,contentDOM:u}=o.PW.renderSpec(document,e.type.spec.toDOM(e)));u||e.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable="false"),e.type.spec.draggable&&(d.draggable=!0));let h=d;return d=vt(d,n,e),c?a=new ht(t,e,n,r,d,u||null,h,c,i,s+1):e.isText?new dt(t,e,n,r,d,h,i):new lt(t,e,n,r,d,u||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>o.HY.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&yt(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,i=t.composing?this.localCompositionInfo(t,e):null,s=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new xt(this,s&&s.node,t);!function(t,e,n,r){let o=e.locals(t),i=0;if(0==o.length){for(let n=0;ni;)a.push(o[s++]);let f=i+h.nodeSize;if(h.isText){let t=f;s!t.inline)):a.slice(),e.forChild(i,h),p),i=f}}(this.node,this.innerDeco,((e,i,s)=>{e.spec.marks?l.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!s&&l.syncToMarks(i==this.node.childCount?o.vc.none:this.node.child(i).marks,n,t),l.placeWidget(e,t,r)}),((e,o,s,c)=>{let d;l.syncToMarks(e.marks,n,t),l.findNodeMatch(e,o,s,c)||a&&t.state.selection.from>r&&t.state.selection.to-1&&l.updateNodeAt(e,o,s,d,t)||l.updateNextNode(e,o,s,t,c,r)||l.addNode(e,o,s,t,r),r+=e.nodeSize})),l.syncToMarks([],n,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),pt(this.contentDOM,this.children,t),O&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:o}=t.state.selection;if(!(t.state.selection instanceof r.Bs)||ne+this.node.content.size)return null;let i=t.domSelectionRange(),s=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=p(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let t=a=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,o-e);return r<0?null:{node:s,pos:r,text:t}}return{node:s,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let o=e;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new st(this,o,e,r);t.input.compositionNodes.push(i),this.children=At(this.children,n,n+r.length,t,i)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node)||(this.updateInner(t,e,n,r),0))}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(yt(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=bt(this.dom,this.nodeDOM,gt(this.outerDeco,this.node,e),gt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function ct(t,e,n,r,o){vt(r,e,t);let i=new lt(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class dt extends lt{constructor(t,e,n,r,o,i,s){super(t,e,n,r,o,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node)||(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,0))}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new dt(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class ut extends ot{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class ht extends lt{constructor(t,e,n,r,o,i,s,a,l,c){super(t,e,n,r,o,i,s,l,c),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(t,e,n);return o&&this.updateInner(t,e,n,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function pt(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof at)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n>1,i=Math.min(o,t.length);for(;r-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=at.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,n))i=this.top.children.indexOf(o,this.index);else for(let r=this.index,o=Math.min(this.top.children.length,r+5);r=n||d<=e?i.push(l):(cn&&i.push(l.slice(n-c,l.size,r)))}return i}function Mt(t,e=null){let n=t.domSelectionRange(),o=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),a=i&&0==i.size,l=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(l<0)return null;let c,d,u=o.resolve(l);if(m(n)){for(c=u;i&&!i.node;)i=i.parent;let t=i.node;if(i&&t.isAtom&&r.qv.isSelectable(t)&&i.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,o=e==p(t);r||o;){if(t==n)return!0;let e=s(t);if(!(t=t.parentNode))return!1;r=r&&0==e,o=o&&e==p(t)}}(n.focusNode,n.focusOffset,i.dom))){let t=i.posBefore;d=new r.qv(l==t?u:o.resolve(t))}}else{let e=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(e<0)return null;c=o.resolve(e)}return d||(d=It(t,c,u,"pointer"==e||t.state.selection.head{n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{St(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Tt=E||_&&T<63;function Et(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=rr(t,e,n)))||r.Bs.between(e,n,o)}function Rt(t){return!(t.editable&&!t.hasFocus())&&zt(t)}function zt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(t){return!1}}function Pt(t,e){let{$anchor:n,$head:o}=t.selection,i=e>0?n.max(o):n.min(o),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&r.Y1.findFrom(s,e)}function Ht(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function qt(t,e,n){let o=t.state.selection;if(!(o instanceof r.Bs)){if(o instanceof r.qv&&o.node.isInline)return Ht(t,new r.Bs(e>0?o.$to:o.$from));{let n=Pt(t.state,e);return!!n&&Ht(t,n)}}if(n.indexOf("s")>-1){let{$head:n}=o,i=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(n.pos+i.nodeSize*(e<0?-1:1));return Ht(t,new r.Bs(o.$anchor,s))}if(!o.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Pt(t.state,e);return!!(n&&n instanceof r.qv)&&Ht(t,n)}if(!(D&&n.indexOf("m")>-1)){let n,i=o.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText)return!1;let a=e<0?i.pos-s.nodeSize:i.pos;return!!(s.isAtom||(n=t.docView.descAt(a))&&!n.contentDOM)&&(r.qv.isSelectable(s)?Ht(t,new r.qv(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):!!I&&Ht(t,new r.Bs(t.state.doc.resolve(e<0?a:a+s.nodeSize))))}}function Bt(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function $t(t,e){let n=t.pmViewDesc;return n&&0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName)}function Ft(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,a=!1;for(M&&1==n.nodeType&&r0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if($t(t,-1))o=n,i=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Jt(n))break;{let e=n.previousSibling;for(;e&&$t(e,-1);)o=n.parentNode,i=s(e),e=e.previousSibling;if(e)n=e,r=Bt(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}a?jt(t,n,r):o&&jt(t,o,i)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,a=Bt(n);for(;;)if(r{t.state==o&&_t(t)}),50)}function Zt(t,e){let n=t.state.doc.resolve(e);if(!_&&!N&&n.parent.inlineContent){let r=t.coordsAtPos(e);if(e>n.start()){let n=t.coordsAtPos(e-1),o=(n.top+n.bottom)/2;if(o>r.top&&o1)return n.leftr.top&&o1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function Ut(t,e,n){let o=t.state.selection;if(o instanceof r.Bs&&!o.empty||n.indexOf("s")>-1)return!1;if(D&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Pt(t.state,e);if(n&&n instanceof r.qv)return Ht(t,n)}if(!i.parent.inlineContent){let n=e<0?i:s,a=o instanceof r.C1?r.Y1.near(n,e):r.Y1.findFrom(n,e);return!!a&&Ht(t,a)}return!1}function Vt(t,e){if(!(t.state.selection instanceof r.Bs))return!0;let{$head:n,$anchor:o,empty:i}=t.state.selection;if(!n.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=t.state.tr;return e<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),t.dispatch(r),!0}return!1}function Yt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Wt(t,e){t.someProp("transformCopied",(n=>{e=n(e,t)}));let n=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,s--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let a=t.someProp("clipboardSerializer")||o.PW.fromSchema(t.state.schema),l=ie(),c=l.createElement("div");c.appendChild(a.serializeFragment(r,{document:l}));let d,u=c.firstChild,h=0;for(;u&&1==u.nodeType&&(d=re[u.nodeName.toLowerCase()]);){for(let t=d.length-1;t>=0;t--){let e=l.createElement(d[t]);for(;c.firstChild;)e.appendChild(c.firstChild);c.appendChild(e),h++}u=c.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${i} ${s}${h?` -${h}`:""} ${JSON.stringify(n)}`),{dom:c,text:t.someProp("clipboardTextSerializer",(n=>n(e,t)))||e.content.textBetween(0,e.content.size,"\n\n")}}function Gt(t,e,n,r,i){let s,a,l=i.parent.type.spec.code;if(!n&&!e)return null;let c=e&&(r||l||!n);if(c){if(t.someProp("transformPastedText",(n=>{e=n(e,l||r,t)})),l)return e?new o.p2(o.HY.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):o.p2.empty;let n=t.someProp("clipboardTextParser",(n=>n(e,i,r,t)));if(n)a=n;else{let n=i.marks(),{schema:r}=t.state,a=o.PW.fromSchema(r);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(a.serializeNode(r.text(t,n)))}))}}else t.someProp("transformPastedHTML",(e=>{n=e(n,t)})),s=function(t){let e=/^(\s*]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=ie().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);if((n=o&&re[o[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"")).reverse().join("")),r.innerHTML=t,n)for(let t=0;t0;t--){let t=s.firstChild;for(;t&&1!=t.nodeType;)t=t.nextSibling;if(!t)break;s=t}if(!a){let e=t.someProp("clipboardParser")||t.someProp("domParser")||o.aw.fromSchema(t.state.schema);a=e.parseSlice(s,{preserveWhitespace:!(!c&&!u),context:i,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||Qt.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(u)a=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(e){return t}let{content:i,openStart:s,openEnd:a}=t;for(let t=n.length-2;t>=0;t-=2){let e=r.nodes[n[t]];if(!e||e.hasRequiredAttrs())break;i=o.HY.from(e.create(n[t+1],i)),s++,a++}return new o.p2(i,s,a)}(ne(a,+u[1],+u[2]),u[4]);else if(a=o.p2.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,i=e.node(n).contentMatchAt(e.index(n)),s=[];if(t.forEach((t=>{if(!s)return;let e,n=i.findWrapping(t.type);if(!n)return s=null;if(e=s.length&&r.length&&Xt(n,r,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=te(s[s.length-1],r.length));let e=Kt(t,n);s.push(e),i=i.matchType(e.type),r=n}})),s)return o.HY.from(s)}return t}(a.content,i),!0),a.openStart||a.openEnd){let t=0,e=0;for(let e=a.content.firstChild;t{a=e(a,t)})),a}const Qt=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Kt(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,o.HY.from(t));return t}function Xt(t,e,n,r,i){if(i1&&(s=0),i=n&&(l=e<0?a.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(a.contentMatchAt(a.childCount).fillBefore(o.HY.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,a.copy(l))}function ne(t,e,n){return e{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>he(t,e))}))}function he(t,e){return t.someProp("handleDOMEvents",(n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function pe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function fe(t){return{left:t.clientX,top:t.clientY}}function me(t,e,n,r,o){if(-1==r)return!1;let i=t.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(t.someProp(e,(e=>r>i.depth?e(t,n,i.nodeAfter,i.before(r),o,!0):e(t,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function ge(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function be(t,e,n,r){return me(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(n=>n(t,e,r)))}function ke(t,e,n,o){return me(t,"handleTripleClickOn",e,n,o)||t.someProp("handleTripleClick",(n=>n(t,e,o)))||function(t,e,n){if(0!=n.button)return!1;let o=t.state.doc;if(-1==e)return!!o.inlineContent&&(ge(t,r.Bs.create(o,0,o.content.size),"pointer"),!0);let i=o.resolve(e);for(let e=i.depth+1;e>0;e--){let n=e>i.depth?i.nodeAfter:i.node(e),s=i.before(e);if(n.inlineContent)ge(t,r.Bs.create(o,s+1,s+1+n.content.size),"pointer");else{if(!r.qv.isSelectable(n))continue;ge(t,r.qv.create(o,s),"pointer")}return!0}}(t,n,o)}function ve(t){return Se(t)}ae.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!xe(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!L||!_||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!O||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||function(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);if(8==n||D&&72==n&&"c"==r)return Vt(t,-1)||Ft(t,-1);if(46==n&&!e.shiftKey||D&&68==n&&"c"==r)return Vt(t,1)||Ft(t,1);if(13==n||27==n)return!0;if(37==n||D&&66==n&&"c"==r){let e=37==n?"ltr"==Zt(t,t.state.selection.from)?-1:1:-1;return qt(t,e,r)||Ft(t,e)}if(39==n||D&&70==n&&"c"==r){let e=39==n?"ltr"==Zt(t,t.state.selection.from)?1:-1:1;return qt(t,e,r)||Ft(t,e)}return 38==n||D&&80==n&&"c"==r?Ut(t,-1,r)||Ft(t,-1):40==n||D&&78==n&&"c"==r?function(t){if(!E||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Yt(t,n,"true"),setTimeout((()=>Yt(t,n,"false")),20)}return!1}(t)||Ut(t,1,r)||Ft(t,1):r==(D?"m":"c")&&(66==n||73==n||89==n||90==n)}(t,n)?n.preventDefault():de(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},ae.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},ae.keypress=(t,e)=>{let n=e;if(xe(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||D&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let o=t.state.selection;if(!(o instanceof r.Bs&&o.$from.sameParent(o.$to))){let e=String.fromCharCode(n.charCode);/[\r\n]/.test(e)||t.someProp("handleTextInput",(n=>n(t,o.$from.pos,o.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const ye=D?"metaKey":"ctrlKey";se.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=ve(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[ye]&&("singleClick"==t.input.lastClick.type?i="doubleClick":"doubleClick"==t.input.lastClick.type&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(fe(n));s&&("singleClick"==i?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new we(t,s,n,!!r)):("doubleClick"==i?be:ke)(t,s.pos,s.inside,n)?n.preventDefault():de(t,"pointer"))};class we{constructor(t,e,n,o){let i,s;if(this.view=t,this.pos=e,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[ye],this.allowDefault=n.shiftKey,e.inside>-1)i=t.state.doc.nodeAt(e.inside),s=e.inside;else{let n=t.state.doc.resolve(e.pos);i=n.parent,s=n.depth?n.before():0}const a=o?null:n.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(0==n.button&&i.type.spec.draggable&&!1!==i.type.spec.selectable||c instanceof r.qv&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!M||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),de(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>_t(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(fe(t))),this.updateAllowDefault(t),this.allowDefault||!e?de(this.view,"pointer"):function(t,e,n,o,i){return me(t,"handleClickOn",e,n,o)||t.someProp("handleClick",(n=>n(t,e,o)))||(i?function(t,e){if(-1==e)return!1;let n,o,i=t.state.selection;i instanceof r.qv&&(n=i.node);let s=t.state.doc.resolve(e);for(let t=s.depth+1;t>0;t--){let e=t>s.depth?s.nodeAfter:s.node(t);if(r.qv.isSelectable(e)){o=n&&i.$from.depth>0&&t>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(t);break}}return null!=o&&(ge(t,r.qv.create(t.state.doc,o),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),o=n.nodeAfter;return!!(o&&o.isAtom&&r.qv.isSelectable(o))&&(ge(t,new r.qv(n),"pointer"),!0)}(t,n))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||E&&this.mightDrag&&!this.mightDrag.node.isAtom||_&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(ge(this.view,r.Y1.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):de(this.view,"pointer")}move(t){this.updateAllowDefault(t),de(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function xe(t,e){return!!t.composing||!!(E&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}se.touchstart=t=>{t.input.lastTouch=Date.now(),ve(t),de(t,"pointer")},se.touchmove=t=>{t.input.lastTouch=Date.now(),de(t,"pointer")},se.contextmenu=t=>ve(t);const Ce=L?5e3:-1;function Ae(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>Se(t)),e))}function Me(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Se(t,e=!1){if(!(L&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Me(t),e||t.docView&&t.docView.dirty){let e=Mt(t);return e&&!e.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(e)):t.updateState(t.state),!0}return!1}}ae.compositionstart=ae.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),Se(t,!0),t.markCursor=null;else if(Se(t),M&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&1==n.nodeType&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(3==e.nodeType){t.domSelection().collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}Ae(t,Ce)},ae.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionPendingChanges&&Promise.resolve().then((()=>t.domObserver.flush())),t.input.compositionID++,Ae(t,20))};const _e=C&&A<15||O&&R<604;function Te(t,e,n,r,i){let s=Gt(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,i,s||o.p2.empty))))return!0;if(!s)return!1;let a=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(s),l=a?t.state.tr.replaceSelectionWith(a,r):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ee(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}se.copy=ae.cut=(t,e)=>{let n=e,r=t.state.selection,o="cut"==n.type;if(r.empty)return;let i=_e?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Wt(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ae.paste=(t,e)=>{let n=e;if(t.composing&&!L)return;let r=_e?null:n.clipboardData,o=t.input.shiftKey&&45!=t.input.lastKeyCode;r&&Te(t,Ee(r),r.getData("text/html"),o,n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&45!=t.input.lastKeyCode;setTimeout((()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Te(t,r.value,null,o,e):Te(t,r.textContent,r.innerHTML,o,e)}),50)}(t,n)};class Oe{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const De=D?"altKey":"ctrlKey";se.dragstart=(t,e)=>{let n=e,o=t.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i,s=t.state.selection,a=s.empty?null:t.posAtCoords(fe(n));if(a&&a.pos>=s.from&&a.pos<=(s instanceof r.qv?s.to-1:s.to));else if(o&&o.mightDrag)i=r.qv.create(t.state.doc,o.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(i=r.qv.create(t.state.doc,e.posBefore))}let l=(i||t.state.selection).content(),{dom:c,text:d}=Wt(t,l);n.dataTransfer.clearData(),n.dataTransfer.setData(_e?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",_e||n.dataTransfer.setData("text/plain",d),t.dragging=new Oe(l,!n[De],i)},se.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},ae.dragover=ae.dragenter=(t,e)=>e.preventDefault(),ae.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let a=t.posAtCoords(fe(n));if(!a)return;let l=t.state.doc.resolve(a.pos),c=s&&s.slice;c?t.someProp("transformPasted",(e=>{c=e(c,t)})):c=Gt(t,Ee(n.dataTransfer),_e?null:n.dataTransfer.getData("text/html"),!1,l);let d=!(!s||n[De]);if(t.someProp("handleDrop",(e=>e(t,n,c||o.p2.empty,d))))return void n.preventDefault();if(!c)return;n.preventDefault();let u=c?(0,i.nj)(t.state.doc,l.pos,c):l.pos;null==u&&(u=l.pos);let h=t.state.tr;if(d){let{node:t}=s;t?t.replace(h):h.deleteSelection()}let p=h.mapping.map(u),f=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,m=h.doc;if(f?h.replaceRangeWith(p,p,c.content.firstChild):h.replaceRange(p,p,c),h.doc.eq(m))return;let g=h.doc.resolve(p);if(f&&r.qv.isSelectable(c.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(c.content.firstChild))h.setSelection(new r.qv(g));else{let e=h.mapping.map(u);h.mapping.maps[h.mapping.maps.length-1].forEach(((t,n,r,o)=>e=o)),h.setSelection(It(t,g,h.doc.resolve(e)))}t.focus(),t.dispatch(h.setMeta("uiEvent","drop"))},se.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&_t(t)}),20))},se.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},se.beforeinput=(t,e)=>{if(_&&L&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,g(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let t in ae)se[t]=ae[t];function Ne(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Le{constructor(t,e){this.toDOM=t,this.spec=e||He,this.side=this.spec.side||0}map(t,e,n,r){let{pos:o,deleted:i}=t.mapResult(e.from+r,this.side<0?-1:1);return i?null:new ze(o-n,o-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Le&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Ne(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ie{constructor(t,e){this.attrs=t,this.spec=e||He}map(t,e,n,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new ze(o,i,this)}valid(t,e){return e.from=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;it){let s=this.children[i]+1;this.children[i+2].findInner(t-s,e-s,n,r+s,o)}}map(t,e,n){return this==Be||0==t.maps.length?this:this.mapInner(t,e,0,0,n||He)}mapInner(t,e,n,r,o){let i;for(let s=0;s{let s=i-o-(n-t);for(let o=0;oi+e-r)continue;let l=a[o]+e-r;n>=l?a[o+1]=t<=l?-2:-1:t>=e&&s&&(a[o]+=s,a[o+1]+=s)}r+=s})),e=n.maps[t].map(e,-1)}let l=!1;for(let e=0;e=r.content.size){l=!0;continue}let u=n.map(t[e+1]+i,-1)-o,{index:h,offset:p}=r.content.findIndex(d),f=r.maybeChild(h);if(f&&p==d&&p+f.nodeSize==u){let r=a[e+2].mapInner(n,f,c+1,t[e]+i+1,s);r!=Be?(a[e]=d,a[e+1]=u,a[e+2]=r):(a[e+1]=-2,l=!0)}else l=!0}if(l){let l=function(t,e,n,r,o,i,s){function a(t,e){for(let i=0;i{let s,a=i+n;if(s=Je(e,t,a)){for(r||(r=this.children.slice());oi&&e.to=t){this.children[e]==t&&(n=this.children[e+2]);break}let o=t+1,i=o+e.content.size;for(let t=0;to&&e.type instanceof Ie){let t=Math.max(o,e.from)-o,n=Math.min(i,e.to)-o;tn.map(t,e,He)));return $e.from(n)}forChild(t,e){if(e.isLeaf)return qe.empty;let n=[];for(let r=0;rt instanceof qe))?t:t.reduce(((t,e)=>t.concat(e instanceof qe?e:e.members)),[]))}}}function Fe(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;rn&&e.to{let a=Je(t,e,s+n);if(a){i=!0;let t=Ze(a,e,n+s+1,r);t!=Be&&o.push(s,s+e.nodeSize,t)}}));let s=Fe(i?je(t):t,-n).sort(Ue);for(let t=0;t0;)e++;t.splice(e,0,n)}function We(t){let e=[];return t.someProp("decorations",(n=>{let r=n(t.state);r&&r!=Be&&e.push(r)})),t.cursorWrapper&&e.push(qe.create(t.state.doc,[t.cursorWrapper.deco])),$e.from(e)}const Ge={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Qe=C&&A<=11;class Ke{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Xe{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Ke,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),Qe&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Ge)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;ethis.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Rt(this.view)){if(this.suppressingSelectionUpdates)return _t(this.view);if(C&&A<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let e,n=new Set;for(let e=t.focusNode;e;e=a(e))n.add(e);for(let r=t.anchorNode;r;r=a(r))if(n.has(r)){e=r;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let e=this.pendingRecords();e.length&&(this.queue=[]);let n=t.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Rt(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,a=!1,l=[];if(t.editable)for(let t=0;t1){let t=l.filter((t=>"BR"==t.nodeName));if(2==t.length){let e=t[0],n=t[1];e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)-1||o)&&(i>-1&&(t.docView.markDirty(i,s),function(t){if(!tn.has(t)&&(tn.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace))){if(t.requiresGeckoHackNode=M,en)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),en=!0}}(t)),this.handleDOMChange(i,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||_t(t),this.currentSelection.set(n))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;ne.content.size?null:It(t,e.resolve(n.anchor),e.resolve(n.head))}function sn(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,o++}return o}function an(t){if(2!=t.length)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class ln{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new ce,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(pn),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=un(this),dn(this),this.nodeViews=hn(this),this.docView=ct(this.state.doc,cn(this),We(this),this.dom,this),this.domObserver=new Xe(this,((t,e,n,i)=>function(t,e,n,i,s){let a=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=Mt(t,e);if(n&&!t.state.selection.eq(n)){if(_&&L&&13===t.input.lastKeyCode&&Date.now()-100e(t,g(13,"Enter")))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),a&&r.setMeta("composition",a),t.dispatch(r)}return}let l=t.state.doc.resolve(e),c=l.sharedDepth(n);e=l.before(c+1),n=t.state.doc.resolve(n).after(c+1);let d,u,h=t.state.selection,p=function(t,e,n){let r,{node:i,fromOffset:s,toOffset:a,from:l,to:c}=t.docView.parseRange(e,n),d=t.domSelectionRange(),u=d.anchorNode;if(u&&t.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:d.anchorOffset}],m(d)||r.push({node:d.focusNode,offset:d.focusOffset})),_&&8===t.input.lastKeyCode)for(let t=a;t>s;t--){let e=i.childNodes[t-1],n=e.pmViewDesc;if("BR"==e.nodeName&&!n){a=t;break}if(!n||n.size)break}let h=t.state.doc,p=t.someProp("domParser")||o.aw.fromSchema(t.state.schema),f=h.resolve(l),g=null,b=p.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:a,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:nn,context:f});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),g={anchor:t+l,head:e+l}}return{doc:b,sel:g,from:l,to:c}}(t,e,n),f=t.state.doc,b=f.slice(p.from,p.to);8===t.input.lastKeyCode&&Date.now()-100=s?i-r:0;i-=t,i&&i=a?i-r:0;i-=e,i&&iDate.now()-225||L)&&s.some((t=>1==t.nodeType&&!rn.test(t.nodeName)))&&(!k||k.endA>=k.endB)&&t.someProp("handleKeyDown",(e=>e(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!k){if(!(i&&h instanceof r.Bs&&!h.empty&&h.$head.sameParent(h.$anchor))||t.composing||p.sel&&p.sel.anchor!=p.sel.head){if(p.sel){let e=on(t,t.state.doc,p.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);a&&n.setMeta("composition",a),t.dispatch(n)}}return}k={start:h.from,endA:h.to,endB:h.to}}if(_&&t.cursorWrapper&&p.sel&&p.sel.anchor==t.cursorWrapper.deco.from&&p.sel.head==p.sel.anchor){let t=k.endB-k.start;p.sel={anchor:p.sel.anchor+t,head:p.sel.anchor+t}}t.input.domChangeCount++,t.state.selection.fromt.state.selection.from&&k.start<=t.state.selection.from+2&&t.state.selection.from>=p.from?k.start=t.state.selection.from:k.endA=t.state.selection.to-2&&t.state.selection.to<=p.to&&(k.endB+=t.state.selection.to-k.endA,k.endA=t.state.selection.to)),C&&A<=11&&k.endB==k.start+1&&k.endA==k.start&&k.start>p.from&&"  "==p.doc.textBetween(k.start-p.from-1,k.start-p.from+1)&&(k.start--,k.endA--,k.endB--);let v,y=p.doc.resolveNoCache(k.start-p.from),w=p.doc.resolveNoCache(k.endB-p.from),x=f.resolve(k.start),M=y.sameParent(w)&&y.parent.inlineContent&&x.end()>=k.endA;if((O&&t.input.lastIOSEnter>Date.now()-225&&(!M||s.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!M&&y.pose(t,g(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>k.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||sn(r,!0,!1)n||sn(s,!0,!1)e(t,g(8,"Backspace")))))return void(L&&_&&t.domObserver.suppressSelectionUpdates());_&&L&&k.endB==k.start&&(t.input.lastAndroidDelete=Date.now()),L&&!M&&y.start()!=w.start()&&0==w.parentOffset&&y.depth==w.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==k.endA&&(k.endB-=2,w=p.doc.resolveNoCache(k.endB-p.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,g(13,"Enter"))}))}),20));let S,T,E,D=k.start,N=k.endA;if(M)if(y.pos==w.pos)C&&A<=11&&0==y.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>_t(t)),20)),S=t.state.tr.delete(D,N),T=f.resolve(k.start).marksAcross(f.resolve(k.endA));else if(k.endA==k.endB&&(E=function(t,e){let n,r,i,s=t.firstChild.marks,a=e.firstChild.marks,l=s,c=a;for(let t=0;tt.mark(r.addToSet(t.marks));else{if(0!=l.length||1!=c.length)return null;r=c[0],n="remove",i=t=>t.mark(r.removeFromSet(t.marks))}let d=[];for(let t=0;tn(t,D,N,e))))return;S=t.state.tr.insertText(e,D,N)}if(S||(S=t.state.tr.replace(D,N,p.doc.slice(k.start-p.from,k.endB-p.from))),p.sel){let e=on(t,S.doc,p.sel);e&&!(_&&L&&t.composing&&e.empty&&(k.start!=k.endB||t.input.lastAndroidDelete{!pe(t,e)||he(t,e)||!t.editable&&e.type in ae||n(t,e)},le[e]?{passive:!0}:void 0)}E&&t.dom.addEventListener("input",(()=>null)),ue(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&ue(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(pn),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let t in this._props)e[t]=this._props[t];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,e){var n;let r=this.state,o=!1,i=!1;t.storedMarks&&this.composing&&(Me(this),i=!0),this.state=t;let s=r.plugins!=t.plugins||this._props.plugins!=e.plugins;if(s||this._props.plugins!=e.plugins||this._props.nodeViews!=e.nodeViews){let t=hn(this);(function(t,e){let n=0,r=0;for(let r in t){if(t[r]!=e[r])return!0;n++}for(let t in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,o=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&ue(this),this.editable=un(this),dn(this);let a=We(this),l=cn(this),c=r.plugins==t.plugins||r.doc.eq(t.doc)?t.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",u=o||!this.docView.matchesNode(t.doc,l,a);!u&&t.selection.eq(r.selection)||(i=!0);let h="preserve"==c&&i&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s=o-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:B(t.dom)}}(this);if(i){this.domObserver.stop();let e=u&&(C||_)&&!this.composing&&!r.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(r.selection,t.selection);if(u){let n=_?this.trackWrites=this.domSelectionRange().focusNode:null;!o&&this.docView.update(t.doc,l,a,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=ct(t.doc,l,a,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return d(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?_t(this,e):(Nt(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():h&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;$(n,0==r?0:r-e)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(this.state.selection instanceof r.qv){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&q(this,e.getBoundingClientRect(),t)}else q(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e0&&this.state.doc.nodeAt(t))==n.node&&(o=t)}this.dragging=new Oe(t.slice,t.move,o<0?void 0:r.qv.create(this.state.doc,o))}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let r=0;rt.ownerDocument.getSelection()),this._root=t;return t||document}updateRoot(){this._root=null}posAtCoords(t){return U(this,t)}coordsAtPos(t,e=1){return G(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return function(t,e,n){return et==e&&nt==n?rt:(et=e,nt=n,rt="up"==n||"down"==n?function(t,e,n){let r=e.selection,o="up"==n?r.$from:r.$to;return X(t,e,(()=>{let{node:e}=t.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.contentDOM||n.dom;break}e=n.dom.parentNode}let r=G(t,o.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=c(t,0,t.nodeValue.length).getClientRects()}for(let t=0;to.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=t.domSelection();return tt.test(r.parent.textContent)&&a.modify?X(t,e,(()=>{let{focusNode:e,focusOffset:o,anchorNode:i,anchorOffset:s}=t.domSelectionRange(),l=a.caretBidiLevel;a.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:u}=t.domSelectionRange(),h=d&&!c.contains(1==d.nodeType?d:d.parentNode)||e==d&&o==u;try{a.collapse(i,s),e&&(e!=i||o!=s)&&a.extend&&a.extend(e,o)}catch(t){}return null!=l&&(a.caretBidiLevel=l),h})):"left"==n||"backward"==n?i:s}(t,e,n))}(this,e||this.state,t)}pasteHTML(t,e){return Te(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Te(this,t,null,!0,e||new ClipboardEvent("paste"))}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],We(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){he(t,e)||!se[e.type]||!t.editable&&e.type in ae||se[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){return E&&11===this.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom?function(t){let e;function n(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}t.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",n,!0);let r=e.startContainer,o=e.startOffset,i=e.endContainer,s=e.endOffset,a=t.domAtPos(t.state.selection.anchor);return d(a.node,a.offset,i,s)&&([r,o,i,s]=[i,s,r,o]),{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}}(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function cn(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t?e.class+=" "+n[t]:"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),e.translate||(e.translate="no"),[ze.node(0,t.state.doc.content.size,e)]}function dn(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:ze.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function un(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function hn(t){let e=Object.create(null);function n(t){for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function pn(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}},93854:t=>{t.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}')}}]); \ No newline at end of file diff --git a/index.html b/index.html index 732d4ac07..5d129009c 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/runtime.880ab0dcd93ac4fb915d.js b/runtime.5f90fd08a2bd1f4cd279.js similarity index 98% rename from runtime.880ab0dcd93ac4fb915d.js rename to runtime.5f90fd08a2bd1f4cd279.js index d3f3c1b96..3d8a0cdd8 100644 --- a/runtime.880ab0dcd93ac4fb915d.js +++ b/runtime.5f90fd08a2bd1f4cd279.js @@ -1 +1 @@ -(()=>{var e,a,d,c,b,f,t={},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var d=r[e]={exports:{}};return t[e].call(d.exports,d,d.exports,o),d.exports}o.m=t,e=[],o.O=(a,d,c,b)=>{if(!d){var f=1/0;for(i=0;i=b)&&Object.keys(o.O).every((e=>o.O[e](d[r])))?d.splice(r--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[d,c,b]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var b=Object.create(null);o.r(b);var f={};a=a||[null,d({}),d([]),d(d)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=d(t))Object.getOwnPropertyNames(t).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,o.d(b,f),b},o.d=(e,a)=>{for(var d in a)o.o(a,d)&&!o.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,d)=>(o.f[d](e,a),a)),[])),o.u=e=>(8592===e?"common":e)+"."+{52:"2402ce50a8fbac9370d0",122:"53e1b3be69041587d8fb",250:"b733e8bc8f558384c7da",295:"b6e6ef86690137ab8e5a",456:"3188e78a70d9a5063003",517:"80388d0359c1cc6def61",585:"f21a56891ad1bdaf7927",668:"2f5b106fd24b13da460a",740:"60a9341a19d1f96ceeed",760:"b27d3ecc00cf0ce26a6d",961:"1629b86fd96b50ff619d",965:"646aeba90241cfc2d864",1023:"3ff29f1dbcd2282c2dc8",1089:"139452a2302bbb17dcb4",1091:"1216d8fae44b0464d7e1",1197:"0fe787db14568ca3e7d7",1239:"b3bc537cbb088de44ec9",1318:"ca23dd7c98752caca924",1320:"e06b9b50c47dbfbf7397",1374:"c8ec5183b1573c38e151",1397:"54377db422763dcd18b9",1407:"dc4fec35e94b9a27fa91",1447:"f4f1a32af49b39d39934",1556:"0466e8eba97511558467",1591:"56054b07f87be2efccc5",1628:"be36d415c9418639748e",1646:"4849b6218956185b71d2",1685:"f6c490484faa767fba72",1720:"88c2278e5861261f9182",1752:"dd0f3258b5353712fefa",1837:"18f8a363d72f05e49f2a",1919:"9438c7f4d8a9477bb42c",1947:"8ed4437b9d8f6024bcdf",1975:"c30844dfb684d707a1a7",2163:"9b43cf1dce62136fb55a",2180:"0d7db9f62b57c6f80b61",2206:"ccce8846b12bba153eb5",2280:"5d34e171dc8c55e078d5",2291:"a59fe9d785d20523f70a",2504:"f97bd87651a2d8ece9e5",2520:"116d7450a70d10bbca50",2590:"bfe7b4cc291626f5a95f",2609:"84f928e79e6625e6b9f1",2785:"b638f2d17e3b352275de",2797:"7a8b62c7e626678d4445",2809:"a89014ec96bec62bff27",2889:"f6b598326d0bb9b476c9",2948:"2ae9422b2d1c55b4cb20",2954:"cfd993d5bfabc022e821",3065:"dab5b2a9edaa4c4d4aea",3243:"f365a7616779de04307c",3270:"cf6d551500932d4d35f1",3336:"20be46b8db10370d0048",3346:"634f8103a381ac1f44ca",3505:"a6a1c7cdf977dd098d3c",3625:"1a6bfc909c9d1016cafa",3705:"7cbda165d6e4faeb7aca",3725:"b7ae239abbfa1321276c",3732:"bde7f1296bd59d541533",3851:"90fd4e6279761b18e468",3878:"25a4f56963938f54bae2",3979:"e5964390b826d2991cae",4203:"75d558a90ef244c9d43d",4254:"33398fd5b02735c564f4",4334:"b4f0a8e36216a9e14cfe",4401:"648e12ffc0528d04cb98",4417:"d5e2d3497fa2c699af2d",4430:"8df640fbe922392b885f",4529:"039175a263b1d46c0fa4",4661:"626c8b6672e436fd2d6d",4941:"bafa519b52caacf26479",4992:"1166dac4ce958ec6b5e6",5034:"b306a3a3c53e7634a2cd",5110:"2f12d9405f6ae0955dde",5183:"16dd9d5f4f15b7caa52f",5213:"ad94d27017ecc332f302",5224:"883c53a9868a36ee9982",5227:"9496cbf66e50740fd473",5255:"edb24a0699207c4bf99a",5445:"243ea18744dcab12196e",5468:"d6cdb31583e83ad8ae8c",5496:"875499bddc862172efba",5499:"1c11445aa18eaae08167",5501:"7b7821935e81baf526f7",5557:"86dcba00e525a9adedca",5625:"ef24fca4af71b7a75bd6",5659:"42ef8dec7e4554c263db",5681:"8e2922ae00b1c7cd5e9c",5776:"4ec082ca459a070b5acf",5833:"a22534cdaf581e64ec49",5901:"4aa3cb8df1e3672a6582",5935:"9027a38acdac49de4b85",5988:"29475e73518bea708428",5991:"e4492ffcfa116a1f4742",6014:"0a1cf2b5d8a232b4a8c6",6036:"dc719cc87abaf1cf6816",6042:"f546c4eb39a8e5c0aad1",6135:"c279e1afc1d1f1d493c3",6158:"c3c34de6f2f3ca946a5a",6205:"55980240898424ad823f",6233:"e09bf322a1e1de6bbd57",6240:"82b4c16a132b14b4872b",6416:"787306864446cace320d",6504:"939850b31d46bdbefdfd",6510:"a24f73253841f80793bf",6512:"ea617fcaa751151e5ec9",6530:"b0ce6d5d5d44938cf6d6",6549:"637eb42da74c2e3b3707",6568:"cd7373a88bb24bd73c90",6612:"d2e0d63de73a95139120",6633:"b369469a3dbe1b232b74",6847:"9ab2113227ec56dbb752",6921:"f3c2cd64190051588304",6949:"4078bb4fb37f2a72cb29",6969:"63e163069fbed394aaaa",7013:"3f868693a4be5f2e2dcd",7090:"024f8993ad763edbb9f4",7133:"436ca30f0c53737b85c6",7145:"9a5e65852ff12571b6bd",7147:"643d7c99f1edbd73e5ff",7170:"1175cb3f95ebf5d6cc6f",7195:"8d200519daa4128381f8",7207:"8486c9269624016d2269",7289:"f2fa42ec8df416a51afc",7305:"4cc1abba95b286f3e3c7",7398:"25408298719e402872b2",7410:"8138708cda6d84bd3f40",7573:"8dd60b19b04503933c31",7681:"6efab7d97ca30c9a4f2a",7703:"392f2d7d45404d1ae7ae",7726:"7940b7c5db5b23dfccec",7751:"9a78a0f09fcbbf92d672",7802:"33f05eab7265edc1fa72",7880:"d20181c1bb669b6180ca",7904:"620879bfced1134b5b8d",7932:"6d5d9b17cf3d6a597130",7966:"a40b96e8b79ae4dcbe03",7976:"58478b695a391cb72175",7991:"5aa819a0d301c6c9391b",8033:"f2453080664d15a9aed6",8078:"c4aea44b9340f3822770",8199:"4b235721d9c02d4e741b",8229:"a486e5d101ef89c0923b",8275:"e3c06ee3915ab25adff6",8430:"a3bf3a975cf99e805e6b",8490:"7debdd5e0d6d4ca2cb96",8499:"9a9531d0a35047ba1e7d",8500:"a3c159e758973f5ffec9",8537:"2a1b1a65bde18056c703",8592:"0181c0cdf25bf5403f6c",8606:"0f21d0a620d9bce03cff",8645:"527991cde05c7de42050",8669:"4eda33d8771a70612dd2",8681:"f9ed48ecc9373ea2cc19",8712:"494a027de6d38ee9e44e",8760:"dd3603ab640439fef834",8785:"7885b511b8b242ee4b42",8817:"ae6ac19f3b02852665b8",8840:"94fe6333787f19b06fae",8841:"9e408eed8792bdfd2d6f",8876:"8ab0244d08652eabd42f",8889:"68c42da83da3833c3a92",8929:"7655052a06d4688ebf1d",8932:"670c51b15d55e2fa42ae",8934:"af7f977abba60a73118d",8954:"ddec6eb9e78fe0fe5846",9019:"920a7e6d9c330317fd8a",9095:"466c4d34d2c3783a72bf",9155:"0632315e9df336d8ed22",9241:"b1878c03ab50c1671b21",9284:"a569e2a5b348212320a2",9289:"78b416e270fb1116ef1f",9345:"241e17befa9a49d6c01c",9478:"d0fd8d94aed25154f051",9507:"2a174f4d47d5d912c065",9544:"4059665b329d5a5661e0",9624:"0ba3a24bca8a727cd16e",9638:"676db5c1f9c701b73842",9668:"ea572dc532465e38f2a3",9746:"d768110bd4ef5de36856",9762:"84bcdbd5bb416e7b1903",9801:"3c3179d3fd5123c2628c",9869:"686535a71408a042a24f",9889:"8d5bbe938a3151c44776",9918:"76599a584cd5be55c50b",9946:"b52d5a4117d2009cc614",9970:"1927703f8210d0472ad4"}[e]+".js",o.miniCssF=e=>"styles.4c58b86fe0418b927a41.css",o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},b="tui-editor:",o.l=(e,a,d,f)=>{if(c[e])c[e].push(a);else{var t,r;if(void 0!==d)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(d))),a)return a(d)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),r&&document.head.appendChild(t)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.tu=e=>(void 0===f&&(f={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(f=trustedTypes.createPolicy("angular#bundler",f))),f.createScriptURL(e)),o.p="",(()=>{var e={3666:0};o.f.j=(a,d)=>{var c=o.o(e,a)?e[a]:void 0;if(0!==c)if(c)d.push(c[2]);else if(3666!=a){var b=new Promise(((d,b)=>c=e[a]=[d,b]));d.push(c[2]=b);var f=o.p+o.u(a),t=new Error;o.l(f,(d=>{if(o.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var b=d&&("load"===d.type?"missing":d.type),f=d&&d.target&&d.target.src;t.message="Loading chunk "+a+" failed.\n("+b+": "+f+")",t.name="ChunkLoadError",t.type=b,t.request=f,c[1](t)}}),"chunk-"+a,a)}else e[a]=0},o.O.j=a=>0===e[a];var a=(a,d)=>{var c,b,[f,t,r]=d,n=0;for(c in t)o.o(t,c)&&(o.m[c]=t[c]);if(r)var i=r(o);for(a&&a(d);n{var e,a,d,c,b,f,t={},r={};function o(e){var a=r[e];if(void 0!==a)return a.exports;var d=r[e]={exports:{}};return t[e].call(d.exports,d,d.exports,o),d.exports}o.m=t,e=[],o.O=(a,d,c,b)=>{if(!d){var f=1/0;for(i=0;i=b)&&Object.keys(o.O).every((e=>o.O[e](d[r])))?d.splice(r--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[d,c,b]},o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var b=Object.create(null);o.r(b);var f={};a=a||[null,d({}),d([]),d(d)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=d(t))Object.getOwnPropertyNames(t).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,o.d(b,f),b},o.d=(e,a)=>{for(var d in a)o.o(a,d)&&!o.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((a,d)=>(o.f[d](e,a),a)),[])),o.u=e=>(8592===e?"common":e)+"."+{52:"2402ce50a8fbac9370d0",122:"53e1b3be69041587d8fb",250:"b733e8bc8f558384c7da",295:"b6e6ef86690137ab8e5a",456:"3188e78a70d9a5063003",517:"80388d0359c1cc6def61",585:"f21a56891ad1bdaf7927",668:"2f5b106fd24b13da460a",740:"60a9341a19d1f96ceeed",760:"b27d3ecc00cf0ce26a6d",961:"1629b86fd96b50ff619d",965:"646aeba90241cfc2d864",1023:"3ff29f1dbcd2282c2dc8",1089:"139452a2302bbb17dcb4",1091:"1216d8fae44b0464d7e1",1197:"0fe787db14568ca3e7d7",1239:"b3bc537cbb088de44ec9",1318:"ca23dd7c98752caca924",1320:"e06b9b50c47dbfbf7397",1374:"c8ec5183b1573c38e151",1397:"54377db422763dcd18b9",1407:"dc4fec35e94b9a27fa91",1447:"f4f1a32af49b39d39934",1556:"0466e8eba97511558467",1591:"56054b07f87be2efccc5",1628:"be36d415c9418639748e",1646:"4849b6218956185b71d2",1685:"f6c490484faa767fba72",1720:"88c2278e5861261f9182",1752:"dd0f3258b5353712fefa",1837:"18f8a363d72f05e49f2a",1919:"9438c7f4d8a9477bb42c",1947:"8ed4437b9d8f6024bcdf",1975:"c30844dfb684d707a1a7",2163:"9b43cf1dce62136fb55a",2180:"0d7db9f62b57c6f80b61",2206:"ccce8846b12bba153eb5",2280:"5d34e171dc8c55e078d5",2291:"a59fe9d785d20523f70a",2504:"f97bd87651a2d8ece9e5",2520:"116d7450a70d10bbca50",2590:"bfe7b4cc291626f5a95f",2609:"84f928e79e6625e6b9f1",2785:"b638f2d17e3b352275de",2797:"7a8b62c7e626678d4445",2809:"a89014ec96bec62bff27",2889:"f6b598326d0bb9b476c9",2948:"2ae9422b2d1c55b4cb20",2954:"cfd993d5bfabc022e821",3065:"dab5b2a9edaa4c4d4aea",3243:"f365a7616779de04307c",3270:"cf6d551500932d4d35f1",3336:"20be46b8db10370d0048",3346:"634f8103a381ac1f44ca",3505:"a6a1c7cdf977dd098d3c",3625:"1a6bfc909c9d1016cafa",3705:"7cbda165d6e4faeb7aca",3725:"b7ae239abbfa1321276c",3732:"bde7f1296bd59d541533",3851:"90fd4e6279761b18e468",3878:"25a4f56963938f54bae2",3979:"e5964390b826d2991cae",4203:"75d558a90ef244c9d43d",4254:"33398fd5b02735c564f4",4334:"b4f0a8e36216a9e14cfe",4401:"648e12ffc0528d04cb98",4417:"d5e2d3497fa2c699af2d",4430:"8df640fbe922392b885f",4529:"039175a263b1d46c0fa4",4661:"626c8b6672e436fd2d6d",4941:"bafa519b52caacf26479",4992:"1166dac4ce958ec6b5e6",5034:"b306a3a3c53e7634a2cd",5110:"2f12d9405f6ae0955dde",5183:"16dd9d5f4f15b7caa52f",5213:"ad94d27017ecc332f302",5224:"883c53a9868a36ee9982",5227:"9496cbf66e50740fd473",5255:"edb24a0699207c4bf99a",5445:"243ea18744dcab12196e",5468:"d6cdb31583e83ad8ae8c",5496:"875499bddc862172efba",5499:"1c11445aa18eaae08167",5501:"7b7821935e81baf526f7",5557:"86dcba00e525a9adedca",5625:"ef24fca4af71b7a75bd6",5659:"42ef8dec7e4554c263db",5681:"8e2922ae00b1c7cd5e9c",5776:"4ec082ca459a070b5acf",5833:"a22534cdaf581e64ec49",5901:"4aa3cb8df1e3672a6582",5935:"9027a38acdac49de4b85",5988:"29475e73518bea708428",5991:"e4492ffcfa116a1f4742",6014:"0a1cf2b5d8a232b4a8c6",6036:"dc719cc87abaf1cf6816",6042:"f546c4eb39a8e5c0aad1",6135:"c279e1afc1d1f1d493c3",6158:"c3c34de6f2f3ca946a5a",6205:"55980240898424ad823f",6233:"e09bf322a1e1de6bbd57",6240:"82b4c16a132b14b4872b",6416:"787306864446cace320d",6504:"939850b31d46bdbefdfd",6510:"a24f73253841f80793bf",6512:"ea617fcaa751151e5ec9",6530:"b0ce6d5d5d44938cf6d6",6549:"637eb42da74c2e3b3707",6568:"cd7373a88bb24bd73c90",6612:"d2e0d63de73a95139120",6633:"b369469a3dbe1b232b74",6847:"9ab2113227ec56dbb752",6921:"f3c2cd64190051588304",6949:"4078bb4fb37f2a72cb29",6969:"63e163069fbed394aaaa",7013:"3f868693a4be5f2e2dcd",7090:"024f8993ad763edbb9f4",7133:"436ca30f0c53737b85c6",7145:"9a5e65852ff12571b6bd",7147:"643d7c99f1edbd73e5ff",7170:"1175cb3f95ebf5d6cc6f",7195:"94c7e156baaa7c206013",7207:"8486c9269624016d2269",7289:"f2fa42ec8df416a51afc",7305:"4cc1abba95b286f3e3c7",7398:"25408298719e402872b2",7410:"8138708cda6d84bd3f40",7573:"8dd60b19b04503933c31",7681:"6efab7d97ca30c9a4f2a",7703:"392f2d7d45404d1ae7ae",7726:"7940b7c5db5b23dfccec",7751:"9a78a0f09fcbbf92d672",7802:"33f05eab7265edc1fa72",7880:"d20181c1bb669b6180ca",7904:"620879bfced1134b5b8d",7932:"6d5d9b17cf3d6a597130",7966:"a40b96e8b79ae4dcbe03",7976:"58478b695a391cb72175",7991:"5aa819a0d301c6c9391b",8033:"f2453080664d15a9aed6",8078:"c4aea44b9340f3822770",8199:"4b235721d9c02d4e741b",8229:"a486e5d101ef89c0923b",8275:"e3c06ee3915ab25adff6",8430:"a3bf3a975cf99e805e6b",8490:"7debdd5e0d6d4ca2cb96",8499:"9a9531d0a35047ba1e7d",8500:"a3c159e758973f5ffec9",8537:"2a1b1a65bde18056c703",8592:"0181c0cdf25bf5403f6c",8606:"0f21d0a620d9bce03cff",8645:"527991cde05c7de42050",8669:"4eda33d8771a70612dd2",8681:"f9ed48ecc9373ea2cc19",8712:"494a027de6d38ee9e44e",8760:"dd3603ab640439fef834",8785:"7885b511b8b242ee4b42",8817:"ae6ac19f3b02852665b8",8840:"94fe6333787f19b06fae",8841:"9e408eed8792bdfd2d6f",8876:"8ab0244d08652eabd42f",8889:"68c42da83da3833c3a92",8929:"7655052a06d4688ebf1d",8932:"670c51b15d55e2fa42ae",8934:"af7f977abba60a73118d",8954:"ddec6eb9e78fe0fe5846",9019:"920a7e6d9c330317fd8a",9095:"466c4d34d2c3783a72bf",9155:"0632315e9df336d8ed22",9241:"b1878c03ab50c1671b21",9284:"a569e2a5b348212320a2",9289:"78b416e270fb1116ef1f",9345:"241e17befa9a49d6c01c",9478:"d0fd8d94aed25154f051",9507:"2a174f4d47d5d912c065",9544:"4059665b329d5a5661e0",9624:"0ba3a24bca8a727cd16e",9638:"676db5c1f9c701b73842",9668:"ea572dc532465e38f2a3",9746:"d768110bd4ef5de36856",9762:"84bcdbd5bb416e7b1903",9801:"3c3179d3fd5123c2628c",9869:"686535a71408a042a24f",9889:"8d5bbe938a3151c44776",9918:"76599a584cd5be55c50b",9946:"b52d5a4117d2009cc614",9970:"1927703f8210d0472ad4"}[e]+".js",o.miniCssF=e=>"styles.4c58b86fe0418b927a41.css",o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},b="tui-editor:",o.l=(e,a,d,f)=>{if(c[e])c[e].push(a);else{var t,r;if(void 0!==d)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(d))),a)return a(d)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),r&&document.head.appendChild(t)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.tu=e=>(void 0===f&&(f={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(f=trustedTypes.createPolicy("angular#bundler",f))),f.createScriptURL(e)),o.p="",(()=>{var e={3666:0};o.f.j=(a,d)=>{var c=o.o(e,a)?e[a]:void 0;if(0!==c)if(c)d.push(c[2]);else if(3666!=a){var b=new Promise(((d,b)=>c=e[a]=[d,b]));d.push(c[2]=b);var f=o.p+o.u(a),t=new Error;o.l(f,(d=>{if(o.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var b=d&&("load"===d.type?"missing":d.type),f=d&&d.target&&d.target.src;t.message="Loading chunk "+a+" failed.\n("+b+": "+f+")",t.name="ChunkLoadError",t.type=b,t.request=f,c[1](t)}}),"chunk-"+a,a)}else e[a]=0},o.O.j=a=>0===e[a];var a=(a,d)=>{var c,b,[f,t,r]=d,n=0;for(c in t)o.o(t,c)&&(o.m[c]=t[c]);if(r)var i=r(o);for(a&&a(d);n