1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3446],{25297:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(731504),i=n(824774);function o(e={}){return new r.k_({view:t=>new s(t,e)})}class s{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,o=this.editorView.dom,s=o.getBoundingClientRect(),l=s.width/o.offsetWidth,a=s.height/o.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),o=e?r.bottom:r.top;e&&t&&(o=(o+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*a;i={left:r.left,right:r.right,top:o-s,bottom:o+s}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*l;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let 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",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),c&&(c!=document.body||"static"!=getComputedStyle(c).position)){let n=c.getBoundingClientRect(),r=n.width/c.offsetWidth,i=n.height/c.offsetHeight;e=n.left-c.scrollLeft*r,t=n.top-c.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/l+"px",this.element.style.top=(i.top-t)/a+"px",this.element.style.width=(i.right-i.left)/l+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,i.Um)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}},33558:(e,t,n)=>{"use strict";n.d(t,{Bw:()=>d,bL:()=>p,iZ:()=>h});var r=n(310170),i=n(644975),o=n(551467),s=n(959371),l=n(346967);let a=null,c=()=>{let e=a;a=null,e.forEach((e,t)=>{let n=t.state.tr,i=r.pJ.getState(t.state);i&&i.binding&&!i.binding.isDestroyed&&(e.forEach((e,t)=>{n.setMeta(t,e)}),t.dispatch(n))})},h=(e,t,n)=>{a||(a=new Map,l.wR(0,c)),s._4(a,e,s.vt).set(t,n)},d=(e,t,n)=>{if(0===e)return i.SF(t,0,0===t.length?-1:0);let r=null===t._first?null:t._first.content.type;for(;null!==r&&t!==r;){if(r instanceof i.ZQ){if(r._length>=e)return i.SF(r,e,0===t.length?-1:0);if(e-=r._length,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{do r=null===r._item?null:r._item.parent,e--;while(r!==t&&null!==r&&null!==r._item&&null===r._item.next);null!==r&&r!==t&&(r=null===r._item?null:r._item.next.content.type)}}else{let o=(n.get(r)||{nodeSize:0}).nodeSize;if(null!==r._first&&e<o)r=r._first.content.type,e--;else{if(1===e&&0===r._length&&o>1)return new i.QQ(null===r._item?null:r._item.id,null===r._item?i.xC(r):null,null);if(e-=o,null!==r._item&&null!==r._item.next)r=r._item.next.content.type;else{if(0===e)return r=null===r._item?r:r._item.parent,new i.QQ(null===r._item?null:r._item.id,null===r._item?i.xC(r):null,null);do r=r._item.parent,e--;while(r!==t&&null===r._item.next);r!==t&&(r=r._item.next.content.type)}}}if(null===r)throw o.Mq();if(0===e&&r.constructor!==i.ZQ&&r!==t)return u(r._item.parent,r._item)}return i.SF(t,t._length,0===t.length?-1:0)},u=(e,t)=>
1{let n=null,r=null;return null===e._item?r=i.xC(e):n=i.eg(e._item.id.client,e._item.id.clock),new i.QQ(n,r,t.id)},p=(e,t,n,r)=>{let o=i.IT(n,e);if(null===o||o.type!==t&&!i.Mp(t,o.type._item))return null;let s=o.type,l=0;if(s.constructor===i.ZQ)l=o.index;else if(null===s._item||!s._item.deleted){let e=s._first,t=0;for(;t<s._length&&t<o.index&&null!==e;){if(!e.deleted){let n=e.content.type;t++,n instanceof i.ZQ?l+=n._length:l+=r.get(n).nodeSize}e=e.right}l+=1}for(;s!==t&&null!==s._item;){let e=s._item.parent;if(null===e._item||!e._item.deleted){l+=1;let t=e._first;for(;null!==t;){let e=t.content.type;if(e===s)break;t.deleted||(e instanceof i.ZQ?l+=e._length:l+=r.get(e).nodeSize),t=t.right}}s=e}return l-1}},42959:(e,t,n)=>{"use strict";n.d(t,{n:()=>i});var r=n(311699);let i=r.bP.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,r.KV)(this.options.HTMLAttributes,e),0]}})},157807:(e,t,n)=>{"use strict";n.d(t,{UC:()=>N,bL:()=>R,l9:()=>O});var r,i=n(705922),o=n(299808),s=n(254950),l=n(507891),a=n(567166),c=n(481996),h=(n(553609),n(642354)),d=n(442222),u=n(256072),p=n(249738),f="HoverCard",[m,g]=(0,s.A)(f,[c.Bk]),y=(0,c.Bk)(),[w,v]=m(f),b=e=>{let{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:s,openDelay:a=700,closeDelay:h=300}=e,d=y(t),u=i.useRef(0),f=i.useRef(0),m=i.useRef(!1),g=i.useRef(!1),[v=!1,b]=(0,l.i)({prop:r,defaultProp:o,onChange:s}),x=i.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>b(!0),a)},[a,b]),k=i.useCallback(()=>{clearTimeout(u.current),m.current||g.current||(f.current=window.setTimeout(()=>b(!1),h))},[h,b]),S=i.useCallback(()=>b(!1),[b]);return i.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),(0,p.jsx)(w,{scope:t,open:v,onOpenChange:b,onOpen:x,onClose:k,onDismiss:S,hasSelectionRef:m,isPointerDownOnContentRef:g,children:(0,p.jsx)(c.bL,{...d,children:n})})};b.displayName=f;var x="HoverCardTrigger",k=i.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=v(x,n),s=y(n);return(0,p.jsx)(c.Mz,{asChild:!0,...s,children:(0,p.jsx)(d.sG.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:(0,o.m)(e.onPointerEnter,T(i.onOpen)),onPointerLeave:(0,o.m)(e.onPointerLeave,T(i.onClose)),onFocus:(0,o.m)(e.onFocus,i.onOpen),onBlur:(0,o.m)(e.onBlur,i.onClose),onTouchStart:(0,o.m)(e.onTouchStart,e=>e.preventDefault())})})});k.displayName=x;var[S,C]=m("HoverCardPortal",{forceMount:void 0}),E="HoverCardContent",A=i.forwardRef((e,t)=>{let n=C(E,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,s=v(E,e.__scopeHoverCard);return(0,p.jsx)(h.C,{present:r||s.open,children:(0,p.jsx)(M,{"data-state":s.open?"open":"closed",...i,onPointerEnter:(0,o.m)(e.onPointerEnter,T(s.onOpen)),onPointerLeave:(0,o.m)(e.onPointerLeave,T(s.onClose)),ref:t})})});A.displayName=E;var M=i.forwardRef((e,t)=>{let{__scopeHoverCard:n,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:h,onInteractOutside:d,...f}=e,m=v(E,n),g=y(n),w=i.useRef(null),b=(0,a.s)(t,w),[x,k]=i.useState(!1);return i.useEffect(()=>{if(x){let e=document.body;return r=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=r,e.style.webkitUserSelect=r}}},[x]),i.useEffect(()=>{if(w.current){let e=()=>{k(!1),m.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;
1(null==(e=document.getSelection())?void 0:e.toString())!==""&&(m.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!1}}},[m.isPointerDownOnContentRef,m.hasSelectionRef]),i.useEffect(()=>{w.current&&(function(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t})(w.current).forEach(e=>e.setAttribute("tabindex","-1"))}),(0,p.jsx)(u.qW,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:(0,o.m)(h,e=>{e.preventDefault()}),onDismiss:m.onDismiss,children:(0,p.jsx)(c.UC,{...g,...f,onPointerDown:(0,o.m)(f.onPointerDown,e=>{e.currentTarget.contains(e.target)&&k(!0),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!0}),ref:b,style:{...f.style,userSelect:x?"text":void 0,WebkitUserSelect:x?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function T(e){return t=>"touch"===t.pointerType?void 0:e()}i.forwardRef((e,t)=>{let{__scopeHoverCard:n,...r}=e,i=y(n);return(0,p.jsx)(c.i3,{...i,...r,ref:t})}).displayName="HoverCardArrow";var R=b,O=k,N=A},178340:(e,t,n)=>{"use strict";n.d(t,{Tr:()=>f,v0:()=>d});var r=n(644975),i=n(926477),o=n(731504);n(86431);var s=n(33558),l=n(310170),a=n(413997);let c=(e,t,n)=>e!==t,h=e=>{let t=document.createElement("span");t.classList.add("ProseMirror-yjs-cursor"),t.setAttribute("style",`border-color: ${e.color}`);let n=document.createElement("div");n.setAttribute("style",`background-color: ${e.color}`),n.insertBefore(document.createTextNode(e.name),null);let r=document.createTextNode("â "),i=document.createTextNode("â ");return t.insertBefore(r,null),t.insertBefore(n,null),t.insertBefore(i,null),t},d=e=>({style:`background-color: ${e.color}70`,class:"ProseMirror-yjs-selection"}),u=/^#[0-9a-fA-F]{6}$/,p=(e,t,n,o,c)=>{let h=l.pJ.getState(e),d=h.doc,p=[];return null!=h.snapshot||null!=h.prevSnapshot||0===h.binding.mapping.size?i.zF.create(e.doc,[]):(t.getStates().forEac
1h((t,l)=>{if(n(d.clientID,l,t)&&null!=t.cursor){let n=t.user||{};null==n.color?n.color="#ffa500":u.test(n.color)||console.warn("A user uses an unsupported color format",n),null==n.name&&(n.name=`User: ${l}`);let f=(0,s.bL)(d,h.type,r.sH(t.cursor.anchor),h.binding.mapping),m=(0,s.bL)(d,h.type,r.sH(t.cursor.head),h.binding.mapping);if(null!==f&&null!==m){let t=a.T9(e.doc.content.size-1,0);f=a.jk(f,t),m=a.jk(m,t),p.push(i.NZ.widget(m,()=>o(n,l),{key:l+"",side:10}));let r=a.jk(f,m),s=a.T9(f,m);p.push(i.NZ.inline(r,s,c(n,l),{inclusiveEnd:!0,inclusiveStart:!1}))}}}),i.zF.create(e.doc,p))},f=(e,{awarenessStateFilter:t=c,cursorBuilder:n=h,selectionBuilder:i=d,getSelection:a=e=>e.selection}={},u="cursor")=>new o.k_({key:l.S6,state:{init:(r,o)=>p(o,e,t,n,i),apply(r,o,s,a){let c=l.pJ.getState(a),h=r.getMeta(l.S6);return c&&c.isChangeOrigin||h&&h.awarenessUpdated?p(a,e,t,n,i):o.map(r.mapping,r.doc)}},props:{decorations:e=>l.S6.getState(e)},view:t=>{let n=()=>{t.docView&&(0,s.iZ)(t,l.S6,{awarenessUpdated:!0})},i=()=>{let n=l.pJ.getState(t.state),i=e.getLocalState()||{};if(t.hasFocus()){let o=a(t.state),l=(0,s.Bw)(o.anchor,n.type,n.binding.mapping),c=(0,s.Bw)(o.head,n.type,n.binding.mapping);null!=i.cursor&&r.uG(r.sH(i.cursor.anchor),l)&&r.uG(r.sH(i.cursor.head),c)||e.setLocalStateField(u,{anchor:l,head:c})}else null!=i.cursor&&null!==(0,s.bL)(n.doc,n.type,r.sH(i.cursor.anchor),n.binding.mapping)&&e.setLocalStateField(u,null)};return e.on("change",n),t.dom.addEventListener("focusin",i),t.dom.addEventListener("focusout",i),{update:i,destroy:()=>{t.dom.removeEventListener("focusin",i),t.dom.removeEventListener("focusout",i),e.off("change",n),e.setLocalStateField(u,null)}}}})},201880:(e,t,n)=>{"use strict";n.d(t,{$J:()=>h,Eb:()=>l,eD:()=>a});var r=n(731504),i=n(528942),o=n(644975),s=n(310170);let l=(e,t)=>null==t?s.Mj.getState(e)?.undoManager?.canUndo():s.Mj.getState(e)?.undoManager?.undo()!=null,a=(e,t)=>null==t?s.Mj.getState(e)?.undoManager?.canRedo():s.Mj.getState(e)?.undoManager?.redo()!=null,c=new Set(["paragraph"]),h=({protectedNodes:e=c,trackedOrigins:t=[],undoManager:n=null}={})=>new r.k_({key:s.Mj,state:{init:(r,i)=>{let l=s.pJ.getState(i),a=n||new o.ad(l.type,{trackedOrigins:new Set([s.pJ].concat(t)),deleteFilter:t=>((e,t)=>!(e instanceof o.q7)||!(e.content instanceof o.cM)||!(e.content.type instanceof o.EY||e.content.type instanceof o.WF&&t.has(e.content.type.nodeName))||0===e.content.type._length)(t,e),captureTransaction:e=>!1!==e.meta.get("addToHistory")});return{undoManager:a,prevSel:null,hasUndoOps:a.undoStack.length>0,hasRedoOps:a.redoStack.length>0}},apply:(e,t,n,r)=>{let o=s.pJ.getState(r).binding,l=t.undoManager,a=l.undoStack.length>0,c=l.redoStack.length>0;return o?{undoManager:l,prevSel:(0,i.Zr)(o,n),hasUndoOps:a,hasRedoOps:c}:a!==t.hasUndoOps||c!==t.hasRedoOps?Object.assign({},t,{hasUndoOps:l.undoStack.length>0,hasRedoOps:l.redoStack.length>0}):t}},view:e=>{let t=s.pJ.getState(e.state),n=s.Mj.getState(e.state).undoManager;return n.on("stack-item-added",({stackItem:n})=>{let r=t.binding;r&&n.meta.set(r,s.Mj.getState(e.state).prevSel)}),n.on("stack-item-popped",({stackItem:e})=>{let n=t.binding;n&&(n.beforeTransactionSelection=e.meta.get(n)||n.beforeTransactionSelection)}),{destroy:()=>{n.destroy()}}}})},203981:(e,t,n)=>{"use strict";let r;n.d(t,{A:()=>l});let i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},o=new Uint8Array(16),s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));let l=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();let l=(e=e||{}).random??e.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(o)}();if(l.length<16)throw Error("Random bytes length must be >= 16");if(l[6]=15&l[6]|64,l[8]=63&l[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=l[e];return t}return function(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}(l)}},207430:(e,t,n)=>{"use strict";n.d(t,{B:()=>o});var r=n(311699),i=n(675558);let o=r.YY.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>(0,i.tN)(e,t),redo:()=>({state:e,dispatch:t})=>(0,i.ZS)(e,t)}),addProseMirrorPlugins(){return[(0,i.b6)(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}})},245145:(e,t,n)=>{"use strict";n.d(t,{AL:()=>ei,D8:()=>P,GU:()=>T,J3:()=>h,JD:()=>N,L0:()=>D,LF:()=>eh,Qg:()=>et,RC:()=>M,aR:()=>L,gC:()=>_,gR:()=>R,rn:()=>x,w7:()=>z});var r,i,o=n(731504),s=n(365509),l=n(926477),a=n(261209),c=n(824774);if("undefined"!=typeof WeakMap){let e=new WeakMap;r=t=>e.get(t),i=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;r=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},i=(n,r)=>(10==t&&(t=0),e[t++]=n,e[t++]=r)}var h=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,o=r+1,s=i+1;for(let e=1;o<this.width&&this.map[t+e]==n;e++)o++;for(let e=1;s<this.height&&this.map[t+this.width*e]==n;e++)s++;return{left:r,top:i,right:o,bottom:s}}throw RangeError(`No cell with offset ${e}
1 found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:o,bottom:s}=this.findCell(e);return"horiz"==t?(n<0?0==r:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?0==o:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:o}=this.findCell(e),{left:s,right:l,top:a,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,a),right:Math.max(r,l),bottom:Math.max(o,c)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let o=r*this.width+i,s=this.map[o];!n[s]&&(n[s]=!0,i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s||t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let o=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?o-1:this.map[n]}i=o}}static get(e){return r(e)||i(e,function(e){if("table"!=e.type.spec.tableRole)throw RangeError("Not a table node: "+e.type.name);let t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),o=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(o+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);o+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(e),n=e.childCount,r=[],i=0,o=null,s=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let l=0,a=0;l<n;l++){let c=e.child(l);a++;for(let e=0;;e++){for(;i<r.length&&0!=r[i];)i++;if(e==c.childCount)break;let h=c.child(e),{colspan:d,rowspan:u,colwidth:p}=h.attrs;for(let e=0;e<u;e++){if(e+l>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:a,n:u-e});break}let c=i+e*t;for(let e=0;e<d;e++){0==r[c+e]?r[c+e]=a:(o||(o=[])).push({type:"collision",row:l,pos:a,n:d-e});let n=p&&p[e];if(n){let r=(c+e)%t*2,i=s[r];null==i||i!=n&&1==s[r+1]?(s[r]=n,s[r+1]=1):i==n&&s[r+1]++}}}i+=d,a+=h.nodeSize}let h=(l+1)*t,d=0;for(;
1i<h;)0==r[i++]&&d++;d&&(o||(o=[])).push({type:"missing",row:l,n:d}),a++}(0===t||0===n)&&(o||(o=[])).push({type:"zero_sized"});let l=new h(t,n,r,o),a=!1;for(let e=0;!a&&e<s.length;e+=2)null!=s[e]&&s[e+1]<n&&(a=!0);return a&&function(e,t,n){e.problems||(e.problems=[]);let r={};for(let i=0;i<e.map.length;i++){let o=e.map[i];if(r[o])continue;r[o]=!0;let s=n.nodeAt(o);if(!s)throw RangeError(`No cell with offset ${o} found`);let l=null,a=s.attrs;for(let n=0;n<a.colspan;n++){let r=t[2*((i+n)%e.width)];null==r||a.colwidth&&a.colwidth[n]==r||((l||(l=function(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}(a)))[n]=r)}l&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:l})}}(l,s,e),l}(e))}};function d(e){let t=e.cached.tableNodeTypes;if(!t)for(let n in t=e.cached.tableNodeTypes={},e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}return t}var u=new o.hs("selectingCells");function p(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function f(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function m(e){let t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;let n=p(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function g(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function y(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function w(e,t,n){let r=e.node(-1),i=h.get(r),o=e.start(-1),s=i.nextCell(e.pos-o,t,n);return null==s?null:e.node(0).resolve(o+s)}function v(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function b(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var x=class e extends o.LN{constructor(e,t=e){let n=e.node(-1),r=h.get(n),i=e.start(-1),s=r.rectBetween(e.pos-i,t.pos-i),l=e.node(0),a=r.cellsInRect(s).filter(e=>e!=t.pos-i);a.unshift(t.pos-i);let c=a.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new o.yn(l.resolve(r),l.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(g(r)&&g(i)&&y(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return o.U3.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=h.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},o=[];for(let n=r.top;n<r.bottom;n++){let l=[];for(let o=n*t.width+r.left,s=r.left;s<r.right;s++,o++){let n=t.map[o];if(i[n])continue;i[n]=!0;let s=t.findCell(n),a=e.nodeAt(n);if(!a)throw RangeError(`No cell with offset ${n} found`);let c=r.left-s.left,h=s.right-r.right;if(c>0||h>0){let e=a.attrs;if(c>0&&(e=v(e,0,c)),h>0&&(e=v(e,e.colspan-h,h)),s.left<r.left){if(!(a=a.type.createAndFill(e)))throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else a=a.type.create(e,a.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...a.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};a=s.top<r.top?a.type.createAndFill(e):a.type.create(e,a.content)}l.push(a)}o.push(e.child(n).copy(s.FK.from(l)))}let l=this.isColSelection()&&this.isRowSelection()?e:o;return new s.Ji(s.FK.from(l),1,1)}replace(e,t=s.Ji.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:l}=r[i],a=e.mapping.slice(n);e.replace(a.map(o.pos),a.map(l.pos),i?s.Ji.empty:t)}let i=o.LN.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new s.Ji(s.FK.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=h.get(t),r=this.$anchorCell.start(-1),i=n.cells
1InRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);return!(Math.min(e,t)>0)&&Math.max(e+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=h.get(r),o=t.start(-1),s=i.findCell(t.pos-o),l=i.findCell(n.pos-o),a=t.node(0);return s.top<=l.top?(s.top>0&&(t=a.resolve(o+i.map[s.left])),l.bottom<i.height&&(n=a.resolve(o+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(n=a.resolve(o+i.map[l.left])),s.bottom<i.height&&(t=a.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=h.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);return!(Math.min(r,i)>0)&&Math.max(r+this.$anchorCell.nodeAfter.attrs.colspan,i+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=h.get(r),o=t.start(-1),s=i.findCell(t.pos-o),l=i.findCell(n.pos-o),a=t.node(0);return s.left<=l.left?(s.left>0&&(t=a.resolve(o+i.map[s.top*i.width])),l.right<i.width&&(n=a.resolve(o+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(n=a.resolve(o+i.map[l.top*i.width])),s.right<i.width&&(t=a.resolve(o+i.map[i.width*(s.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new k(this.$anchorCell.pos,this.$headCell.pos)}};x.prototype.visible=!1,o.LN.jsonID("cell",x);var k=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&y(t,n)?new x(t,n):o.LN.near(n,1)}};function S(e){if(!(e.selection instanceof x))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(l.NZ.node(n,n+e.nodeSize,{class:"selectedCell"}))}),l.zF.create(e.doc,t)}var C=new o.hs("fix-tables");function E(e){let t=e.selection,n=m(e),r=n.node(-1),i=n.start(-1),o=h.get(r);return{...t instanceof x?o.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:r}}function A(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;(function(e,t,n){let r=d(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0})(t,r,i+o)&&(o=0==i||i==t.width?null:0);for(let s=0;s<t.height;s++){let l=s*t.width+i;if(i>0&&i<t.width&&t.map[l-1]==t.map[l]){let o=t.map[l],a=r.nodeAt(o);e.setNodeMarkup(e.mapping.map(n+o),null,b(a.attrs,i-t.colCount(o))),s+=a.attrs.rowspan-1}else{let a=null==o?d(r.type.schema).cell:r.nodeAt(t.map[l+o]).type,c=t.positionAt(s,i,r);e.insert(e.mapping.map(n+c),a.createAndFill())}}return e}function M(e,t){if(!f(e))return!1;if(t){let n=E(e);t(A(e.tr,n,n.left))}return!0}function T(e,t){if(!f(e))return!1;if(t){let n=E(e);t(A(e.tr,n,n.right))}return!0}function R(e,t){if(!f(e))return!1;if(t){let n=E(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;!function(e,{map:t,table:n,tableStart:r},i){let o=e.mapping.maps.length;for(let s=0;s<t.height;){let l=s*t.width+i,a=t.map[l],c=n.nodeAt(a),h=c.attrs;if(i>0&&t.map[l-1]==a||i<t.width-1&&t.map[l+1]==a)e.setNodeMarkup(e.mapping.slice(o).map(r+a),null,v(h,i-t.colCount(a)));else{let t=e.mapping.slice(o).map(r+a);e.delete(t,t+c.nodeSize)}s+=h.rowspan}}(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=h.get(e)}t(r)}return!0}function O(e,{map:t,tableStart:n,table:r},i){var o;let s=n;for(let e=0;e<i;e++)s+=r.child(e).nodeSize;let l=[],a=i>0?-1:0;(function(e,t,n){var r;let i=d(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if((null==(r=t.nodeAt(e.map[o+n*e.width]))?void 0:r.type)!=i)return!1;return!0})(t,r,i+a)&&(a=0==i||i==t.height?null:0);for(let s=0,c=t.width*i;s<t.width;s++,c++)if(i>
10&&i<t.height&&t.map[c]==t.map[c-t.width]){let i=t.map[c],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),s+=o.colspan-1}else{let e=null==a?d(r.type.schema).cell:null==(o=r.nodeAt(t.map[c+a*t.width]))?void 0:o.type,n=null==e?void 0:e.createAndFill();n&&l.push(n)}return e.insert(s,d(r.type.schema).row.create(null,l)),e}function N(e,t){if(!f(e))return!1;if(t){let n=E(e);t(O(e.tr,n,n.top))}return!0}function _(e,t){if(!f(e))return!1;if(t){let n=E(e);t(O(e.tr,n,n.bottom))}return!0}function L(e,t){if(!f(e))return!1;if(t){let n=E(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;!function(e,{map:t,table:n,tableStart:r},i){let o=0;for(let e=0;e<i;e++)o+=n.child(e).nodeSize;let s=o+n.child(i).nodeSize,l=e.mapping.maps.length;e.delete(o+r,s+r);let a=new Set;for(let o=0,s=i*t.width;o<t.width;o++,s++){let c=t.map[s];if(!a.has(c)){if(a.add(c),i>0&&c==t.map[s-t.width]){let t=n.nodeAt(c).attrs;e.setNodeMarkup(e.mapping.slice(l).map(c+r),null,{...t,rowspan:t.rowspan-1}),o+=t.colspan-1}else if(i<t.height&&c==t.map[s+t.width]){let s=n.nodeAt(c),a=s.attrs,h=s.type.create({...a,rowspan:s.attrs.rowspan-1},s.content),d=t.positionAt(i+1,o,n);e.insert(e.mapping.slice(l).map(r+d),h),o+=a.colspan-1}}}}(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=h.get(n.table)}t(r)}return!0}function I(e){let t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function z(e,t){let n=e.selection;if(!(n instanceof x)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=E(e),{map:i}=r;if(function({width:e,height:t,map:n},r){let i=r.top*e+r.left,o=i,s=(r.bottom-1)*e+r.left,l=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[o]==n[o-1]||r.right<e&&n[l]==n[l+1])return!0;o+=e,l+=e}for(let o=r.left;o<r.right;o++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[s]==n[s+e])return!0;i++,s++}return!1}(i,r))return!1;if(t){let n,o,l=e.tr,a={},c=s.FK.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let s=i.map[e*i.width+t],h=r.table.nodeAt(s);if(!a[s]&&h)if(a[s]=!0,null==n)n=s,o=h;else{I(h)||(c=c.append(h.content));let e=l.mapping.map(s+r.tableStart);l.delete(e,e+h.nodeSize)}}if(null==n||null==o)return!0;if(l.setNodeMarkup(n+r.tableStart,null,{...b(o.attrs,o.attrs.colspan,r.right-r.left-o.attrs.colspan),rowspan:r.bottom-r.top}),c.size){let e=n+1+o.content.size,t=I(o)?n+1:e;l.replaceWith(t+r.tableStart,e+r.tableStart,c)}l.setSelection(new x(l.doc.resolve(n+r.tableStart))),t(l)}return!0}function D(e,t){var n;let r=d(e.schema);return(n=({node:e})=>r[e.type.spec.tableRole],(e,t)=>{var r;let i,o,s=e.selection;if(s instanceof x){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;i=s.$anchorCell.nodeAfter,o=s.$anchorCell.pos}else{if(!(i=function(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(s.$from)))return!1;o=null==(r=p(s.$from))?void 0:r.pos}if(null==i||null==o||1==i.attrs.colspan&&1==i.attrs.rowspan)return!1;if(t){let r,l=i.attrs,a=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});let h=E(e),d=e.tr;for(let e=0;e<h.right-h.left;e++)a.push(c?{...l,colwidth:c&&c[e]?[c[e]]:null}:l);for(let e=h.top;e<h.bottom;e++){let t=h.map.positionAt(e,h.left,h.table);e==h.top&&(t+=i.nodeSize);for(let o=h.left,s=0;o<h.right;o++,s++)(o!=h.left||e!=h.top)&&d.insert(r=d.mapping.map(t+h.tableStart,1),n({node:i,row:e,col:o}).createAndFill(a[s]))}d.setNodeMarkup(o,n({node:i,row:h.top,col:h.left}),a[0]),s instanceof x&&d.setSelection(new x(d.doc.resolve(s.$anchorCell.pos),r?d.doc.resolve(r):void 0)),t(d)}return!0})(e,t)}function F(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function $(e,t){if((t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic)return function(t,n){if(!f(t))return!1;if(n){let r=d(t.schema),i=E(t),o=t.tr,s=i.map.cellsInRect("column"==e?{left:i.left,top:0,right:i.right,bottom:i.map.height}:"row"==e?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=s.map(e=>i.table.nodeAt(e));for(let e=0;e<s.length;e++)l[e].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[e],r.cell,l[e].attrs);if(0==o.steps.length)for(let e=0;e<s.length;e++)o.setNodeMarkup(i.tableStart+s[e],r.header_cell,l[e].attrs);n(o)}return!0};return function(t,n){if(!f(t))return!1;if(n){let r=d(t.schema),i=E(t),o=t.tr,s=F("row",i,r),l=F("column",i,r),a=+!!("column"===e?s:"row"===e&&l),c="column"==e?{left:0,top:a,right:1,bottom:i.map.height}:"row"==e?{left:a,top:0,right:i.map.width,bottom:1}:i,h="column"==e?l?r.cell:r.header_cell:"row"==e?s?r.cell:r.header_cell:r.cell;
1i.map.cellsInRect(c).forEach(e=>{let t=e+i.tableStart,n=o.doc.nodeAt(t);n&&o.setNodeMarkup(t,h,n.attrs)}),n(o)}return!0}}function P(e){return function(t,n){if(!f(t))return!1;let r=function(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(m(t),e);if(null==r)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(o.U3.between(e,e.node(0).resolve(e.pos+e.nodeAfter.nodeSize))).scrollIntoView())}return!0}}function j(e,t){let n=e.selection;if(!(n instanceof x))return!1;if(t){let r=e.tr,i=d(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new s.Ji(i,0,0))}),r.docChanged&&t(r)}return!0}function J(e,t){let n=e.createAndFill();return new c.dL(n).replace(0,n.content.size,t).doc}function B(e,t,n,r,i,o,s,l){if(0==s||s==t.height)return!1;let a=!1;for(let c=i;c<o;c++){let i=s*t.width+c,o=t.map[i];if(t.map[i-t.width]==o){a=!0;let i=n.nodeAt(o),{top:h,left:d}=t.findCell(o);e.setNodeMarkup(e.mapping.slice(l).map(o+r),null,{...i.attrs,rowspan:s-h}),e.insert(e.mapping.slice(l).map(t.positionAt(s,d,n)),i.type.createAndFill({...i.attrs,rowspan:h+i.attrs.rowspan-s})),c+=i.attrs.colspan-1}}return a}function U(e,t,n,r,i,o,s,l){if(0==s||s==t.width)return!1;let a=!1;for(let c=i;c<o;c++){let i=c*t.width+s,o=t.map[i];if(t.map[i-1]==o){a=!0;let i=n.nodeAt(o),h=t.colCount(o),d=e.mapping.slice(l).map(o+r);e.setNodeMarkup(d,null,v(i.attrs,s-h,i.attrs.colspan-(s-h))),e.insert(d+i.nodeSize,i.type.createAndFill(v(i.attrs,0,s-h))),c+=i.attrs.rowspan-1}}return a}function H(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw Error("No table found");let l=h.get(o),{top:a,left:c}=r,u=c+i.width,p=a+i.height,f=e.tr,m=0;function g(){if(!(o=n?f.doc.nodeAt(n-1):f.doc))throw Error("No table found");l=h.get(o),m=f.mapping.maps.length}(function(e,t,n,r,i,o,l){let a,c,h=d(e.doc.type.schema);if(i>t.width)for(let o=0,s=0;o<t.height;o++){let l,d=n.child(o);s+=d.nodeSize;let u=[];l=null==d.lastChild||d.lastChild.type==h.cell?a||(a=h.cell.createAndFill()):c||(c=h.header_cell.createAndFill());for(let e=t.width;e<i;e++)u.push(l);e.insert(e.mapping.slice(0).map(s-1+r),u)}if(o>t.height){let d=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==h.header_cell;d.push(i?c||(c=h.header_cell.createAndFill()):a||(a=h.cell.createAndFill()))}let u=h.row.create(null,s.FK.from(d)),p=[];for(let e=t.height;e<o;e++)p.push(u);e.insert(e.mapping.slice(l).map(r+n.nodeSize-2),p)}return!!(a||c)})(f,l,o,n,u,p,0)&&g(),B(f,l,o,n,c,u,a,m)&&g(),B(f,l,o,n,c,u,p,m)&&g(),U(f,l,o,n,a,p,c,m)&&g(),U(f,l,o,n,a,p,u,m)&&g();for(let e=a;e<p;e++){let t=l.positionAt(e,c,o),r=l.positionAt(e,u,o);f.replace(f.mapping.slice(m).map(t+n),f.mapping.slice(m).map(r+n),new s.Ji(i.rows[e-a],0,0))}g(),f.setSelection(new x(f.doc.resolve(n+l.positionAt(a,c,o)),f.doc.resolve(n+l.positionAt(p-1,u-1,o)))),t(f)}$("row",{useDeprecatedLogic:!0}),$("column",{useDeprecatedLogic:!0}),$("cell",{useDeprecatedLogic:!0});var V=(0,a.K)({ArrowLeft:K("horiz",-1),ArrowRight:K("horiz",1),ArrowUp:K("vert",-1),ArrowDown:K("vert",1),"Shift-ArrowLeft":q("horiz",-1),"Shift-ArrowRight":q("horiz",1),"Shift-ArrowUp":q("vert",-1),"Shift-ArrowDown":q("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function W(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function K(e,t){return(n,r,i)=>{if(!i)return!1;let s=n.selection;if(s instanceof x)return W(n,r,o.LN.near(s.$headCell,t));if("horiz"!=e&&!s.empty)return!1;let l=Y(i,e,t);if(null==l)return!1;if("horiz"==e)return W(n,r,o.LN.near(n.doc.resolve(s.head+t),t));{let i,s=n.doc.resolve(l),a=w(s,e,t);return i=a?o.LN.near(a,1):t<0?o.LN.near(n.doc.resolve(s.before(-1)),-1):o.LN.near(n.doc.resolve(s.after(-1)),1),W(n,r,i)}}}function q(e,t){return(n,r,i)=>{let o;if(!i)return!1;let s=n.selection;if(s instanceof x)o=s;else{let r=Y(i,e,t);if(null==r)return!1;o=new x(n.doc.resolve(r))}let l=w(o.$headCell,e,t);return!!l&&W(n,r,new x(o.$anchorCell,l))}}function G(e,t){let n=p(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new x(n))),!0)}function Z(e,t,n){if(!f(e.state))return!1;let r=function(e){if(!e.size)return null;
1let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;let i=t.child(0),o=i.type.spec.tableRole,l=i.type.schema,a=[];if("row"==o)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,o=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(o||c)&&(i=J(d(l).row,new s.Ji(i,o,c)).content),a.push(i)}else{if("cell"!=o&&"header_cell"!=o)return null;a.push(n||r?J(d(l).row,new s.Ji(t,n,r)).content:t)}return function(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:o}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+o}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(s.FK.empty),n[i]<r){let o=d(e).cell.createAndFill(),l=[];for(let e=n[i];e<r;e++)l.push(o);t[i]=t[i].append(s.FK.from(l))}return{height:t.length,width:r,rows:t}}(l,a)}(n),i=e.state.selection;if(i instanceof x){r||(r={width:1,height:1,rows:[s.FK.from(J(d(e.state.schema).cell,n))]});let t=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),l=h.get(t).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=function({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let o=n[e],l=[];for(let n=t[e]||0,i=0;n<r;i++){let s=o.child(i%o.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(v(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),l.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(s.FK.from(l))}n=i,e=r}if(t!=i){let e=[];for(let r=0,o=0;r<i;r++,o++){let l=[],a=n[o%t];for(let e=0;e<a.childCount;e++){let t=a.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),l.push(t)}e.push(s.FK.from(l))}n=e,t=i}return{width:e,height:t,rows:n}}(r,l.right-l.left,l.bottom-l.top),H(e.state,e.dispatch,o,l,r),!0}if(!r)return!1;{let t=m(e.state),n=t.start(-1);return H(e.state,e.dispatch,n,h.get(t.node(-1)).findCell(t.pos-n),r),!0}}function Q(e,t){var n;let r;if(t.ctrlKey||t.metaKey)return;let i=X(e,t.target);if(t.shiftKey&&e.state.selection instanceof x)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=p(e.state.selection.$anchor))&&(null==(n=ee(e,t))?void 0:n.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(t,n){let r=ee(e,n),i=null==u.getState(e.state);if(!r||!y(t,r))if(!i)return;else r=t;let o=new x(t,r);if(i||!e.state.selection.eq(o)){let n=e.state.tr.setSelection(o);i&&n.setMeta(u,t.pos),e.dispatch(n)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",l),null!=u.getState(e.state)&&e.dispatch(e.state.tr.setMeta(u,-1))}function l(n){let r,l=u.getState(e.state);if(null!=l)r=e.state.doc.resolve(l);else if(X(e,n.target)!=i&&!(r=ee(e,t)))return s();r&&o(r,n)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",l)}function Y(e,t,n){if(!(e.state.selection instanceof o.U3))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))break;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){let o=r.before(i),s="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(s)?o:null}}return null}function X(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function ee(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?p(e.state.doc.resolve(n.pos)):null}var et=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,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",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),en(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,en(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function en(e,t,n,r,i,o){var s;let l=0,a=!0,c=t.firstChild,h=e.firstChild;if(h){for(let e=0,n=0;e<h.childCount;e++){let{colspan:s,colwidth:d}=h.child(e).attrs;for(let e=0;e<s;e++,n++){let s=i==n?o:d&&d[e],h=s?s+"px":"";
1if(l+=s||r,s||(a=!1),c)c.style.width!=h&&(c.style.width=h),c=c.nextSibling;else{let e=document.createElement("col");e.style.width=h,t.appendChild(e)}}}for(;c;){let e=c.nextSibling;null==(s=c.parentNode)||s.removeChild(c),c=e}a?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var er=new o.hs("tableColumnResizing");function ei({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=et,lastColumnResizable:i=!0}={}){let s=new o.k_({key:er,state:{init(e,t){var i,o;let l=null==(o=null==(i=s.spec)?void 0:i.props)?void 0:o.nodeViews,a=d(t.schema).table.name;return r&&l&&(l[a]=(e,t)=>new r(e,n,t)),new eo(-1,!1)},apply:(e,t)=>t.apply(e)},props:{attributes:e=>{let t=er.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r){if(!e.editable)return;let i=er.getState(e.state);if(i&&!i.dragging){let o=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target),s=-1;if(o){let{left:r,right:i}=o.getBoundingClientRect();t.clientX-r<=n?s=es(e,t,"left",n):i-t.clientX<=n&&(s=es(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&-1!==s){let t=e.state.doc.resolve(s),n=t.node(-1),r=h.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}ea(e,s)}}}(t,n,e,i)},mouseleave:e=>{!function(e){if(!e.editable)return;let t=er.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&ea(e,-1)}(e)},mousedown:(e,r)=>{!function(e,t,n,r){var i;if(!e.editable)return;let o=null!=(i=e.dom.ownerDocument.defaultView)?i:window,s=er.getState(e.state);if(!s||-1==s.activeHandle||s.dragging)return;let l=e.state.doc.nodeAt(s.activeHandle),a=function(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let o=e.domAtPos(t),s=o.node.childNodes[o.offset].offsetWidth,l=n;if(r)for(let e=0;e<n;e++)r[e]&&(s-=r[e],l--);return s/l}(e,s.activeHandle,l.attrs);function c(t){o.removeEventListener("mouseup",c),o.removeEventListener("mousemove",d);let r=er.getState(e.state);(null==r?void 0:r.dragging)&&(function(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),o=h.get(i),s=r.start(-1),l=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,a=e.state.tr;for(let e=0;e<o.height;e++){let t=e*o.width+l;if(e&&o.map[t]==o.map[t-o.width])continue;let r=o.map[t],c=i.nodeAt(r).attrs,h=1==c.colspan?0:l-o.colCount(r);if(c.colwidth&&c.colwidth[h]==n)continue;let d=c.colwidth?c.colwidth.slice():Array(c.colspan).fill(0);d[h]=n,a.setNodeMarkup(s+r,null,{...c,colwidth:d})}a.docChanged&&e.dispatch(a)}(e,r.activeHandle,el(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(er,{setDragging:null})))}function d(t){if(!t.which)return c(t);let i=er.getState(e.state);if(i&&i.dragging){let o=el(i.dragging,t,n);ec(e,i.activeHandle,o,r)}}e.dispatch(e.state.tr.setMeta(er,{setDragging:{startX:t.clientX,startWidth:a}})),ec(e,s.activeHandle,a,r),o.addEventListener("mouseup",c),o.addEventListener("mousemove",d),t.preventDefault()}(e,r,t,n)}},decorations:e=>{let t=er.getState(e);if(t&&t.activeHandle>-1)return function(e,t){var n;let r=[],i=e.doc.resolve(t),o=i.node(-1);if(!o)return l.zF.empty;let s=h.get(o),a=i.start(-1),c=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let t=0;t<s.height;t++){let i=c+t*s.width;if((c==s.width-1||s.map[i]!=s.map[i+1])&&(0==t||s.map[i]!=s.map[i-s.width])){let t=s.map[i],c=a+t+o.nodeAt(t).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",(null==(n=er.getState(e))?void 0:n.dragging)&&r.push(l.NZ.node(a+t,a+t+o.nodeAt(t).nodeSize,{class:"column-resize-dragging"})),r.push(l.NZ.widget(c,h))}}return l.zF.create(e.doc,r)}(e,t.activeHandle)},nodeViews:{}}});return s}var eo=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=t.getMeta(er);if(n&&null!=n.setHandle)return new e(n.setHandle,!1);if(n&&void 0!==n.setDragging)return new e(this.activeHandle,n.setDragging);if(this.activeHandle>-1&&t.docChanged){let n=t.mapping.map(this.activeHandle,-1);return g(t.doc.resolve(n))||(n=-1),new e(n,this.dragging)}return this}};function es(e,t,n,r){let i=e.posAtCoords({left:t.clientX+("right"==n?-r:r),top:t.clientY});if(!i)return -1;let{pos:o}=i,s=p(e.state.doc.resolve(o));if(!s)return -1;if("right"==n)return s.pos;let l=h.get(s.node(-1)),a=s.start(-1),c=l.map.indexOf(s.pos-a);return c%l.width==0?-1:a+l.map[c-1]}function el(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function ea(e,t){e.dispatch(e.state.tr.setMeta(er,{setHandle:t}))}function ec(e,t,n,r){let i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),l=h.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1,a=e.domAtPos(i.start(-1)).node;for(;a&&"TABLE"!=a.nodeName;)a=a.parentNode;a&&en(o,a.firstChild,a,r,l,n)}function eh({allowTableNodeSelection:e=!1}={}){return new o.k_({key:u,state:{init:()=>null,apply(e,t){let n=e.getMeta(u);if(null!=n)return -1==n?null:n;if(null==t||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:S,handleDOMEvents:{mousedown:Q},createSelectionBetween:e=>null!=u.getState(e.state)?e.state.selection:null,handleTripleClick:G,handleKeyDown:V,handlePaste:Z},appendTransaction:(t,n,r)=>(function(e,t,n){let r,i,s=(t||e).selection,l=(t||e).doc;if(s instanceof o.nh&&(i=s.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)r=x.create(l,s.from);else if("row"==i){let e=l.resolve(s.from+1);r=x.rowSelection(e,e)}else if(!n){let e=h.get(s.node),t=s.from+1,n=t+e.map[e.width*e.height-1];r=x.create(l,t+1,n)}}else s instanceof o.U3&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}(s)?r=o.U3.create(l,s.from):s instanceof o.U3&&function({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if("cell"===r.type.spec.tableRole||"header_cell"===r.type.spec.tableRole){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if("cell"===n.type.spec.tableRole||"header_cell"===n.type.spec.tableRole){r=n;break}}return n!==r&&0===t.parentOffset}(s)&&(r=o.U3.create(l,s.$from.start(),s.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t})(r,function(e,t){let n,r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){let i,o,s=h.get(t);if(!s.problems)return r;r||(r=e.tr);let l=[];for(let e=0;e<s.height;e++)l.push(0);for(let e=0;e<s.problems.length;e++){let i=s.problems[e];if("collision"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;let o=e.attrs;for(let e=0;e<o.rowspan;e++)l[i.row+e]+=i.n;
1r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,v(o,o.colspan-i.n,i.n))}else if("missing"==i.type)l[i.row]+=i.n;else if("overlong_rowspan"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-i.n})}else if("colwidth mismatch"==i.type){let e=t.nodeAt(i.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+i.pos),null,{...e.attrs,colwidth:i.colwidth})}else if("zero_sized"==i.type){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}for(let e=0;e<l.length;e++)l[e]&&(null==i&&(i=e),o=e);for(let a=0,c=n+1;a<s.height;a++){let n=t.child(a),s=c+n.nodeSize,h=l[a];if(h>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);let l=[];for(let n=0;n<h;n++){let n=d(e.schema)[t].createAndFill();n&&l.push(n)}let u=(0==a||i==a-1)&&o==a?c+1:s-1;r.insert(r.mapping.map(u),l)}c=s}return r.setMeta(C,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&function e(t,n,r,i){let o=t.childCount,s=n.childCount;e:for(let l=0,a=0;l<s;l++){let s=n.child(l);for(let e=a,n=Math.min(o,l+3);e<n;e++)if(t.child(e)==s){a=e+1,r+=s.nodeSize;continue e}i(s,r),a<o&&t.child(a).sameMarkup(s)?e(t.child(a),s,r+1,i):s.nodesBetween(0,s.content.size,i,r+1),r+=s.nodeSize}}(t.doc,e.doc,0,r):e.doc.descendants(r),n}(r,n),e)})}},252884:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof window}function i(e){return l(e)?(e.nodeName||"").toLowerCase():"#document"}function o(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(l(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function l(e){return!!r()&&(e instanceof Node||e instanceof o(e).Node)}function a(e){return!!r()&&(e instanceof Element||e instanceof o(e).Element)}function c(e){return!!r()&&(e instanceof HTMLElement||e instanceof o(e).HTMLElement)}function h(e){return!!r()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof o(e).ShadowRoot)}n.d(t,{$4:()=>M,CP:()=>A,L9:()=>E,Lv:()=>f,Ng:()=>h,Tc:()=>k,Tf:()=>g,ZU:()=>u,_m:()=>T,ep:()=>s,eu:()=>C,gJ:()=>x,mq:()=>i,sQ:()=>b,sb:()=>c,v9:()=>function e(t,n,r){var i;void 0===n&&(n=[]),void 0===r&&(r=!0);let s=function e(t){let n=M(t);return C(n)?t.ownerDocument?t.ownerDocument.body:t.body:c(n)&&u(n)?n:e(n)}(t),l=s===(null==(i=t.ownerDocument)?void 0:i.body),a=o(s);if(l){let t=T(a);return n.concat(a,a.visualViewport||[],u(s)?s:[],t&&r?e(t):[])}return n.concat(s,e(s,[],r))},vq:()=>a,zk:()=>o});let d=new Set(["inline","contents"]);function u(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=E(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!d.has(i)}let p=new Set(["table","td","th"]);function f(e){return p.has(i(e))}let m=[":popover-open",":modal"];function g(e){return m.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let y=["transform","translate","scale","rotate","perspective"],w=["transform","translate","scale","rotate","perspective","filter"],v=["paint","layout","strict","content"];function b(e){let t=k(),n=a(e)?E(e):e;return y.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||w.some(e=>(n.willChange||"").includes(e))||v.some(e=>(n.contain||"").includes(e))}function x(e){let t=M(e);for(;c(t)&&!C(t);){if(b(t))return t;if(g(t))break;t=M(t)}return null}function k(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let S=new Set(["html","body","#document"]);function C(e){return S.has(i(e))}function E(e){return o(e).getComputedStyle(e)}function A(e){return a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function M(e){if("html"===i(e))return e;let t=e.assignedSlot||e.parentNode||h(e)&&e.host||s(e);return h(t)?t.host:t}function T(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}},257995:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var r=n(311699);let i=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,o=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,s=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,l=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,a=r.CU.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight=400",clearMark:e=>
1e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return["strong",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[(0,r.OX)({find:i,type:this.type}),(0,r.OX)({find:s,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:o,type:this.type}),(0,r.Zc)({find:l,type:this.type})]}})},260327:()=>{},260951:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s});var r=n(311699);let i=/(^|[^`])`([^`]+)`(?!`)/,o=/(^|[^`])`([^`]+)`(?!`)/g,s=r.CU.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}}
1,addInputRules(){return[(0,r.OX)({find:i,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:o,type:this.type})]}})},261209:(e,t,n)=>{"use strict";n.d(t,{K:()=>f,w:()=>p});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o="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(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);var c=n(731504);let h="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),d="undefined"!=typeof navigator&&/Win/.test(navigator.platform);function u(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function p(e){return new c.k_({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,o=e.split(/-(?!$)/),s=o[o.length-1];"Space"==s&&(s=" ");for(let e=0;e<o.length-1;e++){let s=o[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else if(/^mod$/i.test(s))h?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+s)}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}(n)]=e[n];return t}(e);return function(e,n){var l;let a=("Esc"==(l=!(o&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||s&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(l="Escape"),"Del"==l&&(l="Delete"),"Left"==l&&(l="ArrowLeft"),"Up"==l&&(l="ArrowUp"),"Right"==l&&(l="ArrowRight"),"Down"==l&&(l="ArrowDown"),l),c,h=t[u(a,n)];if(h&&h(e.state,e.dispatch,e))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=t[u(a,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(d&&n.ctrlKey&&n.altKey)&&(c=r[n.keyCode])&&c!=a){let r=t[u(c,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},310170:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>o,S6:()=>s,pJ:()=>i});var r=n(731504);let i=new r.hs("y-sync"),o=new r.hs("y-undo"),s=new r.hs("yjs-cursor")},319820:(e,t,n)=>{"use strict";n.d(t,{N_:()=>eB});var r=n(311699);let i="numeric",o="ascii",s="alpha",l="asciinumeric",a="alphanumeric",c="domain",h="emoji",d="whitespace";function u(e,t,n){for(let r in t[i]&&(t[l]=!0,t[a]=!0),t[o]&&(t[l]=!0,t[s]=!0),t[l]&&(t[a]=!0),t[s]&&(t[a]=!0),t[a]&&(t[c]=!0),t[h]&&(t[c]=!0),t){let t=(r in n||(n[r]=[]),n[r]);0>t.indexOf(e)&&t.push(e)}}function p(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}p.groups={},p.prototype={accepts(){return!!this.t},go(e){let t=this.j[e];if(t)return t;for(let t=0;t<this.jr.length;t++){let n=this.jr[t][0],r=this.jr[t][1];if(r&&n.test(e))return r}return this.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){let i;return r=r||p.groups,t&&t.j?i=t:(i=new p(t),n&&r&&u(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,o=e.length;if(!o)return i;for(let t=0;t<o-1;t++)i=i.tt(e[t]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){if(r=r||p.groups,t&&t.j)return this.j[e]=t,t;let i,o=this.go(e);return o?(Object.assign((i=new p).j,o.j),i.jr.push.apply(i.jr,o.jr),i.jd=o.jd,i.t=o.t):i=new p,t&&(r&&(i.t&&"string"==typeof i.t?u(t,Object.assign(function(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n),r):n&&u(t,n,r)),i.t=t),this.j[e]=i,i}};let f=(e,t,n,r,i)=>e.ta(t,n,r,i),m=(e,t,n,r,i)=>e.tr(t,n,r,i),g=(e,t,n,r,i)=>e.ts(t,n,r,i),y=(e,t,n,r,i)=>e.tt(t,n,r,i),w="WORD",v="UWORD",b="ASCIINUMERICAL",x="ALPHANUMERICAL",k="LOCALHOST",S="UTLD",C="SCHEME",E="SLASH_SCHEME",A="OPENBRACE",M="CLOSEBRACE",T="OPENBRACKET",R="CLOSEBRACKET",O="OPENPAREN",N="CLOSEPAREN",_="OPENANGLEBRACKET",L="CLOSEANGLEBRACKET",I="FULLWIDTHLEFTPAREN",z
1="FULLWIDTHRIGHTPAREN",D="LEFTCORNERBRACKET",F="RIGHTCORNERBRACKET",$="LEFTWHITECORNERBRACKET",P="RIGHTWHITECORNERBRACKET",j="FULLWIDTHLESSTHAN",J="FULLWIDTHGREATERTHAN",B="AMPERSAND",U="APOSTROPHE",H="ASTERISK",V="BACKSLASH",W="BACKTICK",K="CARET",q="COLON",G="COMMA",Z="DOLLAR",Q="EQUALS",Y="EXCLAMATION",X="HYPHEN",ee="PERCENT",et="PIPE",en="PLUS",er="POUND",ei="QUERY",eo="QUOTE",es="FULLWIDTHMIDDLEDOT",el="SEMI",ea="SLASH",ec="TILDE",eh="UNDERSCORE",ed="EMOJI";var eu=Object.freeze({__proto__:null,ALPHANUMERICAL:x,AMPERSAND:B,APOSTROPHE:U,ASCIINUMERICAL:b,ASTERISK:H,AT:"AT",BACKSLASH:V,BACKTICK:W,CARET:K,CLOSEANGLEBRACKET:L,CLOSEBRACE:M,CLOSEBRACKET:R,CLOSEPAREN:N,COLON:q,COMMA:G,DOLLAR:Z,DOT:"DOT",EMOJI:ed,EQUALS:Q,EXCLAMATION:Y,FULLWIDTHGREATERTHAN:J,FULLWIDTHLEFTPAREN:I,FULLWIDTHLESSTHAN:j,FULLWIDTHMIDDLEDOT:es,FULLWIDTHRIGHTPAREN:z,HYPHEN:X,LEFTCORNERBRACKET:D,LEFTWHITECORNERBRACKET:$,LOCALHOST:k,NL:"NL",NUM:"NUM",OPENANGLEBRACKET:_,OPENBRACE:A,OPENBRACKET:T,OPENPAREN:O,PERCENT:ee,PIPE:et,PLUS:en,POUND:er,QUERY:ei,QUOTE:eo,RIGHTCORNERBRACKET:F,RIGHTWHITECORNERBRACKET:P,SCHEME:C,SEMI:el,SLASH:ea,SLASH_SCHEME:E,SYM:"SYM",TILDE:ec,TLD:"TLD",UNDERSCORE:eh,UTLD:S,UWORD:v,WORD:w,WS:"WS"});let ep=/[a-z]/,ef=/\p{L}/u,em=/\p{Emoji}/u,eg=/\d/,ey=/\s/,ew=null,ev=null;function eb(e,t){let n=function(e){let t=[],n=e.length,r=0;for(;r<n;){let i,o=e.charCodeAt(r),s=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],o=0,s=0;for(;s<r;){let l=e,a=null,c=0,h=null,d=-1,u=-1;for(;s<r&&(a=l.go(n[s]));)(l=a).accepts()?(d=0,u=0,h=l):d>=0&&(d+=n[s].length,u++),c+=n[s].length,o+=n[s].length,s++;o-=d,s-=u,c-=d,i.push({t:h.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}function ex(e,t,n,r,i){let o,s=t.length;for(let n=0;n<s-1;n++){let s=t[n];e.j[s]?o=e.j[s]:((o=new p(r)).jr=i.slice(),e.j[s]=o),e=o}return(o=new p(n)).jr=i.slice(),e.j[t[s-1]]=o,o}function ek(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;"0123456789".indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}let eS={defaultProtocol:"http",events:null,format:eE,formatHref:eE,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function eC(e,t=null){let n=Object.assign({},eS);e&&(n=Object.assign(n,e instanceof eC?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}function eE(e){return e}function eA(e,t){this.t="token",this.v=e,this.tk=t}function eM(e,t){class n extends eA{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}eC.prototype={o:eS,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){let r=null!=t,i=this.o[e];return i&&("object"==typeof i?"function"==typeof(i=n.t in i?i[n.t]:eS[e])&&r&&(i=i(t,n)):"function"==typeof i&&r&&(i=i(t,n.t,n))),i},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},eA.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=eS.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){let t=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",t,this),r=e.get("tagName",t,this),i=this.toFormattedString(e),o={}
1,s=e.get("className",t,this),l=e.get("target",t,this),a=e.get("rel",t,this),c=e.getObj("attributes",t,this),h=e.getObj("events",t,this);return o.href=n,s&&(o.class=s),l&&(o.target=l),a&&(o.rel=a),c&&Object.assign(o,c),{tagName:r,attributes:o,content:i,eventListeners:h}}};let eT=eM("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),eR=eM("text"),eO=eM("nl"),eN=eM("url",{isLink:!0,toHref(e=eS.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==k&&e[1].t===q}}),e_=e=>new p(e);function eL(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}let eI="undefined"!=typeof console&&console&&console.warn||(()=>{}),ez={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function eD(e,t=!1){if(ez.initialized&&eI(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format. 21. Must only contain digits, lowercase ASCII letters or "-" 32. Cannot start or end with "-" 43. "-" cannot repeat`);ez.customSchemes.push([e,t])}function eF(e){return ez.initialized||function(){ez.scanner=function(e=[]){let t={};p.groups=t;let n=new p;null==ew&&(ew=ek("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
4ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==ev&&(ev=ek("ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
4ºÐ´2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5راÙ
ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5Ù
غرب5Ù
ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2Ù
اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ
3Ù
صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4ÙÙ
راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å
«å¦2å
¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é
åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ
å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å
2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2")),y(n,"'",U),y(n,"{",A),y(n,"}",M),y(n,"[",T),y(n,"]",R),y(n,"(",O),y(n,")",N),y(n,"<",_),y(n,">",L),y(n,"ï¼",I),y(n,"ï¼",z),y(n,"ã",D),y(n,"ã",F),y(n,"ã",$),y(n,"ã",P),y(n,"ï¼",j),y(n,"ï¼",J),y(n,"&",B),y(n,"*",H),y(n,"@","AT"),y(n,"`",W),y(n,"^",K),y(n,":",q),y(n,",",G),y(n,"$",Z),y(n,".","DOT"),y(n,"=",Q),y(n,"!",Y),y(n,"-",X),y(n,"%",ee),y(n,"|",et),y(n,"+",en),y(n,"#",er),y(n,"?",ei),y(n,'"',eo),y(n,"/",ea),y(n,";",el),y(n,"~",ec),y(n,"_",eh),y(n,"\\",V),y(n,"ã»",es);let r=m(n,eg,"NUM",{[i]:!0});m(r,eg,r);let f=m(r,ep,b,{[l]:!0}),eb=m(r,ef,x,{[a]:!0}),eS=m(n,ep,w,{[o]:!0});m(eS,eg,f),m(eS,ep,eS),m(f,eg,f),m(f,ep,f);let eC=m(n,ef,v,{[s]:!0});m(eC,ep),m(eC,eg,eb),m(eC,ef,eC),m(eb,eg,eb),m(eb,ep),m(eb,ef,eb);let eE=y(n,"\n","NL",{[d]:!0}),eA=y(n,"\r","WS",{[d]:!0}),eM=m(n,ey,"WS",{[d]:!0});y(n,"",eM),y(eA,"\n",eE),y(eA,"",eM),m(eA,ey,eM),y(eM,"\r"),y(eM,"\n"),m(eM,ey,eM),y(eM,"",eM);let eT=m(n,em,ed,{[h]:!0});y(eT,"#"),m(eT,em,eT),y(eT,"ï¸",eT);let eR=y(eT,"â");y(eR,"#"),m(eR,em,eT);let eO=[[ep,eS],[eg,f]],eN=[[ep,null],[ef,eC],[eg,eb]];for(let e=0;e<ew.length;e++)ex(n,ew[e],"TLD",w,eO);for(let e=0;e<ev.length;e++)ex(n,ev[e],S,v,eN);u("TLD",{tld:!0,ascii:!0},t),u(S,{utld:!0,alpha:!0},t),ex(n,"file",C,w,eO),ex(n,"mailto",C,w,eO),ex(n,"http",E,w,eO),ex(n,"https",E,w,eO),ex(n,"ftp",E,w,eO),ex(n,"ftps",E,w,eO),u(C,{scheme:!0,ascii:!0},t),u(E,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],s=e[t][1]?{scheme:!0}:{slashscheme:!0};r.indexOf("-")>=0?s[c]=!0:ep.test(r)?eg.test(r)?s[l]=!0:s[o]=!0:s[i]=!0,g(n,r,r,s)}return g(n,"localhost",k,{ascii:!0}),n.jd=new p("SYM"),{start:n,tokens:Object.assign({groups:t},eu)}}(ez.customSchemes);for(let e=0;e<ez.tokenQueue.length;e++)ez.tokenQueue[e][1]({scanner:ez.scanner});ez.parser=function({groups:e}){let t=e.domain.concat([B,H,"AT",V,W,K,Z,Q,X,"NUM",ee,et,en,er,ea,"SYM",ec,eh]),n=[U,q,G,"DOT",Y,ee,ei,eo,el,_,L,A,M,R,T,O,N,I,z,D,F,$,P,j,J],r=[B,U,H,V,W,K,Z,Q,X,A,M,ee,et,en,er,ei,ea,"SYM",ec,eh],i=e_(),o=y(i,ec);f(o,r,o),f(o,e.domain,o);let s=e_(),l=e_(),a=e_();f(i,e.domain,s),f(i,e.scheme,l),f(i,e.slashscheme,a),f(s,r,o),f(s,e.domain,s);let c=y(s,"AT");y(o,"AT",c),y(l,"AT",c),y(a,"AT",c);let h=y(o,"DOT");f(h,r,o),f(h,e.domain,o);let d=e_();f(c,e.domain,d),f(d,e.domain,d);let u=y(d,"DOT");f(u,e.domain,d);let p=e_(eT);f(u,e.tld,p),f(u,e.utld,p),y(c,k,p);let m=y(d,X);y(m,X,m),f(m,e.domain,d),f(p,e.domain,d),y(p,"DOT",u),y(p,X,m);let g=y(s,X),w=y(s,"DOT");y(g,X,g),f(g,e.domain,s),f(w,r,o),f(w,e.domain,s);let v=e_(eN);f(w,e.tld,v),f(w,e.utld,v),f(v,e.domain,s),f(v,r,o),y(v,"DOT",w),y(v,X,g),y(v,"AT",c);let b=y(v,q),x=e_(eN);f(b,e.numeric,x);let S=e_(eN),C=e_();f(S,t,S),f(S,n,C),f(C,t,S),f(C,n,C),y(v,ea,S),y(x,ea,S);let E=y(l,q),es=y(a,q),ed=y(es,ea),ep=y(ed,ea);f(l,e.domain,s),y(l,"DOT",w),y(l,X,g),f(a,e.domain,s),y(a,"DOT",w),y(a,X,g),f(E,e.domain,S),y(E,ea,S),y(E,ei,S),f(ep,e.domain,S),f(ep,t,S),y(ep,ea,S);let ef=[[A,M],[T,R],[O,N],[_,L],[I,z],[D,F],[$,P],[j,J]];for(let e=0;e<ef.length;e++){let[r,i]=ef[e],o=y(S,r);y(C,r,o);let s=e_(eN);f(o,t,s);let l=e_();f(o,n,l),y(o,i,S),f(s,t,s),f(s,n,l),f(l,t,s),f(l,n,l),y(s,i,S),y(l,i,S)}return y(i,k,v),y(i,"NL",eO),{start:i,tokens:eu}}(ez.scanner.tokens);for(let e=0;e<ez.pluginQueue.length;e++)ez.pluginQueue[e][1]({scanner:ez.scanner,parser:ez.parser});ez.initialized=!0}(),function(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let l=e,a=null,c=null,h=0,d=null,u=-1;for(;i<r&&!(a=l.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=a||l.go(n[i].t));)a=null,(l=c).accepts()?(u=0,d=l):u>=0&&u++,i++,h++;if(u<0)(i-=h)<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(eL(eR,t,s)),s=[]),i-=u,h-=u;let e=d.t,r=n.slice(i-h,i);o.push(eL(e,t,r))}}return s.length>0&&o.push(eL(eR,t,s)),o}(ez.parser.start,e,eb(ez.scanner.start,e))}function e$(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new eC(n),i=eF(e),o=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&o.push(n.toFormattedObject(r))}return o}eF.scan=eb;var eP=n(731504);let ej=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function eJ(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];
4return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(ej,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}let eB=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 `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if("string"==typeof e)return void eD(e);eD(e.scheme,e.optionalSlashes)})},onDestroy(){p.groups={},ez.scanner=null,ez.parser=null,ez.tokenQueue=[],ez.pluginQueue=[],ez.customSchemes=[],ez.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!eJ(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>!!e}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!eJ(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!eJ(e,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]},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!eJ(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!eJ(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.Zc)({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=e$(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!eJ(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>t.push({text:e.value,data:{href:e.href},index:e.start}))}return t}
4,type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){var e,t,n;let i=[],{protocols:o,defaultProtocol:s}=this.options;return this.options.autolink&&i.push((e={type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!eJ(e,o),protocols:o,defaultProtocol:s}),shouldAutoLink:this.options.shouldAutoLink},new eP.k_({key:new eP.hs("autolink"),appendTransaction:(t,n,i)=>{let o=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),s=t.some(e=>e.getMeta("preventAutolink"));if(!o||s)return;let{tr:l}=i,a=(0,r.T7)(n.doc,[...t]);if((0,r.FF)(a).forEach(({newRange:t})=>{let n,o,s=(0,r.Nx)(i.doc,t,e=>e.isTextblock);if(s.length>1?(n=s[0],o=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ")):s.length&&i.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(n=s[0],o=i.doc.textBetween(n.pos,t.to,void 0," ")),n&&o){let t=o.split(" ").filter(e=>""!==e);if(t.length<=0)return!1;let s=t[t.length-1],a=n.pos+o.lastIndexOf(s);if(!s)return!1;let c=eF(s).map(t=>t.toObject(e.defaultProtocol));if(!(1===c.length?c[0].isLink:3===c.length&&!!c[1].isLink&&["()","[]"].includes(c[0].value+c[2].value)))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:a+e.start+1,to:a+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{(0,r.hO)(t.from,t.to,i.doc).some(t=>t.mark.type===e.type)||l.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),l.steps.length)return l}}))),!0===this.options.openOnClick&&i.push((t={type:this.type},new eP.k_({key:new eP.hs("handleClickLink"),props:{handleClick:(e,n,i)=>{var o,s;if(0!==i.button||!e.editable)return!1;let l=i.target,a=[];for(;"DIV"!==l.nodeName;)a.push(l),l=l.parentNode;if(!a.find(e=>"A"===e.nodeName))return!1;let c=(0,r.gu)(e.state,t.type.name),h=i.target,d=null!=(o=null==h?void 0:h.href)?o:c.href,u=null!=(s=null==h?void 0:h.target)?s:c.target;return!!h&&!!d&&(window.open(d,u),!0)}}}))),this.options.linkOnPaste&&i.push((n={editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type},new eP.k_({key:new eP.hs("handlePasteLink"),props:{handlePaste:(e,t,r)=>{let{state:i}=e,{selection:o}=i,{empty:s}=o;if(s)return!1;let l="";r.content.forEach(e=>{l+=e.textContent});let a=e$(l,{defaultProtocol:n.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!!l&&!!a&&n.editor.commands.setMark(n.type,{href:a.href})}}}))),i}})},323849:(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var r=n(731504),i=n(926477),o=class e{constructor(e){this.cache=new Map(e)}get(e){return this.cache.get(e)}set(e,t,n){e<0||this.cache.set(e,[t,n])}replace(e,t,n,r){this.remove(e),this.set(t,n,r)}remove(e){this.cache.delete(e)}invalidate(t){let n=new e(this.cache),r=t.mapping;return this.cache.forEach(([e,i],o)=>{if(o<0)return;let s=r.mapResult(o),l=t.doc.nodeAt(s.pos);if(!s.deleted&&(null==l?void 0:l.eq(e))){if(o!==s.pos){let e=i.map(e=>e.map(r,0,0)).filter(e=>null!=e);n.replace(o,s.pos,l,e)}}else n.remove(o)}),n}};function s({parser:e,nodeTypes:t=["code_block","codeBlock"],languageExtractor:n=e=>e.attrs.language}){let i=new r.hs("prosemirror-highlight");return new r.k_({key:i,state:{init(r,i){let s=new o,[a,c]=l(i.doc,e,t,n,s);return{cache:s,decorations:a,promises:c}},apply:(r,i)=>{let o=i.cache.invalidate(r),s=!!r.getMeta("prosemirror-highlight-refresh");if(!r.docChanged&&!s)return{cache:o,decorations:i.decorations.map(r.mapping,r.doc),promises:i.promises};let[a,c]=l(r.doc,e,t,n,o);return{cache:o,decorations:a,promises:c}}},view:e=>{let t=new Set,n=()=>{if(t.size>0)return;let n=e.state.tr.setMeta("prosemirror-highlight-refresh",!0);e.dispatch(n)},r=()=>{var r;let o=i.getState(e.state);for(let e of null!=(r=null==o?void 0:o.promises)?r:[])t.add(e),e.then(()=>{t.delete(e),n()}).catch(()=>{t.delete(e)})};return r(),{update:()=>{r()}}},props:{decorations(e){var t;return null==(t=this.getState(e))?void 0:t.decorations}}})}function l(e,t,n,r,o){let s=[],l=[];return e.descendants((e,i)=>{if(!e.type.isTextblock)return!0;
4if(n.includes(e.type.name)){let n=r(e),a=o.get(i);if(a){let[e,t]=a;s.push(...t)}else{let r=t({content:e.textContent,language:n||void 0,pos:i,size:e.nodeSize});r&&Array.isArray(r)?(o.set(i,e,r),s.push(...r)):r instanceof Promise&&(o.remove(i),l.push(r))}}return!1}),[i.zF.create(e,s),l]}},346967:(e,t,n)=>{"use strict";n.d(t,{wR:()=>o});let r=e=>class{constructor(e){this._=e}destroy(){e(this._)}},i=r(clearTimeout),o=(e,t)=>new i(setTimeout(t,e));r(clearInterval),r(e=>"undefined"!=typeof requestAnimationFrame&&cancelAnimationFrame(e)),r(e=>"undefined"!=typeof cancelIdleCallback&&cancelIdleCallback(e))},347920:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var r=(0,n(528769).A)("outline","brand-youtube","IconBrandYoutube",[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3z",key:"svg-1"}]])},350755:(e,t,n)=>{"use strict";n.d(t,{$u:()=>w,EW:()=>y,F2:()=>g,Go:()=>u,O_:()=>p,Pg:()=>a,RS:()=>i,YE:()=>m,cX:()=>d,gR:()=>o,nr:()=>c,tZ:()=>f});var r=n(252884);function i(e){let t=e.activeElement;for(;(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function o(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&(0,r.Ng)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function s(){let e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function l(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function a(e){return!l().includes("jsdom/")&&(!h()&&0===e.width&&0===e.height||h()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function c(){return/apple/i.test(navigator.vendor)}function h(){let e=/android/i;return e.test(s())||e.test(l())}function d(){return s().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function u(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function p(e){return"nativeEvent"in e}function f(e){return e.matches("html,body")}function m(e){return(null==e?void 0:e.ownerDocument)||document}function g(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function y(e){return"composedPath"in e?e.composedPath()[0]:e.target}function w(e){return(0,r.sb)(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}},365509:(e,t,n)=>{"use strict";function r(e){this.content=e}n.d(t,{S4:()=>j,ZF:()=>G,FK:()=>i,CU:()=>a,sX:()=>F,bP:()=>S,u$:()=>x,vI:()=>c,Sj:()=>$,Ji:()=>h}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,o=i.find(e),s=i.content.slice();return -1==o?s.push(n||e,t):(s[o+1]=t,n&&(s[o]=n)),new r(s)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),o=i.content.slice(),s=i.find(e);return o.splice(-1==s?o.length:s,0,t,n),new r(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class i{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let o=0,s=0;s<t;o++){let l=this.content[o],a=s+l.nodeSize;if(a>e&&!1!==n(l,r+s,i||null,o)&&l.content.size){let i=s+1;l.nodesBetween(Math.max(0,e-i),Math.min(l.content.size,t-i),n,r+i)}s=a}}descendants(e){this.nodesBetween(0,this.size,e)}
4textBetween(e,t,n,r){let i="",o=!0;return this.nodesBetween(e,t,(s,l)=>{let a=s.isText?s.text.slice(Math.max(e,l)-l,t-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&&(o?o=!1:i+=n),i+=a},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new i(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,o=0;o<t;i++){let s=this.content[i],l=o+s.nodeSize;l>e&&((o<e||l>t)&&(s=s.isText?s.cut(Math.max(0,e-o),Math.min(s.text.length,t-o)):s.cut(Math.max(0,e-o-1),Math.min(s.content.size,t-o-1))),n.push(s),r+=s.nodeSize),o=l}return new i(n,r)}cutByIndex(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)}addToStart(e){return new i([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new i(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let o=t.child(i),s=n.child(i);if(o==s){r+=o.nodeSize;continue}if(!o.sameMarkup(s))return r;if(o.isText&&o.text!=s.text){for(let e=0;o.text[e]==s.text[e];e++)r++;return r}if(o.content.size||s.content.size){let t=e(o.content,s.content,r+1);if(null!=t)return t}r+=o.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,i){for(let o=t.childCount,s=n.childCount;;){if(0==o||0==s)return o==s?null:{a:r,b:i};let l=t.child(--o),a=n.child(--s),c=l.nodeSize;if(l==a){r-=c,i-=c;continue}if(!l.sameMarkup(a))return{a:r,b:i};if(l.isText&&l.text!=a.text){let e=0,t=Math.min(l.text.length,a.text.length);for(;e<t&&l.text[l.text.length-e-1]==a.text[a.text.length-e-1];)e++,r--,i--;return{a:r,b:i}}if(l.content.size||a.content.size){let t=e(l.content,a.content,r-1,i-1);if(t)return t}r-=c,i-=c}}(this,e,t,n)}findIndex(e,t=-1){if(0==e)return s(0,e);if(e==this.size)return s(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=e){if(i==e||t>0)return s(n+1,i);return s(n,r)}r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return i.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new i(t||e,n)}static from(e){if(!e)return i.empty;if(e instanceof i)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new i([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}i.empty=new i([],0);let o={index:0,offset:0};function s(e,t){return o.index=e,o.offset=t,o}function l(e,t){if(e===t)return!0;if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!l(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class a{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;
vendor: 6,374 bytes, line 4
4if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&l(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return a.none;if(e instanceof a)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}a.none=[];class c extends Error{}class h{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i){let{index:o,offset:s}=t.findIndex(n),l=t.maybeChild(o);if(s==n||l.isText)return i&&!i.canReplace(o,o,r)?null:t.cut(0,n).append(r).append(t.cut(n));let a=e(l.content,n-s-1,r);return a&&t.replaceChild(o,l.copy(a))}(this.content,e+this.openStart,t);return n&&new h(n,this.openStart,this.openEnd)}removeBetween(e,t){return new h(function e(t,n,r){let{index:i,offset:o}=t.findIndex(n),s=t.maybeChild(i),{index:l,offset:a}=t.findIndex(r);if(o==n||s.isText){if(a!=r&&!t.child(l).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-o-1,r-o-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return h.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new h(i.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new h(e,n,r)}}function d(e,t){if(!t.type.compatibleContent(e.type))throw new c("Cannot join "+t.type.name+" onto "+e.type.name)}function u(e,t,n){let r=e.node(n);return d(r,t.node(n)),r}function p(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function f(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(p(e.nodeAfter,r),o++));for(let e=o;e<s;e++)p(i.child(e),r);t&&t.depth==n&&t.textOffset&&p(t.nodeBefore,r)}function m(e,t){return e.type.checkContent(t),e.copy(t)}function g(e,t,n){let r=[];return f(null,e,n,r),e.depth>n&&p(m(u(e,t,n+1),g(e,t,n+1)),r),f(t,null,n,r),new i(r)}h.empty=new h(i.empty,0,0);class y{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return a.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var o=0;o<i.length;o++)!1!==i[o].type.spec.inclusive||r&&i[o].isInSet(r.marks)||(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new x(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:o}=t.content.findIndex(i),s=i-o;if(n.push(t,e,r+o),!s||(t=t.child(e)).isText)break;
4i=s-1,r+=o+1}return new y(t,n,i)}static resolveCached(e,t){let n=b.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else b.set(e,n=new w);let r=n.elts[n.i]=y.resolve(e,t);return n.i=(n.i+1)%v,r}}class w{constructor(){this.elts=[],this.i=0}}let v=12,b=new WeakMap;class x{constructor(e,t,n){this.$from=e,this.$to=t,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)}}let k=Object.create(null);class S{constructor(e,t,n,r=a.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||i.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&l(this.attrs,t||e.defaultAttrs||k)&&a.sameSet(this.marks,n||a.none)}copy(e=null){return e==this.content?this:new S(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new S(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return h.empty;let r=this.resolve(e),i=this.resolve(t),o=n?0:r.sharedDepth(t),s=r.start(o);return new h(r.node(o).content.cut(r.pos-s,i.pos-s),r.depth-o,i.depth-o)}replace(e,t,n){var r=this.resolve(e),o=this.resolve(t);if(n.openStart>r.depth)throw new c("Inserted content deeper than insertion position");if(r.depth-n.openStart!=o.depth-n.openEnd)throw new c("Inconsistent open depths");return function e(t,n,r,o){let s=t.index(o),l=t.node(o);if(s==n.index(o)&&o<t.depth-r.openStart){let i=e(t,n,r,o+1);return l.copy(l.content.replaceChild(s,i))}if(!r.content.size)return m(l,g(t,n,o));if(r.openStart||r.openEnd||t.depth!=o||n.depth!=o){let{start:e,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return m(l,function e(t,n,r,o,s){let l=t.depth>s&&u(t,n,s+1),a=o.depth>s&&u(r,o,s+1),c=[];return f(null,t,s,c),l&&a&&n.index(s)==r.index(s)?(d(l,a),p(m(l,e(t,n,r,o,s+1)),c)):(l&&p(m(l,g(t,n,s+1)),c),f(n,r,s,c),a&&p(m(a,g(r,o,s+1)),c)),f(o,null,s,c),new i(c)}(t,e,s,n,o))}{let e=t.parent,i=e.content;return m(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,o,n,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return y.resolveCached(this,e)}resolveNoCache(e){return y.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.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}
4toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),E(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=i.empty,r=0,o=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,r,o),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),o=i&&i.matchFragment(this.content,t);return!!o&&o.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=a.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!a.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=i.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,r,n);return o.type.checkAttrs(o.attrs),o}}S.prototype.text=void 0;class C extends S{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):E(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new C(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new C(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function E(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class A{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new M(e,t);if(null==i.next)return A.empty;let o=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(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);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=T(e),r=n;return e.eat(",")&&(r="}"!=e.next?T(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let s=(n=function(e){let t=[[]];return i(function e(t,o){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,o)),[]);if("seq"==t.type)for(let r=0;;r++){let s=e(t.exprs[r],o);if(r==t.exprs.length-1)return s;i(s,o=n())}else if("star"==t.type){let s=n();return r(o,s),i(e(t.expr,s),s),[r(s)]}else if("plus"==t.type){let s=n();return i(e(t.expr,o),s),i(e(t.expr,s),s),[r(s)]}else if("opt"==t.type)return[r(o)].concat(e(t.expr,o));else if("range"==t.type){let s=o;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,s),r),s=r}if(-1==t.max)i(e(t.expr,s),s);else for(let o=t.min;o<t.max;o++){let o=n();r(s,o),i(e(t.expr,s),o),s=o}return[r(s)]}else if("name"==t.type)return[r(o,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}
vendor: 5,547 bytes, line 4
4function i(e,t){e.forEach(e=>e.to=t)}}(o),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);O(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let o=r[t.join(",")]=new A(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(R);o.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return o}(O(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,o=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];o.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(s)&&r.push(s)}i&&t.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(s,i),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(s,l){let a=s.matchFragment(e,n);if(a&&(!t||a.validEnd))return i.from(l.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:n}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=o(n,l.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:o,next:s}=i.next[e];o.isLeaf||o.hasRequiredAttrs()||o.name in t||r.type&&!s.validEnd||(n.push({match:o.contentMatch,type:o,via:r}),t[o.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}A.empty=new A(!0);class M{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function T(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function R(e,t){return t-e}function O(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:o}=i[e];r||-1!=n.indexOf(o)||t(o)}}(t),n.sort(R)}function N(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function _(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function L(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function I(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new D(e,r,t[r]);return n}class z{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=I(e,n.attrs),this.defaultAttrs=N(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==A.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:_(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new S(this,this.computeAttrs(e),i.from(t),a.setFrom(n))}createChecked(e=null,t,n){return t=i.from(t),this.checkContent(t),new S(this,this.computeAttrs(e),t,a.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=i.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(i.empty,!0);return o?new S(this,e,t.append(o),a.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
4if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){L(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:a.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new z(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class D{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class F{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=I(e,r.attrs),this.excluded=null;let i=N(this.attrs);this.instance=i?new a(this,i):null}create(e=null){return!e&&this.instance?this.instance:new a(this,_(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new F(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){L(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class ${constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=z.compile(this.spec.nodes,this),this.marks=F.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=A.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?P(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:P(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof z){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new C(n,n.defaultAttrs,e,a.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return S.fromJSON(this,e)}markFromJSON(e){return a.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function P(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=r)}if(!s)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class j{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];
4t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new W(this,t,!1);return n.addAll(e,a.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new W(this,t,!0);return n.addAll(e,a.none,t.from,t.to),h.maxOpen(n.finish())}matchTag(e,t,n){for(let o=n?this.tags.indexOf(n)+1:0;o<this.tags.length;o++){var r,i;let n=this.tags[o];if(r=e,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],o=r.style;if(0==o.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(o.length>e.length)||61==o.charCodeAt(e.length)&&o.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=K(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=K(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new j(e,j.schemaRules(e)))}}let J={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},B={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},U={ol:!0,ul:!0};function H(e,t,n){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class V{constructor(e,t,n,r,i,o){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=a.none,this.match=i||(4&o?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(i.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=i.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(i.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!J.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class W{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,o=H(null,t.preserveWhitespace,0)|4*!!n;i=r?new V(r.type,r.attrs,a.none,!0,t.topMatch||r.type.contentMatch,o):n?new V(null,null,a.none,!0,null,o):new V(e.schema.topNodeType,null,a.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)n="full"!==i?n.replace(/\r?\n|\r/g," "):n.replace(/\r\n?/g,"\n");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),s;U.hasOwnProperty(o)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&U.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(s=this.parser.matchTag(e,this,n));t:if(l?l.ignore:B.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let n,r=this.needsBlock;if(J.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break t}let s=l&&l.skip?t:this.readStyles(e,t);s&&this.addAll(e,s),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,l,n,!1===l.consuming?s:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,o;
vendor: 4,107 bytes, line 4
4if(t.node)if((o=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(o.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(o,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(s)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let o=n?e.childNodes[n]:e.firstChild,s=null==r?null:e.childNodes[r];o!=s;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,o=0;t>=0;t--){let s=this.nodes[t],l=s.findWrapping(e);if(l&&(!r||r.length>l.length+o)&&(r=l,i=s,!l.length))break;if(s.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=a.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):q(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let s=H(e,i,o.options);4&o.options&&0==o.content.length&&(s|=4);let l=a.none;return n=n.filter(t=>(o.type?!o.type.allowsMarkType(t.type):!q(t.type,e))||(l=t.addToSet(l),!1)),this.nodes.push(new V(e,t,l,r,null,s)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,o=(e,s)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;s>=i;s--)if(o(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=i?n.node(s-i).type:null;if(!e||e.name!=l&&!e.isInGroup(l))return!1;s--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];
4if(t.isTextblock&&t.defaultAttrs)return t}}}function K(e){let t={};for(let n in e)t[n]=e[n];return t}function q(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=e=>{o.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>o.indexOf(i)&&s(i))return!0}};if(s(i.contentMatch))return!0}}class G{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Q(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,o=0;for(;n<i.length&&o<e.marks.length;){let t=e.marks[o];if(!this.marks[t.type.name]){o++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,o++}for(;n<i.length;)r=i.pop()[1];for(;o<e.marks.length;){let n=e.marks[o++],s=this.serializeMark(n,e.isInline,t);s&&(i.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=X(Q(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&X(Q(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return X(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new G(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Z(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Z(e.marks)}}function Z(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q(e){return e.document||window.document}let Y=new WeakMap;function X(e,t,n,r){let i,o,s;if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let l=t[0],a;if("string"!=typeof l)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(o=Y.get(r))&&Y.set(r,(s=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])s||(s=[]),s.push(t);else for(let n=0;n<t.length;n++)e(t[n]);else for(let n in t)e(t[n])}(r),o=s)),a=o)&&a.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let c=l.indexOf(" ");c>0&&(n=l.slice(0,c),l=l.slice(c+1));let h=n?e.createElementNS(n,l):e.createElement(l),d=t[1],u=1;if(d&&"object"==typeof d&&null==d.nodeType&&!Array.isArray(d)){for(let e in u=2,d)if(null!=d[e]){let t=e.indexOf(" ");t>0?h.setAttributeNS(e.slice(0,t),e.slice(t+1),d[e]):h.setAttribute(e,d[e])}}for(let o=u;o<t.length;o++){let s=t[o];if(0===s){if(o<t.length-1||o>u)throw RangeError("Content hole must be the only child of its parent node");return{dom:h,contentDOM:h}}{let{dom:t,contentDOM:o}=X(e,s,n,r);if(h.appendChild(t),o){if(i)throw RangeError("Multiple content holes");i=o}}}return{dom:h,contentDOM:i}}},380314:(e,t,n)=>{"use strict";n.d(t,{BN:()=>p,ER:()=>f,Ej:()=>g,UE:()=>w,UU:()=>m,cY:()=>u,mG:()=>y,we:()=>d});var r=n(497161),i=n(705922),o=n(959007),s="undefined"!=typeof document?i.useLayoutEffect:function(){};function l(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!l(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!l(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function a(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function c(e,t){let n=a(e);return Math.round(t*n)/n}function h(e){let t=i.useRef(e);return s(()=>{t.current=e}),t}function d(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:d=[],platform:u,elements:{reference:p,floating:f}={},transform:m=!0,whileElementsMounted:g,open:y}=e,[w,v]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=i.useState(d);l(b,d)||x(d);let[k,S]=i.useState(null),[C,E]=i.useState(null),A=i.useCallback(e=>
4{e!==O.current&&(O.current=e,S(e))},[]),M=i.useCallback(e=>{e!==N.current&&(N.current=e,E(e))},[]),T=p||k,R=f||C,O=i.useRef(null),N=i.useRef(null),_=i.useRef(w),L=null!=g,I=h(g),z=h(u),D=h(y),F=i.useCallback(()=>{if(!O.current||!N.current)return;let e={placement:t,strategy:n,middleware:b};z.current&&(e.platform=z.current),(0,r.rD)(O.current,N.current,e).then(e=>{let t={...e,isPositioned:!1!==D.current};$.current&&!l(_.current,t)&&(_.current=t,o.flushSync(()=>{v(t)}))})},[b,t,n,z,D]);s(()=>{!1===y&&_.current.isPositioned&&(_.current.isPositioned=!1,v(e=>({...e,isPositioned:!1})))},[y]);let $=i.useRef(!1);s(()=>($.current=!0,()=>{$.current=!1}),[]),s(()=>{if(T&&(O.current=T),R&&(N.current=R),T&&R){if(I.current)return I.current(T,R,F);F()}},[T,R,F,I,L]);let P=i.useMemo(()=>({reference:O,floating:N,setReference:A,setFloating:M}),[A,M]),j=i.useMemo(()=>({reference:T,floating:R}),[T,R]),J=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=c(j.floating,w.x),r=c(j.floating,w.y);return m?{...e,transform:"translate("+t+"px, "+r+"px)",...a(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,m,j.floating,w.x,w.y]);return i.useMemo(()=>({...w,update:F,refs:P,elements:j,floatingStyles:J}),[w,F,P,j,J])}let u=(e,t)=>({...(0,r.cY)(e),options:[e,t]}),p=(e,t)=>({...(0,r.BN)(e),options:[e,t]}),f=(e,t)=>({...(0,r.ER)(e),options:[e,t]}),m=(e,t)=>({...(0,r.UU)(e),options:[e,t]}),g=(e,t)=>({...(0,r.Ej)(e),options:[e,t]}),y=(e,t)=>({...(0,r.mG)(e),options:[e,t]}),w=(e,t)=>({...(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:i}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?(0,r.UE)({element:n.current,padding:i}).fn(t):{}:n?(0,r.UE)({element:n,padding:i}).fn(t):{}}}))(e),options:[e,t]})},384227:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s});var r=n(311699);let i=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,o=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,s=r.CU.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}}
vendor: 4,674 bytes, line 4
4,addInputRules(){return[(0,r.OX)({find:i,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:o,type:this.type})]}})},409601:(e,t,n)=>{"use strict";n.d(t,{Kr:()=>M});var r='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',i="undefined"==typeof Element,o=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=!i&&Element.prototype.getRootNode?function(e){var t;return null==e||null==(t=e.getRootNode)?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},l=function e(t,n){void 0===n&&(n=!0);var r,i=null==t||null==(r=t.getAttribute)?void 0:r.call(t,"inert");return""===i||"true"===i||n&&t&&e(t.parentNode)},a=function(e){var t,n=null==e||null==(t=e.getAttribute)?void 0:t.call(e,"contenteditable");return""===n||"true"===n},c=function(e,t,n){if(l(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(r));return t&&o.call(e,r)&&i.unshift(e),i=i.filter(n)},h=function e(t,n,i){for(var s=[],a=Array.from(t);a.length;){var c=a.shift();if(!l(c,!1))if("SLOT"===c.tagName){var h=c.assignedElements(),d=e(h.length?h:c.children,!0,i);i.flatten?s.push.apply(s,d):s.push({scopeParent:c,candidates:d})}else{o.call(c,r)&&i.filter(c)&&(n||!t.includes(c))&&s.push(c);var u=c.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(c),p=!l(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(u&&p){var f=e(!0===u?c.children:u.children,!0,i);i.flatten?s.push.apply(s,f):s.push({scopeParent:c,candidates:f})}else a.unshift.apply(a,c.children)}}return s},d=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},u=function(e){if(!e)throw Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||a(e))&&!d(e)?0:e.tabIndex},p=function(e,t){var n=u(e);return n<0&&t&&!d(e)?0:n},f=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},m=function(e){return"INPUT"===e.tagName},g=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},y=function(e){if(!e.name)return!0;var t,n=e.form||s(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var i=g(t,e.form);return!i||i===e},w=function(e){return m(e)&&"radio"===e.type&&!y(e)},v=function(e){var t,n,r,i,o,l,a,c=e&&s(e),h=null==(t=c)?void 0:t.host,d=!1;if(c&&c!==e)for(d=!!(null!=(n=h)&&null!=(r=n.ownerDocument)&&r.contains(h)||null!=e&&null!=(i=e.ownerDocument)&&i.contains(e));!d&&h;)d=!!(null!=(l=h=null==(o=c=s(h))?void 0:o.host)&&null!=(a=l.ownerDocument)&&a.contains(h));return d},b=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},x=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=o.call(e,"details>summary:first-of-type")?e.parentElement:e;if(o.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return b(e)}else{if("function"==typeof r){for(var l=e;e;){var a=e.parentElement,c=s(e);if(a&&!a.shadowRoot&&!0===r(a))return b(e);e=e.assignedSlot?e.assignedSlot:a||c===e.ownerDocument?a:c.host}e=l}if(v(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},k=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!o.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1},S=function(e,t){return!(t.disabled||l(t)||m(t)&&"hidden"===t.type||x(t,e)||"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some(function(e){return"SUMMARY"===e.tagName})||k(t))},C=function(e,t){return!(w(t)||0>u(t))&&!!S(e,t)},E=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||!!(t>=0)},A=function e(t){var n=[],r=[];return t.forEach(function(t,i){var o=!!t.scopeParent,s=o?t.scopeParent:t,l=p(s,o),a=o?e(t.candidates):s;0===l?o?n.push.apply(n,a):n.push(s):r.push({documentOrder:i,tabIndex:l,item:t,
4isScope:o,content:a})}),r.sort(f).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},M=function(e,t){return A((t=t||{}).getShadowRoot?h([e],t.includeContainer,{filter:C.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:E}):c(e,t.includeContainer,C.bind(null,t)))}},415409:(e,t,n)=>{"use strict";n.d(t,{v:()=>m});var r=n(311699),i=n(261209),o=n(731504),s=n(365509),l=n(926477);class a extends o.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return a.valid(n)?new a(n):o.LN.near(n)}content(){return s.Ji.empty}eq(e){return e instanceof a&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new a(e.resolve(t.pos))}getBookmark(){return new c(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){n:for(;;){if(!n&&a.valid(e))return e;let r=e.pos,i=null;for(let n=e.depth;;n--){let o=e.node(n);if(t>0?e.indexAfter(n)<o.childCount:e.index(n)>0){i=o.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(a.valid(s))return s}for(;;){let s=t>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!o.nh.isSelectable(i)){e=e.doc.resolve(r+i.nodeSize*t),n=!1;continue n}break}i=s,r+=t;let l=e.doc.resolve(r);if(a.valid(l))return l}return null}}}a.prototype.visible=!1,a.findFrom=a.findGapCursorFrom,o.LN.jsonID("gapcursor",a);class c{constructor(e){this.pos=e}map(e){return new c(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return a.valid(t)?new a(t):o.LN.near(t)}}let h=(0,i.K)({ArrowLeft:d("horiz",-1),ArrowRight:d("horiz",1),ArrowUp:d("vert",-1),ArrowDown:d("vert",1)});function d(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,i){let s=e.selection,l=t>0?s.$to:s.$from,c=s.empty;if(s instanceof o.U3){if(!i.endOfTextblock(n)||0==l.depth)return!1;c=!1,l=e.doc.resolve(t>0?l.after():l.before())}let h=a.findGapCursorFrom(l,t,c);return!!h&&(r&&r(e.tr.setSelection(new a(h))),!0)}}function u(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!a.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return!(i&&i.inside>-1&&o.nh.isSelectable(e.state.doc.nodeAt(i.inside)))&&(e.dispatch(e.state.tr.setSelection(new a(r))),!0)}function p(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof a))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=s.FK.empty;for(let e=r.length-1;e>=0;e--)i=s.FK.from(r[e].createAndFill(null,i));let l=e.state.tr.replace(n.pos,n.pos,new s.Ji(i,0,0));return l.setSelection(o.U3.near(l.doc.resolve(n.pos+1))),e.dispatch(l),!1}function f(e){if(!(e.selection instanceof a))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",l.zF.create(e.doc,[l.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}let m=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[new o.k_({props:{decorations:f,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&a.valid(n)?new a(n):null,handleClick:u,handleKeyDown:h,handleDOMEvents:{beforeinput
4:p}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,r.gk)((0,r.iI)(e,"allowGapCursor",n)))?t:null}}})},424807:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(311699);let i=r.CU.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}})},433499:(e,t,n)=>{"use strict";n.d(t,{C:()=>i});var r=n(926477);function i(e,t){return function({content:n,language:i,pos:o,size:s}){var l,a;let c=[],{tokens:h,fg:d,bg:u,rootStyle:p}=e.codeToTokens(n,{lang:i,...null!=t?t:{theme:e.getLoadedThemes()[0]}}),f=p||(d&&u?`--prosemirror-highlight:${d};--prosemirror-highlight-bg:${u}`:"");if(f){let e=r.NZ.node(o,o+s,{style:f});c.push(e)}let m=o+1;for(let e of h){for(let t of e){let e=m+t.content.length,n=r.NZ.inline(m,e,{style:"string"==typeof(a=null!=(l=t.htmlStyle)?l:`color: ${t.color}`)?a:Object.entries(a).map(([e,t])=>`${e}:${t}`).join(";"),class:"shiki"});c.push(n),m=e}m+=1}return c}}},437080:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var r=(0,n(528769).A)("outline","layout-grid","IconLayoutGrid",[["path",{d:"M4 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M14 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M14 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-3"}]])},497161:(e,t,n)=>{"use strict";n.d(t,{UE:()=>X,ll:()=>q,rD:()=>en,UU:()=>Q,mG:()=>ee,ER:()=>et,cY:()=>G,BN:()=>Z,Ej:()=>Y});let r=Math.min,i=Math.max,o=Math.round,s=Math.floor,l=e=>({x:e,y:e}),a={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function h(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function u(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function f(e){return"y"===e?"height":"width"}let m=new Set(["top","bottom"]);function g(e){return m.has(d(e))?"y":"x"}function y(e){return e.replace(/start|end/g,e=>c[e])}let w=["left","right"],v=["right","left"],b=["top","bottom"],x=["bottom","top"];function k(e){return e.replace(/left|right|bottom|top/g,e=>a[e])}function S(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function E(e,t,n){let r,{reference:i,floating:o}=e,s=g(t),l=p(g(t)),a=f(l),c=d(t),h="y"===s,m=i.x+i.width/2-o.width/2,y=i.y+i.height/2-o.height/2,w=i[a]/2-o[a]/2;switch(c){case"top":r={x:m,y:i.y-o.height};break;case"bottom":r={x:m,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:y};break;case"left":r={x:i.x-o.width,y:y};break;default:r={x:i.x,y:i.y}}switch(u(t)){case"start":r[l]-=w*(n&&h?-1:1);break;case"end":r[l]+=w*(n&&h?-1:1)}return r}let A=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,l=o.filter(Boolean),a=await (null==s.isRTL?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:d}=E(c,r,a),u=r,p={},f=0;for(let n=0;n<l.length;n++){let{name:o,fn:m}=l[n],{x:g,y:y,data:w,reset:v}=await m({x:h,y:d,initialPlacement:r,placement:u,strategy:i,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});h=null!=g?g:h,d=null!=y?y:d,p={...p,[o]:{...p[o],...w}},v&&f<=50&&(f++,"object"==typeof v&&(v.placement&&(u=v.placement),v.rects&&(c=!0===v.rects?await s.getElementRects({reference:e,floating:t,strategy:i}
4):v.rects),{x:h,y:d}=E(c,u,a)),n=-1)}return{x:h,y:d,placement:u,strategy:i,middlewareData:p}};async function M(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:s,elements:l,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:f=0}=h(t,e),m=S(f),g=l[p?"floating"===u?"reference":"floating":u],y=C(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:a})),w="floating"===u?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await (null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await (null==o.isElement?void 0:o.isElement(v))&&await (null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},x=C(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:v,strategy:a}):w);return{top:(y.top-x.top+m.top)/b.y,bottom:(x.bottom-y.bottom+m.bottom)/b.y,left:(y.left-x.left+m.left)/b.x,right:(x.right-y.right+m.right)/b.x}}function T(e){let t=r(...e.map(e=>e.left)),n=r(...e.map(e=>e.top));return{x:t,y:n,width:i(...e.map(e=>e.right))-t,height:i(...e.map(e=>e.bottom))-n}}let R=new Set(["left","top"]);async function O(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),s=d(n),l=u(n),a="y"===g(n),c=R.has(s)?-1:1,p=o&&a?-1:1,f=h(t,e),{mainAxis:m,crossAxis:y,alignmentAxis:w}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&"number"==typeof w&&(y="end"===l?-1*w:w),a?{x:y*p,y:m*c}:{x:m*c,y:y*p}}var N=n(252884);function _(e){let t=(0,N.L9)(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=(0,N.sb)(e),s=i?e.offsetWidth:n,l=i?e.offsetHeight:r,a=o(n)!==s||o(r)!==l;return a&&(n=s,r=l),{width:n,height:r,$:a}}function L(e){return(0,N.vq)(e)?e:e.contextElement}function I(e){let t=L(e);if(!(0,N.sb)(t))return l(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:s}=_(t),a=(s?o(n.width):n.width)/r,c=(s?o(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}let z=l(0);function D(e){let t=(0,N.zk)(e);return(0,N.Tc)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:z}function F(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),s=L(e),a=l(1);t&&(r?(0,N.vq)(r)&&(a=I(r)):a=I(e));let c=(void 0===(i=n)&&(i=!1),r&&(!i||r===(0,N.zk)(s))&&i)?D(s):l(0),h=(o.left+c.x)/a.x,d=(o.top+c.y)/a.y,u=o.width/a.x,p=o.height/a.y;if(s){let e=(0,N.zk)(s),t=r&&(0,N.vq)(r)?(0,N.zk)(r):r,n=e,i=(0,N._m)(n);for(;i&&r&&t!==n;){let e=I(i),t=i.getBoundingClientRect(),r=(0,N.L9)(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;h*=e.x,d*=e.y,u*=e.x,p*=e.y,h+=o,d+=s,n=(0,N.zk)(i),i=(0,N._m)(n)}}return C({width:u,height:p,x:h,y:d})}function $(e,t){let n=(0,N.CP)(e).scrollLeft;return t?t.left+n:F((0,N.ep)(e)).left+n}function P(e,t,n){void 0===n&&(n=!1);let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:$(e,r)),y:r.top+t.scrollTop}}let j=new Set(["absolute","fixed"]);function J(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=(0,N.zk)(e),r=(0,N.ep)(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,a=0;if(i){o=i.width,s=i.height;let e=(0,N.Tc)();(!e||e&&"fixed"===t)&&(l=i.offsetLeft,a=i.offsetTop)}return{width:o,height:s,x:l,y:a}}(e,n);else if("document"===t)r=function(e){let t=(0,N.ep)(e),n=(0,N.CP)(e),r=e.ownerDocument.body,o=i(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=i(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),l=-n.scrollLeft+$(e),a=-n.scrollTop;return"rtl"===(0,N.L9)(r).direction&&(l+=i(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:l,y:a}}((0,N.ep)(e));else if((0,N.vq)(t))r=function(e,t){let n=F(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=(0,N.sb)(e)?I(e):l(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y;return{width:s,height:a,x:i*o.x,y:r*o.y}}(t,n);else{let n=D(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return C(r)}function B(e){return"static"===(0,N.L9)(e).position}function U(e,t){if(!(0,N.sb)(e)||"fixed"===(0,N.L9)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,N.ep)(e)===n&&(n=n.ownerDocument.body),n}function H(e,t){let n=(0,N.zk)(e);if((0,N.Tf)(e))return n;if(!(0,N.sb)(e)){let t=(0,N.$4)(e);for(;t&&!(0,N.eu)(t);){if((0,N.vq)(t)&&!B(t))return t;t=(0,N.$4)(t)}return n}let r=U(e,t);for(;r&&(0,N.Lv)(r)&&B(r);)r=U(r,t);return r&&(0,N.eu)(r)&&B(r)&&!(0,N.sQ)(r)?n:r||(0,N.gJ)(e)||n}let V=async function(e){let t=this.getOffsetParent||H,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=(0,N.sb)(t),i=(0,N.ep)(t),o="fixed"===n,s=F(e,!0,o,t),a={scrollLeft:0,scrollTop:0},c=l(0);if(r||!r&&!o)if(("body"!==(0,N.mq)(t)||(0,N.ZU)(i))&&(a=(0,N.CP)(t)),r){let e=F(t,!0,o,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&(c.x=$(i));o&&!r&&i&&(c.x=$(i));let h=!i||r||o?l(0):P(i,a);return{x:s.left+a.scrollLeft-c.x-h.x,y:s.top+a.scrollTop-c.y-h.y,width:s.width,height:s.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},W={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,s=(0,N.ep)(r),a=!!t&&(0,N.Tf)(t.floating);if(r===s||a&&o)return n;let c={scrollLeft:0,scrollTop:0},h=l(1),d=l(0),u=(0,N.sb)(r);
4if((u||!u&&!o)&&(("body"!==(0,N.mq)(r)||(0,N.ZU)(s))&&(c=(0,N.CP)(r)),(0,N.sb)(r))){let e=F(r);h=I(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=!s||u||o?l(0):P(s,c,!0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-c.scrollLeft*h.x+d.x+p.x,y:n.y*h.y-c.scrollTop*h.y+d.y+p.y}},getDocumentElement:N.ep,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:s}=e,l=[..."clippingAncestors"===n?(0,N.Tf)(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=(0,N.v9)(e,[],!1).filter(e=>(0,N.vq)(e)&&"body"!==(0,N.mq)(e)),i=null,o="fixed"===(0,N.L9)(e).position,s=o?(0,N.$4)(e):e;for(;(0,N.vq)(s)&&!(0,N.eu)(s);){let t=(0,N.L9)(s),n=(0,N.sQ)(s);n||"fixed"!==t.position||(i=null),(o?!n&&!i:!n&&"static"===t.position&&!!i&&j.has(i.position)||(0,N.ZU)(s)&&!n&&function e(t,n){let r=(0,N.$4)(t);return!(r===n||!(0,N.vq)(r)||(0,N.eu)(r))&&("fixed"===(0,N.L9)(r).position||e(r,n))}(e,s))?r=r.filter(e=>e!==s):i=t,s=(0,N.$4)(s)}return t.set(e,r),r}(t,this._c):[].concat(n),o],a=l[0],c=l.reduce((e,n)=>{let o=J(t,n,s);return e.top=i(o.top,e.top),e.right=r(o.right,e.right),e.bottom=r(o.bottom,e.bottom),e.left=i(o.left,e.left),e},J(t,a,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:H,getElementRects:V,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=_(e);return{width:t,height:n}},getScale:I,isElement:N.vq,isRTL:function(e){return"rtl"===(0,N.L9)(e).direction}};function K(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function q(e,t,n,o){let l;void 0===o&&(o={});let{ancestorScroll:a=!0,ancestorResize:c=!0,elementResize:h="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,p=L(e),f=a||c?[...p?(0,N.v9)(p):[],...(0,N.v9)(t)]:[];f.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)});let m=p&&d?function(e,t){let n,o=null,l=(0,N.ep)(e);function a(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return!function c(h,d){void 0===h&&(h=!1),void 0===d&&(d=1),a();let u=e.getBoundingClientRect(),{left:p,top:f,width:m,height:g}=u;if(h||t(),!m||!g)return;let y=s(f),w=s(l.clientWidth-(p+m)),v={rootMargin:-y+"px "+-w+"px "+-s(l.clientHeight-(f+g))+"px "+-s(p)+"px",threshold:i(0,r(1,d))||1},b=!0;function x(t){let r=t[0].intersectionRatio;if(r!==d){if(!b)return c();r?c(!1,r):n=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==r||K(u,e.getBoundingClientRect())||c(),b=!1}try{o=new IntersectionObserver(x,{...v,root:l.ownerDocument})}catch(e){o=new IntersectionObserver(x,v)}o.observe(e)}(!0),a}(p,n):null,g=-1,y=null;h&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),p&&!u&&y.observe(p),y.observe(t));let w=u?F(e):null;return u&&function t(){let r=F(e);w&&!K(w,r)&&n(),w=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{a&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,u&&cancelAnimationFrame(l)}}let G=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:o,placement:s,middlewareData:l}=t,a=await O(t,e);return s===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:i+a.x,y:o+a.y,data:{...a,placement:s}}}}},Z=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:o,placement:s}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=h(e,t),f={x:n,y:o},m=await M(t,u),y=g(d(s)),w=p(y),v=f[w],b=f[y];if(l){let e="y"===w?"top":"left",t="y"===w?"bottom":"right",n=v+m[e],o=v-m[t];v=i(n,r(v,o))}if(a){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=b+m[e],o=b-m[t];b=i(n,r(b,o))}let x=c.fn({...t,[w]:v,[y]:b});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[w]:l,[y]:a}}}}}},Q=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,o,s;let{placement:l,middlewareData:a,rects:c,initialPlacement:m,platform:S,elements:C}=t,{mainAxis:E=!0,crossAxis:A=!0,fallbackPlacements:T,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:O="none",flipAlignment:N=!0,..._}=h(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};let L=d(l),I=g(m),z=d(m)===m,D=await (null==S.isRTL?void 0:S.isRTL(C.floating)),F=T||(z||!N?[k(m)]:function(e){let t=k(e);return[y(e),t,y(t)]}(m)),$="none"!==O;!T&&$&&F.push(...function(e,t,n,r){let i=u(e),o=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?v:w;return t?w:v;case"left":case"right":return t?b:x;default:return[]}}(d(e),"start"===n,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(y)))),o}(m,N,O,D));let P=[m,...F],j=await M(t,_),J=[],B=(null==(r=a.flip)?void 0:r.overflows)||[];if(E&&J.push(j[L]),A){let e=function(e,t,n){void 0===n&&(n=!1);let r=u(e),i=p(g(e)),o=f(i),s="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=k(s)),[s,k(s)]}(l,c,D);J.push(j[e[0]],j[e[1]])}if(B=[...B,{placement:l,overflows:J}],!J.every(e=>e<=0)){let e=((null==(i=a.flip)?void 0:i.index)||0)+1,t=P[e];if(t&&("alignment"!==A||I===g(t)||B.every(e=>e.overflows[0]>0&&g(e.placement)===I)))return{data:{index:e,overflows:B},reset:{placement:t}};let n=null==(o=B.filter(e=>e.overflows[0]<=0).sort((e,t)=>
4e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(R){case"bestFit":{let e=null==(s=B.filter(e=>{if($){let t=g(e.placement);return t===I||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:s[0];e&&(n=e);break}case"initialPlacement":n=m}if(l!==n)return{reset:{placement:n}}}return{}}}},Y=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,o;let s,l,{placement:a,rects:c,platform:p,elements:f}=t,{apply:m=()=>{},...y}=h(e,t),w=await M(t,y),v=d(a),b=u(a),x="y"===g(a),{width:k,height:S}=c.floating;"top"===v||"bottom"===v?(s=v,l=b===(await (null==p.isRTL?void 0:p.isRTL(f.floating))?"start":"end")?"left":"right"):(l=v,s="end"===b?"top":"bottom");let C=S-w.top-w.bottom,E=k-w.left-w.right,A=r(S-w[s],C),T=r(k-w[l],E),R=!t.middlewareData.shift,O=A,N=T;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(N=E),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(O=C),R&&!b){let e=i(w.left,0),t=i(w.right,0),n=i(w.top,0),r=i(w.bottom,0);x?N=k-2*(0!==e||0!==t?e+t:i(w.left,w.right)):O=S-2*(0!==n||0!==r?n+r:i(w.top,w.bottom))}await m({...t,availableWidth:N,availableHeight:O});let _=await p.getDimensions(f.floating);return k!==_.width||S!==_.height?{reset:{rects:!0}}:{}}}},X=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:o,placement:s,rects:l,platform:a,elements:c,middlewareData:d}=t,{element:m,padding:y=0}=h(e,t)||{};if(null==m)return{};let w=S(y),v={x:n,y:o},b=p(g(s)),x=f(b),k=await a.getDimensions(m),C="y"===b,E=C?"clientHeight":"clientWidth",A=l.reference[x]+l.reference[b]-v[b]-l.floating[x],M=v[b]-l.reference[b],T=await (null==a.getOffsetParent?void 0:a.getOffsetParent(m)),R=T?T[E]:0;R&&await (null==a.isElement?void 0:a.isElement(T))||(R=c.floating[E]||l.floating[x]);let O=R/2-k[x]/2-1,N=r(w[C?"top":"left"],O),_=r(w[C?"bottom":"right"],O),L=R-k[x]-_,I=R/2-k[x]/2+(A/2-M/2),z=i(N,r(I,L)),D=!d.arrow&&null!=u(s)&&I!==z&&l.reference[x]/2-(I<N?N:_)-k[x]/2<0,F=D?I<N?I-N:I-L:0;return{[b]:v[b]+F,data:{[b]:z,centerOffset:I-z-F,...D&&{alignmentOffset:F}},reset:D}}}),ee=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){let{placement:n,elements:o,rects:s,platform:l,strategy:a}=t,{padding:c=2,x:u,y:p}=h(e,t),f=Array.from(await (null==l.getClientRects?void 0:l.getClientRects(o.reference))||[]),m=function(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>C(T(e)))}(f),y=C(T(f)),w=S(c),v=await l.getElementRects({reference:{getBoundingClientRect:function(){if(2===m.length&&m[0].left>m[1].right&&null!=u&&null!=p)return m.find(e=>u>e.left-w.left&&u<e.right+w.right&&p>e.top-w.top&&p<e.bottom+w.bottom)||y;if(m.length>=2){if("y"===g(n)){let e=m[0],t=m[m.length-1],r="top"===d(n),i=e.top,o=t.bottom,s=r?e.left:t.left,l=r?e.right:t.right;return{top:i,bottom:o,left:s,right:l,width:l-s,height:o-i,x:s,y:i}}let e="left"===d(n),t=i(...m.map(e=>e.right)),o=r(...m.map(e=>e.left)),s=m.filter(n=>e?n.left===o:n.right===t),l=s[0].top,a=s[s.length-1].bottom;return{top:l,bottom:a,left:o,right:t,width:t-o,height:a-l,x:o,y:l}}return y}},floating:o.floating,strategy:a});return s.reference.x!==v.reference.x||s.reference.y!==v.reference.y||s.reference.width!==v.reference.width||s.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},et=function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:l=0,mainAxis:a=!0,crossAxis:c=!0}=h(e,t),u={x:n,y:r},f=g(i),m=p(f),y=u[m],w=u[f],v=h(l,t),b="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(a){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+b.mainAxis,n=o.reference[m]+o.reference[e]-b.mainAxis;y<t?y=t:y>n&&(y=n)}if(c){var x,k;let e="y"===m?"width":"height",t=R.has(d(i)),n=o.reference[f]-o.floating[e]+(t&&(null==(x=s.offset)?void 0:x[f])||0)+(t?0:b.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:(null==(k=s.offset)?void 0:k[f])||0)-(t?b.crossAxis:0);w<n?w=n:w>r&&(w=r)}return{[m]:y,[f]:w}}}},en=(e,t,n)=>{let r=new Map,i={platform:W,...n},o={...i.platform,_c:r};return A(e,t,{...i,platform:o})}},528942:(e,t,n)=>{"use strict";let r;n.d(t,{Zr:()=>K,YZ:()=>W});var i=n(365509),o=n(731504),s=n(413997),l=n(966108),a=n(587065);let c=/[\uD800-\uDBFF]/,h=/[\uDC00-\uDFFF]/;var d=n(551467),u=n(310170),p=n(644975),f=n(33558);let m=Math.random;var g=n(959371),y=n(607878);let w=e=>void 0===e?null:e;class v{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}}let b=new v;try{"undefined"!=typeof localStorage&&localStorage&&(b=localStorage)}catch(e){}let x=b;var k=n(47906),S=n(955036);let C=void 0!==S&&S.release&&/node|io\.js/.test(S.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==S?S:0),E="undefined"!=typeof window&&"undefined"!=typeof document&&!C;"undefined"!=typeof navigator&&/Mac/.test(navigator.platform);let A=[],M=e=>(()=>
4{if(void 0===r)if(C){r=g.vt();let e=S.argv,t=null;for(let n=0;n<e.length;n++){let i=e[n];"-"===i[0]?(null!==t&&r.set(t,""),t=i):null!==t?(r.set(t,i),t=null):A.push(i)}null!==t&&r.set(t,"")}else"object"==typeof location?(r=g.vt(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){let[t,n]=e.split("=");r.set(`--${y.jN(t,"-")}`,n),r.set(`-${y.jN(t,"-")}`,n)}})):r=g.vt();return r})().has(e),T=e=>C?w(S.env[e.toUpperCase().replaceAll("-","_")]):w(x.getItem(e)),R=e=>M("--"+e)||null!==T(e);R("production"),C&&k.EK(S.env.FORCE_COLOR,["true","1","2"])||!M("--no-colors")&&!R("no-color")&&(!C||S.stdout.isTTY)&&(!C||M("--color")||null!==T("COLORTERM")||(T("TERM")||"").includes("color"));let O="undefined"!=typeof document?document:{};"undefined"!=typeof DOMParser&&new DOMParser,O.ELEMENT_NODE,O.TEXT_NODE,O.CDATA_SECTION_NODE,O.COMMENT_NODE,O.DOCUMENT_NODE,O.DOCUMENT_TYPE_NODE,O.DOCUMENT_FRAGMENT_NODE;var N=n(346967),_=n(710578);let L=(e,t)=>e>>>t|e<<32-t,I=e=>L(e,2)^L(e,13)^L(e,22),z=e=>L(e,6)^L(e,11)^L(e,25),D=e=>L(e,7)^L(e,18)^e>>>3,F=e=>L(e,17)^L(e,19)^e>>>10,$=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),P=new Uint32Array([0x6a09e66
47,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]);class j{constructor(){let e=new ArrayBuffer(320);this._H=new Uint32Array(e,0,8),this._H.set(P),this._W=new Uint32Array(e,64,64)}_updateHash(){let e=this._H,t=this._W;for(let e=16;e<64;e++)t[e]=F(t[e-2])+t[e-7]+D(t[e-15])+t[e-16];let n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],l=e[5],a=e[6],c=e[7];for(let e=0,h,d;e<64;e++)h=c+z(s)+(s&l^~s&a)+$[e]+t[e]>>>0,d=I(n)+(n&r^n&i^r&i)>>>0,c=a,a=l,l=s,s=o+h>>>0,o=i,i=r,r=n,n=h+d>>>0;e[0]+=n,e[1]+=r,e[2]+=i,e[3]+=o,e[4]+=s,e[5]+=l,e[6]+=a,e[7]+=c}digest(e){let t=0;for(;t+56<=e.length;){let n=0;for(;n<16&&t+3<e.length;n++)this._W[n]=e[t++]<<24|e[t++]<<16|e[t++]<<8|e[t++];if(t%64!=0){for(this._W.fill(0,n,16);t<e.length;)this._W[n]|=e[t]<<(3-t%4)*8,t++;this._W[n]|=_.wt<<(3-t%4)*8}this._updateHash()}let n=t%64!=0;this._W.fill(0,0,16);let r=0;for(;t<e.length;r++)for(let n=3;n>=0&&t<e.length;n--)this._W[r]|=e[t++]<<8*n;n||(this._W[r-(t%4!=0)]|=_.wt<<(3-t%4)*8),this._W[14]=e.byteLength/_.V7,this._W[15]=8*e.byteLength,this._updateHash();let i=new Uint8Array(32);for(let e=0;e<this._H.length;e++)for(let t=0;t<4;t++)i[4*e+t]=this._H[e]>>>(3-t)*8;return i}}var J=n(763614),B=n(913141).Buffer;let U=E?e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=y.QV(e[n]);return btoa(t)}:e=>B.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),H=(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&t.sv.get(e.id.client)>e.id.clock&&!p.X(t.ds,e.id),V=[{light:"#ecd44433",dark:"#ecd444"}],W=(e,{colors:t=V,colorMapping:n=new Map,permanentUserData:r=null,onFirstRender:i=()=>{},mapping:s}={})=>{let l=!1,a=new q(e,s),c=new o.k_({props:{editable:e=>{let t=u.pJ.getState(e);return null==t.snapshot&&null==t.prevSnapshot}},key:u.pJ,state:{init:(i,o)=>({type:e,doc:e.doc,binding:a,snapshot:null,prevSnapshot:null,isChangeOrigin:!1,isUndoRedoOperation:!1,addToHistory:!0,colors:t,colorMapping:n,permanentUserData:r}),apply:(e,t)=>{let n=e.getMeta(u.pJ);if(void 0!==n)for(let e in t=Object.assign({},t),n)t[e]=n[e];return t.addToHistory=!1!==e.getMeta("addToHistory"),t.isChangeOrigin=void 0!==n&&!!n.isChangeOrigin,t.isUndoRedoOperation=void 0!==n&&!!n.isChangeOrigin&&!!n.isUndoRedoOperation,null!==a.prosemirrorView&&void 0!==n&&(null!=n.snapshot||null!=n.prevSnapshot)&&N.wR(0,()=>{null!=a.prosemirrorView&&(null==n.restore?a._renderSnapshot(n.snapshot,n.prevSnapshot,t):(a._renderSnapshot(n.snapshot,n.snapshot,t),delete t.restore,delete t.snapshot,delete t.prevSnapshot,a.mux(()=>{a._prosemirrorChanged(a.prosemirrorView.state.doc)})))}),t}},view:e=>(a.initView(e),null==s&&a._forceRerender(),i(),{update:()=>{let t=c.getState(e.state);if(null==t.snapshot&&null==t.prevSnapshot&&(l||null!==e.state.doc.content.findDiffStart(e.state.doc.type.createAndFill().content))){if(l=!0,!1===t.addToHistory&&!t.isChangeOrigin){let t=u.Mj.getState(e.state),n=t&&t.undoManager;n&&n.stopCapturing()}a.mux(()=>{t.doc.transact(n=>{n.meta.set("addToHistory",t.addToHistory),a._prosemirrorChanged(e.state.doc)},u.pJ)})}},destroy:()=>{a.destroy()}})});return c},K=(e,t)=>({type:t.selection.jsonID,anchor:(0,f.Bw)(t.selection.anchor,e.type,e.mapping),head:(0,f.Bw)(t.selection.head,e.type,e.mapping)});class q{constructor(e,t=new Map){this.type=e,this.prosemirrorView=null,this.mux=(()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else void 0!==n&&n()}})(),this.mapping=t,this.isOMark=new Map,this._observeFunction=this._typeChanged.bind(this),this.doc=e.doc,this.beforeTransactionSelection=null,this.beforeAllTransactions=()=>{null===this.beforeTransactionSelection&&null!=this.prosemirrorView&&(this.beforeTransactionSelection=K(this,this.prosemirrorView.state))},this.afterAllTransactions=()=>{this.beforeTransactionSelection=null},this._domSelectionInView=null}get _tr(){return this.prosemirrorView.state.tr.setMeta("addToHistory",!1)}_isLocalCursorInView(){return!!this.prosemirrorView.hasFocus()&&(E&&null===this._domSelectionInView&&(N.wR(0,()=>{this._domSelectionInView=null}),this._domSelectionInView=this._isDomSelectionInView()),this._domSelectionInView)}_isDomSelectionInView(){let e=this.prosemirrorView._root.getSelection();if(null==e||null==e.anchorNode)return!1;let t=this.prosemirrorView._root.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset),0===t.getClientRects().length&&t.startContainer&&t.collapsed&&t.selectNodeContents(t.startContainer);let n=t.getBoundingClientRect(),r=O.documentElement;return n.bottom>=0&&n.right>=0&&n.left<=(window.innerWidth||r.clientWidth||0)&&n.top<=(window.innerHeight||r.clientHeight||0)}renderSnapshot(e,t){t||(t=p.$p(p.cU(),new Map)),this.prosemirrorView.dispatch(this._tr.setMeta(u.pJ,{snapshot:e,prevSnapshot:t}))}unrenderSnapshot(){this.mapping.clear(),this.mux(()=>{let e=this.type.toArray().map(e=>Z(e,this.prosemirrorView.state.schema,this)).filter(e=>
4null!==e),t=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new i.Ji(i.FK.from(e),0,0));t.setMeta(u.pJ,{snapshot:null,prevSnapshot:null}),this.prosemirrorView.dispatch(t)})}_forceRerender(){this.mapping.clear(),this.mux(()=>{let e=null!==this.beforeTransactionSelection?null:this.prosemirrorView.state.selection,t=this.type.toArray().map(e=>Z(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),n=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new i.Ji(i.FK.from(t),0,0));if(e){let t=s.jk(s.T9(e.anchor,0),n.doc.content.size),r=s.jk(s.T9(e.head,0),n.doc.content.size);n.setSelection(o.U3.create(n.doc,t,r))}this.prosemirrorView.dispatch(n.setMeta(u.pJ,{isChangeOrigin:!0,binding:this}))})}_renderSnapshot(e,t,n){let r=this.doc,o=this.type;if(e||(e=p.P9(this.doc)),e instanceof Uint8Array||t instanceof Uint8Array)if(e instanceof Uint8Array&&t instanceof Uint8Array||d.Mq(),r=new p.JA({gc:!1}),p.Qs(r,t),t=p.P9(r),p.Qs(r,e),e=p.P9(r),null===o._item){let e=Array.from(this.doc.share.keys()).find(e=>this.doc.share.get(e)===this.type);o=r.getXmlFragment(e)}else{let e=r.store.clients.get(o._item.id.client)??[],t=p.A$(e,o._item.id.clock);o=e[t].content.type}this.mapping.clear(),this.mux(()=>{r.transact(r=>{let l=n.permanentUserData;l&&l.dss.forEach(e=>{p.O_(r,e,e=>{})});let c=(e,t)=>{let r="added"===e?l.getUserByClientId(t.client):l.getUserByDeletedId(t);return{user:r,type:e,color:((e,t,n)=>{if(!e.has(n)){let r;if(e.size<t.length){let n=a.vt();e.forEach(e=>n.add(e)),t=t.filter(e=>!n.has(e))}e.set(n,(r=t)[s.RI(m()*r.length)])}return e.get(n)})(n.colorMapping,n.colors,r)}},h=p.br(o,new p.Fm(t.ds,e.sv)).map(n=>!n._item.deleted||H(n._item,e)||H(n._item,t)?Z(n,this.prosemirrorView.state.schema,{mapping:new Map,isOMark:new Map},e,t,c):null).filter(e=>null!==e),d=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new i.Ji(i.FK.from(h),0,0));this.prosemirrorView.dispatch(d.setMeta(u.pJ,{isChangeOrigin:!0}))},u.pJ)})}_typeChanged(e,t){if(null==this.prosemirrorView)return;let n=u.pJ.getState(this.prosemirrorView.state);if(0===e.length||null!=n.snapshot||null!=n.prevSnapshot)return void this.renderSnapshot(n.snapshot,n.prevSnapshot);this.mux(()=>{let e=(e,t)=>this.mapping.delete(t);p.O_(t,t.deleteSet,e=>{if(e.constructor===p.q7){let t=e.content.type;t&&this.mapping.delete(t)}}),t.changed.forEach(e),t.changedParentTypes.forEach(e);let n=this.type.toArray().map(e=>G(e,this.prosemirrorView.state.schema,this)).filter(e=>null!==e),r=this._tr.replace(0,this.prosemirrorView.state.doc.content.size,new i.Ji(i.FK.from(n),0,0));((e,t,n)=>{if(null!==t&&null!==t.anchor&&null!==t.head)if("all"===t.type)e.setSelection(new o.i5(e.doc));else if("node"===t.type){let r=(0,f.bL)(n.doc,n.type,t.anchor,n.mapping);e.setSelection(o.nh.create(e.doc,r))}else{let r=(0,f.bL)(n.doc,n.type,t.anchor,n.mapping),i=(0,f.bL)(n.doc,n.type,t.head,n.mapping);if(null!==r&&null!==i){let t=o.U3.between(e.doc.resolve(r),e.doc.resolve(i));e.setSelection(t)}}})(r,this.beforeTransactionSelection,this),r=r.setMeta(u.pJ,{isChangeOrigin:!0,isUndoRedoOperation:t.origin instanceof p.ad}),null!==this.beforeTransactionSelection&&this._isLocalCursorInView()&&r.scrollIntoView(),this.prosemirrorView.dispatch(r)})}_prosemirrorChanged(e){this.doc.transact(()=>{ed(this.doc,this.type,e,this),this.beforeTransactionSelection=K(this,this.prosemirrorView.state)},u.pJ)}initView(e){null!=this.prosemirrorView&&this.destroy(),this.prosemirrorView=e,this.doc.on("beforeAllTransactions",this.beforeAllTransactions),this.doc.on("afterAllTransactions",this.afterAllTransactions),this.type.observeDeep(this._observeFunction)}destroy(){null!=this.prosemirrorView&&(this.prosemirrorView=null,this.type.unobserveDeep(this._observeFunction),this.doc.off("beforeAllTransactions",this.beforeAllTransactions),this.doc.off("afterAllTransactions",this.afterAllTransactions))}}let G=(e,t,n,r,i,o)=>{let s=n.mapping.get(e);if(void 0===s)if(e instanceof p.WF)return Z(e,t,n,r,i,o);else throw d.bD();return s},Z=(e,t,n,r,i,o)=>{let s=[],l=e=>{if(e instanceof p.WF){let l=G(e,t,n,r,i,o);null!==l&&s.push(l)}else{let l=e._item.right?.content?.type;l instanceof p.EY&&!l._item.deleted&&l._item.id.client===l.doc.clientID&&(e.applyDelta([{retain:e.length},...l.toDelta()]),l.doc.transact(e=>{l._item.delete(e)}));let a=Q(e,t,n,r,i,o);
4null!==a&&a.forEach(e=>{null!==e&&s.push(e)})}};void 0===r||void 0===i?e.toArray().forEach(l):p.br(e,new p.Fm(i.ds,r.sv)).forEach(l);try{let l=e.getAttributes(r);void 0!==r&&(H(e._item,r)?H(e._item,i)||(l.ychange=o?o("added",e._item.id):{type:"added"}):l.ychange=o?o("removed",e._item.id):{type:"removed"});let a=t.node(e.nodeName,l,s);return n.mapping.set(e,a),a}catch(t){return e.doc.transact(t=>{e._item.delete(t)},u.pJ),n.mapping.delete(e),null}},Q=(e,t,n,r,i,o)=>{let s=[],l=e.toDelta(r,i,o);try{for(let e=0;e<l.length;e++){let n=l[e];s.push(t.text(n.insert,ec(n.attributes,t)))}}catch(t){return e.doc.transact(t=>{e._item.delete(t)},u.pJ),null}return s},Y=(e,t)=>e instanceof Array?((e,t)=>{let n=new p.ZQ,r=e.map(e=>({insert:e.text,attributes:eh(e.marks,t)}));return n.applyDelta(r),t.mapping.set(n,e),n})(e,t):((e,t)=>{let n=new p.WF(e.type.name);for(let t in e.attrs){let r=e.attrs[t];null!==r&&"ychange"!==t&&n.setAttribute(t,r)}return n.insert(0,et(e).map(e=>Y(e,t))),t.mapping.set(n,e),n})(e,t),X=e=>"object"==typeof e&&null!==e,ee=(e,t)=>{let n=Object.keys(e).filter(t=>null!==e[t]),r=n.length===(null==t?0:Object.keys(t).filter(e=>null!==t[e]).length);for(let i=0;i<n.length&&r;i++){let o=n[i],s=e[o],l=t[o];r="ychange"===o||s===l||X(s)&&X(l)&&ee(s,l)}return r},et=e=>{let t=e.content.content,n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r.isText){let r=[];for(let n=t[e];e<t.length&&n.isText;n=t[++e])r.push(n);e--,n.push(r)}else n.push(r)}return n},en=(e,t)=>{let n=e.toDelta();return n.length===t.length&&n.every((e,n)=>e.insert===t[n].text&&l.HP(e.attributes||{}).length===t[n].marks.length&&l.Si(e.attributes,(e,r)=>{let i=ea(r),o=t[n].marks;return ee(e,o.find(e=>e.type.name===i)?.attrs)}))},er=(e,t)=>{if(e instanceof p.WF&&!(t instanceof Array)&&eu(e,t)){let n=et(t);return e._length===n.length&&ee(e.getAttributes(),t.attrs)&&e.toArray().every((e,t)=>er(e,n[t]))}return e instanceof p.ZQ&&t instanceof Array&&en(e,t)},ei=(e,t)=>e===t||e instanceof Array&&t instanceof Array&&e.length===t.length&&e.every((e,n)=>t[n]===e),eo=(e,t,n)=>{let r=e.toArray(),i=et(t),o=i.length,l=r.length,a=s.jk(l,o),c=0,h=0,d=!1;for(;c<a;c++){let e=r[c],t=i[c];if(ei(n.mapping.get(e),t))d=!0;else if(!er(e,t))break}for(;c+h<a;h++){let e=r[l-h-1],t=i[o-h-1];if(ei(n.mapping.get(e),t))d=!0;else if(!er(e,t))break}return{equalityFactor:c+h,foundMappedChild:d}},es=(e,t,n)=>{n.mapping.set(e,t);let{nAttrs:r,str:i}=(e=>{let t="",n=e._start,r={};for(;null!==n;)!n.deleted&&(n.countable&&n.content instanceof p.DU?t+=n.content.str:n.content instanceof p.v1&&(r[n.content.key]=null)),n=n.right;return{str:t,nAttrs:r}})(e),o=t.map(e=>({insert:e.text,attributes:Object.assign({},r,eh(e.marks,n))})),{insert:s,remove:l,index:a}=((e,t)=>{let n=0,r=0;for(;n<e.length&&n<t.length&&e[n]===t[n];)n++;for(n>0&&c.test(e[n-1])&&n--;r+n<e.length&&r+n<t.length&&e[e.length-r-1]===t[t.length-r-1];)r++;return r>0&&h.test(e[e.length-r])&&r--,{index:n,remove:e.length-n-r,insert:t.slice(n,t.length-r)}})(i,o.map(e=>e.insert).join(""));e.delete(a,l),e.insert(a,s),e.applyDelta(o.map(e=>({retain:e.insert.length,attributes:e.attributes})))},el=/(.*)(--[a-zA-Z0-9+/=]{8})$/,ea=e=>el.exec(e)?.[1]??e,ec=(e,t)=>{let n=[];for(let r in e)n.push(t.mark(ea(r),e[r]));return n},eh=(e,t)=>{let n={};return e.forEach(e=>{"ychange"!==e.type.name&&(n[g._4(t.isOMark,e.type,()=>!e.type.excludes(e.type))?`${e.type.name}--${(e=>{let t;return U((e=>{for(let t=6;t<e.length;t++)e[t%6]=e[t%6]^e[t];return e.slice(0,6)})((t=J.lF(t=>J.IO(t,e)),new j().digest(t))))})(e.toJSON())}`:e.type.name]=e.attrs)}),n},ed=(e,t,n,r)=>{if(t instanceof p.WF&&t.nodeName!==n.type.name)throw Error("node name mismatch!");if(r.mapping.set(t,n),t instanceof p.WF){let e=t.getAttributes(),r=n.attrs;for(let n in r)null!==r[n]?e[n]!==r[n]&&"ychange"!==n&&t.setAttribute(n,r[n]):t.removeAttribute(n);for(let n in e)void 0===r[n]&&t.removeAttribute(n)}let i=et(n),o=i.length,l=t.toArray(),a=l.length,c=s.jk(o,a),h=0,d=0;for(;h<c;h++){let e=l[h],t=i[h];if(!ei(r.mapping.get(e),t))if(er(e,t))r.mapping.set(e,t);else break}for(;d+h+1<c;d++){let e=l[a-d-1],t=i[o-d-1];if(!ei(r.mapping.get(e),t))if(er(e,t))r.mapping.set(e,t);else break}e.transact(()=>{for(;a-h-d>0&&o-h-d>0;){let n=l[h],s=i[h],c=l[a-d-1],u=i[o-d-1];if(n instanceof p.ZQ&&s instanceof Array)en(n,s)||es(n,s,r),h+=1;else{let i=n instanceof p.WF&&eu(n,s),o=c instanceof p.WF&&eu(c,u);if(i&&o){let e=eo(n,s,r),t=eo(c,u,r);
4e.foundMappedChild&&!t.foundMappedChild?o=!1:!e.foundMappedChild&&t.foundMappedChild||e.equalityFactor<t.equalityFactor?i=!1:o=!1}i?(ed(e,n,s,r),h+=1):o?(ed(e,c,u,r),d+=1):(r.mapping.delete(t.get(h)),t.delete(h,1),t.insert(h,[Y(s,r)]),h+=1)}}let n=a-h-d;if(1===a&&0===o&&l[0]instanceof p.ZQ?(r.mapping.delete(l[0]),l[0].delete(0,l[0].length)):n>0&&(t.slice(h,h+n).forEach(e=>r.mapping.delete(e)),t.delete(h,n)),h+d<o){let e=[];for(let t=h;t<o-d;t++)e.push(Y(i[t],r));t.insert(h,e)}},u.pJ)},eu=(e,t)=>!(t instanceof Array)&&e.nodeName===t.type.name},536050:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var r=(0,n(528769).A)("outline","trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]])},593802:(e,t,n)=>{"use strict";n.d(t,{C1:()=>E,bL:()=>C});var r=n(705922),i=n(567166),o=n(254950),s=n(299808),l=n(507891),a=n(935063),c=n(476295),h=n(642354),d=n(442222),u=n(249738),p="Checkbox",[f,m]=(0,o.A)(p),[g,y]=f(p),w=r.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:o,checked:a,defaultChecked:c,required:h,disabled:p,value:f="on",onCheckedChange:m,form:y,...w}=e,[v,b]=r.useState(null),C=(0,i.s)(t,e=>b(e)),E=r.useRef(!1),A=!v||y||!!v.closest("form"),[M=!1,T]=(0,l.i)({prop:a,defaultProp:c,onChange:m}),R=r.useRef(M);return r.useEffect(()=>{let e=null==v?void 0:v.form;if(e){let t=()=>T(R.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[v,T]),(0,u.jsxs)(g,{scope:n,state:M,disabled:p,children:[(0,u.jsx)(d.sG.button,{type:"button",role:"checkbox","aria-checked":k(M)?"mixed":M,"aria-required":h,"data-state":S(M),"data-disabled":p?"":void 0,disabled:p,value:f,...w,ref:C,onKeyDown:(0,s.m)(e.onKeyDown,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,s.m)(e.onClick,e=>{T(e=>!!k(e)||!e),A&&(E.current=e.isPropagationStopped(),E.current||e.stopPropagation())})}),A&&(0,u.jsx)(x,{control:v,bubbles:!E.current,name:o,value:f,checked:M,required:h,disabled:p,form:y,style:{transform:"translateX(-100%)"},defaultChecked:!k(c)&&c})]})});w.displayName=p;var v="CheckboxIndicator",b=r.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,o=y(v,n);return(0,u.jsx)(h.C,{present:r||k(o.state)||!0===o.state,children:(0,u.jsx)(d.sG.span,{"data-state":S(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});b.displayName=v;var x=e=>{let{control:t,checked:n,bubbles:i=!0,defaultChecked:o,...s}=e,l=r.useRef(null),h=(0,a.Z)(n),d=(0,c.X)(t);r.useEffect(()=>{let e=l.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(h!==n&&t){let r=new Event("click",{bubbles:i});e.indeterminate=k(n),t.call(e,!k(n)&&n),e.dispatchEvent(r)}},[h,n,i]);let p=r.useRef(!k(n)&&n);return(0,u.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:null!=o?o:p.current,...s,tabIndex:-1,ref:l,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function k(e){return"indeterminate"===e}function S(e){return k(e)?"indeterminate":e?"checked":"unchecked"}var C=w,E=b},640218:(e,t,n)=>{"use strict";n.d(t,{e:()=>r});let r={slash_menu:{heading:{title:"Heading 1",subtext:"Top-level heading",aliases:["h","heading1","h1"],group:"Headings"},heading_2:{title:"Heading 2",subtext:"Key section heading",aliases:["h2","heading2","subheading"],group:"Headings"},heading_3:{title:"Heading 3",subtext:"Subsection and group heading",aliases:["h3","heading3","subheading"],group:"Headings"},heading_4:{title:"Heading 4",subtext:"Minor subsection heading",aliases:["h4","heading4","subheading4"],group:"Subheadings"},heading_5:{title:"Heading 5",subtext:"Small subsection heading",aliases:["h5","heading5","subheading5"],group:"Subheadings"},heading_6:{title:"Heading 6",subtext:"Lowest-level heading",aliases:["h6","heading6","subheading6"],group:"Subheadings"},toggle_heading:{title:"Toggle Heading 1",subtext:"Toggleable top-level heading",aliases:["h","heading1","h1","collapsable"],group:"Subheadings"},toggle_heading_2:{title:"Toggle Heading 2",subtext:"Toggleable key section heading",aliases:["h2","heading2","subheading","collapsable"],group:"Subheadings"},toggle_heading_3:{title:"Toggle Heading 3",subtext:"Toggleable subsection and group heading",aliases:["h3","heading3","subheading","collapsable"],group:"Subheadings"},quote:{title:"Quote",subtext:"Quote or excerpt",aliases:["quotation","blockquote","bq"],group:"Basic blocks"},toggle_list:{title:"Toggle List",subtext:"List with hideable sub-items",aliases:["li","list","toggleList","toggle list","collapsable list"],group:"Basic blocks"}
4,numbered_list:{title:"Numbered List",subtext:"List with ordered items",aliases:["ol","li","list","numberedlist","numbered list"],group:"Basic blocks"},bullet_list:{title:"Bullet List",subtext:"List with unordered items",aliases:["ul","li","list","bulletlist","bullet list"],group:"Basic blocks"},check_list:{title:"Check List",subtext:"List with checkboxes",aliases:["ul","li","list","checklist","check list","checked list","checkbox"],group:"Basic blocks"},paragraph:{title:"Paragraph",subtext:"The body of your document",aliases:["p","paragraph"],group:"Basic blocks"},code_block:{title:"Code Block",subtext:"Code block with syntax highlighting",aliases:["code","pre"],group:"Basic blocks"},page_break:{title:"Page Break",subtext:"Page separator",aliases:["page","break","separator"],group:"Basic blocks"},table:{title:"Table",subtext:"Table with editable cells",aliases:["table"],group:"Advanced"},image:{title:"Image",subtext:"Resizable image with caption",aliases:["image","imageUpload","upload","img","picture","media","url"],group:"Media"},video:{title:"Video",subtext:"Resizable video with caption",aliases:["video","videoUpload","upload","mp4","film","media","url"],group:"Media"},audio:{title:"Audio",subtext:"Embedded audio with caption",aliases:["audio","audioUpload","upload","mp3","sound","media","url"],group:"Media"},file:{title:"File",subtext:"Embedded file",aliases:["file","upload","embed","media","url"],group:"Media"},emoji:{title:"Emoji",subtext:"Search for and insert an emoji",aliases:["emoji","emote","emotion","face"],group:"Others"}},placeholders:{default:"Enter text or type '/' for commands",heading:"Heading",toggleListItem:"Toggle",bulletListItem:"List",numberedListItem:"List",checkListItem:"List",emptyDocument:void 0,new_comment:"Write a comment...",edit_comment:"Edit comment...",comment_reply:"Add comment..."},file_blocks:{image:{add_button_text:"Add image"},video:{add_button_text:"Add video"},audio:{add_button_text:"Add audio"},file:{add_button_text:"Add file"}},side_menu:{add_block_label:"Add block",drag_handle_label:"Open block menu"},drag_handle:{delete_menuitem:"Delete",colors_menuitem:"Colors",header_row_menuitem:"Header row",header_column_menuitem:"Header column"},table_handle:{delete_column_menuitem:"Delete column",delete_row_menuitem:"Delete row",add_left_menuitem:"Add column left",add_right_menuitem:"Add column right",add_above_menuitem:"Add row above",add_below_menuitem:"Add row below",split_cell_menuitem:"Split cell",merge_cells_menuitem:"Merge cells",background_color_menuitem:"Background color"},suggestion_menu:{no_items_title:"No items found"},color_picker:{text_title:"Text",background_title:"Background",colors:{default:"Default",gray:"Gray",brown:"Brown",red:"Red",orange:"Orange",yellow:"Yellow",green:"Green",blue:"Blue",purple:"Purple",pink:"Pink"}},formatting_toolbar:{bold:{tooltip:"Bold",secondary_tooltip:"Mod+B"},italic:{tooltip:"Italic",secondary_tooltip:"Mod+I"},underline:{tooltip:"Underline",secondary_tooltip:"Mod+U"},strike:{tooltip:"Strike",secondary_tooltip:"Mod+Shift+S"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Colors"},link:{tooltip:"Create link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Edit caption",input_placeholder:"Edit caption"},file_replace:{tooltip:{image:"Replace image",video:"Replace video",audio:"Replace audio",file:"Replace file"}},file_rename:{tooltip:{image:"Rename image",video:"Rename video",audio:"Rename audio",file:"Rename file"},input_placeholder:{image:"Rename image",video:"Rename video",audio:"Rename audio",file:"Rename file"}},file_download:{tooltip:{image:"Download image",video:"Download video",audio:"Download audio",file:"Download file"}},file_delete:{tooltip:{image:"Delete image",video:"Delete video",audio:"Delete audio",file:"Delete file"}},file_preview_toggle:{tooltip:"Toggle preview"},nest:{tooltip:"Nest block",secondary_tooltip:"Tab"},unnest:{tooltip:"Unnest block",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Align text left"},align_center:{tooltip:"Align text center"},align_right:{tooltip:"Align text right"},align_justify:{tooltip:"Justify text"},table_cell_merge:{tooltip:"Merge cells"},comment:{tooltip:"Add comment"}},file_panel:{upload:{title:"Upload",file_placeholder:{image:"Upload image",video:"Upload video",audio:"Upload audio",file:"Upload file"},upload_error:"Error: Upload failed"},embed:{title:"Embed",embed_button:{image:"Embed image",video:"Embed video",audio:"Embed audio",file:"Embed file"},url_placeholder:"Enter URL"}},link_toolbar:{delete:{tooltip:"Remove link"},edit:{text:"Edit link",tooltip:"Edit"},open:{tooltip:"Open in new tab"}
4,form:{title_placeholder:"Edit title",url_placeholder:"Edit URL"}},comments:{edited:"edited",save_button_text:"Save",cancel_button_text:"Cancel",actions:{add_reaction:"Add reaction",resolve:"Resolve",edit_comment:"Edit comment",delete_comment:"Delete comment",more_actions:"More actions"},reactions:{reacted_by:"Reacted by"},sidebar:{marked_as_resolved:"Marked as resolved",more_replies:e=>`${e} more replies`}},generic:{ctrl_shortcut:"Ctrl"}}},642159:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(311699);let i=r.bP.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",(0,r.KV)(this.options.HTMLAttributes,e),0]}})},675558:(e,t,n)=>{"use strict";n.d(t,{b6:()=>v,ZS:()=>k,tN:()=>x});var r=function(){};r.prototype.append=function(e){return e.length?(e=r.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},r.prototype.prepend=function(e){return e.length?r.from(e).append(this):this},r.prototype.appendInner=function(e){return new o(this,e)},r.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?r.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},r.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},r.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},r.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},r.from=function(e){return e instanceof r?e:e&&e.length?new i(e):r.empty};var i=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(r);r.empty=new i([]);var o=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(r),s=n(824774),l=n(731504);class a{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,o;if(0==this.eventCount)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}t&&(r=(n=this.remapping(s,this.items.length)).maps.length);let l=e.tr,h=[],d=[];
4return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(s,t+1)).maps.length),r--,d.push(e);return}if(n){d.push(new c(e.map));let t=e.step.map(n.slice(r)),i;t&&l.maybeStep(t).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],h.push(new c(i,void 0,void 0,h.length+d.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,o=new a(this.items.slice(0,s).append(d.reverse().concat(h)),this.eventCount-1),!1},this.items.length,0),{remaining:o,transform:l,selection:i}}addTransform(e,t,n,r){var i,o;let s,l=[],h=this.eventCount,u=this.items,p=!r&&u.length?u.get(u.length-1):null;for(let n=0;n<e.steps.length;n++){let i=e.steps[n].invert(e.docs[n]),o=new c(e.mapping.maps[n],i,t),s;(s=p&&p.merge(o))&&(o=s,n?l.pop():u=u.slice(0,u.length-1)),l.push(o),t&&(h++,t=void 0),r||(p=o)}let f=h-n.depth;return f>d&&(i=u,o=f,i.forEach((e,t)=>{if(e.selection&&0==o--)return s=t,!1}),u=i.slice(s),h-=f),new a(u.append(l),h)}remapping(e,t){let n=new s.X9;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new a(this.items.append(e.map(e=>new c(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},r);let l=t;this.items.forEach(t=>{let r=i.getMirror(--l);if(null==r)return;o=Math.min(o,r);let a=i.maps[r];if(t.step){let o=e.steps[r].invert(e.docs[r]),h=t.selection&&t.selection.map(i.slice(l+1,r));h&&s++,n.push(new c(a,o,h))}else n.push(new c(a))},r);let h=[];for(let e=t;e<o;e++)h.push(new c(i.maps[e]));let d=new a(this.items.slice(0,r).append(h).append(n),s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,i=[],o=0;return this.items.forEach((r,s)=>{if(s>=e)i.push(r),r.selection&&o++;else if(r.step){let e=r.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let l=r.selection&&r.selection.map(t.slice(n));l&&o++;let a=new c(s.invert(),e,l),h,d=i.length-1;(h=i.length&&i[d].merge(a))?i[d]=h:i.push(a)}}else r.map&&n--},this.items.length,0),new a(r.from(i.reverse()),o)}}a.empty=new a(r.empty,0);class c{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new c(t.getMap().invert(),t,this.selection)}}}class h{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let d=20;function u(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function p(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}let f=!1,m=null;function g(e){let t=e.plugins;if(m!=t){f=!1,m=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){f=!0;break}}return f}let y=new l.hs("history"),w=new l.hs("closeHistory");function v(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new l.k_({key:y,state:{init:()=>new h(a.empty,a.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(y),o;if(i)return i.historyState;n.getMeta(w)&&(e=new h(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(y))if(s.getMeta(y).redo)return new h(e.done.addTransform(n,void 0,r,g(t)),e.undone,u(n.mapping.maps),e.prevTime,e.prevComposition);else return new h(e.done,e.undone.addTransform(n,void 0,r,g(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))if(o=n.getMeta("rebased"))return new h(e.done.rebased(n,o),e.undone.rebased(n,o),p(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new h(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),p(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),o=0==e.prevTime||!s&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;
4return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),l=s?p(e.prevRanges,n.mapping):u(n.mapping.maps);return new h(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,g(t)),a.empty,l,n.time,null==i?e.prevComposition:i)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?x:"historyRedo"==n?k:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function b(e,t){return(n,r)=>{let i=y.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let o=function(e,t,n){let r=g(t),i=y.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),a=new h(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta(y,{redo:n,historyState:a})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}let x=b(!1,!0),k=b(!0,!0);b(!1,!1),b(!0,!1)},696183:(e,t,n
4)=>{"use strict";n.d(t,{$B:()=>l,Sd:()=>o,T2:()=>s});var r=n(824774),i=n(365509);function o(e,t=null){return function(n,o){let{$from:s,$to:l}=n.selection,a=s.blockRange(l);if(!a)return!1;let c=o?n.tr:null;return!!function(e,t,n,o=null){let s=!1,l=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=a.resolve(t.start-2);l=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),s=!0}let c=(0,r.oM)(l,n,o,t);return!!c&&(e&&function(e,t,n,o,s){let l=i.FK.empty;for(let e=n.length-1;e>=0;e--)l=i.FK.from(n[e].type.create(n[e].attrs,l));e.step(new r.Wg(t.start-2*!!o,t.end,t.start,t.end,new i.Ji(l,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==s&&(a=e+1);let c=n.length-a,h=t.start+n.length-2*!!o,d=t.parent;for(let n=t.startIndex,i=t.endIndex,o=!0;n<i;n++,o=!1)!o&&(0,r.zy)(e.doc,h,c)&&(e.split(h,c),h+=2*c),h+=d.child(n).nodeSize}(e,t,c,s,n),!0)}(c,a,e,t)&&(o&&o(c.scrollIntoView()),!0)}}function s(e){return function(t,n){let{$from:o,$to:s}=t.selection,l=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);return!!l&&(!n||(o.node(l.depth-1).type==e?function(e,t,n,o){let s=e.tr,l=o.end,a=o.$to.end(o.depth);l<a&&(s.step(new r.Wg(l-1,a,l,a,new i.Ji(i.FK.from(n.create(null,o.parent.copy())),1,0),1,!0)),o=new i.u$(s.doc.resolve(o.$from.pos),s.doc.resolve(a),o.depth));let c=(0,r.jP)(o);if(null==c)return!1;s.lift(o,c);let h=s.doc.resolve(s.mapping.map(l,-1)-1);return(0,r.n9)(s.doc,h.pos)&&h.nodeBefore.type==h.nodeAfter.type&&s.join(h.pos),t(s.scrollIntoView()),!0}(t,n,e,l):function(e,t,n){let o=e.tr,s=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=s.child(t).nodeSize,o.delete(e-1,e+1);let l=o.doc.resolve(n.start),a=l.nodeAfter;if(o.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let c=0==n.startIndex,h=n.endIndex==s.childCount,d=l.node(-1),u=l.index(-1);if(!d.canReplace(u+ +!c,u+1,a.content.append(h?i.FK.empty:i.FK.from(s))))return!1;let p=l.pos,f=p+a.nodeSize;return o.step(new r.Wg(p-!!c,f+ +!!h,p+1,f-1,new i.Ji((c?i.FK.empty:i.FK.from(s.copy(i.FK.empty))).append(h?i.FK.empty:i.FK.from(s.copy(i.FK.empty))),+!c,+!h),+!c)),t(o.scrollIntoView()),!0}(t,n,l)))}}function l(e){return function(t,n){let{$from:o,$to:s}=t.selection,l=o.blockRange(s,t=>t.childCount>0&&t.firstChild.type==e);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let c=l.parent,h=c.child(a-1);if(h.type!=e)return!1;if(n){let o=h.lastChild&&h.lastChild.type==c.type,s=i.FK.from(o?e.create():null),a=new i.Ji(i.FK.from(e.create(null,i.FK.from(c.type.create(null,s)))),o?3:1,0),d=l.start,u=l.end;n(t.tr.step(new r.Wg(d-(o?3:1),u,d,u,a,1,!0)).scrollIntoView())}return!0}}},731504:(e,t,n)=>{"use strict";n.d(t,{$t:()=>S,LN:()=>s,U3:()=>h,hs:()=>M,i5:()=>f,k_:()=>C,nh:()=>u,yn:()=>l});var r=n(365509),i=n(824774);let o=Object.create(null);class s{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new l(e.min(t),e.max(t))]}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 e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let o=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:a,$to:c}=s[l],h=e.mapping.slice(o);e.replaceRange(h.map(a.pos),h.map(c.pos),l?r.Ji.empty:t),0==l&&y(e,o,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:o,$to:s}=r[i],l=e.mapping.slice(n),a=l.map(o.pos),c=l.map(s.pos);i?e.deleteRange(a,c):(e.replaceRangeWith(a,c,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new h(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}
4static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=o[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in o)throw RangeError("Duplicate use of selection JSON ID "+e);return o[e]=t,t.prototype.jsonID=e,t}getBookmark(){return h.between(this.$anchor,this.$head).getBookmark()}}s.prototype.visible=!0;class l{constructor(e,t){this.$from=e,this.$to=t}}let a=!1;function c(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class h extends s{constructor(e,t=e){c(e),c(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return s.near(n);let r=e.resolve(t.map(this.anchor));return new h(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof h&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new d(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new h(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=s.findFrom(t,n,!0)||s.findFrom(t,-n,!0);if(!e)return s.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(s.findFrom(e,-n,!0)||s.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new h(e,t)}}s.jsonID("text",h);class d{constructor(e,t){this.anchor=e,this.head=t}map(e){return new d(e.map(this.anchor),e.map(this.head))}resolve(e){return h.between(e.resolve(this.anchor),e.resolve(this.head))}}class u extends s{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?s.near(i):new u(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof u&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new u(e.resolve(t.anchor))}static create(e,t){return new u(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}u.prototype.visible=!1,s.jsonID("node",u);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new d(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&u.isSelectable(n)?new u(t):s.near(t)}}class f extends s{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=s.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}s.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,o=!1){if(t.inlineContent)return h.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let r=t.child(s);if(r.isAtom){if(!o&&u.isSelectable(r))return u.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,o);if(t)return t}n+=r.nodeSize*i}return null}function y(e,t,n){let r,o=e.steps.length-1;if(o<t)return;let l=e.steps[o];(l instanceof i.Ln||l instanceof i.Wg)&&(e.mapping.maps[o].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(s.near(e.doc.resolve(r),n)))}class w extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.setSelection(s.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function v(e,t){return t&&e?e.bind(t):e}
4class b{constructor(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)}}let x=[new b("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new b("selection",{init:(e,t)=>e.selection||s.atStart(t.doc),apply:e=>e.selection}),new b("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new b("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class k{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new b(e.key,e.spec.state,e))})}}class S{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let s=this.config.plugins[o];if(s.spec.appendTransaction){let l=r?r[o].n:0,a=r?r[o].state:this,c=l<t.length&&s.spec.appendTransaction.call(s,l?t.slice(l):t,a,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),i=!0}r&&(r[o]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new S(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new w(this)}static create(e){let t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new S(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new k(this.schema,e.plugins),n=t.fields,r=new S(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new k(e.schema,e.plugins),o=new S(i);return i.fields.forEach(i=>{if("doc"==i.name)o.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)o.selection=s.fromJSON(o.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let s=n[r],l=s.spec.state;if(s.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){o[i.name]=l.fromJSON.call(s,e,t[r],o);return}}o[i.name]=i.init(e,o)}}),o}}class C{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let o=t[i];o instanceof Function?o=o.bind(n):"handleDOMEvents"==i&&(o=e(o,n,{})),r[i]=o}return r}(e.props,this,this.props),this.key=e.key?e.key.key:A("plugin")}getState(e){return e[this.key]}}let E=Object.create(null);function A(e){return e in E?e+"$"+ ++E[e]:(E[e]=0,e+"$")}class M{constructor(e="key"){this.key=A(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},745841:(e,t,n)=>{"use strict";n.d(t,{$f:()=>O,G2:()=>v,I$:()=>C,Im:()=>_,Qv:()=>a,Sd:()=>y,Z1:()=>E,_G:()=>h,_e:()=>p,bh:()=>b,eB:()=>c,eT:()=>g,ec:()=>N,hy:()=>M,ic:()=>s,iz:()=>A,pC:()=>k,yY:()=>x,y_:()=>L});var r=n(824774),i=n(365509),o=n(731504);let s=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function l(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let a=(e,t,n)=>{let s=l(e,n);if(!s)return!1;let a=f(s);if(!a){let n=s.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let c=a.nodeBefore;if(T(e,a,t,-1))return!0;
4if(0==s.parent.content.size&&(u(c,"end")||o.nh.isSelectable(c)))for(let n=s.depth;;n--){let l=(0,r.$L)(e.doc,s.before(n),s.after(n),i.Ji.empty);if(l&&l.slice.size<l.to-l.from){if(t){let n=e.tr.step(l);n.setSelection(u(c,"end")?o.LN.findFrom(n.doc.resolve(n.mapping.map(a.pos,-1)),-1):o.nh.create(n.doc,a.pos-c.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||s.node(n-1).childCount>1)break}return!!c.isAtom&&a.depth==s.depth-1&&(t&&t(e.tr.delete(a.pos-c.nodeSize,a.pos).scrollIntoView()),!0)},c=(e,t,n)=>{let r=l(e,n);if(!r)return!1;let i=f(r);return!!i&&d(e,i,t)},h=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=w(r);return!!i&&d(e,i,t)};function d(e,t,n){let s=t.nodeBefore,l=t.pos-1;for(;!s.isTextblock;l--){if(s.type.spec.isolating)return!1;let e=s.lastChild;if(!e)return!1;s=e}let a=t.nodeAfter,c=t.pos+1;for(;!a.isTextblock;c++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let h=(0,r.$L)(e.doc,l,c,i.Ji.empty);if(!h||h.from!=l||h instanceof r.Ln&&h.slice.size>=c-l)return!1;if(n){let t=e.tr.step(h);t.setSelection(o.U3.create(t.doc,l)),n(t.scrollIntoView())}return!0}function u(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;s=f(r)}let l=s&&s.nodeBefore;return!!l&&!!o.nh.isSelectable(l)&&(t&&t(e.tr.setSelection(o.nh.create(e.doc,s.pos-l.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let s=m(e,n);if(!s)return!1;let l=w(s);if(!l)return!1;let a=l.nodeAfter;if(T(e,l,t,1))return!0;if(0==s.parent.content.size&&(u(a,"start")||o.nh.isSelectable(a))){let n=(0,r.$L)(e.doc,s.before(),s.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(u(a,"start")?o.LN.findFrom(r.doc.resolve(r.mapping.map(l.pos)),1):o.nh.create(r.doc,r.mapping.map(l.pos))),t(r.scrollIntoView())}return!0}}return!!a.isAtom&&l.depth==s.depth-1&&(t&&t(e.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},y=(e,t,n)=>{let{$head:r,empty:i}=e.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;s=w(r)}let l=s&&s.nodeAfter;return!!l&&!!o.nh.isSelectable(l)&&(t&&t(e.tr.setSelection(o.nh.create(e.doc,s.pos)).scrollIntoView()),!0)};function w(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let v=(e,t)=>{let n=e.selection,i=n instanceof o.nh,s;if(i){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.from))return!1;s=n.from}else if(null==(s=(0,r.N0)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(s);i&&n.setSelection(o.nh.create(n.doc,s-e.doc.resolve(s).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},b=(e,t)=>{let n=e.selection,i;if(n instanceof o.nh){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},x=(e,t)=>{let{$from:n,$to:i}=e.selection,o=n.blockRange(i),s=o&&(0,r.jP)(o);return null!=s&&(t&&t(e.tr.lift(o,s).scrollIntoView()),!0)},k=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function S(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let C=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),l=S(i.contentMatchAt(s));if(!l||!i.canReplaceWith(s,s,l))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,l.createAndFill());i.setSelection(o.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},E=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof o.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=S(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=e.tr.insert(n,s.createAndFill());l.setSelection(o.U3.create(l.doc,n+1)),t(l.scrollIntoView())}return!0},A=(e,t)=>
4{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),o=i&&(0,r.jP)(i);return null!=o&&(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},M=(e,t)=>{let{$from:n,to:r}=e.selection,i,s=n.sharedDepth(r);return 0!=s&&(i=n.before(s),t&&t(e.tr.setSelection(o.nh.create(e.doc,i))),!0)};function T(e,t,n,s){let l,a,c,h=t.nodeBefore,d=t.nodeAfter,p,f,m=h.type.spec.isolating||d.type.spec.isolating;if(!m&&(l=t.nodeBefore,a=t.nodeAfter,c=t.index(),l&&a&&l.type.compatibleContent(a.type)&&(!l.content.size&&t.parent.canReplace(c-1,c)?(n&&n(e.tr.delete(t.pos-l.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(c,c+1)&&!!(a.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(p=(f=h.contentMatchAt(h.childCount)).findWrapping(d.type))&&f.matchType(p[0]||d.type).validEnd){if(n){let o=t.pos+d.nodeSize,s=i.FK.empty;for(let e=p.length-1;e>=0;e--)s=i.FK.from(p[e].create(null,s));s=i.FK.from(h.copy(s));let l=e.tr.step(new r.Wg(t.pos-1,o,t.pos,o,new i.Ji(s,1,0),p.length,!0)),a=l.doc.resolve(o+2*p.length);a.nodeAfter&&a.nodeAfter.type==h.type&&(0,r.n9)(l.doc,a.pos)&&l.join(a.pos),n(l.scrollIntoView())}return!0}let y=d.type.spec.isolating||s>0&&m?null:o.LN.findFrom(t,1),w=y&&y.$from.blockRange(y.$to),v=w&&(0,r.jP)(w);if(null!=v&&v>=t.depth)return n&&n(e.tr.lift(w,v).scrollIntoView()),!0;if(g&&u(d,"start",!0)&&u(h,"end")){let o=h,s=[];for(;s.push(o),!o.isTextblock;)o=o.lastChild;let l=d,a=1;for(;!l.isTextblock;l=l.firstChild)a++;
4if(o.canReplace(o.childCount,o.childCount,l.content)){if(n){let o=i.FK.empty;for(let e=s.length-1;e>=0;e--)o=i.FK.from(s[e].copy(o));n(e.tr.step(new r.Wg(t.pos-s.length,t.pos+d.nodeSize,t.pos+a,t.pos+d.nodeSize-a,new i.Ji(o,s.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function R(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return!!i.node(s).isTextblock&&(n&&n(t.tr.setSelection(o.U3.create(t.doc,e<0?i.start(s):i.end(s)))),!0)}}let O=R(-1),N=R(1);function _(e,t=null){return function(n,i){let{$from:o,$to:s}=n.selection,l=o.blockRange(s),a=l&&(0,r.oM)(l,e,t);return!!a&&(i&&i(n.tr.wrap(l,a).scrollIntoView()),!0)}}function L(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];n.doc.nodesBetween(o,s,(r,o)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(o),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:o},$to:{pos:s}}=n.selection.ranges[r];i.setBlockType(o,s,e,t)}r(i.scrollIntoView())}return!0}}function I(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let z=I(s,a,p),D=I(s,g,y),F={Enter:I(k,E,A,(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof o.nh&&e.selection.node.isBlock)return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let s=[],l,a,c=!1,h=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){let t;c=n.end(e)==n.pos+(n.depth-e),h=n.start(e)==n.pos-(n.depth-e),a=S(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));s.unshift(t||(c&&a?{type:a}:null)),l=e;break}if(1==e)return!1;s.unshift(null)}let d=e.tr;(e.selection instanceof o.U3||e.selection instanceof o.i5)&&d.deleteSelection();let u=d.mapping.map(n.pos),p=(0,r.zy)(d.doc,u,s.length,s);if(p||(s[0]=a?{type:a}:null,p=(0,r.zy)(d.doc,u,s.length,s)),!p)return!1;if(d.split(u,s.length,s),!c&&h&&n.node(l).type!=a){let e=d.mapping.map(n.before(l)),t=d.doc.resolve(e);a&&n.node(l-1).canReplaceWith(t.index(),t.index()+1,a)&&d.setNodeMarkup(d.mapping.map(n.before(l)),a)}return t&&t(d.scrollIntoView()),!0}),"Mod-Enter":C,Backspace:z,"Mod-Backspace":z,"Shift-Backspace":z,Delete:D,"Mod-Delete":D,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new o.i5(e.doc))),!0)},$={"Ctrl-h":F.Backspace,"Alt-Backspace":F["Mod-Backspace"],"Ctrl-d":F.Delete,"Ctrl-Alt-Backspace":F["Mod-Delete"],"Alt-Delete":F["Mod-Delete"],"Alt-d":F["Mod-Delete"],"Ctrl-a":O,"Ctrl-e":N};for(let e in F)$[e]=F[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},824774:(e,t,n)=>{"use strict";n.d(t,{$L:()=>R,Ln:()=>m,N0:()=>M,Um:()=>T,Wg:()=>g,X9:()=>s,dL:()=>j,jP:()=>v,n9:()=>E,oM:()=>b,zy:()=>C});var r=n(365509);class i{constructor(e,t,n){this.pos=e,this.delInfo=t,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 o{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&o.empty)return o.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+o],h=this.ranges[l+s],d=a+c;if(e<=d){let o=c?e==a?-1:e==d?1:t:t,s=a+r+(o<0?0:h);if(n)return s;let u=e==(t<0?a:d)?null:l/3+(e-a)*65536,p=e==a?2:e==d?1:4;return(t<0?e!=a:e!=d)&&(p|=8),new i(s,p,u)}r+=h-c}return n?e+r:new i(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,o=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let l=this.ranges[t+i];if(e<=s+l&&t==3*r)return!0;n+=this.ranges[t+o]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;
vendor: 9,807 bytes, line 4
4for(let r=0,i=0;r<this.ranges.length;r+=3){let o=this.ranges[r],s=o-(this.inverted?i:0),l=o+(this.inverted?0:i),a=this.ranges[r+t],c=this.ranges[r+n];e(s,s+a,l,l+c),i+=c-a}}invert(){return new o(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?o.empty:new o(e<0?[0,-e,0]:[0,0,e])}}o.empty=new o([]);class s{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new s(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new s;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new i(e,r,null)}}let l=Object.create(null);class a{getMap(){return o.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=l[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in l)throw RangeError("Duplicate use of step JSON ID "+e);return l[e]=t,t.prototype.jsonID=e,t}}class c{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new c(e,null)}static fail(e){return new c(null,e)}static fromReplace(e,t,n,i){try{return c.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.vI)return c.fail(e.message);throw e}}}function h(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);o.content.size&&(o=o.copy(h(o.content,t,o))),o.isInline&&(o=t(o,n,r)),i.push(o)}return r.FK.fromArray(i)}class d extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),o=new r.Ji(h(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return c.fromReplace(e,this.from,this.to,o)}invert(){return new u(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new d(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("addMark",d);class u extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new r.Ji(h(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return c.fromReplace(e,this.from,this.to,n)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new u(t.pos,n.pos,this.mark)}merge(e){return e instanceof u&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new u(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new u(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("removeMark",u);class p extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new p(this.pos,t.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new p(t.pos,e.markFromJSON(t.mark))}}a.jsonID("addNodeMark",p);class f extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return c.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(t.pos,e.markFromJSON(t.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&y(e,this.from,this.to)?c.fail("Structure replace would overwrite content"):c.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new o([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new m(t.pos,Math.max(t.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}a.jsonID("replace",m);class g extends a{constructor(e,t,n,r,i,o,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=o,this.structure=s}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return c.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return c.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?c.fromReplace(e,this.from,this.to,n):c.fail("Content does not fit in gap")}getMap(){return new o([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new g(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let e=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function w(e,t,n,i=n.contentMatch,o=!0){let s=e.doc.nodeAt(t),l=[],a=t+1;for(let t=0;t<s.childCount;
4t++){let c=s.child(t),h=a+c.nodeSize,d=i.matchType(c.type);if(d){i=d;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new u(a,h,c.marks[t]));if(o&&c.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(c.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),l.push(new m(a+e.index,a+e.index+e[0].length,i))}}else l.push(new m(a,h,r.Ji.empty));a=h}if(!i.validEnd){let t=i.fillBefore(r.FK.empty,!0);e.replace(a,a,new r.Ji(t,0,0))}for(let t=l.length-1;t>=0;t--)e.step(l[t])}function v(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),i=e.$from.index(n),o=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(i,o,t))return n;if(0==n||r.type.spec.isolating||!((0==i||r.canReplace(i,r.childCount))&&(o==r.childCount||r.canReplace(0,o))))break}return null}function b(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}(e,t),o=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;l&&e<i;e++)l=l.matchType(n.child(e).type);return l&&l.validEnd?s:null}(r,t);return o?i.map(x).concat({type:t,attrs:n}).concat(o.map(x)):null}function x(e){return{type:e,attrs:null}}function k(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let i=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function S(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+o);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function C(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>o;e--,t--){let n=i.node(e),o=i.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(o,n.childCount),l=r&&r[t+1];l&&(s=s.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[t]||n;if(!n.canReplace(o+1,n.childCount)||!a.type.validContent(s))return!1}let l=i.indexAfter(o),a=r&&r[0];return i.node(o).canReplaceWith(l,l,a?a.type:i.node(o+1).type)}function E(e,t){let n=e.resolve(t),r=n.index();return A(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function A(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(!(n=n.matchType(s))||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}(e,t))}function M(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,o,s=r.index(e);if(e==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(e+1),s++,o=r.node(e).maybeChild(s)):(i=r.node(e).maybeChild(s-1),o=r.node(e+1)),i&&!i.isTextblock&&A(i,o)&&r.node(e).canReplace(s,s+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function T(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,o=r.index(t)+ +(n>0),s=r.node(t),l=!1;if(1==e)l=s.canReplace(o,o,i);else{let e=s.contentMatchAt(o).findWrapping(i.firstChild.type);l=e&&s.canReplaceWith(o,o,e[0])}if(l)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function R(e,t,n=t,i=r.Ji.empty){if(t==n&&!i.size)return null;let o=e.resolve(t),s=e.resolve(n);return O(o,s,i)?new m(t,n,i):new N(o,s,i).fit()}function O(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}a.jsonID("replaceAround",g);class N{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.FK.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let o=this.placed,s=n.depth,l=i.depth;for(;s&&l&&1==o.childCount;)o=o.firstChild.content,s--,l--;let a=new r.Ji(o,s,l);return e>-1?new g(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,i=(n?(e=I(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let o=this.depth;o>=0;o--){let{type:s,match:l}=this.frontier[o],a,c=null;if(1==t&&(i?l.matchType(i.type)||(c=l.fillBefore(r.FK.from(i),!1)):e&&s.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:o,parent:e,inject:c};
4if(2==t&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:o,parent:e,wrap:a};if(e&&l.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=I(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.Ji(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=I(e,t);if(i.childCount<=1&&t>0){let o=e.size-t<=t+i.size;this.unplaced=new r.Ji(_(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new r.Ji(_(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let s=this.unplaced,l=n?n.content:s.content,a=s.openStart-e,c=0,h=[],{match:d,type:u}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)h.push(i.child(e));d=d.matchFragment(i)}let p=l.size+e-(s.content.size-s.openEnd);for(;c<l.childCount;){let e=l.child(c),t=d.matchType(e.type);if(!t)break;(++c>1||0==a||e.content.size)&&(d=t,h.push(function e(t,n,i){if(n<=0)return t;let o=t.content;return n>1&&(o=o.replaceChild(0,e(o.firstChild,n-1,1==o.childCount?i-1:0))),n>0&&(o=t.type.contentMatch.fillBefore(o).append(o),i<=0&&(o=o.append(t.type.contentMatch.matchFragment(o).fillBefore(r.FK.empty,!0)))),t.copy(o)}(e.mark(u.allowedMarks(e.marks)),1==c?a:0,c==l.childCount?p:-1)))}let f=c==l.childCount;f||(p=-1),this.placed=L(this.placed,t,r.FK.from(h)),this.frontier[t].match=d,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=l;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.Ji.empty:new r.Ji(_(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new r.Ji(_(s.content,e,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!z(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(e){r:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=z(e,t,r,n,i);if(o){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=z(e,n,r,t,!0);if(!i||i.childCount)continue r}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=L(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=L(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=L(this.placed,this.frontier.length,e))}}function _(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(_(e.firstChild.content,t-1,n)))}function L(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(L(e.lastChild.content,t-1,n)))}function I(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function z(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let l=r.fillBefore(o.content,!0,s);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,o.content,s)?l:null}function D(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class F extends a{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return c.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return c.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!t.isLeaf))}getMap(){return o.empty}invert(e){return new F(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new F(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new F(t.pos,t.attr,t.value)}}a.jsonID("attr",F);class $ extends a{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return c.ok(n)}getMap(){return o.empty}invert(e){return new $(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new $(t.attr,t.value)}}a.jsonID("docAttr",$);
4let P=class extends Error{};(P=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),P.prototype.constructor=P,P.prototype.name="TransformError";class j{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new s}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new P(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.Ji.empty){let i=R(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),s=e.doc.resolve(n);if(O(o,s,i))return e.step(new m(t,n,i));let l=D(o,e.doc.resolve(n));0==l[l.length-1]&&l.pop();let a=-(o.depth+1);l.unshift(a);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(e)>-1?a=e:o.before(e)==t&&l.splice(1,0,-e)}let c=l.indexOf(a),h=[],d=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(h.push(n),t==i.openStart)break;e=n.content}for(let e=d-1;e>=0;e--){var u;let t=h[e],n=(u=t.type).spec.defining||u.spec.definingForContent;if(n&&!t.sameMarkup(o.node(Math.abs(a)-1)))d=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let a=(t+d+1)%(i.openStart+1),u=h[a];if(u)for(let t=0;t<l.length;t++){let h=l[(t+c)%l.length],d=!0;h<0&&(d=!1,h=-h);let p=o.node(h-1),f=o.index(h-1);if(p.canReplaceWith(f,f,u.type,u.marks))return e.replace(o.before(h),d?s.after(h):n,new r.Ji(function e(t,n,i,o,s){if(n<i){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,i,o,r)))}if(n>o){let e=s.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.FK.empty,!0))}return t}(i.content,0,i.openStart,a),a,i.openEnd))}}let p=e.steps.length;for(let r=l.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>p));r--){let e=l[r];e<0||(t=o.before(e),n=s.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){var i=e,o=t;if(!n.isInline&&i==o&&this.doc.resolve(i).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,i,n.type);null!=e&&(i=o=e)}return this.replaceRange(i,o,new r.Ji(r.FK.from(n),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),o=D(r,i);for(let t=0;t<o.length;t++){let n=o[t],s=t==o.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(t-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return e.delete(r.before(o),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:i,$to:o,depth:s}=t,l=i.before(s+1),a=o.after(s+1),c=l,h=a,d=r.FK.empty,u=0;for(let e=s,t=!1;e>n;e--)t||i.index(e)>0?(t=!0,d=r.FK.from(i.node(e).copy(d)),u++):c--;let p=r.FK.empty,f=0;for(let e=s,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,p=r.FK.from(o.node(e).copy(p)),f++):h++;e.step(new g(c,h,l,a,new r.Ji(d.append(p),u,f),d.size-u,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let i=null,{linebreakReplacement:o}=e.doc.type.schema,s=e.doc.resolve(t-n),l=s.node().type;if(o&&l.inlineContent){let e="pre"==l.whitespace,t=!!l.contentMatch.matchType(o);e&&!t?i=!1:!e&&t&&(i=!0)}let a=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);S(e,r.node(),r.before(),a)}l.inlineContent&&w(e,t+n-1,l,s.node().contentMatchAt(s.index()),null==i);let c=e.mapping.slice(a),h=c.map(t-n);if(e.step(new m(h,c.map(t+n,-1),r.Ji.empty,!0)),!0===i){let t=e.doc.resolve(h);k(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let i=r.FK.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[e].type.create(n[e].attrs,i))}let o=t.start,s=t.end;e.step(new g(o,s,o,s,new r.Ji(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){var o=this;if(!n.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let s=o.steps.length;return o.doc.nodesBetween(e,t,(e,t)=>{var l,a,c;let h,d,u="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(n,u)&&(l=o.doc,a=o.mapping.slice(s).map(t),c=n,d=(h=l.resolve(a)).index(),h.parent.canReplaceWith(d,d+1,c))){let i=null;if(n.schema.linebreakReplacement){let e="pre"==n.whitespace,t=!!n.contentMatch.matchType(n.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&S(o,e,t,s),w(o,o.mapping.slice(s).map(t,1),n,void 0,null===i);let l=o.mapping.slice(s),a=l.map(t,1),c=l.map(t+e.nodeSize,1);return o.step(new g(a,c,a+1,c-1,new r.Ji(r.FK.from(n.create(u,null,e.marks)),0,0),1,!0)),!0===i&&k(o,e,t,s),!1}}),this}setNodeMarkup(e,t,n=null,i){return!function(e,t,n,i,o){let s=e.doc.nodeAt(t);if(!s)throw RangeError("No node at given position");n||(n=s.type);let l=n.create(i,null,o||s.marks);if(s.isLeaf)return e.replaceWith(t,t+s.nodeSize,l);if(!n.validContent(s.content))throw RangeError("Invalid content for node type "+n.name);e.step(new g(t,t+s.nodeSize,t+1,t+s.nodeSize-1,new r.Ji(r.FK.from(l),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new F(e,t,n)),this}setDocAttribute(e,t){return this.step(new $(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}
4removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.CU)t.isInSet(n.marks)&&this.step(new f(e,t));else{let r=n.marks,i,o=[];for(;i=t.isInSet(r);)o.push(new f(e,i)),r=i.removeFromSet(r);for(let e=o.length-1;e>=0;e--)this.step(o[e])}return this}split(e,t=1,n){return!function(e,t,n=1,i){let o=e.doc.resolve(t),s=r.FK.empty,l=r.FK.empty;for(let e=o.depth,t=o.depth-n,a=n-1;e>t;e--,a--){s=r.FK.from(o.node(e).copy(s));let t=i&&i[a];l=r.FK.from(t?t.type.create(t.attrs,l):o.node(e).copy(l))}e.step(new m(t,t,new r.Ji(s.append(l),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,o,s,l;return r=this,s=[],l=[],r.doc.nodesBetween(e,t,(r,a,c)=>{if(!r.isInline)return;let h=r.marks;if(!n.isInSet(h)&&c.type.allowsMarkType(n.type)){let c=Math.max(a,e),p=Math.min(a+r.nodeSize,t),f=n.addToSet(h);for(let e=0;e<h.length;e++)h[e].isInSet(f)||(i&&i.to==c&&i.mark.eq(h[e])?i.to=p:s.push(i=new u(c,p,h[e])));o&&o.to==c?o.to=p:l.push(o=new d(c,p,n))}}),s.forEach(e=>r.step(e)),l.forEach(e=>r.step(e)),this}removeMark(e,t,n){var i;let o,s;return i=this,o=[],s=0,i.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(n instanceof r.sX){let e=i.marks,t;for(;t=n.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(l+i.nodeSize,t);for(let t=0;t<a.length;t++){let r=a[t],i;for(let e=0;e<o.length;e++){let t=o[e];t.step==s-1&&r.eq(o[e].style)&&(i=t)}i?(i.to=n,i.step=s):o.push({style:r,from:Math.max(l,e),to:n,step:s})}}}),o.forEach(e=>i.step(new u(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return w(this,e,t,n),this}}},827476:(e,t,n)=>{"use strict";n.d(t,{VR:()=>w,cm:()=>y,gu:()=>S});var r,i,o=n(705922),s=n(959007),l=n(311699),a={exports:{}},c={};a.exports=function(){if(r)return c;r=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=o.useState,n=o.useEffect,i=o.useLayoutEffect,s=o.useDebugValue;function l(t){var n=t.getSnapshot;t=t.value;try{var r=n();return!e(t,r)}catch(e){return!0}}var a="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,r){var o=r(),a=t({inst:{value:o,getSnapshot:r}}),c=a[0].inst,h=a[1];return i(function(){c.value=o,c.getSnapshot=r,l(c)&&h({inst:c})},[e,o,r]),n(function(){return l(c)&&h({inst:c}),e(function(){l(c)&&h({inst:c})})},[e]),s(o),o};return c.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:a,c}();var h=a.exports;let d=({contentComponent:e})=>{let t=h.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return o.createElement(o.Fragment,null,Object.values(t))};class u extends o.Component{constructor(e){var t;super(e),this.editorContentRef=o.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!(null==(t=e.editor)?void 0:t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.options.element){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.options.element.childNodes),e.setOptions({element:t}),e.contentComponent=function(){let e=new Set,t={};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(n,r){t={...t,[n]:s.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let e=this.props.editor;if(!e||(this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null,!e.options.element.firstChild))return;let t=document.createElement("div");t.append(...e.options.element.childNodes),e.setOptions({element:t})}render(){let{editor:e,innerRef:t,...n}=this.props;return o.createElement(o.Fragment,null,o.createElement("div",{ref:((...e)=>t=>
4{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})})(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&o.createElement(d,{contentComponent:e.contentComponent}))}}let p=(0,o.forwardRef)((e,t)=>{let n=o.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return o.createElement(u,{key:n,innerRef:t,...e})});o.memo(p);var f={exports:{}},m={};f.exports=function(){if(i)return m;i=1;var e="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t=h.useSyncExternalStore,n=o.useRef,r=o.useEffect,s=o.useMemo,l=o.useDebugValue;return m.useSyncExternalStoreWithSelector=function(i,o,a,c,h){var d=n(null);if(null===d.current){var u={hasValue:!1,value:null};d.current=u}else u=d.current;var p=t(i,(d=s(function(){function t(t){if(!i){if(i=!0,n=t,t=c(t),void 0!==h&&u.hasValue){var o=u.value;if(h(o,t))return r=o}return r=t}if(o=r,e(n,t))return o;var s=c(t);return void 0!==h&&h(o,s)?o:(n=t,r=s)}var n,r,i=!1,s=void 0===a?null:a;return[function(){return t(o())},null===s?void 0:function(){return t(s())}]},[o,a,c,h]))[0],d[1]);return r(function(){u.hasValue=!0,u.value=p},[p]),l(p),p},m}(),f.exports,"undefined"!=typeof window?o.useLayoutEffect:o.useEffect,"undefined"==typeof window||"undefined"!=typeof window&&window.next,(0,o.createContext)({editor:null}).Consumer;let g=(0,o.createContext)({onDragStart:void 0}),y=()=>(0,o.useContext)(g),w=o.forwardRef((e,t)=>{let{onDragStart:n}=y(),r=e.as||"div";return o.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function v(e){return!!("function"==typeof e&&e.prototype&&e.prototype.isReactComponent)}function b(e){return!!("object"==typeof e&&e.$$typeof&&("Symbol(react.forward_ref)"===e.$$typeof.toString()||"react.forward_ref"===e.$$typeof.description))}class x{constructor(e,{editor:t,props:n={},as:r="div",className:i=""}){this.ref=null,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?(0,s.flushSync)(()=>{this.render()}):this.render()}render(){var e;let t=this.component,n=this.props,r=this.editor,i=function(){try{if(o.version)return parseInt(o.version.split(".")[0],10)>=19}catch{}return!1}(),s=function(e){if(v(e)||b(e))return!0;if("object"==typeof e&&e.$$typeof&&("Symbol(react.memo)"===e.$$typeof.toString()||"react.memo"===e.$$typeof.description)){let t=e.type;if(t)return v(t)||b(t)}return!1}(t),l={...n};l.ref&&!(i||s)&&delete l.ref,!l.ref&&(i||s)&&(l.ref=e=>{this.ref=e}),this.reactElement=o.createElement(t,{...l}),null==(e=null==r?void 0:r.contentComponent)||e.setRenderer(this.id,this)}updateProps(e={}){this.props={...this.props,...e},this.render()}destroy(){var e;let t=this.editor;null==(e=null==t?void 0:t.contentComponent)||e.removeRenderer(this.id)}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}}class k extends l.Yv{mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,o.createRef)()};if(!this.component.displayName){let e;this.component.displayName=(e=this.extension.name).charAt(0).toUpperCase()+e.substring(1)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&e.appendChild(this.contentDOMElement)}},n=this.component,r=(0,o.memo)(e=>o.createElement(g.Provider,{value:t},(0,o.createElement)(n,e)));r.displayName="ReactNodeView",this.node.isLeaf?this.contentDOMElement=null:this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.style.whiteSpace="inherit");let i=this.node.isInline?"span":"div";this.options.as&&(i=this.options.as);let{className:s=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new x(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.n
4ame} ${s}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null==(e=this.renderer.element.firstElementChild)?void 0:e.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}handleSelectionUpdate(){let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if("number"==typeof n)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,t,n){let r=e=>{this.renderer.updateProps(e),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if("function"==typeof this.options.attrs){let t=this.editor.extensionManager.attributes,n=(0,l.zU)(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}}function S(e,t){return n=>n.editor.contentComponent?new k(e,n,t):{}}},846127:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var r=n(311699);let i=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,o=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,s=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,l=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,a=r.CU.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",(0,r.KV)(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}}
4,addInputRules(){return[(0,r.OX)({find:i,type:this.type}),(0,r.OX)({find:s,type:this.type})]},addPasteRules(){return[(0,r.Zc)({find:o,type:this.type}),(0,r.Zc)({find:l,type:this.type})]}})},947487:(e,t,n)=>{"use strict";n.d(t,{E:()=>r});let r=n(311699).bP.create({name:"text",group:"inline"})}}]); 5//# sourceMappingURL=3446-fc190573e14e4b71.js.map
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.