PageSourceSearch

https://edupark.ai/static/js/2580.68bfbfab.chunk.js

js edupark.ai collected 2026-10-05 12:15:56 UTC 684,654 bytes, 2 lines download raw bytes

1/*! For license information please see 2580.68bfbfab.chunk.js.LICENSE.txt */
2(globalThis.webpackChunkedupark_client||=[]).push([[2580],{5360(t,e,n){"use strict";const r=(0,n(84702).A)("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);n.d(e,["A",0,r])},69170(t,e,n){"use strict";const r=(0,n(84702).A)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);n.d(e,["A",0,r])},5082(t,e,n){"use strict";const r=(0,n(84702).A)("cloud-off",[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);n.d(e,["A",0,r])},36574(t,e,n){"use strict";const r=(0,n(84702).A)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);n.d(e,["A",0,r])},17018(t,e,n){"use strict";const r=(0,n(84702).A)("heading-2",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]]);n.d(e,["A",0,r])},72073(t,e,n){"use strict";const r=(0,n(84702).A)("heading-3",[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]]);n.d(e,["A",0,r])},39167(t,e,n){"use strict";const r=(0,n(84702).A)("image-plus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);n.d(e,["A",0,r])},42351(t,e,n){"use strict";const r=(0,n(84702).A)("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);n.d(e,["A",0,r])},86232(t,e,n){"use strict";const r=(0,n(84702).A)("square-code",[["path",{d:"m10 9-3 3 3 3",key:"1oro0q"}],["path",{d:"m14 15 3-3-3-3",key:"bz13h7"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);n.d(e,["A",0,r])},87288(t,e,n){"use strict";const r=(0,n(84702).A)("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]);n.d(e,["A",0,r])},2302(t){var e=!0,n=!1,r=!1;function o(t,e,n){var r=t.attrIndex(e),o=[e,n];r<0?t.attrPush(o):t.attrs[r]=o}function i(t,e){for(var n=t[e].level-1,r=e-1;r>=0;r--)if(t[r].level===n)return r;return-1}function s(t,e){return"inline"===t[e].type&&function(t){return"paragraph_open"===t.type}(t[e-1])&&function(t){return"list_item_open"===t.type}(t[e-2])&&function(t){return 0===t.content.indexOf("[ ] ")||0===t.content.indexOf("[x] ")||0===t.content.indexOf("[X] ")}(t[e])}function l(t,o){if(t.children.unshift(function(t,n){var r=new n("html_inline","",0),o=e?' disabled="" ':"";0===t.content.indexOf("[ ] ")?r.content='<input class="task-list-item-checkbox"'+o+'type="checkbox">':0!==t.content.indexOf("[x] ")&&0!==t.content.indexOf("[X] ")||(r.content='<input class="task-list-item-checkbox" checked=""'+o+'type="checkbox">');return r}(t,o)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),n)if(r){t.children.pop();var i="task-item-"+Math.ceil(1e7*Math.random()-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+i+'">',t.children.push(function(t,e,n){var r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+e+'">'+t+"</label>",r.attrs=[{for:e}],r}(t.content,i,o))}else t.children.unshift(function(t){var e=new t("html_inline","",0);return e.content="<label>",e}(o)),t.children.push(function(t){var e=new t("html_inline","",0);return e.content="</label>",e}(o))}t.exports=function(t,a){a&&(e=!a.enabled,n=!!a.label,r=!!a.labelAfter),t.core.ruler.after("inl
2ine","github-task-lists",function(t){for(var n=t.tokens,r=2;r<n.length;r++)s(n,r)&&(l(n[r],t.Token),o(n[r-2],"class","task-list-item"+(e?"":" enabled")),o(n[i(n,r-2)],"class","contains-task-list"))})}},82020(t,e,n){"use strict";var r=n(58878),o=n(94314);var i="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},s=o.useSyncExternalStore,l=r.useRef,a=r.useEffect,c=r.useMemo,d=r.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,n,r,o){var h=l(null);if(null===h.current){var u={hasValue:!1,value:null};h.current=u}else u=h.current;h=c(function(){function t(t){if(!a){if(a=!0,s=t,t=r(t),void 0!==o&&u.hasValue){var e=u.value;if(o(e,t))return l=e}return l=t}if(e=l,i(s,t))return e;var n=r(t);return void 0!==o&&o(e,n)?(s=t,e):(s=t,l=n)}var s,l,a=!1,c=void 0===n?null:n;return[function(){return t(e())},null===c?void 0:function(){return t(c())}]},[e,n,r,o]);var p=s(t,h[0],h[1]);return a(function(){u.hasValue=!0,u.value=p},[p]),d(p),p}},28436(t,e,n){"use strict";t.exports=n(82020)},36923(t,e,n){"use strict";n.d(e,{KE:()=>fr,YY:()=>Qn,fV:()=>qn,CU:()=>Wn,Db:()=>Vn,bP:()=>wr,Yv:()=>kr,_n:()=>Jn,Nz:()=>br,gk:()=>ce,AB:()=>In,T7:()=>ee,Iw:()=>kt,WF:()=>bt,XO:()=>hr,Nx:()=>ne,KP:()=>oe,eL:()=>re,gu:()=>Se,FF:()=>Ee,iI:()=>ie,su:()=>le,hO:()=>Ae,fl:()=>De,Pg:()=>G,H_:()=>Te,zU:()=>fe,q4:()=>xe,iR:()=>Ce,QN:()=>Re,J_:()=>Le,U0:()=>zt,rU:()=>Ft,Op:()=>Fe,BQ:()=>$e,eE:()=>dt,OF:()=>ft,OX:()=>mr,Zc:()=>xr,KV:()=>pe,Ce:()=>gr,Dd:()=>$n,MG:()=>je,kj:()=>Bn,Ms:()=>Ct,JJ:()=>yr,tG:()=>vr});var r=Object.defineProperty,o=(t,e)=>{let n={};for(var o in t)r(n,o,{get:t[o],enumerable:!0});return e||r(n,Symbol.toStringTag,{value:"Module"}),n},i=n(77814),s=n(31994),l=n(14973);const a=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function c(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const d=(t,e,n)=>{let r=c(t,n);if(!r)return!1;let o=f(r);if(!o){let n=r.blockRange(),o=n&&(0,i.jP)(n);return null!=o&&(e&&e(t.tr.lift(n,o).scrollIntoView()),!0)}let a=o.nodeBefore;if(E(t,o,e,-1))return!0;if(0==r.parent.content.size&&(u(a,"end")||l.nh.isSelectable(a)))for(let c=r.depth;;c--){let n=(0,i.$L)(t.doc,r.before(c),r.after(c),s.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(u(a,"end")?l.LN.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):l.nh.create(r.doc,o.pos-a.nodeSize)),e(r.scrollIntoView())}return!0}if(1==c||r.node(c-1).childCount>1)break}return!(!a.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),!0)};function h(t,e,n){let r=e.nodeBefore,o=e.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let t=r.lastChild;if(!t)return!1;r=t}let a=e.nodeAfter,c=e.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let t=a.firstChild;if(!t)return!1;a=t}let d=(0,i.$L)(t.doc,o,c,s.Ji.empty);if(!d||d.from!=o||d instanceof i.Ln&&d.slice.size>=c-o)return!1;if(n){let e=t.tr.step(d);e.setSelection(l.U3.create(e.doc,o)),n(e.scrollIntoView())}return!0}function u(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}const p=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=f(r)}let s=i&&i.nodeBefore;return!(!s||!l.nh.isSelectable(s))&&(e&&e(t.tr.setSelection(l.nh.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function f(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}function m(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const g=(t,e,n)=>{let r=m(t,n);if(!r)return!1;let o=v(r);if(!o)return!1;let a=o.nodeAfter;if(E(t,o,e,1))return!0;if(0==r.parent.content.size&&(u(a,"start")||l.nh.isSelectable(a))){let n=(0,i.$L)(t.doc,r.before(),r.after(),s.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(u(a,"start")?l.LN.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):l.nh.create(r.doc,r.mapping.map(o.pos))),e(r.scrollIntoView())}return!0}}return!(!a.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos,o.pos+a.nodeSize).scrollIntoView()),!0)},y=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=v(r)}let s=i&&i.nodeAfter;return!(!s||!l.nh.isSelectable(s))&&(e&&e(t.tr.setSelection(l.nh.create(t.doc,i.pos)).scrollIntoView()),!0)};function v(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const b=(t,e)=>{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 w(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const k=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=w(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let r=n.after(),o=t.tr.replaceWith(r,r,s.createAndFill());
2o.setSelection(l.LN.near(o.doc.resolve(r),1)),e(o.scrollIntoView())}return!0},x=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof l.i5||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=w(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=t.tr.insert(n,i.createAndFill());s.setSelection(l.U3.create(s.doc,n+1)),e(s.scrollIntoView())}return!0},C=(t,e)=>{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,i.zy)(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&(0,i.jP)(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};const S=(t,e)=>{if(t.selection instanceof l.nh&&t.selection.node.isBlock){let{$from:n}=t.selection;return!(!n.parentOffset||!(0,i.zy)(t.doc,n.pos))&&(e&&e(t.tr.split(n.pos).scrollIntoView()),!0)}if(!t.selection.$from.depth)return!1;let n=t.tr;!t.selection.empty&&(t.selection instanceof l.U3||t.selection instanceof l.i5)&&n.deleteSelection();let r,o,{$from:s}=n.selection,a=n.steps.length,c=[],d=!1,h=!1;for(let i=s.depth;;i--){if(s.node(i).isBlock){d=s.end(i)==s.pos+(s.depth-i),h=s.start(i)==s.pos-(s.depth-i),o=w(s.node(i-1).contentMatchAt(s.indexAfter(i-1)));let t=M&&M(s.parent,d,s);c.unshift(t||(d&&o?{type:o}:null)),r=i;break}if(1==i)return!1;c.unshift(null)}let u=s.pos,p=(0,i.zy)(n.doc,u,c.length,c);if(p||(c[0]=o?{type:o}:null,p=(0,i.zy)(n.doc,u,c.length,c)),!p)return!1;if(n.split(u,c.length,c),!d&&h&&s.node(r).type!=o){let t=n.mapping.slice(a),e=t.map(s.before(r)),i=n.doc.resolve(e);o&&s.node(r-1).canReplaceWith(i.index(),i.index()+1,o)&&n.setNodeMarkup(t.map(s.before(r)),o)}return e&&e(n.scrollIntoView()),!0};var M;function E(t,e,n,r){let o,a,c=e.nodeBefore,d=e.nodeAfter,h=c.type.spec.isolating||d.type.spec.isolating;if(!h&&function(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!!(r&&o&&r.type.compatibleContent(o.type))&&(!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!(!e.parent.canReplace(s,s+1)||!o.isTextblock&&!(0,i.n9)(t.doc,e.pos))&&(n&&n(t.tr.join(e.pos).scrollIntoView()),!0))}(t,e,n))return!0;let p=!h&&e.parent.canReplace(e.index(),e.index()+1);if(p&&(o=(a=c.contentMatchAt(c.childCount)).findWrapping(d.type))&&a.matchType(o[0]||d.type).validEnd){if(n){let r=e.pos+d.nodeSize,l=s.FK.empty;for(let t=o.length-1;t>=0;t--)l=s.FK.from(o[t].create(null,l));l=s.FK.from(c.copy(l));let a=t.tr.step(new i.Wg(e.pos-1,r,e.pos,r,new s.Ji(l,1,0),o.length,!0)),h=a.doc.resolve(r+2*o.length);h.nodeAfter&&h.nodeAfter.type==c.type&&(0,i.n9)(a.doc,h.pos)&&a.join(h.pos),n(a.scrollIntoView())}return!0}let f=d.type.spec.isolating||r>0&&h?null:l.LN.findFrom(e,1),m=f&&f.$from.blockRange(f.$to),g=m&&(0,i.jP)(m);if(null!=g&&g>=e.depth)return n&&n(t.tr.lift(m,g).scrollIntoView()),!0;if(p&&u(d,"start",!0)&&u(c,"end")){let r=c,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let l=d,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(n){let r=s.FK.empty;for(let t=o.length-1;t>=0;t--)r=s.FK.from(o[t].copy(r));n(t.tr.step(new i.Wg(e.pos-o.length,e.pos+d.nodeSize,e.pos+a,e.pos+d.nodeSize-a,new s.Ji(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function A(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(e.tr.setSelection(l.U3.create(e.doc,t<0?o.start(i):o.end(i)))),!0)}}const D=A(-1),T=A(1);function O(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:r},$to:{pos:s}}=n.selection.ranges[i];n.doc.nodesBetween(r,s,(r,i)=>{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<n.selection.ranges.length;r++){let{$from:{pos:i},$to:{pos:s}}=n.selection.ranges[r];o.setBlockType(i,s,t,e)}r(o.scrollIntoView())}return!0}}function N(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t,n,r){for(let o=0;o<e.length;o++)if(e[o](t,n,r))return!0;return!1}}let _=N(a,d,p),R=N(a,g,y);const L={Enter:N(b,x,C,S),"Mod-Enter":k,Backspace:_,"Mod-Backspace":_,"Shift-Backspace":_,Delete:R,"Mod-Delete":R,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new l.i5(t.doc))),!0)},z={"Ctrl-h":L.Backspace,"Alt-Backspace":L["Mod-Backspace"],"Ctrl-d":L.Delete,"Ctrl-Alt-Backspace":L["Mod-Delete"],"Alt-Delete":L["Mod-Delete"],"Alt-d":L["Mod-Delete"],"Ctrl-a":D,"Ctrl-e":T};for(let Cr in L)z[Cr]=L[Cr];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&os.platform();function I(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){let{$from:o,$to:l}=n.selection,a=o.blockRange(l);if(!a)return!1;let c=r?n.tr:null;return!!function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=!1,l=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&0==e.startIndex){
2if(0==e.$from.index(e.depth-1))return!1;let t=a.resolve(e.start-2);l=new s.u$(t,t,e.depth),e.endIndex<e.parent.childCount&&(e=new s.u$(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let c=(0,i.oM)(l,n,r,e);if(!c)return!1;t&&function(t,e,n,r,o){let l=s.FK.empty;for(let i=n.length-1;i>=0;i--)l=s.FK.from(n[i].type.create(n[i].attrs,l));t.step(new i.Wg(e.start-(r?2:0),e.end,e.start,e.end,new s.Ji(l,0,0),n.length,!0));let a=0;for(let i=0;i<n.length;i++)n[i].type==o&&(a=i+1);let c=n.length-a,d=e.start+n.length-(r?2:0),h=e.parent;for(let s=e.startIndex,u=e.endIndex,p=!0;s<u;s++,p=!1)!p&&(0,i.zy)(t.doc,d,c)&&(t.split(d,c),d+=2*c),d+=h.child(s).nodeSize}(t,e,c,o,n);return!0}(c,a,t,e)&&(r&&r(c.scrollIntoView()),!0)}}function F(t){return function(e,n){let{$from:r,$to:o}=e.selection,l=r.blockRange(o,e=>e.childCount>0&&e.firstChild.type==t);return!!l&&(!n||(r.node(l.depth-1).type==t?function(t,e,n,r){let o=t.tr,l=r.end,a=r.$to.end(r.depth);l<a&&(o.step(new i.Wg(l-1,a,l,a,new s.Ji(s.FK.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new s.u$(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const c=(0,i.jP)(r);if(null==c)return!1;o.lift(r,c);let d=o.doc.resolve(o.mapping.map(l,-1)-1);(0,i.n9)(o.doc,d.pos)&&d.nodeBefore.type==d.nodeAfter.type&&o.join(d.pos);return e(o.scrollIntoView()),!0}(e,n,t,l):function(t,e,n){let r=t.tr,o=n.parent;for(let i=n.end,s=n.endIndex-1,m=n.startIndex;s>m;s--)i-=o.child(s).nodeSize,r.delete(i-1,i+1);let l=r.doc.resolve(n.start),a=l.nodeAfter;if(r.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,d=n.endIndex==o.childCount,h=l.node(-1),u=l.index(-1);if(!h.canReplace(u+(c?0:1),u+1,a.content.append(d?s.FK.empty:s.FK.from(o))))return!1;let p=l.pos,f=p+a.nodeSize;return r.step(new i.Wg(p-(c?1:0),f+(d?1:0),p+1,f-1,new s.Ji((c?s.FK.empty:s.FK.from(o.copy(s.FK.empty))).append(d?s.FK.empty:s.FK.from(o.copy(s.FK.empty))),c?0:1,d?0:1),c?0:1)),e(r.scrollIntoView()),!0}(e,n,l)))}}var $=n(77415),P=n(44120);function B(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),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}}}var H=class t{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(){var t=this;const{rawCommands:e,editor:n,state:r}=this,{view:o}=n,{tr:i}=r,s=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(e=>{let[n,r]=e;return[n,function(){const e=r(...arguments)(s);return i.getMeta("preventDispatch")||t.hasCustomState||o.dispatch(i),e}]}))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t){var e=this;let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{rawCommands:r,editor:o,state:i}=this,{view:s}=o,l=[],a=!!t,c=t||i.tr,d={...Object.fromEntries(Object.entries(r).map(t=>{let[r,o]=t;return[r,function(){const t=e.buildProps(c,n),r=o(...arguments)(t);return l.push(r),d}]})),run:()=>(a||!n||c.getMeta("preventDispatch")||this.hasCustomState||s.dispatch(c),l.every(t=>!0===t))};return d}static createFakeChain(){const t=new Proxy({},{get:(e,n)=>{if("then"!==n)return"run"===n?()=>!1:()=>t}});return t}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=>{let[e,n]=t;return[e,function(){return n(...arguments)({...i,dispatch:void 0})}]})),chain:()=>this.createChain(o,r)}}static createFallbackCan(){const e=t.createFakeChain();return new Proxy({chain:()=>e},{get:(t,e)=>{if("then"!==e)return"chain"===e?t.chain:()=>!1}})}buildProps(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:B({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=>{let[e,n]=t;return[e,function(){return n(...arguments)(s)}]}))}};return s}};const j=()=>t=>{let{editor:e,view:n}=t;return requestAnimationFrame(()=>{var t;e.isDestroyed||(n.dom.blur(),null===(t=window)||void 0===t||null===(t=t.getSelection())||void 0===t||t.removeAllRanges())}),!0},V=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return e=>{let{commands:n}=e;return n.setContent("",{emitUpdate:t})}},q=()=>t=>{let{state:e,tr:n,dispatch:r}=t;const{selection:o}=n,{ranges:s}=o;return!r||(s.forEach(t=>{let{$from:r,$to:o}=t;e.doc.nodesBetween(r.pos,o.pos,(t,e)=>{if(t.type.isText)return;const{doc:r,mapping:o}=n,s=r.resolve(o.map(e)),l=r.resolve(o.map(e+t.nodeSize)),a=s.blockRange(l);if(!a)return;const c=(0,i.jP)(a);if(t.type.isTextblock){const{defaultType:t}=s.parent.contentMatchAt(s.index());n.setNodeMarkup(a.start,t)}(c||0===c)&&n.lift(a,c)})}),!0)},U=t=>e=>t(e),K=()=>t=>{let{state:e,dispatch:n}=t;return x(e,n)},W=(t,e)=>n=>{let{editor:r,tr:o}=n;const{state:i}=r,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 l.U3(o.doc.resolve(Math.max(a-1,0)))),!0},J=()=>t=>{let{tr:e,dispatch:n}=t;const{selection:r}=e,o=r.$anchor.node();if(o.content.size>0)return!1;const i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o.type){if(n){const t=i.before(s),n=i.after(s);e.delete(t,n).scrollIntoView()}return!0}return!1};function G(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?`);
2return e.nodes[t]}return t}const Z=t=>e=>{let{tr:n,state:r,dispatch:o}=e;const i=G(t,r.schema),s=n.selection.$anchor;for(let t=s.depth;t>0;t-=1)if(s.node(t).type===i){if(o){const e=s.before(t),r=s.after(t);n.delete(e,r).scrollIntoView()}return!0}return!1},Y=t=>e=>{let{tr:n,dispatch:r}=e;const{from:o,to:i}=t;return r&&n.delete(o,i),!0},X=(t,e,n)=>{if(!t.parent.isInline)return t.pos;if("left"===n&&t.pos>t.start()||"right"===n&&t.pos<t.end())return t.pos;const r=e.nodes[t.parent.type.name].spec;return(o=r).content&&/^text(\*|\+)/.test(o.content)?"left"===n?t.start()-1:t.end()+1:t.pos;var o},Q=()=>t=>{let{state:e,dispatch:n}=t;if(e.selection.empty)return!1;if(n){const t=e.tr,{ranges:r}=e.selection,o=t.steps.length;r.forEach(n=>{const r=t.mapping.slice(o),i=t.doc.resolve(r.map(n.$from.pos)),s=t.doc.resolve(r.map(n.$to.pos)),{from:l,to:a}=((t,e,n)=>({from:X(t,n,"left"),to:X(e,n,"right")}))(i,s,e.schema);t.deleteRange(l,a)}),t.selection.empty||t.setSelection(l.U3.near(t.doc.resolve(t.selection.from))),t.scrollIntoView(),n(t)}return!0},tt=()=>t=>{let{commands:e}=t;return e.keyboardShortcut("Enter")},et=()=>t=>{let{state:e,dispatch:n}=t;return k(e,n)};function nt(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function rt(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{strict:!0};const r=Object.keys(e);return!r.length||r.every(r=>n.strict?e[r]===t[r]:nt(e[r])?e[r].test(t[r]):e[r]===t[r])}function ot(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.find(t=>t.type===e&&rt(Object.fromEntries(Object.keys(n).map(e=>[e,t.attrs[e]])),n))}function it(t,e){return!!ot(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}function st(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if(r.node&&r.node.marks.some(t=>t.type===e)||(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(t=>t.type===e))return;if(!n){const t=r.node.marks.find(t=>t.type===e);t&&(n=t.attrs)}if(!ot([...r.node.marks],e,n))return;let o=r.index,i=t.start()+r.offset,s=o+1,l=i+r.node.nodeSize;for(;o>0&&it([...t.parent.child(o-1).marks],e,n);)o-=1,i-=t.parent.child(o).nodeSize;for(;s<t.parent.childCount&&it([...t.parent.child(s).marks],e,n);)l+=t.parent.child(s).nodeSize,s+=1;return{from:i,to:l}}function lt(t,e){if("string"===typeof t){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}const at=(t,e)=>n=>{let{tr:r,state:o,dispatch:i}=n;const s=lt(t,o.schema),{doc:a,selection:c}=r,{$from:d,from:h,to:u}=c;if(i){const t=st(d,s,e);if(t&&t.from<=h&&t.to>=u){const e=l.U3.create(a,t.from,t.to);r.setSelection(e)}}return!0},ct=t=>e=>{const n="function"===typeof t?t(e):t;for(let t=0;t<n.length;t+=1)if(n[t](e))return!0;return!1};function dt(t){return t instanceof l.U3}function ht(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(t,e),n)}function ut(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return null;const n=l.LN.atStart(t),r=l.LN.atEnd(t);if("start"===e||!0===e)return n;if("end"===e)return r;const o=n.from,i=r.to;return"all"===e?l.U3.create(t,ht(0,o,i),ht(t.content.size,o,i)):l.U3.create(t,ht(e,o,i),ht(e,o,i))}function pt(){return["Android"].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function ft(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const mt=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{editor:r,view:o,tr:i,dispatch:s}=n;e={scrollIntoView:!0,...e};const l=()=>{(ft()||pt())&&o.dom.focus(),"undefined"===typeof navigator||!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||ft()||pt()||o.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{r.isDestroyed||(o.focus(),(null===e||void 0===e?void 0:e.scrollIntoView)&&r.commands.scrollIntoView())})};try{if(o.hasFocus()&&null===t||!1===t)return!0}catch{return!1}if(s&&null===t&&!dt(r.state.selection))return l(),!0;const a=ut(i.doc,t)||r.state.selection,c=r.state.selection.eq(a);return s&&(c||i.setSelection(a),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),l()),!0}},gt=(t,e)=>n=>t.every((t,r)=>e(t,{...n,index:r})),yt=(t,e)=>n=>{let{tr:r,commands:o}=n;return o.insertContentAt({from:r.selection.from,to:r.selection.to},t,e)}
2,vt=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):1===r.nodeType&&vt(r)}return t};function bt(t){if("undefined"===typeof window)throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=(new window.DOMParser).parseFromString(e,"text/html").body;return vt(n)}function wt(t){return"function"===typeof(null===t||void 0===t?void 0:t.nodesBetween)}function kt(t,e,n){if(wt(t))return t;const r="object"===typeof t&&null!==t;n={slice:!0,parseOptions:{},...n};const o="string"===typeof t;if(r)try{if(Array.isArray(t)&&t.length>0)return s.FK.fromArray(t.map(t=>e.nodeFromJSON(t)));const r=e.nodeFromJSON(t);return n.errorOnInvalidContent&&r.check(),r}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),kt("",e,n)}if(o){if(n.errorOnInvalidContent){let r=!1,o="";const i=new s.Sj({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:t=>(r=!0,o="string"===typeof t?t:t.outerHTML,null)}]}})});if(n.slice?s.S4.fromSchema(i).parseSlice(bt(t),n.parseOptions):s.S4.fromSchema(i).parse(bt(t),n.parseOptions),n.errorOnInvalidContent&&r)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${o}`)})}const r=s.S4.fromSchema(e);return n.slice?r.parseSlice(bt(t),n.parseOptions).content:r.parse(bt(t),n.parseOptions)}return kt("",e,n)}function xt(t){return!("type"in t)}function Ct(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof i.Ln||o instanceof i.Wg))return;const s=t.mapping.maps[r];let a=0;s.forEach((t,e,n,r)=>{0===a&&(a=r)}
2),t.setSelection(l.LN.near(t.doc.resolve(a),n))}const St=(t,e,n)=>r=>{let{tr:o,dispatch:i,editor:l}=r;if(i){let r;const i=t=>{l.emit("contentError",{editor:l,error:t,disableCollaboration:()=>{"collaboration"in l.storage&&"object"===typeof l.storage.collaboration&&l.storage.collaboration&&(l.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...(n={parseOptions:l.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n}).parseOptions};if(!n.errorOnInvalidContent&&!l.options.enableContentCheck&&l.options.emitContentError)try{kt(e,l.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(c){i(c)}try{var a;r=kt(e,l.schema,{parseOptions:d,errorOnInvalidContent:null!==(a=n.errorOnInvalidContent)&&void 0!==a?a:l.options.enableContentCheck})}catch(c){return i(c),!1}let{from:h,to:u}="number"===typeof t?{from:t,to:t}:{from:t.from,to:t.to},p=!0,f=!0;const m=xt(r)?r.content:[r];if(m.forEach(t=>{t.check(),p=!!p&&(t.isText&&0===t.marks.length),f=!!f&&t.isBlock}),h===u&&f){const{parent:t}=o.doc.resolve(h);!t.isTextblock||t.type.spec.code||t.childCount||(h-=1,u+=1)}let g;if(p)g=Array.isArray(e)?e.map(t=>t.text||"").join(""):wt(e)?m.map(t=>{var e;return null!==(e=t.text)&&void 0!==e?e:""}).join(""):"object"===typeof e&&e&&e.text?e.text:e,o.insertText(g,h,u);else{g=s.FK.from(m);const t=o.doc.resolve(h),e=t.node(),n=0===t.parentOffset,r=e.isText||e.isTextblock,i=e.content.size>0;n&&r&&i&&f&&(h=Math.max(0,h-1)),o.replaceWith(h,u,m)}n.updateSelection&&Ct(o,o.steps.length-1,-1),n.applyInputRules&&o.setMeta("applyInputRules",{from:h,text:g}),n.applyPasteRules&&o.setMeta("applyPasteRules",{from:h,text:g})}return!0};function Mt(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Et=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=>{let{tr:n,dispatch:r,editor:o}=e;const{pos:i,attrs:s,content:l,updateSelection:a=!0}=t;let c;c="number"===typeof i?n.doc.resolve(i):i||n.selection.$from;const d=Mt(c.parent.contentMatchAt(c.index()));if(!d)return!1;const h=Object.keys(d.spec.attrs||{}),u=s?Object.fromEntries(Object.entries(s).filter(t=>{let[e]=t;return h.includes(e)})):{};let p;if(l){const t=kt(l,o.schema);p=d.createAndFill(u,t)}else p=d.createAndFill(u);return!!p&&(r&&(n.insert(c.pos,p),a&&Ct(n,n.steps.length-1,-1)),!0)}},At=()=>t=>{let{state:e,dispatch:n}=t;return((t,e)=>{let n,r=t.selection,o=r instanceof l.nh;if(o){if(r.node.isTextblock||!(0,i.n9)(t.doc,r.from))return!1;n=r.from}else if(n=(0,i.N0)(t.doc,r.from,-1),null==n)return!1;if(e){let r=t.tr.join(n);o&&r.setSelection(l.nh.create(r.doc,n-t.doc.resolve(n).nodeBefore.nodeSize)),e(r.scrollIntoView())}return!0})(e,n)},Dt=()=>t=>{let{state:e,dispatch:n}=t;return((t,e)=>{let n,r=t.selection;if(r instanceof l.nh){if(r.node.isTextblock||!(0,i.n9)(t.doc,r.to))return!1;n=r.to}else if(n=(0,i.N0)(t.doc,r.to,1),null==n)return!1;return e&&e(t.tr.join(n).scrollIntoView()),!0})(e,n)},Tt=()=>t=>{let{state:e,dispatch:n}=t;return d(e,n)},Ot=()=>t=>{let{state:e,dispatch:n}=t;return g(e,n)},Nt=()=>t=>{let{state:e,dispatch:n,tr:r}=t;try{const t=(0,i.N0)(e.doc,e.selection.$from.pos,-1);return null!==t&&void 0!==t&&(r.join(t,2),n&&n(r),!0)}catch{return!1}},_t=()=>t=>{let{state:e,dispatch:n,tr:r}=t;try{const t=(0,i.N0)(e.doc,e.selection.$from.pos,1);return null!==t&&void 0!==t&&(r.join(t,2),n&&n(r),!0)}catch{return!1}},Rt=()=>t=>{let{state:e,dispatch:n}=t;return((t,e,n)=>{let r=c(t,n);if(!r)return!1;let o=f(r);return!!o&&h(t,o,e)})(e,n)},Lt=()=>t=>{let{state:e,dispatch:n}=t;return((t,e,n)=>{let r=m(t,n);if(!r)return!1;let o=v(r);return!!o&&h(t,o,e)})(e,n)};function zt(){return"undefined"!==typeof navigator&&/Mac/.test(navigator.platform)}const It=t=>e=>{let{editor:n,view:r,tr:o,dispatch:i}=e;const s=function(t){const e=t.split(/-(?!$)/);let n,r,o,i,s=e[e.length-1];"Space"===s&&(s=" ");for(let l=0;l<e.length-1;l+=1){const t=e[l];if(/^(cmd|meta|m)$/i.test(t))i=!0;else if(/^a(lt)?$/i.test(t))n=!0;else if(/^(c|ctrl|control)$/i.test(t))r=!0;else if(/^s(hift)?$/i.test(t))o=!0;else{if(!/^mod$/i.test(t))throw new Error(`Unrecognized modifier name: ${t}`);ft()||zt()?i=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),o&&(s=`Shift-${s}`),s}(t).split(/-(?!$)/),l=s.find(t=>!["Alt","Ctrl","Meta","Shift"].includes(t)),a=new KeyboardEvent("keydown",{key:"Space"
2===l?" ":l,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),c=n.captureTransaction(()=>{r.someProp("handleKeyDown",t=>t(r,a))});return null===c||void 0===c||c.steps.forEach(t=>{const e=t.map(o.mapping);e&&i&&o.maybeStep(e)}),!0};function Ft(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{from:r,to:o,empty:i}=t.selection,s=e?G(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(t,e)=>{if(t.isText)return;const n=Math.max(r,e),i=Math.min(o,e+t.nodeSize);l.push({node:t,from:n,to:i})});const a=o-r,c=l.filter(t=>!s||s.name===t.node.type.name).filter(t=>rt(t.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((t,e)=>t+e.to-e.from,0)>=a}const $t=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,dispatch:o}=n;return!!Ft(r,G(t,r.schema),e)&&((t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),s=o&&(0,i.jP)(o);return null!=s&&(e&&e(t.tr.lift(o,s).scrollIntoView()),!0)})(r,o)}},Pt=()=>t=>{let{state:e,dispatch:n}=t;return C(e,n)},Bt=t=>e=>{let{state:n,dispatch:r}=e;return F(G(t,n.schema))(n,r)},Ht=()=>t=>{let{state:e,dispatch:n}=t;return b(e,n)};function jt(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Vt(t,e){const n="string"===typeof e?[e]:e;return Object.keys(t).reduce((e,r)=>(n.includes(r)||(e[r]=t[r]),e),{})}const qt=(t,e)=>n=>{let{tr:r,state:o,dispatch:i}=n,s=null,l=null;const a=jt("string"===typeof t?t:t.name,o.schema);if(!a)return!1;"node"===a&&(s=G(t,o.schema)),"mark"===a&&(l=lt(t,o.schema));let c=!1;return r.selection.ranges.forEach(t=>{o.doc.nodesBetween(t.$from.pos,t.$to.pos,(t,n)=>{s&&s===t.type&&(c=!0,i&&r.setNodeMarkup(n,void 0,Vt(t.attrs,e))),l&&t.marks.length&&t.marks.forEach(o=>{l===o.type&&(c=!0,i&&r.addMark(n,n+t.nodeSize,l.create(Vt(o.attrs,e))))})})}),c},Ut=()=>t=>{let{tr:e,dispatch:n}=t;return n&&e.scrollIntoView(),!0},Kt=()=>t=>{let{tr:e,dispatch:n}=t;if(n){const t=new l.i5(e.doc);e.setSelection(t)}return!0},Wt=()=>t=>{let{state:e,dispatch:n}=t;return p(e,n)},Jt=()=>t=>{let{state:e,dispatch:n}=t;return y(e,n)},Gt=()=>t=>{let{state:e,dispatch:n}=t;return((t,e)=>{let n,{$from:r,to:o}=t.selection,i=r.sharedDepth(o);return 0!=i&&(n=r.before(i),e&&e(t.tr.setSelection(l.nh.create(t.doc,n))),!0)})(e,n)},Zt=()=>t=>{let{state:e,dispatch:n}=t;return T(e,n)},Yt=()=>t=>{let{state:e,dispatch:n}=t;return D(e,n)};function Xt(t,e){return kt(t,e,{slice:!1,parseOptions:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},errorOnInvalidContent:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).errorOnInvalidContent})}const Qt=function(t){let{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o=>{let{editor:i,tr:s,dispatch:l,commands:a}=o;const{doc:c}=s;if("full"!==r.preserveWhitespace){const o=Xt(t,i.schema,r,{errorOnInvalidContent:null!==e&&void 0!==e?e:i.options.enableContentCheck});if(l){const t=xt(o)?o.content:[o];s.replaceWith(0,c.content.size,t).setMeta("preventUpdate",!n)}return!0}return l&&s.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:null!==e&&void 0!==e?e:i.options.enableContentCheck})}};function te(t,e){const n=lt(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 l=s.find(t=>t.type.name===n.name);return l?{...l.attrs}:{}}function ee(t,e){const n=new i.dL(t);return e.forEach(t=>{t.steps.forEach(t=>{n.step(t)})}),n}function ne(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(t,e)=>{n(t)&&r.push({node:t,pos:e})}),r}function re(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 oe(t){return e=>re(e.$from,t)}function ie(t,e,n){return void 0===t.config[e]&&t.parent?ie(t.parent,e,n):"function"===typeof t.config[e]?t.config[e].bind({...n,parent:t.parent?ie(t.parent,e,n):null}):t.config[e]}function se(t){return t.map(t=>{const e=ie(t,"addExtensions",{name:t.name,options:t.options,storage:t.storage});return e?[t,...se(e())]:t}).flat(10)}function le(t,e){const n=s.ZF.fromSchema(e).serializeFragment(t),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}function ae(t){return"function"===typeof t}function ce(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(ae(t)){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e?t.bind(e)(...r):t(...r)}return t}function de(t){return{baseExtensions:t.filter(t=>"extension"===t.type),nodeExtensions:t.filter(t=>"node"===t.type),markExtensions:t.filter(t=>"mark"===t.type)}}function he(t){const e=[],{nodeExtensions:n,markExtensions:r}=de(t),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(t=>"text"!==t.name).map(t=>t.name),l=r.map(t=>t.name),a=[...s,...l];return t.forEach(t=>{const n=ie(t,"addGlobalAttributes",{name:t.name,options:t.options,storage:t.storage,extensions:o});
2n&&n().forEach(t=>{let n;n=Array.isArray(t.types)?t.types:"*"===t.types?a:"nodes"===t.types?s:"marks"===t.types?l:[],n.forEach(n=>{Object.entries(t.attributes).forEach(t=>{let[r,o]=t;e.push({type:n,name:r,attribute:{...i,...o}})})})})}),o.forEach(t=>{const n=ie(t,"addAttributes",{name:t.name,options:t.options,storage:t.storage});if(!n)return;const r=n();Object.entries(r).forEach(n=>{let[r,o]=n;const s={...i,...o};"function"===typeof(null===s||void 0===s?void 0:s.default)&&(s.default=s.default()),(null===s||void 0===s?void 0:s.isRequired)&&void 0===(null===s||void 0===s?void 0:s.default)&&delete s.default,e.push({type:t.name,name:r,attribute:s})})}),e}function ue(t){const e=[],n=function(t){const e=[];let n="",r=!1,o=!1,i=0;const s=t.length;for(let l=0;l<s;l+=1){const s=t[l];if("'"!==s||o)if('"'!==s||r){if(!r&&!o){if("("===s){i+=1,n+=s;continue}if(")"===s&&i>0){i-=1,n+=s;continue}if(";"===s&&0===i){e.push(n),n="";continue}}n+=s}else o=!o,n+=s;else r=!r,n+=s}return n&&e.push(n),e}(t||""),r=n.length;for(let o=0;o<r;o+=1){const t=n[o],r=t.indexOf(":");if(-1===r)continue;const i=t.slice(0,r).trim(),s=t.slice(r+1).trim();i&&s&&e.push([i,s])}return e}function pe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter(t=>!!t).reduce((t,e)=>{const n={...t};return Object.entries(e).forEach(t=>{let[e,r]=t;if("__proto__"!==e)if(n[e])if("class"===e){const t=r?String(r).split(" "):[],o=n[e]?n[e].split(" "):[],i=t.filter(t=>!o.includes(t));n[e]=[...o,...i].join(" ")}else if("style"===e){const t=new Map([...ue(n[e]),...ue(r)]);n[e]=Array.from(t.entries()).map(t=>{let[e,n]=t;return`${e}: ${n}`}).join("; ")}else n[e]=r;else n[e]=r;else Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r,writable:!0})}),n},{})}function fe(t,e){return e.filter(e=>e.type===t.type.name).filter(t=>t.attribute.rendered).map(e=>e.attribute.renderHTML?e.attribute.renderHTML(t.attrs)||{}:{[e.name]:t.attrs[e.name]}).reduce((t,e)=>pe(t,e),{})}function me(t,e){return"style"in t?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):function(t){return"string"!==typeof t?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):"true"===t||"false"!==t&&t}(n.getAttribute(e.name));return null===r||void 0===r?t:{...t,[e.name]:r}},{});return{...r,...o}}}}function ge(t){return Object.fromEntries(Object.entries(t).filter(t=>{let[e,n]=t;return("attrs"!==e||!function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===Object.keys(t).length&&t.constructor===Object}(n))&&(null!==n&&void 0!==n)}))}function ye(t){var e,n;const r={};return!(null===t||void 0===t||null===(e=t.attribute)||void 0===e?void 0:e.isRequired)&&"default"in((null===t||void 0===t?void 0:t.attribute)||{})&&(r.default=t.attribute.default),void 0!==(null===t||void 0===t||null===(n=t.attribute)||void 0===n?void 0:n.validate)&&(r.validate=t.attribute.validate),[t.name,r]}function ve(t,e){var n;const r=he(t),{nodeExtensions:o,markExtensions:i}=de(t),l=null===(n=o.find(t=>ie(t,"topNode")))||void 0===n?void 0:n.name,a=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=ge({...t.reduce((t,e)=>{const r=ie(e,"extendNodeSchema",i);return{...t,...r?r(n):{}}},{}),content:ce(ie(n,"content",i)),marks:ce(ie(n,"marks",i)),group:ce(ie(n,"group",i)),inline:ce(ie(n,"inline",i)),atom:ce(ie(n,"atom",i)),selectable:ce(ie(n,"selectable",i)),draggable:ce(ie(n,"draggable",i)),code:ce(ie(n,"code",i)),whitespace:ce(ie(n,"whitespace",i)),linebreakReplacement:ce(ie(n,"linebreakReplacement",i)),defining:ce(ie(n,"defining",i)),isolating:ce(ie(n,"isolating",i)),attrs:Object.fromEntries(o.map(ye))}),l=ce(ie(n,"parseHTML",i));l&&(s.parseDOM=l.map(t=>me(t,o)));const a=ie(n,"renderHTML",i);a&&(s.toDOM=t=>a({node:t,HTMLAttributes:fe(t,o)}));const c=ie(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=ge({...t.reduce((t,e)=>{const r=ie(e,"extendMarkSchema",i);return{...t,...r?r(n):{}}
2},{}),inclusive:ce(ie(n,"inclusive",i)),excludes:ce(ie(n,"excludes",i)),group:ce(ie(n,"group",i)),spanning:ce(ie(n,"spanning",i)),code:ce(ie(n,"code",i)),attrs:Object.fromEntries(o.map(ye))}),l=ce(ie(n,"parseHTML",i));l&&(s.parseDOM=l.map(t=>me(t,o)));const a=ie(n,"renderHTML",i);return a&&(s.toDOM=t=>a({mark:t,HTMLAttributes:fe(t,o)})),[n.name,s]}));return new s.Sj({topNode:l,nodes:a,marks:c})}function be(t){return t.sort((t,e)=>{const n=ie(t,"priority")||100,r=ie(e,"priority")||100;return n>r?-1:n<r?1:0})}function we(t){const e=be(se(t)),n=function(t){const e=t.filter((e,n)=>t.indexOf(e)!==n);return Array.from(new Set(e))}(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}function ke(t,e,n){const{from:r,to:o}=e,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let l="";return t.nodesBetween(r,o,(t,n,a,c)=>{t.isBlock&&n>r&&(l+=i);const d=null===s||void 0===s?void 0:s[t.type.name];if(d)return a&&(l+=d({node:t,pos:n,parent:a,index:c,range:e})),!1;var h;t.isText&&(l+=null===t||void 0===t||null===(h=t.text)||void 0===h?void 0:h.slice(Math.max(r,n)-n,o-n))}),l}function xe(t,e){return ke(t,{from:0,to:t.content.size},e)}function Ce(t){return Object.fromEntries(Object.entries(t.nodes).filter(t=>{let[,e]=t;return e.spec.toText}).map(t=>{let[e,n]=t;return[e,n.spec.toText]}))}function Se(t,e){const n=jt("string"===typeof e?e:e.name,t.schema);return"node"===n?function(t,e){const n=G(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}:{}}(t,e):"mark"===n?te(t,e):{}}function Me(t){const e=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON.stringify;const n={};return t.filter(t=>{const r=e(t);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)})}(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))}function Ee(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(t=>{let{from:n,to:i}=t;const s=e.slice(o).map(n,-1),l=e.slice(o).map(i),a=e.invert().map(s,-1),c=e.invert().map(l);r.push({oldRange:{from:a,to:c},newRange:{from:s,to:l}})})}),Me(r)}function Ae(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(e=>{const o=st(n.resolve(t),e.type);o&&r.push({mark:e,...o})}):n.nodesBetween(t,e,(t,e)=>{t&&void 0!==(null===t||void 0===t?void 0:t.nodeSize)&&r.push(...t.marks.map(n=>({from:e,to:e+t.nodeSize,mark:n})))}),r}const De=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]: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?void 0:t.type.name)===e?s=t:i-=1}return[s,i]},Te=t=>{const e=t.depth-1;if(e<0)return null;const n=t.index(e);return 0===n?null:t.node(e).child(n-1)};function Oe(t,e){return e.nodes[t]||e.marks[t]||null}function Ne(t,e,n){return Object.fromEntries(Object.entries(n).filter(n=>{let[r]=n;const o=t.find(t=>t.type===e&&t.name===r);return!!o&&o.attribute.keepOnSplit}))}function _e(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{empty:r,ranges:o}=t.selection,i=e?lt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(t=>!i||i.name===t.type.name).find(t=>rt(t.attrs,n,{strict:!1}));let s=0;const l=[];if(o.forEach(e=>{let{$from:n,$to:r}=e;const o=n.pos,a=r.pos;t.doc.nodesBetween(o,a,(t,e)=>{if(i&&t.inlineContent&&!t.type.allowsMarkType(i))return!1;if(!t.isText&&!t.marks.length)return;const n=Math.max(o,e),r=Math.min(a,e+t.nodeSize);s+=r-n,l.push(...t.marks.map(t=>({mark:t,from:n,to:r})))})}),0===s)return!1;const a=l.filter(t=>!i||i.name===t.mark.type.name).filter(t=>rt(t.mark.attrs,n,{strict:!1})).reduce((t,e)=>t+e.to-e.from,0),c=l.filter(t=>!i||t.mark.type!==i&&t.mark.type.excludes(i)).reduce((t,e)=>t+e.to-e.from,0);return(a>0?a+c:a)>=s}const Re=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const n=oe(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<r.parent.nodeSize-2||n.pos!==r.pos)},Le=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function ze(t,e){return Array.isArray(e)?e.some(e=>("string"===typeof e?e:e.name)===t.name):e}function Ie(t,e){const{nodeExtensions:n}=de(e),r=n.find(e=>e.name===t);if(!r)return!1;const o=ce(ie(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"===typeof o&&o.split(" ").includes("list")}function Fe(t){let{checkChildren:e=!0,ignoreWhitespace:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n){if("hardBreak"===t.type.name)return!0;var r;if(t.isText)return!/\S/.test(null!==(r=t.text)&&void 0!==r?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(0===t.content.childCount)return!0;
2if(e){let r=!0;return t.content.forEach(t=>{!1!==r&&(Fe(t,{ignoreWhitespace:n,checkChildren:e})||(r=!1))}),r}return!1}function $e(t){return t instanceof l.nh}var Pe=class t{constructor(t){this.position=t}static fromJSON(e){return new t(e.position)}toJSON(){return{position:this.position}}};function Be(t,e){const n=e.mapping.mapResult(t.position);return{position:new Pe(n.pos),mapResult:n}}function He(t){return new Pe(t)}function je(t,e,n){const r=t.state.doc.content.size,o=ht(e,0,r),i=ht(n,0,r),s=t.coordsAtPos(o),l=t.coordsAtPos(i,-1),a=Math.min(s.top,l.top),c=Math.max(s.bottom,l.bottom),d=Math.min(s.left,l.left),h=Math.max(s.right,l.right),u={top:a,bottom:c,left:d,right:h,width:h-d,height:c-a,x:d,y:a};return{...u,toJSON:()=>u}}const Ve=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{tr:r,state:o,dispatch:i}=n;const{selection:s}=r,{empty:l,ranges:a}=s,c=lt(t,o.schema);if(i)if(l){const t=te(o,c);r.addStoredMark(c.create({...t,...e}))}else a.forEach(t=>{const n=t.$from.pos,i=t.$to.pos;o.doc.nodesBetween(n,i,(t,o)=>{const s=Math.max(o,n),l=Math.min(o+t.nodeSize,i);t.marks.find(t=>t.type===c)?t.marks.forEach(t=>{c===t.type&&r.addMark(s,l,c.create({...t.attrs,...e}))}):r.addMark(s,l,c.create(e))})});return function(t,e,n){const{selection:r}=e;let o=null;if(dt(r)&&(o=r.$cursor),o){var i;const e=null!==(i=t.storedMarks)&&void 0!==i?i:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(e)||!e.some(t=>t.type.excludes(n)))}const{ranges:s}=r;return s.some(e=>{let{$from:r,$to:o}=e,i=0===r.depth&&t.doc.inlineContent&&t.doc.type.allowsMarkType(n);return t.doc.nodesBetween(r.pos,o.pos,(t,e,r)=>{if(i)return!1;if(t.isInline){const e=!r||r.type.allowsMarkType(n),o=!!n.isInSet(t.marks)||!t.marks.some(t=>t.type.excludes(n));i=e&&o}return!i}),i})}(o,r,c)}},qe=(t,e)=>n=>{let{tr:r}=n;return r.setMeta(t,e),!0},Ue=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,dispatch:o,chain:i}=n;const s=G(t,r.schema);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),s.isTextblock?i().command(t=>{let{commands:n}=t;return!!O(s,{...l,...e})(r)||n.clearNodes()}).command(t=>{let{state:n}=t;return O(s,{...l,...e})(n,o)}).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)}},Ke=t=>e=>{let{tr:n,dispatch:r}=e;if(r){const{doc:e}=n,r=ht(t,0,e.content.size),o=l.nh.create(e,r);n.setSelection(o)}return!0},We=(t,e)=>n=>{let{tr:r,state:o,dispatch:i}=n;const{selection:s}=o;let l,a;return"number"===typeof e?(l=e,a=e):e&&"from"in e&&"to"in e?(l=e.from,a=e.to):(l=s.from,a=s.to),i&&r.doc.nodesBetween(l,a,(e,n)=>{e.isText||r.setNodeMarkup(n,void 0,{...e.attrs,dir:t})}),!0},Je=t=>e=>{let{tr:n,dispatch:r}=e;if(r){const{doc:e}=n,{from:r,to:o}="number"===typeof t?{from:t,to:t}:t,i=l.U3.atStart(e).from,s=l.U3.atEnd(e).to,a=ht(r,i,s),c=ht(o,i,s),d=l.U3.create(e,a,c);n.setSelection(d)}return!0},Ge=t=>e=>{let{state:n,dispatch:r}=e;const o=G(t,n.schema);return(l=o,function(t,e){let{$from:n,$to:r}=t.selection,o=n.blockRange(r,t=>t.childCount>0&&t.firstChild.type==l);if(!o)return!1;let a=o.startIndex;if(0==a)return!1;let c=o.parent,d=c.child(a-1);if(d.type!=l)return!1;if(e){let n=d.lastChild&&d.lastChild.type==c.type,r=s.FK.from(n?l.create():null),a=new s.Ji(s.FK.from(l.create(null,s.FK.from(c.type.create(null,r)))),n?3:1,0),h=o.start,u=o.end;e(t.tr.step(new i.Wg(h-(n?3:1),u,h,u,a,1,!0)).scrollIntoView())}return!0})(n,r);var l};function Ze(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?void 0:e.includes(t.type.name));t.tr.ensureMarks(r)}}const Ye=function(){let{keepMarks:t=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=>{let{tr:n,state:r,dispatch:o,editor:s}=e;const{selection:a,doc:c}=n,{$from:d,$to:h}=a,u=Ne(s.extensionManager.attributes,d.node().type.name,d.node().attrs);if(a instanceof l.nh&&a.node.isBlock)return!(!d.parentOffset||!(0,i.zy)(c,d.pos))&&(o&&(t&&Ze(r,s.extensionManager.splittableMarks),n.split(d.pos).scrollIntoView()),!0);if(!d.parent.isBlock)return!1;
2const p=h.parentOffset===h.parent.content.size,f=0===d.depth?void 0:Mt(d.node(-1).contentMatchAt(d.indexAfter(-1)));let m=p&&f?[{type:f,attrs:u}]:void 0,g=(0,i.zy)(n.doc,n.mapping.map(d.pos),1,m);if(m||g||!(0,i.zy)(n.doc,n.mapping.map(d.pos),1,f?[{type:f}]:void 0)||(g=!0,m=f?[{type:f,attrs:u}]:void 0),o){if(g&&(a instanceof l.U3&&n.deleteSelection(),n.split(n.mapping.map(d.pos),1,m),f&&!p&&!d.parentOffset&&d.parent.type!==f)){const t=n.mapping.map(d.before()),e=n.doc.resolve(t);d.node(-1).canReplaceWith(e.index(),e.index()+1,f)&&n.setNodeMarkup(n.mapping.map(d.before()),f)}t&&Ze(r,s.extensionManager.splittableMarks),n.scrollIntoView()}return g}},Xe=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{tr:r,state:o,dispatch:a,editor:c}=n;const d=G(t,o.schema),{$from:h,$to:u}=o.selection,p=o.selection.node;if(p&&p.isBlock||h.depth<2||!h.sameParent(u))return!1;const f=h.node(-1);if(f.type!==d)return!1;const m=c.extensionManager.attributes;if(0===h.parent.content.size&&h.node(-1).childCount===h.indexAfter(-1)){if(2===h.depth||h.node(-3).type!==d||h.index(-2)!==h.node(-2).childCount-1)return!1;if(a){var g;let t=s.FK.empty;const n=h.index(-1)?1:h.index(-2)?2:3;for(let e=h.depth-n;e>=h.depth-3;e-=1)t=s.FK.from(h.node(e).copy(t));const o=h.indexAfter(-1)<h.node(-2).childCount?1:h.indexAfter(-2)<h.node(-3).childCount?2:3,i={...Ne(m,h.node().type.name,h.node().attrs),...e},a=(null===(g=d.contentMatch.defaultType)||void 0===g?void 0:g.createAndFill(i))||void 0;t=t.append(s.FK.from(d.createAndFill(null,a)||void 0));const c=h.before(h.depth-(n-1));r.replace(c,h.after(-o),new s.Ji(t,4-n,0));let u=-1;r.doc.nodesBetween(c,r.doc.content.size,(t,e)=>{if(u>-1)return!1;t.isTextblock&&0===t.content.size&&(u=e+1)}),u>-1&&r.setSelection(l.U3.near(r.doc.resolve(u))),r.scrollIntoView()}return!0}const y=u.pos===h.end()?f.contentMatchAt(0).defaultType:null,v={...Ne(m,f.type.name,f.attrs),...e},b={...Ne(m,h.node().type.name,h.node().attrs),...e};r.delete(h.pos,u.pos);const w=y?[{type:d,attrs:v},{type:y,attrs:b}]:[{type:d,attrs:v}];if(!(0,i.zy)(r.doc,h.pos,2))return!1;if(a){const{selection:t,storedMarks:e}=o,{splittableMarks:n}=c.extensionManager,i=e||t.$to.parentOffset&&t.$from.marks();if(r.split(h.pos,2,w).scrollIntoView(),!i||!a)return!0;const s=i.filter(t=>n.includes(t.type.name));r.ensureMarks(s)}return!0}};function Qe(t){return t&&"1"!==t?t:null}function tn(t,e){return Qe(t)===Qe(e)}const en=(t,e)=>{const n=oe(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?void 0:o.type)||!(0,i.n9)(t.doc,n.pos)||(!tn(n.node.attrs.type,null===o||void 0===o?void 0:o.attrs.type)||(t.join(n.pos),!0))},nn=(t,e)=>{const n=oe(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?void 0:o.type)||!(0,i.n9)(t.doc,r)||(!tn(n.node.attrs.type,null===o||void 0===o?void 0:o.attrs.type)||(t.join(r),!0))};const rn=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o=>{let{editor:i,tr:s,state:a,dispatch:c,chain:d,commands:h,can:u}=o;const{extensions:p,splittableMarks:f}=i.extensionManager,m=G(t,a.schema),g=G(e,a.schema),{selection:y,storedMarks:v}=a,{$from:b,$to:w}=y,k=b.blockRange(w),x=v||y.$to.parentOffset&&y.$from.marks();if(!k)return!1;const C=oe(t=>Ie(t.type.name,p))(y),S=0===y.from&&y.to===a.doc.content.size,M=a.doc.content.content,E=1===M.length?M[0]:null,A=S&&E&&Ie(E.type.name,p)?{node:E,pos:0,depth:0}:null,D=null!==C&&void 0!==C?C:A,T=!!A;if((!!C&&k.depth>=1&&k.depth-C.depth<=1||T)&&D){if(D.node.type===m)return S&&T?d().command(t=>{let{tr:e,dispatch:n}=t;const r=function(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),o=e.resolve(n.nodeSize-1);return l.U3.between(r,o)}(e);return!!r&&(e.setSelection(r),n&&n(e),!0)}).liftListItem(g).run():h.liftListItem(g);if(Ie(D.node.type.name,p)&&m.validContent(D.node.content))return d().command(()=>(s.setNodeMarkup(D.pos,m),!0)).command(()=>en(s,m)).command(()=>nn(s,m)).run()}return n&&x&&c?d().command(()=>{const t=u().wrapInList(m,r),e=x.filter(t=>f.includes(t.type.name));return s.ensureMarks(e),!!t||h.clearNodes()}).wrapInList(m,r).command(()=>en(s,m)).command(()=>nn(s,m)).run():d().command(()=>!!u().wrapInList(m,r)||h.clearNodes()).wrapInList(m,r).command(()=>en(s,m)).command(()=>nn(s,m)).run()}},on=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=>{let{state:o,commands:i}=r;const{extendEmptyMarkRange:s=!1}=n,l=lt(t,o.schema);return _e(o,l,e)?i.unsetMark(l,{extendEmptyMarkRange:s}):i.setMark(l,e)}},sn=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=>{let{state:o,commands:i}=r;const s=G(t,o.schema),l=G(e,o.schema),a=Ft(o,s,n);let c;return o.selection.$anchor.sameParent(o.selection.$head)&&(c=o.selection.$anchor.parent.attrs),a?i.setNode(l,c):i.setNode(s,{...c,...n})}},ln=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,commands:o}=n;const i=G(t,r.schema);return Ft(r,i,e)?o.lift(i):o.wrapIn(i,e)}},an=()=>t=>{let{state:e,dispatch:n}=t;const r=e.plugins;for(let o=0;o<r.length;o+=1){const t=r[o];let i;if(t.spec.isInputRules&&(i=t.getState(e))){if(n){const t=e.tr,n=i.transform;
2for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(i.text){const n=t.doc.resolve(i.from).marks();t.replaceWith(i.from,i.to,e.schema.text(i.text,n))}else t.delete(i.from,i.to)}return!0}}return!1},cn=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=>{let{tr:n,dispatch:r,editor:o}=e;const{ignoreClearable:i=!1}=t,{selection:s}=n,{empty:l,ranges:a}=s;if(l)return!0;const{nonClearableMarks:c}=o.extensionManager;if(r){const t=Object.values(o.schema.marks).filter(t=>i||!c.includes(t.name));a.forEach(e=>{for(const r of t)n.removeMark(e.$from.pos,e.$to.pos,r)})}return!0}},dn=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{tr:r,state:o,dispatch:i}=n;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=r,a=lt(t,o.schema),{$from:c,empty:d,ranges:h}=l;if(!i)return!0;if(d&&s){var u;let{from:t,to:e}=l;const n=st(c,a,null===(u=c.marks().find(t=>t.type===a))||void 0===u?void 0:u.attrs);n&&(t=n.from,e=n.to),r.removeMark(t,e,a)}else h.forEach(t=>{r.removeMark(t.$from.pos,t.$to.pos,a)});return r.removeStoredMark(a),!0}},hn=t=>e=>{let{tr:n,state:r,dispatch:o}=e;const{selection:i}=r;let s,l;return"number"===typeof t?(s=t,l=t):t&&"from"in t&&"to"in t?(s=t.from,l=t.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(t,e)=>{if(t.isText)return;const r={...t.attrs};delete r.dir,n.setNodeMarkup(e,void 0,r)}),!0},un=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{tr:r,state:o,dispatch:i}=n,s=null,l=null;const a=jt("string"===typeof t?t:t.name,o.schema);if(!a)return!1;"node"===a&&(s=G(t,o.schema)),"mark"===a&&(l=lt(t,o.schema));let c=!1;return r.selection.ranges.forEach(t=>{const n=t.$from.pos,a=t.$to.pos;let d,h,u,p;r.selection.empty?o.doc.nodesBetween(n,a,(t,e)=>{s&&s===t.type&&(c=!0,u=Math.max(e,n),p=Math.min(e+t.nodeSize,a),d=e,h=t)}):o.doc.nodesBetween(n,a,(t,o)=>{o<n&&s&&s===t.type&&(c=!0,u=Math.max(o,n),p=Math.min(o+t.nodeSize,a),d=o,h=t),o>=n&&o<=a&&(s&&s===t.type&&(c=!0,i&&r.setNodeMarkup(o,void 0,{...t.attrs,...e})),l&&t.marks.length&&t.marks.forEach(s=>{if(l===s.type&&(c=!0,i)){const i=Math.max(o,n),c=Math.min(o+t.nodeSize,a);r.addMark(i,c,l.create({...s.attrs,...e}))}}))}),h&&(void 0!==d&&i&&r.setNodeMarkup(d,void 0,{...h.attrs,...e}),l&&h.marks.length&&h.marks.forEach(t=>{l===t.type&&i&&r.addMark(u,p,l.create({...t.attrs,...e}))}))}),c}},pn=new l.hs("__tiptap_decorations__"),fn=t=>e=>{let{tr:n,dispatch:r}=e;return r&&n.setMeta(pn,{type:"force",name:t}),!0},mn=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,dispatch:o}=n;return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(n,r){let{$from:o,$to:s}=n.selection,l=o.blockRange(s),a=l&&(0,i.oM)(l,t,e);return!!a&&(r&&r(n.tr.wrap(l,a).scrollIntoView()),!0)}}(G(t,r.schema),e)(r,o)}},gn=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{let{state:r,dispatch:o}=n;return I(G(t,r.schema),e)(r,o)}};var yn=o({blur:()=>j,clearContent:()=>V,clearNodes:()=>q,command:()=>U,createParagraphNear:()=>K,cut:()=>W,deleteCurrentNode:()=>J,deleteNode:()=>Z,deleteRange:()=>Y,deleteSelection:()=>Q,enter:()=>tt,exitCode:()=>et,extendMarkRange:()=>at,first:()=>ct,focus:()=>mt,forEach:()=>gt,insertContent:()=>yt,insertContentAt:()=>St,insertDefaultBlock:()=>Et,joinBackward:()=>Tt,joinDown:()=>Dt,joinForward:()=>Ot,joinItemBackward:()=>Nt,joinItemForward:()=>_t,joinTextblockBackward:()=>Rt,joinTextblockForward:()=>Lt,joinUp:()=>At,keyboardShortcut:()=>It,lift:()=>$t,liftEmptyBlock:()=>Pt,liftListItem:()=>Bt,newlineInCode:()=>Ht,resetAttributes:()=>qt,scrollIntoView:()=>Ut,selectAll:()=>Kt,selectNodeBackward:()=>Wt,selectNodeForward:()=>Jt,selectParentNode:()=>Gt,selectTextblockEnd:()=>Zt,selectTextblockStart:()=>Yt,setContent:()=>Qt,setMark:()=>Ve,setMeta:()=>qe,setNode:()=>Ue,setNodeSelection:()=>Ke,setTextDirection:()=>We,setTextSelection:()=>Je,sinkListItem:()=>Ge,splitBlock:()=>Ye,splitListItem:()=>Xe,toggleList:()=>rn,toggleMark:()=>on,toggleNode:()=>sn,toggleWrap:()=>ln,undoInputRule:()=>an,unsetAllMarks:()=>cn,unsetMark:()=>dn,unsetTextDirection:()=>hn,updateAttributes:()=>un,updateDecorations:()=>fn,wrapIn:()=>mn,wrapInList:()=>gn});const vn=new WeakMap;var bn=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];const o=this.callbacks[t];return o&&o.forEach(t=>t.apply(this,n)),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}once(t,e){var n=this;const r=function(){n.off(t,r);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];e.apply(n,i)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}};const wn="undefined"!==typeof process&&!1;function kn(t){return"widget"===t.kind}function xn(t,e){const n=[],r=new Set;for(const o of t)"widget"===o.kind&&kn(o)&&r.add(o.key),n.push(o.toPMDecoration(e));return{decorations:n,widgetKeys:r}}function Cn(t){let{position:e,from:n,to:r,docSize:o}=t;return!(e<n)&&(e<r||e===r&&r===o)}function Sn(t){let{decorations:e,from:n,to:r,docSize:o,extensionName:i,warnedExtensions:s}=t;return e.filter(t=>!!Cn({position:t.anchor,from:n,to:r,docSize:o})||(t.anchor===r||s.has(i)||(s.add(i),console.warn(`[tiptap warn]: Extension "${i}" returned a decoration outside the requested range [${n}, ${r}). It was ignored.`)),!1))}function Mn(t){var e;const n=null===(e=t.spec)||void 0===e?void 0:e.key;return"string"===typeof n?n:void 0}function En(t){return"attr"===t.jsonID}function An(t,e){let n=null,r=0,o=0;for(let i=0;i<t.childCount&&!(o>e.to);i+=1){const s=o+t.child(i).nodeSize;s>=e.from&&(null===n&&(n=o),r=s),o=s}return null===n?null:{from:n,to:r}}function Dn(t,e){if(t.steps.some(t=>!function(t){let e=!1;
2if(t.getMap().forEach(()=>{e=!0}),e||En(t))return!0;const n=t;return"number"===typeof n.from&&"number"===typeof n.to}(t)))return{type:"full"};const n=Ee(t).map(t=>{let{newRange:e}=t;return e});t.steps.forEach((e,r)=>{if(!En(e))return;const o=t.mapping.slice(r);n.push({from:o.map(e.pos,-1),to:o.map(e.pos+1)})});const r=[];for(const i of n){const t=An(e,i);t&&r.push(t)}r.sort((t,e)=>t.from-e.from);const o=[];for(const i of r){const t=o[o.length-1];t&&i.from<=t.to?t.to=Math.max(t.to,i.to):o.push({...i})}return{type:"ranges",ranges:o}}function Tn(t,e,n,r){return t.map(e,n,{onRemove:t=>{const e=null===t||void 0===t?void 0:t.key;"string"===typeof e&&r.delete(e)}})}function On(t,e,n){var r,o;const i=null!==(r=e.decorationSetsByExtension[t])&&void 0!==r?r:$.zF.empty,s=new Set(null!==(o=e.widgetKeysByExtension[t])&&void 0!==o?o:[]);return{set:Tn(i,n.mapping,n.doc,s),widgetKeys:s}}function Nn(t,e){const n=Object.values(e).flatMap(t=>t.find());return $.zF.create(t,n)}function _n(t){const e=new Set;for(const n of Object.values(t))for(const t of n)e.add(t);return e}function Rn(t,e,n){return!!n||"manual"!==t.update&&(t.shouldUpdate?t.shouldUpdate(e):e.tr.docChanged)}const Ln=new Set;var zn=class{constructor(t){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=t=>{let{nextState:e}=t;const n=pn.getState(e);n&&this.warnDuplicateWidgetKeys(n)},this.editor=t.editor,this.entries=this.resolveEntries(t.entries),this.entries.forEach(t=>{let{name:e,spec:n}=t;return function(t,e){var n;switch(null!==(n=e.update)&&void 0!==n?n:"document"){case"document":if(e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case"changedRanges":if(!e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case"manual":if(e.createInRange)throw new Error(`[tiptap error]: Extension "${t}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(e.shouldUpdate)throw new Error(`[tiptap error]: Extension "${t}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw new Error(`[tiptap error]: Extension "${t}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}(e,n)}),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on("beforeTransaction",this.handleBeforeTransaction)}destroy(){this.editor.off("beforeTransaction",this.handleBeforeTransaction)}liveWidgetKeys(){var t,e;return null!==(t=null===(e=pn.getState(this.editor.state))||void 0===e?void 0:e.widgetKeys)&&void 0!==t?t:Ln}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(t){const e=[];for(const{name:n,addDecorations:r}of t){const t=r();t&&e.push({name:n,spec:t})}return e}createPlugin(){const{editor:t,entries:e}=this;return new l.k_({key:pn,state:{init:(t,n)=>{const r={},o={};for(const{name:s,spec:l}of e){const{set:t,widgetKeys:e}=this.buildFullSet(s,l,n);r[s]=t,o[s]=e}const i={decorationSetsByExtension:r,widgetKeysByExtension:o,mergedDecorationSet:this.buildMergedSet(n.doc,r),widgetKeys:_n(o)};return this.warnDuplicateWidgetKeys(i),i},apply:(n,r,o,i)=>{const s=n.getMeta(pn),l="force"===(null===s||void 0===s?void 0:s.type)&&!s.name,a="force"===(null===s||void 0===s?void 0:s.type)?s.name:void 0,c={},d={},h=new Set;return function(t,e){var n;vn.set(t,(null!==(n=vn.get(t))&&void 0!==n?n:0)+1);try{return e()}finally{var r;const e=(null!==(r=vn.get(t))&&void 0!==r?r:1)-1;e>0?vn.set(t,e):vn.delete(t)}}(t,()=>{for(const{name:s,spec:u}of e){const e=l||a===s;if(Rn(u,{editor:t,tr:n,oldState:o,newState:i},e))if("changedRanges"===u.update&&n.docChanged&&!e){const t=this.applyChangedRangesRecompute(s,u,r,n,i);c[s]=t.set,d[s]=t.widgetKeys,h.add(s)}else{const{set:t,widgetKeys:e}=this.buildFullSet(s,u,i);c[s]=t,d[s]=e,h.add(s)}else{const t=On(s,r,n);
2c[s]=t.set,d[s]=t.widgetKeys}}}),0!==h.size||n.docChanged?{decorationSetsByExtension:c,widgetKeysByExtension:d,mergedDecorationSet:this.mergeAfterApply({entries:e,previous:r,tr:n,decorationSetsByExtension:c,recomputedNames:h}),widgetKeys:_n(d)}:r}},props:{decorations(t){var e,n;return null!==(e=null===(n=pn.getState(t))||void 0===n?void 0:n.mergedDecorationSet)&&void 0!==e?e:$.zF.empty}}})}applyChangedRangesRecompute(t,e,n,r,o){const i=Dn(r,o.doc);return"full"===i.type?this.buildFullSet(t,e,o):this.rebuildRanges(t,e,n,r,o,i.ranges)}rebuildRanges(t,e,n,r,o,i){var s,l;const a=null!==(s=n.decorationSetsByExtension[t])&&void 0!==s?s:$.zF.empty,c=new Set(null!==(l=n.widgetKeysByExtension[t])&&void 0!==l?l:[]);let d=Tn(a,r.mapping,r.doc,c);const h=o.doc.content.size;for(const{from:u,to:p}of i){const n=d.find(u,p).filter(t=>Cn({position:t.from,from:u,to:p,docSize:h}));for(const t of n){const e=Mn(t);e&&c.delete(e)}d=d.remove(n);const{decorations:r,widgetKeys:i}=xn(Sn({decorations:this.runCreate(t,"createInRange",()=>e.createInRange({editor:this.editor,state:o,view:this.mountedView,from:u,to:p})),from:u,to:p,docSize:h,extensionName:t,warnedExtensions:this.warnedOutOfRangeExtensions}),t);d=d.add(o.doc,r);for(const t of i)c.add(t)}return{set:d,widgetKeys:c}}buildFullSet(t,e,n){const r=this.runCreate(t,"create",()=>e.create({editor:this.editor,state:n,view:this.mountedView}));
2return function(t,e,n){const{decorations:r,widgetKeys:o}=xn(e,n);return{set:$.zF.create(t,r),widgetKeys:o}}(n.doc,r,t)}runCreate(t,e,n){try{return n()}catch(r){return console.error(`[tiptap error]: Extension "${t}" threw in \`addDecorations().${e}()\`. Its decorations were dropped for this update.`,r),[]}}warnDuplicateWidgetKeys(t){if(!wn)return;if(0===t.widgetKeys.size)return void this.warnedWidgetKeys.clear();const e=function(t){const e=new Map,n=new Map;for(const s of t.find()){var r,o,i;const t=Mn(s);if(!t)continue;const l=null!==(r=s.spec.extensionName)&&void 0!==r?r:"unknown",a=null!==(o=e.get(t))&&void 0!==o?o:new Set;a.add(l),e.set(t,a),n.set(t,(null!==(i=n.get(t))&&void 0!==i?i:0)+1)}return Array.from(e,t=>{let[e,n]=t;return{key:e,extensions:n}}).filter(t=>{let{key:e}=t;var r;return(null!==(r=n.get(e))&&void 0!==r?r:0)>1})}(t.mergedDecorationSet),n=new Set(e.map(t=>{let{key:e}=t;return e}));for(const{key:r,extensions:o}of e){if(this.warnedWidgetKeys.has(r))continue;const t=Array.from(o).map(t=>`"${t}"`).join(", ");console.warn(`[tiptap warn]: Duplicate widget decoration key "${r}" in extension${1===o.size?"":"s"} ${t}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(t,e){const n=Object.keys(e);return 1===n.length?e[n[0]]:Nn(t,e)}mergeAfterApply(t){let{entries:e,previous:n,tr:r,decorationSetsByExtension:o,recomputedNames:i}=t;return 1===e.length?o[e[0].name]:0===i.size?n.mergedDecorationSet.map(r.mapping,r.doc):Nn(r.doc,o)}};function In(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof l.nh){const t=r.index();return r.parent.canReplaceWith(t,t+1,e)}let o=r.depth;for(;o>=0;){const t=r.index(o);if(r.node(o).contentMatchAt(t).matchType(e))return!0;o-=1}return!1}function Fn(t){return"Object"===function(t){return Object.prototype.toString.call(t).slice(8,-1)}(t)&&(t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype)}function $n(t,e,n){const r=t.split("\n"),o=[];let i="",s=0;const l=e.baseIndentSize||2;for(;s<r.length;){const t=r[s],d=t.match(e.itemPattern);if(!d){if(o.length>0)break;if(""===t.trim()){s+=1,i=`${i}${t}\n`;continue}return}const h=e.extractItemData(d),{indentLevel:u,mainContent:p}=h;i=`${i}${t}\n`;const f=[p];for(s+=1;s<r.length;){var a;const t=r[s];if(""===t.trim()){var c;const e=r.slice(s+1).findIndex(t=>""!==t.trim());if(-1===e)break;if(((null===(c=r[s+1+e].match(/^(\s*)/))||void 0===c||null===(c=c[1])||void 0===c?void 0:c.length)||0)>u){f.push(t),i=`${i}${t}\n`,s+=1;continue}break}if(!(((null===(a=t.match(/^(\s*)/))||void 0===a||null===(a=a[1])||void 0===a?void 0:a.length)||0)>u))break;f.push(t),i=`${i}${t}\n`,s+=1}let m;const g=f.slice(1);if(g.length>0){const t=g.map(t=>t.slice(u+l)).join("\n");t.trim()&&(m=e.customNestedParser?e.customNestedParser(t):n.blockTokens(t))}const y=e.createToken(h,m);o.push(y)}if(0!==o.length)return{items:o,raw:i}}function Pn(t){let e=0;for(const n of t)e="\t"===n?e+4-e%4:e+1;return e}function Bn(t,e,n,r,o){if(!t||!Array.isArray(t.content))return"";const i="function"===typeof n?n(r):n,[s,...l]=t.content;let a=`${i}${e.renderChildren([s])}`;return l&&l.length>0&&l.forEach((t,n)=>{var r,s;const l=null!==(r=null===(s=e.renderChild)||void 0===s?void 0:s.call(e,t,n+1))&&void 0!==r?r:e.renderChildren([t]);if(void 0!==l&&null!==l){const n=t=>{if(!(null===o||void 0===o?void 0:o.alignNestedToPrefix))return e.indent(t);const n=e.indent(""),r=Pn(i);return(Pn(n)>=r?n:" ".repeat(r))+t},r=l.split("\n").map(t=>n(t||"")).join("\n");a+="paragraph"===t.type?`\n\n${r}`:`\n${r}`}}),a}function Hn(t,e){const n={...t};return Fn(t)&&Fn(e)&&Object.keys(e).forEach(r=>{Fn(e[r])&&Fn(t[r])?n[r]=Hn(t[r],e[r]):n[r]=e[r]}),n}function jn(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((e,r)=>{const o=i.mapping.map(r),l=i.mapping.map(r)+e.nodeSize;let a=null;if(e.marks.forEach(t=>{if(t!==s)return!1;a=t}),!a)return;let c=!1;if(Object.keys(n).forEach(t=>{n[t]!==a.attrs[t]&&(c=!0)}),c){const e=t.type.create({...t.attrs,...n});i.removeMark(o,l,t.type),i.addMark(o,l,e)}}),i.docChanged&&e.view.dispatch(i)}var Vn=class{constructor(t,e,n){this.component=t,this.editor=e.editor,this.options={...n},this.mark=e.mark,this.HTMLAttributes=e.HTMLAttributes}get dom(){return this.editor.view.dom}get contentDOM(){return null}updateAttributes(t,e){jn(e||this.mark,this.editor,t)}ignoreMutation(t){return!this.dom||!this.contentDOM||("function"===typeof this.options.ignoreMutation?this.options.ignoreMutation({mutation:t}):"selection"!==t.type&&(!(this.contentDOM.contains(t.target)&&"childList"===t.type&&(ft()||pt())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes
2)].every(t=>t.isContentEditable))&&(this.contentDOM===t.target&&"attributes"===t.type||!this.contentDOM.contains(t.target))))}},qn=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=null===(e=t.undoable)||void 0===e||e}};function Un(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=t,{view:a}=n;if(a.composing)return!1;const c=a.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 h=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(t,e,o,i)=>{var s,l;const a=(null===(s=(l=t.type.spec).toText)||void 0===s?void 0:s.call(l,{node:t,pos:e,parent:o,index:i}))||t.textContent||"%leaf%";n+=t.isAtom&&!t.isText?a:a.slice(0,Math.max(0,r-e))}),n}(c)+i;return s.forEach(t=>{if(d)return;const e=((t,e)=>{if(nt(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})(h,t.find);if(!e)return;const s=e[0].length-i.length;if(s>0){const t=c.parentOffset-s;if(t<0||c.parent.textBetween(t,c.parentOffset)!==e[0].slice(0,s))return}const u=a.state.tr,p=B({state:a.state,transaction:u}),f={from:r-(e[0].length-i.length),to:o},{commands:m,chain:g,can:y}=new H({editor:n,state:p});null!==t.handler({state:p,range:f,match:e,commands:m,chain:g,can:y})&&u.steps.length&&(t.undoable&&u.setMeta(l,{transform:u,from:r,to:o,text:i}),a.dispatch(u),d=!0)}),d}var Kn=class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...ce(ie(this,"addOptions",{name:this.name}))}}get storage(){return{...ce(ie(this,"addStorage",{name:this.name,options:this.options}))}}configure(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=this.extend({...this.config,addOptions:()=>Hn(this.options,t)});return e.name=this.name,e.parent=this.parent,this.child=null,e}extend(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Wn=class t extends Kn{constructor(){super(...arguments),this.type="mark"}static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n="function"===typeof e?e():e;return new t(n)}static handleExit(t){let{editor:e,mark:n}=t;const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const t=o.marks();if(!t.find(t=>(null===t||void 0===t?void 0:t.type.name)===n.name))return!1;const i=t.find(t=>(null===t||void 0===t?void 0:t.type.name)===n.name);return i&&r.removeStoredMark(i),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){const e="function"===typeof t?t():t;return super.extend(e)}},Jn=class{constructor(t){this.find=t.find,this.handler=t.handler}};function Gn(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:a,chain:c,can:d}=new H({editor:e,state:n}),h=[];return n.doc.nodesBetween(r,o,(t,e)=>{var u,p,f,m;if((null===(u=t.type)||void 0===u||null===(u=u.spec)||void 0===u?void 0:u.code)||!(t.isText||t.isTextblock||t.isInline))return;const g=null!==(p=null!==(f=null===(m=t.content)||void 0===m?void 0:m.size)&&void 0!==f?f:t.nodeSize)&&void 0!==p?p:0,y=Math.max(r,e),v=Math.min(o,e+g);if(y>=v)return;((t,e,n)=>{if(nt(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.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}):[]})(t.isText?t.text||"":t.textBetween(y-e,v-e,void 0,"\ufffc"),i.find,s).forEac
2h(t=>{if(void 0===t.index)return;const e=y+t.index+1,r=e+t[0].length,o={from:n.tr.mapping.map(e),to:n.tr.mapping.map(r)},u=i.handler({state:n,range:o,match:t,commands:a,chain:c,can:d,pasteEvent:s,dropEvent:l});h.push(u)})}),h.every(t=>null!==t)}let Zn=null;function Yn(t){const{editor:e,rules:n}=t;let r,o=null,i=!1,a=!1,c="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null;try{r="undefined"!==typeof DragEvent?new DragEvent("drop"):null}catch{r=null}const d=t=>{let{state:n,from:o,to:i,rule:s,pasteEvt:l}=t;const a=n.tr,d=B({state:n,transaction:a});if(Gn({editor:e,state:d,from:Math.max(o-1,0),to:i.b-1,rule:s,pasteEvent:l,dropEvent:r})&&a.steps.length){try{r="undefined"!==typeof DragEvent?new DragEvent("drop"):null}catch{r=null}return c="undefined"!==typeof ClipboardEvent?new ClipboardEvent("paste"):null,a}};return n.map(t=>new l.k_({view(t){const n=n=>{var r;o=(null===(r=t.dom.parentElement)||void 0===r?void 0:r.contains(n.target))?t.dom.parentElement:null,o&&(Zn=e)},r=()=>{Zn&&(Zn=null)};return window.addEventListener("dragstart",n),window.addEventListener("dragend",r),{destroy(){window.removeEventListener("dragstart",n),window.removeEventListener("dragend",r)}}},props:{handleDOMEvents:{drop:(t,e)=>{if(a=o===t.dom.parentElement,r=e,!a){const t=Zn;(null===t||void 0===t?void 0:t.isEditable)&&setTimeout(()=>{const e=t.state.selection;e&&t.commands.deleteRange({from:e.from,to:e.to})},10)}return!1},paste:(t,e)=>{var n;const r=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");return c=e,i=!!(null===r||void 0===r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(e,n,r)=>{const o=e[0],l="paste"===o.getMeta("uiEvent")&&!i,h="drop"===o.getMeta("uiEvent")&&!a,u=o.getMeta("applyPasteRules"),p=!!u;if(!l&&!h&&!p)return;if(p){let{text:e}=u;"string"===typeof e||(e=le(s.FK.from(e),r.schema));const{from:n}=u,o=n+e.length,i=(t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(e=n.clipboardData)||void 0===e||e.setData("text/html",t),n})(e);return d({rule:t,state:r,from:n,to:{b:o},pasteEvt:i})}const f=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);return"number"===typeof f&&m&&f!==m.b?d({rule:t,state:r,from:f,to:m,pasteEvt:c}):void 0}}))}var Xn=class{constructor(t,e){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=e,this.baseExtensions=t,this.extensions=we(t),this.schema=ve(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n=ie(e,"addCommands",{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Oe(e.name,this.schema)});return n?{...t,...n()}:t},{})}get plugins(){const{editor:t}=this,e=be([...this.extensions].reverse()).flatMap(e=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:Oe(e.name,this.schema)},r=[],o=ie(e,"addKeyboardShortcuts",n);let i={};if("mark"===e.type&&ie(e,"exitable",n)&&(i.ArrowRight=()=>Wn.handleExit({editor:t,mark:e})),o){const e=Object.fromEntries(Object.entries(o()).map(e=>{let[n,r]=e;return[n,()=>r({editor:t})]}));i={...i,...e}}const a=(0,P.w)(i);r.push(a);const c=ie(e,"addInputRules",n);if(ze(e,t.options.enableInputRules)&&c){const e=c();if(e&&e.length){const n=function(t){const{editor:e,rules:n}=t,r=new l.k_({state:{init:()=>null,apply(t,o,i){const l=t.getMeta(r);if(l)return l;const a=t.getMeta("applyInputRules");return a&&setTimeout(()=>{let{text:t}=a;"string"===typeof t||(t=le(s.FK.from(t),i.schema));const{from:o}=a,l=o+t.length;Un({editor:e,from:o,to:l,text:t,rules:n,plugin:r})}),t.selectionSet||t.docChanged?null:o}},props:{handleTextInput:(t,o,i,s)=>Un({editor:e,from:o,to:i,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:t=>(setTimeout(()=>{const{$cursor:o}=t.state.selection;o&&Un({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(t,o){if("Enter"!==o.key)return!1;const{$cursor:i}=t.state.selection;return!!i&&Un({editor:e,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}({editor:t,rules:e}),o=Array.isArray(n)?n:[n];r.push(...o)}}const d=ie(e,"addPasteRules",n);if(ze(e,t.options.enablePasteRules)&&d){const e=d();if(e&&e.length){const n=Yn({editor:t,rules:e});
2r.push(...n)}}const h=ie(e,"addProseMirrorPlugins",n);if(h){const t=h();r.push(...t)}return r}),n=this.createDecorationPlugin();return n&&e.push(n),e}createDecorationPlugin(){var t;const{editor:e}=this;null===(t=this.decorationManager)||void 0===t||t.destroy();const n=[];return this.extensions.forEach(t=>{const r=ie(t,"addDecorations",{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Oe(t.name,this.schema)});r&&n.push({name:t.name,addDecorations:r})}),this.decorationManager=new zn({editor:e,entries:n}),this.decorationManager.plugin}get attributes(){return he(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=de(this.extensions);return Object.fromEntries(e.filter(t=>!!ie(t,"addNodeView")).map(e=>{const n=this.attributes.filter(t=>t.type===e.name),r=ie(e,"addNodeView",{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:G(e.name,this.schema)});if(!r)return[];const o=r();if(!o)return[];return[e.name,(r,i,s,l,a)=>{const c=fe(r,n);return o({node:r,view:i,getPos:s,decorations:l,innerDecorations:a,editor:t,extension:e,HTMLAttributes:c})}]}))}dispatchTransaction(t){const{editor:e}=this;return be([...this.extensions].reverse()).reduceRight((t,n)=>{const r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Oe(n.name,this.schema)},o=ie(n,"dispatchTransaction",r);return o?e=>{o.call(r,{transaction:e,next:t})}:t},t)}transformPastedHTML(t){const{editor:e}=this;return be([...this.extensions]).reduce((t,n)=>{const r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Oe(n.name,this.schema)},o=ie(n,"transformPastedHTML",r);return o?(e,n)=>{const i=t(e,n);return o.call(r,i)}:t},t||(t=>t))}get markViews(){const{editor:t}=this,{markExtensions:e}=de(this.extensions);return Object.fromEntries(e.filter(t=>!!ie(t,"addMarkView")).map(e=>{const n=this.attributes.filter(t=>t.type===e.name),r=ie(e,"addMarkView",{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:lt(e.name,this.schema)});if(!r)return[];return[e.name,(o,i,s)=>{const l=fe(o,n);return r()({mark:o,view:i,inline:s,editor:t,extension:e,HTMLAttributes:l,updateAttributes:e=>{jn(o,t,e)}})}]}))}destroy(){var t;null===(t=this.decorationManager)||void 0===t||t.destroy(),this.extensions.forEach(t=>{let e=t;for(;e.parent;){const t=e.parent;t.child===e&&(t.child=null),e=t}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(t=>[t.name,t.storage])),t.forEach(t=>{const e={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Oe(t.name,this.schema)};var n,r;"mark"===t.type&&((null===(n=ce(ie(t,"keepOnSplit",e)))||void 0===n||n)&&this.splittableMarks.push(t.name),null===(r=ce(ie(t,"clearable",e)))||void 0===r||r||this.nonClearableMarks.push(t.name));const o=ie(t,"onBeforeCreate",e),i=ie(t,"onCreate",e),s=ie(t,"onUpdate",e),l=ie(t,"onSelectionUpdate",e),a=ie(t,"onTransaction",e),c=ie(t,"onFocus",e),d=ie(t,"onBlur",e),h=ie(t,"onDestroy",e);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),h&&this.editor.on("destroy",h)})}};Xn.resolve=we,Xn.sort=be,Xn.flatten=se;var Qn=class t extends Kn{constructor(){super(...arguments),this.type="extension"}static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n="function"===typeof e?e():e;return new t(n)}configure(t){return super.configure(t)}extend(t){const e="function"===typeof t?t():t;return super.extend(e)}};const tr=Qn.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new l.k_({key:new l.hs("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,i=Ce(n),{blockSeparator:s}=this.options,l={...void 0!==s?{blockSeparator:s}:{}
2,textSerializers:i};return[...o.ranges].sort((t,e)=>t.$from.pos-e.$from.pos).map(t=>{let{$from:e,$to:n}=t;return ke(r,{from:e.pos,to:n.pos},l)}).join(null!==s&&void 0!==s?s:"\n\n")}}})]}}),er=Qn.create({name:"commands",addCommands:()=>({...yn})}),nr=Qn.create({name:"delete",onUpdate(t){let{transaction:e,appendedTransactions:n}=t;var r,o;const s=()=>{var t,r,o;if(null!==(t=null===(r=this.editor.options.coreExtensionOptions)||void 0===r||null===(r=r.delete)||void 0===r||null===(o=r.filterTransaction)||void 0===o?void 0:o.call(r,e))&&void 0!==t?t:e.getMeta("y-sync$"))return;const s=ee(e.before,[e,...n]);Ee(s).forEach(t=>{s.mapping.mapResult(t.oldRange.from).deletedAfter&&s.mapping.mapResult(t.oldRange.to).deletedBefore&&s.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,r)=>{const o=r+n.nodeSize-2,i=t.oldRange.from<=r&&o<=t.oldRange.to;this.editor.emit("delete",{type:"node",node:n,from:r,to:o,newFrom:s.mapping.map(r),newTo:s.mapping.map(o),deletedRange:t.oldRange,newRange:t.newRange,partial:!i,editor:this.editor,transaction:e,combinedTransform:s})})});const l=s.mapping;s.steps.forEach((t,n)=>{if(t instanceof i.Ys){var r,o;const i=l.slice(n).map(t.from,-1),a=l.slice(n).map(t.to),c=l.invert().map(i,-1),d=l.invert().map(a),h=i>0&&(null===(r=s.doc.nodeAt(i-1))||void 0===r?void 0:r.marks.some(e=>e.eq(t.mark))),u=null===(o=s.doc.nodeAt(a))||void 0===o?void 0:o.marks.some(e=>e.eq(t.mark));this.editor.emit("delete",{type:"mark",mark:t.mark,from:t.from,to:t.to,deletedRange:{from:c,to:d},newRange:{from:i,to:a},partial:Boolean(u||h),editor:this.editor,transaction:e,combinedTransform:s})}})};null===(r=null===(o=this.editor.options.coreExtensionOptions)||void 0===o||null===(o=o.delete)||void 0===o?void 0:o.async)||void 0===r||r?setTimeout(s,0):s()}}),rr=Qn.create({name:"drop",addProseMirrorPlugins(){return[new l.k_({key:new l.hs("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),or=Qn.create({name:"editable",addProseMirrorPlugins(){return[new l.k_({key:new l.hs("editable"),props:{editable:()=>this.editor.options.editable}})]}}),ir=new l.hs("focusEvents"),sr=Qn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new l.k_({key:ir,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}}}})]}}),lr=Qn.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(t=>{let{commands:e}=t;return[()=>e.undoInputRule(),()=>e.command(t=>{let{tr:n}=t;const{selection:r,doc:o}=n,{empty:i,$anchor:s}=r,{pos:a,parent:c}=s,d=s.parent.isTextblock&&a>0?n.doc.resolve(a-1):s,h=d.parent.type.spec.isolating,u=s.pos-s.parentOffset,p=h&&1===d.parent.childCount?u===s.pos:l.LN.atStart(o).from===a;return!(!i||!c.type.isTextblock||c.textContent.length||!p||p&&"paragraph"===s.parent.type.name)&&e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]}),e=()=>this.editor.commands.first(t=>{let{commands:e}=t;return[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]}),n={Enter:()=>this.editor.commands.first(t=>{let{commands:e}=t;return[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.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()},r={...n},o={...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 ft()||zt()?o:r},addProseMirrorPlugins(){return[new l.k_({key:new l.hs("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(t=>t.getMeta("composition")))return;const r=t.some(t=>t.docChanged)&&!e.doc.eq(n.doc),o=t.some(t=>t.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:a}=e.selection,c=l.LN.atStart(e.doc).from,d=l.LN.atEnd(e.doc).to;
2if(i||s!==c||a!==d)return;if(!Fe(n.doc))return;const h=n.tr,u=B({state:n,transaction:h}),{commands:p}=new H({editor:this.editor,state:u});return p.clearNodes(),h.steps.length?h:void 0}})]}}),ar=Qn.create({name:"paste",addProseMirrorPlugins(){return[new l.k_({key:new l.hs("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),cr=Qn.create({name:"tabindex",addOptions:()=>({value:void 0}),addProseMirrorPlugins(){return[new l.k_({key:new l.hs("tabindex"),props:{attributes:()=>{var t;return this.editor.isEditable||void 0!==this.options.value?{tabindex:null!==(t=this.options.value)&&void 0!==t?t:"0"}:{}}}})]}}),dr=Qn.create({name:"textDirection",addOptions:()=>({direction:void 0}),addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=de(this.extensions);return[{types:t.filter(t=>"text"!==t.name).map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{const e=t.getAttribute("dir");return!e||"ltr"!==e&&"rtl"!==e&&"auto"!==e?this.options.direction:e},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new l.k_({key:new l.hs("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}});var hr=o({ClipboardTextSerializer:()=>tr,Commands:()=>er,Delete:()=>nr,Drop:()=>rr,Editable:()=>or,FocusEvents:()=>sr,Keymap:()=>lr,Paste:()=>ar,Tabindex:()=>cr,TextDirection:()=>dr,focusEventsPluginKey:()=>ir});let ur=!1;var pr=class t{get name(){return this.node.type.name}constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=t,this.editor=e,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return null!==(t=this.actualDepth)&&void 0!==t?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);e=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:e,to:n},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new t(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new t(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new t(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=n.isInline,l=this.pos+r+(i?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(l);if(!o&&!s&&a.depth<=this.depth)return;const c=new t(a,this.editor,o,o||s?n:null);o&&(c.actualDepth=this.depth+1),e.push(c)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===t)if(Object.keys(e).length>0){const t=r.node.attrs,n=Object.keys(e);for(let r=0;r<n.length;r+=1){const o=n[r];if(t[o]!==e[o])break}}else n=r;r=r.parent}return n}querySelector(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.querySelectorAll(t,e,!0)[0]||null}querySelectorAll(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!this.children||0===this.children.length)return r;const o=Object.keys(e);
2return this.children.forEach(i=>{n&&r.length>0||(i.node.type.name===t&&o.every(t=>e[t]===i.node.attrs[t])&&r.push(i),n&&r.length>0||(r=r.concat(i.querySelectorAll(t,e,n))))}),r}setAttribute(t){const{tr:e}=this.editor.state;e.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(e)}};var fr=class extends bn{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:"undefined"!==typeof document?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:t=>{let{error:e}=t;throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:Be,createMappablePosition:He},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),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),this.on("drop",t=>{let{event:e,slice:n,moved:r}=t;return this.options.onDrop(e,n,r)}),this.on("paste",t=>{let{event:e,slice:n}=t;return this.options.onPaste(e,n)}),this.on("delete",this.options.onDelete);const e=this.createDoc();if(!this.editorState){const t=ut(e,this.options.autofocus);this.editorState=l.$t.create({doc:e,schema:this.schema,selection:t||void 0})}!function(t){if(ur)return;let e;ur=!0;try{e=i.Ln.fromJSON(t,{from:0,to:0}).slice.content}catch{return}e instanceof s.FK||console.warn("[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.")}(this.schema),this.options.element&&this.mount(this.options.element)}mount(t){if("undefined"===typeof document)throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(!1!==this.options.autofocus&&null!==this.options.autofocus&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;const t=this.editorView.dom;(null===t||void 0===t?void 0:t.editor)&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{"function"===typeof this.css.remove?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager?this.commandManager.chain():H.createFakeChain()}can(){return this.commandManager?this.commandManager.can():H.createFallbackCan()}injectCSS(){this.options.injectCSS&&"undefined"!==typeof document&&(this.css=function(t,e,n){const r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:""}]`);
2if(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}('.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: 0 !important;\n  height: 0 !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  
2content: "";\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}',this.options.injectNonce))}setOptions(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options={...this.options,...t},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if("state"===e)return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){var t;return wn&&!this.hasWarnedStaleDecorationRead&&(t=this,vn.has(t))&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=ae(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(t=>{const e="string"===typeof t?`${t}$`:t.key;n=n.filter(t=>!t.key.startsWith(e))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const n=[...this.options.enableCoreExtensions?[or,tr.configure({blockSeparator:null===(t=this.options.coreExtensionOptions)||void 0===t||null===(t=t.clipboardTextSerializer)||void 0===t?void 0:t.blockSeparator}),er,sr,lr,cr.configure({value:null===(e=this.options.coreExtensionOptions)||void 0===e||null===(e=e.tabindex)||void 0===e?void 0:e.value}),rr,ar,nr,dr.configure({direction:this.options.textDirection})].filter(t=>"object"!==typeof this.options.enableCoreExtensions||!1!==this.options.enableCoreExtensions[t.name]):[],...this.options.extensions].filter(t=>["extension","node","mark"].includes(null===t||void 0===t?void 0:t.type));this.extensionManager=new Xn(n,this)}createCommandManager(){this.commandManager=new H({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=Xt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;const t=Xt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=l.$t.create({doc:t,schema:this.schema,selection:ut(t,this.options.autofocus)||void 0}),this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&"object"===typeof this.storage.collaboration&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(t=>"collaboration"!==t.name),this.createExtensionManager()}}),this.editorState.doc}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),o=n?this.extensionManager.dispatchTransaction(r):r,i=e.transformPastedHTML,s=this.extensionManager.transformPastedHTML(i);this.editorView=new $.Lz(t,{...e,attributes:{role:"textbox",...null===e||void 0===e?void 0:e.attributes},dispatchTransaction:o,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const l=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(l),this.prependClass(),this.injectCSS();this.view.dom.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${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{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),o=n.includes(t),i=this.state;
2if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!o)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const s=n.findLast(t=>t.getMeta("focus")||t.getMeta("blur")),l=null===s||void 0===s?void 0:s.getMeta("focus"),a=null===s||void 0===s?void 0:s.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:s}),a&&this.emit("blur",{editor:this,event:a.event,transaction:s}),t.getMeta("preventUpdate")||!n.some(t=>t.docChanged)||i.doc.eq(e.doc)||this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return Se(this.state,t)}isActive(t,e){const n="string"===typeof t?t:null,r="string"===typeof t?e:t;return function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return Ft(t,null,n)||_e(t,null,n);const r=jt(e,t.schema);return"node"===r?Ft(t,e,n):"mark"===r&&_e(t,e,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return le(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e="\n\n",textSerializers:n={}}=t||{};return xe(this.state.doc,{blockSeparator:e,textSerializers:{...Ce(this.schema),...n}})}get isEmpty(){return Fe(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit("destroy"),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){var t,e;return null===(t=null===(e=this.editorView)||void 0===e?void 0:e.isDestroyed)||void 0===t||t}$node(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t),n=t>0&&e.nodeAfter&&!e.nodeAfter.isText&&e.nodeAfter.isAtom?e.nodeAfter:null;return new pr(e,this,!1,n)}get $doc(){return this.$pos(0)}};function mr(t){return new qn({find:t.find,handler:e=>{let{state:n,range:r,match:o}=e;const i=ce(t.getAttributes,void 0,o);if(!1===i||null===i)return null;const{tr:s}=n,l=o[o.length-1],a=o[0];if(l){const e=a.search(/\S/),o=r.from+a.indexOf(l),c=o+l.length;if(Ae(r.from,r.to,n.doc).filter(e=>e.mark.type.excluded.find(n=>n===t.type&&n!==e.mark.type)).filter(t=>t.to>o).length)return null;c<r.to&&s.delete(c,r.to),o>r.from&&s.delete(r.from+e,o);const d=r.from+e+l.length;s.addMark(r.from+e,d,t.type.create(i||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function gr(t){return new qn({find:t.find,handler:e=>{let{state:n,range:r,match:o}=e;const i=ce(t.getAttributes,void 0,o)||{},{tr:s}=n,l=r.from;let a=r.to;const c=t.type.create(i);if(o[1]){let t=l+o[0].lastIndexOf(o[1]);t>a?t=a:a=t+o[1].length;const e=o[0][o[0].length-1];s.insertText(e,l+o[0].length-1),s.replaceWith(t,a,c)}else if(o[0]){const e=t.type.isInline?l:l-1;s.insert(e,t.type.create(i)).delete(s.mapping.map(l),s.mapping.map(a))}s.scrollIntoView()},undoable:t.undoable})}function yr(t){return new qn({find:t.find,handler:e=>{let{state:n,range:r,match:o}=e;const i=n.doc.resolve(r.from),s=ce(t.getAttributes,void 0,o)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;n.tr.delete(r.from,r.to).setBlockType(r.from,r.from,t.type,s)},undoable:t.undoable})}function vr(t){return new qn({find:t.find,handler:e=>{let{state:n,range:r,match:o,chain:s}=e;const l=ce(t.getAttributes,void 0,o)||{},a=n.tr.delete(r.from,r.to),c=a.doc.resolve(r.from).blockRange(),d=c&&(0,i.oM)(c,t.type,l);if(!d)return null;if(a.wrap(c,d),t.keepMarks&&t.editor){const{selection:e,storedMarks:r}=n,{splittableMarks:o}=t.editor.extensionManager,i=r||e.$to.parentOffset&&e.$from.marks();if(i){const t=i.filter(t=>o.includes(t.type.name));a.ensureMarks(t)}}if(t.keepAttributes){const e="bulletList"===t.type.name||"orderedList"===t.type.name?"listItem":"taskList";s().updateAttributes(e,l).run()}const h=a.doc.resolve(r.from-1).nodeBefore;h&&h.type===t.type&&(0,i.n9)(a.doc,r.from-1)&&(!t.joinPredicate||t.joinPredicate(o,h))&&a.join(r.from-1)},undoable:t.undoable})}var br=class{constructor(t){var e,n,r,o,i,s;this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=t=>{if(!this.isResizing||!this.activeHandle)return;const e=t.clientX-this.startX,n=t.clientY-this.startY;this.handleResize(e,n)},this.handleTouchMove=t=>{if(!this.isResizing||!this.activeHandle)return;const e=t.touches[0];if(!e)return;const n=e.clientX-this.startX,r=e.clientY-this.startY;this.handleResize(n,r)},this.handleMouseUp=()=>
2{if(!this.isResizing)return;const t=this.element.offsetWidth,e=this.element.offsetHeight;this.onCommit(t,e),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=t=>{"Shift"===t.key&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=t=>{"Shift"===t.key&&(this.isShiftKeyPressed=!1)},this.node=t.node,this.editor=t.editor,this.element=t.element,this.element.draggable=!1,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(null===(e=t.options)||void 0===e?void 0:e.min)&&(this.minSize={...this.minSize,...t.options.min}),(null===(n=t.options)||void 0===n?void 0:n.max)&&(this.maxSize=t.options.max),(null===t||void 0===t||null===(r=t.options)||void 0===r?void 0:r.directions)&&(this.directions=t.options.directions),(null===(o=t.options)||void 0===o?void 0:o.preserveAspectRatio)&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(null===(i=t.options)||void 0===i?void 0:i.className)&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(null===(s=t.options)||void 0===s?void 0:s.createCustomHandle)&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return null!==(t=this.contentElement)&&void 0!==t?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&0===this.handleMap.size&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type===this.node.type&&(this.node=t,!this.onUpdate||this.onUpdate(t,e,n))}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),o=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),o&&(t.style.left="0"),i&&(t.style.right="0"),"top"!==e&&"bottom"!==e||(t.style.left="0",t.style.right="0"),"left"!==e&&"right"!==e||(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;e=this.createCustomHandle?this.createCustomHandle(t):this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",e=>this.handleResizeStart(e,t)),e.addEventListener("touchstart",e=>this.handleResizeStart(e,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}
2removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,"touches"in t?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:o}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,o,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,o=this.startHeight;const i=t.includes("right"),s=t.includes("left"),l=t.includes("bottom"),a=t.includes("top");return i?r=this.startWidth+e:s&&(r=this.startWidth-e),l?o=this.startHeight+n:a&&(o=this.startHeight-n),"right"!==t&&"left"!==t||(r=this.startWidth+(i?e:-e)),"top"!==t&&"bottom"!==t||(o=this.startHeight+(l?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,o,t):{width:r,height:o}}applyConstraints(t,e,n){var r,o;if(!n){var i,s;let n=Math.max(this.minSize.width,t),r=Math.max(this.minSize.height,e);return(null===(i=this.maxSize)||void 0===i?void 0:i.width)&&(n=Math.min(this.maxSize.width,n)),(null===(s=this.maxSize)||void 0===s?void 0:s.height)&&(r=Math.min(this.maxSize.height,r)),{width:n,height:r}}let l=t,a=e;return l<this.minSize.width&&(l=this.minSize.width,a=l/this.aspectRatio),a<this.minSize.height&&(a=this.minSize.height,l=a*this.aspectRatio),(null===(r=this.maxSize)||void 0===r?void 0:r.width)&&l>this.maxSize.width&&(l=this.maxSize.width,a=l/this.aspectRatio),(null===(o=this.maxSize)||void 0===o?void 0:o.height)&&a>this.maxSize.height&&(a=this.maxSize.height,l=a*this.aspectRatio),{width:l,height:a}}applyAspectRatio(t,e,n){const r="top"===n||"bottom"===n;return"left"===n||"right"===n?{width:t,height:t/this.aspectRatio}:r?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};var wr=class t extends Kn{constructor(){super(...arguments),this.type="node"}static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n="function"===typeof e?e():e;return new t(n)}configure(t){return super.configure(t)}extend(t){const e="function"===typeof t?t():t;return super.extend(e)}},kr=class{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.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=()=>{try{return e.getPos()}catch{return}},this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n;const{view:r}=this.editor,o=t.target,i=3===o.nodeType?null===(e=o.parentElement)||void 0===e?void 0:e.closest("[data-drag-handle]"):o.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(o))||!i)return;let s=0,a=0;if(this.dom!==i){var c,d,h,u;const e=this.dom.getBoundingClientRect(),n=i.getBoundingClientRect(),r=null!==(c=t.offsetX)&&void 0!==c?c:null===(d=t.nativeEvent)||void 0===d?void 0:d.offsetX,o=null!==(h=t.offsetY)&&void 0!==h?h:null===(u=t.nativeEvent)||void 0===u?void 0:u.offsetY;s=n.x-e.x+r,a=n.y-e.y+o}const p=this.dom.cloneNode(!0);try{const t=this.dom.getBoundingClientRect();p.style.width=`${Math.round(t.width)}px`,p.style.height=`${Math.round(t.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let f=null;try{var m;f=document.createElement("div"),f.style.position="absolute",f.style.top="-9999px",f.style.left="-9999px",f.style.pointerEvents="none",f.appendChild(p),document.body.appendChild(f),null===(m=t.dataTransfer)||void 0===m||m.setDragImage(p,s,a)}finally{f&&setTimeout(()=>{try{null===f||void 0===f||f.remove()}catch{}},0)}const g=this.getPos();if("number"!==typeof g)return;const y=l.nh.create(r.state.doc,g),v=r.state.tr.setSelection(y);r.dispatch(v)}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 r=t.type.startsWith("drag"),o="dragover"===t.type||"dragenter"===t.type,i="drop"===t.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!i&&!r)return!0;const{isEditable:s}=this.editor,{isDragging:a}=this,c=!!this.node.type.spec.draggable,d=l.nh.isSelectable(this.node),h="copy"===t.type,u="paste"===t.type,p="cut"
2===t.type,f="mousedown"===t.type;if(!c&&d&&r&&t.target===this.dom&&t.preventDefault(),c&&r&&!a&&t.target===this.dom)return t.preventDefault(),!1;if(c&&s&&!a&&f){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||o||i||h||u||p||f&&d)}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.contentDOM.contains(t.target)&&"childList"===t.type&&(ft()||pt())&&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(e=>{let{tr:n}=e;const r=this.getPos();return"number"===typeof r&&(n.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if("number"!==typeof t)return;const e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function xr(t){return new Jn({find:t.find,handler:e=>{let{state:n,range:r,match:o,pasteEvent:i}=e;const s=ce(t.getAttributes,void 0,o,i);if(!1===s||null===s)return null;const{tr:l}=n,a=o[o.length-1],c=o[0];let d=r.to;if(a){const e=c.search(/\S/),i=r.from+c.indexOf(a),h=i+a.length;if(Ae(r.from,r.to,n.doc).filter(e=>e.mark.type.excluded.find(n=>n===t.type&&n!==e.mark.type)).filter(t=>t.to>i).length)return null;h<r.to&&l.delete(h,r.to),i>r.from&&l.delete(r.from+e,i),d=r.from+e+a.length,l.addMark(r.from+e,d,t.type.create(s||{})),void 0!==o.index&&void 0!==o.input&&o.index+o[0].length>=o.input.length||l.removeStoredMark(t.type)}}})}},76797(t,e,n){"use strict";n.d(e,{Ay:()=>i});var r=n(36923);const o=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;var i=r.bP.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML(t){let{HTMLAttributes:e}=t;return["img",(0,r.KV)(this.options.HTMLAttributes,e)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,o,i,s;const l=null!==(e=null===(n=t.attrs)||void 0===n?void 0:n.src)&&void 0!==e?e:"",a=null!==(r=null===(o=t.attrs)||void 0===o?void 0:o.alt)&&void 0!==r?r:"",c=null!==(i=null===(s=t.attrs)||void 0===s?void 0:s.title)&&void 0!==i?i:"";return c?`![${a}](${l} "${c}")`:`![${a}](${l})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||"undefined"===typeof document)return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,i=new Set(["src","width","height"]);return s=>{let{node:l,getPos:a,HTMLAttributes:c,editor:d}=s;const h=document.createElement("img");h.draggable=!1;const u=(0,r.KV)(this.options.HTMLAttributes,c);Object.entries(u).forEach(t=>{let[e,n]=t;if(null!=n)switch(e){case"src":case"width":case"height":break;default:h.setAttribute(e,n)}}),null!==u.src&&(h.src=u.src);let p={...c};const f=t=>{"string"!==typeof t||""===t?(h.hasAttribute("src")&&h.removeAttribute("src"),""!==h.src&&(h.src="")):h.getAttribute("src")!==t&&(h.src=t)};f(c.src);const m=new r.Nz({element:h,editor:d,node:l,getPos:a,onResize:(t,e)=>{h.style.width=`${t}px`,h.style.height=`${e}px`},onCommit:(t,e)=>{const n=a();void 0!==n&&this.editor.chain().setNodeSelection(n).updateAttributes(this.name,{width:t,height:e}).run()},onUpdate:t=>{if(t.type!==l.type)return!1;const e=d.extensionManager.attributes.filter(e=>e.type===t.type.name),n=(0,r.zU)(t,e);
2return Object.keys(p).forEach(t=>{i.has(t)||t in n||h.removeAttribute(t)}),Object.entries(n).forEach(t=>{let[e,n]=t;i.has(e)||(null!=n?h.setAttribute(e,n):h.removeAttribute(e))}),f(n.src),p=n,!0},options:{directions:t,min:{width:e,height:n},preserveAspectRatio:!0===o}}),g=m.dom,y=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",h.complete&&h.naturalWidth>0?y():(h.onload=y,h.onerror=y),m}},addCommands(){return{setImage:t=>e=>{let{commands:n}=e;return n.insertContent({type:this.name,attrs:t})}}},addInputRules(){return[(0,r.Ce)({find:o,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}})},36553(t,e,n){"use strict";n.d(e,{N_:()=>he,Ay:()=>ue});var r=n(36923);const o="numeric",i="ascii",s="alpha",l="asciinumeric",a="alphanumeric",c="domain",d="emoji",h="scheme",u="slashscheme",p="whitespace";function f(t,e){return t in e||(e[t]=[]),e[t]}function m(t,e,n){e[o]&&(e[l]=!0,e[a]=!0),e[i]&&(e[l]=!0,e[s]=!0),e[l]&&(e[a]=!0),e[s]&&(e[a]=!0),e[a]&&(e[c]=!0),e[d]&&(e[c]=!0);for(const r in e){const e=f(r,n);e.indexOf(t)<0&&e.push(t)}}function g(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.j={},this.jr=[],this.jd=null,this.t=t}g.groups={},g.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const n=e.jr[r][0],o=e.jr[r][1];if(o&&n.test(t))return o}return e.jd},has(t){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){let o;return r=r||g.groups,e&&e.j?o=e:(o=new g(e),n&&r&&m(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const i=t.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(t[s]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||g.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const i=e;let s,l=o.go(t);if(l?(s=new g,Object.assign(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new g,i){if(r)if(s.t&&"string"===typeof s.t){const t=Object.assign(function(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}(s.t,r),n);m(i,t,r)}else n&&m(i,n,r);s.t=i}return o.j[t]=s,s}};const y=(t,e,n,r,o)=>t.ta(e,n,r,o),v=(t,e,n,r,o)=>t.tr(e,n,r,o),b=(t,e,n,r,o)=>t.ts(e,n,r,o),w=(t,e,n,r,o)=>t.tt(e,n,r,o),k="WORD",x="UWORD",C="ASCIINUMERICAL",S="ALPHANUMERICAL",M="LOCALHOST",E="TLD",A="UTLD",D="SCHEME",T="SLASH_SCHEME",O="NUM",N="WS",_="NL",R="OPENBRACE",L="CLOSEBRACE",z="OPENBRACKET",I="CLOSEBRACKET",F="OPENPAREN",$="CLOSEPAREN",P="OPENANGLEBRACKET",B="CLOSEANGLEBRACKET",H="FULLWIDTHLEFTPAREN",j="FULLWIDTHRIGHTPAREN",V="LEFTCORNERBRACKET",q="RIGHTCORNERBRACKET",U="LEFTWHITECORNERBRACKET",K="RIGHTWHITECORNERBRACKET",W="FULLWIDTHLESSTHAN",J="FULLWIDTHGREATERTHAN",G="AMPERSAND",Z="APOSTROPHE",Y="ASTERISK",X="AT",Q="BACKSLASH",tt="BACKTICK",et="CARET",nt="COLON",rt="COMMA",ot="DOLLAR",it="DOT",st="EQUALS",lt="EXCLAMATION",at="HYPHEN",ct="PERCENT",dt="PIPE",ht="PLUS",ut="POUND",pt="QUERY",ft="QUOTE",mt="FULLWIDTHMIDDLEDOT",gt="SEMI",yt="SLASH",vt="TILDE",bt="UNDERSCORE",wt="EMOJI",kt="SYM";var xt=Object.freeze({__proto__:null,ALPHANUMERICAL:S,AMPERSAND:G,APOSTROPHE:Z,ASCIINUMERICAL:C,ASTERISK:Y,AT:X,BACKSLASH:Q,BACKTICK:tt,CARET:et,CLOSEANGLEBRACKET:B,CLOSEBRACE:L,CLOSEBRACKET:I,CLOSEPAREN:$,COLON:nt,COMMA:rt,DOLLAR:ot,DOT:it,EMOJI:wt,EQUALS:st,EXCLAMATION:lt,FULLWIDTHGREATERTHAN:J,FULLWIDTHLEFTPAREN:H,FULLWIDTHLESSTHAN:W,FULLWIDTHMIDDLEDOT:mt,FULLWIDTHRIGHTPAREN:j,HYPHEN:at,LEFTCORNERBRACKET:V,LEFTWHITECORNERBRACKET:U,LOCALHOST:M,NL:_,NUM:O,OPENANGLEBRACKET:P,OPENBRACE:R,OPENBRACKET:z,OPENPAREN:F,PERCENT:ct,PIPE:dt,PLUS:ht,POUND:ut,QUERY:pt,QUOTE:ft,RIGHTCORNERBRACKET:q,RIGHTWHITECORNERBRACKET:K,SCHEME:D,SEMI:gt,SLASH:yt,SLASH_SCHEME:T,SYM:kt,TILDE:vt,TLD:E,UNDERSCORE:bt,UTLD:A,UWORD:x,WORD:k,WS:N});const Ct=/[a-z]/,St=/\p{L}/u,Mt=/\p{Emoji}/u,Et=/\d/,At=/\s/;let Dt=null,Tt=null;function Ot(t,e){const n=function(t){const e=[],n=t.length;let r=0;for(;r<n;){let o,i=t.charCodeAt(r),s=i<55296||i>56319||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<r;){let l=t,a=null,c=0,d=null,h=-1,u=-1;for(;s<r&&(a=l.go(n[s]));)l=a,l.accepts()?(h=0,u=0,d=l):h>=0&&(h+=n[s].length,u++),c+=n[s].length,i+=n[s].length,s++;i-=h,s-=u,c-=h,o.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return o}function Nt(t,e,n,r,o){let i;const s=e.length;for(let l=0;l<s-1;l++){const n=e[l];t.j[n]?i=t.j[n]:(i=new g(r),i.jr=o.slice(),t.j[n]=i),t=i}return i=new g(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function _t(t){const e=[],n=[];let r=0;for(;r<t.length;){let o=0;for(;"0123456789".indexOf(t[r+o])>=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 Rt={defaultProtocol:"http",events:null,format:zt,formatHref:zt,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Lt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Object.assign({},Rt);t&&(n=Object.assign(n,t instanceof Lt?t.o:t));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}function zt(t){return t}Lt.prototype={o:Rt,ignoreTags:[],defaultRender:t=>t,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]:Rt[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)}};function It(t,e){this.t="token",this.v=t,this.tk=e}
2function Ft(t,e){class n extends It{constructor(e,n){super(e,n),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}It.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)+"\u2026":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(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt.defaultProtocol;return{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),a=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),a&&(s.target=a),c&&(s.rel=c),d&&Object.assign(s,d),{tagName:o,attributes:s,content:i,eventListeners:h}}};const $t=Ft("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Pt=Ft("text"),Bt=Ft("nl"),Ht=Ft("url",{isLink:!0,toHref(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rt.defaultProtocol;return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==M&&t[1].t===nt}});const jt=t=>new g(t);function Vt(t,e,n){const r=n[0].s,o=n[n.length-1].e;return new t(e.slice(r,o),n)}const qt="undefined"!==typeof console&&console&&console.warn||(()=>{}),Ut="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Kt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Wt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Kt.initialized&&qt(`linkifyjs: already initialized - will not register custom scheme "${t}" ${Ut}`),!/^[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');Kt.customSchemes.push([t,e])}function Jt(){Kt.scanner=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const e={};g.groups=e;const n=new g;null==Dt&&(Dt=_t("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==Tt&&(Tt=_t("\u03b5\u03bb1\u03c52\u0431\u04331\u0435\u043b3\u0434\u0435\u0442\u04384\u0435\u044e2\u043a\u0430\u0442\u043e\u043b\u0438\u043a6\u043e\u043c3\u043c\u043a\u04342\u043e\u043d1\u0441\u043a\u0432\u04306\u043e\u043d\u043b\u0430\u0439\u043d5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043a\u04403\u049b\u0430\u04373\u0570\u0561\u05753\u05d9\u05e9\u05e8\u05d0\u05dc5\u05e7\u05d5\u05dd3\u0627\u0628\u0648\u0638\u0628\u064a5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062f\u06464\u0628\u062d\u0631\u064a\u06465\u062c\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062f\u064a\u06296\u0639\u0644\u064a\u0627\u06465\u0645\u063a\u0631\u06285\u0645\u0627\u0631\u0627\u062a5\u06cc\u0631\u0627\u06465\u0628\u0627\u0631\u062a2\u0632\u0627\u06314\u064a\u062a\u06433\u06be\u0627\u0631\u062a5\u062a\u0648\u0646\u06334\u0633\u0648\u062f\u0627\u06463\u0631\u064a\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064a\u06466\u0642\u0637\u06313\u0643\u0627\u062b\u0648\u0644\u064a\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064a\u0633\u064a\u06275\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067e\u0627\u06a9\u0633\u062a\u0627\u06467\u0680\u0627\u0631\u062a4\u0915\u0949\u092e3\u0928\u0947\u091f3\u092d\u093e\u0930\u09240\u092e\u094d3\u094b\u09245\u0938\u0902\u0917\u0920\u09285\u09ac\u09be\u0982\u09b2\u09be5\u09ad\u09be\u09b0\u09a42\u09f0\u09a44\u0a2d\u0a3e\u0a30\u0a244\u0aad\u0abe\u0ab0\u0aa44\u0b2d\u0b3e\u0b30\u0b244\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe6\u0bb2\u0b99\u0bcd\u0b95\u0bc86\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd11\u0c2d\u0c3e\u0c30\u0c24\u0c4d5\u0cad\u0cbe\u0cb0\u0ca44\u0d2d\u0d3e\u0d30\u0d24\u0d025\u0dbd\u0d82\u0d9a\u0dcf4\u0e04\u0e2d\u0e213\u0e44\u0e17\u0e223\u0ea5\u0eb2\u0ea73\u10d2\u10d42\u307f\u3093\u306a3\u30a2\u30de\u30be\u30f34\u30af\u30e9\u30a6\u30c94\u30b0\u30fc\u30b0\u30eb4\u30b3\u30e02\u30b9\u30c8\u30a23\u30bb\u30fc\u30eb3\u30d5\u30a1\u30c3\u30b7\u30e7\u30f36\u30dd\u30a4\u30f3\u30c84\u4e16\u754c2\u4e2d\u4fe11\u56fd1\u570b1\u6587\u7f513\u4e9a\u9a6c\u900a3\u4f01\u4e1a2\u4f5b\u5c712\u4fe1\u606f2\u5065\u5eb72\u516b\u53662\u516c\u53f81\u76ca2\u53f0\u6e7e1\u70632\u5546\u57ce1\u5e971\u68072\u5609\u91cc0\u5927\u9152\u5e975\u5728\u7ebf2\u5927\u62ff2\u5929\u4e3b\u65593\u5a31\u4e502\u5bb6\u96fb2\u5e7f\u4e1c2\u5fae\u535a2\u6148\u55842\u6211\u7231\u4f603\u624b\u673a2\u62db\u80582\u653f\u52a11\u5e9c2\u65b0\u52a0\u57612\u95fb2\u65f6\u5c1a2\u66f8\u7c4d2\u673a\u67842\u6de1\u9a6c\u95213\u6e38\u620f2\u6fb3\u95802\u70b9\u770b2\u79fb\u52a82\u7ec4\u7ec7\u673a\u67844\u7f51\u57401\u5e971\u7ad91\u7edc2\u8054\u901a2\u8c37\u6b4c2\u8d2d\u72692\u901a\u8ca92\u96c6\u56e22\u96fb\u8a0a\u76c8\u79d14\u98de\u5229\u6d663\u98df\u54c12\u9910\u53852\u9999\u683c\u91cc\u62c93\u6e2f2\ub2f7\ub1371\ucef42\uc0bc\uc1312\ud55c\uad6d2")),w(n,"'",Z),w(n,"{",R),w(n,"}",L),w(n,"[",z),w(n,"]",I),w(n,"(",F),w(n,")",$),w(n,"<",P),w(n,">",B),w(n,"\uff08",H),w(n,"\uff09",j),w(n,"\u300c",V),w(n,"\u300d",q),w(n,"\u300e",U),w(n,"\u300f",K),w(n,"\uff1c",W),w(n,"\uff1e",J),w(n,"&",G),w(n,"*",Y),w(n,"@",X),w(n,"`",tt),w(n,"^",et),w(n,":",nt),w(n,",",rt),w(n,"$",ot),w(n,".",it),w(n,"=",st),w(n,"!",lt),w(n,"-",at),w(n,"%",ct),w(n,"|",dt),w(n,"+",ht),w(n,"#",ut),w(n,"?",pt),w(n,'"',ft),w(n,"/",yt),w(n,";",gt),w(n,"~",vt),w(n,"_",bt),w(n,"\\",Q),w(n,"\u30fb",mt);const r=v(n,Et,O,{[o]:!0});v(r,Et,r);const f=v(r,Ct,C,{[l]:!0}),y=v(r,St,S,{[a]:!0}),Ot=v(n,Ct,k,{[i]:!0});v(Ot,Et,f),v(Ot,Ct,Ot),v(f,Et,f),v(f,Ct,f);const Rt=v(n,St,x,{[s]:!0});v(Rt,Ct),v(Rt,Et,y),v(Rt,St,Rt),v(y,Et,y),v(y,Ct),v(y,St,y);const Lt=w(n,"\n",_,{[p]:!0}),zt=w(n,"\r",N,{[p]:!0}),It=v(n,At,N,{[p]:!0});w(n,"\ufffc",It),w(zt,"\n",Lt),w(zt,"\ufffc",It),v(zt,At,It),w(It,"\r"),w(It,"\n"),v(It,At,It),w(It,"\ufffc",It);const Ft=v(n,Mt,wt,{[d]:!0});w(Ft,"#"),v(Ft,Mt,Ft),w(Ft,"\ufe0f",Ft);
2const $t=w(Ft,"\u200d");w($t,"#"),v($t,Mt,Ft);const Pt=[[Ct,Ot],[Et,f]],Bt=[[Ct,null],[St,Rt],[Et,y]];for(let o=0;o<Dt.length;o++)Nt(n,Dt[o],E,k,Pt);for(let o=0;o<Tt.length;o++)Nt(n,Tt[o],A,x,Bt);m(E,{tld:!0,ascii:!0},e),m(A,{utld:!0,alpha:!0},e),Nt(n,"file",D,k,Pt),Nt(n,"mailto",D,k,Pt),Nt(n,"http",T,k,Pt),Nt(n,"https",T,k,Pt),Nt(n,"ftp",T,k,Pt),Nt(n,"ftps",T,k,Pt),m(D,{scheme:!0,ascii:!0},e),m(T,{slashscheme:!0,ascii:!0},e),t=t.sort((t,e)=>t[0]>e[0]?1:-1);for(let s=0;s<t.length;s++){const e=t[s][0],r=t[s][1]?{[h]:!0}:{[u]:!0};e.indexOf("-")>=0?r[c]=!0:Ct.test(e)?Et.test(e)?r[l]=!0:r[i]=!0:r[o]=!0,b(n,e,e,r)}return b(n,"localhost",M,{ascii:!0}),n.jd=new g(kt),{start:n,tokens:Object.assign({groups:e},xt)}}(Kt.customSchemes);for(let t=0;t<Kt.tokenQueue.length;t++)Kt.tokenQueue[t][1]({scanner:Kt.scanner});Kt.parser=function(t){let{groups:e}=t;const n=e.domain.concat([G,Y,X,Q,tt,et,ot,st,at,O,ct,dt,ht,ut,yt,kt,vt,bt]),r=[Z,nt,rt,it,lt,ct,pt,ft,gt,P,B,R,L,I,z,F,$,H,j,V,q,U,K,W,J],o=[G,Z,Y,Q,tt,et,ot,st,at,R,L,ct,dt,ht,ut,pt,yt,kt,vt,bt],i=jt(),s=w(i,vt);y(s,o,s),y(s,e.domain,s);const l=jt(),a=jt(),c=jt();y(i,e.domain,l),y(i,e.scheme,a),y(i,e.slashscheme,c),y(l,o,s),y(l,e.domain,l);const d=w(l,X);w(s,X,d),w(a,X,d),w(c,X,d);const h=w(s,it);y(h,o,s),y(h,e.domain,s);const u=jt();y(d,e.domain,u),y(u,e.domain,u);const p=w(u,it);y(p,e.domain,u);const f=jt($t);y(p,e.tld,f),y(p,e.utld,f),w(d,M,f);const m=w(u,at);w(m,at,m),y(m,e.domain,u),y(f,e.domain,u),w(f,it,p),w(f,at,m);const g=w(l,at),v=w(l,it);w(g,at,g),y(g,e.domain,l),y(v,o,s),y(v,e.domain,l);const b=jt(Ht);y(v,e.tld,b),y(v,e.utld,b),y(b,e.domain,l),y(b,o,s),w(b,it,v),w(b,at,g),w(b,X,d);const k=w(b,nt),x=jt(Ht);y(k,e.numeric,x);const C=jt(Ht),S=jt();y(C,n,C),y(C,r,S),y(S,n,C),y(S,r,S),w(b,yt,C),w(x,yt,C);const E=w(a,nt),A=w(c,nt),D=w(A,yt),T=w(D,yt);y(a,e.domain,l),w(a,it,v),w(a,at,g),y(c,e.domain,l),w(c,it,v),w(c,at,g),y(E,e.domain,C),w(E,yt,C),w(E,pt,C),y(T,e.domain,C),y(T,n,C),w(T,yt,C);const N=[[R,L],[z,I],[F,$],[P,B],[H,j],[V,q],[U,K],[W,J]];for(let M=0;M<N.length;M++){const[t,e]=N[M],o=w(C,t);w(S,t,o);const i=jt(Ht);y(o,n,i);const s=jt();y(o,r,s),w(o,e,C),y(i,n,i),y(i,r,s),y(s,n,i),y(s,r,s),w(i,e,C),w(s,e,C)}return w(i,M,b),w(i,_,Bt),{start:i,tokens:xt}}(Kt.scanner.tokens);for(let t=0;t<Kt.pluginQueue.length;t++)Kt.pluginQueue[t][1]({scanner:Kt.scanner,parser:Kt.parser});return Kt.initialized=!0,Kt}function Gt(t){return Kt.initialized||Jt(),function(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let l=t,a=null,c=null,d=0,h=null,u=-1;for(;o<r&&!(a=l.go(n[o].t));)s.push(n[o++]);for(;o<r&&(c=a||l.go(n[o].t));)a=null,l=c,l.accepts()?(u=0,h=l):u>=0&&u++,o++,d++;if(u<0)o-=d,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(Vt(Pt,e,s)),s=[]),o-=u,d-=u;const t=h.t,r=n.slice(o-d,o);i.push(Vt(t,e,r))}}return s.length>0&&i.push(Vt(Pt,e,s)),i}(Kt.parser.start,t,Ot(Kt.scanner.start,t))}function Zt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(e&&"object"===typeof e){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Lt(n),o=Gt(t),i=[];for(let s=0;s<o.length;s++){const t=o[s];!t.isLink||e&&t.t!==e||!r.check(t)||i.push(t.toFormattedObject(r))}return i}Gt.scan=Ot;var Yt=n(14973);const Xt="[\0- \xa0\u1680\u180e\u2000-\u2029\u205f\u3000]",Qt=new RegExp(Xt),te=new RegExp(`${Xt}$`),ee=new RegExp(Xt,"g");const ne=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|\u201c(.*?)\u201d|\u2018(.*?)\u2019))?\)$/,re=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|\u201c(.*?)\u201d|\u2018(.*?)\u2019))?\)/g;function oe(t,e){let n=0;for(let r=e-1;r>=0&&"\\"===t[r];r-=1)n+=1;return n%2===1}function ie(t,e,n){var r,o;const[,i,s]=e;return"!"!==(e.index?t[e.index-1]:void 0)&&!oe(t,null!==(r=e.index)&&void 0!==r?r:0)&&(!function(t,e){let n=0,r=0;for(;r<e;){if("`"!==t[r]){r+=1;continue}if(0===n&&oe(t,r)){r+=1;continue}let o=0;for(;r<e&&"`"===t[r];)o+=1,r+=1;0===n?n=o:o===n&&(n=0)}return n>0}(t,null!==(o=e.index)&&void 0!==o?o:0)&&(!!i.trim()&&n(s)))}function se(t){var e,n;const[r,o,i,,s,l,a]=t,c=null!==(e=null!==s&&void 0!==s?s:l)&&void 0!==e?e:a;return{index:null!==(n=t.index)&&void 0!==n?n:0,text:r,replaceWith:o,data:{href:i,title:c||null,markdown:!0}}}function le(t){var e,n,r;return{href:null===(e=t.data)||void 0===e?void 0:e.href,title:null!==(n=null===(r=t.data)||void 0===r?void 0:r.title)&&void 0!==n?n:null}}function ae(t){const e=(0,r.OX)({find:e=>{const n=ne.exec(e);return n&&ie(e,n,t.isAllowedHref)?se(n):null},type:t.type,getAttributes:le});return new r.fV({find:e.find,handler:t=>{const n=e.handler(t);return null!==n&&t.state.tr.steps.length&&t.state.tr.setMeta("preventAutolink",!0),n}})}function ce(t){const e=(0,r.Zc)({find:e=>{var n,r;const o=[];for(const s of e.matchAll(re))ie(e,s,t.isAllowedHref)&&o.push(se(s));const i=(null!==(n=null===(r=t.findPlainUrls)||void 0===r?void 0:r.call(t,e))&&void 0!==n?n:[]).filter(t=>!o.some(e=>{return r=t,(n=e).index<r.index+r.text.length&&r.index<n.index+n.text.length;var n,r}));return[...o,...i]},type:t.type,getAttributes:le});return new r._n({find:e.find,handler:t=>{var n;const r=e.handler(t);return null!==r&&t.state.tr.steps.length&&(null===(n=t.match.data)||void 0===n?void 0:n.markdown)&&t.state.tr.setMeta("preventAutolink",!0),r}})}function de(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(t=>{const e="string"===typeof t?t:t.scheme;e&&n.push(e)}),!t||t.replace(ee,"").match(new RegExp(`^(?:(?:${n.map(t=>t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}const he=r.CU.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `val
2idate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{"string"!==typeof t?Wt(t.scheme,t.optionalSlashes):Wt(t)})},onDestroy(){g.groups={},Kt.scanner=null,Kt.parser=null,Kt.tokenQueue=[],Kt.pluginQueue=[],Kt.customSchemes=[],Kt.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!de(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const r=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){var t,e,n;return{href:{default:null,parseHTML:t=>t.getAttribute("href")},target:{default:null!==(t=this.options.HTMLAttributes.target)&&void 0!==t?t:null},rel:{default:null!==(e=this.options.HTMLAttributes.rel)&&void 0!==e?e:null},class:{default:null!==(n=this.options.HTMLAttributes.class)&&void 0!==n?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!(!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!de(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&null}}]},renderHTML(t){let{HTMLAttributes:e}=t;return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!de(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,e),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,o,i;const s=null!==(n=null===(r=t.attrs)||void 0===r?void 0:r.href)&&void 0!==n?n:"",l=null!==(o=null===(i=t.attrs)||void 0===i?void 0:i.title)&&void 0!==o?o:"",a=e.renderChildren(t);return l?`[${a}](${s} "${l}")`:`[${a}](${s})`},addCommands(){return{setLink:t=>e=>{let{chain:n}=e;const{href:r}=t;return!!this.options.isAllowedUri(r,{defaultValidate:t=>!!de(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&n().setMark(this.name,t).setMeta("preventAutolink",!0).run()},toggleLink:t=>e=>{let{chain:n}=e;const{href:r}=t||{};return!(r&&!this.options.isAllowedUri(r,{defaultValidate:t=>!!de(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&n().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>t=>{let{chain:e}=t;return e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}},addInputRules(){return this.options.markdownLinks?[ae({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!de(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){const t=t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options;Zt(t).filter(t=>t.isLink&&this.options.isAllowedUri(t.value,{defaultValidate:t=>!!de(t,n),protocols:n,defaultProtocol:r})).forEach(t=>{this.options.shouldAutoLink(t.value)&&e.push({text:t.value,data:{href:t.href},index:t.start})})}return e};return this.options.markdownLinks?[ce({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!de(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:t})]:[(0,r.Zc)({find:t,type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(function(t){return new Yt.k_({key:new Yt.hs("autolink"),appendTransaction:(e,n,o)=>{const i=e.some(t=>t.docChanged)&&!n.doc.eq(o.doc),s=e.some(t=>t.getMeta("preventAutolink"));if(!i||s)return;const{tr:l}=o,a=(0,r.T7)(n.doc,[...e]);
2return(0,r.FF)(a).forEach(e=>{let{newRange:n}=e;const i=(0,r.Nx)(o.doc,n,t=>t.isTextblock);let s,a;if(i.length>1)s=i[0],a=o.doc.textBetween(s.pos,s.pos+s.node.nodeSize,void 0," ");else if(i.length){const t=o.doc.textBetween(n.from,n.to," "," ");if(!te.test(t))return;s=i[0],a=o.doc.textBetween(s.pos,n.to,void 0," ")}if(s&&a){const e=a.split(Qt).filter(Boolean);if(e.length<=0)return!1;const n=e[e.length-1],i=s.pos+a.lastIndexOf(n);if(!n)return!1;const d=Gt(n).map(e=>e.toObject(t.defaultProtocol));if(!(1===(c=d).length?c[0].isLink:3===c.length&&c[1].isLink&&["()","[]"].includes(c[0].value+c[2].value)))return!1;d.filter(t=>t.isLink).map(t=>({...t,from:i+t.start+1,to:i+t.end+1})).filter(t=>!o.schema.marks.code||!o.doc.rangeHasMark(t.from,t.to,o.schema.marks.code)).filter(e=>t.validate(e.value)).filter(e=>t.shouldAutoLink(e.value)).forEach(e=>{(0,r.hO)(e.from,e.to,o.doc).some(e=>e.mark.type===t.type)||l.addMark(e.from,e.to,t.type.create({href:e.href}))})}var c}),l.steps.length?l:void 0}})}({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:t=>this.options.isAllowedUri(t,{defaultValidate:t=>!!de(t,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(function(t){return new Yt.k_({key:new Yt.hs("handleClickLink"),props:{handleClick:(e,n,o)=>{if(0!==o.button)return!1;if(!e.editable)return!1;let i=null;if(o.target instanceof HTMLAnchorElement)i=o.target;else{const e=o.target;if(!e)return!1;const n=t.editor.view.dom;i=e.closest("a"),i&&!n.contains(i)&&(i=null)}if(!i)return!1;let s=!1;if(t.enableClickSelection&&(s=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){var l,a;const n=(0,r.gu)(e.state,t.type.name),o=null!==(l=i.href)&&void 0!==l?l:n.href,c=null!==(a=i.target)&&void 0!==a?a:n.target;o&&(window.open(o,c),s=!0)}return s}}})}({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(function(t){return new Yt.k_({key:new Yt.hs("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:o}=t,{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let a="";r.content.forEach(t=>{a+=t.textContent});const c=Zt(a,{defaultProtocol:t.defaultProtocol}).find(t=>t.isLink&&t.value===a);return!(!a||!c||void 0!==o&&!o(c.value))&&t.editor.commands.setMark(t.type,{href:c.href})}}})}({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}});var ue=he},51637(t,e,n){"use strict";n.d(e,{A:()=>r});var r=n(7682).Or},48769(t,e,n){"use strict";n.d(e,{n:()=>r.nA});var r=n(69626)},39170(t,e,n){"use strict";n.d(e,{A:()=>r.A0});var r=n(69626)},43017(t,e,n){"use strict";n.d(e,{H:()=>r.Hj});var r=n(69626)},69626(t,e,n){"use strict";var r=n(36923),o=n(14973),i=n(64206);function s(t){return"left"===t||"right"===t||"center"===t?t:null}function l(){return{default:null,parseHTML:t=>function(t){const e=(t.style.textAlign||"").trim().toLowerCase(),n=(t.getAttribute("align")||"").trim().toLowerCase();return s(e||n)}(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}function a(t){const e=t.getAttribute("colwidth");return e?e.split(",").map(t=>parseInt(t,10)):function(t){var e;const n=t.parentElement,r=t.closest("table");if(!n||!r)return null;const o=Array.from(n.children).indexOf(t),i=null===(e=r.querySelectorAll("colgroup > col")[o])||void 0===e?void 0:e.getAttribute("width");return i?[parseInt(i,10)]:null}(t)}const c=/[ \t\r\n\f]+/g;function d(t){var e;return!(t.children.length>0)&&""===(null!==(e=t.textContent)&&void 0!==e?e:"").replace(c,"")}function h(t){const e=t.createAndFill();if(!e)throw new Error(`[tiptap error]: "${t.name}" has no default content to backfill.`);return e.content}const u=r.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:a},align:l()}),tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:t=>!!d(t)&&{},getContent:(t,e)=>h(e.nodes[this.name])},{tag:"td"}]},renderHTML(t){let{HTMLAttributes:e}=t;return["td",(0,r.KV)(this.options.HTMLAttributes,e),0]}}),p=r.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:a},align:l()}),tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:t=>!!d(t)&&{},getContent:(t,e)=>h(e.nodes[this.name])},{tag:"th"}]},renderHTML(t){let{HTMLAttributes:e}=t;return["th",(0,r.KV)(this.options.HTMLAttributes,e),0]}}),f=r.bP.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML(t){let{HTMLAttributes:e}=t;return["tr",(0,r.KV)(this.options.HTMLAttributes,e),0]}});function m(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function g(t,e,n,r,o,i){let s=0,l=!0,a=e.firstChild;const c=t.firstChild;if(null!==c)for(let u=0,p=0;u<c.childCount;u+=1){const{colspan:t,colwidth:n}=c.child(u).attrs;for(let c=0;c<t;c+=1,p+=1){const t=o===p?i:n&&n[c],d=t?`${t}px`:"";if(s+=t||r,t||(l=!1),a){if(a.style.width!==d){const[e,n]=m(r,t);a.style.setProperty(e,n)}a=a.nextSibling}else{const n=document.createElement("col"),[o,i]=m(r,t);n.style.setProperty(o,i),e.appendChild(n)}}}for(;a;){var d;const t=a.nextSibling;null===(d=a.parentNode)||void 0===d||d.removeChild(a),a=t}const h=t.attrs.style&&"string"===typeof t.attrs.style&&/\bwidth\s*:/i.test(t.attrs.style);l&&!h?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var y=class{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[o,i]of Object.entries(r))void 0!==i&&null!==i&&("style"===o?this.table.style.cssText=String(i):this.table.setAttribute(o,String(i)));t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),g(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,g(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!(!n||r||"attributes"!==t.type&&"childList"!==t.type&&"characterData"!==t.type)}};function v(t,e){return e?t.createChecked(null,e):t.createAndFill()}function b(t,e,n,r,o){const i=function(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};
2return 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=[],l=[];for(let c=0;c<n;c+=1){const t=v(i.cell,o);if(t&&l.push(t),r){const t=v(i.header_cell,o);t&&s.push(t)}}const a=[];for(let c=0;c<e;c+=1)a.push(i.row.createChecked(null,r&&0===c?s:l));return i.table.createChecked(null,a)}const w=t=>{let{editor:e}=t;const{selection:n}=e.state;if(!(n instanceof i.rn))return!1;let o=0;const s=(0,r.eL)(n.ranges[0].$from,t=>"table"===t.type.name);return null===s||void 0===s||s.node.descendants(t=>{if("table"===t.type.name)return!1;["tableCell","tableHeader"].includes(t.type.name)&&(o+=1)}),o===n.ranges.length&&(e.commands.deleteTable(),!0)};function k(t,e){const n=t.mapping.map(e),i=(0,r.eL)(t.selection.$from,t=>"table"===t.type.name);if((null===i||void 0===i?void 0:i.pos)===n)return;const s=t.doc.nodeAt(n);if(!s)return;const l=n+s.nodeSize-1;t.setSelection(o.U3.near(t.doc.resolve(l),-1))}function x(t,e){var n;const r=null!==(n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cellLineSeparator)&&void 0!==n?n:"\x1f";if(!t||!t.content||0===t.content.length)return"";const o=[];t.content.forEach(t=>{const n=[];t.content&&t.content.forEach(t=>{let o="";o=t.content&&Array.isArray(t.content)&&t.content.length>1?t.content.map(t=>e.renderChildren(t)).join(r):t.content?e.renderChildren(t.content):"";const i=(o.split(r).join("\n").replace(/[ \t]*\r?\n[ \t]*/g,"<br>")||"").replace(/\s+/g," ").trim();const l="tableHeader"===t.type,a=s(null===(c=t.attrs)||void 0===c?void 0:c.align);var c;n.push({text:i,isHeader:l,align:a})}),o.push(n)});const i=o.reduce((t,e)=>Math.max(t,e.length),0);if(0===i)return"";const l=Array.from({length:i}).fill(0);o.forEach(t=>{for(let n=0;n<i;n+=1){var e;const r=((null===(e=t[n])||void 0===e?void 0:e.text)||"").length;r>l[n]&&(l[n]=r),l[n]<3&&(l[n]=3)}});const a=(t,e)=>t+" ".repeat(Math.max(0,e-t.length)),c=o[0],d=c.some(t=>t.isHeader),h=Array.from({length:i}).fill(null);o.forEach(t=>{for(let n=0;n<i;n+=1){var e;!h[n]&&(null===(e=t[n])||void 0===e?void 0:e.align)&&(h[n]=t[n].align)}});let u="\n";const p=Array.from({length:i}).map((t,e)=>d&&c[e]&&c[e].text||"");return u+=`| ${p.map((t,e)=>a(t,l[e])).join(" | ")} |\n`,u+=`| ${l.map((t,e)=>{const n=Math.max(3,t),r=h[e];return"left"===r?`:${"-".repeat(n)}`:"right"===r?`${"-".repeat(n)}:`:"center"===r?`:${"-".repeat(n)}:`:"-".repeat(n)}).join(" | ")} |\n`,(d?o.slice(1):o).forEach(t=>{u+=`| ${Array.from({length:i}).fill(0).map((e,n)=>a(t[n]&&t[n].text||"",l[n])).join(" | ")} |\n`}),u}const C=r.bP.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:y,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML(t){let{node:e,HTMLAttributes:n}=t;const{colgroup:o,tableWidth:i,tableMinWidth:s}=function(t,e,n,r){let o=0,i=!0;const s=[],l=t.firstChild;if(!l)return{};for(let d=0,h=0;d<l.childCount;d+=1){const{colspan:t,colwidth:a}=l.child(d).attrs;for(let l=0;l<t;l+=1,h+=1){const t=n===h?r:a&&a[l];o+=t||e,t||(i=!1);const[c,d]=m(e,t);s.push(["col",{style:`${c}: ${d}`}])}}const a=i?`${o}px`:"",c=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:a,tableMinWidth:c}}(e,this.options.cellMinWidth),l=n.style;const a=["table",(0,r.KV)(this.options.HTMLAttributes,n,{style:l||(i?`width: ${i}`:`min-width: ${s}`)}),o,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(t,e)=>{const n=[],r=Array.isArray(t.align)?t.align:[];if(t.header){const o=[];t.header.forEach((t,n)=>{var i;const l=s(null!==(i=r[n])&&void 0!==i?i:t.align),a=l?{align:l}:{};o.push(e.createNode("tableHeader",a,[{type:"paragraph",content:e.parseInline(t.tokens)}]))}),n.push(e.createNode("tableRow",{},o))}return t.rows&&t.rows.forEach(t=>{const o=[];t.forEach((t,n)=>{var i;const l=s(null!==(i=r[n])&&void 0!==i?i:t.align),a=l?{align:l}:{};o.push(e.createNode("tableCell",a,[{type:"paragraph",content:e.parseInline(t.tokens)}
2]))}),n.push(e.createNode("tableRow",{},o))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>x(t,e),markdownTokenizer:{name:"table",level:"block",start:t=>{const e=t.split("\n");if(e.length<2)return-1;const n=e[1];return/^[ \t|:]*-[ \t|:-]*$/.test(n)&&n.includes("|")&&e[0].includes("|")?0:-1},tokenize(t,e,n){const r=t.indexOf("\n\n"),o=r>=0?t.slice(0,r):t,i=o.split("\n");if(i.length<2)return;const s=i[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(s)||!s.includes("|"))return;const l=function(t){return t.split("\n").map(t=>t.includes("|")&&t.includes("`")?function(t){let e="",n=0;for(;n<t.length;){if("\\"===t[n]&&n+1<t.length){e+=t[n]+t[n+1],n+=2;continue}if("`"!==t[n]){e+=t[n++];continue}let r=0;for(;n+r<t.length&&"`"===t[n+r];)r+=1;let o=n+r,i=!1;for(;o<t.length;){if("`"!==t[o]){o+=1;continue}let s=0;for(;o+s<t.length&&"`"===t[o+s];)s+=1;if(s===r){const s=t.slice(n+r,o);e+=t.slice(n,n+r)+s.replace(/\\\||\|/g,t=>"|"===t?"\\|":t)+t.slice(o,o+r),n=o+r,i=!0;break}o+=s}i||(e+=t.slice(n,n+r),n+=r)}return e}(t):t).join("\n")}(o);if(l===o)return;const a=n.blockTokens(l)[0];if("table"!==(null===a||void 0===a?void 0:a.type)||!a.raw)return;const c=a.raw.split("\n").length,d=t.split("\n").slice(0,c).join("\n");return{...a,raw:d}}},addCommands:()=>({insertTable:function(){let{rows:t=3,cols:e=3,withHeaderRow:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r=>{let{tr:i,dispatch:s,editor:l}=r;const a=b(l.schema,t,e,n);if(s){const t=i.selection.from+1;i.replaceSelectionWith(a).scrollIntoView().setSelection(o.U3.near(i.doc.resolve(t)))}return!0}},addColumnBefore:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.RC)(e,n)},addColumnAfter:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.GU)(e,n)},deleteColumn:()=>t=>{let{state:e,dispatch:n}=t;const o=(0,r.eL)(e.selection.$from,t=>"table"===t.type.name);return(0,i.gR)(e,n&&(t=>{o&&k(t,o.pos),n(t)}))},addRowBefore:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.JD)(e,n)},addRowAfter:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.gC)(e,n)},deleteRow:()=>t=>{let{state:e,dispatch:n}=t;const o=(0,r.eL)(e.selection.$from,t=>"table"===t.type.name);return(0,i.aR)(e,n&&(t=>{o&&k(t,o.pos),n(t)}))},deleteTable:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.kG)(e,n)},mergeCells:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.w7)(e,n)},splitCell:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.L0)(e,n)},toggleHeaderColumn:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.iS)("column")(e,n)},toggleHeaderRow:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.iS)("row")(e,n)},toggleHeaderCell:()=>t=>{let{state:e,dispatch:n}=t;return(0,i._G)(e,n)},mergeOrSplit:()=>t=>{let{state:e,dispatch:n}=t;return!!(0,i.w7)(e,n)||(0,i.L0)(e,n)},setCellAttribute:(t,e)=>n=>{let{state:r,dispatch:o}=n;return(0,i.i4)(t,e)(r,o)},goToNextCell:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.D8)(1)(e,n)},goToPreviousCell:()=>t=>{let{state:e,dispatch:n}=t;return(0,i.D8)(-1)(e,n)},fixTables:()=>t=>{let{state:e,dispatch:n}=t;return n&&(0,i.rP)(e),!0},setCellSelection:t=>e=>{let{tr:n,dispatch:r}=e;if(r){const e=i.rn.create(n.doc,t.anchorCell,t.headCell);n.setSelection(e)}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:w,"Mod-Backspace":w,Delete:w,"Mod-Delete":w}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[(0,i.AL)({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],(0,i.LF)({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){const t=this.options.resizable&&this.editor.isEditable,e=this.options.View;return t||!e?null:t=>{let{node:n,view:o,HTMLAttributes:i}=t;const s=(0,r.KV)(this.options.HTMLAttributes,i);return new e(n,this.options.cellMinWidth,o,s)}},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:(0,r.gk)((0,r.iI)(t,"tableRole",e))}}});r.YY.create({name:"tableKit",addExtensions(){const t=[];return!1!==this.options.table&&t.push(C.configure(this.options.table)),!1!==this.options.tableCell&&t.push(u.configure(this.options.tableCell)),!1!==this.options.tableHeader&&t.push(p.configure(this.options.tableHeader)),!1!==this.options.tableRow&&t.push(f.configure(this.options.tableRow)),t}});n.d(e,["A0",0,p,"Hj",0,f,"XI",0,C,"nA",0,u])},7682(t,e,n){"use strict";n.d(e,{QO:()=>P,vR:()=>B,Or:()=>tt,JU:()=>rt,lb:()=>ot});var r=n(36923),o=n(14973),i=n(77814);function s(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new o.k_({view:e=>
vendor: 14,782 bytes, line 2
2new l(e,t)})}class l{constructor(t,e){var n;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,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.setCursor(null),this.handlers.forEach(t=>{let{name:e,handler:n}=t;return this.editorView.dom.removeEventListener(e,n)})}update(t,e){if(null!=this.cursorPos&&e.doc!=t.state.doc)if(this.lastDragEvent){let t=this.computeTarget(this.lastDragEvent);t==this.cursorPos?this.updateOverlay():this.setCursor(t)}else 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,r=this.editorView.dom,o=r.getBoundingClientRect(),i=o.width/r.offsetWidth,s=o.height/r.offsetHeight;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);let l=this.width/2*s;t={left:o.left,right:o.right,top:i-l,bottom:i+l}}}}if(!t){let e=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*i;t={left:e.left-n,right:e.left+n,top:e.top,bottom:e.bottom}}let l,a,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.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),!c||c==document.body&&"static"==getComputedStyle(c).position)l=-pageXOffset,a=-pageYOffset;else{let t=c.getBoundingClientRect(),e=t.width/c.offsetWidth,n=t.height/c.offsetHeight;l=t.left-c.scrollLeft*e,a=t.top-c.scrollTop*n}this.element.style.left=(t.left-l)/i+"px",this.element.style.top=(t.top-a)/s+"px",this.element.style.width=(t.right-t.left)/i+"px",this.element.style.height=(t.bottom-t.top)/s+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}computeTarget(t){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)return null;let s=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,i.Um)(this.editorView.state.doc,s,this.editorView.dragging.slice);null!=t&&(s=t)}return s}dragover(t){if(!this.editorView.editable)return;this.lastDragEvent=t;let e=this.computeTarget(t);null!=e&&(this.setCursor(e),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}var a=n(77415),c=n(44120),d=n(31994);class h extends o.LN{constructor(t){super(t,t)}map(t,e){let n=t.resolve(e.map(this.head));return h.valid(n)?new h(n):o.LN.near(n)}content(){return d.Ji.empty}eq(t){return t instanceof h&&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 h(t.resolve(e.pos))}getBookmark(){return new u(this.anchor)}static valid(t){let e=t.parent;if(e.inlineContent||!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||p(t.type))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||p(t.type))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){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t:for(;;){if(!n&&h.valid(t))return t;let r=t.pos,i=null;for(let n=t.depth;;n--){let o=t.node(n);if(e>0?t.indexAfter(n)<o.childCount:t.index(n)>0){i=o.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(h.valid(s))return s}for(;;){let s=e>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!o.nh.isSelectable(i)){t=t.doc.resolve(r+i.nodeSize*e),n=!1;continue t}break}i=s,r+=e;let l=t.doc.resolve(r);if(h.valid(l))return l}return null}}}h.prototype.visible=!1,h.findFrom=h.findGapCursorFrom,o.LN.jsonID("gapcursor",h);class u{constructor(t){this.pos=t}map(t){return new u(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return h.valid(e)?new h(e):o.LN.near(e)}}function p(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}const f=(0,c.K)({ArrowLeft:m("horiz",-1),ArrowRight:m("horiz",1),ArrowUp:m("vert",-1),ArrowDown:m("vert",1)});function m(t,e){const n="vert"==t?e>0?"down":"up":e>0?"right":"left";return function(t,r,i){let s=t.selection,l=e>0?s.$to:s.$from,a=s.empty;if(s instanceof o.U3){if(!i.endOfTextblock(n)||0==l.depth)return!1;a=!1,l=t.doc.resolve(e>0?l.after():l.before())}let c=h.findGapCursorFrom(l,e,a);return!!c&&(r&&r(t.tr.setSelection(new h(c))),!0)}}function g(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!h.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&o.nh.isSelectable(t.state.doc.nodeAt(i.inside)))&&(t.dispatch(t.state.tr.setSelection(new h(r))),!0)}function y(t,e){if("insertCompositionText"!=e.inputType||!(t.state.selection instanceof h))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 i=d.FK.empty;for(let o=r.length-1;o>=0;o--)i=d.FK.from(r[o].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new d.Ji(i,0,0));return s.setSelection(o.U3.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function v(t){if(!(t.selection instanceof h))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",a.zF.create(t.doc,[a.NZ.widget(t.selection.head,e,{key:"gapcursor"})])}var b=200,w=function(){};w.prototype.append=function(t){return t.length?(t=w.from(t),!this.length&&t||t.length<b&&this.leafAppend(t)||this.length<b&&t.leafPrepend(this)||this.appendInner(t)):this},w.prototype.prepend=function(t){return t.length?w.from(t).append(this):this},w.prototype.appendInner=function(t){return new x(this,t)},w.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?w.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},w.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},w.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)},w.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},w.from=function(t){return t instanceof w?t:t&&t.length?new k(t):w.empty};var k=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.forEachInvertedInner=function(t,e,n,r){for(var o=e-1;o>=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=b)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=b)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}(w);w.empty=new k([]);var x=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 t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var o=this.left.length;return!(e<o&&!1===this.left.forEachInner(t,e,Math.min(n,o),r))&&(!(n>o&&!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<o&&!1===this.left.forEachInvertedInner(t,Math.min(e,o),n,r))&&void 0)},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=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}(w);const C=w;class S{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,l=t.tr,a=[],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 M(t.map));let e,o=t.step.map(n.slice(r));o&&l.maybeStep(o).doc&&(e=l.mapping.maps[l.mapping.maps.length-1],a.push(new M(e,void 0,void 0,a.length+c.length))),r--,e&&n.appendMap(e,r)}else l.maybeStep(t.step);return t.selection?(i=n?t.selection.map(n.slice(r)):t.selection,s=new S(this.items.slice(0,o).append(c.reverse().concat(a)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:s,transform:l,selection:i}}addTransform(t,e,n,r){let o=[],i=this.eventCount,s=this.items,l=!r&&s.length?s.get(s.length-1):null;for(let c=0;c<t.steps.length;c++){let n,a=t.steps[c].invert(t.docs[c]),d=new M(t.mapping.maps[c],a,e);(n=l&&l.merge(d))&&(d=n,c?o.pop():s=s.slice(0,s.length-1)),o.push(d),e&&(i++,e=void 0),r||(l=d)}let a=i-n.depth;return a>A&&(s=function(t,e){let n;return t.forEach((t,r)=>{if(t.selection&&0==e--)return n=r,!1}),t.slice(n)}(s,a),i-=a),new S(s.append(o),i)}remapping(t,e){let n=new i.X9;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 S(this.items.append(t.map(t=>new M(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 l=e;this.items.forEach(e=>{let r=o.getMirror(--l);if(null==r)return;i=Math.min(i,r);let a=o.maps[r];if(e.step){let i=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(o.slice(l+1,r));c&&s++,n.push(new M(a,i,c))}else n.push(new M(a))},r);let a=[];for(let h=e;h<i;h++)a.push(new M(o.maps[h]));let c=this.items.slice(0,r).append(a).append(n),d=new S(c,s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.items.length,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 l=i.selection&&i.selection.map(e.slice(n));l&&o++;let a,c=new M(s.invert(),t,l),d=r.length-1;(a=r.length&&r[d].merge(c))?r[d]=a:r.push(c)}}else i.map&&n--},this.items.length,0),new S(C.from(r.reverse()),o)}}S.empty=new S(C.empty,0);class M{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 M(e.getMap().invert(),e,this.selection)}}}class E{constructor(t,e,n,r,o){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const A=20;function D(t){let e=[];for(let n=t.length-1;n>=0&&0==e.length;n--)t[n].forEach((t,n,r,o)=>e.push(r,o));return e}function T(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}let O=!1,N=null;function _(t){let e=t.plugins;if(N!=e){O=!1,N=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){O=!0;break}}return O}const R=new o.hs("history"),L=new o.hs("closeHistory");function z(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new o.k_({key:R,state:{init:()=>new E(S.empty,S.empty,null,0,-1),apply:(e,n,r)=>function(t,e,n,r){let o,i=n.getMeta(R);if(i)return i.historyState;n.getMeta(L)&&(t=new E(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(R))return s.getMeta(R).redo?new E(t.done.addTransform(n,void 0,r,_(e)),t.undone,D(n.mapping.maps),t.prevTime,t.prevComposition):new E(t.done,t.undone.addTransform(n,void 0,r,_(e)),null,t.prevTime,t.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new E(t.done.rebased(n,o),t.undone.rebased(n,o),T(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new E(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),T(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;
2return t.mapping.maps[0].forEach((t,r)=>{for(let o=0;o<e.length;o+=2)t<=e[o+1]&&r>=e[o]&&(n=!0)}),n}(n,t.prevRanges)),l=s?T(t.prevRanges,n.mapping):D(n.mapping.maps);return new E(t.done.addTransform(n,i?e.selection.getBookmark():void 0,r,_(e)),S.empty,l,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?F:"historyRedo"==n?$:null;return!(!r||!t.editable)&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}function I(t,e){return(n,r)=>{let o=R.getState(n);if(!o||0==(t?o.undone:o.done).eventCount)return!1;if(r){let i=function(t,e,n){let r=_(e),o=R.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),l=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),a=new E(n?l:i.remaining,n?i.remaining:l,null,0,-1);return i.transform.setSelection(s).setMeta(R,{redo:n,historyState:a})}(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const F=I(!1,!0),$=I(!0,!0);I(!1,!1),I(!0,!1);r.YY.create({name:"characterCount",addOptions:()=>({limit:null,autoTrim:!0,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(t=>""!==t).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=t=>{const e=(null===t||void 0===t?void 0:t.node)||this.editor.state.doc;if("textSize"===((null===t||void 0===t?void 0:t.mode)||this.options.mode)){const t=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(t)}return e.nodeSize},this.storage.words=t=>{const e=(null===t||void 0===t?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new o.k_({key:new o.hs("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit,i=this.options.autoTrim;if(null===o||void 0===o||0===o||!1===i)return void(t=!0);const s=this.storage.characters({node:r.doc});if(s>o){const e=0,n=s-o;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const i=r.tr.deleteRange(e,n);return t=!0,i}t=!0},filterTransaction:(t,e)=>{const n=this.options.limit;if(!t.docChanged||0===n||null===n||void 0===n)return!0;const r=this.storage.characters({node:e.doc}),o=this.storage.characters({node:t.doc});if(o<=n)return!0;if(r>n&&o>n&&o<=r)return!0;if(r>n&&o>n&&o>r)return!1;if(!t.getMeta("paste"))return!1;const i=t.selection.$head.pos,s=i-(o-n),l=i;return t.deleteRange(s,l),!(this.storage.characters({node:t.doc})>n)}})]}});const P=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[s(this.options)]}}),B=(r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new o.k_({key:new o.hs("focus"),props:{decorations:t=>{let{doc:e,selection:n}=t;const{isEditable:r,isFocused:o}=this.editor,{anchor:i}=n,s=[];if(!r||!o)return a.zF.create(e,[]);let l=0;"deepest"===this.options.mode&&e.descendants((t,e)=>{if(!t.isText)return i>=e&&i<=e+t.nodeSize-1&&void(l+=1)});let c=0;return e.descendants((t,e)=>!t.isText&&(i>=e&&i<=e+t.nodeSize-1&&(c+=1,"deepest"===this.options.mode&&l-c>0||"shallowest"===this.options.mode&&c>1?"deepest"===this.options.mode:void s.push(a.NZ.node(e,e+t.nodeSize,{class:this.options.className}))))),a.zF.create(e,s)}}})]}}),r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[new o.k_({props:{decorations:v,createSelectionBetween:(t,e,n)=>e.pos==n.pos&&h.valid(n)?new h(n):null,handleClick:g,handleKeyDown:f,handleDOMEvents:{beforeinput
2:y}}})],extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:null!==(e=(0,r.gk)((0,r.iI)(t,"allowGapCursor",n)))&&void 0!==e?e:null}}})),H="placeholder",j=new o.hs("tiptap__placeholder");function V(t){const{editor:e,placeholder:n,dataAttribute:r,pos:o,node:i,isEmptyDoc:s,hasAnchor:l,classes:{emptyNode:c,emptyEditor:d}}=t,h=[c];return s&&h.push(d),a.NZ.node(o,o+i.nodeSize,{class:h.join(" "),[r]:"function"===typeof n?n({editor:e,node:i,pos:o,hasAnchor:l}):n})}function q(t,e){return"function"===typeof t?t(e):t}function U(t){let{editor:e,options:n,dataAttribute:o,doc:i,selection:s,from:l,to:a}=t;const{anchor:c}=s,d=[],h=e.isEmpty;return i.nodesBetween(l,a,(t,i)=>{const s=c>=i&&c<=i+t.nodeSize,l=!t.isLeaf&&(0,r.Op)(t);return t.type.isTextblock?(!s&&n.showOnlyCurrent||!l||d.push(V({editor:e,isEmptyDoc:h,dataAttribute:o,hasAnchor:s,placeholder:n.placeholder,classes:{emptyEditor:n.emptyEditorClass,emptyNode:q(n.emptyNodeClass,{editor:e,node:t,pos:i,hasAnchor:s})},node:t,pos:i})),n.includeChildren):n.includeChildren}),d}function K(t){let{editor:e,options:n,dataAttribute:o,doc:i,selection:s}=t;if(!e.isEditable&&n.showOnlyWhenEditable)return null;const{anchor:l}=s,c=[],d=e.isEmpty;if(n.showOnlyCurrent&&!n.includeChildren){const t=i.resolve(l),s=t.depth>0?t.node(1):t.nodeAfter,a=t.depth>0?t.before(1):l;if(s&&s.type.isTextblock&&(0,r.Op)(s)){const t=l>=a&&l<=a+s.nodeSize;c.push(V({editor:e,isEmptyDoc:d,dataAttribute:o,hasAnchor:t,placeholder:n.placeholder,classes:{emptyEditor:n.emptyEditorClass,emptyNode:q(n.emptyNodeClass,{editor:e,node:s,pos:a,hasAnchor:t})},node:s,pos:a}))}}else c.push(...U({editor:e,options:n,dataAttribute:o,doc:i,selection:s,from:0,to:i.content.size}));return a.zF.create(i,c)}function W(t,e){const n=t.resolve(e);if(0===n.depth){var r;const t=null!==(r=n.nodeAfter)&&void 0!==r?r:n.nodeBefore;if(!t)return{from:e,to:e};const o=n.nodeAfter?e:e-t.nodeSize;return{from:o,to:o+t.nodeSize}}const o=n.before(1);return{from:o,to:o+n.node(1).nodeSize}}function J(t,e){return{from:Math.max(0,e.from-1),to:Math.min(t.content.size,e.to-1)}}function G(t,e){const n=function(t,e,n){const r=[];return t.forEach((t,o)=>{const i=o,s=i+t.nodeSize;i+1<n&&s+1>e&&r.push({from:i,to:s})}),r}(t,e.from,e.to);return n.push(J(t,W(t,e.from))),e.to>e.from?n.push(J(t,W(t,Math.min(e.to,t.content.size+1)-1))):e.from<t.content.size+1&&n.push(J(t,W(t,Math.min(e.from+1,t.content.size)))),n}function Z(t,e,n){const o=[];if(t.docChanged){const e=(0,r.FF)(t);for(const t of e)o.push(...G(n.doc,t.newRange))}return t.selectionSet&&(o.push(J(n.doc,W(n.doc,t.mapping.map(e.selection.anchor)))),o.push(J(n.doc,W(n.doc,n.selection.anchor)))),function(t){if(0===t.length)return[];const e=[...t].sort((t,e)=>t.from-e.from),n=[{...e[0]}];for(let r=1;r<e.length;r+=1){const t=n[n.length-1],o=e[r];o.from<=t.to?t.to=Math.max(t.to,o.to):n.push({...o})}return n}(o)}function Y(t,e,n){const r=Math.max(0,Math.min(t,n.content.size));return{from:r,to:Math.max(r,Math.min(e,n.content.size))}}function X(t){let{editor:e,options:n,dataAttribute:r}=t;return{init(t,o){const i=K({editor:e,options:n,dataAttribute:r,doc:o.doc,selection:o.selection});return null!==i&&void 0!==i?i:a.zF.empty},apply:(t,o,i,s)=>t.docChanged||t.selectionSet?function(t){let{decorations:e,ranges:n,editor:r,options:o,dataAttribute:i,doc:s,selection:l}=t,a=e;for(const c of n){const{from:t,to:e}=Y(c.from,c.to,s),n=a.find(t,e).filter(n=>n.from>=t&&n.to<=e);n.length&&(a=a.remove(n));const d=U({editor:r,options:o,dataAttribute:i,doc:s,selection:l,from:t,to:e});d.length&&(a=a.add(s,d))}return a}({decorations:o.map(t.mapping,t.doc),ranges:Z(t,i,s),editor:e,options:n,dataAttribute:r,doc:s.doc,selection:s.selection}):o}}function Q(t){let{editor:e,options:n}=t;const r=n.dataAttribute?`data-${i=n.dataAttribute,i.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${H}`;var i;const s=n.showOnlyCurrent&&!n.includeChildren;return new o.k_({key:j,...s?{}:{state:X({editor:e,options:n,dataAttribute:r})},props:{decorations:s?t=>{let{doc:o,selection:i}=t;return K({editor:e,options:n,dataAttribute:r,doc:o,selection:i})}:t=>{var r;return n.showOnlyWhenEditable&&!e.isEditable?a.zF.empty:null!==(r=j.getState(t))&&void 0!==r?r:a.zF.empty}}})}const tt=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:H,placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[Q({editor:this.editor,options:this.options})]}});function et(t,e){return!t.selection.empty&&!(0,r.BQ)(t.selection)&&e.isEditable}r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new o.k_({key:new o.hs("selection"),props:{decorations:n=>function(t,e){return et(t,e)&&!e.isFocused&&!e.view.dragging}(n,t)?a.zF.create(n.doc,[a.NZ.inline(n.selection.from,n.selection.to,{class:e.className})]):null,handleDOMEvents:{blur:e=>!!et(e.state,t)&&(function(){var t;null===(t=window.getSelection())||void 0===t||t.removeAllRanges()}(),!1),focus:e=>!!et(e.state,t)&&(requestAnimationFrame(()=>{!t.isDestroyed&&e.hasFocus()&&function(t){t.focus()}(e)}),!1)}}})]}});function nt(t){let{types:e,node:n}=t;
2return n&&Array.isArray(e)&&e.includes(n.type)||(null===n||void 0===n?void 0:n.type)===e}const rt=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var t;const e=new o.hs(this.name),n=this.options.node||(null===(t=this.editor.schema.topNodeType.contentMatch.defaultType)||void 0===t?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(t=>{let[,e]=t;return e}).filter(t=>(this.options.notAfter||[]).concat(n).includes(t.name));return[new o.k_({key:e,appendTransaction:(t,r,o)=>{const{doc:i,tr:s,schema:l}=o,a=e.getState(o),c=i.content.size,d=l.nodes[n];if(!t.some(t=>t.getMeta("skipTrailingNode"))&&a)return s.insert(c,d.create())},state:{init:(t,e)=>!nt({node:e.tr.doc.lastChild,types:r}),apply:(t,e)=>{if(!t.docChanged)return e;if(t.getMeta("__uniqueIDTransaction"))return e;return!nt({node:t.doc.lastChild,types:r})}}})]}}),ot=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>t=>{let{state:e,dispatch:n}=t;return F(e,n)},redo:()=>t=>{let{state:e,dispatch:n}=t;return $(e,n)}}),addProseMirrorPlugins(){return[z(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}})},64206(t,e,n){"use strict";n.d(e,{rn:()=>C,GU:()=>_,RC:()=>N,gC:()=>F,JD:()=>I,AL:()=>ft,gR:()=>L,aR:()=>P,kG:()=>J,rP:()=>D,D8:()=>W,w7:()=>H,i4:()=>V,L0:()=>j,LF:()=>kt,iS:()=>U,_G:()=>K});var r=n(14973),o=n(31994),i=n(77415),s=n(44120),l=n(77814);let a,c;if("undefined"!=typeof WeakMap){let t=new WeakMap;a=e=>t.get(e),c=(e,n)=>(t.set(e,n),n)}else{const t=[],e=10;let n=0;a=e=>{for(let n=0;n<t.length;n+=2)if(t[n]==e)return t[n+1]},c=(r,o)=>(n==e&&(n=0),t[n++]=r,t[n++]=o)}var d=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,s=o+1;for(let t=1;i<this.width&&this.map[e+t]==n;t++)i++;for(let t=1;s<this.height&&this.map[e+this.width*t]==n;t++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(t);return"horiz"==e?(n<0?0==r:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?0==i:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:s,right:l,top:a,bottom:c}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,a),right:Math.max(r,l),bottom:Math.max(i,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s||e.push(s))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let n=e+t*this.width;const r=(t+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?i-1:this.map[n]}o=i}}static get(t){return a(t)||c(t,function(t){if("table"!=t.type.spec.tableRole)throw new RangeError("Not a table node: "+t.type.name);const e=function(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let e=0;e<r;e++){const n=t.child(e);for(let t=0;t<n.childCount;t++){const o=n.child(t);e+o.attrs.rowspan>r&&(i+=o.attrs.colspan)}}for(let t=0;t<o.childCount;t++){const e=o.child(t);i+=e.attrs.colspan,e.attrs.rowspan>1&&(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 c=0,d=e*n;c<d;c++)r[c]=0;for(let c=0,d=0;c<n;c++){const l=t.child(c);d++;for(let t=0;;t++){for(;o<r.length&&0!=r[o];)o++;if(t==l.childCount)break;const a=l.child(t),{colspan:h,rowspan:u,colwidth:p}=a.attrs;for(let t=0;t<u;t++){if(t+c>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:d,n:u-t});break}const l=o+t*e;for(let t=0;t<h;t++){0==r[l+t]?r[l+t]=d:(i||(i=[])).push({type:"collision",row:c,pos:d,n:h-t});const n=p&&p[t];if(n){const r=(l+t)%e*2,o=s[r];null==o||o!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):o==n&&s[r+1]++}}}o+=h,d+=a.nodeSize}const a=(c+1)*e;let h=0;for(;o<a;)0==r[o++]&&h++;h&&(i||(i=[])).push({type:"missing",row:c,n:h}),d++}0!==e&&0!==n||(i||(i=[])).push({type:"zero_sized"});const l=new d(e,n,r,i);let a=!1;for(let c=0;!a&&c<s.length;c+=2)null!=s[c]&&s[c+1]<n&&(a=!0);a&&function(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;
2r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let l=null;const a=s.attrs;for(let n=0;n<a.colspan;n++){const r=e[(o+n)%t.width*2];null==r||a.colwidth&&a.colwidth[n]==r||((l||(l=h(a)))[n]=r)}l&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:l})}}(l,s,t);return l}(t))}};function h(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function u(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}const p=new r.hs("selectingCells");function f(t){for(let e=t.depth-1;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return t.node(0).resolve(t.before(e+1));return null}function m(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if("row"==e.node(n).type.spec.tableRole)return!0;return!1}function g(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=f(e.$head)||y(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function y(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)}}function v(t){return"row"==t.parent.type.spec.tableRole&&!!t.nodeAfter}function b(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function w(t,e,n){const r=t.node(-1),o=d.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 k(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]: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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let t=0;t<n;t++)r.colwidth.splice(e,0,0)}return r}var C=class t extends r.LN{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;const n=t.node(-1),o=d.get(n),i=t.start(-1),s=o.rectBetween(t.pos-i,e.pos-i),l=t.node(0),a=o.cellsInRect(s).filter(t=>t!=e.pos-i);a.unshift(e.pos-i);const c=a.map(t=>{const e=n.nodeAt(t);if(!e)throw new RangeError(`No cell with offset ${t} found`);const o=i+t+1;return new r.yn(l.resolve(o),l.resolve(o+e.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=e}map(e,n){const o=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(v(o)&&v(i)&&b(o,i)){const e=this.$anchorCell.node(-1)!=o.node(-1);return e&&this.isRowSelection()?t.rowSelection(o,i):e&&this.isColSelection()?t.colSelection(o,i):new t(o,i)}return r.U3.between(o,i)}content(){const t=this.$anchorCell.node(-1),e=d.get(t),n=this.$anchorCell.start(-1),r=e.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},s=[];for(let a=r.top;a<r.bottom;a++){const n=[];for(let o=a*e.width+r.left,s=r.left;s<r.right;s++,o++){const s=e.map[o];if(i[s])continue;i[s]=!0;const l=e.findCell(s);let a=t.nodeAt(s);if(!a)throw new RangeError(`No cell with offset ${s} found`);const c=r.left-l.left,d=l.right-r.right;if(c>0||d>0){let t=a.attrs;if(c>0&&(t=k(t,0,c)),d>0&&(t=k(t,t.colspan-d,d)),l.left<r.left){if(a=a.type.createAndFill(t),!a)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(t)}`)}else a=a.type.create(t,a.content)}if(l.top<r.top||l.bottom>r.bottom){const t={...a.attrs,rowspan:Math.min(l.bottom,r.bottom)-Math.max(l.top,r.top)};a=l.top<r.top?a.type.createAndFill(t):a.type.create(t,a.content)}n.push(a)}s.push(t.child(a).copy(o.FK.from(n)))}const l=this.isColSelection()&&this.isRowSelection()?t:s;return new o.Ji(o.FK.from(l),1,1)}replace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Ji.empty;const n=t.steps.length,i=this.ranges;for(let r=0;r<i.length;r++){const{$from:s,$to:l}=i[r],a=t.mapping.slice(n);t.replace(a.map(s.pos),a.map(l.pos),r?o.Ji.empty:e)}const s=r.LN.findFrom(t.doc.resolve(t.mapping.slice(n).map(this.to)),-1);s&&t.setSelection(s)}replaceWith(t,e){this.replace(t,new o.Ji(o.FK.from(e),0,0))}forEachCell(t){const e=this.$anchorCell.node(-1),n=d.get(e),r=this.$anchorCell.start(-1),o=n.cells
2InRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let i=0;i<o.length;i++)t(e.nodeAt(o[i]),r+o[i])}isColSelection(){const t=this.$anchorCell.index(-1),e=this.$headCell.index(-1);if(Math.min(t,e)>0)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){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=e.node(-1),o=d.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),a=e.node(0);return s.top<=l.top?(s.top>0&&(e=a.resolve(i+o.map[s.left])),l.bottom<o.height&&(n=a.resolve(i+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(i+o.map[l.left])),s.bottom<o.height&&(e=a.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new t(e,n)}isRowSelection(){const t=this.$anchorCell.node(-1),e=d.get(t),n=this.$anchorCell.start(-1),r=e.colCount(this.$anchorCell.pos-n),o=e.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)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){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=e.node(-1),o=d.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),a=e.node(0);return s.left<=l.left?(s.left>0&&(e=a.resolve(i+o.map[s.top*o.width])),l.right<o.width&&(n=a.resolve(i+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(i+o.map[l.top*o.width])),s.right<o.width&&(e=a.resolve(i+o.map[o.width*(s.top+1)-1]))),new t(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new t(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;return new t(e.resolve(n),e.resolve(r))}getBookmark(){return new S(this.$anchorCell.pos,this.$headCell.pos)}};C.prototype.visible=!1,r.LN.jsonID("cell",C);var S=class t{constructor(t,e){this.anchor=t,this.head=e}map(e){return new t(e.map(this.anchor),e.map(this.head))}resolve(t){const e=t.resolve(this.anchor),n=t.resolve(this.head);return"row"==e.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&e.index()<e.parent.childCount&&n.index()<n.parent.childCount&&b(e,n)?new C(e,n):r.LN.near(n,1)}};function M(t){if(!(t.selection instanceof C))return null;const e=[];return t.selection.forEachCell((t,n)=>{e.push(i.NZ.node(n,n+t.nodeSize,{class:"selectedCell"}))}),i.zF.create(t.doc,e)}const E=new r.hs("fix-tables");function A(t,e,n,r){const o=t.childCount,i=e.childCount;t:for(let s=0,l=0;s<i;s++){const i=e.child(s);for(let e=l,r=Math.min(o,s+3);e<r;e++)if(t.child(e)==i){l=e+1,n+=i.nodeSize;continue t}r(i,n),l<o&&t.child(l).sameMarkup(i)?A(t.child(l),i,n+1,r):i.nodesBetween(0,i.content.size,r,n+1),n+=i.nodeSize}}function D(t,e){let n;const r=(e,r)=>{"table"==e.type.spec.tableRole&&(n=function(t,e,n,r){const o=d.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let a=0;a<o.height;a++)i.push(0);for(let a=0;a<o.problems.length;a++){const t=o.problems[a];if("collision"==t.type){const o=e.nodeAt(t.pos);if(!o)continue;const s=o.attrs;for(let e=0;e<s.rowspan;e++)i[t.row+e]+=t.n;
2r.setNodeMarkup(r.mapping.map(n+1+t.pos),null,k(s,s.colspan-t.n,t.n))}else if("missing"==t.type)i[t.row]+=t.n;else if("overlong_rowspan"==t.type){const o=e.nodeAt(t.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+t.pos),null,{...o.attrs,rowspan:o.attrs.rowspan-t.n})}else if("colwidth mismatch"==t.type){const o=e.nodeAt(t.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+t.pos),null,{...o.attrs,colwidth:t.colwidth})}else if("zero_sized"==t.type){const t=r.mapping.map(n);r.delete(t,t+e.nodeSize)}}let s,l;for(let a=0;a<i.length;a++)i[a]&&(null==s&&(s=a),l=a);for(let a=0,c=n+1;a<o.height;a++){const n=e.child(a),o=c+n.nodeSize,d=i[a];if(d>0){let e="cell";n.firstChild&&(e=n.firstChild.type.spec.tableRole);const i=[];for(let n=0;n<d;n++){const n=u(t.schema)[e].createAndFill();n&&i.push(n)}const h=0!=a&&s!=a-1||l!=a?o-1:c+1;r.insert(r.mapping.map(h),i)}c=o}return r.setMeta(E,{fixTables:!0})}(t,e,r,n))};return e?e.doc!=t.doc&&A(e.doc,t.doc,0,r):t.doc.descendants(r),n}function T(t){const e=t.selection,n=g(t),r=n.node(-1),o=n.start(-1),i=d.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 O(t,e,n){let{map:r,tableStart:o,table:i}=e,s=n>0?-1:0;(function(t,e,n){const r=u(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0})(r,i,n+s)&&(s=0==n||n==r.width?null:0);for(let l=0;l<r.height;l++){const e=l*r.width+n;if(n>0&&n<r.width&&r.map[e-1]==r.map[e]){const s=r.map[e],a=i.nodeAt(s);t.setNodeMarkup(t.mapping.map(o+s),null,x(a.attrs,n-r.colCount(s))),l+=a.attrs.rowspan-1}else{const a=null==s?u(i.type.schema).cell:i.nodeAt(r.map[e+s]).type,c=r.positionAt(l,n,i);t.insert(t.mapping.map(o+c),a.createAndFill())}}return t}function N(t,e){if(!m(t))return!1;if(e){const n=T(t);e(O(t.tr,n,n.left))}return!0}function _(t,e){if(!m(t))return!1;if(e){const n=T(t);e(O(t.tr,n,n.right))}return!0}function R(t,e,n){let{map:r,table:o,tableStart:i}=e;const s=t.mapping.maps.length;for(let l=0;l<r.height;){const e=l*r.width+n,a=r.map[e],c=o.nodeAt(a),d=c.attrs;if(n>0&&r.map[e-1]==a||n<r.width-1&&r.map[e+1]==a)t.setNodeMarkup(t.mapping.slice(s).map(i+a),null,k(d,n-r.colCount(a)));else{const e=t.mapping.slice(s).map(i+a);t.delete(e,e+c.nodeSize)}l+=d.rowspan}}function L(t,e){if(!m(t))return!1;if(e){const n=T(t),r=t.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let t=n.right-1;R(r,n,t),t!=n.left;t--){const t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw new RangeError("No table found");n.table=t,n.map=d.get(t)}e(r)}return!0}function z(t,e,n){let{map:r,tableStart:o,table:i}=e,s=o;for(let d=0;d<n;d++)s+=i.child(d).nodeSize;const l=[];let a=n>0?-1:0;(function(t,e,n){var r;const o=u(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if((null===(r=e.nodeAt(t.map[i+n*t.width]))||void 0===r?void 0:r.type)!=o)return!1;return!0})(r,i,n+a)&&(a=0==n||n==r.height?null:0);for(let d=0,h=r.width*n;d<r.width;d++,h++)if(n>0&&n<r.height&&r.map[h]==r.map[h-r.width]){const e=r.map[h],n=i.nodeAt(e).attrs;t.setNodeMarkup(o+e,null,{...n,rowspan:n.rowspan+1}),d+=n.colspan-1}else{var c;const t=null==a?u(i.type.schema).cell:null===(c=i.nodeAt(r.map[h+a*r.width]))||void 0===c?void 0:c.type,e=null===t||void 0===t?void 0:t.createAndFill();e&&l.push(e)}return t.insert(s,u(i.type.schema).row.create(null,l)),t}function I(t,e){if(!m(t))return!1;if(e){const n=T(t);e(z(t.tr,n,n.top))}return!0}function F(t,e){if(!m(t))return!1;if(e){const n=T(t);e(z(t.tr,n,n.bottom))}return!0}function $(t,e,n){let{map:r,table:o,tableStart:i}=e,s=0;for(let d=0;d<n;d++)s+=o.child(d).nodeSize;const l=s+o.child(n).nodeSize,a=t.mapping.maps.length;t.delete(s+i,l+i);const c=new Set;for(let d=0,h=n*r.width;d<r.width;d++,h++){const e=r.map[h];if(!c.has(e))if(c.add(e),n>0&&e==r.map[h-r.width]){const n=o.nodeAt(e).attrs;t.setNodeMarkup(t.mapping.slice(a).map(e+i),null,{...n,rowspan:n.rowspan-1}),d+=n.colspan-1}else if(n<r.height&&e==r.map[h+r.width]){const s=o.nodeAt(e),l=s.attrs,c=s.type.create({...l,rowspan:s.attrs.rowspan-1},s.content),h=r.positionAt(n+1,d,o);t.insert(t.mapping.slice(a).map(i+h),c),d+=l.colspan-1}}}function P(t,e){if(!m(t))return!1;if(e){const n=T(t),r=t.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let t=n.bottom-1;$(r,n,t),t!=n.top;t--){const t=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!t)throw new RangeError("No table found");n.table=t,n.map=d.get(n.table)}e(r)}return!0}function B(t){const e=t.content;return 1==e.childCount&&e.child(0).isTextblock&&0==e.child(0).childCount}function H(t,e){const n=t.selection;if(!(n instanceof C)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=T(t),{map:i}=r;if(function(t,e){let{width:n,height:r,map:o}=t,i=e.top*n+e.left,s=i,l=(e.bottom-1)*n+e.left,a=i+(e.right-e.left-1);for(let c=e.top;c<e.bottom;c++){if(e.left>0&&o[s]==o[s-1]||e.right<n&&o[a]==o[a+1])return!0;s+=n,a+=n}for(let c=e.left;c<e.right;c++){if(e.top>0&&o[i]==o[i-n]||e.bottom<r&&o[l]==o[l+n])return!0;
2i++,l++}return!1}(i,r))return!1;if(e){const n=t.tr,s={};let l,a,c=o.FK.empty;for(let t=r.top;t<r.bottom;t++)for(let e=r.left;e<r.right;e++){const o=i.map[t*i.width+e],d=r.table.nodeAt(o);if(!s[o]&&d)if(s[o]=!0,null==l)l=o,a=d;else{B(d)||(c=c.append(d.content));const t=n.mapping.map(o+r.tableStart);n.delete(t,t+d.nodeSize)}}if(null==l||null==a)return!0;if(n.setNodeMarkup(l+r.tableStart,null,{...x(a.attrs,a.attrs.colspan,r.right-r.left-a.attrs.colspan),rowspan:r.bottom-r.top}),c.size>0){const t=l+1+a.content.size,e=B(a)?l+1:t;n.replaceWith(e+r.tableStart,t+r.tableStart,c)}n.setSelection(new C(n.doc.resolve(l+r.tableStart))),e(n)}return!0}function j(t,e){const n=u(t.schema);return(r=t=>{let{node:e}=t;return n[e.type.spec.tableRole]},(t,e)=>{const n=t.selection;let o,i;if(n instanceof C){if(n.$anchorCell.pos!=n.$headCell.pos)return!1;o=n.$anchorCell.nodeAfter,i=n.$anchorCell.pos}else{var s;if(o=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}(n.$from),!o)return!1;i=null===(s=f(n.$from))||void 0===s?void 0:s.pos}if(null==o||null==i)return!1;if(1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(e){let s=o.attrs;const l=[],a=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const c=T(t),d=t.tr;for(let t=0;t<c.right-c.left;t++)l.push(a?{...s,colwidth:a&&a[t]?[a[t]]:null}:s);let h;for(let t=c.top;t<c.bottom;t++){let e=c.map.positionAt(t,c.left,c.table);t==c.top&&(e+=o.nodeSize);for(let n=c.left,i=0;n<c.right;n++,i++)n==c.left&&t==c.top||d.insert(h=d.mapping.map(e+c.tableStart,1),r({node:o,row:t,col:n}).createAndFill(l[i]))}d.setNodeMarkup(i,r({node:o,row:c.top,col:c.left}),l[0]),n instanceof C&&d.setSelection(new C(d.doc.resolve(n.$anchorCell.pos),h?d.doc.resolve(h):void 0)),e(d)}return!0})(t,e);var r}function V(t,e){return function(n,r){if(!m(n))return!1;const o=g(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}}function q(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:"row"==t?e.map.width:1,bottom:"column"==t?e.map.height:1});for(let o=0;o<r.length;o++){const t=e.table.nodeAt(r[o]);if(t&&t.type!==n.header_cell)return!1}return!0}function U(t,e){return(e=e||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(t){return function(e,n){if(!m(e))return!1;if(n){const r=u(e.schema),o=T(e),i=e.tr,s=o.map.cellsInRect("column"==t?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==t?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(t=>o.table.nodeAt(t));for(let t=0;t<s.length;t++)l[t].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[t],r.cell,l[t].attrs);if(0===i.steps.length)for(let t=0;t<s.length;t++)i.setNodeMarkup(o.tableStart+s[t],r.header_cell,l[t].attrs);n(i)}return!0}}(t):function(e,n){if(!m(e))return!1;if(n){const r=u(e.schema),o=T(e),i=e.tr,s=q("row",o,r),l=q("column",o,r),a=("column"===t?s:"row"===t&&l)?1:0,c="column"==t?{left:0,top:a,right:1,bottom:o.map.height}:"row"==t?{left:a,top:0,right:o.map.width,bottom:1}:o,d="column"==t?l?r.cell:r.header_cell:"row"==t?s?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach(t=>{const e=t+o.tableStart,n=i.doc.nodeAt(e);n&&i.setNodeMarkup(e,d,n.attrs)}),n(i)}return!0}}U("row",{useDeprecatedLogic:!0}),U("column",{useDeprecatedLogic:!0});const K=U("cell",{useDeprecatedLogic:!0});function W(t){return function(e,n){if(!m(e))return!1;const o=function(t,e){if(e<0){const e=t.nodeBefore;if(e)return t.pos-e.nodeSize;for(let n=t.index(-1)-1,r=t.before();n>=0;n--){const e=t.node(-1).child(n),o=e.lastChild;if(o)return r-1-o.nodeSize;r-=e.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const e=t.node(-1);for(let n=t.indexAfter(-1),r=t.after();n<e.childCount;n++){const t=e.child(n);if(t.childCount)return r+1;r+=t.nodeSize}}return null}(g(e),t);if(null==o)return!1;if(n){const t=e.doc.resolve(o);n(e.tr.setSelection(r.U3.between(t,(i=t,i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)))).scrollIntoView())}var i;return!0}}function J(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}function G(t,e){const n=t.selection;if(!(n instanceof C))return!1;if(e){const r=t.tr,i=u(t.schema).cell.createAndFill().content;
2n.forEachCell((t,e)=>{t.content.eq(i)||r.replace(r.mapping.map(e+1),r.mapping.map(e+t.nodeSize-1),new o.Ji(i,0,0))}),r.docChanged&&e(r)}return!0}function Z(t){if(0===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 i=e.child(0),s=i.type.spec.tableRole,l=i.type.schema,a=[];if("row"==s)for(let c=0;c<e.childCount;c++){let t=e.child(c).content;const i=c?0:Math.max(0,n-1),s=c<e.childCount-1?0:Math.max(0,r-1);(i||s)&&(t=Y(u(l).row,new o.Ji(t,i,s)).content),a.push(t)}else{if("cell"!=s&&"header_cell"!=s)return null;a.push(n||r?Y(u(l).row,new o.Ji(e,n,r)).content:e)}return function(t,e){const n=[];for(let o=0;o<e.length;o++){const t=e[o];for(let e=t.childCount-1;e>=0;e--){const{rowspan:r,colspan:i}=t.child(e).attrs;for(let t=o;t<o+r;t++)n[t]=(n[t]||0)+i}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(o.FK.empty),n[i]<r){const s=u(t).cell.createAndFill(),l=[];for(let t=n[i];t<r;t++)l.push(s);e[i]=e[i].append(o.FK.from(l))}return{height:e.length,width:r,rows:e}}(l,a)}function Y(t,e){const n=t.createAndFill();return new l.dL(n).replace(0,n.content.size,e).doc}function X(t,e,n,r,o,i,s,l){if(0==s||s==e.height)return!1;let a=!1;for(let c=o;c<i;c++){const o=s*e.width+c,i=e.map[o];if(e.map[o-e.width]==i){a=!0;const o=n.nodeAt(i),{top:d,left:h}=e.findCell(i);t.setNodeMarkup(t.mapping.slice(l).map(i+r),null,{...o.attrs,rowspan:s-d}),t.insert(t.mapping.slice(l).map(e.positionAt(s,h,n)),o.type.createAndFill({...o.attrs,rowspan:d+o.attrs.rowspan-s})),c+=o.attrs.colspan-1}}return a}function Q(t,e,n,r,o,i,s,l){if(0==s||s==e.width)return!1;let a=!1;for(let c=o;c<i;c++){const o=c*e.width+s,i=e.map[o];if(e.map[o-1]==i){a=!0;const o=n.nodeAt(i),d=e.colCount(i),h=t.mapping.slice(l).map(i+r);t.setNodeMarkup(h,null,k(o.attrs,s-d,o.attrs.colspan-(s-d))),t.insert(h+o.nodeSize,o.type.createAndFill(k(o.attrs,0,s-d))),c+=o.attrs.rowspan-1}}return a}function tt(t,e,n,r,i){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let l=d.get(s);const{top:a,left:c}=r,h=c+i.width,p=a+i.height,f=t.tr;let m=0;function g(){if(s=n?f.doc.nodeAt(n-1):f.doc,!s)throw new Error("No table found");l=d.get(s),m=f.mapping.maps.length}(function(t,e,n,r,i,s,l){const a=u(t.doc.type.schema);let c,d;if(i>e.width)for(let o=0,h=0;o<e.height;o++){const s=n.child(o);h+=s.nodeSize;const u=[];let p;p=null==s.lastChild||s.lastChild.type==a.cell?c||(c=a.cell.createAndFill()):d||(d=a.header_cell.createAndFill());for(let t=e.width;t<i;t++)u.push(p);t.insert(t.mapping.slice(l).map(h-1+r),u)}if(s>e.height){const h=[];for(let t=0,r=(e.height-1)*e.width;t<Math.max(e.width,i);t++){const o=!(t>=e.width)&&n.nodeAt(e.map[r+t]).type==a.header_cell;h.push(o?d||(d=a.header_cell.createAndFill()):c||(c=a.cell.createAndFill()))}const u=a.row.create(null,o.FK.from(h)),p=[];for(let t=e.height;t<s;t++)p.push(u);t.insert(t.mapping.slice(l).map(r+n.nodeSize-2),p)}return!(!c&&!d)})(f,l,s,n,h,p,m)&&g(),X(f,l,s,n,c,h,a,m)&&g(),X(f,l,s,n,c,h,p,m)&&g(),Q(f,l,s,n,a,p,c,m)&&g(),Q(f,l,s,n,a,p,h,m)&&g();for(let d=a;d<p;d++){const t=l.positionAt(d,c,s),e=l.positionAt(d,h,s);f.replace(f.mapping.slice(m).map(t+n),f.mapping.slice(m).map(e+n),new o.Ji(i.rows[d-a],0,0))}g(),f.setSelection(new C(f.doc.resolve(n+l.positionAt(a,c,s)),f.doc.resolve(n+l.positionAt(p-1,h-1,s)))),e(f)}const et=(0,s.K)({ArrowLeft:rt("horiz",-1),ArrowRight:rt("horiz",1),ArrowUp:rt("vert",-1),ArrowDown:rt("vert",1),"Shift-ArrowLeft":ot("horiz",-1),"Shift-ArrowRight":ot("horiz",1),"Shift-ArrowUp":ot("vert",-1),"Shift-ArrowDown":ot("vert",1),Backspace:G,"Mod-Backspace":G,Delete:G,"Mod-Delete":G});function nt(t,e,n){return!n.eq(t.selection)&&(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function rt(t,e){return(n,o,i)=>{if(!i)return!1;const s=n.selection;
2if(s instanceof C)return nt(n,o,r.LN.near(s.$headCell,e));if("horiz"!=t&&!s.empty)return!1;const l=at(i,t,e);if(null==l)return!1;if("horiz"==t)return nt(n,o,r.LN.near(n.doc.resolve(s.head+e),e));{const i=n.doc.resolve(l),s=w(i,t,e);let a;return a=s?r.LN.near(s,1):e<0?r.LN.near(n.doc.resolve(i.before(-1)),-1):r.LN.near(n.doc.resolve(i.after(-1)),1),nt(n,o,a)}}}function ot(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=at(o,t,e);if(null==r)return!1;s=new C(n.doc.resolve(r))}const l=w(s.$headCell,t,e);return!!l&&nt(n,r,new C(s.$anchorCell,l))}}function it(t,e){const n=f(t.state.doc.resolve(e));return!!n&&(t.dispatch(t.state.tr.setSelection(new C(n))),!0)}function st(t,e,n){if(!m(t.state))return!1;let r=Z(n);const i=t.state.selection;if(i instanceof C){r||(r={width:1,height:1,rows:[o.FK.from(Y(u(t.state.schema).cell,n))]});const e=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),l=d.get(e).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=function(t,e,n){let{width:r,height:i,rows:s}=t;if(r!=e){const t=[],n=[];for(let r=0;r<s.length;r++){const i=s[r],l=[];for(let n=t[r]||0,o=0;n<e;o++){let s=i.child(o%i.childCount);n+s.attrs.colspan>e&&(s=s.type.createChecked(k(s.attrs,s.attrs.colspan,n+s.attrs.colspan-e),s.content)),l.push(s),n+=s.attrs.colspan;for(let e=1;e<s.attrs.rowspan;e++)t[r+e]=(t[r+e]||0)+s.attrs.colspan}n.push(o.FK.from(l))}s=n,r=e}if(i!=n){const t=[];for(let e=0,r=0;e<n;e++,r++){const l=[],a=s[r%i];for(let t=0;t<a.childCount;t++){let r=a.child(t);e+r.attrs.rowspan>n&&(r=r.type.create({...r.attrs,rowspan:Math.max(1,n-r.attrs.rowspan)},r.content)),l.push(r)}t.push(o.FK.from(l))}s=t,i=n}return{width:r,height:i,rows:s}}(r,l.right-l.left,l.bottom-l.top),tt(t.state,t.dispatch,s,l,r),!0}if(r){const e=g(t.state),n=e.start(-1);return tt(t.state,t.dispatch,n,d.get(e.node(-1)).findCell(e.pos-n),r),!0}return!1}function lt(t,e){var n;if(0!=e.button)return;if(e.ctrlKey||e.metaKey)return;const r=ct(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=f(t.state.selection.$anchor))&&(null===(n=dt(t,e))||void 0===n?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(e,n){let r=dt(t,n);const o=null==p.getState(t.state);if(!r||!b(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(p,e.pos),t.dispatch(n)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",l),null!=p.getState(t.state)&&t.dispatch(t.state.tr.setMeta(p,-1))}function l(n){const o=n,l=p.getState(t.state);let a;if(null!=l)a=t.state.doc.resolve(l);else if(ct(t,o.target)!=r&&(a=dt(t,e),!a))return s();a&&i(a,o)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",l)}function at(t,e,n){if(!(t.state.selection instanceof r.U3))return null;const{$head:o}=t.state.selection;for(let r=o.depth-1;r>=0;r--){const i=o.node(r);if((n<0?o.index(r):o.indexAfter(r))!=(n<0?0:i.childCount))return null;if("cell"==i.type.spec.tableRole||"header_cell"==i.type.spec.tableRole){const i=o.before(r),s="vert"==e?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(s)?i:null}}return null}function ct(t,e){for(;e&&e!=t.dom;e=e.parentNode)if("TD"==e.nodeName||"TH"==e.nodeName)return e;return null}function dt(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:r,pos:o}=n;return r>=0&&f(t.state.doc.resolve(r))||f(t.state.doc.resolve(o))}var ht=class{constructor(t,e){this.node=t,this.defaultCellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${e}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ut(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,ut(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return"attributes"==t.type&&(t.target==this.table||this.colgroup.contains(t.target))}};function ut(t,e,n,r,o,i){let s=0,l=!0,a=e.firstChild;const c=t.firstChild;if(c){for(let t=0,n=0;t<c.childCount;t++){const{colspan:d,colwidth:h}=c.child(t).attrs;for(let t=0;t<d;t++,n++){const c=o==n?i:h&&h[t],d=c?c+"px":"";if(s+=c||r,c||(l=!1),a)a.style.width!=d&&(a.style.width=d),a=a.nextSibling;else{const t=document.createElement("col");t.style.width=d,e.appendChild(t)}}}for(;a;){var d;const t=a.nextSibling;null===(d=a.parentNode)||void 0===d||d.removeChild(a),a=t}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const pt=new r.hs("tableColumnResizing");function ft(){let{handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:o=ht,lastColumnResizable:s=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=new r.k_({key:pt,state:{init(t,e){var r;const i=null===(r=l.spec)||void 0===r||null===(r=r.props)||void 0===r?void 0:r.no
2deViews,s=u(e.schema).table.name;return o&&i&&(i[s]=(t,e)=>new o(t,n,e)),new mt(-1,!1)},apply:(t,e)=>e.apply(t)},props:{attributes:t=>{const e=pt.getState(t);return e&&e.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(e,n)=>{!function(t,e,n,r){if(!t.editable)return;const o=pt.getState(t.state);if(!o)return;if(!o.dragging){const i=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(i){const{left:r,right:o}=i.getBoundingClientRect();e.clientX-r<=n?s=gt(t,e,"left",n):o-e.clientX<=n&&(s=gt(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&-1!==s){const e=t.state.doc.resolve(s),n=e.node(-1),r=d.get(n),o=e.start(-1);if(r.colCount(e.pos-o)+e.nodeAfter.attrs.colspan-1==r.width-1)return}vt(t,s)}}}(e,n,t,s)},mouseleave:t=>{!function(t){if(!t.editable)return;const e=pt.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&vt(t,-1)}(t)},mousedown:(t,r)=>{!function(t,e,n,r){var o;if(!t.editable)return!1;const i=null!==(o=t.dom.ownerDocument.defaultView)&&void 0!==o?o:window,s=pt.getState(t.state);if(!s||-1==s.activeHandle||s.dragging)return!1;const l=t.state.doc.nodeAt(s.activeHandle),a=function(t,e,n){let{colspan:r,colwidth:o}=n;const i=o&&o[o.length-1];if(i)return i;const s=t.domAtPos(e);let l=s.node.childNodes[s.offset].offsetWidth,a=r;if(o)for(let c=0;c<r;c++)o[c]&&(l-=o[c],a--);return l/a}(t,s.activeHandle,l.attrs);function c(e){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",h);const r=pt.getState(t.state);(null===r||void 0===r?void 0:r.dragging)&&(!function(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=d.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,a=t.state.tr;for(let c=0;c<i.height;c++){const t=c*i.width+l;if(c&&i.map[t]==i.map[t-i.width])continue;const e=i.map[t],r=o.nodeAt(e).attrs,d=1==r.colspan?0:l-i.colCount(e);if(r.colwidth&&r.colwidth[d]==n)continue;const h=r.colwidth?r.colwidth.slice():wt(r.colspan);h[d]=n,a.setNodeMarkup(s+e,null,{...r,colwidth:h})}a.docChanged&&t.dispatch(a)}(t,r.activeHandle,yt(r.dragging,e,n)),t.dispatch(t.state.tr.setMeta(pt,{setDragging:null})))}function h(e){if(!e.which)return c(e);const o=pt.getState(t.state);if(o&&o.dragging){const i=yt(o.dragging,e,n);bt(t,o.activeHandle,i,r)}}t.dispatch(t.state.tr.setMeta(pt,{setDragging:{startX:e.clientX,startWidth:a}})),bt(t,s.activeHandle,a,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",h),e.preventDefault()}(t,r,e,n)}},decorations:t=>{const e=pt.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 i.zF.empty;const s=d.get(o),l=r.start(-1),a=s.colCount(r.pos-l)+r.nodeAfter.attrs.colspan-1;for(let d=0;d<s.height;d++){const e=a+d*s.width;if((a==s.width-1||s.map[e]!=s.map[e+1])&&(0==d||s.map[e]!=s.map[e-s.width])){var c;const r=s.map[e],a=l+r+o.nodeAt(r).nodeSize-1,d=document.createElement("div");d.className="column-resize-handle",(null===(c=pt.getState(t))||void 0===c?void 0:c.dragging)&&n.push(i.NZ.node(l+r,l+r+o.nodeAt(r).nodeSize,{class:"column-resize-dragging"})),n.push(i.NZ.widget(a,d))}}return i.zF.create(t.doc,n)}(t,e.activeHandle)},nodeViews:{}}});return l}var mt=class t{constructor(t,e){this.activeHandle=t,this.dragging=e}apply(e){const n=this,r=e.getMeta(pt);if(r&&null!=r.setHandle)return new t(r.setHandle,!1);if(r&&void 0!==r.setDragging)return new t(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let r=e.mapping.map(n.activeHandle,-1);return v(e.doc.resolve(r))||(r=-1),new t(r,n.dragging)}return n}};function gt(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,l=f(t.state.doc.resolve(s));if(!l)return-1;if("right"==n)return l.pos;const a=d.get(l.node(-1)),c=l.start(-1),h=a.map.indexOf(l.pos-c);return h%a.width==0?-1:c+a.map[h-1]}function yt(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function vt(t,e){t.dispatch(t.state.tr.setMeta(pt,{setHandle:e}))}function bt(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),l=d.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let a=t.domAtPos(o.start(-1)).node;for(;a&&"TABLE"!=a.nodeName;)a=a.parentNode;a&&ut(i,a.firstChild,a,r,l,n)}function wt(t){return Array(t).fill(0)}function kt(){let{allowTableNodeSelection:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new r.k_({key:p,state:{init:()=>null,apply(t,e){const n=t.getMeta(p);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:lt},createSelectionBetween:t=>null!=p.getState(t.state)?t.state.selection:null,handleTripleClick:it,handleKeyDown:et,handlePaste:st},appendTransaction:(e,n,o)=>function(t,e,n){const o=(e||t).selection,i=(e||t).doc;let s,l;if(o instanceof r.nh&&(l=o.node.type.spec.tableRole)){if("cell"==l||"header_cell"==l)s=C.create(i,o.from);else if("row"==l){const t=i.resolve(o.from+1);s=C.rowSelection(t,t)}else if(!n){const t=d.get(o.node),e=o.from+1,n=e+t.map[t.width*t.height-1];s=C.create(i,e+1,n)}}else o instanceof r.U3&&function(t){let{$from:e,$to:n}=t;if(e.pos==n.pos||e.pos<n.pos-6)return!1;let r=e.pos,o=n.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,r++);for(let s=n.depth;s>=0&&!(n.before(s+1)>n.start(s));s--,o--);return r==o&&/row|table/.test(e.node(i).type.spec.tableRole)}(o)?s=r.U3.create(i,o.from):o instanceof r.U3&&function(t){let e,n,{$from:r,$to:o}=t;for(let i=r.depth;i>0;i--){const t=r.node(i);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){e=t;break}}for(let i=o.depth;i>0;i--){const t=o.node(i);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){n=t;break}}return e!==n&&0===o.parentOffset}(o)&&(s=r.U3.create(i,o.$from.start(),o.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}(o,D(o,n),t)})}},31594(t,e,n){"use strict";n.d(e,{$Z:()=>K,VR:()=>ot,gu:()=>mt,aA:()=>et,hG:()=>Q,er:()=>G});var r=n(58878),o=n(38815),i=n(94314),s=n(90782),l=n(36923);const{getOwnPropertyNames:a,getOwnPropertySymbols:c}=Object,{hasOwnProperty:d}=Object.prototype;function h(t,e){return function(n,r,o){return t(n,r,o)&&e(n,r,o)}}function u(t){return function(e,n,r){if(!e||!n||"object"!==typeof e||"object"!==typeof n)return t(e,n,r);const{cache:o}=r,i=o.get(e),s=o.get(n);if(i&&s)return i===n&&s===e;o.set(e,n),o.set(n,e);const l=t(e,n,r);return o.delete(e),o.delete(n),l}}function p(t){return a(t).concat(c(t))}const f=Object.hasOwn||((t,e)=>d.call(t,e));function m(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const g="undefined"!==typeof Float16Array,{getOwnPropertyDescriptor:y,keys:v}=Object;function b(t,e){return t.byteLength===e.byteLength&&_(new Uint8Array(t),new Uint8Array(e))}function w(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function k(t,e){return t.byteLength===e.byteLength&&_(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function x(t,e){return m(t.getTime(),e.getTime())}function C(t,e,n){return t.name===e.name&&t.message===e.message&&t.stack===e.stack&&n.equals(t.cause,e.cause,"cause","cause",t,e,n)}function S(t,e){return t===e}function M(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const o=new Array(r),i=t.entries();let s,l,a=0;for(;(s=i.next())&&!s.done;){const r=e.entries();let i=!1,c=0;for(;(l=r.next())&&!l.done;){if(o[c]){c++;continue}const r=s.value,d=l.value;if(n.equals(r[0],d[0],a,c,t,e,n)&&n.equals(r[1],d[1],r[0],d[0],t,e,n)){i=o[c]=!0;break}c++}if(!i)return!1;a++}return!0}const E=m;function A(t,e,n){const r=v(t);let o=r.length;if(v(e).length!==o)return!1;for(;o-- >0;)if(!z(t,e,n,r[o]))return!1;return!0}function D(t,e,n){const r=p(t);let o,i,s,l=r.length;if(p(e).length!==l)return!1;for(;l-- >0;){if(o=r[l],!z(t,e,n,o))return!1;if(i=y(t,o),s=y(e,o),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable))return!1}return!0}function T(t,e){return m(t.valueOf(),e.valueOf())}function O(t,e){return t.source===e.source&&t.flags===e.flags}function N(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const o=new Array(r),i=t.values();let s,l;for(;(s=i.next())&&!s.done;){const r=e.values();let i=!1,a=0;for(;(l=r.next())&&!l.done;){if(!o[a]&&n.equals(s.value,l.value,s.value,l.value,t,e,n)){i=o[a]=!0;break}a++}if(!i)return!1}return!0}function _(t,e){let n=t.length;if(e.length!==n||t.byteOffset!==e.byteOffset)return!1;if(t instanceof Float64Array||t instanceof Float32Array||g&&t instanceof Float16Array){for(;n-- >0;)if(t[n]!==e[n]&&(t[n]===t[n]||e[n]===e[n]))return!1;return!0}for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function R(t,e){return t.href===e.href||t.protocol===e.protocol&&t.username===e.username&&t.password===e.password&&t.host===e.host&&t.pathname===e.pathname&&t.hash===e.hash&&function(t,e){const n=t.toString(),r=e.toString();return n===r||L(n)===L(r)}(t.searchParams,e.searchParams)}function L(t){return t.split("&").sort().join("&")}function z(t,e,n,r){return!("_owner"!==r&&"__o"!==r&&"__v"!==r||!t.$$typeof&&!e.$$typeof)||f(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const I={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
2]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},F=Object.prototype.toString;function $(t){let{areArrayBuffersEqual:e,areArraysEqual:n,areDataViewsEqual:r,areDatesEqual:o,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:l,areNumbersEqual:a,areObjectsEqual:c,arePrimitiveWrappersEqual:d,areRegExpsEqual:h,areSetsEqual:u,areTypedArraysEqual:p,areUrlsEqual:f,unknownTagComparators:m}=t;return function(t,g,y){if(t===g)return!0;if(null==t||null==g)return!1;const v=typeof t;if(v!==typeof g)return!1;if("object"!==v)return"number"===v?a(t,g,y):"function"===v&&s(t,g,y);const b=t.constructor;if(b!==g.constructor)return!1;if(b===Object)return c(t,g,y);if(Array.isArray(t))return n(t,g,y);if(b===Date)return o(t,g,y);if(b===RegExp)return h(t,g,y);if(b===Map)return l(t,g,y);if(b===Set)return u(t,g,y);if(null==b)return c(t,g,y);const w=F.call(t);if("[object Date]"===w)return o(t,g,y);if("[object RegExp]"===w)return h(t,g,y);if("[object Map]"===w)return l(t,g,y);if("[object Set]"===w)return u(t,g,y);if("[object Object]"===w)return"function"!==typeof t.then&&"function"!==typeof g.then&&c(t,g,y);if("[object URL]"===w)return f(t,g,y);if("[object Error]"===w)return i(t,g,y);if("[object Arguments]"===w)return c(t,g,y);if(I[w])return p(t,g,y);if("[object ArrayBuffer]"===w)return e(t,g,y);if("[object DataView]"===w)return r(t,g,y);if("[object Boolean]"===w||"[object Number]"===w||"[object String]"===w)return d(t,g,y);if(m){let e=m[w];if(!e){const n=null!=(k=t)?k[Symbol.toStringTag]:void 0;n&&(e=m[n])}if(e)return e(t,g,y)}var k;return!1}}const P=B();B({strict:!0}),B({circular:!0}),B({circular:!0,strict:!0}),B({createInternalComparator:()=>m}),B({strict:!0,createInternalComparator:()=>m}),B({circular:!0,createInternalComparator:()=>m}),B({circular:!0,createInternalComparator:()=>m,strict:!0});function B(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{circular:e=!1,createInternalComparator:n,createState:r,strict:o=!1}=t,i=function(t){let{circular:e,createCustomConfig:n,strict:r}=t,o={areArrayBuffersEqual:b,areArraysEqual:r?D:w,areDataViewsEqual:k,areDatesEqual:x,areErrorsEqual:h(C,r?D:A),areFunctionsEqual:S,areMapsEqual:r?h(M,D):M,areNumbersEqual:E,areObjectsEqual:r?D:A,arePrimitiveWrappersEqual:T,areRegExpsEqual:O,areSetsEqual:r?h(N,D):N,areTypedArraysEqual:r?h(_,D):_,areUrlsEqual:R,unknownTagComparators:void 0};if(n&&(o=Object.assign({},o,n(o))),e){const t=u(o.areArraysEqual),e=u(o.areErrorsEqual),n=u(o.areMapsEqual),r=u(o.areObjectsEqual),i=u(o.areSetsEqual);o=Object.assign({},o,{areArraysEqual:t,areErrorsEqual:e,areMapsEqual:n,areObjectsEqual:r,areSetsEqual:i})}return o}(t),s=$(i);var l;return function(t){let{circular:e,comparator:n,createState:r,equals:o,strict:i}=t;if(r)return function(t,s){const{cache:l=(e?new WeakMap:void 0),meta:a}=r();return n(t,s,{cache:l,equals:o,meta:a,strict:i})};if(e)return function(t,e){return n(t,e,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};const s={cache:void 0,equals:o,meta:void 0,strict:i};return function(t,e){return n(t,e,s)}}({circular:e,comparator:s,createState:r,equals:n?n(s):(l=s,function(t,e,n,r,o,i,s){return l(t,e,s)}),strict:o})}var H=n(28436);const j=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return t=>{e.forEach(e=>{"function"===typeof e?e(t):e&&(e.current=t)})}},V=t=>{let{contentComponent:e}=t;const n=(0,i.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,s.jsx)(s.Fragment,{children:Object.values(n)})};var q=class extends r.Component{constructor(t){super(t),this.editorContentRef=r.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&(null===(t=e.view.dom)||void 0===t?void 0:t.parentNode)){if(e.contentComponent)return;const t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=function(){const t=new Set;let e={},n=!1;const r=()=>{!n&&t.size&&(n=!0,queueMicrotask(()=>{n=!1,t.forEach(t=>t())}))};return{subscribe:e=>(t.add(e),()=>{t.delete(e)}),getSnapshot:()=>e,getServerSnapshot:()=>e,setRenderer(t,n){e={...e,[t]:o.createPortal(n.reactElement,n.element,t)},r()},removeRenderer(t){const n={...e};delete n[t],e=n,r()}}}(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){const t=this.props.editor;if(t){t.isEditorContentInitialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null;try{var e;if(!(null===(e=t.view.dom)||void 0===e?void 0:e.parentNode))return;const n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:j(e,this.editorContentRef),...n}),(null===t||void 0===t?void 0:t.contentComponent)&&(0,s.jsx)(V,{contentComponent:t.contentComponent})]})}};const U=(0,r.forwardRef)((t,e)=>{const n=r.useMemo(()=>Math.floor(4294967295*Math.random()).toString(),[t.editor]);return r.createElement(q,{key:n,innerRef:e,...t})}),K=r.memo(U),W="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;var J=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0}
2,this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let t;const e=e=>{void 0!==(null===e||void 0===e?void 0:e.transaction)&&e.transaction===t||(t=null===e||void 0===e?void 0:e.transaction,this.transactionNumber+=1,this.subscribers.forEach(t=>t()))},n=this.editor;return n.on("transaction",e),n.on("update",e),()=>{n.off("transaction",e),n.off("update",e)}}}};function G(t){var e;const[n]=(0,r.useState)(()=>new J(t.editor)),o=(0,H.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,null!==(e=t.equalityFn)&&void 0!==e?e:P);return W(()=>n.watch(t.editor),[t.editor,n]),(0,r.useDebugValue)(o),o}const Z="undefined"===typeof window,Y=Z||Boolean("undefined"!==typeof window&&window.next);var X=class t{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(t=>t())}getInitialEditor(){const t=this.options.current.immediatelyRender;let e=null===t||void 0===t||t;return(Z||Y&&void 0===t)&&(e=!1),e?this.createEditor():null}createEditor(){var t=this;const e={...this.options.current,onBeforeCreate:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onBeforeCreate)||void 0===e?void 0:e.call(n,...o)},onBlur:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onBlur)||void 0===e?void 0:e.call(n,...o)},onCreate:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onCreate)||void 0===e?void 0:e.call(n,...o)},onDestroy:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onDestroy)||void 0===e?void 0:e.call(n,...o)},onFocus:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onFocus)||void 0===e?void 0:e.call(n,...o)},onSelectionUpdate:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onSelectionUpdate)||void 0===e?void 0:e.call(n,...o)},onTransaction:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onTransaction)||void 0===e?void 0:e.call(n,...o)},onUpdate:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onUpdate)||void 0===e?void 0:e.call(n,...o)},onContentError:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onContentError)||void 0===e?void 0:e.call(n,...o)},onDrop:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onDrop)||void 0===e?void 0:e.call(n,...o)},onPaste:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onPaste)||void 0===e?void 0:e.call(n,...o)},onDelete:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onDelete)||void 0===e?void 0:e.call(n,...o)},onMount:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onMount)||void 0===e?void 0:e.call(n,...o)},onUnmount:function(){for(var e,n,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return null===(e=(n=t.options.current).onUnmount)||void 0===e?void 0:e.call(n,...o)}};return new l.KE(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,e){return Object.keys(t).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&t.extensions&&e.extensions?t.extensions.length===e.extensions.length&&t.extensions.every((t,n)=>{var r;return t===(null===(r=e.extensions)||void 0===r?void 0:r[n])}):t[n]===e[n]))}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===e.length?t.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}
2):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps)return void(this.previousDeps=t);if(this.previousDeps.length===t.length&&this.previousDeps.every((e,n)=>e===t[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,e=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{this.isComponentMounted&&this.instanceId===t?e&&e.setOptions(this.options.current):e&&!e.isDestroyed&&(e.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function Q(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,r.useRef)(t);n.current=t;const[o]=(0,r.useState)(()=>new X(n)),s=(0,i.useSyncExternalStore)(o.subscribe,o.getEditor,o.getServerSnapshot);return(0,r.useDebugValue)(s),(0,r.useEffect)(o.onRender(e)),G({editor:s,selector:e=>{let{transactionNumber:n}=e;return!1===t.shouldRerenderOnTransaction||void 0===t.shouldRerenderOnTransaction?null:t.immediatelyRender&&0===n?0:n+1}}),s}const tt=(0,r.createContext)({editor:null}),et=(tt.Consumer,()=>(0,r.useContext)(tt));const nt=(0,r.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),rt=()=>(0,r.useContext)(nt);const ot=r.forwardRef((t,e)=>{const{onDragStart:n}=rt(),r=t.as||"div";return(0,s.jsx)(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function it(t){return!("function"!==typeof t||!t.prototype||!t.prototype.isReactComponent)}function st(t){return!("object"!==typeof t||!t.$$typeof||"Symbol(react.forward_ref)"!==t.$$typeof.toString()&&"react.forward_ref"!==t.$$typeof.description)}var lt=class{constructor(t,e){let{editor:n,props:r={},as:i="div",className:s=""}=e;this.ref=null,this.destroyed=!1,this.id=Math.floor(4294967295*Math.random()).toString(),this.component=t,this.editor=n,this.props=r,this.element=document.createElement(i),this.element.classList.add("react-renderer"),s&&this.element.classList.add(...s.split(" ")),this.editor.isEditorContentInitialized?(0,o.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;const e=this.component,n=this.props,o=this.editor,i=function(){try{if(r.version)return parseInt(r.version.split(".")[0],10)>=19}catch{}return!1}(),l=function(t){if(it(t))return!0;if(st(t))return!0;if(function(t){return!("object"!==typeof t||!t.$$typeof||"Symbol(react.memo)"!==t.$$typeof.toString()&&"react.memo"!==t.$$typeof.description)}(t)){const e=t.type;if(e)return it(e)||st(e)}return!1}(e),a={...n};!a.ref||i||l||delete a.ref,a.ref||!i&&!l||(a.ref=t=>{this.ref=t}),this.reactElement=(0,s.jsx)(e,{...a}),null===o||void 0===o||null===(t=o.contentComponent)||void 0===t||t.setRenderer(this.id,this)}updateProps(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.destroyed)return;let e=!1;const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];if(t[o]!==this.props[o]){e=!0;break}}e&&(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;const e=this.editor;null===e||void 0===e||null===(t=e.contentComponent)||void 0===t||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}};const at=r.createContext({markViewContentRef:()=>{}});l.Db;function ct(t,e,n){return t.node(n)===e.node(n)&&t.before(n)===e.before(n)}function dt(t){if(!(0,l.eE)(t))return[];const{$from:e,$to:n}=t,r=[],o=Math.min(e.depth,n.depth);for(let i=1;i<=o&&ct(e,n,i);i+=1)r.push(e.before(i));return r}var ht=class{constructor(t){this.views=new WeakMap,this.viewCount=0,this.insideViews=new Set,this.syncQueued=!1,this.scheduleSync=()=>{this.syncQueued||(this.syncQueued=!0,queueMicrotask(()=>{this.syncQueued=!1,this.sync()}))},this.handleTransaction=()=>this.scheduleSync(),this.editor=t}register(t){0===this.viewCount&&this.editor.on("transaction",this.handleTransaction),this.views.set(t.dom,t),this.viewCount+=1,this.scheduleSync()}unregister(t){this.views.delete(t.dom),this.viewCount-=1,this.insideViews.delete(t),0===this.viewCount&&this.editor.off("transaction",this.handleTransaction)}sync(){if(0===this.viewCount||this.editor.isDestroyed)return;const t=this.findInsideViews();this.updateViews(this.insideViews,t,!1),this.updateViews(t,this.insideViews,!0),this.insideViews=t}updateViews(t,e,n){for(const r of t)e.has(r)||r.setSelectionInside(n)}findInsideViews(){const t=new Set;for(const e of dt(this.editor.state.selection)){const n=this.editor.view.nodeDOM(e),r=n?this.views.get(n):void 0;r&&t.add(r)}return t}};const ut=new WeakMap;function pt(t){let e=ut.get(t);return e||(e=new ht(t),ut.set(t,e)),e}var ft=class extends l.Yv{constructor(t,e,n){if(super(t,e,n),this.nodeSelected=!1,this.handlePositionUpdate=()=>{const t=this.getPos();"number"===typeof t&&t!==this.currentPos&&(this.currentPos=t,this.renderer.updateProps({getPos:()=>this.getPos()}),"function"===typeof this.options.attrs&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const t=this.dom.querySelector("[data-node-view-content]");t?t.appendChild(this.contentDOMElement):this.dom.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const t=this.editor,e=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(e,{get(n,r,o){var i;return"storage"===r?null!==(i=t.storage[e.name])&&void 0!==i?i:{}:Reflect.get(n,r,o)}})}return this.cachedExtensionWithSyncedStorage}mount(){var t=this;const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,selectionInside:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.updateAttributes(e)},deleteNode:()=>this.deleteNode(),ref:(0,r.createRef)()};if(!this.component.displayName){const t=t=>t.charAt(0).toUpperCase()+t.substring(1);this.component.displayName=t(this.extension.name)}const n={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:t=>{if(t&&this.contentDOMElement&&t.firstChild!==this.contentDOMElement){t.hasAttribute("data-node-view-wrapper")&&t.removeAttribute("data-node-view-wrapper");const e=function(t){var e;const n=t.getRootNode(),r="function"===typeof n.getSelection?n.getSelection():null===(e=t.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e?void 0:e.getSelection();if(!r||0===r.rangeCount)return null;const{anchorNode:o,anchorOffset:i,focusNode:s,focusOffset:l}=r;return o&&s&&t.contains(o)&&t.contains(s)?()=>{try{r.setBaseAndExtent(o,i,s,l)}catch{}}:null}(this.contentDOMElement);t.appendChild(this.contentDOMElement),null===e||void 0===e||e()}}},o=this.component,i=(0,r.memo)(t=>(0,s.jsx)(nt.Provider,{value:n,children:(0,r.createElement)(o,t)}));i.displayName="ReactNodeView";let l=this.node.isInline?"span":"div";this.options.as&&(l=this.options.as);const{className:a=""}=this.options;this.renderer=new lt(i,{editor:this.editor,props:e,as:l,className:`node-${this.node.type.n
2ame} ${a}`.trim()}),pt(this.editor).register(this),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var t;if(this.renderer.element.firstElementChild&&!(null===(t=this.renderer.element.firstElementChild)||void 0===t?void 0:t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}update(t,e,n){const r=t=>{this.renderer.updateProps(t),"function"===typeof this.options.attrs&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if("function"===typeof this.options.update){const o=this.node,i=this.decorations,s=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:o,oldDecorations:i,newNode:t,newDecorations:e,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}if(t===this.node)return this.node=t,this.decorations=e,this.innerDecorations=n,!0;const o=this.getPos();this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=o;const i={node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(i.getPos=()=>this.getPos()),r(i),!0}selectNode(){this.nodeSelected=!0,this.updateSelectedState(!0)}deselectNode(){this.nodeSelected=!1,this.updateSelectedState(!0===this.options.selectedOnTextSelection&&this.isTextSelectionInside())}setSelectionInside(t){const e=this.nodeSelected||!0===this.options.selectedOnTextSelection&&t;this.renderer.updateProps({selectionInside:t,selected:e}),this.renderer.element.classList.toggle("ProseMirror-selectednode",e)}updateSelectedState(t){this.renderer.updateProps({selected:t}),this.renderer.element.classList.toggle("ProseMirror-selectednode",t)}isTextSelectionInside(){const t=this.getPos();return"number"===typeof t&&dt(this.editor.state.selection).includes(t)}destroy(){this.renderer.destroy(),pt(this.editor).unregister(this),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let t={};if("function"===typeof this.options.attrs){const e=this.editor.extensionManager.attributes,n=(0,l.zU)(this.node,e);t=this.options.attrs({node:this.node,HTMLAttributes:n})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}};function mt(t,e){return n=>n.editor.contentComponent?new ft(t,n,e):{dom:document.createElement("span"),contentDOM:null,update:()=>!1,destroy:()=>{},selectNode:()=>{},deselectNode:()=>{},stopEvent:()=>!1,ignoreMutation:()=>!0}}Symbol("tiptapReactWidgetCache");const gt=(0,r.createContext)({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});gt.displayName="TiptapContext";const yt=()=>(0,r.useContext)(gt);function vt(t){let{children:e,...n}=t;const o="editor"in n?n.editor:n.instance;if(!o)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=(0,r.useMemo)(()=>({editor:o}),[o]),l=(0,r.useMemo)(()=>({editor:o}),[o]);return(0,s.jsx)(tt.Provider,{value:l,children:(0,s.jsx)(gt.Provider,{value:i,children:e})})}function bt(t){let{...e}=t;const{editor:n}=yt();return(0,s.jsx)(K,{editor:n,...e})}vt.displayName="Tiptap",bt.displayName="Tiptap.Content";Object.assign(vt,{Content:bt})},1569(t,e,n){"use strict";n.d(e,{m:()=>ee});var r=n(36923);const o=["top","right","bottom","left"],i=["start","end"],s=o.reduce((t,e)=>t.concat(e,e+"-"+i[0],e+"-"+i[1]),[]),l=Math.min,a=Math.max,c=Math.round,d=(Math.floor,t=>({x:t,y:t})),h={left:"right",right:"left",bottom:"top",top:"bottom"};function u(t,e,n){return a(t,l(e,n))}function p(t,e){return"function"===typeof t?t(e):t}function f(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function g(t){return"x"===t?"y":"x"}function y(t){return"y"===t?"height":"width"}function v(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function b(t){return g(v(t))}function w(t,e,n){void 0===n&&(n=!1);const r=m(t),o=b(t),i=y(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=A(s)),[s,A(s)]}function k(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const x=["left","right"],C=["right","left"],S=["top","bottom"],M=["bottom","top"];function E(t,e,n,r){const o=m(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?
vendor: 4,405 bytes, line 2
2C:x:e?x:C;case"left":case"right":return e?S:M;default:return[]}}(f(t),"start"===n,r);return o&&(i=i.map(t=>t+"-"+o),e&&(i=i.concat(i.map(k)))),i}function A(t){const e=f(t);return h[e]+t.slice(e.length)}function D(t){return"number"!==typeof t?function(t){var e,n,r,o;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(r=t.bottom)?r:0,left:null!=(o=t.left)?o:0}}(t):{top:t,right:t,bottom:t,left:t}}function T(t){const{x:e,y:n,width:r,height:o}=t;return{width:r,height:o,top:n,left:e,right:e+r,bottom:n+o,x:e,y:n}}function O(t,e,n){let{reference:r,floating:o}=t;const i=v(e),s=b(e),l=y(s),a=f(e),c="y"===i,d=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,u=r[l]/2-o[l]/2;let p;switch(a){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-o.width,y:h};break;default:p={x:r.x,y:r.y}}const g=m(e);return g&&(p[s]+=u*("end"===g?1:-1)*(n&&c?-1:1)),p}async function N(t,e){var n;void 0===e&&(e={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:f=0}=p(e,t),m=D(f),g=l[u?"floating"===h?"reference":"floating":h],y=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:a})),v="floating"===h?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},k=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:b,strategy:a}):v);return{top:(y.top-k.top+m.top)/w.y,bottom:(k.bottom-y.bottom+m.bottom)/w.y,left:(y.left-k.left+m.left)/w.x,right:(k.right-y.right+m.right)/w.x}}function _(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function R(t){return o.some(e=>t[e]>=0)}function L(t){const e=l(...t.map(t=>t.left)),n=l(...t.map(t=>t.top));return{x:e,y:n,width:a(...t.map(t=>t.right))-e,height:a(...t.map(t=>t.bottom))-n}}const z=new Set(["left","top"]);function I(){return"undefined"!==typeof window}function F(t){return B(t)?(t.nodeName||"").toLowerCase():"#document"}function $(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function P(t){var e;return null==(e=(B(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function B(t){return!!I()&&(t instanceof Node||t instanceof $(t).Node)}function H(t){return!!I()&&(t instanceof Element||t instanceof $(t).Element)}function j(t){return!!I()&&(t instanceof HTMLElement||t instanceof $(t).HTMLElement)}function V(t){return!(!I()||"undefined"===typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof $(t).ShadowRoot)}function q(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&"inline"!==o&&"contents"!==o}function U(t){return/^(table|td|th)$/.test(F(t))}function K(t){try{if(t.matches(":popover-open"))return!0}catch(e){}try{return t.matches(":modal")}catch(e){return!1}}const W=/transform|translate|scale|rotate|perspective|filter/,J=/paint|layout|strict|content/,G=t=>!!t&&"none"!==t;let Z;function Y(t){const e=H(t)?tt(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!X()&&(G(e.backdropFilter)||G(e.filter))||W.test(e.willChange||"")||J.test(e.contain||"")}function X(){return null==Z&&(Z="undefined"!==typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Z}function Q(t){return/^(html|body|#document)$/.test(F(t))}function tt(t){return $(t).getComputedStyle(t)}function et(t){return H(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nt(t){if("html"===F(t))return t;const e=t.assignedSlot||t.parentNode||V(t)&&t.host||P(t);return V(e)?e.host:e}function rt(t){const e=nt(t);return Q(e)?(t.ownerDocument||t).body:j(e)&&q(e)?e:rt(e)}function ot(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=rt(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),s=$(o);if(i){const t=it(s);
vendor: 4,893 bytes, line 2
2return e.concat(s,s.visualViewport||[],q(o)?o:[],t&&n?ot(t):[])}return e.concat(o,ot(o,[],n))}function it(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function st(t){const e=tt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=j(t),i=o?t.offsetWidth:n,s=o?t.offsetHeight:r,l=c(n)!==i||c(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function lt(t){return H(t)?t:t.contextElement}function at(t){const e=lt(t);if(!j(e))return d(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=st(e);let s=(i?c(n.width):n.width)/r,l=(i?c(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),l&&Number.isFinite(l)||(l=1),{x:s,y:l}}const ct=d(0);function dt(t){const e=$(t);return X()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ct}function ht(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),i=lt(t);let s=d(1);e&&(r?H(r)&&(s=at(r)):s=at(t));const l=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===$(t)}(i,n,r)?dt(i):d(0);let a=(o.left+l.x)/s.x,c=(o.top+l.y)/s.y,h=o.width/s.x,u=o.height/s.y;if(i&&r){const t=$(i),e=H(r)?$(r):r;let n=t,o=it(n);for(;o&&e!==n;){const t=at(o),e=o.getBoundingClientRect(),r=tt(o),i=e.left+(o.clientLeft+parseFloat(r.paddingLeft))*t.x,s=e.top+(o.clientTop+parseFloat(r.paddingTop))*t.y;a*=t.x,c*=t.y,h*=t.x,u*=t.y,a+=i,c+=s,n=$(o),o=it(n)}}return T({width:h,height:u,x:a,y:c})}function ut(t,e){const n=et(t).scrollLeft;return e?e.left+n:ht(P(t)).left+n}function pt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ut(t,n),y:n.top+e.scrollTop}}function ft(t,e,n){let r;if("viewport"===e||"layoutViewport"===e)r=function(t,e,n){void 0===n&&(n="viewport");const r="layoutViewport"===n,o=$(t),i=P(t),s=o.visualViewport;let l=i.clientWidth,a=i.clientHeight,c=0,d=0;if(s){const t=!X()||"fixed"===e;r?t||(c=-s.offsetLeft,d=-s.offsetTop):(l=s.width,a=s.height,t&&(c=s.offsetLeft,d=s.offsetTop))}if(ut(i)<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(i.clientWidth-e.clientWidth-r),s="stable both-edges"===getComputedStyle(i).scrollbarGutter?o/2:o;s<=25&&(l-=s)}return{width:l,height:a,x:c,y:d}}(t,n,e);else if("document"===e)r=function(t){const e=et(t),n=t.ownerDocument.body,r=a(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=a(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+ut(t);const s=-e.scrollTop;return"rtl"===tt(n).direction&&(i+=a(t.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:s}}(P(t));else if(H(e))r=function(t,e){const n=ht(t,!0,"fixed"===e),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=at(t);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:r*i.y}}(e,n);else{const n=dt(t);r={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return T(r)}function mt(t,e,n){const r=j(e),o=P(e),i="fixed"===n,s=ht(t,!0,i,e);let l={scrollLeft:0,scrollTop:0};const a=d(0);if((r||!i)&&(("body"!==F(e)||q(o))&&(l=et(e)),r)){const t=ht(e,!0,i,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}!r&&o&&(a.x=ut(o));const c=!o||r||i?d(0):pt(o,l);return{x:s.left+l.scrollLeft-a.x-c.x,y:s.top+l.scrollTop-a.y-c.y,width:s.width,height:s.height}}function gt(t){return"static"===tt(t).position}function yt(t,e){if(!j(t)||"fixed"===tt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return P(t)===n&&(n=n.ownerDocument.body),n}function vt(t,e){const n=$(t);if(K(t))return n;if(!j(t)){let e=nt(t);for(;e&&!Q(e);){if(H(e)&&!gt(e))return e;e=nt(e)}return n}let r=yt(t,e);for(;r&&U(r)&&gt(r);)r=yt(r,e);return r&&Q(r)&&gt(r)&&!Y(r)?n:r||function(t){let e=nt(t);for(;j(e)&&!Q(e);){if(Y(e))return e;if(K(e))return null;e=nt(e)}return null}(t)||n}const bt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i="fixed"===o,s=P(r),l=!!e&&K(e.floating);if(r===s||l&&i)return n;let a={scrollLeft:0,scrollTop:0},c=d(1);const h=d(0),u=j(r);if((u||!i)&&(("body"!==F(r)||q(s))&&(a=et(r)),u)){const t=ht(r);c=at(r),h.x=t.x+r.clientLeft,h.y=t.y+r.clientTop}const p=!s||u||i?d(0):pt(s,a);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+h.x+p.x,y:n.y*c.y-a.scrollTop*c.y+h.y+p.y}},getDocumentElement:P,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:o}=t;const i=[..."clippingAncestors"===n?K(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let r=ot(t,[],!1).filter(t=>H(t)&&"body"!==F(t)),o=null;const i="fixed"===tt(t).position;let s=i?nt(t):t;for(;H(s)&&!Q(s);){const t=tt(s),e=Y(s),n=o?o.position:i?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?o=t:r=r.filter(t=>t!==s),s=nt(s)}return e.set(t,r),r}(e,this._c):[].concat(n),r],s=ft(e,i[0],o);let c=s.top,d=s.right,h=s.bottom,u=s.left;for(let p=1;p<i.length;p++){const t=ft(e,i[p],o);
vendor: 4,613 bytes, line 2
2c=a(t.top,c),d=l(t.right,d),h=l(t.bottom,h),u=a(t.left,u)}return{width:d-u,height:h-c,x:u,y:c}},getOffsetParent:vt,getElementRects:async function(t){const e=this.getOffsetParent||vt,n=this.getDimensions,r=await n(t.floating);return{reference:mt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=st(t);return{width:e,height:n}},getScale:at,isElement:H,isRTL:function(t){return"rtl"===tt(t).direction}};const wt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=e,a=await async function(t,e){const{placement:n,platform:r,elements:o}=t,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=f(n),l=m(n),a="y"===v(n),c=z.has(s)?-1:1,d=i&&a?-1:1,h=p(e,t);let{mainAxis:u,crossAxis:g,alignmentAxis:y}="number"===typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&"number"===typeof y&&(g="end"===l?-1*y:y),a?{x:g*d,y:u*c}:{x:u*c,y:g*d}}(e,t);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:s}}}}},kt=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,r,o;const{rects:i,middlewareData:l,placement:a,platform:c,elements:d}=e,{crossAxis:h=!1,alignment:u,allowedPlacements:g=s,autoAlignment:y=!0,...v}=p(t,e),b=void 0!==u||g===s?function(t,e,n){return(t?[...n.filter(e=>m(e)===t),...n.filter(e=>m(e)!==t)]:n.filter(t=>f(t)===t)).filter(n=>!t||m(n)===t||!!e&&k(n)!==n)}(u||null,y,g):g,x=(null==(n=l.autoPlacement)?void 0:n.index)||0,C=b[x];if(null==C)return{};if(a!==C)return{reset:{placement:b[0]}};const S=await c.detectOverflow(e,v),M=w(C,i,await(null==c.isRTL?void 0:c.isRTL(d.floating))),E=[S[f(C)],S[M[0]],S[M[1]]],A=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:C,overflows:E}],D=b[x+1];if(D)return{data:{index:x+1,overflows:A},reset:{placement:D}};const T=A.map(t=>{const e=m(t.placement);return[t.placement,e&&h?t.overflows.slice(0,2).reduce((t,e)=>t+e,0):t.overflows[0],t.overflows]}).sort((t,e)=>t[1]-e[1]),O=(null==(o=T.filter(t=>t[2].slice(0,m(t[0])?2:3).every(t=>t<=0))[0])?void 0:o[0])||T[0][0];return O!==a?{data:{index:x+1,overflows:A},reset:{placement:O}}:{}}}},xt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o,platform:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=p(t,e),d={x:n,y:r},h=await i.detectOverflow(e,c),f=v(o),m=g(f);let y=d[m],b=d[f];const w=(t,e)=>u(e+h["y"===t?"top":"left"],e,e-h["y"===t?"bottom":"right"]);s&&(y=w(m,y)),l&&(b=w(f,b));const k=a.fn({...e,[m]:y,[f]:b});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[m]:s,[f]:l}}}}}},Ct=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...b}=p(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const x=f(o),C=v(l),S=f(l)===l,M=await(null==a.isRTL?void 0:a.isRTL(c.floating)),D=u||(S||!y?[A(l)]:function(t){const e=A(t);return[k(t),e,k(e)]}(l)),T="none"!==g;!u&&T&&D.push(...E(l,y,g,M));const O=[l,...D],N=await a.detectOverflow(e,b),_=[];let R=(null==(r=i.flip)?void 0:r.overflows)||[];if(d&&_.push(N[x]),h){const t=w(o,s,M);_.push(N[t[0]],N[t[1]])}if(R=[...R,{placement:o,overflows:_}],!_.every(t=>t<=0)){var L,z;const t=((null==(L=i.flip)?void 0:L.index)||0)+1,e=O[t];if(e){if(!("alignment"===h&&C!==v(e))||R.every(t=>v(t.placement)!==C||t.overflows[0]>0))return{data:{index:t,overflows:R},reset:{placement:e}}}let n=null==(z=R.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:z.placement;if(!n)switch(m){case"bestFit":{var I;const t=null==(I=R.filter(t=>{if(T){const e=v(t.placement);return e===C||"y"===e}return!0}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:I[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},St=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:o,elements:i}=e,{apply:s=()=>{},...c}=p(t,e),d=await o.detectOverflow(e,c),h=f(n),u=m(n),g="y"===v(n),{width:y,height:b}=r.floating;let w,k;
2"top"===h||"bottom"===h?(w=h,k=u===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(k=h,w="end"===u?"top":"bottom");const x=b-d.top-d.bottom,C=y-d.left-d.right,S=l(b-d[w],x),M=l(y-d[k],C),E=e.middlewareData.shift,A=!E;let D=S,T=M;null!=E&&E.enabled.x&&(T=C),null!=E&&E.enabled.y&&(D=x),A&&!u&&(g?T=y-2*a(d.left,d.right):D=b-2*a(d.top,d.bottom)),await s({...e,availableWidth:T,availableHeight:D});const O=await o.getDimensions(i.floating);return y!==O.width||b!==O.height?{reset:{rects:!0}}:{}}}},Mt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:o="referenceHidden",...i}=p(t,e);switch(o){case"referenceHidden":{const t=_(await r.detectOverflow(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:R(t)}}}case"escaped":{const t=_(await r.detectOverflow(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:R(t)}}}default:return{}}}}},Et=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:c}=e,{element:d,padding:h=0}=p(t,e)||{};if(null==d)return{};const f=D(h),g={x:n,y:r},v=b(o),w=y(v),k=await s.getDimensions(d),x="y"===v,C=x?"top":"left",S=x?"bottom":"right",M=x?"clientHeight":"clientWidth",E=i.reference[w]+i.reference[v]-g[v]-i.floating[w],A=g[v]-i.reference[v],T=await(null==s.getOffsetParent?void 0:s.getOffsetParent(d));let O=T?T[M]:0;O&&await(null==s.isElement?void 0:s.isElement(T))||(O=a.floating[M]||i.floating[w]);const N=E/2-A/2,_=O/2-k[w]/2-1,R=l(f[C],_),L=l(f[S],_),z=O-k[w]-L,I=O/2-k[w]/2+N,F=u(R,I,z),$=!c.arrow&&null!=m(o)&&I!==F&&i.reference[w]/2-(I<R?R:L)-k[w]/2<0,P=$?I<R?I-R:I-z:0;return{[v]:g[v]+P,data:{[v]:F,centerOffset:I-F-P,...$&&{alignmentOffset:P}},reset:$}}}),At=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:o,platform:i,strategy:s}=e,{padding:c=2,x:d,y:h}=p(t,e),u=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(r.reference))||[]);if(!u.length)return{};const m=function(t){const e=t.slice().sort((t,e)=>t.y-e.y),n=[];let r=null;for(let o=0;o<e.length;o++){const t=e[o];!r||t.y-r.y>r.height/2?n.push([t]):n[n.length-1].push(t),r=t}return n.map(t=>T(L(t)))}(u),g=T(L(u)),y=D(c);const b=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===m.length&&(m[0].left>m[1].right||m[1].left>m[0].right)&&null!=d&&null!=h)return m.find(t=>d>t.left-y.left&&d<t.right+y.right&&h>t.top-y.top&&h<t.bottom+y.bottom)||g;if(m.length>=2){if("y"===v(n)){const t=m[0],e=m[m.length-1],r="top"===f(n),o=t.top,i=e.bottom,s=r?t.left:e.left;return T({x:s,y:o,width:(r?t.right:e.right)-s,height:i-o})}const t="left"===f(n),e=a(...m.map(t=>t.right)),r=l(...m.map(t=>t.left)),o=m.filter(n=>t?n.left===r:n.right===e),i=o[0].top,s=o[o.length-1].bottom;return T({x:r,y:i,width:e-r,height:s-i})}return g}},floating:r.floating,strategy:s});return o.reference.x!==b.reference.x||o.reference.y!==b.reference.y||o.reference.width!==b.reference.width||o.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},Dt=(t,e,n)=>{const r=new Map,o=null!=n?n:{},i={...bt,...o.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:N},a=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:h}=O(c,r,a),u=r,p=0;const f={};for(let m=0;m<i.length;m++){const n=i[m];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:b,data:w,reset:k}=await y({x:d,y:h,initialPlacement:r,placement:u,strategy:o,middlewareData:f,re
2cts:c,platform:l,elements:{reference:t,floating:e}});d=null!=v?v:d,h=null!=b?b:h,f[g]={...f[g],...w},k&&p<50&&(p++,"object"===typeof k&&(k.placement&&(u=k.placement),k.rects&&(c=!0===k.rects?await s.getElementRects({reference:t,floating:e,strategy:o}):k.rects),({x:d,y:h}=O(c,u,a))),m=-1)}return{x:d,y:h,placement:u,strategy:o,middlewareData:f}})(t,e,{...o,platform:i})};var Tt=n(14973),Ot=n(64206);var Nt=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(Ct("boolean"!==typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(xt("boolean"!==typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(wt("boolean"!==typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(Et(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(St("boolean"!==typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(kt("boolean"!==typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(Mt("boolean"!==typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(At("boolean"!==typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:n}=this.editor.state,o=null===(t=this.getReferencedVirtualElement)||void 0===t?void 0:t.call(this);if(o)return o;if(!(null===(e=this.view)||void 0===e||null===(e=e.dom)||void 0===e?void 0:e.parentNode))return;const i=(0,r.MG)(this.view,n.from,n.to);let s={getBoundingClientRect:()=>i,getClientRects:()=>[i]};if(n instanceof Tt.nh){let t=this.view.nodeDOM(n.from);const e=t.dataset.nodeViewWrapper?t:t.querySelector("[data-node-view-wrapper]");e&&(t=e),t&&(s={getBoundingClientRect:()=>t.getBoundingClientRect(),getClientRects:()=>[t.getBoundingClientRect()]})}if(n instanceof Ot.rn){const{$anchorCell:t,$headCell:e}=n,r=t?t.pos:e.pos,o=e?e.pos:t.pos,i=this.view.nodeDOM(r),l=this.view.nodeDOM(o);if(!i||!l)return;const a=i===l?i.getBoundingClientRect():function(t,e){const n=Math.min(t.top,e.top),r=Math.max(t.bottom,e.bottom),o=Math.min(t.left,e.left),i=Math.max(t.right,e.right)-o;return new DOMRect(o,n,i,r-n)}(i.getBoundingClientRect(),l.getBoundingClientRect());s={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return s}constructor(t){let{editor:e,element:n,view:o,pluginKey:i="bubbleMenu",updateDelay:s=250,resizeDelay:l=60,shouldShow:a,appendTo:c,getReferencedVirtualElement:d,options:h}=t;var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=t=>{let{view:e,state:n,from:o,to:i}=t;const{doc:s,selection:l}=n,{empty:a}=l,c=!s.textBetween(o,i).length&&(0,r.eE)(n.selection),d=this.element.contains(document.activeElement);return!(!e.hasFocus()&&!d||a||c||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=t=>{let{event:e}=t;var n;this.editor.isDestroyed?this.destroy():this.preventHide?this.preventHide=!1:(null===e||void 0===e?void 0:e.relatedTarget)&&(null===(n=this.element.parentNode)||void 0===n?void 0:n.contains(e.relatedTarget))||(null===e||void 0===e?void 0:e.relatedTarget)!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(t,e)=>{const n=!(null===e||void 0===e?void 0:e.selection.eq(t.state.selection)),r=!(null===e||void 0===e?void 0:e.doc.eq(t.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(t,n,r,e)},this.updateDelay))},this.updateHandler=(t,e,n,r)=>{const{composing:o}=t;o||!e&&!n||(this.getShouldShow(r)?(this.show(),this.updatePosition()):this.hide())},this.transactionHandler=t=>{let{transaction:e}=t;const n=e.getMeta(this.pluginKey);"updatePosition"===n?this.updatePosition():n&&"object"===typeof n&&"updateOptions"===n.type?this.updateOptions(n.options):"hide"===n?this.hide():"show"===n&&(this.updatePosition(),this.show())},this.editor=e,this.element=n,this.view=o,this.pluginKey=i,this.updateDelay=s,this.resizeDelay=l,this.appendTo=c,this.scrollTarget=null!==(u=null===h||void 0===h?void 0:h.scrollTarget)&&void 0!==u?u:window,this.getReferencedVirtualElement=d,this.floatingUIOptions={...this.floatingUIOptions,...h},this.element.tabIndex=0,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(o,o.state),this.get
2ShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&Dt(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(t=>{let{x:e,y:n,strategy:r,middlewareData:o}=t;var i,s;this.isVisible&&!this.editor.isDestroyed&&this.element.isConnected&&((null===(i=o.hide)||void 0===i?void 0:i.referenceHidden)||(null===(s=o.hide)||void 0===s?void 0:s.escaped)?this.element.style.visibility="hidden":(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${e}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()))})}update(t,e){const{state:n}=t,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r)return void this.handleDebouncedUpdate(t,e);const o=!(null===e||void 0===e?void 0:e.selection.eq(t.state.selection)),i=!(null===e||void 0===e?void 0:e.doc.eq(t.state.doc));this.updateHandler(t,o,i,e)}getShouldShow(t){var e;const{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(t=>t.$from.pos)),s=Math.max(...o.map(t=>t.$to.pos));return(null===(e=this.shouldShow)||void 0===e?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:t,from:i,to:s}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e="function"===typeof this.appendTo?this.appendTo():this.appendTo;null===(t=null!==e&&void 0!==e?e:this.view.dom.parentElement)||void 0===t||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(void 0!==t.updateDelay&&(this.updateDelay=t.updateDelay),void 0!==t.resizeDelay&&(this.resizeDelay=t.resizeDelay),void 0!==t.appendTo&&(this.appendTo=t.appendTo),void 0!==t.getReferencedVirtualElement&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),void 0!==t.shouldShow&&t.shouldShow&&(this.shouldShow=t.shouldShow),void 0!==t.options){var e;const n=null!==(e=t.options.scrollTarget)&&void 0!==e?e:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const _t=t=>new Tt.k_({key:"string"===typeof t.pluginKey?new Tt.hs(t.pluginKey):t.pluginKey,view:e=>new Nt({view:e,...t})});r.YY.create({name:"bubbleMenu",addOptions:()=>({element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[_t({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Rt=n(31594),Lt=n(58878),zt=n(38815),It=class{getTextContent(t){return(0,r.q4)(t,{textSerializers:(0,r.iR)(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(Ct("boolean"!==typeof this.floatingUIOptions.flip?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(xt("boolean"!==typeof this.floatingUIOptions.shift?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(wt("boolean"!==typeof this.floatingUIOptions.offset?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(Et(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(St("boolean"!==typeof this.floatingUIOptions.size?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(kt("boolean"!==typeof this.floatingUIOptions.autoPlacement?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(Mt("boolean"!==typeof this.floatingUIOptions.hide?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(At("boolean"!==typeof this.floatingUIOptions.inline?this.floatingUIOptions.inline:void 0)),t}constructor(t){let{editor:e,element:n,view:r,pluginKey:o="floatingMenu",updateDelay:i=250,resizeDelay:s=60,options:l,appendTo:a,shouldShow:c}=t;var d;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=t=>{let{view:e,state:n}=t;const{selection:r}=n,{$anchor:o,empty:i}=r,s=1===o.depth,l=o.parent.isTextblock&&!o.parent.type.spec.code&&!o.parent.textContent&&0===o.parent.childCount&&!this.getTextContent(o.parent);return!!(e.hasFocus()&&i&&s&&l&&this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(t,e,n,r)=>{const{composing:o}=t;o||!e&&!n||(this.getShouldShow(r)?(this.updatePosition(),this.show()):this.hide())},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=t=>{let{event:e}=t;var n;this.preventHide?this.preventHide=!1:(null===e||void 0===e?void 0:e.relatedTarget)&&(null===(n=this.element.parentNode)||void 0===n?void 0:n.contains(e.relatedTarget))||(null===e||void 0===e?void 0:e.relatedTarget)!==this.editor.view.dom&&this.hide()},this.transactionHandler=t=>{let{transaction:e}=t;const n=e.getMeta(this.pluginKey);"updatePosition"===n?this.updatePosition():n&&"object"===typeof n&&"updateOptions"===n.type?this.updateOptions(n.options):"hide"===n?this.hide():"show"===n&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=e,this.element=n,this.view=r,this.pluginKey=o,this.updateDelay=i,this.resizeDelay=s,this.appendTo=a,this.scrollTarget=null!==(d=null===l||void 0===l?void 0:l.scrollTarget)&&void 0!==d?d:window,this.floatingUIOptions={...this.floatingUIOptions,...l},this.element.tabIndex=0,c&&(this.shouldShow=c),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(r,r.state),this.get
2ShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:n}=this.view,{selection:r}=n,{ranges:o}=r,i=Math.min(...o.map(t=>t.$from.pos)),s=Math.max(...o.map(t=>t.$to.pos));return null===(e=this.shouldShow)||void 0===e?void 0:e.call(this,{editor:this.editor,view:this.view,state:n,oldState:t,from:i,to:s})}updateOptions(t){if(void 0!==t.updateDelay&&(this.updateDelay=t.updateDelay),void 0!==t.resizeDelay&&(this.resizeDelay=t.resizeDelay),void 0!==t.appendTo&&(this.appendTo=t.appendTo),void 0!==t.shouldShow&&t.shouldShow&&(this.shouldShow=t.shouldShow),void 0!==t.options){var e;const n=null!==(e=t.options.scrollTarget)&&void 0!==e?e:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(null===(t=this.view)||void 0===t||null===(t=t.dom)||void 0===t?void 0:t.parentNode))return;const{selection:e}=this.editor.state,n=(0,r.MG)(this.view,e.from,e.to);Dt({getBoundingClientRect:()=>n,getClientRects:()=>[n]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(t=>{let{x:e,y:n,strategy:r,middlewareData:o}=t;var i,s;(null===(i=o.hide)||void 0===i?void 0:i.referenceHidden)||(null===(s=o.hide)||void 0===s?void 0:s.escaped)?this.element.style.visibility="hidden":(this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${e}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate())})}update(t,e){const n=!(null===e||void 0===e?void 0:e.selection.eq(t.state.selection)),r=!(null===e||void 0===e?void 0:e.doc.eq(t.state.doc));this.updateHandler(t,n,r,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e="function"===typeof this.appendTo?this.appendTo():this.appendTo;null===(t=null!==e&&void 0!==e?e:this.view.dom.parentElement)||void 0===t||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const Ft=t=>new Tt.k_({key:"string"===typeof t.pluginKey?new Tt.hs(t.pluginKey):t.pluginKey,view:e=>new It({view:e,...t})});r.YY.create({name:"floatingMenu",addOptions:()=>({element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}),addCommands(){return{updateFloatingMenuPosition:()=>t=>{let{tr:e,dispatch:n}=t;return n&&e.setMeta(this.options.pluginKey,"updatePosition"),!0}}},addProseMirrorPlugins(){return this.options.element?[Ft({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function $t(t,e){return null!==t&&void 0!==t?t:new Tt.hs(e)}const Pt="undefined"!==typeof window?Lt.useLayoutEffect:Lt.useEffect,Bt=new Set(["left","opacity","position","top","visibility","width"]),Ht=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","o
2pacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),jt=new Set(["children","className","style"]),Vt=new Set(["tabIndex"]),qt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),Ut={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function Kt(t,e){return/^on[A-Z]/.test(t)&&"function"===typeof e}function Wt(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Jt(t){return Vt.has(t)}function Gt(t,e,n){"tabIndex"!==e?t[e]=n:t.tabIndex=Number(n)}function Zt(t,e,n){Bt.has(e)||t.style.setProperty(Wt(e),function(t,e){return"number"!==typeof e||0===e||t.startsWith("--")||Ht.has(t)?String(e):`${e}px`}(e,n))}function Yt(t,e,n){new Set([...Object.keys(e),...Object.keys(n)]).forEach(r=>{if(jt.has(r)||!function(t){return t.startsWith("aria-")||t.startsWith("data-")||qt.has(t)}(r)||Kt(r,e[r])||Kt(r,n[r]))return;const o=e[r],i=n[r];if(o===i)return;const s=function(t){return t.startsWith("aria-")||t.startsWith("data-"),t}(r);return null==i||!1===i?(Jt(r)&&function(t,e){if("tabIndex"===e)return void t.removeAttribute("tabindex");const n=t[e];t[e]="boolean"!==typeof n&&("number"!==typeof n?"":0)}(t,r),void t.removeAttribute(s)):!0===i?(Jt(r)&&Gt(t,r,!0),void t.setAttribute(s,"")):void(Jt(r)?Gt(t,r,i):t.setAttribute(s,String(i)))})}function Xt(t,e,n){const r=null!==e&&void 0!==e?e:{},o=null!==n&&void 0!==n?n:{};new Set([...Object.keys(r),...Object.keys(o)]).forEach(e=>{const n=r[e],i=o[e];n!==i&&(null!=i?Zt(t,e,i):function(t,e){Bt.has(e)||t.style.removeProperty(Wt(e))}(t,e))})}function Qt(t,e,n){e.forEach(e=>{let{eventName:n,listener:r,options:o}=e;t.removeEventListener(n,r,o)});const r=[];return Object.entries(n).forEach(e=>{let[n,o]=e;if(!Kt(n,o))return;const{eventName:i,options:s}=function(t){var e;const n=t.endsWith("Capture"),r=(n?t.slice(0,-7):t).slice(2);return{eventName:null!==(e=Ut[r])&&void 0!==e?e:r.toLowerCase(),options:n?{capture:!0}:void 0}}(n),l=e=>{o(function(t,e){let n=e.defaultPrevented,r=!1;const o=Object.create(e);return Object.defineProperties(o,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>r},preventDefault:{value:()=>{n=!0,e.preventDefault()}},stopPropagation:{value:()=>{r=!0,e.stopPropagation()}}}),o}(t,e))};t.addEventListener(i,l,s),r.push({eventName:i,listener:l,options:s})}),r}function te(t,e){const n=(0,Lt.useRef)({}),r=(0,Lt.useRef)([]);Pt(()=>{const o=n.current;return function(t,e,n){e!==n&&(n?t.className=n:t.removeAttribute("class"))}(t,o.className,e.className),Xt(t,o.style,e.style),Yt(t,o,e),r.current=Qt(t,r.current,e),n.current=e,()=>{r.current.forEach(e=>{let{eventName:n,listener:r,options:o}=e;t.removeEventListener(n,r,o)}),r.current=[]}},[t,e])}const ee=Lt.forwardRef((t,e)=>{let{pluginKey:n,editor:r,updateDelay:o,resizeDelay:i,appendTo:s,shouldShow:l=null,getReferencedVirtualElement:a,options:c,children:d,...h}=t;const u=(0,Lt.useRef)(document.createElement("div")),p=(0,Lt.useRef)($t(n,"bubbleMenu")).current;te(u.current,h),"function"===typeof e?e(u.current):e&&(e.current=u.current);const{editor:f}=(0,Rt.aA)(),m=r||f,g={updateDelay:o,resizeDelay:i,appendTo:s,pluginKey:p,shouldShow:l,getReferencedVirtualElement:a,options:c},y=(0,Lt.useRef)(g);y.current=g;const[v,b]=(0,Lt.useState)(!1),w=(0,Lt.useRef)(!0);return(0,Lt.useEffect)(()=>{if(null===m||void 0===m?void 0:m.isDestroyed)return;if(!m)return void console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");const t=u.current;t.style.visibility="hidden",t.style.position="absolute";const e=_t({...y.current,editor:m,element:t});m.registerPlugin(e);const n=y.current.pluginKey;return w.current=!0,b(!0),()=>{b(!1),m.unregisterPlugin(n),window.requestAnimationFrame(()=>{t.parentNode&&t.parentNode.removeChild(t)})}},[m]),(0,Lt.useEffect)(()=>{v&&m&&!m.isDestroyed&&(w.current?w.current=!1:m.view.dispatch(m.state.tr.setMeta(p,{type:"updateOptions",options:y.current})))},[v,m,o,i,l,c,s,a,p]),(0,zt.createPortal)(d,u.current)});Lt.forwardRef((t,e)=>{let{pluginKey:n,editor:r,updateDelay:o,resizeDelay:i,appendTo:s,shouldShow:l=null,options:a,children:c,...d}=t;const h=(0,Lt.useRef)(document.createElement("div")),u=(0,Lt.useRef)($t(n,"floatingMenu")).current;te(h.current,d),"function"===typeof e?e(h.current):e&&(e.current=h.current);const{editor:p}=(0,Rt.aA)(),f=r||p,m={updateDelay:o,resizeDelay:i,appendTo:s,pluginKey:u,shouldShow:l,options:a},g=(0,Lt.useRef)(m);g.current=m;const[y,v]=(0,Lt.useState)(!1),b=(0,Lt.useRef)(!0);return(0,Lt.useEffect)(()=>
2{if(null===f||void 0===f?void 0:f.isDestroyed)return;if(!f)return void console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");const t=h.current;t.style.visibility="hidden",t.style.position="absolute";const e=Ft({...g.current,editor:f,element:t});f.registerPlugin(e);const n=g.current.pluginKey;return b.current=!0,v(!0),()=>{v(!1),f.unregisterPlugin(n),window.requestAnimationFrame(()=>{t.parentNode&&t.parentNode.removeChild(t)})}},[f]),(0,Lt.useEffect)(()=>{y&&f&&!f.isDestroyed&&(b.current?b.current=!1:f.view.dispatch(f.state.tr.setMeta(u,{type:"updateOptions",options:g.current})))},[y,f,o,i,l,a,s,u]),(0,zt.createPortal)(c,h.current)})},14462(t,e,n){"use strict";n.d(e,{A:()=>Rt});var r=n(36923),o=n(31994),i=n(14973);const s=new WeakSet,l=new WeakSet;function a(t){const e=t;return s.add(e),e}function c(t){return Array.isArray(t)&&s.has(t)}function d(t){return t.flatMap(t=>null==t?[]:Array.isArray(t)&&l.has(t)&&!c(t)?d(t):[t])}function h(t,e){if("slot"===t)return 0;if(t instanceof Function){const n=t(e);return!Array.isArray(n)||c(n)||l.has(n)?n:a(n)}const{children:n,...r}=null!==e&&void 0!==e?e:{};if("svg"===t)throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");if(Array.isArray(n)){if(c(n))return a([t,r,n]);if(0===n.length)return a([t,r]);const e=d(n);return 0===e.length?a([t,r]):a([t,r,...e])}return a(void 0!==n&&null!==n?[t,r,n]:[t,r])}const u=(t,e)=>h(t,e),p=/^\s*>\s$/,f=r.bP.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML(t){let{HTMLAttributes:e}=t;return u("blockquote",{...(0,r.KV)(this.options.HTMLAttributes,e),children:u("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=null!==(n=e.parseBlockChildren)&&void 0!==n?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=[];return t.content.forEach((t,r)=>{var o,i;const s=(null!==(o=null===(i=e.renderChild)||void 0===i?void 0:i.call(e,t,r))&&void 0!==o?o:e.renderChildren([t])).split("\n").map(t=>""===t.trim()?">":`> ${t}`);n.push(s.join("\n"))}),n.join("\n>\n")},addCommands(){return{setBlockquote:()=>t=>{let{commands:e}=t;return e.wrapIn(this.name)},toggleBlockquote:()=>t=>{let{commands:e}=t;return e.toggleWrap(this.name)},unsetBlockquote:()=>t=>{let{commands:e}=t;return e.lift(this.name)}}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>((t,e)=>{var n;const{state:r}=t,{selection:s}=r;if(!s.empty)return!1;const{$from:l}=s;if(0!==l.parentOffset)return!1;const a=l.depth-1;if(a<0)return!1;const c=l.node(a),d=l.index(a);if(0===d)return!1;if(c.type===e)return t.commands.lift(e.name);const h=c.child(d-1);if(h.type!==e||!(null===(n=h.lastChild)||void 0===n?void 0:n.isTextblock))return!1;const u=l.before()-1-1;return t.commands.command(t=>{let{tr:e,dispatch:n}=t;if(!n)return!0;const r=l.parent.content,s=new o.Ji(r,0,0);return e.replace(u,l.after(),s),e.setSelection(i.U3.create(e.doc,u+r.size)),e.scrollIntoView(),n(e),!0})})(this.editor,this.type)}}
2,addInputRules(){return[(0,r.tG)({find:p,type:this.type})]}});const m=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,g=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,y=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,v=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,b=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>"normal"!==t.style.fontWeight&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML(t){let{HTMLAttributes:e}=t;return u("strong",{...(0,r.KV)(this.options.HTMLAttributes,e),children:u("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>t=>{let{commands:e}=t;return e.setMark(this.name)},toggleBold:()=>t=>{let{commands:e}=t;return e.toggleMark(this.name)},unsetBold:()=>t=>{let{commands:e}=t;return e.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.OX)({find:m,type:this.type}
2),(0,r.OX)({find:y,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:g,type:this.type}),(0,r.Zc)({find:v,type:this.type})]}});const w=t=>{const e=/`([^`]+)`(?!`)$/.exec(t);return e?e.index>0&&"`"===t[e.index-1]?null:{index:e.index,text:e[0],replaceWith:e[1]}:null},k=t=>{const e=/`([^`]+)`(?!`)/g,n=[];let r;for(;null!==(r=e.exec(t));)r.index>0&&"`"===t[r.index-1]||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},x=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML(t){let{HTMLAttributes:e}=t;return["code",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>t=>{let{commands:e}=t;return e.setMark(this.name)},toggleCode:()=>t=>{let{commands:e}=t;return e.toggleMark(this.name)},unsetCode:()=>t=>{let{commands:e}=t;return e.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}}
2,addInputRules(){return[(0,r.OX)({find:w,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:k,type:this.type})]}});const C=/^```([a-z]+)?[\s\n]$/,S=/^~~~([a-z]+)?[\s\n]$/,M=r.bP.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const r=[...(null===(e=t.firstElementChild)||void 0===e?void 0:e.classList)||[]].filter(t=>t.startsWith(n)).map(t=>t.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["pre",(0,r.KV)(this.options.HTMLAttributes,n),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return!1===(null===(n=t.raw)||void 0===n?void 0:n.startsWith("```"))&&!1===(null===(r=t.raw)||void 0===r?void 0:r.startsWith("~~~"))&&"indented"!==t.codeBlockStyle?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const o=(null===(n=t.attrs)||void 0===n?void 0:n.language)||"";return r=t.content?[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join("\n"):`\`\`\`${o}\n\n\`\`\``,r},addCommands(){return{setCodeBlock:t=>e=>{let{commands:n}=e;return n.setNode(this.name,t)},toggleCodeBlock:t=>e=>{let{commands:n}=e;return n.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())},Tab:t=>{let{editor:e}=t;var n;if(!this.options.enableTabIndentation)return!1;const r=null!==(n=this.options.tabSize)&&void 0!==n?n:4,{state:o}=e,{selection:i}=o,{$from:s,empty:l}=i;if(s.parent.type!==this.type)return!1;const a=" ".repeat(r);return l?e.commands.insertContent(a):e.commands.command(t=>{let{tr:e}=t;const{from:n,to:r}=i,s=o.doc.textBetween(n,r,"\n","\n").split("\n").map(t=>a+t).join("\n");return e.replaceWith(n,r,o.schema.text(s)),!0})},"Shift-Tab":t=>{let{editor:e}=t;var n;if(!this.options.enableTabIndentation)return!1;const r=null!==(n=this.options.tabSize)&&void 0!==n?n:4,{state:o}=e,{selection:s}=o,{$from:l,empty:a}=s;return l.parent.type===this.type&&(a?e.commands.command(t=>{let{tr:e}=t;var n;const{pos:s}=l,a=l.start(),c=l.end(),d=o.doc.textBetween(a,c,"\n","\n").split("\n");let h=0,u=0;const p=s-a;for(let r=0;r<d.length;r+=1){if(u+d[r].length>=p){h=r;break}u+=d[r].length+1}const f=(null===(n=d[h].match(/^ */))||void 0===n?void 0:n[0])||"",m=Math.min(f.length,r);if(0===m)return!0;let g=a;for(let r=0;r<h;r+=1)g+=d[r].length+1;return e.delete(g,g+m),s-g<=m&&e.setSelection(i.U3.create(e.doc,g)),!0}):e.commands.command(t=>{let{tr:e}=t;const{from:n,to:i}=s,l=o.doc.textBetween(n,i,"\n","\n").split("\n").map(t=>{var e;const n=(null===(e=t.match(/^ */))||void 0===e?void 0:e[0])||"",o=Math.min(n.length,r);return t.slice(o)}).join("\n");return e.replaceWith(n,i,o.schema.text(l)),!0}))},Enter:t=>{let{editor:e}=t;if(!this.options.exitOnTripleEnter)return!1;const{state:n}=e,{selection:r}=n,{$from:o,empty:i}=r;if(!i||o.parent.type!==this.type)return!1;const s=o.parentOffset===o.parent.nodeSize-2,l=o.parent.textContent.endsWith("\n\n");return!(!s||!l)&&e.chain().command(t=>{let{tr:e}=t;return e.delete(o.pos-2,o.pos),!0}).exitCode().run()},ArrowUp:t=>{let{editor:e}=t;if(!this.options.exitOnArrowUp)return!1;const{state:n}=e,{selection:r}=n,{$from:o,empty:i}=r;if(!i||o.parent.type!==this.type)return!1;if(0!==o.parentOffset)return!1;const s=o.before();return!(s>0)&&e.commands.insertDefaultBlock({pos:s})},ArrowDown:t=>{let{editor:e}=t;if(!this.options.exitOnArrowDown)return!1;const{state:n}=e,{selection:r,doc:o}=n,{$from:s,empty:l}=r;if(!l||s.parent.type!==this.type)return!1;if(s.parentOffset!==s.parent.nodeSize-2)return!1;const a=s.after();return void 0!==a&&(o.nodeAt(a)?e.commands.command(t=>{let{tr:e}=t;return e.setSelection(i.LN.near(o.resolve(a))),!0}):e.commands.exitCode())}}}
2,addInputRules(){return[(0,r.JJ)({find:C,type:this.type,getAttributes:t=>({language:t[1]})}),(0,r.JJ)({find:S,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new i.k_({key:new i.hs("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"),o=r?JSON.parse(r):void 0,s=null===o||void 0===o?void 0:o.mode;if(!n||!s)return!1;const{tr:l,schema:a}=t.state,c=a.text(n.replace(/\r\n?/g,"\n"));return l.replaceSelectionWith(this.type.create({language:s},c)),l.selection.$from.parent.type!==this.type&&l.setSelection(i.U3.near(l.doc.resolve(Math.max(0,l.selection.from-2)))),l.setMeta("paste",!0),t.dispatch(l),!0}}})]}});const E=r.bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n\n"):""});const A=r.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML(t){let{HTMLAttributes:e}=t;return["br",(0,r.KV)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>"  \n",parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>t=>{let{commands:e,chain:n,state:r,editor:o}=t;return e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:t,storedMarks:e}=r;if(t.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=o.extensionManager,l=e||t.$to.parentOffset&&t.$from.marks();return n().insertContent({type:this.name}).command(t=>{let{tr:e,dispatch:n}=t;if(n&&l&&i){const t=l.filter(t=>s.includes(t.type.name));e.ensureMarks(t)}return!0}).scrollIntoView().run()})])}}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});const D=r.bP.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(t){let{node:e,HTMLAttributes:n}=t;return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,(0,r.KV)(this.options.HTMLAttributes,n),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(null===(n=t.attrs)||void 0===n?void 0:n.level)?parseInt(t.attrs.level,10):1,o="#".repeat(r);return t.content?`${o} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>e=>{let{commands:n}=e;return!!this.options.levels.includes(t.level)&&n.setNode(this.name,t)},toggleHeading:t=>e=>{let{commands:n}=e;return!!this.options.levels.includes(t.level)&&n.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.JJ)({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}}
2)\\s$`),type:this.type,getAttributes:{level:t}}))}});const T=r.bP.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{},nextNodeType:"paragraph"}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML(t){let{HTMLAttributes:e}=t;return["hr",(0,r.KV)(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>t=>{let{chain:e,state:n}=t;if(!(0,r.AB)(n,n.schema.nodes[this.name]))return!1;const{selection:o}=n,{$to:s}=o,l=e();return(0,r.BQ)(o)?l.insertContentAt(s.pos,{type:this.name}):l.insertContent({type:this.name}),l.command(t=>{let{state:e,tr:n,dispatch:r}=t;if(r){const{$to:t}=n.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?n.setSelection(i.U3.create(n.doc,t.pos+1)):t.nodeAfter.isBlock?n.setSelection(i.nh.create(n.doc,t.pos)):n.setSelection(i.U3.create(n.doc,t.pos));else{const o=e.schema.nodes[this.options.nextNodeType]||t.parent.type.contentMatch.defaultType,s=null===o||void 0===o?void 0:o.create();s&&(n.insert(r,s),n.setSelection(i.U3.create(n.doc,r+1)))}n.scrollIntoView()}return!0}).run()}}},addInputRules(){return[(0,r.Ce)({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.t
2ype})]}});const O=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,N=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,_=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,R=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,L=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>"normal"!==t.style.fontStyle&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML(t){let{HTMLAttributes:e}=t;return["em",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>t=>{let{commands:e}=t;return e.setMark(this.name)},toggleItalic:()=>t=>{let{commands:e}=t;return e.toggleMark(this.name)},unsetItalic:()=>t=>{let{commands:e}=t;return e.unsetMark(this.name)}}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[(0,r.OX)({find:O,type:this.type}),(0,r.OX)({find:_,type:this.type})]}
2,addPasteRules(){return[(0,r.Zc)({find:N,type:this.type}),(0,r.Zc)({find:R,type:this.type})]}});var z=n(36553);Object.defineProperty;const I="textStyle",F=/^\s*([-+*])\s$/,$=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML(t){let{HTMLAttributes:e}=t;return["ul",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>"list"!==t.type||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>t=>{let{commands:e,chain:n}=t;return this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(I)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
2,addInputRules(){let t=(0,r.tG)({find:F,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=(0,r.tG)({find:F,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(I),editor:this.editor})),[t]}}),P=(t,e,n)=>((t,e,n,r)=>{const i=((t,e,n)=>{const{selection:r}=t;if(!r.empty)return null;const{$from:o}=r;if(!o.parent.isTextblock)return null;if(o.parentOffset!==o.parent.content.size)return null;let i=-1;for(let p=o.depth;p>0;p-=1)if(o.node(p).type.name===e){i=p;break}if(i<0)return null;const s=o.node(i),l=o.index(i);if(l+1>=s.childCount)return null;const a=s.child(l+1);if(!n.includes(a.type.name))return null;const c=t.schema.nodes[e];let d=!1;if(a.forEach(t=>{t.type===c&&t.childCount>1&&(d=!0)}),!d)return null;const h=t.doc.resolve(o.after()).nodeAfter;if(!h||!n.includes(h.type.name))return null;const u=[];return h.forEach(t=>{u.push(t)}),0===u.length?null:{listItemDepth:i,nestedList:h,nestedListPos:o.after(),insertPos:o.after(i),items:u}})(t,n,r);if(!i)return!1;const{selection:s}=t,{nestedList:l,nestedListPos:a,insertPos:c,items:d}=i,h=t.tr;h.delete(a,a+l.nodeSize);const u=h.mapping.map(c);return h.insert(u,o.FK.from(d)),h.setSelection(s.map(h.doc,h.mapping)),e&&e(h),!0})(t.state,t.view.dispatch,e,n),B=(t,e)=>r.YY.create({name:`${t}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>P(this.editor,t,e);return{Delete:n,"Mod-Delete":n}}}),H=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],j="abcdefghijklmnopqrstuvwxyz",V=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function q(t){let e=t,n="";for(const[r,o]of H)for(;e>=r;)n+=o,e-=r;return n}function U(t){return q(t).toUpperCase()}function K(t){const e=t.toLowerCase();let n=0,r=0;for(;n<e.length;){let t=!1;for(const[o,i]of H)if(e.startsWith(i,n)){r+=o,n+=i.length,t=!0;break}if(!t)return 0}return r}function W(t){if(t<=26)return j[t-1];const e=Math.floor((t-1)/26)-1,n=(t-1)%26;return e<0?j[n]:j[e]+j[n]}function J(t){if(t&&!/^\d+$/.test(t))return function(t){if(!/^[ivxlcdmIVXLCDM]+$/.test(t))return!1;const e=K(t);return!(e<=0)&&(t===t.toLowerCase()?q(e):U(e))===t}(t)?t===t.toLowerCase()?"i":"I":/^[a-z]{1,2}$/.test(t)?"a":/^[A-Z]{1,2}$/.test(t)?"A":void 0}function G(t){if(/^\d+$/.test(t))return parseInt(t,10);const e=J(t);if("i"===e||"I"===e)return K(t);if("a"===e||"A"===e){const e=function(t){const e=t.toLowerCase();if(1===e.length)return e.charCodeAt(0)-"a".charCodeAt(0)+1;if(2===e.length)return 26*(e.charCodeAt(0)-"a".charCodeAt(0)+1)+(e.charCodeAt(1)-"a".charCodeAt(0))+1;return 0}(t);return e>0?e:1}const n=parseInt(t,10);return Number.isNaN(n)?1:n}function Z(t,e){if("numeric"===t)return String(e);switch(t){case"a":return W(e);case"A":return W(e).toUpperCase();case"i":return q(e);case"I":return U(e);default:return String(e)}}function Y(t){const{type:e,start:n}=function(t){return{type:J(t),start:G(t)}}(t),r={};return e&&(r.type=e),1!==n&&(r.start=n),r}function X(t,e){return e.tokenizeInline?e.parseInline(e.tokenizeInline(t)):e.parseInline([{type:"text",raw:t,text:t}])}const Q=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML(t){let{HTMLAttributes:e}=t;return["li",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if("list_item"!==t.type)return[];const r=null!==(n=e.parseBlockChildren)&&void 0!==n?n:e.parseChildren;let o=[];if(t.tokens&&t.tokens.length>0){if(function(t){var e,n;const r=null===(e=t.tokens)||void 0===e?void 0:e[0];return Boolean(t.text&&1===(null===(n=t.tokens)||void 0===n?void 0:n.length)&&"list"===(null===r||void 0===r?void 0:r.type)&&r.ordered&&r.raw===t.text)}(t))return{type:"listItem",content:[{type:"paragraph",content:X(t.text||"",e)}]};if(t.tokens.some(t=>"paragraph"===t.type))o=r(t.tokens);else{const n=t.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(o=[{type:"paragraph",content:e.parseInline(n.tokens)}],t.tokens.length>1){const e=r(t.tokens.slice(1));o.push(...e)}}else o=r(t.tokens)}}return 0===o.length&&(o=[{type:"paragraph",content:[]}]),{type:"listItem",content:o}},renderMarkdown:(t,e,n)=>(0,r.kj)(t,e,t=>{if("bulletList"===t.parentType)return"- ";if("orderedList"===t.parentType){var e,n;const r=(null===(e=t.meta)||void 0===e||null===(e=e.parentAttrs)||void 0===e?void 0:e.start)||1;return function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:". ";const r=e+1;if(!t||"1"===t)return`${r}${n}`;switch(t){case"a":return`${W(r)}${n}`;case"A":return`${W(r).toUpperCase()}${n}`;case"i":return`${q(r)}${n}`;case"I":return`${U(r)}${n}`;default:return`${r}${n}`}}(null===(n=t.meta)||void 0===n||null===(n=n.parentAttrs)||void 0===n?void 0:n.type,r-1+(t.
2index||0),". ")}return"- "},n,{alignNestedToPrefix:"orderedList"===(null===n||void 0===n?void 0:n.parentType)}),addExtensions(){return[B(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tt=(t,e)=>{const{$from:n}=e.selection,o=(0,r.Pg)(t,e.schema);let i=null,s=n.depth,l=n.pos,a=null;for(;s>0&&null===a;)i=n.node(s),i.type===o?a=s:(s-=1,l-=1);return null===a?null:{$pos:e.doc.resolve(l),depth:a}},et=(t,e)=>{const n=tt(t,e);if(!n)return!1;const[,o]=(0,r.fl)(e,t,n.$pos.pos+4);return o},nt=(t,e,n)=>{const{$anchor:r}=t.selection,o=Math.max(0,r.pos-2),i=t.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},rt=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!(0,r.rU)(t.state,e)&&nt(t.state,0,n)){const{$anchor:n}=t.state.selection,r=t.state.doc.resolve(n.before()-1),o=[];r.node().descendants((t,n)=>{t.type.name===e&&o.push({node:t,pos:n})});const i=o.at(-1);if(!i)return!1;const s=t.state.doc.resolve(r.start()+i.pos+1);return t.chain().cut({from:n.start()-1,to:n.end()+1},s.end()).joinForward().run()}if(!(0,r.rU)(t.state,e))return!1;if(!(0,r.J_)(t.state))return!1;const{$from:o}=t.state.selection,i=o.depth-1;return o.node(i).type===t.schema.nodes[e]&&0===o.index(i)&&t.chain().liftListItem(e).run()},ot=(t,e)=>{const n=et(t,e),r=tt(t,e);return!(!r||!n)&&n>r.depth},it=(t,e)=>{const n=et(t,e),r=tt(t,e);return!(!r||!n)&&n<r.depth},st=(t,e)=>{if(!(0,r.rU)(t.state,e))return!1;if(!(0,r.QN)(t.state,e))return!1;const{selection:n}=t.state,{$from:o,$to:i}=n;return!(!n.empty&&o.sameParent(i))&&(ot(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():it(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward())},lt=(t,e,n)=>{const{state:s}=t,{selection:l}=s;if(!l.empty)return!1;const{$from:a}=l;if(0!==a.parentOffset)return!1;if(!a.parent.isTextblock)return!1;if((0,r.rU)(s,e))return!1;const c=(0,r.H_)(a);if(!c||!n.includes(c.type.name))return!1;const d=c.lastChild;if(!d||d.type.name!==e)return!1;const h=a.parent;if(!d.canReplace(d.childCount,d.childCount,o.FK.from(h)))return!1;const u=a.before(),p=a.after(),f=u-2;return t.commands.command(t=>{let{tr:e,dispatch:n}=t;return n&&(e.delete(u,p).insert(f,o.FK.from(h)),e.setSelection(i.U3.create(e.doc,f+1)),e.scrollIntoView()),!0})};const at=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:t=>{let{editor:e}=t,n=!1;return this.options.listTypes.forEach(t=>{let{itemName:r}=t;void 0!==e.state.schema.nodes[r]&&st(e,r)&&(n=!0)}),n},"Mod-Delete":t=>{let{editor:e}=t,n=!1;return this.options.listTypes.forEach(t=>{let{itemName:r}=t;void 0!==e.state.schema.nodes[r]&&st(e,r)&&(n=!0)}),n},Backspace:t=>{let{editor:e}=t,n=!1;return this.options.listTypes.forEach(t=>{let{itemName:r,wrapperNames:o}=t;void 0!==e.state.schema.nodes[r]&&rt(e,r,o)&&(n=!0)}),n},"Mod-Backspace":t=>{let{editor:e}=t,n=!1;return this.options.listTypes.forEach(t=>{let{itemName:r,wrapperNames:o}=t;void 0!==e.state.schema.nodes[r]&&rt(e,r,o)&&(n=!0)}),n},Tab:t=>{let{editor:e}=t;for(const{itemName:n,wrapperNames:r}of this.options.listTypes)if(void 0!==e.state.schema.nodes[n]&&lt(e,n,r))return!0;return!1}}}}),ct=new RegExp(`^(\\s*)(${V})([.)])\\s+(.*)$`),dt=/^\s/,ht={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function ut(t){const e=t.trimStart();return ht.bulletItem.test(e)||function(t){return ct.test(t.trimStart())}(e)||ht.heading.test(e)||ht.thematicBreak.test(e)&&!e.startsWith("-")||/^>\s?/.test(e)||ht.codeFence.test(e)||ht.blockMath.test(e)}function pt(t){return Object.values(ht).some(e=>e.test(t))}function ft(t){const e=[],n=[];let r=!1;return t.forEach(t=>{if(!r)return""===t.trim()||e.length>0&&ut(t)?(r=!0,void n.push(t)):void e.push(t);n.push(t)}),{paragraphLines:e,blockLines:n}}const mt=new RegExp(`^(${V})([.)])\\s+(.+)$`);function gt(t){const e=t.split("\n").filter(t=>t.trim().length>0);if(0===e.length)return null;const n=[];for(const r of e){const t=r.trim().match(mt);if(!t)return null;n.push({marker:t[1],content:t[3]})}return function(t){var e;if(0===t.length)return!1;const n=null!==(e=J(t[0]))&&void 0!==e?e:"numeric",r=G(t[0]);if(r<1)return!1;for(let o=0;o<t.length;o++){const e=Z(n,r+o);if(t[o]!==e)return!1}return!0}(n.map(t=>t.marker))?{type:"orderedList",attrs:Y(n[0].marker),content:n.map(t=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:t.content}]}]}))}:null}function yt(t,e,n){const r=[];let o=0;for(;o<t.length;){const i=t[o];if(i.indent===e){const{paragraphLines:s,blockLines:l}=ft(i.contentLines),a=s.join("\n").trim(),c=[];a&&c.push({type:"paragraph",raw:a,tokens:n.inlineTokens(a)});const d=l.join("\n").trim();if(d){const t=n.blockTokens(d);c.push(...t)}let h=o+1;const u=[];for(;h<t.length&&t[h].indent>e;)u.push(t[h]),h+=1;if(u.length>0){const t=yt(u,Math.min(...u.map(t=>t.indent)),n);c.push({type:"list",ordered:!0,start:u[0].number,typeMarker:u[0].type,items:t,raw:u.map(t=>t.raw).join("\n")})}r.push({type:"list_item",raw:i.raw,tokens:c}),o=h}else o+=1}return r}const vt="textStyle",bt=/^(\d+)\.\s$/;function wt(t){const e=t.match(/list-style-type\s*:\s*([^;]+)/i);if(!e)return null;switch(e[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}const kt=r.bP.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},type:{default:null,parseHTML:t=>{const e=t.getAttribute("type");if(e)return e;const n=t.getAttribute("style");if(n){const t=wt(n);if(t)return t}const r=t.querySelector("li");if(r){const t=r.getAttribute("style");if(t){const e=wt(t);if(e)return e}}return null}}}),parseHTML:()=>[{tag:"ol"}],renderHTML(t){let{HTMLAttributes:e}=t;const{start:n,type:o,...i}=e,s=(0,r.KV)(this.options.HTMLAttributes,i);return 1!==n&&(s.start=n),o&&"1"!==o&&(s.type=o),["ol",s,0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if("list"!==t.type||!t.ordered)return[];const n=t.start||1,r=t.typeMarker,o=t.items?function(t,e){return t.map(t=>{if("list_item"!==t.type)return e.parseChildren([t])[0];const n=[];return t.tokens&&t.tokens.length>0&&t.tokens.forEach(t=>{if("paragraph"===t.type||"list"===t.type||"blockquote"===t.type||"code"===t.type)n.push(...e.parseChildren([t]));else if("text"===t.type&&t.tokens){const r=e.parseChildren([t]);n.push({type:"paragraph",content:r})}else{const r=e.parseChildren([t]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})}(t.items,e):[],i={};return 1!==n&&(i.start=n),r&&(i.type=r),Object.keys(i).length>0?{type:"orderedList",attrs:i,content:o}:{type:"orderedList",content:o}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(t,e,n)=>{var r,o;const i=t.split("\n"),[s,l]=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const o=t[n],i=o.match(ct);if(!i)break;const[,s,l,a,c]=i,d=s.length,h=parseInt(l,10),u=isNaN(h)?J(l):void 0,p=isNaN(h)?G(l):h,f=[c];let m=n+1;const g=[o];let y=!1;for(;m<t.length;){const e=t[m];
2if(e.match(ct))break;if(""===e.trim())g.push(e),f.push(""),y=!0,m+=1;else if(e.match(dt)){const t=e.length-e.trimStart().length,n=d+l.length+1;g.push(e),f.push(e.slice(Math.min(t,n))),m+=1}else{if(y||pt(e))break;g.push(e),f.push(e),m+=1}}e.push({indent:d,number:p,type:u,content:f.join("\n").trim(),contentLines:f,raw:g.join("\n")}),r=m,n=m}return[e,r]}(i);if(0===s.length)return;const a=yt(s,s[0].indent,n);return 0!==a.length?{type:"list",ordered:!0,start:(null===(r=s[0])||void 0===r?void 0:r.number)||1,typeMarker:null===(o=s[0])||void 0===o?void 0:o.type,items:a,raw:i.slice(0,l).join("\n")}:void 0}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>t=>{let{commands:e,chain:n}=t;return this.options.keepAttributes?n().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes("listItem",this.editor.getAttributes(vt)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins:()=>[new i.k_({props:{handlePaste:(t,e)=>{var n,r;const o=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/html");if(null===o||void 0===o?void 0:o.trim())return!1;const i=null===(r=e.clipboardData)||void 0===r?void 0:r.getData("text/plain");if(!i)return!1;const s=gt(i);if(!s)return!1;try{const e=t.state.schema.nodeFromJSON(s),n=t.state.tr.replaceSelectionWith(e);return t.dispatch(n),!0}catch{return!1}}}})],addInputRules(){const t=(t,e)=>(!e.attrs.type||"1"===e.attrs.type)&&e.childCount+e.attrs.start===+t[1];let e=(0,r.tG)({find:bt,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:t});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:bt,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(vt)}),joinPredicate:t,editor:this.editor})),[e]}}),xt=/^\s*(\[([( |x])?\])\s$/,Ct=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return""===e||"true"===e},renderHTML:t=>({"data-checked":t.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:t=>{var e;return null!==(e=t.querySelector("div"))&&void 0!==e?e:t}}]},renderHTML(t){let{node:e,HTMLAttributes:n}=t;return["li",(0,r.KV)(this.options.HTMLAttributes,n,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const o=`- [${(null===(n=t.attrs)||void 0===n?void 0:n.checked)?"x":" "}] `;return(0,r.kj)(t,e,o)},addExtensions(){return this.options.nested?[B(this.name,[this.options.taskListTypeName])]:[]},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 t=>{let{node:e,HTMLAttributes:n,getPos:o,editor:i}=t;const s=document.createElement("li"),l=document.createElement("label"),a=document.createElement("span"),c=document.createElement("input"),d=document.createElement("div");a.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";const h=t=>{const e=((t,e,n)=>{var r;return(null===n||void 0===n||null===(r=n.checkboxLabel)||void 0===r?void 0:r.call(n,t,e))||`Task item checkbox for ${t.textContent||"empty task item"}`})(t,t.attrs.checked,this.options.a11y);c.setAttribute("aria-label",e),a.textContent=e};h(e),l.contentEditable="false",c.type="checkbox",c.addEventListener("mousedown",t=>t.preventDefault()),c.addEventListener("change",t=>{if(!i.isEditable&&!this.options.onReadOnlyChecked)return void(c.checked=!c.checked);const{checked:n}=t.target;i.isEditable&&"function"===typeof o&&i.chain().focus(void 0,{scrollIntoView:!1}).command(t=>{let{tr:e}=t;const r=o();if("number"!==typeof r)return!1;const i=e.doc.nodeAt(r);return e.setNodeMarkup(r,void 0,{...null===i||void 0===i?void 0:i.attrs,checked:n}),!0}).run(),!i.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,n)||(c.checked=!c.checked))}
2),Object.entries(this.options.HTMLAttributes).forEach(t=>{let[e,n]=t;s.setAttribute(e,n)}),s.dataset.checked=e.attrs.checked,c.checked=e.attrs.checked,l.append(c,a),s.append(l,d),Object.entries(n).forEach(t=>{let[e,n]=t;s.setAttribute(e,n)});let u=new Set(Object.keys(n));return{dom:s,contentDOM:d,update:t=>{if(t.type!==this.type)return!1;s.dataset.checked=t.attrs.checked,c.checked=t.attrs.checked,h(t);const e=i.extensionManager.attributes,n=(0,r.zU)(t,e),o=new Set(Object.keys(n)),l=this.options.HTMLAttributes;return u.forEach(t=>{o.has(t)||(t in l?s.setAttribute(t,l[t]):s.removeAttribute(t))}),Object.entries(n).forEach(t=>{let[e,n]=t;null===n||void 0===n?e in l?s.setAttribute(e,l[e]):s.removeAttribute(e):s.setAttribute(e,n)}),u=o,!0}}}},addInputRules(){return[(0,r.tG)({find:xt,type:this.type,getAttributes:t=>({checked:"x"===t[t.length-1]})})]}}),St=r.bP.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(t){let{HTMLAttributes:e}=t;return["ul",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=null===(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))||void 0===e?void 0:e.index;return void 0!==n?n:-1},tokenize(t,e,n){const o=t=>{const e=(0,r.Dd)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:o},n);if(e){const r={type:"taskList",raw:e.raw,items:e.items},o=t.slice(e.raw.length);return o.trim()?[r,...n.blockTokens(o)]:[r]}return n.blockTokens(t)},i=(0,r.Dd)(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:t=>({indentLevel:t[1].length,mainContent:t[4],checked:"x"===t[3].toLowerCase()}),createToken:(t,e)=>({type:"taskItem",raw:"",mainContent:t.mainContent,indentLevel:t.indentLevel,checked:t.checked,text:t.mainContent,tokens:n.inlineTokens(t.mainContent),nestedTokens:e}),customNestedParser:o},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>t=>{let{commands:e}=t;return e.toggleList(this.name,this.options.itemTypeName)}}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Mt=(r.YY.create({name:"listKit",addExtensions(){const t=[];return!1!==this.options.bulletList&&t.push($.configure(this.options.bulletList)),!1!==this.options.listItem&&t.push(Q.configure(this.options.listItem)),!1!==this.options.listKeymap&&t.push(at.configure(this.options.listKeymap)),!1!==this.options.orderedList&&t.push(kt.configure(this.options.orderedList)),!1!==this.options.taskItem&&t.push(Ct.configure(this.options.taskItem)),!1!==this.options.taskList&&t.push(St.configure(this.options.taskList)),t}}),"&nbsp;"),Et=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML(t){let{HTMLAttributes:e}=t;return["p",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(1===n.length&&"image"===n[0].type)return e.parseChildren([n[0]]);const r=e.parseInline(n);return 1!==n.length||"text"!==n[0].type||n[0].raw!==Mt&&n[0].text!==Mt&&"\xa0"!==n[0].raw&&"\xa0"!==n[0].text||1!==r.length||"text"!==r[0].type||r[0].text!==Mt&&"\xa0"!==r[0].text?e.createNode("paragraph",void 0,r):e.createNode("paragraph",void 0,[])},renderMarkdown:(t,e,n)=>{if(!t)return"";const r=Array.isArray(t.content)?t.content:[];if(0===r.length){var o,i;const t=Array.isArray(null===n||void 0===n||null===(o=n.previousNode)||void 0===o?void 0:o.content)?n.previousNode.content:[];return"paragraph"===(null===n||void 0===n||null===(i=n.previousNode)||void 0===i?void 0:i.type)&&0===t.length?Mt:""}return e.renderChildren(r)},addCommands(){return{setParagraph:()=>t=>{let{commands:e}=t;return e.setNode(this.name)}}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});const At=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Dt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Tt=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("line-through")&&{}}],renderHTML(t){let{HTMLAttributes:e}=t;return["s",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>
2e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>t=>{let{commands:e}=t;return e.setMark(this.name)},toggleStrike:()=>t=>{let{commands:e}=t;return e.toggleMark(this.name)},unsetStrike:()=>t=>{let{commands:e}=t;return e.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[(0,r.OX)({find:At,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:Dt,type:this.type})]}});const Ot=r.bP.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""});const Nt=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>!!t.includes("underline")&&{}}],renderHTML(t){let{HTMLAttributes:e}=t;return["u",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown:(t,e)=>`++${e.renderChildren(t)}++`,markdownTokenizer:{name:"underline",level:"inline",start:t=>t.indexOf("++"),tokenize(t,e,n){const r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!r)return;const o=r[2].trim();return{type:"underline",raw:r[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>t=>{let{commands:e}=t;return e.setMark(this.name)},toggleUnderline:()=>t=>{let{commands:e}=t;return e.toggleMark(this.name)},unsetUnderline:()=>t=>{let{commands:e}=t;return e.unsetMark(this.name)}}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});var _t=n(7682);var Rt=r.YY.create({name:"starterKit",addExtensions(){const t=[];var e,n,r,o;(!1!==this.options.bold&&t.push(b.configure(this.options.bold)),!1!==this.options.blockquote&&t.push(f.configure(this.options.blockquote)),!1!==this.options.bulletList&&t.push($.configure(this.options.bulletList)),!1!==this.options.code&&t.push(x.configure(this.options.code)),!1!==this.options.codeBlock&&t.push(M.configure(this.options.codeBlock)),!1!==this.options.document&&t.push(E.configure(this.options.document)),!1!==this.options.dropcursor&&t.push(_t.QO.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&t.push(_t.vR.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&t.push(A.configure(this.options.hardBreak)),!1!==this.options.heading&&t.push(D.configure(this.options.heading)),!1!==this.options.undoRedo&&t.push(_t.lb.configure(this.options.undoRedo)),!1!==this.options.horizontalRule&&t.push(T.configure(this.options.horizontalRule)),!1!==this.options.italic&&t.push(L.configure(this.options.italic)),!1!==this.options.listItem&&t.push(Q.configure(this.options.listItem)),!1!==this.options.listKeymap)&&t.push(at.configure(null===(e=this.options)||void 0===e?void 0:e.listKeymap));!1!==this.options.link&&t.push(z.N_.configure(null===(n=this.options)||void 0===n?void 0:n.link));(!1!==this.options.orderedList&&t.push(kt.configure(this.options.orderedList)),!1!==this.options.paragraph&&t.push(Et.configure(this.options.paragraph)),!1!==this.options.strike&&t.push(Tt.configure(this.options.strike)),!1!==this.options.text&&t.push(Ot.configure(this.options.text)),!1!==this.options.underline)&&t.push(Nt.configure(null===(r=this.options)||void 0===r?void 0:r.underline));!1!==this.options.trailingNode&&t.push(_t.JU.configure(null===(o=this.options)||void 0===o?void 0:o.trailingNode));return t}})},44120(t,e,n){"use strict";n.d(e,{K:()=>m,w:()=>f});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),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(l=1;l<=24;l++)r[l+111]="F"+l;for(l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),o[l]=String.fromCharCode(l);for(var a in r)o.hasOwnProperty(a)||(o[a]=r[a]);var c=n(14973);const d="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),h="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function u(t){let e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let l=0;l<i.length-1;l++){let t=i[l];if(/^(cmd|meta|m)$/i.test(t))o=!0;else if(/^a(lt)?$/i.test(t))e=!0;else if(/^(c|ctrl|control)$/i.test(t))n=!0;else if(/^s(hift)?$/i.test(t))r=!0;else{if(!/^mod$/i.test(t))throw new Error("Unrecognized modifier name: "+t);d?o=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function p(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];
vendor: 15,727 bytes, line 2
2return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function f(t){return new c.k_({props:{handleKeyDown:m(t)}})}function m(t){let e=function(t){let e=Object.create(null);for(let n in t)e[u(n)]=t[n];return e}(t);return function(t,n){let l,a=function(t){var e=!(i&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||s&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?o:r)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),c=e[p(a,n)];if(c&&c(t.state,t.dispatch,t))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=e[p(a,n,!1)];if(r&&r(t.state,t.dispatch,t))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(h&&n.ctrlKey&&n.altKey)&&(l=r[n.keyCode])&&l!=a){let r=e[p(l,n)];if(r&&r(t.state,t.dispatch,t))return!0}}return!1}}},31994(t,e,n){"use strict";function r(t){this.content=t}n.d(e,{S4:()=>tt,ZF:()=>dt,FK:()=>c,CU:()=>p,sX:()=>Y,bP:()=>R,u$:()=>N,vI:()=>f,Sj:()=>X,Ji:()=>m}),r.prototype={constructor:r,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var o=n&&n!=t?this.remove(n):this,i=o.find(t),s=o.content.slice();return-1==i?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new r(s)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new r(n)},addToStart:function(t,e){return new r([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new r(n)},addBefore:function(t,e,n){var o=this.remove(e),i=o.content.slice(),s=o.find(t);return i.splice(-1==s?i.length:s,0,e,n),new r(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=r.from(t)).size?new r(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=r.from(t)).size?new r(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=r.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>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){let t=o.text,e=s.text,r=0;for(;t[r]==e[r];r++)n++;return r&&r<t.length&&r<e.length&&a(t.charCodeAt(r-1))&&l(t.charCodeAt(r))&&n--,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 c=t.child(--o),d=e.child(--i),h=c.nodeSize;if(c!=d){if(!c.sameMarkup(d))return{a:n,b:r};if(c.isText&&c.text!=d.text){let t=c.text,e=d.text,o=t.length,i=e.length;for(;o>0&&i>0&&t[o-1]==e[i-1];)o--,i--,n--,r--;return o&&i&&o<t.length&&a(t.charCodeAt(o-1))&&l(t.charCodeAt(o))&&(n++,r++),{a:n,b:r}}if(c.content.size||d.content.size){let t=s(c.content,d.content,n-1,r-1);if(t)return t}n-=h,r-=h}else n-=h,r-=h}}function l(t){return t>=56320&&t<57344}function a(t){return t>=55296&&t<56320}class c{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let n=0;n<t.length;n++)this.size+=t[n].nodeSize}nodesBetween(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0;for(let i=0,s=0;s<e;i++){let l=this.content[i],a=s+l.nodeSize;if(a>t&&!1!==n(l,r+s,o||null,i)&&l.content.size){let o=s+1;l.nodesBetween(Math.max(0,t-o),Math.min(l.content.size,e-o),n,r+o)}s=a}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let o="",i=!0;return this.nodesBetween(t,e,(s,l)=>{let a=s.isText?s.text.slice(Math.max(t,l)-l,e-l):s.isLeaf?r?"function"===typeof r?r(s):r:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&a||s.isTextblock)&&n&&(i?i=!1:o+=n),o+=a},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);o<t.content.length;o++)r.push(t.content[o]);return new c(r,this.size+t.size)}cut(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size;if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let o=0,i=0;i<e;o++){let s=this.content[o],l=i+s.nodeSize;l>t&&((i<t||l>e)&&(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=l}return new c(n,r)}cutByIndex(t,e){return t==e?c.empty:0==t&&e==this.content.length?this:new c(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 c(r,o)}addToStart(t){return new c([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new c(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t){return i(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}findDiffEnd(t){return s(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.size,arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.size)}findIndex(t){if(0==t)return h(0,t);if(t==this.size)return h(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let e=0,n=0;;e++){let r=n+this.child(e).nodeSize;if(r>=t)return r==t?h(e+1,r):h(e,n);n=r}}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 c.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return c.fromArray(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return c.empty;let e,n=0;for(let r=0;r<t.length;r++){let o=t[r];n+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(e||(e=t.slice(0,r)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new c(e||t,n)}static from(t){if(!t)return c.empty;if(t instanceof c)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new c([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}c.empty=new c([],0);const d={index:0,offset:0};function h(t,e){return d.index=t,d.offset=e,d}function u(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!u(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!u(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class p{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!n&&o.type.rank>this.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;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&u(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);return n.create(e.attrs)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return p.none;if(t instanceof p)return[t];let e=t.slice();return e.sort((t,e)=>t.type.rank-e.type.rank),e}}p.none=[];class f extends Error{}class m{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=y(this.content,t+this.openStart,e,this.openStart+1,this.openEnd+1);return n&&new m(n,this.openStart,this.openEnd)}removeBetween(t,e){return new m(g(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 m.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 m(c.fromJSON(t,e.content),n,r)}static maxOpen(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new m(t,n,r)}}function g(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=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(g(i.content,e-o-1,n-o-1)))}function y(t,e,n,r,o,i){let{index:s,offset:l}=t.findIndex(e),a=t.maybeChild(s);if(l==e||a.isText)return i&&r<=0&&o<=0&&!i.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=y(a.content,e-l-1,n,0==s?r-1:0,s==t.childCount-1?o-1:0,a);return c&&t.replaceChild(s,a.copy(c))}function v(t,e,n){if(n.openStart>t.depth)throw new f("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new f("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<t.depth-n.openStart){let s=b(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:o,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)r=e.node(o).copy(c.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return S(i,M(t,o,s,e,r))}{let r=t.parent,o=r.content;return S(r,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}}return S(i,E(t,e,r))}function w(t,e){if(!e.type.compatibleContent(t.type))throw new f("Cannot join "+e.type.name+" onto "+t.type.name)}function k(t,e,n){let r=t.node(n);return w(r,e.node(n)),r}function x(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 C(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&&(x(t.nodeAfter,r),i++));for(let l=i;l<s;l++)x(o.child(l),r);e&&e.depth==n&&e.textOffset&&x(e.nodeBefore,r)}function S(t,e){if(!t.type.validContent(e))throw new f("Invalid content for node "+t.type.name);return t.copy(e)}function M(t,e,n,r,o){let i=t.depth>o&&k(t,e,o+1),s=r.depth>o&&k(n,r,o+1),l=[];return C(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(w(i,s),x(S(i,M(t,e,n,r,o+1)),l)):(i&&x(S(i,E(t,e,o+1)),l),C(e,n,o,l),s&&x(S(s,E(n,r,o+1)),l)),C(r,null,o,l),new c(l)}function E(t,e,n){let r=[];if(C(null,t,n,r),t.depth>n){x(S(k(t,e,n+1),E(t,e,n+1)),r)}return C(e,null,n,r),new c(r)}m.empty=new m(c.empty,0,0);class A{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 o=0;o<t;o++)r+=n.child(o).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return p.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this,e=arguments.length>1?arguments[1]:void 0;if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new N(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<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,o=e;for(let i=t;;){let{index:t,offset:e}=i.content.findIndex(o),s=o-e;if(n.push(i,t,r+e),!s)break;if(i=i.child(t),i.isText)break;o=s-1,r+=e+1}return new A(e,n,o)}
2static resolveCached(t,e){let n=O.get(t);if(n)for(let o=0;o<n.elts.length;o++){let t=n.elts[o];if(t.pos==e)return t}else O.set(t,n=new D);let r=n.elts[n.i]=A.resolve(t,e);return n.i=(n.i+1)%T,r}}class D{constructor(){this.elts=[],this.i=0}}const T=12,O=new WeakMap;class N{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const _=Object.create(null);class R{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p.none;this.type=t,this.attrs=e,this.marks=r,this.content=n||c.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&u(this.attrs,e||t.defaultAttrs||_)&&p.sameSet(this.marks,n||p.none)}copy(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t==this.content?this:new R(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new R(this.type,this.attrs,this.content,t)}cut(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size;return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.content.size,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t==e)return m.empty;let r=this.resolve(t),o=this.resolve(e),i=n?0:r.sharedDepth(e),s=r.start(i),l=r.node(i).content.cut(r.pos-s,o.pos-s);return new m(l,r.depth-i,o.depth-i)}replace(t,e,n){return v(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}
vendor: 44,201 bytes, line 2
2resolve(t){return A.resolveCached(this,t)}resolveNoCache(t){return A.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&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()+")"),z(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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.empty,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.childCount,i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(t).matchType(n),i=o&&o.matchFragment(this.content,e);return!!i&&i.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),I(this.type.attrs,this.attrs,"node",this.type.name);let t=p.none;for(let e=0;e<this.marks.length;e++){let n=this.marks[e];I(n.type.attrs,n.attrs,"mark",n.type.name),t=n.addToSet(t)}if(!p.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.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;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=c.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}R.prototype.text=void 0;class L extends R{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):z(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 L(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new L(this.type,this.attrs,t,this.marks)}cut(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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 z(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}function I(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${r}`);for(let o in t)t[o].validate&&t[o].validate(e[o])}class F{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new $(t,e);if(null==n.next)return F.empty;let r=P(n);n.next&&n.err("Unexpected trailing text");let o=function(t){let e=Object.create(null);return n(U(t,0));function n(r){let o=[];r.forEach(e=>{t[e].forEach(e=>{let n,{term:r,to:i}=e;if(r){for(let t=0;t<o.length;t++)o[t][0]==r&&(n=o[t][1]);U(t,i).forEach(t=>{n||o.push([r,n=[]]),-1==n.indexOf(t)&&n.push(t)})}})});let i=e[r.join(",")]=new F(r.indexOf(t.length-1)>-1);for(let t=0;t<o.length;t++){let r=o[t][1].sort(q);i.next.push({type:o[t][0],next:e[r.join(",")]||n(r)})}return i}}(function(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach(t=>t.to=e)}function i(t,e){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(i(n,e)),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(e,s),o(i(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return o(i(t.expr,e),s),o(i(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(e)].concat(i(t.expr,e));if("range"==t.type){let s=e;for(let e=0;e<t.min;e++){let e=n();o(i(t.expr,s),e),s=e}if(-1==t.max)o(i(t.expr,s),s);else for(let e=t.min;e<t.max;e++){let e=n();r(s,e),o(i(t.expr,s),e),s=e}return[r(s)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=i(t.exprs[r],e);if(r==t.exprs.length-1)return s;o(s,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],o=!t.validEnd,i=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.childCount,r=this;for(let o=e;r&&o<n;o++)r=r.matchType(t.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=[this];return function o(i,s){let l=i.matchFragment(t,n);if(l&&(!e||l.validEnd))return c.from(s.map(t=>t.createAndFill()));for(let t=0;t<i.next.length;t++){let{type:e,next:n}=i.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let t=o(n,s.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==t)return this.wrapCache[n+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<o.next.length;t++){let{type:i,next:s}=o.next[t];i.isLeaf||i.hasRequiredAttrs()||i.name in e||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),e[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(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<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let o=0;o<e.next.length;o++)r+=(o?", ":"")+e.next[o].type.name+"->"+t.indexOf(e.next[o].next);return r}).join("\n")}}F.empty=new F(!0);class ${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 P(t){let e=[];do{e.push(B(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function B(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=P(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 i in n){let t=n[i];t.isInGroup(e)&&o.push(t)}0==o.length&&t.err("No node type or group '"+e+"' found");return 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=V(t,e)}return e}function j(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function V(t,e){let n=j(t),r=n;return t.eat(",")&&(r="}"!=t.next?j(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function q(t,e){return e-t}function U(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<o.length;t++){let{term:r,to:i}=o[t];r||-1!=n.indexOf(i)||e(i)}}(e),n.sort(q)}function K(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function W(t,e){let n=Object.create(null);for(let r in t){let o=t[r],i=e&&e[r];if(void 0===i){if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}else o.validate&&o.validate(i);n[r]=i}return n}function J(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Z(t,r,e[r]);return n}class G{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=J(t,n.attrs),this.defaultAttrs=K(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==F.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:W(this.attrs,t)}create(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new R(this,this.computeAttrs(t),c.from(e),p.setFrom(n))}createChecked(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return e=c.from(e),this.checkContent(e),new R(this,this.computeAttrs(t),e,p.setFrom(n))}createAndFill(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(t=this.computeAttrs(t),e=c.from(e),e.size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),o=r&&r.fillBefore(c.empty,!0);return o?new R(this,t,e.append(o),p.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:p.none:t}static compile(t,e){let n=Object.create(null);t.forEach((t,r)=>n[t]=new G(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 o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class Z{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let r=n.split("|");return n=>{let o=null===n?"null":typeof n;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}(t,e,n.validate):n.validate}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=J(t,r.attrs),this.excluded=null;let o=K(this.attrs);this.instance=o?new p(this,o):null}create(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!t&&this.instance?this.instance:new p(this,W(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<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}excludes(t){return this.excluded.indexOf(t)>-1}}class X{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let e=this.spec={};for(let r in t)e[r]=t[r];e.nodes=o.from(t.nodes),e.marks=o.from(t.marks||{}),this.nodes=G.compile(this.spec.nodes,this),this.marks=Y.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let t=this.nodes[r],e=t.spec.content||"",o=t.spec.marks;if(t.contentMatch=n[e]||(n[e]=F.parse(e,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==o?null:o?Q(this,o.split(" ")):""!=o&&t.inlineContent?null:[]}for(let r in this.marks){let t=this.marks[r],e=t.spec.excludes;t.excluded=null==e?[t]:""==e?[]:Q(this,e.split(" "))}this.nodeFromJSON=t=>R.fromJSON(this,t),this.markFromJSON=t=>p.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof G))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 L(n,n.defaultAttrs,t,p.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function Q(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let e in t.marks){let r=t.marks[e];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class tt{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach(t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new st(this,e,!1);return n.addAll(t,p.none,e.from,e.to),n.finish()}parseSlice(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new st(this,e,!0);return n.addAll(t,p.none,e.from,e.to),m.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(lt(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(t)||r.context&&!n.matchesContext(r.context)||i.length>t.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<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let r in t.marks){let e=t.marks[r].spec.parseDOM;e&&e.forEach(t=>{n(t=at(t)),t.mark||t.ignore||t.clearMark||(t.mark=r)})}for(let r in t.nodes){let e=t.nodes[r].spec.parseDOM;e&&e.forEach(t=>{n(t=at(t)),t.node||t.ignore||t.mark||(t.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new tt(t,tt.schemaRules(t)))}}const et={address:!0,article:!0,aside:!0,blockquote:!0,body:!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},nt={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},rt={ol:!0,ul:!0};function ot(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class it{constructor(t,e,n,r,o,i){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=i,this.content=[],this.activeMarks=p.none,this.match=o||(4&i?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(c.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=c.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(c.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!et.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class st{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r,o=e.topNode,i=ot(null,e.preserveWhitespace,0)|(n?4:0);r=o?new it(o.type,o.attrs,p.none,!0,e.topMatch||o.type.contentMatch,i):new it(n?null:t.schema.topNodeType,null,p.none,!0,null,i),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,o=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:i}=this.parser;if("full"===o||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(o)if("full"===o)n=n.replace(/\r\n?/g,"\n");else if(i.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(i.linebreakReplacement.create())){let t=n.split(/\r?\n|\r/);for(let n=0;n<t.length;n++)n&&this.insertNode(i.linebreakReplacement.create(),e,!0),t[n]&&this.insertNode(i.text(t[n]),e,!/\S/.test(t[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let e=r.content[r.content.length-1],o=t.previousSibling;(!e||o&&"BR"==o.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(i.text(n),e,!/\S/.test(n)),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=this.localPreserveWS,o=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let i,s=t.nodeName.toLowerCase();rt.hasOwnProperty(s)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&rt.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));t:if(l?l.ignore:nt.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,e);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let n,r=this.needsBlock;if(et.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),n=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break t}let i=l&&l.skip?e:this.readStyles(t,e);i&&this.addAll(t,i),n&&this.sync(o),this.needsBlock=r}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,l,n,!1===l.consuming?i:void 0)}this.localPreserveWS=r}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e,!0)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let t=this.parser.matchedStyles[r],o=n.getPropertyValue(t);if(o)for(let n;;){let r=this.parser.matchStyle(t,o,this,n);if(!r)break;if(r.ignore)return null;if(e=r.clearMark?e.filter(t=>!r.clearMark(t)):e.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1!==r.consuming)break;n=r}}return e}addElementByRule(t,e,n,r){let o,i;if(e.node)if(i=this.parser.schema.nodes[e.node],i.isLeaf)this.insertNode(i.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(i,e.attrs||null,n,e.preserveWhitespace);t&&(o=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t,n,!1));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}o&&this.sync(s)&&this.open--}addAll(t,e,n,r){let o=n||0;for(let i=n?t.childNodes[n]:t.firstChild,s=null==r?null:t.childNodes[r];i!=s;i=i.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(i,e);this.findAtPoint(t,o)}findPlace(t,e,n){let r,o;for(let i=this.open,s=0;i>=0;i--){let e=this.nodes[i],l=e.findWrapping(t);if(l&&(!r||r.length>l.length+s)&&(r=l,o=e,!l.length))break;if(e.solid){if(n)break;s+=2}}if(!r)return null;this.sync(o);for(let i=0;i<r.length;i++)e=this.enterInner(r[i],null,e,!1);return e}insertNode(t,e,n){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let r=this.findPlace(t,e,n);if(r){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let n=p.none;for(let o of r.concat(t.marks))(e.type?e.type.allowsMarkType(o.type):ct(o.type,t.type))&&(n=o.addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n,r){let o=this.findPlace(t.create(e),n,!1);return o&&(o=this.enterInner(t,e,n,!0,r)),o}enterInner(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(t);let s=ot(t,o,i.options);4&i.options&&0==i.content.length&&(s|=4);let l=p.none;return n=n.filter(e=>!(i.type?i.type.allowsMarkType(e.type):ct(e.type,t))||(l=e.addToSet(l),!1)),this.nodes.push(new it(t,e,l,r,null,s)),this.open++,n}closeExtra(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.nodes.length-1;if(e>this.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;this.localPreserveWS&&(this.nodes[e].options|=1)}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<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-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 l=e[t];if(""==l){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!=l&&!t.isInGroup(l))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 e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function lt(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function at(t){let e={};for(let n in t)e[n]=t[n];return e}function ct(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<t.edgeCount;n++){let{type:r,next:o}=t.edge(n);if(r==e)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class dt{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;n||(n=ut(e).createDocumentFragment());let r=n,o=[];return t.forEach(t=>{if(o.length||t.marks.length){let n=0,i=0;for(;n<o.length&&i<t.marks.length;){let e=t.marks[i];if(this.marks[e.type.name]){if(!e.eq(o[n][0])||!1===e.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<t.marks.length;){let n=t.marks[i++],s=this.serializeMark(n,t.isInline,e);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){if(t.isText)return ut(e).createTextNode(t.text);let{dom:n,contentDOM:r}=mt(ut(e),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.marks[t.type.name];return r&&mt(ut(n),r(t,e),null,t.attrs)}static renderSpec(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return"string"==typeof e?{dom:t.createTextNode(e)}:mt(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new dt(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=ht(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return ht(t.marks)}}function ht(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ut(t){return t.document||window.document}const pt=new WeakMap;function ft(t){let e=pt.get(t);return void 0===e&&pt.set(t,e=function(t){let e=null;function n(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e<t.length;e++)n(t[e]);else for(let e in t)n(t[e])}return n(t),e}(t)),e}function mt(t,e,n,r){if(1==e.nodeType)return{dom:e};if(e.dom&&1==e.dom.nodeType)return e;let o,i=e[0];if("string"!=typeof i)throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=ft(r))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,l=i.indexOf(" ");l>0&&(n=i.slice(0,l),i=i.slice(l+1));let a=n?t.createElementNS(n,i):t.createElement(i),c=e[1],d=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){d=2;for(let t in c)if(null!=c[t]){let e=t.indexOf(" ");e>0?a.setAttributeNS(t.slice(0,e),t.slice(e+1),c[t]):"style"==t&&a.style?a.style.cssText=c[t]:a.setAttribute(t,c[t])}}for(let h=d;h<e.length;h++){let o=e[h];if(0===o){if(h<e.length-1||h>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}if("string"==typeof o)a.appendChild(t.createTextNode(o));else{let{dom:e,contentDOM:i}=mt(t,o,n,r);if(a.appendChild(e),i){if(s)throw new RangeError("Multiple content holes");s=i}}}return{dom:a,contentDOM:s}}},14973(t,e,n){"use strict";n.d(e,{$t:()=>C,LN:()=>s,U3:()=>d,hs:()=>D,i5:()=>f,k_:()=>M,nh:()=>u,yn:()=>l});var r=n(31994),o=n(77814);const i=Object.create(null);class s{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new l(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<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Ji.empty,n=e.content.lastChild,o=null;for(let r=0;r<e.openEnd;r++)o=n,n=n.lastChild;let i=t.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:c}=s[l],d=t.mapping.slice(i);t.replaceRange(d.map(a.pos),d.map(c.pos),l?r.Ji.empty:e),0==l&&y(t,i,(n?n.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],l=t.mapping.slice(n),a=l.map(i.pos),c=l.map(s.pos);o?t.deleteRange(a,c):(t.replaceRangeWith(a,c,e),y(t,n,e.isInline?-1:1))}}static findFrom(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.parent.inlineContent?new d(t):g(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let o=t.depth-1;o>=0;o--){let r=e<0?g(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):g(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(r)return r}return null}static near(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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 l{constructor(t,e){this.$from=t,this.$to=e}}let a=!1;function c(t){a||t.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class d extends s{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Ji.empty;if(super.replace(t,e),e==r.Ji.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 h(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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,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).pos<e.pos!=r<0)&&(t=e),new d(t,e)}}s.jsonID("text",d);class h{constructor(t,e){this.anchor=t,this.head=e}map(t){return new h(t.map(this.anchor),t.map(this.head))}resolve(t){return d.between(t.resolve(this.anchor),t.resolve(this.head))}}class u extends s{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),o=t.resolve(r);return n?s.near(o):new u(o)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(t){return t instanceof u&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new u(t.resolve(e.anchor))}static create(t,e){return new u(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}u.prototype.visible=!1,s.jsonID("node",u);class p{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new h(n,n):new p(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&u.isSelectable(n)?new u(e):s.near(e)}}class f extends s{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Ji.empty;if(e==r.Ji.empty){t.delete(0,t.doc.content.size);let e=s.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new f(t)}map(t){return new f(t)}eq(t){return t instanceof f}getBookmark(){return m}}s.jsonID("all",f);const m={map(){return this},resolve:t=>new f(t)};function g(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e.inlineContent)return d.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let r=e.child(s);if(r.isAtom){if(!i&&u.isSelectable(r))return u.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 y(t,e,n){let r=t.steps.length-1;if(r<e)return;let i,l=t.steps[r];(l instanceof o.Ln||l instanceof o.Wg)&&(t.mapping.maps[r].forEach((t,e,n,r)=>{null==i&&(i=r)}),t.setSelection(s.near(t.doc.resolve(i),n)))}class v extends o.dL{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.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return r.CU.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){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.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),!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.selection.to!=e+t.length||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 b(t,e){return e&&t?t.bind(e):t}class w{constructor(t,e,n){this.name=t,this.init=b(e.init,n),this.apply=b(e.apply,n)}}const k=[new w("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new w("selection",{init:(t,e)=>t.selection||s.atStart(e.doc),apply:t=>t.selection}),new w("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new w("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=k.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 w(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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let l=r?r[i].n:0,a=r?r[i].state:this,c=l<e.length&&s.spec.appendTransaction.call(s,l?e.slice(l):e,a,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<i?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:e.length})}}if(!o)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new C(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];e[o.name]=o.apply(t,this[o.name],this,e)}return e}get tr(){return new v(this)}static create(t){let e=new x(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new C(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new x(this.schema,t.plugins),n=e.fields,r=new C(e);for(let o=0;o<n.length;o++){let e=n[o].name;r[e]=this.hasOwnProperty(e)?this[e]:n[o].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map(t=>t.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.bP.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],l=s.spec.state;if(s.key==o.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(e,r))return void(i[o.name]=l.fromJSON.call(s,t,e[r],i))}i[o.name]=o.init(t,i)}}),i}}function S(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=S(o,e,{})),n[r]=o}return n}class M{constructor(t){this.spec=t,this.props={},t.props&&S(t.props,this,this.props),this.key=t.key?t.key.key:A("plugin")}getState(t){return t[this.key]}}const E=Object.create(null);function A(t){return t in E?t+"$"+ ++E[t]:(E[t]=0,t+"$")}class D{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"key";this.key=A(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}},77814(t,e,n){"use strict";n.d(e,{$L:()=>R,Ln:()=>v,N0:()=>N,Um:()=>_,Wg:()=>b,X9:()=>c,Ys:()=>m,dL:()=>J,jP:()=>C,n9:()=>T,oM:()=>S,zy:()=>D});var r=n(31994);const o=Math.pow(2,16);function i(t,e){return t+e*o}function s(t){return 65535&t}class l{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){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.ranges=t,this.inverted=e,!t.length&&a.empty)return a.empty}recover(t){let e=0,n=s(t);if(!this.inverted)for(let r=0;r<n;r++)e+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/o}(t)}mapResult(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(t,e,!1)}map(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(t,e,!0)}_map(t,e,n){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;
2for(let a=0;a<this.ranges.length;a+=3){let c=this.ranges[a]-(this.inverted?r:0);if(c>t)break;let d=this.ranges[a+o],h=this.ranges[a+s],u=c+d;if(t<=u){let o=c+r+((d?t==c?-1:t==u?1:e:e)<0?0:h);if(n)return o;let s=t==(e<0?c:u)?null:i(a/3,t-c),p=0;return d&&(p|=t==c?2:t==u?1:4,(e<0?t!=c:t!=u)&&(p|=8)),new l(o,p,s)}r+=h-d}return n?t+r:new l(t+r,0,null)}touches(t,e){let n=0,r=s(e),o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let e=this.ranges[s]-(this.inverted?n:0);if(e>t)break;let l=this.ranges[s+o];if(t<=e+l&&s==3*r)return!0;n+=this.ranges[s+i]-l}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),l=i+(this.inverted?0:o),a=this.ranges[r+e],c=this.ranges[r+n];t(s,s+a,l,l+c),o+=c-a}}invert(){return new a(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?a.empty:new a(t<0?[0,-t,0]:[0,0,t])}}a.empty=new a([]);class c{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t?t.length:0;this.mirror=e,this.from=n,this.to=r,this._maps=t||[],this.ownData=!(t||e)}get maps(){return this._maps}slice(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.maps.length;return new c(this._maps,this.mirror,t,e)}appendMap(t,e){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),null!=e&&this.setMirror(this._maps.length-1,e)}appendMapping(t){for(let e=0,n=this._maps.length;e<t._maps.length;e++){let r=t.getMirror(e);this.appendMap(t._maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this._maps.length+t._maps.length;e>=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 c;return t.appendMappingInverted(this),t}map(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this._maps[n].map(t,e);return t}mapResult(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._map(t,e,!1)}_map(t,e,n){let r=0;for(let o=this.from;o<this.to;o++){let n=this._maps[o].mapResult(t,e);if(null!=n.recover){let e=this.getMirror(o);if(null!=e&&e>o&&e<this.to){o=e,t=this._maps[e].recover(n.recover);continue}}r|=n.delInfo,t=n.pos}return n?t:new l(t,r,null)}}const d=Object.create(null);class h{getMap(){return a.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=d[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in d)throw new RangeError("Duplicate use of step JSON ID "+t);return d[t]=e,e.prototype.jsonID=t,e}}class u{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new u(t,null)}static fail(t){return new u(null,t)}static fromReplace(t,e,n,o){try{return u.ok(t.replace(e,n,o))}catch(i){if(i instanceof r.vI)return u.fail(i.message);throw i}}}function p(t,e,n){let o=[];for(let r=0;r<t.childCount;r++){let i=t.child(r);i.content.size&&(i=i.copy(p(i.content,e,i))),i.isInline&&(i=e(i,n,r)),o.push(i)}return r.FK.fromArray(o)}class f extends h{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=t.resolve(this.from),o=n.node(n.sharedDepth(this.to)),i=new r.Ji(p(e.content,(t,e)=>t.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 m(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:"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 f(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("addMark",f);class m extends h{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}
vendor: 12,536 bytes, line 2
2apply(t){let e=t.slice(this.from,this.to),n=new r.Ji(p(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 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 m(e.pos,n.pos,this.mark)}merge(t){return t instanceof m&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new m(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 m(e.from,e.to,t.markFromJSON(e.mark))}}h.jsonID("removeMark",m);class g extends h{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.Ji(r.FK.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;n<e.marks.length;n++)if(!e.marks[n].isInSet(t))return new g(this.pos,e.marks[n]);return new g(this.pos,this.mark)}}return new y(this.pos,this.mark)}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new g(e.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new g(e.pos,t.markFromJSON(e.mark))}}h.jsonID("addNodeMark",g);class y extends h{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.removeFromSet(e.marks));return u.fromReplace(t,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);return e&&this.mark.isInSet(e.marks)?new g(this.pos,this.mark):this}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new y(e.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new y(e.pos,t.markFromJSON(e.mark))}}h.jsonID("removeNodeMark",y);class v extends h{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&w(t,this.from,this.to)?u.fail("Structure replace would overwrite content"):u.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new a([this.from,this.to-this.from,this.slice.size])}invert(t){return new v(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.to,-1),n=this.from==this.to&&v.MAP_BIAS<0?e:t.mapResult(this.from,1);return n.deletedAcross&&e.deletedAcross?null:new v(n.pos,Math.max(n.pos,e.pos),this.slice,this.structure)}merge(t){if(!(t instanceof v)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?r.Ji.empty:new r.Ji(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new v(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new v(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};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)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new v(e.from,e.to,r.Ji.fromJSON(t,e.slice),!!e.structure)}}v.MAP_BIAS=1,h.jsonID("replace",v);class b extends h{constructor(t,e,n,r,o,i){let s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(t){if(this.structure&&(w(t,this.from,this.gapFrom)||w(t,this.gapTo,this.to)))return u.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return u.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?u.fromReplace(t,this.from,this.to,n):u.fail("Content does not fit in gap")}getMap(){return new a([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new b(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=this.from==this.gapFrom?e.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?n.pos:t.map(this.gapTo,1);return e.deletedAcross&&n.deletedAcross||r<e.pos||o>n.pos?null:new b(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 b(e.from,e.to,e.gapFrom,e.gapTo,r.Ji.fromJSON(t,e.slice),e.insert,!!e.structure)}}function w(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 k(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.contentMatch,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=t.doc.nodeAt(e),l=[],a=e+1;for(let c=0;c<s.childCount;c++){let e=s.child(c),d=a+e.nodeSize,h=o.matchType(e.type);if(h){o=h;for(let r=0;r<e.marks.length;r++)n.allowsMarkType(e.marks[r].type)||t.step(new m(a,d,e.marks[r]));if(i&&e.isText&&"pre"!=n.whitespace){let t,o,i=/\r?\n|\r/g;for(;t=i.exec(e.text);)o||(o=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(e.marks))),0,0)),l.push(new v(a+t.index,a+t.index+t[0].length,o))}}else l.push(new v(a,d,r.Ji.empty));a=d}if(!o.validEnd){let e=o.fillBefore(r.FK.empty,!0);t.replace(a,a,new r.Ji(e,0,0))}for(let r=l.length-1;r>=0;r--)t.step(l[r])}function x(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function C(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth,r=0,o=0;;--n){let i=t.$from.node(n),s=t.$from.index(n)+r,l=t.$to.indexAfter(n)-o;if(n<t.depth&&i.canReplace(s,l,e))return n;if(0==n||i.type.spec.isolating||!x(i,s,l))break;s&&(r=1),l<i.childCount&&(o=1)}return null}function S(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,o=function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}(t,e),i=o&&function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let a=r;l&&a<o;a++)l=l.matchType(n.child(a).type);return l&&l.validEnd?s:null}(r,e);return i?o.map(M).concat({type:e,attrs:n}).concat(i.map(M)):null}function M(t){return{type:t,attrs:null}}function E(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let o=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(o,o+1,e.type.schema.linebreakReplacement.create())}}})}function A(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+i);t.replaceWith(o,o+1,e.type.schema.text("\n"))}})}function D(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=n-2;c>i;c--,d--){let t=o.node(c),e=o.index(c);if(t.type.spec.isolating)return!1;let n=t.content.cutByIndex(e,t.childCount),i=r&&r[d+1];i&&(n=n.replaceChild(0,i.type.create(i.attrs)));let s=r&&r[d]||t;if(!t.canReplace(e+1,t.childCount)||!s.type.validContent(n))return!1}let l=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(l,l,a?a.type:o.node(i+1).type)}function T(t,e){let n=t.resolve(e),r=n.index();return O(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function O(t,e){return!(!t||!e||t.isLeaf||!function(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n)return!1;if(!t.type.allowsMarks(i.marks))return!1}return n.validEnd}(t,e))}function N(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=t.resolve(e);for(let o=r.depth;;o--){let t,i,s=r.index(o);if(o==r.depth?(t=r.nodeBefore,i=r.nodeAfter):n>0?(t=r.node(o+1),s++,i=r.node(o).maybeChild(s)):(t=r.node(o).maybeChild(s-1),i=r.node(o+1)),t&&!t.isTextblock&&O(t,i)&&r.node(o).canReplace(s,s+1))return e;if(0==o)break;e=n<0?r.before(o):r.after(o)}}function _(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(0==n.openStart&&n.size?2:1);i++)for(let t=r.depth;t>=0;t--){let e=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,n=r.index(t)+(e>0?1:0),s=r.node(t),l=!1;if(1==i)l=s.canReplace(n,n,o);else{let t=s.contentMatchAt(n).findWrapping(o.firstChild.type);l=t&&s.canReplaceWith(n,n,t[0])}if(l)return 0==e?r.pos:e<0?r.before(t+1):r.after(t+1)}return null}function R(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:r.Ji.empty;if(e==n&&!o.size)return null;let i=t.resolve(e),s=t.resolve(n);return L(i,s,o)?new v(e,n,o):new z(i,s,o).fit()}function L(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}h.jsonID("replaceAround",b);class z{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let r=0;r<=t.depth;r++){let e=t.node(r);this.frontier.push({type:e.type,match:e.contentMatchAt(t.indexAfter(r))})}for(let o=t.depth;o>0;o--)this.placed=r.FK.from(t.node(o).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,l=o.depth;for(;s&&l&&1==i.childCount;)i=i.firstChild.content,s--,l--;let a=new r.Ji(i,s,l);return t>-1?new b(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new v(n.pos,o.pos,a):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<t;n++){let o=e.firstChild;if(e.childCount>1&&(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=$(this.unplaced.content,n-1).firstChild,t=o.content):t=this.unplaced.content;let i=t.firstChild;for(let s=this.depth;s>=0;s--){let t,{type:l,match:a}=this.frontier[s],c=null;if(1==e&&(i?a.matchType(i.type)||(c=a.fillBefore(r.FK.from(i),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:n,frontierDepth:s,parent:o,inject:c};if(2==e&&i&&(t=a.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:o,wrap:t};if(o&&a.matchType(o.type))break}}}
2openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced;return!(j(t,-1)<=e)&&(this.unplaced.size>1&&j(t,1)>n&&n++,this.unplaced=new r.Ji(t,e+1,n),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,o=$(t,e);if(o.childCount<=1&&e>0){let i=t.size-e<=e+o.size;this.unplaced=new r.Ji(I(t,e-1,1),e-1,i?e-1:n)}else this.unplaced=new r.Ji(I(t,e,1),e,n)}placeNodes(t){let{sliceDepth:e,frontierDepth:n,parent:o,inject:i,wrap:s}=t;for(;this.depth>n;)this.closeFrontierNode();if(s)for(let r=0;r<s.length;r++)this.openFrontierNode(s[r]);let l=this.unplaced,a=o?o.content:l.content,c=l.openStart-e,d=0,h=[],{match:u,type:p}=this.frontier[n];if(i){for(let t=0;t<i.childCount;t++)h.push(i.child(t));u=u.matchFragment(i)}let f=a.size+e-(l.content.size-l.openEnd);for(;d<a.childCount;){let t=a.child(d),e=u.matchType(t.type);if(!e)break;d++,(d>1||0==c||t.content.size)&&(u=e,h.push(P(t.mark(p.allowedMarks(t.marks)),1==d?c:0,d==a.childCount?f:-1)))}let m=d==a.childCount;m||(f=-1),this.placed=F(this.placed,n,r.FK.from(h)),this.frontier[n].match=u,m&&f<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let r=0,g=a;r<f;r++){let t=g.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),g=t.content}this.unplaced=m?0==e?r.Ji.empty:new r.Ji(I(l.content,e-1,1),e-1,f<0?l.openEnd:e-1):new r.Ji(I(l.content,e,d),l.openStart,l.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!B(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&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<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),i=B(t,e,r,n,o);if(i){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],o=B(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=F(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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,o=this.frontier[this.depth];o.match=o.match.matchType(t),this.placed=F(this.placed,this.depth,r.FK.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(r.FK.empty,!0);t.childCount&&(this.placed=F(this.placed,this.frontier.length,t))}}function I(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(I(t.firstChild.content,e-1,n)))}function F(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(F(t.lastChild.content,e-1,n)))}function $(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function P(t,e,n){if(e<=0)return t;let o=t.content;return e>1&&(o=o.replaceChild(0,P(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.FK.empty,!0)))),t.copy(o)}function B(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 l=r.fillBefore(i.content,!0,s);return l&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,i.content,s)?l:null}function H(t){return t.spec.defining||t.spec.definingForContent}function j(t,e){for(let n=0;;n++){let r=e<0?t.firstChild:t.lastChild;if(!r||r.isAtom)return n;t=r.content}}function V(t,e,n,o,i){if(e<n){let r=t.firstChild;t=t.replaceChild(0,r.copy(V(r.content,e+1,n,o,r)))}if(e>o){let e=i.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.FK.empty,!0))}return t}function q(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let o=t.start(r);if(o<t.pos-(t.depth-r)||e.end(r)>e.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 U extends h{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 r in e.attrs)n[r]=e.attrs[r];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.Ji(r.FK.from(o),0,e.isLeaf?0:1))}getMap(){return a.empty}invert(t){return new U(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 U(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 U(e.pos,e.attr,e.value)}}
vendor: 4,145 bytes, line 2
2h.jsonID("attr",U);class K extends h{constructor(t,e){super(),this.attr=t,this.value=e}apply(t){let e=Object.create(null);for(let r in t.attrs)e[r]=t.attrs[r];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 K(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 K(e.attr,e.value)}}h.jsonID("docAttr",K);let W=class extends Error{};W=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(W.prototype=Object.create(Error.prototype)).constructor=W,W.prototype.name="TransformError";class J{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new c}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new W(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}changedRange(){let t=1e9,e=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(t=r.map(t,1),e=r.map(e,-1)),r.forEach((n,r,o,i)=>{t=Math.min(t,o),e=Math.max(e,i)})}return 1e9==t?null:{from:t,to:e}}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.Ji.empty,o=R(this.doc,t,e,n);return o&&this.step(o),this}replaceWith(t,e,n){return this.replace(t,e,new r.Ji(r.FK.from(n),0,0))}delete(t,e){return this.replace(t,e,r.Ji.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(L(i,s,o))return t.step(new v(e,n,o));let l=q(i,s);0==l[l.length-1]&&l.pop();let a=-(i.depth+1);l.unshift(a);for(let r=i.depth,p=i.pos-1;r>0;r--,p--){let t=i.node(r).type.spec;if(t.defining||t.definingAsContext||t.isolating)break;l.indexOf(r)>-1?a=r:i.before(r)==p&&l.splice(1,0,-r)}let c=l.indexOf(a),d=[],h=o.openStart;for(let r=o.content,p=0;;p++){let t=r.firstChild;if(d.push(t),p==o.openStart)break;r=t.content}for(let r=h-1;r>=0;r--){let t=d[r],e=H(t.type);if(e&&!t.sameMarkup(i.node(Math.abs(a)-1)))h=r;else if(e||!t.type.isTextblock)break}for(let p=o.openStart;p>=0;p--){let e=(p+h+1)%(o.openStart+1),a=d[e];if(a)for(let d=0;d<l.length;d++){let h=l[(d+c)%l.length],u=!0;h<0&&(u=!1,h=-h);let p=i.node(h-1),f=i.index(h-1);if(p.canReplaceWith(f,f,a.type,a.marks))return t.replace(i.before(h),u?s.after(h):n,new r.Ji(V(o.content,0,o.openStart,e),e,o.openEnd))}}let u=t.steps.length;for(let r=l.length-1;r>=0&&(t.replace(e,n,o),!(t.steps.length>u));r--){let t=l[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 o=r.depth-1;o>=0;o--){let t=r.index(o);if(r.node(o).canReplaceWith(t,t,n))return r.before(o+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let t=r.indexAfter(o);if(r.node(o).canReplaceWith(t,t,n))return r.after(o+1);if(t<r.node(o).childCount)return null}return null}(t.doc,e,o.type);null!=r&&(e=n=r)}t.replaceRange(e,n,new r.Ji(r.FK.from(o),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n);if(r.parent.isTextblock&&o.parent.isTextblock&&r.start()!=o.start()&&0==r.parentOffset&&0==o.parentOffset){let i=r.sharedDepth(n),s=!1;for(let t=r.depth;t>i;t--)r.node(t).type.spec.isolating&&(s=!0);for(let t=o.depth;t>i;t--)o.node(t).type.spec.isolating&&(s=!0);if(!s){for(let t=r.depth;t>0&&e==r.start(t);t--)e=r.before(t);for(let t=o.depth;t>0&&n==o.start(t);t--)n=o.before(t);r=t.doc.resolve(e),o=t.doc.resolve(n)}}let i=q(r,o);for(let s=0;s<i.length;s++){let e=i[s],n=s==i.length-1;
2if(n&&0==e||r.node(e).type.contentMatch.validEnd)return t.delete(r.start(e),o.end(e));if(e>0&&(n||r.node(e-1).canReplace(r.index(e-1),o.indexAfter(e-1))))return t.delete(r.before(e),o.after(e))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),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,l=o.before(s+1),a=i.after(s+1),c=l,d=a,h=r.FK.empty,u=0;for(let m=s,g=!1;m>n;m--)g||o.index(m)>0?(g=!0,h=r.FK.from(o.node(m).copy(h)),u++):c--;let p=r.FK.empty,f=0;for(let m=s,g=!1;m>n;m--)g||i.after(m+1)<i.end(m)?(g=!0,p=r.FK.from(i.node(m).copy(p)),f++):d++;t.step(new b(c,d,l,a,new r.Ji(h.append(p),u,f),h.size-u,!0))}(this,t,e),this}join(t){return function(t,e,n){let o=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-n),l=s.node().type;if(i&&l.inlineContent){let t="pre"==l.whitespace,e=!!l.contentMatch.matchType(i);t&&!e?o=!1:!t&&e&&(o=!0)}let a=t.steps.length;if(!1===o){let r=t.doc.resolve(e+n);A(t,r.node(),r.before(),a)}l.inlineContent&&k(t,e+n-1,l,s.node().contentMatchAt(s.index()),null==o);let c=t.mapping.slice(a),d=c.map(e-n);if(t.step(new v(d,c.map(e+n,-1),r.Ji.empty,!0)),!0===o){let e=t.doc.resolve(d);E(t,e.node(),e.before(),t.steps.length)}}(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),this}wrap(t,e){return function(t,e,n){let o=r.FK.empty;for(let l=n.length-1;l>=0;l--){if(o.size){let t=n[l].type.contentMatch.matchFragment(o);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=r.FK.from(n[l].type.create(n[l].attrs,o))}let i=e.start,s=e.end;t.step(new b(i,s,i,s,new r.Ji(o,0,0),n.length,!0))}(this,t,e),this}setBlockType(t){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)=>{let l="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(o,l)&&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)){let i=null;if(o.schema.linebreakReplacement){let t="pre"==o.whitespace,e=!!o.contentMatch.matchType(o.schema.linebreakReplacement);t&&!e?i=!1:!t&&e&&(i=!0)}!1===i&&A(t,e,n,s),k(t,t.mapping.slice(s).map(n,1),o,void 0,null===i);let a=t.mapping.slice(s),c=a.map(n,1),d=a.map(n+e.nodeSize,1);return t.step(new b(c,d,c+1,d-1,new r.Ji(r.FK.from(o.create(l,null,e.marks)),0,0),1,!0)),!0===i&&E(t,e,n,s),!1}})}(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,arguments.length>2?arguments[2]:void 0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:null),this}setNodeMarkup(t,e){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 l=n.create(o,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,l);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new b(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new r.Ji(r.FK.from(l),0,0),1,!0))}(this,t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,arguments.length>3?arguments[3]:void 0),this}setNodeAttribute(t,e,n){return this.step(new U(t,e,n)),this}setDocAttribute(t,e){return this.step(new K(t,e)),this}addNodeMark(t,e){return this.step(new g(t,e)),this}removeNodeMark(t,e){let n=this.doc.nodeAt(t);if(!n)throw new RangeError("No node at position "+t);if(e instanceof r.CU)e.isInSet(n.marks)&&this.step(new y(t,e));else{let r,o=n.marks,i=[];for(;r=e.isInSet(o);)i.push(new y(t,r)),o=r.removeFromSet(o);for(let t=i.length-1;t>=0;t--)this.step(i[t])}return this}split(t){return function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,i=t.doc.resolve(e),s=r.FK.empty,l=r.FK.empty;for(let a=i.depth,c=i.depth-n,d=n-1;a>c;a--,d--){s=r.FK.from(i.node(a).copy(s));let t=o&&o[d];l=r.FK.from(t?t.type.create(t.attrs,l):i.node(a).copy(l))}t.step(new v(e,e,new r.Ji(s.append(l),n,n),!0))}(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>2?arguments[2]:void 0),this}addMark(t,e,n){return function(t,e,n,r){let o,i,s=[],l=[];t.doc.nodesBetween(e,n,(t,a,c)=>{if(!t.isInline)return;let d=t.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let c=Math.max(a,e),h=Math.min(a+t.nodeSize,n),u=r.addToSet(d);for(let t=0;t<d.length;t++)d[t].isInSet(u)||(o&&o.to==c&&o.mark.eq(d[t])?o.to=h:s.push(o=new m(c,h,d[t])));i&&i.to==c?i.to=h:l.push(i=new f(c,h,r))}}
vendor: 19,058 bytes, line 2
2),s.forEach(e=>t.step(e)),l.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,l)=>{if(!t.isInline)return;s++;let a=null;if(o instanceof r.sX){let e,n=t.marks;for(;e=o.isInSet(n);)(a||(a=[])).push(e),n=e.removeFromSet(n)}else o?o.isInSet(t.marks)&&(a=[o]):a=t.marks;if(a&&a.length){let r=Math.min(l+t.nodeSize,n);for(let t=0;t<a.length;t++){let n,o=a[t];for(let t=0;t<i.length;t++){let e=i[t];e.step==s-1&&o.eq(i[t].style)&&(n=e)}n?(n.to=r,n.step=s):i.push({style:o,from:Math.max(l,e),to:r,step:s})}}}),i.forEach(e=>t.step(new m(e.from,e.to,e.style)))}(this,t,e,n),this}clearIncompatible(t,e,n){return k(this,t,e,n),this}}},77415(t,e,n){"use strict";n.d(e,{Lz:()=>wn,NZ:()=>Ke,zF:()=>Ge});var r=n(14973),o=n(31994),i=n(77814);const s=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},l=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let a=null;const c=function(t,e,n){let r=a||(a=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&&(u(t,e,n,r,-1)||u(t,e,n,r,1))},h=/^(img|br|input|textarea|hr)$/i;function u(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:p(t))){let n=t.parentNode;if(!n||!f(n)||y(t)||h.test(t.nodeName)||"false"==t.contentEditable)return!1;e=s(t)+(o<0?0:1),t=n}else{if(!f(t))return!1;{let n=t.childNodes[e+(o<0?-1:0)];if(f(n)&&"false"==n.contentEditable){if(!(null===(i=n.pmViewDesc)||void 0===i?void 0:i.ignoreForSelection))return!1;e+=o}else t=n,e=o<0?p(t):0}}}}function p(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function f(t){return 1==t.nodeType}function m(t){return 3==t.nodeType}function g(t,e){return!!e&&t.contains(f(e)?e:e.parentNode)}function y(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 v=function(t){return t.focusNode&&d(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function b(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}const w="undefined"!=typeof navigator?navigator:null,k="undefined"!=typeof document?document:null,x=w&&w.userAgent||"",C=/Edge\/(\d+)/.exec(x),S=/MSIE \d/.exec(x),M=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(x),E=!!(S||M||C),A=S?document.documentMode:M?+M[1]:C?+C[1]:0,D=!E&&/gecko\/(\d+)/i.test(x);D&&(/Firefox\/(\d+)/.exec(x)||[0,0])[1];const T=!E&&/Chrome\/(\d+)/.exec(x),O=!!T,N=T?+T[1]:0,_=!E&&!!w&&/Apple Computer/.test(w.vendor),R=_&&(/Mobile\/\w+/.test(x)||!!w&&w.maxTouchPoints>2),L=R||!!w&&/Mac/.test(w.platform),z=!!w&&/Win/.test(w.platform),I=/Android \d/.test(x),F=!!k&&"webkitFontSmoothing"in k.documentElement.style,$=F?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function P(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function B(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 j(t,e,n){if(!Z(e)&&0==e.left)return;let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(!f(s)){s=l(s);continue}let t=s==i.body,n=t?P(i):H(s),a=0,c=0;if(e.top<n.top+B(r,"top")?c=-(n.top-e.top+B(o,"top")):e.bottom>n.bottom-B(r,"bottom")&&(c=e.bottom-e.top>n.bottom-n.top?e.top+B(o,"top")-n.top:e.bottom-n.bottom+B(o,"bottom")),e.left<n.left+B(r,"left")?a=-(n.left-e.left+B(o,"left")):e.right>n.right-B(r,"right")&&(a=e.right-n.right+B(o,"right")),a||c)if(t)i.defaultView.scrollBy(a,c);else{let t=s.scrollLeft,n=s.scrollTop;c&&(s.scrollTop+=c),a&&(s.scrollLeft+=a);let r=s.scrollLeft-t,o=s.scrollTop-n;e={left:e.left-r,top:e.top-o,right:e.right-r,bottom:e.bottom-o}}let d=t?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s="absolute"==d?s.offsetParent:l(s)}}function V(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=l(r));return e}function q(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let U=null;function K(t,e){let n,r,o,i,s=2e8,l=0,a=e.top,d=e.top;for(let h=t.firstChild,u=0;h;h=h.nextSibling,u++){let t;if(f(h))t=h.getClientRects();else{if(!m(h))continue;t=c(h).getClientRects()}for(let c=0;c<t.length;c++){let p=t[c];if(p.top<=a&&p.bottom>=d){a=Math.max(p.bottom,a),d=Math.min(p.top,d);let t=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(t<s){n=h,s=t,r=t&&m(n)?{left:p.right<e.left?p.right:p.left,top:e.top}:e,f(h)&&t&&(l=u+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!o&&p.left<=e.left&&p.right>=e.left&&(o=h,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)&&(l=u+1)}}return!n&&o&&(n=o,r=i,s=0),n&&m(n)?function(t,e){let n,r=t.nodeValue.length,o=document.createRange();for(let i=0;i<r;i++){o.setEnd(t,i+1),o.setStart(t,i);let r=Y(o,1);if(r.top!=r.bottom&&W(e,r)){n={node:t,offset:i+(e.left>=(r.left+r.right)/2?1:0)};break}}return o.detach(),n||{node:t,offset:0}}(n,r):!n||s?{node:t,offset:l}:K(n,r)}function W(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function J(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=t.childNodes[i];if(f(n)){let t=n.getClientRects();for(let r=0;r<t.length;r++){let o=t[r];if(W(e,o))return J(n,e,o)}}if((i=(i+1)%r)==o)break}return t}function G(t,e){let n,r=t.dom.ownerDocument,o=0,i=function(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(p(r.offsetNode),r.offset)}}catch(r){}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(p(r.startContainer),r.startOffset)}}}(r,e.left,e.top);i&&({node:n,offset:o}=i);let s,a=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top);if(!a||!t.dom.contains(a)){let n=t.dom.getBoundingClientRect();if(!W(e,n))return null;if(a=J(t.dom,e,n),!a)return null}if(_)for(let d=a;n&&d;d=l(d))d.draggable&&(n=void 0);if(a=function(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(a,e),n){if(D&&f(n)&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let t,r=n.childNodes[o];"IMG"==r.nodeName&&(t=r.getBoundingClientRect()).right<=e.left&&t.bottom>e.top&&o++}let r;F&&o&&f(n)&&f(r=n.childNodes[o-1])&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=e.top&&o--,n==t.dom&&o==n.childNodes.length-1&&f(n.lastChild)&&e.top>n.lastChild.getBoundingClientRect().bottom?s=t.state.doc.content.size:0!=o&&f(n)&&"BR"==n.childNodes[o-1].nodeName||(s=function(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let e,n=t.docView.nearestDesc(i,!0);if(!n)return null;if(f(n.dom)&&(n.node.isBlock&&n.parent||!n.contentDOM)&&((e=n.dom.getBoundingClientRect()).width||e.height)&&(n.node.isBlock&&n.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(n.dom.nodeName)&&(!s&&e.left>r.left||e.top>r.top?o=n.posBefore:(!s&&e.right<r.left||e.bottom<r.top)&&(o=n.posAfter),s=!0),!n.contentDOM&&o<0&&!n.node.isText))return(n.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?n.posBefore:n.posAfter;i=n.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}(t,n,o,e))}null==s&&(s=function(t,e,n){let{node:r,offset:o}=K(e,n),i=-1;if(f(r)&&!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,a,e));let c=t.docView.nearestDesc(a,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Z(t){return t.top<t.bottom||t.left<t.right}function Y(t,e){let n=t.getClientRects();if(n.length){let t=n[e<0?0:n.length-1];if(Z(t))return t}return Array.prototype.find.call(n,Z)||t.getBoundingClientRect()}const X=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Q(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=F||D;if(m(r)){if(!s||!X.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let t=o,e=o,i=n<0?1:-1;return n<0&&!o?(e++,i=-1):n>=0&&o==r.nodeValue.length?(t--,i=1):n<0?t--:e++,tt(Y(c(r,t,e),i),i<0)}{let t=Y(c(r,o,o),n);if(D&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let e=Y(c(r,o-1,o-1),-1);if(e.top==t.top){let n=Y(c(r,o,o+1),-1);if(n.top!=t.top)return tt(n,n.left<e.left)}}return t}}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(null==i&&o&&(n<0||o==p(r))){let t=r.childNodes[o-1];if(f(t))return et(t.getBoundingClientRect(),!1)}if(null==i&&o<p(r)){let t=r.childNodes[o];if(f(t))return et(t.getBoundingClientRect(),!0)}return et(r.getBoundingClientRect(),n>=0)}if(null==i&&o&&(n<0||o==p(r))){let t=r.childNodes[o-1],e=m(t)?c(t,p(t)-(s?0:1)):!f(t)||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return tt(Y(e,1),!1)}if(null==i&&o<p(r)){let t=r.childNodes[o];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?m(t)?c(t,0,s?0:1):f(t)?t:null:null;if(e)return tt(Y(e,-1),!0)}return tt(Y(m(r)?c(r):r,-n),n>=0)}function tt(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 et(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 nt(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 rt=/[\u0590-\u08ac]/;let ot=null,it=null,st=!1;function lt(t,e,n){return ot==e&&it==n?st:(ot=e,it=n,st="up"==n||"down"==n?function(t,e,n){let r=e.selection,o="up"==n?r.$from:r.$to;return nt(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=Q(t,o.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(f(t))e=t.getClientRects();else{if(!m(t))continue;e=c(t,0,t.nodeValue.length).getClientRects()}for(let t=0;t<e.length;t++){let o=e[t];if(o.bottom>o.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,l=t.domSelection();return l?rt.test(r.parent.textContent)&&l.modify?nt(t,e,()=>{let{focusNode:e,focusOffset:o,anchorNode:i,anchorOffset:s}=t.domSelectionRange(),a=l.caretBidiLevel;l.modify("move",n,"character");let c=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:d,focusOffset:h}=t.domSelectionRange(),u=d&&!g(c,d)||e==d&&o==h;try{l.collapse(i,s),e&&(e!=i||o!=s)&&l.extend&&l.extend(e,o)}catch(p){}return null!=a&&(l.caretBidiLevel=a),u}):"left"==n||"backward"==n?i:s:r.pos==r.start()||r.pos==r.end()}(t,e,n))}class at{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(t){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){if(this.contentDOM&&g(this.contentDOM,t)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(t==this.dom&&this.contentDOM)r=e>s(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=!!(4&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){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[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)||(f(o)?g(o,t):o==t))return i;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let n=e;n;n=n.parent)if(n==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;e<this.children.length;e++){let r=this.children[e],o=n+r.size;if(n==t&&o!=n){for(;!r.border&&r.children.length;)for(let t=0;t<r.children.length;t++){let e=r.children[t];if(e.size){r=e;break}}return r}if(t<o)return r.descAt(t-n-r.border);n=o}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let n=0,r=0;for(let o=0;n<this.children.length;n++){let e=o+this.children[n].size;if(e>t){r=t-o;break}o=e}if(r)return this.children[n].domFromPos(r-this.children[n].border,e);for(;n>0;n--){let t=this.children[n-1];if(t.size||!(t instanceof mt||t instanceof ct&&t.side>=0))break}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<this.children.length?this.children[n]:null,t&&t.dom.parentNode!=this.contentDOM;n++,r=!1);return t&&r&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?s(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,l=0;;l++){let n=this.children[l],a=i+n.size;if(-1==r&&t<=a){let o=i+n.border;if(t>=o&&e<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,o);t=i;for(let e=l;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&&(a>e||l==this.children.length-1)){e=a;for(let t=l+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=s(n.dom);break}e+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=a}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(!f(e)||n==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=Math.min(t,e),i=Math.max(t,e);for(let s=0,d=0;s<this.children.length;s++){let l=this.children[s],a=d+l.size;if(o>d&&i<a)return l.setSelection(t-d-l.border,e-d-l.border,n,r);d=a}let l=this.domFromPos(t,t?-1:1),a=e==t?l:this.domFromPos(e,e?-1:1),c=n.root.getSelection(),h=n.domSelectionRange(),u=!1;if((D||_)&&t==e){let{node:t,offset:e}=l;if(m(t)){if(u=!(!e||"\n"!=t.nodeValue[e-1]),u&&e==t.nodeValue.length)for(let n,r=t;r;r=r.parentNode){if(n=r.nextSibling){"BR"==n.nodeName&&(l=a={node:n.parentNode,offset:s(n)+1});break}let t=r.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];u=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(D&&h.focusNode&&h.focusNode!=a.node&&f(h.focusNode)){let t=h.focusNode.childNodes[h.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||u&&_)&&d(l.node,l.offset,h.anchorNode,h.anchorOffset)&&d(a.node,a.offset,h.focusNode,h.focusOffset))return;let p=!1;if((c.extend||t==e)&&(!u||!D)){c.collapse(l.node,l.offset);try{t!=e&&c.extend(a.node,a.offset),p=!0}catch(g){}}if(!p){if(t>e){let t=l;l=a,a=t}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(l.node,l.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<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?t<=i&&e>=n:t<i&&e>n){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.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class ct extends at{constructor(t,e,n,r){let o,i=e.type.toDOM;if("function"==typeof i&&(i=i(n,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r)),!e.type.spec.raw){let t=f(i)?i:document.createElement("span");t!=i&&t.appendChild(i),t.hasAttribute("contenteditable")||(t.contentEditable="false"),t.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 ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class dt extends at{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 ht extends at{constructor(t,e,n,r,o){super(t,[],n,r),this.mark=e,this.spec=o}
vendor: 5,245 bytes, line 2
2static create(t,e,n,r){let i=r.nodeViews[e.type.name],s=i&&i(e,r,n);return s&&s.dom||(s=o.ZF.renderSpec(document,e.type.spec.toDOM(e,n),null,e.attrs)),new ht(t,e,s.dom,s.contentDOM||s.dom,s)}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.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=ht.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;e<i&&(o=Dt(o,e,i,n)),t>0&&(o=Dt(o,0,t,n));for(let s=0;s<o.length;s++)o[s].parent=r;return r.children=o,r}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class ut extends at{constructor(t,e,n,r,o,i,s){super(t,[],o,i),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s}static create(t,e,n,r,i,s){let l,a=i.nodeViews[e.type.name],c=a&&a(e,i,()=>l?l.parent?l.parent.posBeforeChild(l):void 0:s,n,r),d=c&&c.dom,h=c&&c.contentDOM;if(e.isText)if(d){if(!m(d))throw new RangeError("Text must be rendered as a DOM text node")}else d=document.createTextNode(e.text);else if(!d){let t=o.ZF.renderSpec(document,e.type.spec.toDOM(e),null,e.attrs);({dom:d,contentDOM:h}=t)}h||e.isText||"BR"==d.nodeName||(d.hasAttribute("contenteditable")||(d.contentEditable="false"),e.type.spec.draggable&&(d.draggable=!0));let u=d;return d=Ct(d,n,e),c?l=new gt(t,e,n,r,d,h||null,u,c):e.isText?new ft(t,e,n,r,d,u):new ut(t,e,n,r,d,h||null,u)}parseRule(t){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}if(!e.contentElement){let n=t&&t.find(e=>f(e)&&t.indexOf(e.parentNode)<0&&this.dom.contains(e));n?e.contentElement=n:e.getContent=()=>o.FK.empty}}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&St(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,l=i&&i.pos<0,a=new Et(this,s&&s.node,t),c=this.node.inlineContent,d=c&&this.node.isBlock;!function(t,e,n,r){let o=e.locals(t),i=0;if(0==o.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,o,e.forChild(i,s),n),i+=s.nodeSize}return}let s=0,l=[],a=null;for(let c=0;;){let d,h,u,p;for(;s<o.length&&o[s].to==i;){let t=o[s++];t.widget&&(d?(h||(h=[d])).push(t):d=t)}if(d)if(h){h.sort(At);for(let t=0;t<h.length;t++)n(h[t],c,!!a)}else n(d,c,!!a);if(a)p=-1,u=a,a=null;else{if(!(c<t.childCount))break;p=c,u=t.child(c++)}for(let t=0;t<l.length;t++)l[t].to<=i&&l.splice(t--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let f=i+u.nodeSize;if(u.isText){let t=f;s<o.length&&o[s].from<t&&(t=o[s].from);for(let e=0;e<l.length;e++)l[e].to<t&&(t=l[e].to);t<f&&(a=u.cut(t-i),u=u.cut(0,t-i),f=t,p=-1)}else for(;s<o.length&&o[s].to<f;)s++;r(u,u.isInline&&!u.isLeaf?l.filter(t=>!t.inline):l.slice(),e.forChild(i,u),p),i=f}}(this.node,this.innerDeco,(e,i,s)=>{e.spec.marks?a.syncToMarks(e.spec.marks,n,t,i):e.type.side>=0&&!s&&a.syncToMarks(i==this.node.childCount?o.CU.none:this.node.child(i).marks,n,t,i),a.placeWidget(e,t,r)},(e,o,s,h)=>{let u;a.syncToMarks(e.marks,n,t,h),d&&e.isAtom&&!e.isText&&a.addHackNode("IMG",a.top),a.findNodeMatch(e,o,s,h)||l&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(u=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(e,o,s,u,t)||a.updateNextNode(e,o,s,t,h,r)||a.addNode(e,o,s,t,r),r+=e.nodeSize,c&&(d=e.isAtom&&!e.isText)}),a.syncToMarks([],n,t,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(s&&this.protectLocalComposition(t,s),yt(this.contentDOM,this.children,t),R&&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.U3)||n<e||o>e+this.node.content.size)return null;let i=t.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let t=i.nodeValue,r=function(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let a=s.text;for(;o<t.childCount;){let e=t.child(o++);if(i+=e.nodeSize,!e.isText)break;a+=e.text}if(i>=n){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let t=l<r?a.lastIndexOf(e,r-l-1):-1;if(t>=0&&t+e.length+l>=n)return l+t;if(n==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}(this.node.content,t,n-e,o-e);return r<0?null:{node:i,pos:r,text:t}}return{node:i,pos:-1,text:""}}
vendor: 9,707 bytes, line 2
2protectLocalComposition(t,e){let{node:n,pos:r,text:o}=e;if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new dt(this,i,n,o);t.input.compositionNodes.push(s),this.children=Dt(this.children,r,r+o.length,t,s)}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(St(t,this.outerDeco))return;let e=!f(this.nodeDOM),n=this.dom;this.dom=kt(this.dom,this.nodeDOM,wt(this.outerDeco,this.node,e),wt(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){f(this.nodeDOM)&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.nodeDOM.draggable=!0))}deselectNode(){f(this.nodeDOM)&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function pt(t,e,n,r,o){Ct(r,e,t);let i=new ut(void 0,t,e,n,r,r,r);return i.contentDOM&&i.updateChildren(o,0),i}class ft extends ut{constructor(t,e,n,r,o,i){super(t,e,n,r,o,null,i)}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 ft(this.parent,r,this.outerDeco,this.innerDeco,o,o)}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}isText(t){return this.node.text==t}}class mt extends at{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 gt extends ut{constructor(t,e,n,r,o,i,s,l){super(t,e,n,r,o,i,s),this.spec=l}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){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.root):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 yt(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],l=s.dom;if(l.parentNode==t){for(;l!=r;)r=Mt(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(l,r);if(s instanceof ht){let e=r?r.previousSibling:t.lastChild;yt(s.contentDOM,s.children,n),r=e?e.nextSibling:t.firstChild}}for(;r;)r=Mt(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const vt=function(t){t&&(this.nodeName=t)};vt.prototype=Object.create(null);const bt=[new vt];function wt(t,e,n){if(0==t.length)return bt;let r=n?bt[0]:new vt,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new vt(s.nodeName));for(let t in s){let i=s[t];null!=i&&(n&&1==o.length&&o.push(r=new vt(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+i:"style"==t?r.style=(r.style?r.style+";":"")+i:"nodeName"!=t&&(r[t]=i))}}}return o}function kt(t,e,n,r){if(n==bt&&r==bt)return e;let o=e;for(let i=0;i<r.length;i++){let e=r[i],s=n[i];if(i){let n;s&&s.nodeName==e.nodeName&&o!=t&&(n=o.parentNode)&&n.nodeName.toLowerCase()==e.nodeName||(n=document.createElement(e.nodeName),n.pmIsDeco=!0,n.appendChild(o),s=bt[0]),o=n}xt(o,s||bt[0],e)}return o}function xt(t,e,n){for(let r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==o.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<o.length;e++)-1==r.indexOf(o[e])&&t.classList.add(o[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(e.style);)t.style.removeProperty(n[1])}n.style&&(t.style.cssText+=n.style)}}function Ct(t,e,n){return kt(t,t,bt,wt(e,n,!f(t)))}function St(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Mt(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Et{constructor(t,e,n){this.lock=e,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];t:for(;o>0;){let l;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof ht)){l=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 a=l.node;if(a){if(a!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n,r){let o=0,i=this.stack.length>>1,s=Math.min(i,t.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&!1!==t[o].type.spec.spanning;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<t.length;){this.stack.push(this.top,this.index+1);let o=-1,s=this.top.children.length;r<this.preMatch.index&&(s=Math.min(this.index+3,s));for(let e=this.index;e<s;e++){let n=this.top.children[e];if(n.matchesMark(t[i])&&!this.isLocked(n.dom)){o=e;break}}if(o<0&&this.index<this.top.children.length){let e=this.top.children[this.index];e instanceof ht&&3!=e.dirty&&e.mark.type==t[i].type&&e.spec.update&&!this.isLocked(e.dom)&&e.spec.update(t[i])&&(e.mark=t[i],o=this.index,this.changed=!0)}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let r=ht.create(this.top,t[i],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,i++}}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 s=this.index,l=Math.min(this.top.children.length,s+5);s<l;s++){let r=this.top.children[s];if(r.matchesNode(t,e,n)&&!this.preMatch.matched.has(r)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,e,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(t,e,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e)for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t;return-1}t=e}}updateNextNode(t,e,n,r,o,i){for(let s=this.index;s<this.top.children.length;s++){let l=this.top.children[s];if(l instanceof ut){let a=this.preMatch.matched.get(l);if(null!=a&&a!=o)return!1;let c,d=l.dom,h=this.isLocked(d)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&3!=l.dirty&&St(e,l.outerDeco));if(!h&&l.update(t,e,n,r))return this.destroyBetween(this.index,s),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(c=this.recreateWrapper(l,t,e,n,r,i)))return this.destroyBetween(this.index,s),this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,i+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,e,n,r,o,i){if(t.dirty||e.isAtom||!t.children.length||!t.node.content.eq(e.content)||!St(n,t.outerDeco)||!r.eq(t.innerDeco))return null;let s=ut.create(this.top,e,n,r,o,i);if(s.contentDOM){s.children=t.children,t.children=[];for(let t of s.children)t.parent=s}return t.destroy(),s}addNode(t,e,n,r,o){let i=ut.create(this.top,t,e,n,r,o);i.contentDOM&&i.updateChildren(r,o+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){let r=new ct(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof ht;)e=t,t=e.children[e.children.length-1];
2(!t||!(t instanceof ft)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((_||O)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new mt(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||f(t)&&t.contains(this.lock.parentNode))}}function At(t,e){return t.type.side-e.type.side}function Dt(t,e,n,r,o){let i=[];for(let s=0,l=0;s<t.length;s++){let a=t[s],c=l,d=l+=a.size;c>=n||d<=e?i.push(a):(c<e&&i.push(a.slice(0,e-c,r)),o&&(i.push(o),o=void 0),d>n&&i.push(a.slice(n-c,a.size,r)))}return i}function Tt(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.domSelectionRange(),o=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),l=i&&0==i.size,a=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(a<0)return null;let c,d,h=o.resolve(a);if(v(n)){for(c=a;i&&!i.node;)i=i.parent;if(!(i&&i.node.isAtom&&r.nh.isSelectable(i.node)&&i.parent)||i.node.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)){if(D&&"key"==e&&a>t.state.selection.to&&f(n.focusNode)&&n.focusOffset==n.focusNode.childNodes.length&&i&&i.posAtStart>t.state.selection.to)for(let t=n.focusNode;;t=t.parentNode){if("visible"!=getComputedStyle(t).overflow){d=r.LN.findFrom(o.resolve(i.posAtStart),1);break}if(t==i.dom||t.nextSibling||!t.parentNode||!f(t.parentNode))break}}else{let t=i.posBefore;d=new r.nh(a==t?h:o.resolve(t))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let e=a,r=a;for(let o=0;o<n.rangeCount;o++){let i=n.getRangeAt(o);e=Math.min(e,t.docView.posFromDOM(i.startContainer,i.startOffset,1)),r=Math.max(r,t.docView.posFromDOM(i.endContainer,i.endOffset,-1))}if(e<0)return null;[c,a]=r==t.state.selection.anchor?[r,e]:[e,r],h=o.resolve(a)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=o.resolve(c);if(!d){d=$t(t,u,h,"pointer"==e||t.state.selection.head<h.pos&&!l?1:-1)}return d}function Ot(t){return t.editable?t.hasFocus():Bt(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Nt(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.state.selection;if(It(t,n),!Ot(t))return;let o=t.input.mouseDown;if(!e&&O&&o){let e=t.domSelectionRange(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&d(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset)&&o.delaySelUpdate())return void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r="IMG"==n.nodeName;r?e.collapse(n.parentNode,s(n)+1):e.collapse(n,0);!r&&!t.state.selection.visible&&E&&A<=11&&(n.disabled=!0,n.disabled=!1)}(t);else{let o,i,{anchor:s,head:l}=n;!_t||n instanceof r.U3||(n.$from.parent.inlineContent||(o=Rt(t,n.from)),n.empty||n.$from.parent.inlineContent||(i=Rt(t,n.to))),t.docView.setSelection(s,l,t,e),_t&&(o&&zt(o),i&&zt(i)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{Ot(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")},20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}const _t=_||O&&N<63;function Rt(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;
2if(_&&o&&"false"==o.contentEditable)return Lt(o);if((!o||"false"==o.contentEditable)&&(!i||"false"==i.contentEditable)){if(o)return Lt(o);if(i)return Lt(i)}}function Lt(t){return t.contentEditable="true",_&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function zt(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function It(t,e){if(e instanceof r.nh){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Ft(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Ft(t)}function Ft(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function $t(t,e,n,o){return t.someProp("createSelectionBetween",r=>r(t,e,n))||r.U3.between(e,n,o)}function Pt(t){return!(t.editable&&!t.hasFocus())&&Bt(t)}function Bt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return g(t.dom,e.anchorNode)&&(t.editable||g(t.dom,e.focusNode))}catch(n){return!1}}function Ht(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.LN.findFrom(s,e)}function jt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Vt(t,e,n){let o=t.state.selection;if(!(o instanceof r.U3)){if(o instanceof r.nh&&o.node.isInline)return jt(t,new r.U3(e>0?o.$to:o.$from));{let n=Ht(t.state,e);return!!n&&jt(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 jt(t,new r.U3(o.$anchor,s))}if(!o.empty)return!1;if(t.endOfTextblock(e>0?"forward":"backward")){let n=Ht(t.state,e);return!!(n&&n instanceof r.nh)&&jt(t,n)}if(!(L&&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 l=e<0?i.pos-s.nodeSize:i.pos;return!!(s.isAtom||(n=t.docView.descAt(l))&&!n.contentDOM)&&(r.nh.isSelectable(s)?jt(t,new r.nh(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):jt(t,new r.U3(t.state.doc.resolve(e<0?l:l+s.nodeSize))))}}function qt(t,e){let n=t.pmViewDesc;return n?0==n.size&&(e<0||t.nextSibling||"BR"!=t.nodeName):f(t)&&"false"==t.contentEditable}function Ut(t,e){return e<0?function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,l=!1;D&&f(n)&&r<p(n)&&qt(n.childNodes[r],-1)&&(l=!0);for(;;)if(r>0){if(!f(n))break;let t=n.childNodes[r-1];if(qt(t,-1))o=n,i=--r;else{if(!m(t))break;n=t,r=n.nodeValue.length}}else{if(Kt(n))break;{let e=n.previousSibling;for(;e&&qt(e,-1);)o=n.parentNode,i=s(e),e=e.previousSibling;if(e)n=e,r=p(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}l?Wt(t,n,r):o&&Wt(t,o,i)}(t):function(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,l=p(n);for(;;)if(r<l){if(!f(n))break;if(!qt(n.childNodes[r],1))break;o=n,i=++r}else{if(Kt(n))break;{let e=n.nextSibling;for(;e&&qt(e,1);)o=e.parentNode,i=s(e)+1,e=e.nextSibling;if(e)n=e,r=0,l=p(n);else{if(n=n.parentNode,n==t.dom)break;r=l=0}}}o&&Wt(t,o,i)}(t)}function Kt(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function Wt(t,e,n){if(!m(e)){let t,r;(r=function(t,e){for(;t&&e==t.childNodes.length&&!y(t);)e=s(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(m(n))return n;if(f(n)&&"false"==n.contentEditable)break;t=n,e=0}}(e,n))?(e=r,n=0):(t=function(t,e){for(;t&&!e&&!y(t);)e=s(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(m(n))return n;if(f(n)&&"false"==n.contentEditable)break;e=(t=n).childNodes.length}}(e,n))&&(e=t,n=t.nodeValue.length)}let r=t.domSelection();if(!r)return;if(v(r)){let t=document.createRange();t.setEnd(e,n),t.setStart(e,n),r.removeAllRanges(),r.addRange(t)}
vendor: 4,729 bytes, line 2
2else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&Nt(t)},50)}function Jt(t,e){let n=t.state.doc.resolve(e);if(!O&&!z&&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&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(e<n.end()){let n=t.coordsAtPos(e+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(t.dom).direction?"rtl":"ltr"}function Gt(t,e,n){let o=t.state.selection;if(o instanceof r.U3&&!o.empty||n.indexOf("s")>-1)return!1;if(L&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Ht(t.state,e);if(n&&n instanceof r.nh)return jt(t,n)}if(!i.parent.inlineContent){let n=e<0?i:s,l=o instanceof r.i5?r.LN.near(n,e):r.LN.findFrom(n,e);return!!l&&jt(t,l)}return!1}function Zt(t,e){if(!(t.state.selection instanceof r.U3))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 Xt(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||L&&72==n&&"c"==r)return Zt(t,-1)||Ut(t,-1);if(46==n&&!e.shiftKey||L&&68==n&&"c"==r)return Zt(t,1)||Ut(t,1);if(13==n||27==n)return!0;if(37==n||L&&66==n&&"c"==r){let e=37==n?"ltr"==Jt(t,t.state.selection.from)?-1:1:-1;return Vt(t,e,r)||Ut(t,e)}if(39==n||L&&70==n&&"c"==r){let e=39==n?"ltr"==Jt(t,t.state.selection.from)?1:-1:1;return Vt(t,e,r)||Ut(t,e)}return 38==n||L&&80==n&&"c"==r?Gt(t,-1,r)||Ut(t,-1):40==n||L&&78==n&&"c"==r?function(t){if(!_||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&f(e)&&0==n&&e.firstChild&&f(e.firstChild)&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Yt(t,n,"true"),setTimeout(()=>Yt(t,n,"false"),20)}return!1}(t)||Gt(t,1,r)||Ut(t,1):r==(L?"m":"c")&&(66==n||73==n||89==n||90==n)}function Qt(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 l=t.someProp("clipboardSerializer")||o.ZF.fromSchema(t.state.schema),a=ae(),c=a.createElement("div");c.appendChild(l.serializeFragment(r,{document:a}));let d,h=c.firstChild,u=0;for(;h&&f(h)&&(d=le[h.nodeName.toLowerCase()]);){for(let t=d.length-1;t>=0;t--){let e=a.createElement(d[t]);for(;c.firstChild;)e.appendChild(c.firstChild);c.appendChild(e),u++}h=c.firstChild}return h&&f(h)&&h.setAttribute("data-pm-slice",`${i} ${s}${u?` -${u}`:""} ${JSON.stringify(n)}`),{dom:c,text:t.someProp("clipboardTextSerializer",n=>n(e,t))||e.content.textBetween(0,e.content.size,"\n\n"),slice:e}}function te(t,e,n,r,i){let s,l,a=i.parent.type.spec.code;if(!n&&!e)return null;let c=!!e&&(r||a||!n);if(c){if(t.someProp("transformPastedText",n=>{e=n(e,a||r,t)}),a)return l=new o.Ji(o.FK.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0),t.someProp("transformPasted",e=>{l=e(l,t,!0)}),l;let n=t.someProp("clipboardTextParser",n=>n(e,i,r,t));if(n)l=n;else{let n=i.marks(),{schema:r}=t.state,l=o.ZF.fromSchema(r);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(t=>{let e=s.appendChild(document.createElement("p"));t&&e.appendChild(l.serializeNode(r.text(t,n)))})}}else t.someProp("transformPastedHTML",e=>{n=e(n,t)}),s=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=ae(),o=r.body,i=/<([a-z][^>\s]+)/i.exec(t);(n=i&&le[i[1].toLowerCase()])&&(t=n.map(t=>"<"+t+">").join("")+t+n.map(t=>"</"+t+">").reverse().join(""));if(o.innerHTML=function(t){let e=window.trustedTypes;if(!e)return t;if(!ce){if(ce=e.defaultPolicy)try{return ce.createHTML(t)}catch(n){}ce=e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})}return ce.createHTML(t)}(t),n)for(let s=0;s<n.length;s++)o=o.querySelector(n[s])||o;for(let s=0;s<r.styleSheets.length;s++){let t=r.styleSheets[s];for(let e=0;e<t.rules.length;e++){let n=t.rules[e];if(n instanceof CSSStyleRule){let t=o.querySelectorAll(n.selectorText);for(let e=0;e<t.length;e++)t[e].style.cssText+=n.style.cssText}}}return o}(n),F&&function(t){let e=t.querySelectorAll(O?"span:not([class]):not
2([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&"\xa0"==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(s);let d=s&&s.querySelector("[data-pm-slice]"),h=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let o=+h[3];o>0;o--){let t=s.firstChild;for(;t&&!f(t);)t=t.nextSibling;if(!t)break;s=t}if(!l){let e=t.someProp("clipboardParser")||t.someProp("domParser")||o.S4.fromSchema(t.state.schema);l=e.parseSlice(s,{preserveWhitespace:!(!c&&!h),context:i,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||ee.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(h)l=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(a){return t}let{content:i,openStart:s,openEnd:l}=t;for(let c=n.length-2;c>=0;c-=2){let t=r.nodes[n[c]];if(!t||t.hasRequiredAttrs())break;try{i=o.FK.from(t.create(n[c+1],i))}catch(a){break}s++,l++}return new o.Ji(i,s,l)}(se(l,+h[1],+h[2]),h[4]);else if(l=o.Ji.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&&re(n,r,t,s[s.length-1],0))s[s.length-1]=e;else{s.length&&(s[s.length-1]=oe(s[s.length-1],r.length));let e=ne(t,n);s.push(e),i=i.matchType(e.type),r=n}}),s)return o.FK.from(s)}return t}(l.content,i),!0),l.openStart||l.openEnd){let t=0,e=0;for(let n=l.content.firstChild;t<l.openStart&&!n.type.spec.isolating;t++,n=n.firstChild);for(let n=l.content.lastChild;e<l.openEnd&&!n.type.spec.isolating;e++,n=n.lastChild);l=se(l,t,e)}return t.someProp("transformPasted",e=>{l=e(l,t,c)}),l}const ee=/^(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 ne(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(let r=e.length-1;r>=n;r--)t=e[r].create(null,o.FK.from(t));return t}function re(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=re(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(o.FK.from(ne(n,t,i+1))))}}function oe(t,e){if(0==e)return t;let n=t.content.replaceChild(t.childCount-1,oe(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(o.FK.empty,!0);return t.copy(n.append(r))}function ie(t,e,n,r,i,s){let l=e<0?t.firstChild:t.lastChild,a=l.content;return t.childCount>1&&(s=0),i<r-1&&(a=ie(a,e,n,r,i+1,s)),i>=n&&(a=e<0?l.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(l.contentMatchAt(l.childCount).fillBefore(o.FK.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,l.copy(a))}function se(t,e,n){return e<t.openStart&&(t=new o.Ji(ie(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new o.Ji(ie(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const le={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function ae(){return document.implementation.createHTMLDocument("title")}let ce=null;const de={},he={},ue={touchstart:!0,touchmove:!0};class pe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function fe(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function me(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>ge(t,e))})}function ge(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)})}function ye(t,e){if(!e.bubbles)return!0;
vendor: 6,102 bytes, line 2
2if(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 ve(t){return{left:t.clientX,top:t.clientY}}function be(t,e,n,r,o){if(-1==r)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,e=>s>i.depth?e(t,n,i.nodeAfter,i.before(s),o,!0):e(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function we(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function ke(t,e,n,o,i){return be(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.nh&&(n=i.node);let s=t.state.doc.resolve(e);for(let l=s.depth+1;l>0;l--){let t=l>s.depth?s.nodeAfter:s.node(l);if(r.nh.isSelectable(t)){o=n&&i.$from.depth>0&&l>=i.$from.depth&&s.before(i.$from.depth+1)==i.$from.pos?s.before(i.$from.depth):s.before(l);break}}return null!=o&&(we(t,r.nh.create(t.state.doc,o)),!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.nh.isSelectable(o))&&(we(t,new r.nh(n)),!0)}(t,n))}function xe(t,e,n,r){return be(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",n=>n(t,e,r))}function Ce(t,e,n,o){return be(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=Se(t,e,!0),i=t.state.doc;if(!o)return!1;we(t,o),o instanceof r.U3&&i.eq(t.state.doc)&&(t.input.mouseDown=new Te(t,o));return!0}(t,n,o)}function Se(t,e,n){let o=t.state.doc;if(-1==e)return o.inlineContent?r.U3.create(o,0,o.content.size):null;let i=o.resolve(e);for(let s=i.depth+1;s>0;s--){let t=s>i.depth?i.nodeAfter:i.node(s),e=i.before(s);if(t.inlineContent)return r.U3.create(o,e+1,e+1+t.content.size);if(n&&r.nh.isSelectable(t))return r.nh.create(o,e)}return null}function Me(t){return ze(t)}he.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!Oe(t)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!I||!O||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!R||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",e=>e(t,n))||Xt(t,n)?n.preventDefault():fe(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,b(13,"Enter"))),t.input.lastIOSEnter=0)},200)}},he.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},he.keypress=(t,e)=>{let n=e;if(Oe(t)||!n.charCode||n.ctrlKey&&!n.altKey||L&&n.metaKey)return;if(t.someProp("handleKeyPress",e=>e(t,n)))return void n.preventDefault();let o=t.state.selection;if(!(o instanceof r.U3)||!o.$from.sameParent(o.$to)){let e=String.fromCharCode(n.charCode),r=()=>t.state.tr.insertText(e).scrollIntoView();/[\r\n]/.test(e)||t.someProp("handleTextInput",n=>n(t,o.$from.pos,o.$to.pos,e,r))||t.dispatch(r()),n.preventDefault()}};const Ee=L?"metaKey":"ctrlKey";de.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Me(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[Ee]&&t.input.lastClick.button==n.button&&("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,button:n.button},t.input.mouseDown&&t.input.mouseDown.done();let s=t.posAtCoords(ve(n));s&&("singleClick"==i?t.input.mouseDown=new De(t,s,n,!!r):("doubleClick"==i?xe:Ce)(t,s.pos,s.inside,n)?n.preventDefault():fe(t,"pointer"))};class Ae{constructor(t){this.view=t,this.mightDrag=null,t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(t){this.done()}move(t){0==t.buttons&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class De extends Ae{constructor(t,e,n,o){let i,s;if(super(t),this.pos=e,this.event=n,this.flushed=o,this.delayedSelectionSync=!1,this.startDoc=t.state.doc,this.selectNode=!!n[Ee],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 l=o?null:n.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&f(a.nodeDOM)?a.nodeDOM:null;let{selection:c}=t.state;0==n.button&&(i.type.spec.draggable&&!1!==i.type.spec.selectable||c instanceof r.nh&&c.from<=s&&c.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!D||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()),fe(t,"pointer")}done(){super.done(),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(()=>{this.view.isDestroyed||Nt(this.view)})}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(ve(t))),this.updateAllowDefault(t),this.allowDefault||!e?fe(this.view,"pointer"):ke(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||_&&this.mightDrag&&!this.mightDrag.node.isAtom||O&&!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)?(we(this.view,r.LN.near
2(this.view.state.doc.resolve(e.pos))),t.preventDefault()):fe(this.view,"pointer")}move(t){this.updateAllowDefault(t),fe(this.view,"pointer"),super.move(t)}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return!!this.allowDefault&&(this.delayedSelectionSync=!0,!0)}}class Te extends Ae{constructor(t,e){super(t),this.startSelection=e,this.startDoc=t.state.doc}move(t){if(0==t.buttons||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc))return void this.done();t.preventDefault(),fe(this.view,"pointer");let e=this.view.posAtCoords(ve(t)),n=e&&Se(this.view,e.inside,!1);if(!n)return;let{doc:o}=this.view.state,i=this.startSelection,[s,l]=n.from<i.from?[i.to,n.from]:[i.from,n.to];we(this.view,r.U3.create(o,s,l))}}function Oe(t,e){return!!t.composing||!!(_&&Math.abs(Date.now()-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}de.touchstart=t=>{t.input.lastTouch=Date.now(),Me(t),fe(t,"pointer")},de.touchmove=t=>{t.input.lastTouch=Date.now(),fe(t,"pointer")},de.contextmenu=t=>Me(t);const Ne=I?5e3:-1;function _e(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ze(t),e))}function Re(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Le(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=function(t,e){for(;;){if(m(t)&&e)return t;if(f(t)&&e>0){if("false"==t.contentEditable)return null;e=p(t=t.childNodes[e-1])}else{if(!t.parentNode||y(t))return null;e=s(t),t=t.parentNode}}}(e.focusNode,e.focusOffset),r=function(t,e){for(;;){if(m(t)&&e<t.nodeValue.length)return t;if(f(t)&&e<t.childNodes.length){if("false"==t.contentEditable)return null;t=t.childNodes[e],e=0}else{if(!t.parentNode||y(t))return null;e=s(t)+1,t=t.parentNode}}}(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let e=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!e||!e.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let t=n.pmViewDesc;if(t&&t.isText(n.nodeValue))return r}}return n||r}function ze(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(I&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Re(t),e||t.docView&&t.docView.dirty){let n=Tt(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):!t.markCursor&&!e||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.updateState(t.state):t.dispatch(t.state.tr.deleteSelection()),!0}return!1}}he.compositionstart=he.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof r.U3&&e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(t=>!1===t.type.spec.inclusive)||O&&z&&function(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||!f(e)||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return f(r)&&"false"==r.contentEditable}(t)))t.markCursor=t.state.storedMarks||n.marks(),ze(t,!0),t.markCursor=null;else if(ze(t,!e.selection.empty),D&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelectionRange();for(let n=e.focusNode,r=e.focusOffset;n&&f(n)&&0!=r;){let e=r<0?n.lastChild:n.childNodes[r-1];if(!e)break;if(m(e)){let n=t.domSelection();n&&n.collapse(e,e.nodeValue.length);break}n=e,r=-1}}t.input.composing=!0}_e(t,Ne)},he.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Date.now(),t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,_e(t,20))};const Ie=E&&A<15||R&&$<604;function Fe(t,e,n,r,i){let s=te(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",e=>e(t,i,s||o.Ji.empty)))return!0;if(!s)return!1;let l=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(s),a=l?t.state.tr.replaceSelectionWith(l,r):t.state.tr.replaceSelection(s);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function $e(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;
vendor: 37,570 bytes, line 2
2let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}de.copy=he.cut=(t,e)=>{let n=e,r=t.state.selection,o="cut"==n.type;if(r.empty)return;let i=Ie?null:n.clipboardData,s=r.content(),{dom:l,text:a}=Qt(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):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,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},he.paste=(t,e)=>{let n=e;if(t.composing&&!I)return;let r=Ie?null:n.clipboardData,o=t.input.shiftKey&&45!=t.input.lastKeyCode;r&&Fe(t,$e(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?Fe(t,r.value,null,o,e):Fe(t,r.textContent,r.innerHTML,o,e)},50)}(t,n)};class Pe{constructor(t,e,n){this.slice=t,this.move=e,this.node=n}}const Be=L?"altKey":"ctrlKey";function He(t,e){let n;return t.someProp("dragCopies",t=>{n=n||t(e)}),null!=n?!n:!e[Be]}de.dragstart=(t,e)=>{let n=e,o=t.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i,s=t.state.selection,l=s.empty?null:t.posAtCoords(ve(n));if(l&&l.pos>=s.from&&l.pos<=(s instanceof r.nh?s.to-1:s.to));else if(o&&o.mightDrag)i=r.nh.create(t.state.doc,o.mightDrag.pos);else if(n.target&&f(n.target)){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&(i=r.nh.create(t.state.doc,e.posBefore))}let a=(i||t.state.selection).content(),{dom:c,text:d,slice:h}=Qt(t,a);(!n.dataTransfer.files.length||!O||N>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ie?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ie||n.dataTransfer.setData("text/plain",d),t.dragging=new Pe(h,He(t,n),i)},de.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},he.dragover=he.dragenter=(t,e)=>e.preventDefault(),he.drop=(t,e)=>{try{!function(t,e,n){if(!e.dataTransfer)return;let s=t.posAtCoords(ve(e));if(!s)return;let l=t.state.doc.resolve(s.pos),a=n&&n.slice;a?t.someProp("transformPasted",e=>{a=e(a,t,!1)}):a=te(t,$e(e.dataTransfer),Ie?null:e.dataTransfer.getData("text/html"),!1,l);let c=!(!n||!He(t,e));if(t.someProp("handleDrop",n=>n(t,e,a||o.Ji.empty,c)))return void e.preventDefault();if(!a)return;e.preventDefault();let d=a?(0,i.Um)(t.state.doc,l.pos,a):l.pos;null==d&&(d=l.pos);let h=t.state.tr;if(c){let{node:t}=n;t?t.replace(h):h.deleteSelection()}let u=h.mapping.map(d),p=0==a.openStart&&0==a.openEnd&&1==a.content.childCount,f=h.doc;p?h.replaceRangeWith(u,u,a.content.firstChild):h.replaceRange(u,u,a);if(h.doc.eq(f))return;let m=h.doc.resolve(u);if(p&&r.nh.isSelectable(a.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(a.content.firstChild))h.setSelection(new r.nh(m));else{let e=h.mapping.map(d);h.mapping.maps[h.mapping.maps.length-1].forEach((t,n,r,o)=>e=o),h.setSelection($t(t,m,h.doc.resolve(e)))}t.focus(),t.dispatch(h.setMeta("uiEvent","drop"))}(t,e,t.dragging)}finally{t.dragging=null}},de.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())&&Nt(t)},20))},de.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)},de.beforeinput=(t,e)=>{if(I&&"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,b(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 En in he)de[En]=he[En];function je(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 Ve{constructor(t,e){this.toDOM=t,this.spec=e||Je,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 Ke(o-n,o-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Ve&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&je(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class qe{constructor(t,e){this.attrs=t,this.spec=e||Je}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 Ke(o,i,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof qe&&je(this.attrs,t.attrs)&&je(this.spec,t.spec)}static is(t){return t.type instanceof qe}destroy(){}}class Ue{constructor(t,e){this.attrs=t,this.spec=e||Je}map(t,e,n,r){let o=t.mapResult(e.from+r,1);if(o.deleted)return null;let i=t.mapResult(e.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Ke(o.pos-n,i.pos-n,this)}valid(t,e){let n,{index:r,offset:o}=t.content.findIndex(e.from);return o==e.from&&!(n=t.child(r)).isText&&o+n.nodeSize==e.to}eq(t){return this==t||t instanceof Ue&&je(this.attrs,t.attrs)&&je(this.spec,t.spec)}destroy(){}}class Ke{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new Ke(t,e,this.type)}eq(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new Ke(t,t,new Ve(e,n))}static inline(t,e,n,r){return new Ke(t,e,new qe(n,r))}static node(t,e,n,r){return new Ke(t,e,new Ue(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof qe}get widget(){return this.type instanceof Ve}}const We=[],Je={};class Ge{constructor(t,e){this.local=t.length?t:We,this.children=e.length?e:We}static create(t,e){return e.length?en(e,t,0,Je):Ze}find(t,e,n){let r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r}findInner(t,e,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=e&&s.to>=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<e&&this.children[i+1]>t){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==Ze||0==t.maps.length?this:this.mapInner(t,e,0,0,n||Je)}mapInner(t,e,n,r,o){let i;for(let s=0;s<this.local.length;s++){let l=this.local[s].map(t,n,r);l&&l.type.valid(e,l)?(i||(i=[])).push(l):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,o,i,s){let l=t.slice();for(let c=0,d=i;c<n.maps.length;c++){let t=0;n.maps[c].forEach((e,n,r,o)=>{let i=o-r-(n-e);for(let s=0;s<l.length;s+=3){let r=l[s+1];if(r<0||e>r+d-t)continue;let o=l[s]+d-t;n>=o?l[s+1]=e<=o?-2:-1:e>=d&&i&&(l[s]+=i,l[s+1]+=i)}t+=i}),d=n.maps[c].map(d,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(-2==l[c+1]){a=!0,l[c+1]=-1;continue}let e=n.map(t[c]+i),d=e-o;if(d<0||d>=r.content.size){a=!0;continue}let h=n.map(t[c+1]+i,-1)-o,{index:u,offset:p}=r.content.findIndex(d),f=r.maybeChild(u);if(f&&p==d&&p+f.nodeSize==h){let r=l[c+2].mapInner(n,f,e+1,t[c]+i+1,s);r!=Ze?(l[c]=d,l[c+1]=h,l[c+2]=r):(l[c+1]=-2,a=!0)}else a=!0}if(a){let a=function(t,e,n,r,o,i,s){function l(t,e){for(let i=0;i<t.local.length;i++){let l=t.local[i].map(r,o,e);l?n.push(l):s.onRemove&&s.onRemove(t.local[i].spec)}for(let n=0;n<t.children.length;n+=3)l(t.children[n+2],t.children[n]+e+1)}for(let a=0;a<t.length;a+=3)-1==t[a+1]&&l(t[a+2],e[a]+i+1);return n}(l,t,e,n,o,i,s),c=en(a,r,0,s);e=c.local;for(let t=0;t<l.length;t+=3)l[t+1]<0&&(l.splice(t,3),t-=3);for(let t=0,e=0;t<c.children.length;t+=3){let n=c.children[t];for(;e<l.length&&l[e]<n;)e+=3;l.splice(e,0,c.children[t],c.children[t+1],c.children[t+2])}}return new Ge(e.sort(nn),l)}(this.children,i||[],t,e,n,r,o):i?new Ge(i.sort(nn),We):Ze}add(t,e){return e.length?this==Ze?Ge.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,o=0;t.forEach((t,i)=>{let s,l=i+n;if(s=Qe(e,t,l)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(t,s,l+1):r.splice(o,0,i,i+t.nodeSize,en(s,t,l+1,Je)),o+=3}});let i=Xe(o?tn(e):e,-n);for(let s=0;s<i.length;s++)i[s].type.valid(t,i[s])||i.splice(s--,1);return new Ge(i.length?this.local.concat(i).sort(nn):this.local,r||this.children)}remove(t){return 0==t.length||this==Ze?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let o=0;o<n.length;o+=3){let r,i=n[o]+e,s=n[o+1]+e;for(let e,n=0;n<t.length;n++)(e=t[n])&&e.from>i&&e.to<s&&(t[n]=null,(r||(r=[])).push(e));if(!r)continue;n==this.children&&(n=this.children.slice());let l=n[o+2].removeInner(r,i+1);l!=Ze?n[o+2]=l:(n.splice(o,3),o-=3)}if(r.length)for(let o,i=0;i<t.length;i++)if(o=t[i])for(let t=0;t<r.length;t++)r[t].eq(o,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Ge(r,n):Ze}forChild(t,e){if(this==Ze)return this;if(e.isLeaf)return Ge.empty;let n,r;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(n=this.children[s+2]);break}let o=t+1,i=o+e.content.size;for(let s=0;s<this.local.length;s++){let t=this.local[s];if(t.from<i&&t.to>o&&t.type instanceof qe){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let t=new Ge(r.sort(nn),We);return n?new Ye([t,n]):t}return n||Ze}eq(t){if(this==t)return!0;if(!(t instanceof Ge)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return rn(this.localsInner(t))}localsInner(t){if(this==Ze)return We;if(t.inlineContent||!this.local.some(qe.is))return this.local;let e=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof qe||e.push(this.local[n]);return e}forEachSet(t){t(this)}}Ge.empty=new Ge([],[]),Ge.removeOverlap=rn;const Ze=Ge.empty;class Ye{constructor(t){this.members=t}map(t,e){const n=this.members.map(n=>n.map(t,e,Je));return Ye.from(n)}forChild(t,e){if(e.isLeaf)return Ge.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(t,e);o!=Ze&&(o instanceof Ye?n=n.concat(o.members):n.push(o))}return Ye.from(n)}eq(t){if(!(t instanceof Ye)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(t);if(o.length)if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<o.length;t++)e.push(o[t])}else e=o}return e?rn(n?e:e.sort(nn)):We}static from(t){switch(t.length){case 0:return Ze;case 1:return t[0];default:return new Ye(t.every(t=>t instanceof Ge)?t:t.reduce((t,e)=>t.concat(e instanceof Ge?e:e.members),[]))}}forEachSet(t){for(let e=0;e<this.members.length;e++)this.members[e].forEachSet(t)}}function Xe(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new Ke(o.from+e,o.to+e,o.type))}return n}function Qe(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i,s=0;s<t.length;s++)(i=t[s])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),t[s]=null);return o}function tn(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function en(t,e,n,r){let o=[],i=!1;e.forEach((e,s)=>{let l=Qe(t,e,s+n);if(l){i=!0;let t=en(l,e,n+s+1,r);t!=Ze&&o.push(s,s+e.nodeSize,t)}});let s=Xe(i?tn(t):t,-n).sort(nn);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||o.length?new Ge(s,o):Ze}function nn(t,e){return t.from-e.from||t.to-e.to}function rn(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from!=r.from){i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),on(e,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),on(e,o+1,i.copy(r.to,i.to)))}}return e}function on(t,e,n){for(;e<t.length&&nn(n,t[e])>0;)e++;t.splice(e,0,n)}function sn(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Ze&&e.push(r)}),t.cursorWrapper&&e.push(Ge.create(t.state.doc,[t.cursorWrapper.deco])),Ye.from(e)}const ln={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},an=E&&A<=11;class cn{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 dn{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new cn,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);E&&A<=11&&e.some(t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length)?this.flushSoon():_&&t.composing&&e.some(t=>"childList"==t.type&&"TR"==t.target.nodeName)?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),an&&(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,ln)),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;e<t.length;e++)this.queue.push(t[e]);window.setTimeout(()=>this.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(Pt(this.view)){if(this.suppressingSelectionUpdates)return Nt(this.view);if(E&&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 o=t.focusNode;o;o=l(o))n.add(o);for(let o=t.anchorNode;o;o=l(o))if(n.has(o)){e=o;break}let r=e&&this.view.docView.nearestDesc(e);return r&&r.ignoreMutation({type:"selection",target:m(e)?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)&&Pt(t)&&!this.ignoreSelectionChange(n),i=-1,s=-1,l=!1,a=[];if(t.editable)for(let r=0;r<e.length;r++){let t=this.registerMutation(e[r],a);t&&(i=i<0?t.from:Math.min(t.from,i),s=s<0?t.to:Math.max(t.to,s),t.typeOver&&(l=!0))}if(a.some(t=>"BR"==t.nodeName)&&(8==t.input.lastKeyCode||46==t.input.lastKeyCode||O&&(t.composing||t.input.compositionEndedAt>Date.now()-50)&&e.some(t=>"childList"==t.type&&t.removedNodes.length))){for(let r of a)if("BR"==r.nodeName&&r.parentNode){let t=r.nextSibling;for(;t&&f(t);){if("false"==t.contentEditable){r.parentNode.removeChild(r);break}t=t.firstChild}}}else if(D&&a.length){let e=a.filter(t=>"BR"==t.nodeName);if(2==e.length){let[t,n]=e;t.parentNode&&t.parentNode.parentNode==n.parentNode?n.remove():t.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of e){let e=r.parentNode;!e||"LI"!=e.nodeName||n&&fn(t,n)==e||r.remove()}}}let c=null;i<0&&o&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&v(n)&&(c=Tt(t))&&c.eq(r.LN.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Nt(t),this.currentSelection.set(n),t.scrollToSelection()):(i>-1||o)&&(i>-1&&(t.docView.markDirty(i,s),function(t){if(hn.has(t))return;if(hn.set(t,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)){if(t.requiresGeckoHackNode=D,un)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."),un=!0}}(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,function(t,e){var n;let{focusNode:r,focusOffset:o}=t.domSelectionRange();for(let i of e)if("TR"==(null===(n=i.parentNode)||void 0===n?void 0:n.nodeName)){let e=i.nextSibling;for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.nextSibling;if(e){let n=e;for(;;){let t=n.firstChild;if(!t||!f(t)||"false"==t.contentEditable||/^(BR|IMG)$/.test(t.nodeName))break;n=t}n.insertBefore(i,n.firstChild),r==i&&t.domSelection().collapse(i,o)}else i.parentNode.removeChild(i)}}(t,a)),this.handleDOMChange(i,s,l,a),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(n)||Nt(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;n<t.addedNodes.length;n++){let r=t.addedNodes[n];e.push(r),m(r)&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,o=t.nextSibling;if(E&&A<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:i}=t.addedNodes[e];(!n||Array.prototype.indexOf.call(t.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(t.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==t.target?s(r)+1:0,l=n.localPosFromDOM(t.target,i,-1),a=o&&o.parentNode==t.target?s(o):t.target.childNodes.length;return{from:l,to:n.localPosFromDOM(t.target,a,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=t.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let hn=new WeakMap,un=!1;function pn(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return d(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function fn(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let e=t.docView.nearestDesc(n,!0);if(e&&e.node.isBlock)return n}return null}const mn=t=>e=>{let n=e.pmViewDesc;if(n)return n.parseRule(t);if("BR"==e.nodeName&&e.parentNode){if(_&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(e.parentNode.lastChild==e||_&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null},gn=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function yn(t,e,n,i,s){let l=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=Tt(t,e);if(n&&!t.state.selection.eq(n)){if(O&&I&&13===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",e=>e(t,b(13,"Enter"))))return;let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),l&&r.setMeta("composition",l),t.dispatch(r)}return}let a=t.state.doc.resolve(e),c=a.sharedDepth(n);e=a.before(c+1),n=t.state.doc.resolve(n).after(c+1);let d,h,u=t.state.selection,p=function(t,e,n,r){let i,{node:s,fromOffset:l,toOffset:a,from:c,to:d}=t.docView.parseRange(e,n),h=t.domSelectionRange(),u=h.anchorNode;if(u&&g(t.dom,u)&&(i=[{node:u,offset:h.anchorOffset}],v(h)||i.push({node:h.focusNode,offset:h.focusOffset})),O&&8===t.input.lastKeyCode)for(let o=a;o>l;o--){let t=s.childNodes[o-1],e=t.pmViewDesc;if("BR"==t.nodeName&&!e){a=o;break}if(!e||e.size)break}let p=t.state.doc,f=t.someProp("domParser")||o.S4.fromSchema(t.state.schema),m=p.resolve(c),y=null,b=f.parse(s,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:l,to:a,preserveWhitespace:"pre"!=m.parent.type.whitespace||"full",findPositions:i,ruleFromNode:mn(r),context:m});if(i&&null!=i[0].pos){let t=i[0].pos,e=i[1]&&i[1].pos;null==e&&(e=t),y={anchor:t+c,head:e+c}}return{doc:b,sel:y,from:c,to:d}}(t,e,n,s),m=t.state.doc,y=m.slice(p.from,p.to);8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(d=t.state.selection.to,h="end"):(d=t.state.selection.from,h="start"),t.input.lastKeyCode=null;let w=function(t,e,n,r,o){let i=t.findDiffStart(e,n),s=n+t.size,l=n+e.size;if(null==i)return null;let{a:a,b:c}=t.findDiffEnd(e,s,l);if("end"==o){r-=a+Math.max(0,i-Math.min(a,c))-i}if(a<i&&s<l){i-=r<=i&&r>=a?i-r:0,c=i+(c-a),a=i}else if(c<i){i-=r<=i&&r>=c?i-r:0,a=i+(a-c),c=i}return{start:i,endA:a,endB:c}}(y.content,p.doc.content,p.from,d,h);if(w&&t.input.domChangeCount++,(R&&t.input.lastIOSEnter>Date.now()-225||I)&&s.some(t=>f(t)&&!gn.test(t.nodeName))&&(!w||w.endA>=w.endB)&&t.someProp("handleKeyDown",e=>e(t,b(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(!w){if(!(i&&u instanceof r.U3&&!u.empty&&u.$head.sameParent(u.$anchor))||t.composing||p.sel&&p.sel.anchor!=p.sel.head){if(p.sel){let e=vn(t,t.state.doc,p.sel);if(e&&!e.eq(t.state.selection)){let n=t.state.tr.setSelection(e);l&&n.setMeta("composition",l),t.dispatch(n)}}return}w={start:u.from,endA:u.to,endB:u.to}}t.state.selection.from<t.state.selection.to&&w.start==w.endB&&t.state.selection instanceof r.U3&&(w.start>t.state.selection.from&&w.start<=t.state.selection.from+2&&t.state.selection.from>=p.from?w.start=t.state.selection.from:w.endA<t.state.selection.to&&w.endA>=t.state.selection.to-2&&t.state.selection.to<=p.to&&(w.endB+=t.state.selection.to-w.endA,w.endA=t.state.selection.to)),E&&A<=11&&w.endB==w.start+1&&w.endA==w.start&&w.start>p.from&&" \xa0"==p.doc.textBetween(w.start-p.from-1,w.start-p.from+1)&&(w.start--,w.endA--,w.endB--);let k=p.doc.resolveNoCache(w.start-p.from),x=p.doc.resolveNoCache(w.endB-p.from),C=m.resolve(w.start),S=k.sameParent(x)&&k.parent.inlineContent&&C.end()>=w.endA;if((R&&t.input.lastIOSEnter>Date.now()-225&&(!S||s.some(t=>"DIV"==t.nodeName||"P"==t.nodeName))||!S&&function(t,e,n){let r=0,o=0;return t.nodesBetween(e,n,(t,i)=>{t.isTextblock&&i>=e&&i<n?r++:(t.isText?/\S/.test(t.text.slice(Math.max(0,e-i),Math.min(t.nodeSize,n-i))):t.isLeaf)&&o++}),0==o&&1==r}(p.doc,k.pos,x.pos))&&t.someProp("handleKeyDown",e=>e(t,b(13,"Enter"))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>w.start&&function(t,e,n,r,o){if(n-e<=o.pos-r.pos||bn(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let t=i.nodeAfter;return null!=t&&n==e+t.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(bn(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||bn(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(m,w.start,w.endA,k,x)&&t.someProp("handleKeyDown",e=>e(t,b(8,"Backspace"))))return void(I&&O&&t.domObserver.suppressSelectionUpdates());O&&w.endB==w.start&&(t.input.lastChromeDelete=Date.now()),I&&!S&&k.start()!=x.start()&&0==x.parentOffset&&k.depth==x.depth&&p.sel&&p.sel.anchor==p.sel.head&&p.sel.head==w.endA&&(w.endB-=2,x=p.doc.resolveNoCache(w.endB-p.from),setTimeout(()=>{t.someProp("handleKeyDown",function(e){return e(t,b(13,"Enter"))})},20));let M,D=w.start,T=w.endA,N=e=>{let n=e||t.state.tr.replace(D,T,p.doc.slice(w.start-p.from,w.endB-p.from));if(p.sel){let e=vn(t,n.doc,p.sel);e&&!(O&&t.composing&&e.empty&&(w.start!=w.endB||t.input.lastChromeDelete<Date.now()-100)&&(e.head==D||e.head==n.mapping.map(T)-1)||E&&e.empty&&e.head==D)&&n.setSelection(e)}return l&&n.setMeta("composition",l),n.scrollIntoView()};if(S)if(k.pos==x.pos){E&&A<=11&&0==k.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Nt(t),20));let e=N(t.state.tr.delete(D,T)),n=m.resolve(w.start).marksAcross(m.resolve(w.endA));n&&e.ensureMarks(n),t.dispatch(e)}else if(w.endA==w.endB&&(M=function(t,e){let n,r,i,s=t.firstChild.marks,l=e.firstChild.marks,a=s,c=l;for(let o=0;o<l.length;o++)a=l[o].removeFromSet(a);for(let o=0;o<s.length;o++)c=s[o].removeFromSet(c);if(1==a.length&&0==c.length)r=a[0],n="add",i=t=>t.mark(r.addToSet(t.marks));else{if(0!=a.length||1!=c.length)return null;r=c[0],n="remove",i=t=>t.mark(r.removeFromSet(t.marks))}let d=[];for(let o=0;o<e.childCount;o++)d.push(i(e.child(o)));if(o.FK.from(d).eq(t))return{mark:r,type:n}}(k.parent.content.cut(k.parentOffset,x.parentOffset),C.parent.content.cut(C.parentOffset,w.endA-C.start())))){let e=N(t.state.tr);"add"==M.type?e.addMark(D,T,M.mark):e.removeMark(D,T,M.mark),t.dispatch(e)}else if(k.parent.child(k.index()).isText&&k.index()==x.index()-(x.textOffset?0:1)){let e=k.parent.textBetween(k.parentOffset,x.parentOffset),n=()=>N(t.state.tr.insertText(e,D,T));t.someProp("handleTextInput",r=>r(t,D,T,e,n))||t.dispatch(n())}else t.dispatch(N());else t.dispatch(N())}function vn(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:$t(t,e.resolve(n.anchor),e.resolve(n.head))}function bn(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}class wn{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 pe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(Mn),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=Cn(this),xn(this),this.nodeViews=Sn(this),this.docView=pt(this.state.doc,kn(this),sn(this),this.dom,this),this.domObserver=new dn(this,(t,e,n,r)=>yn(this,t,e,n,r)),this.domObserver.start(),function(t){for(let e in de){let n=de[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!ye(t,e)||ge(t,e)||!t.editable&&e.type in he||n(t,e)},ue[e]?{passive:!0}:void 0)}_&&t.dom.addEventListener("input",()=>null),me(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&&me(this);let e=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Mn),this.directPlugins=t.plugins),this.updateStateInner(t.state,e)}setProps(t){let e={};for(let n in this._props)e[n]=this._props[n];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&&(Re(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=Sn(this);(function(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,o=!0)}(s||e.handleDOMEvents!=this._props.handleDOMEvents)&&me(this),this.editable=Cn(this),xn(this);let l=sn(this),a=kn(this),c=r.plugins==t.plugins||r.doc.eq(t.doc)?t.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",h=o||!this.docView.matchesNode(t.doc,a,l);!h&&t.selection.eq(r.selection)||(i=!0);let u="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<Math.min(innerHeight,r.bottom);s+=5){let r=t.root.elementFromPoint(i,s);if(!r||r==t.dom||!t.dom.contains(r))continue;let l=r.getBoundingClientRect();if(l.top>=o-20){e=r,n=l.top;break}}return{refDOM:e,refTop:n,stack:V(t.dom)}}(this);if(i){this.domObserver.stop();let e=h&&(E||O)&&!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(h){let n=O?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Le(this)),!o&&this.docView.update(t.doc,a,l,this)||(this.docView.updateOuterDeco(a),this.docView.destroy(),this.docView=pt(t.doc,a,l,this.dom,this)),!n||this.trackWrites&&this.dom.contains(this.trackWrites)||(e=!0)}let n=this.input.mouseDown;e||!(n&&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)&&n.delaySelUpdate())?Nt(this,e):(It(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():u&&function(t){let{refDOM:e,refTop:n,stack:r}=t,o=e?e.getBoundingClientRect().top:0;q(r,0==o?0:o-n)}(u)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&g(this.dom,t))if(this.someProp("handleScrollToSelection",t=>t(this)));else if(this.state.selection instanceof r.nh){let e=this.docView.domAfterPos(this.state.selection.from);f(e)&&j(this,e.getBoundingClientRect(),t)}else j(this,this.coordsAtPos(this.state.selection.head,1),t);else;}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;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}updateDraggedNode(t,e){let n=t.node,o=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)o=n.from;else{let t=n.from+(this.state.doc.content.size-e.doc.content.size);(t>0&&t<this.state.doc.content.size&&this.state.doc.nodeAt(t))==n.node&&(o=t)}this.dragging=new Pe(t.slice,t.move,o<0?void 0:r.nh.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 i=0;i<this.directPlugins.length;i++){let r=this.directPlugins[i].props[t];if(null!=r&&(n=e?e(r):r))return n}let o=this.state.plugins;if(o)for(let i=0;i<o.length;i++){let r=o[i].props[t];if(null!=r&&(n=e?e(r):r))return n}}hasFocus(){if(E){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if("false"==t.contentEditable)return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(U)return t.focus(U);let e=V(t);t.focus(null==U?{get preventScroll(){return U={preventScroll:!0},!0}}:void 0),U||(U=!1,q(e,0))}(this.dom),Nt(this),this.domObserver.start()}get root(){let t=this._root;if(null==t)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return t||document}updateRoot(){this._root=null}posAtCoords(t){return G(this,t)}coordsAtPos(t){return Q(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1)}domAtPos(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,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 lt(this,e||this.state,t)}pasteHTML(t,e){return Fe(this,"",t,!1,e||new ClipboardEvent("paste"))}pasteText(t,e){return Fe(this,t,null,!0,e||new ClipboardEvent("paste"))}serializeForClipboard(t){return Qt(this,t)}destroy(){this.docView&&(!function(t){t.input.mouseDown&&t.input.mouseDown.done(),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,[],sn(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,a=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){ge(t,e)||!de[e.type]||!t.editable&&e.type in he||de[e.type](t,e)}(this,t)}domSelectionRange(){let t=!1!==this.dom.isConnected&&this.domSelection();return t?_&&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,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return pn(t,n)}let n;function r(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?pn(t,n):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function kn(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"),[Ke.node(0,t.state.doc.content.size,e)]}function xn(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:Ke.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Cn(t){return!t.someProp("editable",e=>!1===e(t.state))}function Sn(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 Mn(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")}wn.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}},87179(t,e,n){"use strict";n.d(e,{o:()=>vr});var r={};n.r(r),n.d(r,{decode:()=>h,encode:()=>f,format:()=>m,parse:()=>D});var o={};n.r(o),n.d(o,{Any:()=>N,Cc:()=>_,Cf:()=>R,P:()=>T,S:()=>O,Z:()=>L});var i={};n.r(i),n.d(i,{arrayReplaceAt:()=>nt,asciiTrim:()=>Mt,assign:()=>et,escapeHtml:()=>mt,escapeRE:()=>yt,fromCodePoint:()=>
vendor: 7,117 bytes, line 2
2ot,has:()=>tt,isMdAsciiPunct:()=>xt,isPunctChar:()=>wt,isPunctCharCode:()=>kt,isSpace:()=>vt,isString:()=>X,isValidEntityCode:()=>rt,isWhiteSpace:()=>bt,lib:()=>Et,normalizeReference:()=>Ct,unescapeAll:()=>dt,unescapeMd:()=>ct});var s={};n.r(s),n.d(s,{parseLinkDestination:()=>Dt,parseLinkLabel:()=>At,parseLinkTitle:()=>Tt});var l=n(36923),a=n(31994);const c={};function d(t,e){"string"!==typeof e&&(e=d.defaultChars);const n=function(t){let e=c[t];if(e)return e;e=c[t]=[];for(let n=0;n<128;n++){const t=String.fromCharCode(n);e.push(t)}for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return e}(e);return t.replace(/(%[a-f0-9]{2})+/gi,function(t){let e="";for(let r=0,o=t.length;r<o;r+=3){const i=parseInt(t.slice(r+1,r+3),16);if(i<128)e+=n[i];else{if(192===(224&i)&&r+3<o){const n=parseInt(t.slice(r+4,r+6),16);if(128===(192&n)){const t=i<<6&1984|63&n;e+=t<128?"\ufffd\ufffd":String.fromCharCode(t),r+=3;continue}}if(224===(240&i)&&r+6<o){const n=parseInt(t.slice(r+4,r+6),16),o=parseInt(t.slice(r+7,r+9),16);if(128===(192&n)&&128===(192&o)){const t=i<<12&61440|n<<6&4032|63&o;e+=t<2048||t>=55296&&t<=57343?"\ufffd\ufffd\ufffd":String.fromCharCode(t),r+=6;continue}}if(240===(248&i)&&r+9<o){const n=parseInt(t.slice(r+4,r+6),16),o=parseInt(t.slice(r+7,r+9),16),s=parseInt(t.slice(r+10,r+12),16);if(128===(192&n)&&128===(192&o)&&128===(192&s)){let t=i<<18&1835008|n<<12&258048|o<<6&4032|63&s;t<65536||t>1114111?e+="\ufffd\ufffd\ufffd\ufffd":(t-=65536,e+=String.fromCharCode(55296+(t>>10),56320+(1023&t))),r+=9;continue}}e+="\ufffd"}}return e})}d.defaultChars=";/?:@&=+$,#",d.componentChars="";const h=d,u={};function p(t,e,n){"string"!==typeof e&&(n=e,e=p.defaultChars),"undefined"===typeof n&&(n=!0);const r=function(t){let e=u[t];if(e)return e;e=u[t]=[];for(let n=0;n<128;n++){const t=String.fromCharCode(n);/^[0-9a-z]$/i.test(t)?e.push(t):e.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<t.length;n++)e[t.charCodeAt(n)]=t[n];return e}(e);let o="";for(let i=0,s=t.length;i<s;i++){const e=t.charCodeAt(i);if(n&&37===e&&i+2<s&&/^[0-9a-f]{2}$/i.test(t.slice(i+1,i+3)))o+=t.slice(i,i+3),i+=2;else if(e<128)o+=r[e];else if(e>=55296&&e<=57343){if(e>=55296&&e<=56319&&i+1<s){const e=t.charCodeAt(i+1);if(e>=56320&&e<=57343){o+=encodeURIComponent(t[i]+t[i+1]),i++;continue}}o+="%EF%BF%BD"}else o+=encodeURIComponent(t[i])}return o}p.defaultChars=";/?:@&=+$,-_.!~*'()#",p.componentChars="-_.!~*'()";const f=p;function m(t){let 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||"",e+=t.hash||"",e}function g(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const y=/^([a-z0-9.+-]+:)/i,v=/:[0-9]*$/,b=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,w=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),k=["'"].concat(w),x=["%","/","?",";","#"].concat(k),C=["/","?","#"],S=/^[+a-z0-9A-Z_-]{0,63}$/,M=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};g.prototype.parse=function(t,e){let n,r,o,i=t;if(i=i.trim(),!e&&1===t.split("#").length){const t=b.exec(i);if(t)return this.pathname=t[1],t[2]&&(this.search=t[2]),this}let s=y.exec(i);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,i=i.substr(s.length)),(e||s||i.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o="//"===i.substr(0,2),!o||s&&E[s]||(i=i.substr(2),this.slashes=!0)),!E[s]&&(o||s&&!A[s])){let t,e,n=-1;for(let l=0;l<C.length;l++)r=i.indexOf(C[l]),-1!==r&&(-1===n||r<n)&&(n=r);e=-1===n?i.lastIndexOf("@"):i.lastIndexOf("@",n),-1!==e&&(t=i.slice(0,e),i=i.slice(e+1),this.auth=t),n=-1;for(let l=0;l<x.length;l++)r=i.indexOf(x[l]),-1!==r&&(-1===n||r<n)&&(n=r);-1===n&&(n=i.length),":"===i[n-1]&&n--;const o=i.slice(0,n);i=i.slice(n),this.parseHost(o),this.hostname=this.hostname||"";const s="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!s){const t=this.hostname.split(/\./);for(let e=0,n=t.length;e<n;e++){const n=t[e];if(n&&!n.match(S)){let r="";for(let t=0,e=n.length;t<e;t++)n.charCodeAt(t)>127?r+="x":r+=n[t];if(!r.match(S)){const r=t.slice(0,e),o=t.slice(e+1),s=n.match(M);s&&(r.push(s[1]),o.unshift(s[2])),o.length&&(i=o.join(".")+i),this.hostname=r.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),s&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=i.indexOf("#");-1!==l&&(this.hash=i.substr(l),i=i.slice(0,l));const a=i.indexOf("?");return-1!==a&&(this.search=i.substr(a),i=i.slice(0,a)),i&&(this.pathname=i),A[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this},g.prototype.parseHost=function(t){let e=v.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const D=function(t,e){if(t&&t instanceof g)return t;const n=new g;return n.parse(t,e),n},T=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\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-\u2E4F\u2E52-\u2E5D\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[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,O=/[\$\+<->
2\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,N=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_=/[\0-\x1F\x7F-\x9F]/,R=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,L=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,z
vendor: 13,327 bytes, line 2
2=new Uint16Array('\u1d41<\xd5\u0131\u028a\u049d\u057b\u05d0\u0675\u06de\u07a2\u07d6\u080f\u0a4a\u0a91\u0da1\u0e6d\u0f09\u0f26\u10ca\u1228\u12e1\u1415\u149d\u14c3\u14df\u1525\0\0\0\0\0\0\u156b\u16cd\u198d\u1c12\u1ddd\u1f7e\u2060\u21b0\u228d\u23c0\u23fb\u2442\u2824\u2912\u2d08\u2e48\u2fce\u3016\u32ba\u3639\u37ac\u38fe\u3a28\u3a71\u3ae0\u3b2e\u0800EMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig\u803b\xc6\u40c6P\u803b&\u4026cute\u803b\xc1\u40c1reve;\u4102\u0100iyx}rc\u803b\xc2\u40c2;\u4410r;\uc000\ud835\udd04rave\u803b\xc0\u40c0pha;\u4391acr;\u4100d;\u6a53\u0100gp\x9d\xa1on;\u4104f;\uc000\ud835\udd38plyFunction;\u6061ing\u803b\xc5\u40c5\u0100cs\xbe\xc3r;\uc000\ud835\udc9cign;\u6254ilde\u803b\xc3\u40c3ml\u803b\xc4\u40c4\u0400aceforsu\xe5\xfb\xfe\u0117\u011c\u0122\u0127\u012a\u0100cr\xea\xf2kslash;\u6216\u0176\xf6\xf8;\u6ae7ed;\u6306y;\u4411\u0180crt\u0105\u010b\u0114ause;\u6235noullis;\u612ca;\u4392r;\uc000\ud835\udd05pf;\uc000\ud835\udd39eve;\u42d8c\xf2\u0113mpeq;\u624e\u0700HOacdefhilorsu\u014d\u0151\u0156\u0180\u019e\u01a2\u01b5\u01b7\u01ba\u01dc\u0215\u0273\u0278\u027ecy;\u4427PY\u803b\xa9\u40a9\u0180cpy\u015d\u0162\u017aute;\u4106\u0100;i\u0167\u0168\u62d2talDifferentialD;\u6145leys;\u612d\u0200aeio\u0189\u018e\u0194\u0198ron;\u410cdil\u803b\xc7\u40c7rc;\u4108nint;\u6230ot;\u410a\u0100dn\u01a7\u01adilla;\u40b8terDot;\u40b7\xf2\u017fi;\u43a7rcle\u0200DMPT\u01c7\u01cb\u01d1\u01d6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01e2\u01f8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020foubleQuote;\u601duote;\u6019\u0200lnpu\u021e\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6a74\u0180git\u022f\u0236\u023aruent;\u6261nt;\u622fourIntegral;\u622e\u0100fr\u024c\u024e;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6a2fcr;\uc000\ud835\udc9ep\u0100;C\u0284\u0285\u62d3ap;\u624d\u0580DJSZacefios\u02a0\u02ac\u02b0\u02b4\u02b8\u02cb\u02d7\u02e1\u02e6\u0333\u048d\u0100;o\u0179\u02a5trahd;\u6911cy;\u4402cy;\u4405cy;\u440f\u0180grs\u02bf\u02c4\u02c7ger;\u6021r;\u61a1hv;\u6ae4\u0100ay\u02d0\u02d5ron;\u410e;\u4414l\u0100;t\u02dd\u02de\u6207a;\u4394r;\uc000\ud835\udd07\u0100af\u02eb\u0327\u0100cm\u02f0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031ccute;\u40b4o\u0174\u030b\u030d;\u42d9bleAcute;\u42ddrave;\u4060ilde;\u42dcond;\u62c4ferentialD;\u6146\u0470\u033d\0\0\0\u0342\u0354\0\u0405f;\uc000\ud835\udd3b\u0180;DE\u0348\u0349\u034d\u40a8ot;\u60dcqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03cf\u03e2\u03f8ontourIntegra\xec\u0239o\u0274\u0379\0\0\u037b\xbb\u0349nArrow;\u61d3\u0100eo\u0387\u03a4ft\u0180ART\u0390\u0396\u03a1rrow;\u61d0ightArrow;\u61d4e\xe5\u02cang\u0100LR\u03ab\u03c4eft\u0100AR\u03b3\u03b9rrow;\u67f8ightArrow;\u67faightArrow;\u67f9ight\u0100AT\u03d8\u03derrow;\u61d2ee;\u62a8p\u0241\u03e9\0\0\u03efrrow;\u61d1ownArrow;\u61d5erticalBar;\u6225n\u0300ABLRTa\u0412\u042a\u0430\u045e\u047f\u037crrow\u0180;BU\u041d\u041e\u0422\u6193ar;\u6913pArrow;\u61f5reve;\u4311eft\u02d2\u043a\0\u0446\0\u0450ightVector;\u6950eeVector;\u695eector\u0100;B\u0459\u045a\u61bdar;\u6956ight\u01d4\u0467\0\u0471eeVector;\u695fector\u0100;B\u047a\u047b\u61c1ar;\u6957ee\u0100;A\u0486\u0487\u62a4rrow;\u61a7\u0100ct\u0492\u0497r;\uc000\ud835\udc9frok;\u4110\u0800NTacdfglmopqstux\u04bd\u04c0\u04c4\u04cb\u04de\u04e2\u04e7\u04ee\u04f5\u0521\u052f\u0536\u0552\u055d\u0560\u0565G;\u414aH\u803b\xd0\u40d0cute\u803b\xc9\u40c9\u0180aiy\u04d2\u04d7\u04dcron;\u411arc\u803b\xca\u40ca;\u442dot;\u4116r;\uc000\ud835\udd08rave\u803b\xc8\u40c8ement;\u6208\u0100ap\u04fa\u04fecr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65fberySmallSquare;\u65ab\u0100gp\u0526\u052aon;\u4118f;\uc000\ud835\udd3csilon;\u4395u\u0100ai\u053c\u0549l\u0100;T\u0542\u0543\u6a75ilde;\u6242librium;\u61cc\u0100ci\u0557\u055ar;\u6130m;\u6a73a;\u4397ml\u803b\xcb\u40cb\u0100ip\u056a\u056fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058d\u05b2\u05ccy;\u4424r;\uc000\ud835\udd09lled\u0253\u0597\0\0\u05a3mallSquare;\u65fcerySmallSquare;\u65aa\u0370\u05ba\0\u05bf\0\0\u05c4f;\uc000\ud835\udd3dAll;\u6200riertrf;\u6131c\xf2\u05cb\u0600JTabcdfgorst\u05e8\u05ec\u05ef\u05fa\u0600\u0612\u0616\u061b\u061d\u0623\u066c\u0672cy;\u4403\u803b>\u403emma\u0100;d\u05f7\u05f8\u4393;\u43dcreve;\u411e\u0180eiy\u0607\u060c\u0610dil;\u4122rc;\u411c;\u4413ot;\u4120r;\uc000\ud835\udd0a;\u62d9pf;\uc000\ud835\udd3eeater\u0300EFGLST\u0635\u0644\u064e\u0656\u065b\u0666qual\u0100;L\u063e\u063f\u6265ess;\u62dbullEqual;\u6267reater;\u6aa2ess;\u6277lantEqual;\u6a7eilde;\u6273cr;\uc000\ud835\udca2;\u626b\u0400Aacfiosu\u0685\u068b\u0696\u069b\u069e\u06aa\u06be\u06caRDcy;\u442a\u0100ct\u0690\u0694ek;\u42c7;\u405eirc;\u4124r;\u610clbertSpace;\u610b\u01f0\u06af\0\u06b2f;\u610dizontalLine;\u6500\u0100ct\u06c3\u06c5\xf2\u06a9rok;\u4126mp\u0144\u06d0\u06d8ownHum\xf0\u012fqual;\u624f\u0700EJOacdfgmnostu\u06fa\u06fe\u0703\u0707\u070e\u071a\u071e\u0721\u0728\u0744\u0778\u078b\u078f\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803b\xcd\u40cd\u0100iy\u0713\u0718rc\u803b\xce\u40ce;\u4418ot;\u4130r;\u6111rave\u803b\xcc\u40cc\u0180;ap\u0720\u072f\u073f\u0100cg\u0734\u0737r;\u412ainaryI;\u6148lie\xf3\u03dd\u01f4\u0749\0\u0762\u0100;e\u074d\u074e\u622c\u0100gr\u0753\u0758ral;\u622bsection;\u62c2isible\u0100CT\u076c\u0772omma;\u6063imes;\u6062\u0180gpt\u077f\u0783\u0788on;\u412ef;\uc000\ud835\udd40a;\u4399cr;\u6110ilde;\u4128\u01eb\u079a\0\u079ecy;\u4406l\u803b\xcf\u40cf\u0280cfosu\u07ac\u07b7\u07bc\u07c2\u07d0\u0100iy\u07b1\u07b5rc;\u4134;\u4419r;\uc000\ud835\udd0dpf;\uc000\ud835\udd41\u01e3\u07c7\0\u07ccr;\uc000\ud835\udca5rcy;\u4408kcy;\u4404\u0380HJacfos\u07e4\u07e8\u07ec\u07f1\u07fd\u0802\u0808cy;\u4425cy;\u440cppa;\u439a\u0100ey\u07f6\u07fbdil;\u4136;\u441ar;\uc000\ud835\udd0epf;\uc000\ud835\udd42cr;\uc000\ud835\udca6\u0580JTaceflmost\u0825\u0829\u082c\u0850\u0863\u09b3\u09b8\u09c7\u09cd\u0a37\u0a47cy;\u4409\u803b<\u403c\u0280cmnpr\u0837\u083c\u0841\u0844\u084dute;\u4139bda;\u439bg;\u67ealacetrf;\u6112r;\u619e\u0180aey\u0857\u085c\u0861ron;\u413ddil;\u413b;\u441b\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087e\u08a9\u08b1\u08e0\u08e6\u08fc\u092f\u095b\u0390\u096a\u0100nr\u0883\u088fgleBracket;\u67e8row\u0180;BR\u0899\u089a\u089e\u6190ar;\u61e4ightArrow;\u61c6eiling;\u6308o\u01f5\u08b7\0\u08c3bleBracket;\u67e6n\u01d4\u08c8\0\u08d2eeVector;\u6961ector\u0100;B\u08db\u08dc\u61c3ar;\u6959loor;\u630aight\u0100AV\u08ef\u08f5rrow;\u6194ector;\u694e\u0100er\u0901\u0917e\u0180;AV\u0909\u090a\u0910\u62a3rrow;\u61a4ector;\u695aiangle\u0180;BE\u0924\u0925\u0929\u62b2ar;\u69cfqual;\u62b4p\u0180DTV\u0937\u0942\u094cownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61bfar;\u6958ector\u0100;B\u0965\u0966\u61bcar;\u6952ight\xe1\u039cs\u0300EFGLST\u097e\u098b\u0995\u099d\u09a2\u09adqualGreater;\u62daullEqual;\u6266reater;\u6276ess;\u6aa1lantEqual;\u6a7dilde;\u6272r;\uc000\ud835\udd0f\u0100;e\u09bd\u09be\u62d8ftarrow;\u61daidot;\u413f\u0180npw\u09d4\u0a16\u0a1bg\u0200LRlr\u09de\u09f7\u0a02\u0a10eft\u0100AR\u09e6\u09ecrrow;\u67f5ightArrow;\u67f7ightArrow;\u67f6eft\u0100ar\u03b3\u0a0aight\xe1\u03bfight\xe1\u03caf;\uc000\ud835\udd43er\u0100LR\u0a22\u0a2ceftArrow;\u6199ightArrow;\u6198\u0180cht\u0a3e\u0a40\u0a42\xf2\u084c;\u61b0rok;\u4141;\u626a\u0400acefiosu\u0a5a\u0a5d\u0a60\u0a77\u0a7c\u0a85\u0a8b\u0a8ep;\u6905y;\u441c\u0100dl\u0a65\u0a6fiumSpace;\u605flintrf;\u6133r;\uc000\ud835\udd10nusPlus;\u6213pf;\uc000\ud835\udd44c\xf2\u0a76;\u439c\u0480Jacefostu\u0aa3\u0aa7\u0aad\u0ac0\u0b14\u0b19\u0d91\u0d97\u0d9ecy;\u440acute;\u4143\u0180aey\u0ab4\u0ab9\u0aberon;\u4147dil;\u4145;\u441d\u0180gsw\u0ac7\u0af0\u0b0eative\u0180MTV\u0ad3\u0adf\u0ae8ediumSpace;\u600bhi\u0100cn\u0ae6\u0ad8\xeb\u0ad9eryThi\xee\u0ad9ted\u0100GL\u0af8\u0b06reaterGreate\xf2\u0673essLes\xf3\u0a48Line;\u400ar;\uc000\ud835\udd11\u0200Bnpt\u0b22\u0b28\u0b37\u0b3areak;\u6060BreakingSpace;\u40a0f;\u6115\u0680;CDEGHLNPRSTV\u0b55\u0b56\u0b6a\u0b7c\u0ba1\u0beb\u0c04\u0c5e\u0c84\u0ca6\u0cd8\u0d61\u0d85\u6aec\u0100ou\u0b5b\u0b64ngruent;\u6262pCap;\u626doubleVerticalBar;\u6226\u0180lqx\u0b83\u0b8a\u0b9bement;\u6209ual\u0100;T\u0b92\u0b93\u6260ilde;\uc000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0bb6\u0bb7\u0bbd\u0bc9\u0bd3\u0bd8\u0be5\u626fqual;\u6271ullEqual;\uc000\u2267\u0338reater;\uc000\u226b\u0338ess;\u6279lantEqual;\uc000\u2a7e\u0338ilde;\u6275ump\u0144\u0bf2\u0bfdownHump;\uc000\u224e\u0338qual;\uc000\u224f\u0338e\u0100fs\u0c0a\u0c27tTriangle\u0180;BE\u0c1a\u0c1b\u0c21\u62eaar;\uc000\u29cf\u0338qual;\u62ecs\u0300;EGLST\u0c35\u0c36\u0c3c\u0c44\u0c4b\u0c58\u626equal;\u6270reater;\u6278ess;\uc000\u226a\u0338lantEqual;\uc000\u2a7d\u0338ilde;\u6274ested\u0100GL\u0c68\u0c79reaterGreater;\uc000\u2aa2\u0338essLess;\uc000\u2aa1\u0338recedes\u0180;ES\u0c92\u0c93\u0c9b\u6280qual;\uc000\u2aaf\u0338lantEqual;\u62e0\u0100ei\u0cab\u0cb9verseElement;\u620cghtTriangle\u0180;BE\u0ccb\u0ccc\u0cd2\u62ebar;\uc000\u29d0\u0338qual;\u62ed\u0100qu\u0cdd\u0d0cuareSu\u0100bp\u0ce8\u0cf9set\u0100;E\u0cf0\u0cf3\uc000\u228f\u0338qual;\u62e2erset\u0100;E\u0d03\u0d06\uc000\u2290\u0338qual;\u62e3\u0180bcp\u0d13\u0d24\u0d4eset\u0100;E\u0d1b\u0d1e\uc000\u2282\u20d2qual;\u6288ceeds\u0200;EST\u0d32\u0d33\u0d3b\u0d46\u6281qual;\uc000\u2ab0\u0338lantEqual;\u62e1ilde;\uc000\u227f\u0338erset\u0100;E\u0d58\u0d5b\uc000\u2283\u20d2qual;\u6289ilde\u0200;EFT\u0d6e\u0d6f\u0d75\u0d7f\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uc000\ud835\udca9ilde\u803b\xd1\u40d1;\u439d\u0700Eacdfgmoprstuv\u0dbd\u0dc2\u0dc9\u0dd5\u0ddb\u0de0\u0de7\u0dfc\u0e02\u0e20\u0e22\u0e32\u0e3f\u0e44lig;\u4152cute\u803b\xd3\u40d3\u0100iy\u0dce\u0dd3rc\u803b\xd4\u40d4;\u441eblac;\u4150r;\uc000\ud835\udd12rave\u803b\xd2\u40d2\u0180aei\u0dee\u0df2\u0df6cr;\u414cga;\u43a9cron;\u439fpf;\uc000\ud835\udd46enCurly\u0100DQ\u0e0e\u0e1aoubleQuote;\u601cuote;\u6018;\u6a54\u0100cl\u0e27\u0e2cr;\uc000\ud835\udcaaash\u803b\xd8\u40d8i\u016c\u0e37\u0e3cde\u803b\xd5\u40d5es;\u6a37ml\u803b\xd6\u40d6er\u0100BP\u0e4b\u0e60\u0100ar\u0e50\u0e53r;\u603eac\u0100ek\u0e5a\u0e5c;\u63deet;\u63b4arenthesis;\u63dc\u0480acfhilors\u0e7f\u0e87\u0e8a\u0e8f\u0e92\u0e94\u0e9d\u0eb0\u0efcrtialD;\u6202y;\u441fr;\uc000\ud835\udd13i;\u43a6;\u43a0usMinus;\u40b1\u0100ip\u0ea2\u0eadncareplan\xe5\u069df;\u6119\u0200;eio\u0eb9\u0eba\u0ee0\u0ee4\u6abbcedes\u0200;EST\u0ec8\u0ec9\u0ecf\u0eda\u627aqual;\u6aaflantEqual;\u627cilde;\u627eme;\u6033\u0100dp\u0ee9\u0eeeuct;\u620fortion\u0100;a\u0225\u0ef9l;\u621d\u0100ci\u0f01\u0f06r;\uc000\ud835\udcab;\u43a8\u0200Ufos\u0f11\u0f16\u0f1b\u0f1fOT\u803b"\u4022r;\uc000\ud835\udd14pf;\u611acr;\uc000\ud835\udcac\u0600BEacefhiorsu\u0f3e\u0f43\u0f47\u0f60\u0f73\u0fa7\u0faa\u0fad\u1096\u10a9\u10b4\u10bearr;\u6910G\u803b\xae\u40ae\u0180cnr\u0f4e\u0f53\u0f56ute;\u4154g;\u67ebr\u0100;t\u0f5c\u0f5d\u61a0l;\u6916\u0180aey\u0f67\u0f6c\u0f71ron;\u4158dil;\u4156;\u4420\u0100;v\u0f78\u0f79\u611cerse\u0100EU\u0f82\u0f99\u0100lq\u0f87\u0f8eement;\u620builibrium;\u61cbpEquilibrium;\u696fr\xbb\u0f79o;\u43a1ght\u0400ACDFTUVa\u0fc1\u0feb\u0ff3\u1022\u1028\u105b\u1087\u03d8\u0100nr\u0fc6\u0fd2gleBracket;\u67e9row\u0180;BL\u0fdc\u0fdd\u0fe1\u6192ar;\u61e5eftArrow;\u61c4eiling;\u6309o\u01f5\u0ff9\0\u1005bleBracket;\u67e7n\u01d4\u100a\0\u1014eeVector;\u695dector\u0100;B\u101d\u101e\u61c2ar;\u6955loor;\u630b\u0100er\u102d\u1043e\u0180;AV\u1035\u1036\u103c\u62a2rrow;\u61a6ector;\u695biangle\u0180;BE\u1050\u1051\u1055\u62b3ar;\u69d0qual;\u62b5p\u0180DTV\u1063\u106e\u1078ownVector;\u694feeVector;\u695cector\u0100;B\u1082\u1083\u61bear;\u6954ector\u0100;B\u1091\u1092\u61c0ar;\u6953\u0100pu\u109b\u109ef;\u611dndImplies;\u6970ightarrow;\u61db\u0100ch\u10b9\u10bcr;\u611b;\u61b1leDelayed;\u69f4\u0680HOacfhimoqstu\u10e4\u10f1\u10f7\u10fd\u1119\u111e\u1151\u1156\u1161\u1167\u11b5\u11bb\u11bf\u0100Cc\u10e9\u10eeHcy;\u4429y;\u4428FTcy;\u442ccute;\u415a\u0280;aeiy\u1108\u1109\u110e\u1113\u1117\u6abcron;\u4160dil;\u415erc;\u415c;\u4421r;\uc000\ud835\udd16ort\u0200DLRU\u112a\u1134\u113e\u1149ownArrow\xbb\u041eeftArrow\xbb\u089aightArrow\xbb\u0fddpArrow;\u6191gma;\u43a3allCircle;\u6218pf;\uc000\ud835\udd4a\u0272\u116d\0\0\u1170t;\u621aare\u0200;ISU\u117b\u117c\u1189\u11af\u65a1ntersection;\u6293u\u0100bp\u118f\u119eset\u0100;E\u1197\u1198\u628fqual;\u6291erset\u0100;E\u11a8\u11a9\u6290qual;\u6292nion;\u6294cr;\uc000\ud835\udcaear;\u62c6\u0200bcmp\u11c8\u11db\u1209\u120b\u0100;s\u11cd\u11ce\u62d0et\u0100;E\u11cd\u11d5qual;\u6286\u0100ch\u11e0\u1205eeds\u0200;EST\u11ed\u11ee\u11f4\u11ff\u627bqual;\u6ab0lantEqual;\u627dilde;\u627fTh\xe1\u0f8c;\u6211\u0180;es\u1212\u1213\u1223\u62d1rset\u0100;E\u121c\u121d\u6283qual;\u6287et\xbb\u1213\u0580HRSacfhiors\u123e\u1244\u1249\u1255\u125e\u1271\u1276\u129f\u12c2\u12c8\u12d1ORN\u803b\xde\u40deADE;\u6122\u0100Hc\u124e\u1252cy;\u440by;\u4426\u0100bu\u125a\u125c;\u4009;\u43a4\u0180aey\u1265\u126a\u126fron;\u4164dil;\u4162;\u4422r;\uc000\ud835\udd17\u0100ei\u127b\u1289\u01f2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128e\u1298kSpace;\uc000\u205f\u200aSpace;\u6009lde\u0200;EFT\u12ab\u12ac\u12b2\u12bc\u623cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uc000\ud835\udd4bipleDot;\u60db\u0100ct\u12d6\u12dbr;\uc000\ud835\udcafrok;\u4166\u0ae1\u12f7\u130e\u131a\u1326\0\u132c\u1331\0\0\0\0\0\u1338\u133d\u1377\u1385\0\u13ff\u1404\u140a\u1410\u0100cr\u12fb\u1301ute\u803b\xda\u40dar\u0100;o\u1307\u1308\u619fcir;\u6949r\u01e3\u1313\0\u1316y;\u440eve;\u416c\u0100iy\u131e\u1323rc\u803b\xdb\u40db;\u4423blac;\u4170r;
vendor: 34,219 bytes, line 2
2\uc000\ud835\udd18rave\u803b\xd9\u40d9acr;\u416a\u0100di\u1341\u1369er\u0100BP\u1348\u135d\u0100ar\u134d\u1350r;\u405fac\u0100ek\u1357\u1359;\u63dfet;\u63b5arenthesis;\u63ddon\u0100;P\u1370\u1371\u62c3lus;\u628e\u0100gp\u137b\u137fon;\u4172f;\uc000\ud835\udd4c\u0400ADETadps\u1395\u13ae\u13b8\u13c4\u03e8\u13d2\u13d7\u13f3rrow\u0180;BD\u1150\u13a0\u13a4ar;\u6912ownArrow;\u61c5ownArrow;\u6195quilibrium;\u696eee\u0100;A\u13cb\u13cc\u62a5rrow;\u61a5own\xe1\u03f3er\u0100LR\u13de\u13e8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13f9\u13fa\u43d2on;\u43a5ing;\u416ecr;\uc000\ud835\udcb0ilde;\u4168ml\u803b\xdc\u40dc\u0480Dbcdefosv\u1427\u142c\u1430\u1433\u143e\u1485\u148a\u1490\u1496ash;\u62abar;\u6aeby;\u4412ash\u0100;l\u143b\u143c\u62a9;\u6ae6\u0100er\u1443\u1445;\u62c1\u0180bty\u144c\u1450\u147aar;\u6016\u0100;i\u144f\u1455cal\u0200BLST\u1461\u1465\u146a\u1474ar;\u6223ine;\u407ceparator;\u6758ilde;\u6240ThinSpace;\u600ar;\uc000\ud835\udd19pf;\uc000\ud835\udd4dcr;\uc000\ud835\udcb1dash;\u62aa\u0280cefos\u14a7\u14ac\u14b1\u14b6\u14bcirc;\u4174dge;\u62c0r;\uc000\ud835\udd1apf;\uc000\ud835\udd4ecr;\uc000\ud835\udcb2\u0200fios\u14cb\u14d0\u14d2\u14d8r;\uc000\ud835\udd1b;\u439epf;\uc000\ud835\udd4fcr;\uc000\ud835\udcb3\u0480AIUacfosu\u14f1\u14f5\u14f9\u14fd\u1504\u150f\u1514\u151a\u1520cy;\u442fcy;\u4407cy;\u442ecute\u803b\xdd\u40dd\u0100iy\u1509\u150drc;\u4176;\u442br;\uc000\ud835\udd1cpf;\uc000\ud835\udd50cr;\uc000\ud835\udcb4ml;\u4178\u0400Hacdefos\u1535\u1539\u153f\u154b\u154f\u155d\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417d;\u4417ot;\u417b\u01f2\u1554\0\u155boWidt\xe8\u0ad9a;\u4396r;\u6128pf;\u6124cr;\uc000\ud835\udcb5\u0be1\u1583\u158a\u1590\0\u15b0\u15b6\u15bf\0\0\0\0\u15c6\u15db\u15eb\u165f\u166d\0\u1695\u169b\u16b2\u16b9\0\u16becute\u803b\xe1\u40e1reve;\u4103\u0300;Ediuy\u159c\u159d\u15a1\u15a3\u15a8\u15ad\u623e;\uc000\u223e\u0333;\u623frc\u803b\xe2\u40e2te\u80bb\xb4\u0306;\u4430lig\u803b\xe6\u40e6\u0100;r\xb2\u15ba;\uc000\ud835\udd1erave\u803b\xe0\u40e0\u0100ep\u15ca\u15d6\u0100fp\u15cf\u15d4sym;\u6135\xe8\u15d3ha;\u43b1\u0100ap\u15dfc\u0100cl\u15e4\u15e7r;\u4101g;\u6a3f\u0264\u15f0\0\0\u160a\u0280;adsv\u15fa\u15fb\u15ff\u1601\u1607\u6227nd;\u6a55;\u6a5clope;\u6a58;\u6a5a\u0380;elmrsz\u1618\u1619\u161b\u161e\u163f\u164f\u1659\u6220;\u69a4e\xbb\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163a\u163c\u163e;\u69a8;\u69a9;\u69aa;\u69ab;\u69ac;\u69ad;\u69ae;\u69aft\u0100;v\u1645\u1646\u621fb\u0100;d\u164c\u164d\u62be;\u699d\u0100pt\u1654\u1657h;\u6222\xbb\xb9arr;\u637c\u0100gp\u1663\u1667on;\u4105f;\uc000\ud835\udd52\u0380;Eaeiop\u12c1\u167b\u167d\u1682\u1684\u1687\u168a;\u6a70cir;\u6a6f;\u624ad;\u624bs;\u4027rox\u0100;e\u12c1\u1692\xf1\u1683ing\u803b\xe5\u40e5\u0180cty\u16a1\u16a6\u16a8r;\uc000\ud835\udcb6;\u402amp\u0100;e\u12c1\u16af\xf1\u0288ilde\u803b\xe3\u40e3ml\u803b\xe4\u40e4\u0100ci\u16c2\u16c8onin\xf4\u0272nt;\u6a11\u0800Nabcdefiklnoprsu\u16ed\u16f1\u1730\u173c\u1743\u1748\u1778\u177d\u17e0\u17e6\u1839\u1850\u170d\u193d\u1948\u1970ot;\u6aed\u0100cr\u16f6\u171ek\u0200ceps\u1700\u1705\u170d\u1713ong;\u624cpsilon;\u43f6rime;\u6035im\u0100;e\u171a\u171b\u623dq;\u62cd\u0176\u1722\u1726ee;\u62bded\u0100;g\u172c\u172d\u6305e\xbb\u172drk\u0100;t\u135c\u1737brk;\u63b6\u0100oy\u1701\u1741;\u4431quo;\u601e\u0280cmprt\u1753\u175b\u1761\u1764\u1768aus\u0100;e\u010a\u0109ptyv;\u69b0s\xe9\u170cno\xf5\u0113\u0180ahw\u176f\u1771\u1773;\u43b2;\u6136een;\u626cr;\uc000\ud835\udd1fg\u0380costuvw\u178d\u179d\u17b3\u17c1\u17d5\u17db\u17de\u0180aiu\u1794\u1796\u179a\xf0\u0760rc;\u65efp\xbb\u1371\u0180dpt\u17a4\u17a8\u17adot;\u6a00lus;\u6a01imes;\u6a02\u0271\u17b9\0\0\u17becup;\u6a06ar;\u6605riangle\u0100du\u17cd\u17d2own;\u65bdp;\u65b3plus;\u6a04e\xe5\u1444\xe5\u14adarow;\u690d\u0180ako\u17ed\u1826\u1835\u0100cn\u17f2\u1823k\u0180lst\u17fa\u05ab\u1802ozenge;\u69ebriangle\u0200;dlr\u1812\u1813\u1818\u181d\u65b4own;\u65beeft;\u65c2ight;\u65b8k;\u6423\u01b1\u182b\0\u1833\u01b2\u182f\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183e\u184d\u0100;q\u1843\u1846\uc000=\u20e5uiv;\uc000\u2261\u20e5t;\u6310\u0200ptwx\u1859\u185e\u1867\u186cf;\uc000\ud835\udd53\u0100;t\u13cb\u1863om\xbb\u13cctie;\u62c8\u0600DHUVbdhmptuv\u1885\u1896\u18aa\u18bb\u18d7\u18db\u18ec\u18ff\u1905\u190a\u1910\u1921\u0200LRlr\u188e\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18a1\u18a2\u18a4\u18a6\u18a8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18b3\u18b5\u18b7\u18b9;\u655d;\u655a;\u655c;\u6559\u0380;HLRhlr\u18ca\u18cb\u18cd\u18cf\u18d1\u18d3\u18d5\u6551;\u656c;\u6563;\u6560;\u656b;\u6562;\u655fox;\u69c9\u0200LRlr\u18e4\u18e6\u18e8\u18ea;\u6555;\u6552;\u6510;\u650c\u0280;DUdu\u06bd\u18f7\u18f9\u18fb\u18fd;\u6565;\u6568;\u652c;\u6534inus;\u629flus;\u629eimes;\u62a0\u0200LRlr\u1919\u191b\u191d\u191f;\u655b;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193b\u6502;\u656a;\u6561;\u655e;\u653c;\u6524;\u651c\u0100ev\u0123\u1942bar\u803b\xa6\u40a6\u0200ceio\u1951\u1956\u195a\u1960r;\uc000\ud835\udcb7mi;\u604fm\u0100;e\u171a\u171cl\u0180;bh\u1968\u1969\u196b\u405c;\u69c5sub;\u67c8\u016c\u1974\u197el\u0100;e\u1979\u197a\u6022t\xbb\u197ap\u0180;Ee\u012f\u1985\u1987;\u6aae\u0100;q\u06dc\u06db\u0ce1\u19a7\0\u19e8\u1a11\u1a15\u1a32\0\u1a37\u1a50\0\0\u1ab4\0\0\u1ac1\0\0\u1b21\u1b2e\u1b4d\u1b52\0\u1bfd\0\u1c0c\u0180cpr\u19ad\u19b2\u19ddute;\u4107\u0300;abcds\u19bf\u19c0\u19c4\u19ca\u19d5\u19d9\u6229nd;\u6a44rcup;\u6a49\u0100au\u19cf\u19d2p;\u6a4bp;\u6a47ot;\u6a40;\uc000\u2229\ufe00\u0100eo\u19e2\u19e5t;\u6041\xee\u0693\u0200aeiu\u19f0\u19fb\u1a01\u1a05\u01f0\u19f5\0\u19f8s;\u6a4don;\u410ddil\u803b\xe7\u40e7rc;\u4109ps\u0100;s\u1a0c\u1a0d\u6a4cm;\u6a50ot;\u410b\u0180dmn\u1a1b\u1a20\u1a26il\u80bb\xb8\u01adptyv;\u69b2t\u8100\xa2;e\u1a2d\u1a2e\u40a2r\xe4\u01b2r;\uc000\ud835\udd20\u0180cei\u1a3d\u1a40\u1a4dy;\u4447ck\u0100;m\u1a47\u1a48\u6713ark\xbb\u1a48;\u43c7r\u0380;Ecefms\u1a5f\u1a60\u1a62\u1a6b\u1aa4\u1aaa\u1aae\u65cb;\u69c3\u0180;el\u1a69\u1a6a\u1a6d\u42c6q;\u6257e\u0261\u1a74\0\0\u1a88rrow\u0100lr\u1a7c\u1a81eft;\u61baight;\u61bb\u0280RSacd\u1a92\u1a94\u1a96\u1a9a\u1a9f\xbb\u0f47;\u64c8st;\u629birc;\u629aash;\u629dnint;\u6a10id;\u6aefcir;\u69c2ubs\u0100;u\u1abb\u1abc\u6663it\xbb\u1abc\u02ec\u1ac7\u1ad4\u1afa\0\u1b0aon\u0100;e\u1acd\u1ace\u403a\u0100;q\xc7\xc6\u026d\u1ad9\0\0\u1ae2a\u0100;t\u1ade\u1adf\u402c;\u4040\u0180;fl\u1ae8\u1ae9\u1aeb\u6201\xee\u1160e\u0100mx\u1af1\u1af6ent\xbb\u1ae9e\xf3\u024d\u01e7\u1afe\0\u1b07\u0100;d\u12bb\u1b02ot;\u6a6dn\xf4\u0246\u0180fry\u1b10\u1b14\u1b17;\uc000\ud835\udd54o\xe4\u0254\u8100\xa9;s\u0155\u1b1dr;\u6117\u0100ao\u1b25\u1b29rr;\u61b5ss;\u6717\u0100cu\u1b32\u1b37r;\uc000\ud835\udcb8\u0100bp\u1b3c\u1b44\u0100;e\u1b41\u1b42\u6acf;\u6ad1\u0100;e\u1b49\u1b4a\u6ad0;\u6ad2dot;\u62ef\u0380delprvw\u1b60\u1b6c\u1b77\u1b82\u1bac\u1bd4\u1bf9arr\u0100lr\u1b68\u1b6a;\u6938;\u6935\u0270\u1b72\0\0\u1b75r;\u62dec;\u62dfarr\u0100;p\u1b7f\u1b80\u61b6;\u693d\u0300;bcdos\u1b8f\u1b90\u1b96\u1ba1\u1ba5\u1ba8\u622arcap;\u6a48\u0100au\u1b9b\u1b9ep;\u6a46p;\u6a4aot;\u628dr;\u6a45;\uc000\u222a\ufe00\u0200alrv\u1bb5\u1bbf\u1bde\u1be3rr\u0100;m\u1bbc\u1bbd\u61b7;\u693cy\u0180evw\u1bc7\u1bd4\u1bd8q\u0270\u1bce\0\0\u1bd2re\xe3\u1b73u\xe3\u1b75ee;\u62ceedge;\u62cfen\u803b\xa4\u40a4earrow\u0100lr\u1bee\u1bf3eft\xbb\u1b80ight\xbb\u1bbde\xe4\u1bdd\u0100ci\u1c01\u1c07onin\xf4\u01f7nt;\u6231lcty;\u632d\u0980AHabcdefhijlorstuwz\u1c38\u1c3b\u1c3f\u1c5d\u1c69\u1c75\u1c8a\u1c9e\u1cac\u1cb7\u1cfb\u1cff\u1d0d\u1d7b\u1d91\u1dab\u1dbb\u1dc6\u1dcdr\xf2\u0381ar;\u6965\u0200glrs\u1c48\u1c4d\u1c52\u1c54ger;\u6020eth;\u6138\xf2\u1133h\u0100;v\u1c5a\u1c5b\u6010\xbb\u090a\u016b\u1c61\u1c67arow;\u690fa\xe3\u0315\u0100ay\u1c6e\u1c73ron;\u410f;\u4434\u0180;ao\u0332\u1c7c\u1c84\u0100gr\u02bf\u1c81r;\u61catseq;\u6a77\u0180glm\u1c91\u1c94\u1c98\u803b\xb0\u40b0ta;\u43b4ptyv;\u69b1\u0100ir\u1ca3\u1ca8sht;\u697f;\uc000\ud835\udd21ar\u0100lr\u1cb3\u1cb5\xbb\u08dc\xbb\u101e\u0280aegsv\u1cc2\u0378\u1cd6\u1cdc\u1ce0m\u0180;os\u0326\u1cca\u1cd4nd\u0100;s\u0326\u1cd1uit;\u6666amma;\u43ddin;\u62f2\u0180;io\u1ce7\u1ce8\u1cf8\u40f7de\u8100\xf7;o\u1ce7\u1cf0ntimes;\u62c7n\xf8\u1cf7cy;\u4452c\u026f\u1d06\0\0\u1d0arn;\u631eop;\u630d\u0280lptuw\u1d18\u1d1d\u1d22\u1d49\u1d55lar;\u4024f;\uc000\ud835\udd55\u0280;emps\u030b\u1d2d\u1d37\u1d3d\u1d42q\u0100;d\u0352\u1d33ot;\u6251inus;\u6238lus;\u6214quare;\u62a1blebarwedg\xe5\xfan\u0180adh\u112e\u1d5d\u1d67ownarrow\xf3\u1c83arpoon\u0100lr\u1d72\u1d76ef\xf4\u1cb4igh\xf4\u1cb6\u0162\u1d7f\u1d85karo\xf7\u0f42\u026f\u1d8a\0\0\u1d8ern;\u631fop;\u630c\u0180cot\u1d98\u1da3\u1da6\u0100ry\u1d9d\u1da1;\uc000\ud835\udcb9;\u4455l;\u69f6rok;\u4111\u0100dr\u1db0\u1db4ot;\u62f1i\u0100;f\u1dba\u1816\u65bf\u0100ah\u1dc0\u1dc3r\xf2\u0429a\xf2\u0fa6angle;\u69a6\u0100ci\u1dd2\u1dd5y;\u445fgrarr;\u67ff\u0900Dacdefglmnopqrstux\u1e01\u1e09\u1e19\u1e38\u0578\u1e3c\u1e49\u1e61\u1e7e\u1ea5\u1eaf\u1ebd\u1ee1\u1f2a\u1f37\u1f44\u1f4e\u1f5a\u0100Do\u1e06\u1d34o\xf4\u1c89\u0100cs\u1e0e\u1e14ute\u803b\xe9\u40e9ter;\u6a6e\u0200aioy\u1e22\u1e27\u1e31\u1e36ron;\u411br\u0100;c\u1e2d\u1e2e\u6256\u803b\xea\u40ealon;\u6255;\u444dot;\u4117\u0100Dr\u1e41\u1e45ot;\u6252;\uc000\ud835\udd22\u0180;rs\u1e50\u1e51\u1e57\u6a9aave\u803b\xe8\u40e8\u0100;d\u1e5c\u1e5d\u6a96ot;\u6a98\u0200;ils\u1e6a\u1e6b\u1e72\u1e74\u6a99nters;\u63e7;\u6113\u0100;d\u1e79\u1e7a\u6a95ot;\u6a97\u0180aps\u1e85\u1e89\u1e97cr;\u4113ty\u0180;sv\u1e92\u1e93\u1e95\u6205et\xbb\u1e93p\u01001;\u1e9d\u1ea4\u0133\u1ea1\u1ea3;\u6004;\u6005\u6003\u0100gs\u1eaa\u1eac;\u414bp;\u6002\u0100gp\u1eb4\u1eb8on;\u4119f;\uc000\ud835\udd56\u0180als\u1ec4\u1ece\u1ed2r\u0100;s\u1eca\u1ecb\u62d5l;\u69e3us;\u6a71i\u0180;lv\u1eda\u1edb\u1edf\u43b5on\xbb\u1edb;\u43f5\u0200csuv\u1eea\u1ef3\u1f0b\u1f23\u0100io\u1eef\u1e31rc\xbb\u1e2e\u0269\u1ef9\0\0\u1efb\xed\u0548ant\u0100gl\u1f02\u1f06tr\xbb\u1e5dess\xbb\u1e7a\u0180aei\u1f12\u1f16\u1f1als;\u403dst;\u625fv\u0100;D\u0235\u1f20D;\u6a78parsl;\u69e5\u0100Da\u1f2f\u1f33ot;\u6253rr;\u6971\u0180cdi\u1f3e\u1f41\u1ef8r;\u612fo\xf4\u0352\u0100ah\u1f49\u1f4b;\u43b7\u803b\xf0\u40f0\u0100mr\u1f53\u1f57l\u803b\xeb\u40ebo;\u60ac\u0180cip\u1f61\u1f64\u1f67l;\u4021s\xf4\u056e\u0100eo\u1f6c\u1f74ctatio\xee\u0559nential\xe5\u0579\u09e1\u1f92\0\u1f9e\0\u1fa1\u1fa7\0\0\u1fc6\u1fcc\0\u1fd3\0\u1fe6\u1fea\u2000\0\u2008\u205allingdotse\xf1\u1e44y;\u4444male;\u6640\u0180ilr\u1fad\u1fb3\u1fc1lig;\u8000\ufb03\u0269\u1fb9\0\0\u1fbdg;\u8000\ufb00ig;\u8000\ufb04;\uc000\ud835\udd23lig;\u8000\ufb01lig;\uc000fj\u0180alt\u1fd9\u1fdc\u1fe1t;\u666dig;\u8000\ufb02ns;\u65b1of;\u4192\u01f0\u1fee\0\u1ff3f;\uc000\ud835\udd57\u0100ak\u05bf\u1ff7\u0100;v\u1ffc\u1ffd\u62d4;\u6ad9artint;\u6a0d\u0100ao\u200c\u2055\u0100cs\u2011\u2052\u03b1\u201a\u2030\u2038\u2045\u2048\0\u2050\u03b2\u2022\u2025\u2027\u202a\u202c\0\u202e\u803b\xbd\u40bd;\u6153\u803b\xbc\u40bc;\u6155;\u6159;\u615b\u01b3\u2034\0\u2036;\u6154;\u6156\u02b4\u203e\u2041\0\0\u2043\u803b\xbe\u40be;\u6157;\u615c5;\u6158\u01b6\u204c\0\u204e;\u615a;\u615d8;\u615el;\u6044wn;\u6322cr;\uc000\ud835\udcbb\u0880Eabcdefgijlnorstv\u2082\u2089\u209f\u20a5\u20b0\u20b4\u20f0\u20f5\u20fa\u20ff\u2103\u2112\u2138\u0317\u213e\u2152\u219e\u0100;l\u064d\u2087;\u6a8c\u0180cmp\u2090\u2095\u209dute;\u41f5ma\u0100;d\u209c\u1cda\u43b3;\u6a86reve;\u411f\u0100iy\u20aa\u20aerc;\u411d;\u4433ot;\u4121\u0200;lqs\u063e\u0642\u20bd\u20c9\u0180;qs\u063e\u064c\u20c4lan\xf4\u0665\u0200;cdl\u0665\u20d2\u20d5\u20e5c;\u6aa9ot\u0100;o\u20dc\u20dd\u6a80\u0100;l\u20e2\u20e3\u6a82;\u6a84\u0100;e\u20ea\u20ed\uc000\u22db\ufe00s;\u6a94r;\uc000\ud835\udd24\u0100;g\u0673\u061bmel;\u6137cy;\u4453\u0200;Eaj\u065a\u210c\u210e\u2110;\u6a92;\u6aa5;\u6aa4\u0200Eaes\u211b\u211d\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6a8arox\xbb\u2124\u0100;q\u212e\u212f\u6a88\u0100;q\u212e\u211bim;\u62e7pf;\uc000\ud835\udd58\u0100ci\u2143\u2146r;\u610am\u0180;el\u066b\u214e\u2150;\u6a8e;\u6a90\u8300>;cdlqr\u05ee\u2160\u216a\u216e\u2173\u2179\u0100ci\u2165\u2167;\u6aa7r;\u6a7aot;\u62d7Par;\u6995uest;\u6a7c\u0280adels\u2184\u216a\u2190\u0656\u219b\u01f0\u2189\0\u218epro\xf8\u209er;\u6978q\u0100lq\u063f\u2196les\xf3\u2088i\xed\u066b\u0100en\u21a3\u21adrtneqq;\uc000\u2269\ufe00\xc5\u21aa\u0500Aabcefkosy\u21c4\u21c7\u21f1\u21f5\u21fa\u2218\u221d\u222f\u2268\u227dr\xf2\u03a0\u0200ilmr\u21d0\u21d4\u21d7\u21dbrs\xf0\u1484f\xbb\u2024il\xf4\u06a9\u0100dr\u21e0\u21e4cy;\u444a\u0180;cw\u08f4\u21eb\u21efir;\u6948;\u61adar;\u610firc;\u4125\u0180alr\u2201\u220e\u2213rts\u0100;u\u2209\u220a\u6665it\xbb\u220alip;\u6026con;\u62b9r;\uc000\ud835\udd25s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223a\u223e\u2243\u225e\u2263rr;\u61fftht;\u623bk\u0100lr\u2249\u2253eftarrow;\u61a9ightarrow;\u61aaf;\uc000\ud835\udd59bar;\u6015\u0180clt\u226f\u2274\u2278r;\uc000\ud835\udcbdas\xe8\u21f4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xbb\u1c5b\u0ae1\u22a3\0\u22aa\0\u22b8\u22c5\u22ce\0\u22d5\u22f3\0\0\u22f8\u2322\u2367\u2362\u237f\0\u2386\u23aa\u23b4cute\u803b\xed\u40ed\u0180;iy\u0771\u22b0\u22b5rc\u803b\xee\u40ee;\u4438\u0100cx\u22bc\u22bfy;\u4435cl\u803b\xa1\u40a1\u0100fr\u039f\u22c9;\uc000\ud835\udd26rave\u803b\xec\u40ec\u0200;ino\u073e\u22dd\u22e9\u22ee\u0100in\u22e2\u22e6nt;\u6a0ct;\u622dfin;\u69dcta;\u6129lig;\u4133\u0180aop\u22fe\u231a\u231d\u0180cgt\u2305\u2308\u2317r;\u412b\u0180elp\u071f\u230f\u2313in\xe5\u078ear\xf4\u0720h;\u4131f;\u62b7ed;\u41b5\u0280;cfot\u04f4\u232c\u2331\u233d\u2341are;\u6105in\u0100;t\u2338\u2339\u621eie;\u69dddo\xf4\u2319\u0280;celp\u0757\u234c\u2350\u235b\u2361al;\u62ba\u0100gr\u2355\u2359er\xf3\u1563\xe3\u234darhk;\u6a17rod;\u6a3c\u0200cgpt\u236f\u2372\u2376\u237by;\u4451on;\u412ff;\uc000\ud835\udd5aa;\u43b9uest\u803b\xbf\u40bf\u0100ci\u238a\u238fr;\uc000\ud835\udcben\u0280;Edsv\u04f4\u239b\u239d\u23a1\u04f3;\u62f9ot;\u62f5\u0100;v\u23a6\u23a7\u62f4;\u62f3\u0100;i\u0777\u23aelde;\u4129\u01eb\u23b8\0\u23bccy;\u4456l\u803b\xef\u40ef\u0300cfmosu\u23cc\u23d7\u23dc\u23e1\u23e7\u23f5\u0100iy\u23d1\u23d5rc;\u4135;\u4439r;\uc000\ud835\udd27ath;\u4237pf;\uc000\ud835\udd5b\u01e3\u23ec\0\u23f1r;\uc000\ud835\udcbfrcy;\u4458kcy;\u4454\u0400acfghjos\u240b\u2416\u2422\u2427\u242d\u2431\u2435\u243bppa\u0100;v\u2413\u2414\u43ba;\u43f0\u0100ey\u241b\u2420dil;\u4137;\u443ar;\uc000\ud835\udd28reen;\u4138cy;\u4445cy;\u445cpf;\uc000\ud835\udd5ccr;\uc000\ud835\udcc0\u0b80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248d\u2491\u250e\u253d\u255a\u2580\u264e\u265e\u2665\u2679\u267d\u269a\u26b2\u26d8\u275d\u2768\u278b\u27c0\u2801\u2812\u0180art\u2477\u247a\u247cr\xf2\u09c6\xf2\u0395ail;\u691barr;\u690e\u0100;g\u0994\u248b;\u6a8bar;\u6962\u0963\u24a5\0\u24aa\0\u24b1\0\0\0\0\0\u24b5\u24ba\0\u24c6\u24c8\u24cd\0\u24f9ute;\u413amptyv;\u69b4ra\xee\u084cbda;\u43bbg\u0180;dl\u088e\u24c1\u24c3;\u6991\xe5\u088e;\u6a85uo\u803b\xab\u40abr\u0400;bfhlpst\u0899\u24de\u24e6\u24e9\u24eb\u24ee\u24f1\u24f5\u0100;f\u089d\u24e3s;\u691fs;\u691d\xeb\u2252p;\u61abl;\u6939im;\u6973l;\u61a2\u0180;ae\u24ff\u2500\u2504\u6aabil;\u6919\u0100;s\u2509\u250a\u6aad;\uc000\u2aad\ufe00\u0180abr\u2515\u2519\u251drr;\u690crk;\u6772\u0100ak\u2522\u252cc\u0100ek\u2528\u252a;\u407b;\u405b\u0100es\u2531\u2533;\u698bl\u0100du\u2539\u253b;\u698f;\u698d\u0200aeuy\u2546\u254b\u2556\u2558ron;\u413e\u0100di\u2550\u2554il;\u413c\xec\u08b0\xe2\u2529;\u443b\u0200cqrs\u2563\u2566\u256d\u257da;\u6936uo\u0100;r\u0e19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694bh;\u61b2\u0280;fgqs\u258b\u258c\u0989\u25f3\u25ff\u6264t\u0280ahlrt\u2598\u25a4\u25b7\u25c2\u25e8rrow\u0100;t\u0899\u25a1a\xe9\u24f6arpoon\u0100du\u25af\u25b4own\xbb\u045ap\xbb\u0966eftarrows;\u61c7ight\u0180ahs\u25cd\u25d6\u25derrow\u0100;s\u08f4\u08a7arpoon\xf3\u0f98quigarro\xf7\u21f0hreetimes;\u62cb\u0180;qs\u258b\u0993\u25falan\xf4\u09ac\u0280;cdgs\u09ac\u260a\u260d\u261d\u2628c;\u6aa8ot\u0100;o\u2614\u2615\u6a7f\u0100;r\u261a\u261b\u6a81;\u6a83\u0100;e\u2622\u2625\uc000\u22da\ufe00s;\u6a93\u0280adegs\u2633\u2639\u263d\u2649\u264bppro\xf8\u24c6ot;\u62d6q\u0100gq\u2643\u2645\xf4\u0989gt\xf2\u248c\xf4\u099bi\xed\u09b2\u0180ilr\u2655\u08e1\u265asht;\u697c;\uc000\ud835\udd29\u0100;E\u099c\u2663;\u6a91\u0161\u2669\u2676r\u0100du\u25b2\u266e\u0100;l\u0965\u2673;\u696alk;\u6584cy;\u4459\u0280;acht\u0a48\u2688\u268b\u2691\u2696r\xf2\u25c1orne\xf2\u1d08ard;\u696bri;\u65fa\u0100io\u269f\u26a4dot;\u4140ust\u0100;a\u26ac\u26ad\u63b0che\xbb\u26ad\u0200Eaes\u26bb\u26bd\u26c9\u26d4;\u6268p\u0100;p\u26c3\u26c4\u6a89rox\xbb\u26c4\u0100;q\u26ce\u26cf\u6a87\u0100;q\u26ce\u26bbim;\u62e6\u0400abnoptwz\u26e9\u26f4\u26f7\u271a\u272f\u2741\u2747\u2750\u0100nr\u26ee\u26f1g;\u67ecr;\u61fdr\xeb\u08c1g\u0180lmr\u26ff\u270d\u2714eft\u0100ar\u09e6\u2707ight\xe1\u09f2apsto;\u67fcight\xe1\u09fdparrow\u0100lr\u2725\u2729ef\xf4\u24edight;\u61ac\u0180afl\u2736\u2739\u273dr;\u6985;\uc000\ud835\udd5dus;\u6a2dimes;\u6a34\u0161\u274b\u274fst;\u6217\xe1\u134e\u0180;ef\u2757\u2758\u1800\u65cange\xbb\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277c\u2785\u2787r\xf2\u08a8orne\xf2\u1d8car\u0100;d\u0f98\u2783;\u696d;\u600eri;\u62bf\u0300achiqt\u2798\u279d\u0a40\u27a2\u27ae\u27bbquo;\u6039r;\uc000\ud835\udcc1m\u0180;eg\u09b2\u27aa\u27ac;\u6a8d;\u6a8f\u0100bu\u252a\u27b3o\u0100;r\u0e1f\u27b9;\u601arok;\u4142\u8400<;cdhilqr\u082b\u27d2\u2639\u27dc\u27e0\u27e5\u27ea\u27f0\u0100ci\u27d7\u27d9;\u6aa6r;\u6a79re\xe5\u25f2mes;\u62c9arr;\u6976uest;\u6a7b\u0100Pi\u27f5\u27f9ar;\u6996\u0180;ef\u2800\u092d\u181b\u65c3r\u0100du\u2807\u280dshar;\u694ahar;\u6966\u0100en\u2817\u2821rtneqq;\uc000\u2268\ufe00\xc5\u281e\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288e\u2893\u28a0\u28a5\u28a8\u28da\u28e2\u28e4\u0a83\u28f3\u2902Dot;\u623a\u0200clpr\u284e\u2852\u2863\u287dr\u803b\xaf\u40af\u0100et\u2857\u2859;\u6642\u0100;e\u285e\u285f\u6720se\xbb\u285f\u0100;s\u103b\u2868to\u0200;dlu\u103b\u2873\u2877\u287bow\xee\u048cef\xf4\u090f\xf0\u13d1ker;\u65ae\u0100oy\u2887\u288cmma;\u6a29;\u443cash;\u6014asuredangle\xbb\u1626r;\uc000\ud835\udd2ao;\u6127\u0180cdn\u28af\u28b4\u28c9ro\u803b\xb5\u40b5\u0200;acd\u1464\u28bd\u28c0\u28c4s\xf4\u16a7ir;\u6af0ot\u80bb\xb7\u01b5us\u0180;bd\u28d2\u1903\u28d3\u6212\u0100;u\u1d3c\u28d8;\u6a2a\u0163\u28de\u28e1p;\u6adb\xf2\u2212\xf0\u0a81\u0100dp\u28e9\u28eeels;\u62a7f;\uc000\ud835\udd5e\u0100ct\u28f8\u28fdr;\uc000\ud835\udcc2pos\xbb\u159d\u0180;lm\u2909\u290a\u290d\u43bctimap;\u62b8\u0c00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297e\u2989\u2998\u29da\u29e9\u2a15\u2a1a\u2a58\u2a5d\u2a83\u2a95\u2aa4\u2aa8\u2b04\u2b07\u2b44\u2b7f\u2bae\u2c34\u2c67\u2c7c\u2ce9\u0100gt\u2947\u294b;\uc000\u22d9\u0338\u0100;v\u2950\u0bcf\uc000\u226b\u20d2\u0180elt\u295a\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61cdightarrow;\u61ce;\uc000\u22d8\u0338\u0100;v\u297b\u0c47\uc000\u226a\u20d2ightarrow;\u61cf\u0100Dd\u298e\u2993ash;\u62afash;\u62ae\u0280bcnpt\u29a3\u29a7\u29ac\u29b1\u29ccla\xbb\u02deute;\u4144g;\uc000\u2220\u20d2\u0280;Eiop\u0d84\u29bc\u29c0\u29c5\u29c8;\uc000\u2a70\u0338d;\uc000\u224b\u0338s;\u4149ro\xf8\u0d84ur\u0100;a\u29d3\u29d4\u666el\u0100;s\u29d3\u0b38\u01f3\u29df\0\u29e3p\u80bb\xa0\u0b37mp\u0100;e\u0bf9\u0c00\u0280aeouy\u29f4\u29fe\u2a03\u2a10\u2a13\u01f0\u29f9\0\u29fb;\u6a43on;\u4148dil;\u4146ng\u0100;d\u0d7e\u2a0aot;\uc000\u2a6d\u0338p;\u6a42;\u443dash;\u6013\u0380;Aadqsx\u0b92\u2a29\u2a2d\u2a3b\u2a41\u2a45\u2a50rr;\u61d7r\u0100hr\u2a33\u2a36k;\u6924\u0100;o\u13f2\u13f0ot;\uc000\u2250\u0338ui\xf6\u0b63\u0100ei\u2a4a\u2a4ear;\u6928\xed\u0b98ist\u0100;s\u0ba0\u0b9fr;\uc000\ud835\udd2b\u0200Eest\u0bc5\u2a66\u2a79\u2a7c\u0180;qs\u0bbc\u2a6d\u0be1\u0180;qs\u0bbc\u0bc5\u2a74lan\xf4\u0be2i\xed\u0bea\u0100;r\u0bb6\u2a81\xbb\u0bb7\u0180Aap\u2a8a\u2a8d\u2a91r\xf2\u2971rr;\u61aear;\u6af2\u0180;sv\u0f8d\u2a9c\u0f8c\u0100;d\u2aa1\u2aa2\u62fc;\u62facy;\u445a\u0380AEadest\u2ab7\u2aba\u2abe\u2ac2\u2ac5\u2af6\u2af9r\xf2\u2966;\uc000\u2266\u0338rr;\u619ar;\u6025\u0200;fqs\u0c3b\u2ace\u2ae3\u2aeft\u0100ar\u2ad4\u2ad9rro\xf7\u2ac1ightarro\xf7\u2a90\u0180;qs\u0c3b\u2aba\u2aealan\xf4\u0c55\u0100;s\u0c55\u2af4\xbb\u0c36i\xed\u0c5d\u0100;r\u0c35\u2afei\u0100;e\u0c1a\u0c25i\xe4\u0d90\u0100pt\u2b0c\u2b11f;\uc000\ud835\udd5f\u8180\xac;in\u2b19\u2b1a\u2b36\u40acn\u0200;Edv\u0b89\u2b24\u2b28\u2b2e;\uc000\u22f9\u0338ot;\uc000\u22f5\u0338\u01e1\u0b89\u2b33\u2b35;\u62f7;\u62f6i\u0100;v\u0cb8\u2b3c\u01e1\u0cb8\u2b41\u2b43;\u62fe;\u62fd\u0180aor\u2b4b\u2b63\u2b69r\u0200;ast\u0b7b\u2b55\u2b5a\u2b5flle\xec\u0b7bl;\uc000\u2afd\u20e5;\uc000\u2202\u0338lint;\u6a14\u0180;ce\u0c92\u2b70\u2b73u\xe5\u0ca5\u0100;c\u0c98\u2b78\u0100;e\u0c92\u2b7d\xf1\u0c98\u0200Aait\u2b88\u2b8b\u2b9d\u2ba7r\xf2\u2988rr\u0180;cw\u2b94\u2b95\u2b99\u619b;\uc000\u2933\u0338;\uc000\u219d\u0338ghtarrow\xbb\u2b95ri\u0100;e\u0ccb\u0cd6\u0380chimpqu\u2bbd\u2bcd\u2bd9\u2b04\u0b78\u2be4\u2bef\u0200;cer\u0d32\u2bc6\u0d37\u2bc9u\xe5\u0d45;\uc000\ud835\udcc3ort\u026d\u2b05\0\0\u2bd6ar\xe1\u2b56m\u0100;e\u0d6e\u2bdf\u0100;q\u0d74\u0d73su\u0100bp\u2beb\u2bed\xe5\u0cf8\xe5\u0d0b\u0180bcp\u2bf6\u2c11\u2c19\u0200;Ees\u2bff\u2c00\u0d22\u2c04\u6284;\uc000\u2ac5\u0338et\u0100;e\u0d1b\u2c0bq\u0100;q\u0d23\u2c00c\u0100;e\u0d32\u2c17\xf1\u0d38\u0200;Ees\u2c22\u2c23\u0d5f\u2c27\u6285;\uc000\u2ac6\u0338et\u0100;e\u0d58\u2c2eq\u0100;q\u0d60\u2c23\u0200gilr\u2c3d\u2c3f\u2c45\u2c47\xec\u0bd7lde\u803b\xf1\u40f1\xe7\u0c43iangle\u0100lr\u2c52\u2c5ceft\u0100;e\u0c1a\u2c5a\xf1\u0c26ight\u0100;e\u0ccb\u2c65\xf1\u0cd7\u0100;m\u2c6c\u2c6d\u43bd\u0180;es\u2c74\u2c75\u2c79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2c8f\u2c94\u2c99\u2c9e\u2ca3\u2cb0\u2cb6\u2cd3\u2ce3ash;\u62adarr;\u6904p;\uc000\u224d\u20d2ash;\u62ac\u0100et\u2ca8\u2cac;\uc000\u2265\u20d2;\uc000>\u20d2nfin;\u69de\u0180Aet\u2cbd\u2cc1\u2cc5rr;\u6902;\uc000\u2264\u20d2\u0100;r\u2cca\u2ccd\uc000<\u20d2ie;\uc000\u22b4\u20d2\u0100At\u2cd8\u2cdcrr;\u6903rie;\uc000\u22b5\u20d2im;\uc000\u223c\u20d2\u0180Aan\u2cf0\u2cf4\u2d02rr;\u61d6r\u0100hr\u2cfa\u2cfdk;\u6923\u0100;o\u13e7\u13e5ear;\u6927\u1253\u1a95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2d2d\0\u2d38\u2d48\u2d60\u2d65\u2d72\u2d84\u1b07\0\0\u2d8d\u2dab\0\u2dc8\u2dce\0\u2ddc\u2e19\u2e2b\u2e3e\u2e43\u0100cs\u2d31\u1a97ute\u803b\xf3\u40f3\u0100iy\u2d3c\u2d45r\u0100;c\u1a9e\u2d42\u803b\xf4\u40f4;\u443e\u0280abios\u1aa0\u2d52\u2d57\u01c8\u2d5alac;\u4151v;\u6a38old;\u69bclig;\u4153\u0100cr\u2d69\u2d6dir;\u69bf;\uc000\ud835\udd2c\u036f\u2d79\0\0\u2d7c\0\u2d82n;\u42dbave\u803b\xf2\u40f2;\u69c1\u0100bm\u2d88\u0df4ar;\u69b5\u0200acit\u2d95\u2d98\u2da5\u2da8r\xf2\u1a80\u0100ir\u2d9d\u2da0r;\u69beoss;\u69bbn\xe5\u0e52;\u69c0\u0180aei\u2db1\u2db5\u2db9cr;\u414dga;\u43c9\u0180cdn\u2dc0\u2dc5\u01cdron;\u43bf;\u69b6pf;\uc000\ud835\udd60\u0180ael\u2dd4\u2dd7\u01d2r;\u69b7rp;\u69b9\u0380;adiosv\u2dea\u2deb\u2dee\u2e08\u2e0d\u2e10\u2e16\u6228r\xf2\u1a86\u0200;efm\u2df7\u2df8\u2e02\u2e05\u6a5dr\u0100;o\u2dfe\u2dff\u6134f\xbb\u2dff\u803b\xaa\u40aa\u803b\xba\u40bagof;\u62b6r;\u6a56lope;\u6a57;\u6a5b\u0180clo\u2e1f\u2e21\u2e27\xf2\u2e01ash\u803b\xf8\u40f8l;\u6298i\u016c\u2e2f\u2e34de\u803b\xf5\u40f5es\u0100;a\u01db\u2e3as;\u6a36ml\u803b\xf6\u40f6bar;\u633d\u0ae1\u2e5e\0\u2e7d\0\u2e80\u2e9d\0\u2ea2\u2eb9\0\0\u2ecb\u0e9c\0\u2f13\0\0\u2f2b\u2fbc\0\u2fc8r\u0200;ast\u0403\u2e67\u2e72\u0e85\u8100\xb6;l\u2e6d\u2e6e\u40b6le\xec\u0403\u0269\u2e78\0\0\u2e7bm;\u6af3;\u6afdy;\u443fr\u0280cimpt\u2e8b\u2e8f\u2e93\u1865\u2e97nt;\u4025od;\u402eil;\u6030enk;\u6031r;\uc000\ud835\udd2d\u0180imo\u2ea8\u2eb0\u2eb4\u0100;v\u2ead\u2eae\u43c6;\u43d5ma\xf4\u0a76ne;\u660e\u0180;tv\u2ebf\u2ec0\u2ec8\u43c0chfork\xbb\u1ffd;\u43d6\u0100au\u2ecf\u2edfn\u0100ck\u2ed5\u2eddk\u0100;h\u21f4\u2edb;\u610e\xf6\u21f4s\u0480;abcdemst\u2ef3\u2ef4\u1908\u2ef9\u2efd\u2f04\u2f06\u2f0a\u2f0e\u402bcir;\u6a23ir;\u6a22\u0100ou\u1d40\u2f02;\u6a25;\u6a72n\u80bb\xb1\u0e9dim;\u6a26wo;\u6a27\u0180ipu\u2f19\u2f20\u2f25ntint;\u6a15f;\uc000\ud835\udd61nd\u803b\xa3\u40a3\u0500;Eaceinosu\u0ec8\u2f3f\u2f41\u2f44\u2f47\u2f81\u2f89\u2f92\u2f7e\u2fb6;\u6ab3p;\u6ab7u\xe5\u0ed9\u0100;c\u0ece\u2f4c\u0300;acens\u0ec8\u2f59\u2f5f\u2f66\u2f68\u2f7eppro\xf8\u2f43urlye\xf1\u0ed9\xf1\u0ece\u0180aes\u2f6f\u2f76\u2f7approx;\u6ab9qq;\u6ab5im;\u62e8i\xed\u0edfme\u0100;s\u2f88\u0eae\u6032\u0180Eas\u2f78\u2f90\u2f7a\xf0\u2f75\u0180dfp\u0eec\u2f99\u2faf\u0180als\u2fa0\u2fa5\u2faalar;\u632eine;\u6312urf;\u6313\u0100;t\u0efb\u2fb4\xef\u0efbrel;\u62b0\u0100ci\u2fc0\u2fc5r;\uc000\ud835\udcc5;\u43c8ncsp;\u6008\u0300fiopsu\u2fda\u22e2\u2fdf\u2fe5\u2feb\u2ff1r;\uc000\ud835\udd2epf;\uc000\ud835\udd62rime;\u6057cr;\uc000\ud835\udcc6\u0180aeo\u2ff8\u3009\u3013t\u0100ei\u2ffe\u3005rnion\xf3\u06b0nt;\u6a16st\u0100;e\u3010\u3011\u403f\xf1\u1f19\xf4\u0f14\u0a80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30e0\u310e\u312b\u3147\u3162\u3172\u318e\u3206\u3215\u3224\u3229\u3258\u326e\u3272\u3290\u32b0\u32b7\u0180art\u3047\u304a\u304cr\xf2\u10b3\xf2\u03ddail;\u691car\xf2\u1c65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307f\u308f\u3094\u30cc\u0100eu\u306d\u3071;\uc000\u223d\u0331te;\u4155i\xe3\u116emptyv;\u69b3g\u0200;del\u0fd1\u3089\u308b\u308d;\u6992;\u69a5\xe5\u0fd1uo\u803b\xbb\u40bbr\u0580;abcfhlpstw\u0fdc\u30ac\u30af\u30b7\u30b9\u30bc\u30be\u30c0\u30c3\u30c7\u30cap;\u6975\u0100;f\u0fe0\u30b4s;\u6920;\u6933s;\u691e\xeb\u225d\xf0\u272el;\u6945im;\u6974l;\u61a3;\u619d\u0100ai\u30d1\u30d5il;\u691ao\u0100;n\u30db\u30dc\u6236al\xf3\u0f1e\u0180abr\u30e7\u30ea\u30eer\xf2\u17e5rk;\u6773\u0100ak\u30f3\u30fdc\u0100ek\u30f9\u30fb;\u407d;\u405d\u0100es\u3102\u3104;\u698cl\u0100du\u310a\u310c;\u698e;\u6990\u0200aeuy\u3117\u311c\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xec\u0ff2\xe2\u30fa;\u4440\u0200clqs\u3134\u3137\u313d\u3144a;\u6937dhar;\u6969uo\u0100;r\u020e\u020dh;\u61b3\u0180acg\u314e\u315f\u0f44l\u0200;ips\u0f78\u3158\u315b\u109cn\xe5\u10bbar\xf4\u0fa9t;\u65ad\u0180ilr\u3169\u1023\u316esht;\u697d;\uc000\ud835\udd2f\u0100ao\u3177\u3186r\u0100du\u317d\u317f\xbb\u047b\u0100;l\u1091\u3184;\u696c\u0100;v\u318b\u318c\u43c1;\u43f1\u0180gns\u3195\u31f9\u31fcht\u0300ahlrst\u31a4\u31b0\u31c2\u31d8\u31e4\u31eerrow\u0100;t\u0fdc\u31ada\xe9\u30c8arpoon\u0100du\u31bb\u31bfow\xee\u317ep\xbb\u1092eft\u0100ah\u31ca\u31d0rrow\xf3\u0feaarpoon\xf3\u0551ightarrows;\u61c9quigarro\xf7\u30cbhreetimes;\u62ccg;\u42daingdotse\xf1\u1f32\u0180ahm\u320d\u3210\u3213r\xf2\u0feaa\xf2\u0551;\u600foust\u0100;a\u321e\u321f\u63b1che\xbb\u321fmid;\u6aee\u0200abpt\u3232\u323d\u3240\u3252\u0100nr\u3237\u323ag;\u67edr;\u61fer\xeb\u1003\u0180afl\u3247\u324a\u324er;\u6986;\uc000\ud835\udd63us;\u6a2eimes;\u6a35\u0100ap\u325d\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6a12ar\xf2\u31e3\u0200achq\u327b\u3280\u10bc\u3285quo;\u603ar;\uc000\ud835\udcc7\u0100bu\u30fb\u328ao\u0100;r\u0214\u0213\u0180hir\u3297\u329b\u32a0re\xe5\u31f8mes;\u62cai\u0200;efl\u32aa\u1059\u1821\u32ab\u65b9tri;\u69celuhar;\u6968;\u611e\u0d61\u32d5\u32db\u32df\u332c\u3338\u3371\0\u337a\u33a4\0\0\u33ec\u33f0\0\u3428\u3448\u345a\u34ad\u34b1\u34ca\u34f1\0\u3616\0\0\u3633cute;\u415bqu\xef\u27ba\u0500;Eaceinpsy\u11ed\u32f3\u32f5\u32ff\u3302\u330b\u330f\u331f\u3326\u3329;\u6ab4\u01f0\u32fa\0\u32fc;\u6ab8on;\u4161u\xe5\u11fe\u0100;d\u11f3\u3307il;\u415frc;\u415d\u0180Eas\u3316\u3318\u331b;\u6ab6p;\u6abaim;\u62e9olint;\u6a13i\xed\u1204;\u4441ot\u0180;be\u3334\u1d47\u3335\u62c5;\u6a66\u0380Aacmstx\u3346\u334a\u3357\u335b\u335e\u3363\u336drr;\u61d8r\u0100hr\u3350\u3352\xeb\u2228\u0100;o\u0a36\u0a34t\u803b\xa7\u40a7i;\u403bwar;\u6929m\u0100in\u3369\xf0nu\xf3\xf1t;\u6736r\u0100;o\u3376\u2055\uc000\ud835\udd30\u0200acoy\u3382\u3386\u3391\u33a0rp;\u666f\u0100hy\u338b\u338fcy;\u4449;\u4448rt\u026d\u3399\0\0\u339ci\xe4\u1464ara\xec\u2e6f\u803b\xad\u40ad\u0100gm\u33a8\u33b4ma\u0180;fv\u33b1\u33b2\u33b2\u43c3;\u43c2\u0400;deglnpr\u12ab\u33c5\u33c9\u33ce\u33d6\u33de\u33e1\u33e6ot;\u6a6a\u0100;q\u12b1\u12b0\u0100;E\u33d3\u33d4\u6a9e;\u6aa0\u0100;E\u33db\u33dc\u6a9d;\u6a9fe;\u6246lus;\u6a24arr;\u6972ar\xf2\u113d\u0200aeit\u33f8\u3408\u340f\u3417\u0100ls\u33fd\u3404lsetm\xe9\u336ahp;\u6a33parsl;\u69e4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341c\u341d\u6aaa\u0100;s\u3422\u3423\u6aac;\uc000\u2aac\ufe00\u0180flp\u342e\u3433\u3442tcy;\u444c\u0100;b\u3438\u3439\u402f\u0100;a\u343e\u343f\u69c4r;\u633ff;\uc000\ud835\udd64a\u0100dr\u344d\u0402es\u0100;u\u3454\u3455\u6660it\xbb\u3455\u0180csu\u3460\u3479\u349f\u0100au\u3465\u346fp\u0100;s\u1188\u346b;\uc000\u2293\ufe00p\u0100;s\u11b4\u3475;\uc000\u2294\ufe00u\u0100bp\u347f\u348f\u0180;es\u1197\u119c\u3486et\u0100;e\u1197\u348d\xf1\u119d\u0180;es\u11a8\u11ad\u3496et\u0100;e\u11a8\u349d\xf1\u11ae\u0180;af\u117b\u34a6\u05b0r\u0165\u34ab\u05b1\xbb\u117car\xf2\u1148\u0200cemt\u34b9\u34be\u34c2\u34c5r;\uc000\ud835\udcc8tm\xee\xf1i\xec\u3415ar\xe6\u11be\u0100ar\u34ce\u34d5r\u0100;f\u34d4\u17bf\u6606\u0100an\u34da\u34edight\u0100ep\u34e3\u34eapsilo\xee\u1ee0h\xe9\u2eafs\xbb\u2852\u0280bcmnp\u34fb\u355e\u1209\u358b\u358e\u0480;Edemnprs\u350e\u350f\u3511\u3515\u351e\u3523\u352c\u3531\u3536\u6282;\u6ac5ot;\u6abd\u0100;d\u11da\u351aot;\u6ac3ult;\u6ac1\u0100Ee\u3528\u352a;\u6acb;\u628alus;\u6abfarr;\u6979\u0180eiu\u353d\u3552\u3555t\u0180;en\u350e\u3545\u354bq\u0100;q\u11da\u350feq\u0100;q\u352b\u3528m;\u6ac7\u0100bp\u355a\u355c;\u6ad5;\u6ad3c\u0300;acens\u11ed\u356c\u3572\u3579\u357b\u3326ppro\xf8\u32faurlye\xf1\u11fe\xf1\u11f3\u0180aes\u3582\u3588\u331bppro\xf8\u331aq\xf1\u3317g;\u666a\u0680123;Edehlmnps\u35a9\u35ac\u35af\u121c\u35b2\u35b4\u35c0\u35c9\u35d5\u35da\u35df\u35e8\u35ed\u803b\xb9\u40b9\u803b\xb2\u40b2\u803b\xb3\u40b3;\u6ac6\u0100os\u35b9\u35bct;\u6abeub;\u6ad8\u0100;d\u1222\u35c5ot;\u6ac4s\u0100ou\u35cf\u35d2l;\u67c9b;\u6ad7arr;\u697bult;\u6ac2\u0100Ee\u35e4\u35e6;\u6acc;\u628blus;\u6ac0\u0180eiu\u35f4\u3609\u360ct\u0180;en\u121c\u35fc\u3602q\u0100;q\u1222\u35b2eq\u0100;q\u35e7\u35e4m;\u6ac8\u0100bp\u3611\u3613;\u6ad4;\u6ad6\u0180Aan\u361c\u3620\u362drr;\u61d9r\u0100hr\u3626\u3628\xeb\u222e\u0100;o\u0a2b\u0a29war;\u692alig\u803b\xdf\u40df\u0be1\u3651\u365d\u3660\u12ce\u3673\u3679\0\u367e\u36c2\0\0\0\0\0\u36db\u3703\0\u3709\u376c\0\0\0\u3787\u0272\u3656\0\0\u365bget;\u6316;\u43c4r\xeb\u0e5f\u0180aey\u3666\u366b\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uc000\ud835\udd31\u0200eiko\u3686\u369d\u36b5\u36bc\u01f2\u368b\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369b\u43b8ym;\u43d1\u0100cn\u36a2\u36b2k\u0100as\u36a8\u36aeppro\xf8\u12c1im\xbb\u12acs\xf0\u129e\u0100as\u36ba\u36ae\xf0\u12c1rn\u803b\xfe\u40fe\u01ec\u031f\u36c6\u22e7es\u8180\xd7;bd\u36cf\u36d0\u36d8\u40d7\u0100;a\u190f\u36d5r;\u6a31;\u6a30\u0180eps\u36e1\u36e3\u3700\xe1\u2a4d\u0200;bcf\u0486\u36ec\u36f0\u36f4ot;\u6336ir;\u6af1\u0100;o\u36f9\u36fc\uc000\ud835\udd65rk;\u6ada\xe1\u3362rime;\u6034\u0180aip\u370f\u3712\u3764d\xe5\u1248\u0380adempst\u3721\u374d\u3740\u3751\u3757\u375c\u375fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65b5own\xbb\u1dbbeft\u0100;e\u2800\u373e\xf1\u092e;\u625cight\u0100;e\u32aa\u374b\xf1\u105aot;\u65ecinus;\u6a3alus;\u6a39b;\u69cdime;\u6a3bezium;\u63e2\u0180cht\u3772\u377d\u3781\u0100ry\u3777\u377b;\uc000\ud835\udcc9;\u4446cy;\u445brok;\u4167\u0100io\u378b\u378ex\xf4\u1777head\u0100lr\u3797\u37a0eftarro\xf7\u084fightarrow\xbb\u0f5d\u0900AHabcdfghlmoprstuw\u37d0\u37d3\u37d7\u37e4\u37f0\u37fc\u380e\u381c\u3823\u3834\u3851\u385d\u386b\u38a9\u38cc\u38d2\u38ea\u38f6r\xf2\u03edar;\u6963\u0100cr\u37dc\u37e2ute\u803b\xfa\u40fa\xf2\u1150r\u01e3\u37ea\0\u37edy;\u445eve;\u416d\u0100iy\u37f5\u37farc\u803b\xfb\u40fb;\u4443\u0180abh\u3803\u3806\u380br\xf2\u13adlac;\u4171a\xf2\u13c3\u0100ir\u3813\u3818sht;\u697e;\uc000\ud835\udd32rave\u803b\xf9\u40f9\u0161\u3827\u3831r\u0100lr\u382c\u382e\xbb\u0957\xbb\u1083lk;\u6580\u0100ct\u3839\u384d\u026f\u383f\0\0\u384arn\u0100;e\u3845\u3846\u631cr\xbb\u3846op;\u630fri;\u65f8\u0100al\u3856\u385acr;\u416b\u80bb\xa8\u0349\u0100gp\u3862\u3866on;\u4173f;\uc000\ud835\udd66\u0300adhlsu\u114b\u3878\u387d\u1372\u3891\u38a0own\xe1\u13b3arpoon\u0100lr\u3888\u388cef\xf4\u382digh\xf4\u382fi\u0180;hl\u3899\u389a\u389c\u43c5\xbb\u13faon\xbb\u389aparrows;\u61c8\u0180cit\u38b0\u38c4\u38c8\u026f\u38b6\0\0\u38c1rn\u0100;e\u38bc\u38bd\u631dr\xbb\u38bdop;\u630eng;\u416fri;\u65f9cr;\uc000\ud835\udcca\u0180dir\u38d9\u38dd\u38e2ot;\u62f0lde;\u4169i\u0100;f\u3730\u38e8\xbb\u1813\u0100am\u38ef\u38f2r\xf2\u38a8l\u803b\xfc\u40fcangle;\u69a7\u0780ABDacdeflnoprsz\u391c\u391f\u3929\u392d\u39b5\u39b8\u39bd\u39df\u39e4\u39e8\u39f3\u39f9\u39fd\u3a01\u3a20r\xf2\u03f7ar\u0100;v\u3926\u3927\u6ae8;\u6ae9as\xe8\u03e1\u0100nr\u3932\u3937grt;\u699c\u0380eknprst\u34e3\u3946\u394b\u3952\u395d\u3964\u3996app\xe1\u2415othin\xe7\u1e96\u0180hir\u34eb\u2ec8\u3959op\xf4\u2fb5\u0100;h\u13b7\u3962\xef\u318d\u0100iu\u3969\u396dgm\xe1\u33b3\u0100bp\u3972\u3984setneq\u0100;q\u397d\u3980\uc000\u228a\ufe00;\uc000\u2acb\ufe00setneq\u0100;q\u398f\u3992\uc000\u228b\ufe00;\uc000\u2acc\ufe00\u0100hr\u399b\u399fet\xe1\u369ciangle\u0100lr\u39aa\u39afeft\xbb\u0925ight\xbb\u1051y;\u4432ash\xbb\u1036\u0180elr\u39c4\u39d2\u39d7\u0180;be\u2dea\u39cb\u39cfar;\u62bbq;\u625alip;\u62ee\u0100bt\u39dc\u1468a\xf2\u1469r;\uc000\ud835\udd33tr\xe9\u39aesu\u0100bp\u39ef\u39f1\xbb\u0d1c\xbb\u0d59pf;\uc000\ud835\udd67ro\xf0\u0efbtr\xe9\u39b4\u0100cu\u3a06\u3a0br;\uc000\ud835\udccb\u0100bp\u3a10\u3a18n\u0100Ee\u3980\u3a16\xbb\u397en\u0100Ee\u3992\u3a1e\xbb\u3990igzag;\u699a\u0380cefoprs\u3a36\u3a3b\u3a56\u3a5b\u3a54\u3a61\u3a6airc;\u4175\u0100di\u3a40\u3a51\u0100bg\u3a45\u3a49ar;\u6a5fe\u0100;q\u15fa\u3a4f;\u6259erp;\u6118r;\uc000\ud835\udd34pf;\uc000\ud835\udd68\u0100;e\u1479\u3a66at\xe8\u1479cr;\uc000\ud835\udccc\u0ae3\u178e\u3a87\0\u3a8b\0\u3a90\u3a9b\0\0\u3a9d\u3aa8\u3aab\u3aaf\0\0\u3ac3\u3ace\0\u3ad8\u17dc\u17dftr\xe9\u17d1r;\uc000\ud835\udd35\u0100Aa\u3a94\u3a97r\xf2\u03c3r\xf2\u09f6;\u43be\u0100Aa\u3aa1\u3aa4r\xf2\u03b8r\xf2\u09eba\xf0\u2713is;\u62fb\u0180dpt\u17a4\u3ab5\u3abe\u0100fl\u3aba\u17a9;\uc000\ud835\udd69im\xe5\u17b2\u0100Aa\u3ac7\u3acar\xf2\u03cer\xf2\u0a01\u0100cq\u3ad2\u17b8r;\uc000\ud835\udccd\u0100pt\u17d6\u3adcr\xe9\u17d4\u0400acefiosu\u3af0\u3afd\u3b08\u3b0c\u3b11\u3b15\u3b1b\u3b21c\u0100uy\u3af6\u3afbte\u803b\xfd\u40fd;\u444f\u0100iy\u3b02\u3b06rc;\u4177;\u444bn\u803b\xa5\u40a5r;\uc000\ud835\udd36cy;\u4457pf;\uc000\ud835\udd6acr;\uc000\ud835\udcce\u0100cm\u3b26\u3b29y;\u444el\u803b\xff\u40ff\u0500acdefhiosw\u3b42\u3b48\u3b54\u3b58\u3b64\u3b69\u3b6d\u3b74\u3b7a\u3b80cute;\u417a\u0100ay\u3b4d\u3b52ron;\u417e;\u4437ot;\u417c\u0100et\u3b5d\u3b61tr\xe6\u155fa;\u43b6r;\uc000\ud835\udd37cy;\u4436grarr;\u61ddpf;\uc000\ud835\udd6bcr;\uc000\ud835\udccf\u0100jn\u3b85\u3b87;\u600dj;\u600c
2'.split("").map(t=>t.charCodeAt(0))),I=new Uint16Array("\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022".split("").map(t=>t.charCodeAt(0)));var F;const $=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]]),P=null!==(F=String.fromCodePoint)&&void 0!==F?F: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};function B(t){var e;return t>=55296&&t<=57343||t>1114111?65533:null!==(e=$.get(t))&&void 0!==e?e:t}var H;!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"}(H||(H={}));var j,V,q;function U(t){return t>=H.ZERO&&t<=H.NINE}function K(t){return t>=H.UPPER_A&&t<=H.UPPER_F||t>=H.LOWER_A&&t<=H.LOWER_F}function W(t){return t===H.EQUALS||function(t){return t>=H.UPPER_A&&t<=H.UPPER_Z||t>=H.LOWER_A&&t<=H.LOWER_Z||U(t)}(t)}!function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"}(j||(j={})),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"}(V||(V={})),function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"}(q||(q={}));class J{constructor(t,e,n){this.decodeTree=t,this.emitCodePoint=e,this.errors=n,this.state=V.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=q.Strict}startEntity(t){this.decodeMode=t,this.state=V.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,e){switch(this.state){case V.EntityStart:return t.charCodeAt(e)===H.NUM?(this.state=V.NumericStart,this.consumed+=1,this.stateNumericStart(t,e+1)):(this.state=V.NamedEntity,this.stateNamedEntity(t,e));case V.NumericStart:return this.stateNumericStart(t,e);case V.NumericDecimal:return this.stateNumericDecimal(t,e);case V.NumericHex:return this.stateNumericHex(t,e);case V.NamedEntity:return this.stateNamedEntity(t,e)}}stateNumericStart(t,e){return e>=t.length?-1:(32|t.charCodeAt(e))===H.LOWER_X?(this.state=V.NumericHex,this.consumed+=1,this.stateNumericHex(t,e+1)):(this.state=V.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<t.length;){const r=t.charCodeAt(e);if(!U(r)&&!K(r))return this.addToNumericResult(t,n,e,16),this.emitNumericEntity(r,3);e+=1}return this.addToNumericResult(t,n,e,16),-1}stateNumericDecimal(t,e){const n=e;for(;e<t.length;){const r=t.charCodeAt(e);if(!U(r))return this.addToNumericResult(t,n,e,10),this.emitNumericEntity(r,2);e+=1}return this.addToNumericResult(t,n,e,10),-1}emitNumericEntity(t,e){var n;if(this.consumed<=e)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===H.SEMI)this.consumed+=1;else if(this.decodeMode===q.Strict)return 0;return this.emitCodePoint(B(this.result),this.consumed),this.errors&&(t!==H.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&j.VALUE_LENGTH)>>14;for(;e<t.length;e++,this.excess++){const i=t.charCodeAt(e);if(this.treeIndex=Z(n,r,this.treeIndex+Math.max(1,o),i),this.treeIndex<0)return 0===this.result||this.decodeMode===q.Attribute&&(0===o||W(i))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],o=(r&j.VALUE_LENGTH)>>14,0!==o){if(i===H.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==q.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:e,decodeTree:n}=this,r=(n[e]&j.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]&~j.VALUE_LENGTH:r[t+1],n),3===e&&this.emitCodePoint(r[t+2],n),n}end(){var t;switch(this.state){case V.NamedEntity:return 0===this.result||this.decodeMode===q.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case V.NumericDecimal:return this.emitNumericEntity(0,2);case V.NumericHex:return this.emitNumericEntity(0,3);case V.NumericStart:return null===(t=this.errors)||void 0===t||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case V.EntityStart:return 0}}}function G(t){let e="";const n=new J(t,t=>e+=P(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 Z(t,e,n,r){const o=(e&j.BRANCH_LENGTH)>>7,i=e&j.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,l=s+o-1;for(;s<=l;){const e=s+l>>>1,n=t[e];if(n<r)s=e+1;else{if(!(n>r))return t[e+o];l=e-1}}return-1}const Y=G(z);G(I);function X(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)}const Q=Object.prototype.hasOwnProperty;function tt(t,e){return Q.call(t,e)}
vendor: 4,746 bytes, line 2
2function et(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 nt(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function rt(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(65535!==(65535&t)&&65534!==(65535&t)&&(!(t>=0&&t<=8)&&(11!==t&&(!(t>=14&&t<=31)&&(!(t>=127&&t<=159)&&!(t>1114111)))))))}function ot(t){if(t>65535){const e=55296+((t-=65536)>>10),n=56320+(1023&t);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const it=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,st=new RegExp(it.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),lt=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function at(t,e){if(35===e.charCodeAt(0)&&lt.test(e)){const n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return rt(n)?ot(n):t}const n=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q.Legacy;return Y(t,e)}(t);return n!==t?n:t}function ct(t){return t.indexOf("\\")<0?t:t.replace(it,"$1")}function dt(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(st,function(t,e,n){return e||at(t,n)})}const ht=/[&<>"]/,ut=/[&<>"]/g,pt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function ft(t){return pt[t]}function mt(t){return ht.test(t)?t.replace(ut,ft):t}const gt=/[.?*+^$[\]\\(){}|-]/g;function yt(t){return t.replace(gt,"\\$&")}function vt(t){switch(t){case 9:case 32:return!0}return!1}function bt(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 wt(t){return T.test(t)||O.test(t)}function kt(t){return wt(ot(t))}function xt(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 Ct(t){return t=t.trim().replace(/\s+/g," "),"\u1e7e"==="\u1e9e".toLowerCase()&&(t=t.replace(/\u1e9e/g,"\xdf")),t.toLowerCase().toUpperCase()}function St(t){return 32===t||9===t||10===t||13===t}function Mt(t){let e=0;for(;e<t.length&&St(t.charCodeAt(e));e++);let n=t.length-1;for(;n>=e&&St(t.charCodeAt(n));n--);return t.slice(e,n+1)}const Et={mdurl:r,ucmicro:o};function At(t,e,n){let r,o,i,s;const l=t.posMax,a=t.pos;for(t.pos=e+1,r=1;t.pos<l;){if(i=t.src.charCodeAt(t.pos),93===i&&(r--,0===r)){o=!0;break}if(s=t.pos,t.md.inline.skipToken(t),91===i)if(s===t.pos-1)r++;else if(n)return t.pos=a,-1}let c=-1;return o&&(c=t.pos),t.pos=a,c}function Dt(t,e,n){let r,o=e;const i={ok:!1,pos:0,str:""};if(60===t.charCodeAt(o)){for(o++;o<n;){if(r=t.charCodeAt(o),10===r)return i;if(60===r)return i;if(62===r)return i.pos=o+1,i.str=dt(t.slice(e+1,o)),i.ok=!0,i;92===r&&o+1<n?o+=2:o++}return i}let s=0;for(;o<n&&(r=t.charCodeAt(o),32!==r)&&!(r<32||127===r);)if(92===r&&o+1<n){if(32===t.charCodeAt(o+1)){o++;continue}o+=2}else{if(40===r&&(s++,s>32))return i;if(41===r){if(0===s)break;s--}o++}return e===o||0!==s||(i.str=dt(t.slice(e,o)),i.pos=o,i.ok=!0),i}function Tt(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<n;){if(o=t.charCodeAt(i),o===s.marker)return s.pos=i+1,s.str+=dt(t.slice(e,i)),s.ok=!0,s;if(40===o&&41===s.marker)return s;92===o&&i+1<n&&i++,i++}return s.can_continue=!0,s.str+=dt(t.slice(e,i)),s}const Ot={};function Nt(){this.rules=et({},Ot)}Ot.code_inline=function(t,e,n,r,o){const i=t[e];return"<code"+o.renderAttrs(i)+">"+mt(i.content)+"</code>"},Ot.code_block=function(t,e,n,r,o){const i=t[e];return"<pre"+o.renderAttrs(i)+"><code>"+mt(t[e].content)+"</code></pre>\n"},Ot.fence=function(t,e,n,r,o){const i=t[e],s=i.info?dt(i.info).trim():"";let l,a="",c="";if(s){const t=s.split(/(\s+)/g);a=t[0],c=t.slice(2).join("")}if(l=n.highlight&&n.highlight(i.content,a,c)||mt(i.content),0===l.indexOf("<pre"))return l+"\n";if(s){const t=i.attrIndex("class"),e=i.attrs?i.attrs.slice():[];t<0?e.push(["class",n.langPrefix+a]):(e[t]=e[t].slice(),e[t][1]+=" "+n.langPrefix+a);const r={attrs:e};return`<pre><code${o.renderAttrs(r)}>${l}</code></pre>\n`}return`<pre><code${o.renderAttrs(i)}>${l}</code></pre>\n`},Ot.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)},Ot.hardbreak=function(t,e,n){return n.xhtmlOut?"<br />\n":"<br>\n"},Ot.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"}
vendor: 6,297 bytes, line 2
2,Ot.text=function(t,e){return mt(t[e].content)},Ot.html_block=function(t,e){return t[e].content},Ot.html_inline=function(t,e){return t[e].content},Nt.prototype.renderAttrs=function(t){let e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e<n;e++)r+=" "+mt(t.attrs[e][0])+'="'+mt(t.attrs[e][1])+'"';return r},Nt.prototype.renderToken=function(t,e,n){const r=t[e];let o="";if(r.hidden)return"";r.block&&-1!==r.nesting&&e&&t[e-1].hidden&&(o+="\n"),o+=(-1===r.nesting?"</":"<")+r.tag,o+=this.renderAttrs(r),0===r.nesting&&n.xhtmlOut&&(o+=" /");let i=!1;if(r.block&&(i=!0,1===r.nesting&&e+1<t.length)){const n=t[e+1];("inline"===n.type||n.hidden||-1===n.nesting&&n.tag===r.tag)&&(i=!1)}return o+=i?">\n":">",o},Nt.prototype.renderInline=function(t,e,n){let r="";const o=this.rules;for(let i=0,s=t.length;i<s;i++){const s=t[i].type;"undefined"!==typeof o[s]?r+=o[s](t,i,e,n,this):r+=this.renderToken(t,i,e)}return r},Nt.prototype.renderInlineAsText=function(t,e,n){let r="";for(let o=0,i=t.length;o<i;o++)switch(t[o].type){case"text":case"html_inline":case"html_block":r+=t[o].content;break;case"image":r+=this.renderInlineAsText(t[o].children,e,n);break;case"softbreak":case"hardbreak":r+="\n"}return r},Nt.prototype.render=function(t,e,n){let r="";const o=this.rules;for(let i=0,s=t.length;i<s;i++){const s=t[i].type;"inline"===s?r+=this.renderInline(t[i].children,e,n):"undefined"!==typeof o[s]?r+=o[s](t,i,e,n,this):r+=this.renderToken(t,i,e,n)}return r};const _t=Nt;function Rt(){this.__rules__=[],this.__cache__=null}Rt.prototype.__find__=function(t){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1},Rt.prototype.__compile__=function(){const t=this,e=[""];t.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(t){e.indexOf(t)<0&&e.push(t)})}),t.__cache__={},e.forEach(function(e){t.__cache__[e]=[],t.__rules__.forEach(function(n){n.enabled&&(e&&n.alt.indexOf(e)<0||t.__cache__[e].push(n.fn))})})},Rt.prototype.at=function(t,e,n){const r=this.__find__(t),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=o.alt||[],this.__cache__=null},Rt.prototype.before=function(t,e,n,r){const o=this.__find__(t),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},Rt.prototype.after=function(t,e,n,r){const o=this.__find__(t),i=r||{};if(-1===o)throw new Error("Parser rule not found: "+t);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null},Rt.prototype.push=function(t,e,n){const r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null},Rt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(t){const r=this.__find__(t);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[r].enabled=!0,n.push(t)},this),this.__cache__=null,n},Rt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(t,e)},Rt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(t){const r=this.__find__(t);if(r<0){if(e)return;throw new Error("Rules manager: invalid rule name "+t)}this.__rules__[r].enabled=!1,n.push(t)},this),this.__cache__=null,n},Rt.prototype.getRules=function(t){return null===this.__cache__&&this.__compile__(),this.__cache__[t]||[]};const Lt=Rt;function zt(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}zt.prototype.attrIndex=function(t){if(!this.attrs)return-1;const e=this.attrs;for(let n=0,r=e.length;n<r;n++)if(e[n][0]===t)return n;return-1},zt.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},zt.prototype.attrSet=function(t,e){const n=this.attrIndex(t),r=[t,e];n<0?this.attrPush(r):this.attrs[n]=r},zt.prototype.attrGet=function(t){const e=this.attrIndex(t);let n=null;return e>=0&&(n=this.attrs[e][1]),n},zt.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 It=zt;function Ft(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}Ft.prototype.Token=It;const $t=Ft,Pt=/\r\n?|\n/g,Bt=/\0/g;function Ht(t){return/^<a[>\s]/i.test(t)}function jt(t){return/^<\/a\s*>/i.test(t)}const Vt=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,qt=/\((c|tm|r)\)/i,Ut=/\((c|tm|r)\)/gi,Kt={c:"\xa9",r:"\xae",tm:"\u2122"};function Wt(t,e){return Kt[e.toLowerCase()]}function Jt(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(Ut,Wt)),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}function Gt(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];"text"!==r.type||e||Vt.test(r.content)&&(r.content=r.content.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1\u2014").replace(/(^|\s)--(?=\s|$)/gm,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1\u2013")),"link_open"===r.type&&"auto"===r.info&&e--,"link_close"===r.type&&"auto"===r.info&&e++}}const Zt=/['"]/,Yt=/['"]/g;function Xt(t,e,n){for(;t.length>n;){const n=t.pop();n.isSingleQuote?e.single=n.prevSameQuoteIdx:e.double=n.prevSameQuoteIdx}}function Qt(t,e,n,r){t[e]||(t[e]=[]),t[e].push({pos:n,ch:r})}function te(t,e){let n;const r=[],o={single:-1,double:-1},i={};for(let s=0;s<t.length;s++){const l=t[s],a=t[s].level;for(n=r.length-1;n>=0&&!(r[n].level<=a);n--);if(Xt(r,o,n+1),"text"!==l.type)continue;const c=l.content;let d=0;const h=c.length;t:for(;d<h;){Yt.lastIndex=d;const l=Yt.exec(c);if(!l)break;let u=!0,p=!0;d=l.index+1;const f="'"===l[0];let m=32;if(l.index-1>=0)m=c.charCodeAt(l.index-1);else for(n=s-1;n>=0&&("softbreak"!==t[n].type&&"hardbreak"!==t[n].type);n--)if(t[n].content){m=t[n].content.charCodeAt(t[n].content.length-1);break}let g=32;if(d<h)g=c.charCodeAt(d);else for(n=s+1;n<t.length&&("softbreak"!==t[n].type&&"hardbreak"!==t[n].type);n++)if(t[n].content){g=t[n].content.charCodeAt(0);break}
2const y=xt(m)||kt(m),v=xt(g)||kt(g),b=bt(m),w=bt(g);if(w?u=!1:v&&(b||y||(u=!1)),b?p=!1:y&&(w||v||(p=!1)),34===g&&'"'===l[0]&&m>=48&&m<=57&&(p=u=!1),u&&p&&(u=y,p=v),u||p){if(p&&(n=f?o.single:o.double,n>=0&&r[n].level===a)){const t=r[n];let a,c;f?(a=e.md.options.quotes[2],c=e.md.options.quotes[3]):(a=e.md.options.quotes[0],c=e.md.options.quotes[1]),Qt(i,s,l.index,c),Qt(i,t.tokenIdx,t.contentPos,a),Xt(r,o,n);continue t}if(u){if(r.length>=1e3)return;r.push({tokenIdx:s,contentPos:l.index,isSingleQuote:f,level:a,prevSameQuoteIdx:f?o.single:o.double}),f?o.single=r.length-1:o.double=r.length-1}else p&&f&&Qt(i,s,l.index,"\u2019")}else f&&Qt(i,s,l.index,"\u2019")}}Object.keys(i).forEach(function(e){t[e].content=function(t,e){let n="",r=0;e.sort((t,e)=>t.pos-e.pos);for(let o=0;o<e.length;o++){const i=e[o];n+=t.slice(r,i.pos)+i.ch,r=i.pos+1}return n+t.slice(r)}(t[e].content,i[e])})}const ee=[["normalize",function(t){let e;e=t.src.replace(Pt,"\n"),e=e.replace(Bt,"\ufffd"),t.src=e}],["block",function(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.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)}],["inline",function(t){const e=t.tokens;for(let n=0,r=e.length;n<r;n++){const r=e[n];"inline"===r.type&&t.md.inline.parse(r.content,t.md,t.env,r.children)}}],["linkify",function(t){const e=t.tokens;if(t.md.options.linkify)for(let n=0,r=e.length;n<r;n++){if("inline"!==e[n].type||!t.md.linkify.pretest(e[n].content))continue;const r=e[n].children,o=[];let i=0;for(let e=r.length-1;e>=0;e--){const n=r[e];if("link_close"!==n.type){if("html_inline"===n.type&&(Ht(n.content)&&i>0&&i--,jt(n.content)&&i++),!(i>0)&&"text"===n.type&&t.md.linkify.test(n.content)){const i=n.content;let s=t.md.linkify.match(i);const l=[];let a=n.level,c=0;s.length>0&&0===s[0].index&&e>0&&"text_special"===r[e-1].type&&(s=s.slice(1));for(let e=0;e<s.length;e++){const n=s[e].url,r=t.md.normalizeLink(n);if(!t.md.validateLink(r))continue;let o=s[e].text;o=s[e].schema?"mailto:"!==s[e].schema||/^mailto:/i.test(o)?t.md.normalizeLinkText(o):t.md.normalizeLinkText("mailto:"+o).replace(/^mailto:/,""):t.md.normalizeLinkText("http://"+o).replace(/^http:\/\//,"");const d=s[e].index;if(d>c){const e=new t.Token("text","",0);e.content=i.slice(c,d),e.level=a,l.push(e)}const h=new t.Token("link_open","a",1);h.attrs=[["href",r]],h.level=a++,h.markup="linkify",h.info="auto",l.push(h);const u=new t.Token("text","",0);u.content=o,u.level=a,l.push(u);const p=new t.Token("link_close","a",-1);p.level=--a,p.markup="linkify",p.info="auto",l.push(p),c=s[e].lastIndex}if(c<i.length){const e=new t.Token("text","",0);e.content=i.slice(c),e.level=a,l.push(e)}o.push({index:e,nodes:l})}}else for(e--;r[e].level!==n.level&&"link_open"!==r[e].type;)e--}if(o.length>0){let t=r.length;for(const e of o)t+=e.nodes.length-1;const i=new Array(t);let s=0,l=0;o.reverse();for(let e=0;e<r.length;e++){const t=o[s];if(t?.index===e){for(const e of t.nodes)i[l++]=e;s++}else i[l++]=r[e]}e[n].children=i}}}],["replacements",function(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)"inline"===t.tokens[e].type&&(qt.test(t.tokens[e].content)&&Jt(t.tokens[e].children),Vt.test(t.tokens[e].content)&&Gt(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&&Zt.test(t.tokens[e].content)&&te(t.tokens[e].children,t)}],["text_join",function(t){let e,n;const r=t.tokens,o=r.length;for(let i=0;i<o;i++){if("inline"!==r[i].type)continue;const t=r[i].children,o=t.length;for(e=0;e<o;e++)"text_special"===t[e].type&&(t[e].type="text");for(e=n=0;e<o;e++)"text"===t[e].type&&e+1<o&&"text"===t[e+1].type?t[e+1].content=t[e].content+t[e+1].content:(e!==n&&(t[n]=t[e]),n++);e!==n&&(t.length=n)}}]];function ne(){this.ruler=new Lt;for(let t=0;t<ee.length;t++)this.ruler.push(ee[t][0],ee[t][1])}ne.prototype.process=function(t){const e=this.ruler.getRules("");for(let n=0,r=e.length;n<r;n++)e[n](t)},ne.prototype.State=$t;const re=ne;function oe(t,e,n,r){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;const o=this.src;for(let i=0,s=0,l=0,a=0,c=o.length,d=!1;s<c;
vendor: 5,256 bytes, line 2
2s++){const t=o.charCodeAt(s);if(!d){if(vt(t)){l++,9===t?a+=4-a%4:a++;continue}d=!0}10!==t&&s!==c-1||(10!==t&&s++,this.bMarks.push(i),this.eMarks.push(s),this.tShift.push(l),this.sCount.push(a),this.bsCount.push(0),d=!1,l=0,a=0,i=s+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}oe.prototype.push=function(t,e,n){const r=new It(t,e,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r},oe.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},oe.prototype.skipEmptyLines=function(t){for(let e=this.lineMax;t<e&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},oe.prototype.skipSpaces=function(t){for(let e=this.src.length;t<e;t++){if(!vt(this.src.charCodeAt(t)))break}return t},oe.prototype.skipSpacesBack=function(t,e){if(t<=e)return t;for(;t>e;)if(!vt(this.src.charCodeAt(--t)))return t+1;return t},oe.prototype.skipChars=function(t,e){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===e;t++);return t},oe.prototype.skipCharsBack=function(t,e,n){if(t<=n)return t;for(;t>n;)if(e!==this.src.charCodeAt(--t))return t+1;return t},oe.prototype.getLines=function(t,e,n,r){if(t>=e)return"";const o=new Array(e-t);for(let i=0,s=t;s<e;s++,i++){let t=0;const l=this.bMarks[s];let a,c=l;for(a=s+1<e||r?this.eMarks[s]+1:this.eMarks[s];c<a&&t<n;){const e=this.src.charCodeAt(c);if(vt(e))9===e?t+=4-(t+this.bsCount[s])%4:t++;else{if(!(c-l<this.tShift[s]))break;t++}c++}o[i]=t>n?new Array(t-n+1).join(" ")+this.src.slice(c,a):this.src.slice(c,a)}return o.join("")},oe.prototype.Token=It;const ie=oe;function se(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function le(t){const e=[],n=t.length;let r=0,o=t.charCodeAt(r),i=!1,s=0,l="";for(;r<n;)124===o&&(i?(l+=t.substring(s,r-1),s=r):(e.push(l+t.substring(s,r)),l="",s=r+1)),i=92===o,r++,o=t.charCodeAt(r);return e.push(l+t.substring(s)),e}function ae(t,e){const n=t.eMarks[e];let r=t.bMarks[e]+t.tShift[e];const o=t.src.charCodeAt(r++);if(42!==o&&45!==o&&43!==o)return-1;if(r<n){if(!vt(t.src.charCodeAt(r)))return-1}return r}function ce(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];let o=n;if(o+1>=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<r&&(i=t.src.charCodeAt(o),!vt(i))?-1:o}const de="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",he="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",ue=new RegExp("^(?:"+de+"|"+he+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),pe=new RegExp("^(?:"+de+"|"+he+")"),fe=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(pe.source+"\\s*$"),/^$/,!1]];const me=[["table",function(t,e,n,r){if(e+2>n)return!1;let o=e+1;if(t.sCount[o]<t.blkIndent)return!1;if(t.sCount[o]-t.blkIndent>=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 l=t.src.charCodeAt(i++);if(124!==l&&45!==l&&58!==l&&!vt(l))return!1;if(45===s&&vt(l))return!1;for(;i<t.eMarks[o];){const e=t.src.charCodeAt(i);if(124!==e&&45!==e&&58!==e&&!vt(e))return!1;i++}let a=se(t,e+1),c=a.split("|");const d=[];for(let y=0;y<c.length;y++){const t=c[y].trim();if(!t){if(0===y||y===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?d.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?d.push("left"):d.push("")}if(a=se(t,e).trim(),-1===a.indexOf("|"))return!1;if(t.sCount[e]-t.blkIndent>=4)return!1;c=le(a),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const h=c.length;if(0===h||h!==d.length)return!1;if(r)return!0;const u=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 y=0;y<c.length;y++){const e=t.push("th_open","th",1);d[y]&&(e.attrs=[["style","text-align:"+d[y]]]);const n=t.push("inline","",0);n.content=c[y].trim(),n.children=[],t.push("th_close","th",-1)}let m;t.push("tr_close","tr",-1),t.push("thead_close","thead",-1);let g=0;for(o=e+2;o<n&&!(t.sCount[o]<t.blkIndent);o++){let r=!1;for(let e=0,i=p.length;e<i;e++)if(p[e](t,o,n,!0)){r=!0;break}if(r)break;
vendor: 4,236 bytes, line 2
2if(a=se(t,o).trim(),!a)break;if(t.sCount[o]-t.blkIndent>=4)break;if(c=le(a),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),g+=h-c.length,g>65536)break;if(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<h;e++){const n=t.push("td_open","td",1);d[e]&&(n.attrs=[["style","text-align:"+d[e]]]);const r=t.push("inline","",0);r.content=c[e]?c[e].trim():"",r.children=[],t.push("td_close","td",-1)}t.push("tr_close","tr",-1)}return m&&(t.push("tbody_close","tbody",-1),m[1]=o),t.push("table_close","table",-1),f[1]=o,t.parentType=u,t.line=o,!0},["paragraph","reference"]],["code",function(t,e,n){if(t.sCount[e]-t.blkIndent<4)return!1;let r=e+1,o=r;for(;r<n;)if(t.isEmpty(r))r++;else{if(!(t.sCount[r]-t.blkIndent>=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 l=o;o=t.skipChars(o,s);let a=o-l;if(a<3)return!1;const c=t.src.slice(l,o),d=t.src.slice(o,i);if(96===s&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let h=e,u=!1;for(;(h++,!(h>=n))&&(o=l=t.bMarks[h]+t.tShift[h],i=t.eMarks[h],!(o<i&&t.sCount[h]<t.blkIndent));)if(t.src.charCodeAt(o)===s&&!(t.sCount[h]-t.blkIndent>=4)&&(o=t.skipChars(o,s),!(o-l<a)&&(o=t.skipSpaces(o),!(o<i)))){u=!0;break}a=t.sCount[e],t.line=h+(u?1:0);const p=t.push("fence","code",0);return p.info=d,p.content=t.getLines(e+1,h,a,!0),p.markup=c,p.map=[e,t.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];const s=t.lineMax;if(t.sCount[e]-t.blkIndent>=4)return!1;if(62!==t.src.charCodeAt(o))return!1;if(r)return!0;const l=[],a=[],c=[],d=[],h=t.md.block.ruler.getRules("blockquote"),u=t.parentType;t.parentType="blockquote";let p,f=!1;for(p=e;p<n;p++){const e=t.sCount[p]<t.blkIndent;if(o=t.bMarks[p]+t.tShift[p],i=t.eMarks[p],o>=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(l.push(t.bMarks[p]),t.bMarks[p]=o;o<i;){const e=t.src.charCodeAt(o);if(!vt(e))break;9===e?s+=4-(s+t.bsCount[p]+(n?1:0))%4:s++,o++}f=o>=i,a.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 o=0,i=h.length;o<i;o++)if(h[o](t,p,n,!0)){r=!0;break}if(r){t.lineMax=p,0!==t.blkIndent&&(l.push(t.bMarks[p]),a.push(t.bsCount[p]),d.push(t.tShift[p]),c.push(t.sCount[p]),t.sCount[p]-=t.blkIndent);break}l.push(t.bMarks[p]),a.push(t.bsCount[p]),d.push(t.tShift[p]),c.push(t.sCount[p]),t.sCount[p]=-1}const m=t.blkIndent;t.blkIndent=0;const g=t.push("blockquote_open","blockquote",1);g.markup=">";const y=[e,0];g.map=y,t.md.block.tokenize(t,e,p),t.push("blockquote_close","blockquote",-1).markup=">",t.lineMax=s,t.parentType=u,y[1]=t.line;for(let v=0;v<d.length;v++)t.bMarks[v+e]=l[v],t.tShift[v+e]=d[v],t.sCount[v+e]=c[v],t.bsCount[v+e]=a[v];return t.blkIndent=m,!0},["paragraph","reference","blockquote","list"]],["hr",function(t,e,n,r){const o=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=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 l=1;for(;i<o;){const e=t.src.charCodeAt(i++);if(e!==s&&!vt(e))return!1;e===s&&l++}if(l<3)return!1;if(r)return!0;t.line=e+1;const a=t.push("hr","hr",0);return a.map=[e,t.line],a.markup=Array(l+1).join(String.fromCharCode(s)),!0},["paragraph","reference","blockquote","list"]],["list",function(t,e,n,r){let o,i,s,l,a=e,c=!0;if(t.sCount[a]-t.blkIndent>=4)return!1;if(t.listIndent>=0&&t.sCount[a]-t.listIndent>=4&&t.sCount[a]<t.blkIndent)return!1;let d,h,u,p=!1;if(r&&"paragraph"===t.parentType&&t.sCount[a]>=t.blkIndent&&(p=!0),(u=ce(t,a))>=0){if(d=!0,s=t.bMarks[a]+t.tShift[a],h=Number(t.src.slice(s,u-1)),p&&1!==h)return!1}else{if(!((u=ae(t,a))>=0))return!1;d=!1}if(p&&t.skipSpaces(u)>=t.eMarks[a])return!1;if(r)return!0;
vendor: 1,557 bytes, line 2
2const f=t.src.charCodeAt(u-1),m=t.tokens.length;d?(l=t.push("ordered_list_open","ol",1),1!==h&&(l.attrs=[["start",h]])):l=t.push("bullet_list_open","ul",1);const g=[a,0];l.map=g,l.markup=String.fromCharCode(f);let y=!1;const v=t.md.block.ruler.getRules("list"),b=t.parentType;for(t.parentType="list";a<n;){i=u,o=t.eMarks[a];const e=t.sCount[a]+u-(t.bMarks[a]+t.tShift[a]);let r=e;for(;i<o;){const e=t.src.charCodeAt(i);if(9===e)r+=4-(r+t.bsCount[a])%4;else{if(32!==e)break;r++}i++}const h=i;let p;p=h>=o?1:r-e,p>4&&(p=1);const m=e+p;l=t.push("list_item_open","li",1),l.markup=String.fromCharCode(f);const g=[a,0];l.map=g,d&&(l.info=t.src.slice(s,u-1));const b=t.tight,w=t.tShift[a],k=t.sCount[a],x=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=m,t.tight=!0,t.tShift[a]=h-t.bMarks[a],t.sCount[a]=r,h>=o&&t.isEmpty(a+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,a,n,!0),t.tight&&!y||(c=!1),y=t.line-a>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=x,t.tShift[a]=w,t.sCount[a]=k,t.tight=b,l=t.push("list_item_close","li",-1),l.markup=String.fromCharCode(f),a=t.line,g[1]=a,a>=n)break;if(t.sCount[a]<t.blkIndent)break;if(t.sCount[a]-t.blkIndent>=4)break;let C=!1;for(let o=0,i=v.length;o<i;o++)if(v[o](t,a,n,!0)){C=!0;break}if(C)break;if(d){if(u=ce(t,a),u<0)break;s=t.bMarks[a]+t.tShift[a]}else if(u=ae(t,a),u<0)break;if(f!==t.src.charCodeAt(u-1))break}return l=d?t.push("ordered_list_close","ol",-1):t.push("bullet_list_close","ul",-1),l.markup=String.fromCharCode(f),g[1]=a,t.line=a,t.parentType=b,c&&function(t,e){const n=t.level
vendor: 8,705 bytes, line 2
2+2;for(let r=e+2,o=t.tokens.length-2;r<o;r++)t.tokens[r].level===n&&"paragraph_open"===t.tokens[r].type&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}(t,m),!0},["paragraph","reference","blockquote"]],["reference",function(t,e,n,r){let o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e],s=e+1;if(t.sCount[e]-t.blkIndent>=4)return!1;if(91!==t.src.charCodeAt(o))return!1;function l(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 s=0,l=r.length;s<l;s++)if(r[s](t,e,n,!0)){i=!0;break}if(t.parentType=o,i)return null}const o=t.bMarks[e]+t.tShift[e],i=t.eMarks[e];return t.src.slice(o,i+1)}let a=t.src.slice(o,i+1);i=a.length;let c=-1;for(o=1;o<i;o++){const t=a.charCodeAt(o);if(91===t)return!1;if(93===t){c=o;break}if(10===t){const t=l(s);null!==t&&(a+=t,i=a.length,s++)}else if(92===t&&(o++,o<i&&10===a.charCodeAt(o))){const t=l(s);null!==t&&(a+=t,i=a.length,s++)}}if(c<0||58!==a.charCodeAt(c+1))return!1;for(o=c+2;o<i;o++){const t=a.charCodeAt(o);if(10===t){const t=l(s);null!==t&&(a+=t,i=a.length,s++)}else if(!vt(t))break}const d=t.md.helpers.parseLinkDestination(a,o,i);if(!d.ok)return!1;const h=t.md.normalizeLink(d.str);if(!t.md.validateLink(h))return!1;o=d.pos;const u=o,p=s,f=o;for(;o<i;o++){const t=a.charCodeAt(o);if(10===t){const t=l(s);null!==t&&(a+=t,i=a.length,s++)}else if(!vt(t))break}let m,g=t.md.helpers.parseLinkTitle(a,o,i);for(;g.can_continue;){const e=l(s);if(null===e)break;a+=e,o=i,i=a.length,s++,g=t.md.helpers.parseLinkTitle(a,o,i,g)}for(o<i&&f!==o&&g.ok?(m=g.str,o=g.pos):(m="",o=u,s=p);o<i;){if(!vt(a.charCodeAt(o)))break;o++}if(o<i&&10!==a.charCodeAt(o)&&m)for(m="",o=u,s=p;o<i;){if(!vt(a.charCodeAt(o)))break;o++}if(o<i&&10!==a.charCodeAt(o))return!1;const y=Ct(a.slice(1,c));return!!y&&(r||("undefined"===typeof t.env.references&&(t.env.references={}),"undefined"===typeof t.env.references[y]&&(t.env.references[y]={title:m,href:h}),t.line=s),!0)}],["html_block",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(!t.md.options.html)return!1;if(60!==t.src.charCodeAt(o))return!1;let s=t.src.slice(o,i),l=0;for(;l<fe.length&&!fe[l][0].test(s);l++);if(l===fe.length)return!1;if(r)return fe[l][2];let a=e+1;const c=fe[l][1].test("");if(!fe[l][1].test(s))for(;a<n&&(!(t.sCount[a]<t.blkIndent)||!c&&t.isEmpty(a));a++)if(o=t.bMarks[a]+t.tShift[a],i=t.eMarks[a],s=t.src.slice(o,i),fe[l][1].test(s)){0!==s.length&&a++;break}t.line=a;const d=t.push("html_block","",0);return d.map=[e,a],d.content=t.getLines(e,a,t.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",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;let s=t.src.charCodeAt(o);if(35!==s||o>=i)return!1;let l=1;for(s=t.src.charCodeAt(++o);35===s&&o<i&&l<=6;)l++,s=t.src.charCodeAt(++o);if(l>6||o<i&&!vt(s))return!1;if(r)return!0;i=t.skipSpacesBack(i,o);const a=t.skipCharsBack(i,35,o);a>o&&vt(t.src.charCodeAt(a-1))&&(i=a),t.line=e+1;const c=t.push("heading_open","h"+String(l),1);c.markup="########".slice(0,l),c.map=[e,t.line];const d=t.push("inline","",0);return d.content=Mt(t.src.slice(o,i)),d.map=[e,t.line],d.children=[],t.push("heading_close","h"+String(l),-1).markup="########".slice(0,l),!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,l=e+1;for(;l<n&&!t.isEmpty(l);l++){if(t.sCount[l]-t.blkIndent>3)continue;if(t.sCount[l]>=t.blkIndent){let e=t.bMarks[l]+t.tShift[l];const n=t.eMarks[l];if(e<n&&(i=t.src.charCodeAt(e),(45===i||61===i)&&(e=t.skipChars(e,i),e=t.skipSpaces(e),e>=n))){s=61===i?1:2;break}}if(t.sCount[l]<0)continue;let e=!1;for(let o=0,i=r.length;o<i;o++)if(r[o](t,l,n,!0)){e=!0;break}if(e)break}if(!s)return t.parentType=o,!1;const a=Mt(t.getLines(e,l,t.blkIndent,!1));t.line=l+1;const c=t.push("heading_open","h"+String(s),1);c.markup=String.fromCharCode(i),c.map=[e,t.line];const d=t.push("inline","",0);return d.content=a,d.map=[e,t.line-1],d.children=[],t.push("heading_close","h"+String(s),-1).markup=String.fromCharCode(i),t.parentType=o,!0}],["paragraph",function(t,e,n){const r=t.md.block.ruler.getRules("paragraph"),o=t.parentType;let i=e+1;for(t.parentType="paragraph";i<n&&!t.isEmpty(i);i++){if(t.sCount[i]-t.blkIndent>3)continue;if(t.sCount[i]<0)continue;let e=!1;for(let o=0,s=r.length;o<s;o++)if(r[o](t,i,n,!0)){e=!0;break}if(e)break}const s=Mt(t.getLines(e,i,t.blkIndent,!1));t.line=i,t.push("paragraph_open","p",1).map=[e,t.line];const l=t.push("inline","",0);return l.content=s,l.map=[e,t.line],l.children=[],t.push("paragraph_close","p",-1),t.parentType=o,!0}]];function ge(){this.ruler=new Lt;for(let t=0;t<me.length;t++)this.ruler.push(me[t][0],me[t][1],{alt:(me[t][2]||[]).slice()})}ge.prototype.tokenize=function(t,e,n){const r=this.ruler.getRules(""),o=r.length,i=t.md.options.maxNesting;let s=e,l=!1;for(;s<n&&(t.line=s=t.skipEmptyLines(s),!(s>=n))&&!(t.sCount[s]<t.blkIndent);){if(t.level>=i){t.line=n;break}const e=t.line;let a=!1;for(let i=0;i<o;i++)if(a=r[i](t,s,n,!1),a){if(e>=t.line)throw new Error("block rule didn't increment state.line");break}if(!a)throw new Error("none of the block rules matched");t.tight=!l,t.isEmpty(t.line-1)&&(l=!0),s=t.line,s<n&&t.isEmpty(s)&&(l=!0,s++,t.line=s)}},ge.prototype.parse=function(t,e,n,r){if(!t)return;const o=new this.State(t,e,n,r);this.tokenize(o,o.line,o.lineMax)},ge.prototype.State=ie;const ye=ge;function ve(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}ve.prototype.pushPending=function(){const t=new It("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t},ve.prototype.push=function(t,e,n){this.pending&&this.pushPending();const r=new It(t,e,n);let o=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(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},ve.prototype.scanDelims=function(t,e){const n=this.posMax,r=this.src.charCodeAt(t);let o;if(0===t)o=32;else if(1===t)o=this.src.charCodeAt(0),55296===(63488&o)&&(o=65533);else if(o=this.src.charCodeAt(t-1),56320===(64512&o)){const e=this.src.charCodeAt(t-2);o=55296===(64512&e)?65536+(e-55296<<10)+(o-56320):65533}else 55296===(64512&o)&&(o=65533);let i=t;for(;i<n&&this.src.charCodeAt(i)===r;)i++;const s=i-t;let l=i<n?this.src.charCodeAt(i):32;if(55296===(64512&l)){const t=this.src.charCodeAt(i+1);l=56320===(64512&t)?65536+(l-55296<<10)+(t-56320):65533}else 56320===(64512&l)&&(l=65533);const a=xt(o)||kt(o),c=xt(l)||kt(l),d=bt(o),h=bt(l),u=!h&&(!c||d||a),p=!d&&(!a||h||c);return{can_open:u&&(e||!p||a),can_close:p&&(e||!u||c),length:s}},ve.prototype.Token=It;const be=ve;function we(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}}function ke(t){return t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||43===t||45===t||46===t}const xe=[];for(let br=0;br<256;br++)xe.push(0);function Ce(t,e){let n;const r=[],o=e.length;for(let i=0;i<o;i++){const o=e[i];if(126!==o.marker)continue;if(-1===o.end)continue;const s=e[o.end];n=t.tokens[o.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=t.tokens[s.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="","text"===t.tokens[s.token-1].type&&"~"===t.tokens[s.token-1].content&&r.push(s.token-1)}for(;r.length;){const e=r.pop();let o=e+1;for(;o<t.tokens.length&&"s_close"===t.tokens[o].type;)o++;o--,e!==o&&(n=t.tokens[o],t.tokens[o]=t.tokens[e],t.tokens[e]=n)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){xe[t.charCodeAt(0)]=1});const Se={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 l;i%2&&(l=t.push("text","",0),l.content=s,i--);for(let a=0;a<i;a+=2)l=t.push("text","",0),l.content=s+s,t.delimiters.push({marker:r,length:0,token:t.tokens.length-1,end:-1,open:o.can_open,close:o.c
vendor: 2,368 bytes, line 2
2an_close});return t.pos+=o.length,!0},postProcess:function(t){const e=t.tokens_meta,n=t.tokens_meta.length;Ce(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&Ce(t,e[r].delimiters)}};function Me(t,e){for(let n=e.length-1;n>=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),l=t.tokens[r.token];l.type=i?"strong_open":"em_open",l.tag=i?"strong":"em",l.nesting=1,l.markup=i?s+s:s,l.content="";const a=t.tokens[o.token];a.type=i?"strong_close":"em_close",a.tag=i?"strong":"em",a.nesting=-1,a.markup=i?s+s:s,a.content="",i&&(t.tokens[e[n-1].token].content="",t.tokens[e[r.end+1].token].content="",n--)}}const Ee={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 i=0;i<o.length;i++){t.push("text","",0).content=String.fromCharCode(r),t.delimiters.push({marker:r,length:o.length,token:t.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return t.pos+=o.length,!0},postProcess:function(t){const e=t.tokens_meta,n=t.tokens_meta.length;Me(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&Me(t,e[r].delimiters)}};const Ae=/^([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])?)*)$/,De=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const Te=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Oe=/^&([a-z][a-z0-9]{1,31});/i;function Ne(t){const e={},n=t.length;if(!n)return;let r=0,o=-2;const i=[];for(let s=0;s<n;s++){const n=t[s];if(i.push(0),t[r].marker===n.marker&&o===n.token-1||(r=s),o=n.token,n.length=n.length||0,!n.close)continue;e.hasOwnProperty(n.marker)||(e[n.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[n.marker][(n.open?3:0)+n.length%3];let a=r-i[r]-1,c=a;for(;a>l;a-=i[a]+1){const e=t[a];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=a>0&&!t[a-1].open?i[a-1]+1:0;i[s]=s-a+r,i[a]=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 _e=[["text",function(t,e){let n=t.pos;for(;n<t.posMax&&!we(t.src.charCodeAt(n));)n++;
2return n!==t.pos&&(e||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}],["linkify",function(t,e){if(!t.md.options.linkify)return!1;if(t.linkLevel>0)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=n-Math.min(10,t.pending.length,n);let o=n;for(;o>r&&ke(t.src.charCodeAt(o-1));)o--;if(o===n||!function(t){return t>=65&&t<=90||t>=97&&t<=122}(t.src.charCodeAt(o)))return!1;const i=n-o,s=t.md.linkify.matchAtStart(t.src.slice(o));if(!s)return!1;let l=s.url;if(l.length<=i)return!1;let a=l.length;for(;a>0&&42===l.charCodeAt(a-1);)a--;a!==l.length&&(l=l.slice(0,a));const c=t.md.normalizeLink(l);if(!t.md.validateLink(c))return!1;if(!e){t.pending=t.pending.slice(0,-i);const e=t.push("link_open","a",1);e.attrs=[["href",c]],e.markup="linkify",e.info="auto";t.push("text","",0).content=t.md.normalizeLinkText(l);const n=t.push("link_close","a",-1);n.markup="linkify",n.info="auto"}return t.pos+=l.length-i,!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<o&&vt(t.src.charCodeAt(n));)n++;
vendor: 4,618 bytes, line 2
2return t.pos=n,!0}],["escape",function(t,e){let n=t.pos;const r=t.posMax;if(92!==t.src.charCodeAt(n))return!1;if(n++,n>=r)return!1;let o=t.src.charCodeAt(n);if(10===o){for(e||t.push("hardbreak","br",0),n++;n<r&&(o=t.src.charCodeAt(n),vt(o));)n++;return t.pos=n,!0}if(32===o){if(!e){const e=t.push("text_special","",0);e.content="\\",e.markup="\\",e.info="escape"}return t.pos=n,!0}let i=t.src[n];if(o>=55296&&o<=56319&&n+1<r){const e=t.src.charCodeAt(n+1);e>=56320&&e<=57343&&(i+=t.src[n+1],n++)}const s="\\"+i;if(!e){const e=t.push("text_special","",0);o<256&&0!==xe[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<o&&96===t.src.charCodeAt(n);)n++;const i=t.src.slice(r,n),s=i.length;if(t.backticksScanned&&(t.backticks[s]||0)<=r)return e||(t.pending+=i),t.pos+=s,!0;let l,a=n;for(;-1!==(l=t.src.indexOf("`",a));){for(a=l+1;a<o&&96===t.src.charCodeAt(a);)a++;const r=a-l;if(r===s){if(!e){const e=t.push("code_inline","code",0);e.markup=i,e.content=t.src.slice(n,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return t.pos=a,!0}t.backticks[r]=l}return t.backticksScanned=!0,e||(t.pending+=i),t.pos+=s,!0}],["strikethrough",Se.tokenize],["emphasis",Ee.tokenize],["link",function(t,e){let n,r,o,i,s="",l="",a=t.pos,c=!0;if(91!==t.src.charCodeAt(t.pos))return!1;const d=t.pos,h=t.posMax,u=t.pos+1,p=t.md.helpers.parseLinkLabel(t,t.pos,!0);if(p<0)return!1;let f=p+1;if(f<h&&40===t.src.charCodeAt(f)){for(c=!1,f++;f<h&&(n=t.src.charCodeAt(f),vt(n)||10===n);f++);if(f>=h)return!1;if(a=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="",a=f;f<h&&(n=t.src.charCodeAt(f),vt(n)||10===n);f++);if(o=t.md.helpers.parseLinkTitle(t.src,f,t.posMax),f<h&&a!==f&&o.ok)for(l=o.str,f=o.pos;f<h&&(n=t.src.charCodeAt(f),vt(n)||10===n);f++);}(f>=h||41!==t.src.charCodeAt(f))&&(c=!0),f++}if(c){if("undefined"===typeof t.env.references)return!1;if(f<h&&91===t.src.charCodeAt(f)?(a=f+1,f=t.md.helpers.parseLinkLabel(t,f),f>=0?r=t.src.slice(a,f++):f=p+1):f=p+1,r||(r=t.src.slice(u,p)),i=t.env.references[Ct(r)],!i)return t.pos=d,!1;s=i.href,l=i.title}if(!e){t.pos=u,t.posMax=p;const e=[["href",s]];t.push("link_open","a",1).attrs=e,l&&e.push(["title",l]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=f,t.posMax=h,!0}],["image",function(t,e){let n,r,o,i,s,l,a,c,d="";const h=t.pos,u=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<u&&40===t.src.charCodeAt(i)){for(i++;i<u&&(n=t.src.charCodeAt(i),vt(n)||10===n);i++);if(i>=u)return!1;for(c=i,l=t.md.helpers.parseLinkDestination(t.src,i,t.posMax),l.ok&&(d=t.md.normalizeLink(l.str),t.md.validateLink(d)?i=l.pos:d=""),c=i;i<u&&(n=t.src.charCodeAt(i),vt(n)||10===n);i++);if(l=t.md.helpers.parseLinkTitle(t.src,i,t.posMax),i<u&&c!==i&&l.ok)for(a=l.str,i=l.pos;i<u&&(n=t.src.charCodeAt(i),vt(n)||10===n);i++);else a="";if(i>=u||41!==t.src.charCodeAt(i))return t.pos=h,!1;i++}else{if("undefined"===typeof t.env.references)return!1;if(i<u&&91===t.src.charCodeAt(i)?(c=i+1,i=t.md.helpers.parseLinkLabel(t,i),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[Ct(o)],!s)return t.pos=h,!1;d=s.href,a=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,a&&o.push(["title",a])}return t.pos=i,t.posMax=u,!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(De.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(Ae.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;
vendor: 1,949 bytes, line 2
2const 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(ue);if(!i)return!1;if(!e){const e=t.push("html_inline","",0);e.content=i[0],s=e.content,/^<a[>\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(Te);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=rt(e)?ot(e):ot(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=(o=r[0],Y(o,q.Strict));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}}}var o;return!1}]],Re=[["balance_pairs",function(t){const e=t.tokens_meta,n=t.tokens_meta.length;Ne(t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&Ne(e[r].delimiters)}],["strikethrough",Se.postProcess],["emphasis",Ee.postProcess],["fragments_join",function(t){let e,n,r=0;const o=t.tokens,i=t.tokens.length;for(e=n=0;e<i;e++)o[e].nesting<0&&r--,o[e].level=r,o[e].nesting>0&&r++,"text"===o[e].type&&e+1<i&&"text"===o[e+1].type?o[e+1].content=o[e].content+o[e+1].content:(e!==n&&(o[n]=o[e]),n++);e!==n&&(o.length=n)}]];function Le(){this.ruler=new Lt;for(let t=0;t<_e.length;t++)this.ruler.push(_e[t][0],_e[t][1]);this.ruler2=new Lt;for(let t=0;t<Re.length;t++)this.ruler2.push(Re[t][0],Re[t][1])}Le.prototype.skipToken=function(t){const e=t.pos,n=this.ruler.getRules(""),r=n.length,o=t.md.options.maxNesting,i=t.cache;if("undefined"!==typeof i[e])return void(t.pos=i[e]);let s=!1;if(t.level<o){for(let l=0;l<r;
vendor: 10,190 bytes, line 2
2l++)if(t.level++,s=n[l](t,!0),t.level--,s){if(e>=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<r;){const i=t.pos;let s=!1;if(t.level<o)for(let r=0;r<n;r++)if(s=e[r](t,!1),s){if(i>=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 l=0;l<s;l++)i[l](o)},Le.prototype.State=be;const ze=Le;function Ie(t){const e={};t=t||{},e.src_Any=N.source,e.src_Cc=_.source,e.src_Z=L.source,e.src_P=T.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const n="[><\uff5c]";return e.src_pseudo_letter=`(?:(?!${n}|${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}|[@/\\[\\]()]).){1,50}@)?`,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=`(?=$|${n}|${e.src_ZPCc})(?!${t["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${e.src_ZPCc}))`,e.src_path=`(?:[/?#](?:(?!${e.src_ZCc}|${n}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${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_]{0,63}',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=`(^|${n}|"|\\(|${e.src_ZCc})(${e.src_email_name}@${e.tpl_host_fuzzy_strict})`,e.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${e.src_ZPCc}))((?![$+<=>^\`|\uff5c])${e.tpl_host_port_fuzzy_strict}${e.src_path})`,e.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${e.src_ZPCc}))((?![$+<=>^\`|\uff5c])${e.tpl_host_port_no_ip_fuzzy_strict}${e.src_path})`,e}function Fe(t){return Array.prototype.slice.call(arguments,1).forEach(function(e){e&&Object.keys(e).forEach(function(n){t[n]=e[n]})}),t}function $e(t){return Object.prototype.toString.call(t)}function Pe(t){return"[object Function]"===$e(t)}function Be(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}n.dn(Ie);const He={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const je={"http:":{validate:function(t,e,n){const 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){const 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){const 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}}},Ve="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function qe(t){const e=t.re=Ie(t.__opts__),n=t.__tlds__.slice();function r(t){return t.replace("%TLDS%",e.src_tlds)}t.onCompile(),t.__tlds_replaced__||n.push("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]"),n.push(e.src_xn),e.src_tlds=n.join("|"),e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.email_fuzzy_global=RegExp(r(e.tpl_email_fuzzy),"ig"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_fuzzy_global=RegExp(r(e.tpl_link_fuzzy),"ig"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.link_no_ip_fuzzy_global=RegExp(r(e.tpl_link_no_ip_fuzzy),"ig"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");const o=[];function i(t,e){throw new Error(`(LinkifyIt) Invalid schema "${t}": ${e}`)}t.__compiled__={},Object.keys(t.__schemas__).forEach(function(e){const n=t.__schemas__[e];if(null===n)return;const r={validate:null,link:null};if(t.__compiled__[e]=r,"[object Object]"===$e(n))return!function(t){return"[object RegExp]"===$e(t)}(n.validate)?Pe(n.validate)?r.validate=n.validate:i(e,n):r.validate=function(t){return function(e,n){const r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}(n.validate),void(Pe(n.normalize)?r.normalize=n.normalize:n.normalize?i(e,n):r.normalize=function(t,e){e.normalize(t)});!function(t){return"[object String]"===$e(t)}(n)?i(e,n):o.push(e)}),o.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)}};const s=Object.keys(t.__compiled__).filter(function(e){return e.length>0&&t.__compiled__[e]}).map(Be).join("|");t.re.schema_test=RegExp(`(^|(?!_)(?:[><\uff5c]|${e.src_ZPCc}))(${s})`,"i"),t.re.schema_search=RegExp(`(^|(?!_)(?:[><\uff5c]|${e.src_ZPCc}))(${s})`,"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 Ue(t,e,n,r){const o=t.slice(n,r);this.schema=e.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=o,this.text=o,this.url=o}function Ke(t,e){if(!(this instanceof Ke))return new Ke(t,e);var n;e||(n=t,Object.keys(n||{}).reduce(function(t,e){return t||He.hasOwnProperty(e)},!1)&&(e=t,t={})),this.__opts__=Fe({},He,e),this.__schemas__=Fe({},je,t),this.__compiled__={},this.__tlds__=Ve,this.__tlds_replaced__=!1,this.re={},qe(this)}Ke.prototype.add=function(t,e){return this.__schemas__[t]=e,qe(this),this},Ke.prototype.set=function(t){return this.__opts__=Fe(this.__opts__,t),this},Ke.prototype.test=function(t){if(!t.length)return!1;let e,n;if(this.re.schema_test.test(t))for(n=this.re.schema_search,n.lastIndex=0;null!==(e=n.exec(t));)if(this.testSchemaAt(t,e[2],n.lastIndex))return!0;return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&t.search(this.re.host_fuzzy_test)>=0&&null!==t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))||!!(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&t.indexOf("@")>=0&&null!==t.match(this.re.email_fuzzy))},Ke.prototype.pretest=function(t){return this.re.pretest.test(t)},Ke.prototype.testSchemaAt=function(t,e,n){return this.__compiled__[e.toLowerCase()]?this.__compiled__[e.toLowerCase()].validate(t,n,this):0},Ke.prototype.match=function(t){const e=[],n=[],r=[],o=[];let i,s,l;function a(t,e){return t?e?t.index!==e.index?t.index<e.index?t:e:t.lastIndex>=e.lastIndex?t:e:t:e}if(!t.length)return null;if(this.re.schema_test.test(t))for(l=this.re.schema_search,l.lastIndex=0;null!==(i=l.exec(t));)s=this.testSchemaAt(t,i[2],l.lastIndex),s&&n.push({schema:i[2],index:i.index+i[1].length,lastIndex:i.index+i[0].length+s});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(l=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,l.lastIndex=0;null!==(i=l.exec(t));)r.push({schema:"",index:i.index+i[1].length,lastIndex:i.index+i[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(l=this.re.email_fuzzy_global,l.lastIndex=0;null!==(i=l.exec(t));)o.push({schema:"mailto:",index:i.index+i[1].length,lastIndex:i.index+i[0].length});const c=[0,0,0];let d=0;for(;;){const i=[n[c[0]],o[c[1]],r[c[2]]],s=a(a(i[0],i[1]),i[2]);if(!s)break;if(s===i[0]?c[0]++:s===i[1]?c[1]++:c[2]++,s.index<d)continue;const l=new Ue(t,s.schema,s.index,s.lastIndex);this.__compiled__[l.schema].normalize(l,this),e.push(l),d=s.lastIndex}return e.length?e:null},Ke.prototype.matchAtStart=function(t){if(!t.length)return null;const e=this.re.schema_at_start.exec(t);if(!e)return null;const n=this.testSchemaAt(t,e[2],e[0].length);if(!n)return null;const r=new Ue(t,e[2],e.index+e[1].length,e.index+e[0].length+n);return this.__compiled__[r.schema].normalize(r,this),r},Ke.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(),qe(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,qe(this),this)},Ke.prototype.normalize=function(t){t.schema||(t.url=`http://${t.url}`),"mailto:"!==t.schema||/^mailto:/i.test(t.url)||(t.url=`mailto:${t.url}`)},Ke.prototype.onCompile=function(){};const We=Ke,Je=2147483647,Ge=36,Ze=/^xn--/,Ye=/[^\0-\x7F]/,Xe=/[\x2E\u3002\uFF0E\uFF61]/g,Qe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
2= 0x80 (not a basic code point)","invalid-input":"Invalid input"},tn=Math.floor,en=String.fromCharCode;function nn(t){throw new RangeError(Qe[t])}function rn(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(Xe,".")).split("."),e).join(".");return r+o}function on(t){const e=[];let n=0;const r=t.length;for(;n<r;){const o=t.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=t.charCodeAt(n++);56320==(64512&r)?e.push(((1023&o)<<10)+(1023&r)+65536):(e.push(o),n--)}else e.push(o)}return e}const sn=function(t){return t>=48&&t<58?t-48+26:t>=65&&t<91?t-65:t>=97&&t<123?t-97:Ge},ln=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},an=function(t,e,n){let r=0;for(t=n?tn(t/700):t>>1,t+=tn(t/e);t>455;r+=Ge)t=tn(t/35);return tn(r+36*t/(t+38))},cn=function(t){const e=[],n=t.length;let r=0,o=128,i=72,s=t.lastIndexOf("-");s<0&&(s=0);for(let l=0;l<s;++l)t.charCodeAt(l)>=128&&nn("not-basic"),e.push(t.charCodeAt(l));for(let l=s>0?s+1:0;l<n;){const s=r;for(let e=1,o=Ge;;o+=Ge){l>=n&&nn("invalid-input");const s=sn(t.charCodeAt(l++));s>=Ge&&nn("invalid-input"),s>tn((Je-r)/e)&&nn("overflow"),r+=s*e;const a=o<=i?1:o>=i+26?26:o-i;if(s<a)break;const c=Ge-a;e>tn(Je/c)&&nn("overflow"),e*=c}const a=e.length+1;i=an(r-s,a,0==s),tn(r/a)>Je-o&&nn("overflow"),o+=tn(r/a),r%=a,e.splice(r++,0,o)}return String.fromCodePoint(...e)},dn=function(t){const e=[],n=(t=on(t)).length;let r=128,o=0,i=72;for(const a of t)a<128&&e.push(en(a));const s=e.length;let l=s;for(s&&e.push("-");l<n;){let n=Je;for(const e of t)e>=r&&e<n&&(n=e);const a=l+1;n-r>tn((Je-o)/a)&&nn("overflow"),o+=(n-r)*a,r=n;for(const c of t)if(c<r&&++o>Je&&nn("overflow"),c===r){let t=o;for(let n=Ge;;n+=Ge){const r=n<=i?1:n>=i+26?26:n-i;if(t<r)break;const o=t-r,s=Ge-r;e.push(en(ln(r+o%s,0))),t=tn(o/s)}e.push(en(ln(t,0))),i=an(o,a,l===s),o=0,++l}++o,++r}return e.join("")},hn={version:"2.3.1",ucs2:{decode:on,encode:t=>String.fromCodePoint(...t)},decode:cn,encode:dn,toASCII:function(t){return rn(t,function(t){return Ye.test(t)?"xn--"+dn(t):t})},toUnicode:function(t){return rn(t,function(t){return Ze.test(t)?cn(t.slice(4).toLowerCase()):t})}},un={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201c\u201d\u2018\u2019",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"]}}}},pn=/^(vbscript|javascript|file|data):/,fn=/^data:image\/(gif|png|jpeg|webp);/;function mn(t){const e=t.trim().toLowerCase();return!pn.test(e)||fn.test(e)}const gn=["http:","https:","mailto:"];function yn(t){const e=D(t,!0);if(e.hostname&&(!e.protocol||gn.indexOf(e.protocol)>=0))try{e.hostname=hn.toASCII(e.hostname)}catch(n){}return f(m(e))}function vn(t){const e=D(t,!0);if(e.hostname&&(!e.protocol||gn.indexOf(e.protocol)>=0))try{e.hostname=hn.toUnicode(e.hostname)}catch(n){}return h(m(e),h.defaultChars+"%")}function bn(t,e){if(!(this instanceof bn))return new bn(t,e);e||X(t)||(e=t||{},t="default"),this.inline=new ze,this.block=new ye,this.core=new re,this.renderer=new _t,this.linkify=new We,this.validateLink=mn,this.normalizeLink=yn,this.normalizeLinkText=vn,this.utils=i,this.helpers=et({},s),this.options={},this.configure(t),e&&this.set(e)}bn.prototype.set=function(t){return et(this.options,t),this},bn.prototype.configure=function(t){const e=this;if(X(t)){const e=t;if(!(t=un[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).forEac
2h(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},bn.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},bn.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},bn.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this},bn.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},bn.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)},bn.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens},bn.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const wn=bn,kn=new a.Sj({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:{code:!0,parseDOM:[{tag:"code"}],toDOM:()=>["code"]}}});class xn{constructor(t,e){this.schema=t,this.tokenHandlers=e,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:a.
vendor: 7,046 bytes, line 2
2CU.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&&a.CU.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.length;e++){let n=t[e],r=this.tokenHandlers[n.type];if(!r)throw new Error("Token type `"+n.type+"` not supported by Markdown parser");r(this,n,t,e)}}addNode(t,e,n){let r=this.top(),o=t.createAndFill(e,n,r?r.marks:[]);return o?(this.push(o),o):null}openNode(t,e){this.stack.push({type:t,attrs:e,content:[],marks:a.CU.none})}closeNode(){let t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)}}function Cn(t,e,n,r){return t.getAttrs?t.getAttrs(e,n,r):t.attrs instanceof Function?t.attrs(e):t.attrs}function Sn(t,e){return t.noCloseToken||"code_inline"==e||"code_block"==e||"fence"==e}function Mn(t){return"\n"==t[t.length-1]?t.slice(0,t.length-1):t}function En(){}function An(t,e){for(;++e<t.length;)if("list_item_open"!=t[e].type)return t[e].hidden;return!1}new class{constructor(t,e,n){this.schema=t,this.tokenizer=e,this.tokens=n,this.tokenHandlers=function(t,e){let n=Object.create(null);for(let r in e){let o=e[r];if(o.block){let e=t.nodeType(o.block);Sn(o,r)?n[r]=(t,n,r,i)=>{t.openNode(e,Cn(o,n,r,i)),t.addText(Mn(n.content)),t.closeNode()}:(n[r+"_open"]=(t,n,r,i)=>t.openNode(e,Cn(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,Cn(o,n,r,i))}else if(o.mark){let e=t.marks[o.mark];Sn(o,r)?n[r]=(t,n,r,i)=>{t.openMark(e.create(Cn(o,n,r,i))),t.addText(Mn(n.content)),t.closeMark(e)}:(n[r+"_open"]=(t,n,r,i)=>t.openMark(e.create(Cn(o,n,r,i))),n[r+"_close"]=t=>t.closeMark(e))}else{if(!o.ignore)throw new RangeError("Unrecognized parsing spec "+JSON.stringify(o));Sn(o,r)?n[r]=En:(n[r+"_open"]=En,n[r+"_close"]=En)}}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){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new xn(this.schema,this.tokenHandlers);r.parseTokens(this.tokenizer.parse(t,n));do{e=r.closeNode()}while(r.stack.length);return e||this.schema.topNodeType.createAndFill()}}(kn,wn("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(t,e,n)=>({tight:An(e,n)})},ordered_list:{block:"ordered_list",getAttrs:(t,e,n)=>({order:+t.attrGet("start")||1,tight:An(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 Dn={open:"",close:"",mixable:!0};const Tn=new class{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.nodes=t,this.marks=e,this.options=n}serialize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object.assign({},this.options,e);let n=new Nn(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,!1),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){var n;let r=null!==(n=e.attrs.order)&&void 0!==n?n:1,o=String(r+e.childCount-1).length,i=t.repeat(" ",o+2);t.renderList(e,i,e=>{let n=String(r+e);return t.repeat(" ",o-n.length)+n+". "})},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<n.childCount;o++)if(n.child(o).type!=e.type)return void t.write("\\\n")},text(t,e){t.text(e.text,!t.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open:(t,e,n,r)=>(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)=>On(n.child(r),-1),close:(t,e,n,r)=>On(n.child(r-1),1),escape:!1}});function On(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 s=0;s<o;s++)i+="`";return o>0&&e<0&&(i+=" "),i}class Nn{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,"undefined"==typeof this.options.tightLists&&(this.options.tightLists=!1),"undefined"==typeof this.options.hardBreakNodeName&&(this.options.hardBreakNodeName="hard_break")}flushClose(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 r=1;r<t;r++)this.out+=e+"\n"}this.closed=null}}getMark(t){let e=this.marks[t];if(!e){if(!1!==this.options.strict)throw new Error(`Mark type \`${t}\` not supported by Markdown renderer`);e=Dn}return e}wrapBlock(t,e,n,r){let o=this.delim;this.write(null!=e?e:t),this.delim+=t,r(),this.delim=o,this.closeBlock(n)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+="\n")}write(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)}closeBlock(t){this.closed=t}text(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.split("\n");for(let r=0;r<n.length;r++)this.write(),!e&&"["==n[r][0]&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=e?this.esc(n[r],this.atBlockStart):n[r],r!=n.length-1&&(this.out+="\n")}
2render(t,e,n){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,e,n);else{if(!1!==this.options.strict)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((e,n,r)=>this.render(e,t,r))}renderInline(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.atBlockStart=e;let n=[],r="",o=(e,o,i)=>{let s=e?e.marks:[];e&&e.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 l=r;if(r="",e&&e.isText&&s.some(t=>{let e=this.getMark(t.type.name);return e&&e.expelEnclosingWhitespace&&!t.isInSet(n)})){let[t,r,o]=/^(\s*)(.*)$/m.exec(e.text);r&&(l+=r,(e=o?e.withText(o):null)||(s=n))}if(e&&e.isText&&s.some(e=>{let n=this.getMark(e.type.name);return n&&n.expelEnclosingWhitespace&&!this.isMarkAhead(t,i+1,e)})){let[t,o,i]=/^(.*?)(\s*)$/m.exec(e.text);i&&(r=i,(e=o?e.withText(o):null)||(s=n))}let a=s.length?s[s.length-1]:null,c=a&&!1===this.getMark(a.type.name).escape,d=s.length-(c?1:0);t:for(let t=0;t<d;t++){let e=s[t];if(!this.getMark(e.type.name).mixable)break;for(let r=0;r<n.length;r++){let o=n[r];if(!this.getMark(o.type.name).mixable)break;if(e.eq(o)){t>r?s=s.slice(0,r).concat(e).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(e).concat(s.slice(r,d)));continue t}}}let h=0;for(;h<Math.min(n.length,d)&&s[h].eq(n[h]);)++h;for(;h<n.length;)this.text(this.markString(n.pop(),!1,t,i),!1);if(l&&this.text(l),e){for(;n.length<d;){let e=s[n.length];n.push(e),this.text(this.markString(e,!0,t,i),!1),this.atBlockStart=!1}c&&e.isText?this.text(this.markString(a,!0,t,i)+e.text+this.markString(a,!1,t,i+1),!1):this.render(e,t,i),this.atBlockStart=!1}(null===e||void 0===e?void 0:e.isText)&&e.nodeSize>0&&(this.atBlockStart=!1)};t.forEach(o),o(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="undefined"!=typeof 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){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t=t.replace(/[`*\\~\[\]_]/g,(e,n)=>"_"==e&&n>0&&n+1<t.length&&t[n-1].match(/\w/)&&t[n+1].match(/\w/)?e:"\\"+e),e&&(t=t.replace(/^(\+[ ]|[\-*>])/,"\\$&").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<e;r++)n+=t;return n}markString(t,e,n,r){let o=this.getMark(t.type.name),i=e?o.open:o.close;return"string"==typeof i?i:i(this,t,n,r)}getEnclosingWhitespace(t){return{leading:(t.match(/^(\s+)/)||[void 0])[0],trailing:(t.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(t,e,n){for(;;e++){if(e>=t.childCount)return!1;let r=t.child(e);if(r.type.name!=this.options.hardBreakNodeName)return n.isInSet(r.marks);e++}}}var _n=n(2302),Rn=n(14973),Ln=Object.defineProperty,zn=(t,e,n)=>(((t,e,n)=>{e in t?Ln(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,"symbol"!==typeof e?e+"":e,n),n);const In=l.YY.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(){var t=this;return{toggleTight:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return n=>{let{editor:r,commands:o}=n;return t.options.listTypes.some(t=>function(t){if(!r.isActive(t))return!1;const n=r.getAttributes(t);return o.updateAttributes(t,{tight:null!==e&&void 0!==e?e:!(null!==n&&void 0!==n&&n.tight)})}(t))}}}}}),Fn=wn();
2function $n(t,e){Fn.inline.State.prototype.scanDelims.call({src:t,posMax:t.length});return new Fn.inline.State(t,null,null,[]).scanDelims(e,!0)}function Pn(t,e,n,r){let o=t.substring(0,n)+t.substring(n+e.length);return o=o.substring(0,n+r)+e+o.substring(n+r),o}function Bn(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(;o<r&&!$n(i,o).can_open;)i=Pn(i,e,o,1),o++;return{text:i,from:o,to:r}}(o.text,e,o.from,o.to),o=function(t,e,n,r){let o=r,i=t;for(;o>n&&!$n(i,o).can_close;)i=Pn(i,e,o,-1),o--;return{text:i,from:n,to:o}}(o.text,e,o.from,o.to),o.to-o.from<e.length+1&&(o.text=o.text.substring(0,o.from)+o.text.substring(o.to+e.length)),o.text}class Hn extends Nn{constructor(t,e,n){super(t,e,null!==n&&void 0!==n?n:{}),zn(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&&r.start&&null!==r&&void 0!==r&&r.end){const{delimiter:t,start:e,end:n}=this.normalizeInline(r);this.out=Bn(this.out,t,e,n),this.inlines.pop()}}markString(t,e,n,r){const o=this.marks[t.type.name];if(o.expelEnclosingWhitespace)if(e)this.inlines.push({start:this.out.length,delimiter:o.open});else{const t=this.inlines.pop();this.inlines.push({...t,end:this.out.length})}return super.markString(t,e,n,r)}normalizeInline(t){let{start:e,end:n}=t;for(;this.out.charAt(e).match(/\s/);)e++;return{...t,start:e}}}const jn=l.CU.create({name:"markdownHTMLMark",addStorage:()=>({markdown:{serialize:{open(t,e){var n,r;return this.editor.storage.markdown.options.html?null!==(n=null===(r=Vn(e))||void 0===r?void 0:r[0])&&void 0!==n?n:"":(console.warn(`Tiptap Markdown: "${e.type.name}" mark is only available in html mode`),"")},close(t,e){var n,r;return this.editor.storage.markdown.options.html&&null!==(n=null===(r=Vn(e))||void 0===r?void 0:r[1])&&void 0!==n?n:""}},parse:{}}})});function Vn(t){const e=t.type.schema,n=e.text(" ",[t]),r=(0,l.su)(a.FK.from(n),e).match(/^(<.*?>) (<\/.*?>)$/);return r?[r[1],r[2]]:null}function qn(t){const e=`<body>${t}</body>`;return(new window.DOMParser).parseFromString(e,"text/html").body}const Un=l.bP.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,l.su)(a.FK.from(t),n);if(t.isBlock&&(e instanceof a.FK||e.type.name===n.topNodeType.name))return function(t){const e=qn(t),n=e.firstElementChild;return n.innerHTML=n.innerHTML.trim()?`\n${n.innerHTML}\n`:"\n",n.outerHTML}(r);return 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:{}}})});const Kn=l.bP.create({name:"blockquote"}).extend({addStorage:()=>({markdown:{serialize:Tn.nodes.blockquote,parse:{}}})}),Wn=l.bP.create({name:"bulletList"}).extend({addStorage:()=>({markdown:{serialize(t,e){return t.renderList(e,"  ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}})}),Jn=l.bP.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;t.set({langPrefix:null!==(e=this.options.languageClassPrefix)&&void 0!==e?e:"language-"})},updateDOM(t){t.innerHTML=t.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}})}),Gn=l.bP.create({name:"hardBreak"}).extend({addStorage:()=>({markdown:{serialize(t,e,n,r){for(let o=r+1;o<n.childCount;o++)if(n.child(o).type!=e.type)return void t.write(t.inTable?Un.storage.markdown.serialize.call(this,t,e,n):"\\\n")},parse:{}}})}),Zn=l.bP.create({name:"heading"}).extend({addStorage:()=>({markdown:{serialize:Tn.nodes.heading,parse:{}}})}),Yn=l.bP.create({name:"horizontalRule"}).extend({addStorage:()=>({markdown:{serialize:Tn.nodes.horizontal_rule,parse:{}}})}),Xn=l.bP.create({name:"image"}).extend({addStorage:()=>({markdown:{serialize:Tn.nodes.image,parse:{}}})}),Qn=l.bP.create({name:"listItem"}).extend({addStorage:()=>({markdown:{serialize:Tn.nodes.list_item,parse:{}}})});const tr=l.bP.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),l=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),a=l%2?") ":". ";t.renderList(e,s,e=>{const n=String(o+e);return t.repeat(" ",i-n.length)+n+a})},parse:{}}})}),er=l.bP.create({name:"paragraph"}).extend({addStorage:()=>({markdown:{serialize:Tn.nodes.paragraph,parse:{}}})});function nr(t){var e,n;return null!==(e=null===t||void 0===t||null===(n=t.content)||void 0===n?void 0:n.content)&&void 0!==e?e:[]}const rr=l.bP.create({name:"table"}).extend({addStorage:()=>({markdown:{serialize(t,e,n){!function(t){const e=nr(t),n=e[0],r=e.slice(1);if(nr(n).some(t=>"tableHeader"!==t.type.name||or(t)||t.childCount>1))return!1;if(r.some(t=>nr(t).some(t=>"tableHeader"===t.type.name||or(t)||t.childCount>1)))return!1;return!0}
2(e)?Un.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;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 or(t){return t.attrs.colspan>1||t.attrs.rowspan>1}const ir=l.bP.create({name:"taskItem"}).extend({addStorage:()=>({markdown:{serialize(t,e){const n=e.attrs.checked?"[x]":"[ ]";t.write(`${n} `),t.renderContent(e)},parse:{updateDOM(t){[...t.querySelectorAll(".task-list-item")].forEach(t=>{const e=t.querySelector("input");t.setAttribute("data-type","taskItem"),e&&(t.setAttribute("data-checked",e.checked),e.remove())})}}}})}),sr=l.bP.create({name:"taskList"}).extend({addStorage:()=>({markdown:{serialize:Wn.storage.markdown.serialize,parse:{setup(t){t.use(_n)},updateDOM(t){[...t.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}})}),lr=l.bP.create({name:"text"}).extend({addStorage:()=>({markdown:{serialize(t,e){var n;t.text(null===(n=e.text)||void 0===n?void 0:n.replace(/</g,"&lt;").replace(/>/g,"&gt;"))},parse:{}}})}),ar=l.CU.create({name:"bold"}).extend({addStorage:()=>({markdown:{serialize:Tn.marks.strong,parse:{}}})}),cr=l.CU.create({name:"code"}).extend({addStorage:()=>({markdown:{serialize:Tn.marks.code,parse:{}}})}),dr=l.CU.create({name:"italic"}).extend({addStorage:()=>({markdown:{serialize:Tn.marks.em,parse:{}}})}),hr=l.CU.create({name:"link"}).extend({addStorage:()=>({markdown:{serialize:Tn.marks.link,parse:{}}})}),ur=l.CU.create({name:"strike"}).extend({addStorage:()=>({markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}})}),pr=[Kn,Wn,Jn,Gn,Zn,Yn,Un,Xn,Qn,tr,er,rr,ir,sr,lr,ar,cr,jn,dr,hr,ur];function fr(t){var e,n;const r=null===(e=t.storage)||void 0===e?void 0:e.markdown,o=null===(n=pr.find(e=>e.name===t.name))||void 0===n?void 0:n.storage.markdown;return r||o?{...o,...r}:null}class mr{constructor(t){zn(this,"editor",null),this.editor=t}serialize(t){const e=new Hn(this.nodes,this.marks,{hardBreakNodeName:Gn.name});return e.renderContent(t),e.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(t=>[t,this.serializeNode(Un)])),...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.fromEntries(Object.keys(this.editor.schema.marks).map(t=>[t,this.serializeMark(jn)])),...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;return null===(e=fr(t))||void 0===e||null===(e=e.serialize)||void 0===e?void 0:e.bind({editor:this.editor,options:t.options})}serializeMark(t){var e;const n=null===(e=fr(t))||void 0===e?void 0:e.serialize;return n?{...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}}class gr{constructor(t,e){zn(this,"editor",null),zn(this,"md",null);let{html:n,linkify:r,breaks:o}=e;this.editor=t,this.md=this.withPatchedRenderer(wn({html:n,linkify:r,breaks:o}))}parse(t){let{inline:e}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"===typeof t){this.editor.extensionManager.extensions.forEach(t=>{var e;return null===(e=fr(t))||void 0===e||null===(e=e.parse)||void 0===e||null===(e=e.setup)||void 0===e?void 0:e.call({editor:this.editor,options:t.options},this.md)});const n=qn(this.md.render(t));return this.editor.extensionManager.extensions.forEach(t=>{var e;return null===(e=fr(t))||void 0===e||null===(e=e.parse)||void 0===e||null===(e=e.updateDOM)||void 0===e?void 0:e.call({editor:this.editor,options:t.options},n)}),this.normalizeDOM(n,{inline:e,content:t}),n.innerHTML}return t}normalizeDOM(t,e){let{inline:n,content:r}=e;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(t=>{var e;(null===(e=t.nextSibling)||void 0===e?void 0:e.nodeType)!==Node.TEXT_NODE||t.closest("pre")||(t.nextSibling.textContent=t.nextSibling.textContent.replace(/^\n/,""))}),n&&this.normalizeInline(t,r),t}normalizeBlocks(t){const e=Object.values(this.editor.schema.nodes).filter(t=>t.isBlock).map(t=>{var e;return null===(e=t.spec.parseDOM)||void 0===e?void 0:e.map(t=>t.tag)}
2).flat().filter(Boolean).join(",");e&&[...t.querySelectorAll(e)].forEach(t=>{t.parentElement.matches("p")&&function(t){const e=t.parentElement,n=e.cloneNode();for(;e.firstChild&&e.firstChild!==t;)n.appendChild(e.firstChild);n.childNodes.length>0&&e.parentElement.insertBefore(n,e),e.parentElement.insertBefore(t,e),0===e.childNodes.length&&e.remove()}(t)})}normalizeInline(t,e){var n;if(null!==(n=t.firstElementChild)&&void 0!==n&&n.matches("p")){var r,o,i,s;const n=t.firstElementChild,{nextElementSibling:l}=n,a=null!==(r=null===(o=e.match(/^\s+/))||void 0===o?void 0:o[0])&&void 0!==r?r:"",c=l?"":null!==(i=null===(s=e.match(/\s+$/))||void 0===s?void 0:s[0])&&void 0!==i?i:"";if(e.match(/^\n\n/))return void(n.innerHTML=`${n.innerHTML}${c}`);!function(t){const e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}(n),t.innerHTML=`${a}${t.innerHTML}${c}`}}withPatchedRenderer(t){const e=t=>function(){const e=t(...arguments);return"\n"===e?e:"\n"===e[e.length-1]?e.slice(0,-1):e};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 yr=l.YY.create({name:"markdownClipboard",addOptions:()=>({transformPastedText:!1,transformCopiedText:!1}),addProseMirrorPlugins(){return[new Rn.k_({key:new Rn.hs("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 a.S4.fromSchema(this.editor.schema).parseSlice(qn(r),{preserveWhitespace:!0,context:e})},clipboardTextSerializer:t=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(t.content):null}})]}}),vr=l.YY.create({name:"markdown",priority:50,addOptions:()=>({html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}),addCommands(){const t=l.XO.Commands.config.addCommands();return{setContent:(e,n)=>r=>t.setContent(r.editor.storage.markdown.parser.parse(e),n)(r),insertContentAt:(e,n,r)=>o=>t.insertContentAt(e,o.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(o)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new gr(this.editor,this.options),serializer:new mr(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[In.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),yr.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.