1import{N as x,w as se,m as w,S as $t,T as K,M as oe,a as V,b as Z,P as S,c as H,t as Ct,d as ke,n as ar,e as lr,i as vn,f as Bt,g as cr,h as bn,j as ur,k as dr,l as pr,o as hr,I as fr,r as Ln,E as N,p as Se,q as mr,F as ye,s as gr,u as kr,v as yr,x as vr,y as br,z as en,A as Lr,B as Tr,D as q,C as at,G as Ar,H as Er,J as Cr,K as Tn}from"./index-n2ohG0dQ.js";const An=new WeakSet,En=new WeakSet;function X(e){const t=e;return An.add(t),t}function wt(e){return Array.isArray(e)&&An.has(e)}function Cn(e){return e.flatMap(t=>t==null?[]:Array.isArray(t)&&En.has(t)&&!wt(t)?Cn(t):[t])}function wr(e,t){if(e==="slot")return 0;if(e instanceof Function){const s=e(t);return Array.isArray(s)&&!wt(s)&&!En.has(s)?X(s):s}const{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");if(Array.isArray(n)){if(wt(n))return X([e,r,n]);if(n.length===0)return X([e,r]);const s=Cn(n);return s.length===0?X([e,r]):X([e,r,...s])}return n!=null?X([e,r,n]):X([e,r])}const Re=(e,t)=>wr(e,t),Mr=(e,t)=>{var n;const{state:r}=e,{selection:s}=r;if(!s.empty)return!1;const{$from:o}=s;if(o.parentOffset!==0)return!1;const i=o.depth-1;if(i<0)return!1;const a=o.node(i),l=o.index(i);if(l===0)return!1;if(a.type===t)return e.commands.lift(t.name);const u=a.child(l-1);if(u.type!==t||!(!((n=u.lastChild)===null||n===void 0)&&n.isTextblock))return!1;const d=o.before()-1-1;return e.commands.command(({tr:c,dispatch:p})=>{if(!p)return!0;const f=o.parent.content,k=new $t(f,0,0);return c.replace(d,o.after(),k),c.setSelection(K.create(c.doc,d+f.size)),c.scrollIntoView(),p(c),!0})},Ir=/^\s*>\s$/,xr=x.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return Re("blockquote",{...w(this.options.HTMLAttributes,e),children:Re("slot",{})})},parseMarkdown:(e,t)=>{var n;const r=(n=t.parseBlockChildren)!==null&&n!==void 0?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";const n=">",r=[];return e.content.forEach((s,o)=>{var i,a;const l=((i=(a=t.renderChild)===null||a===void 0?void 0:a.call(t,s,o))!==null&&i!==void 0?i:t.renderChildren([s])).split(` 2`).map(u=>u.trim()===""?n:`${n} ${u}`);r.push(l.join(` 3`))}),r.join(` 4${n} 5`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>Mr(this.editor,this.type)}},addInputRules(){return[se({find:Ir,type:this.type})]}}),Sr=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Rr=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Or=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Nr=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Pr=oe.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Re("strong",{...w(this.options.HTMLAttributes,e),children:Re("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,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[Z({find:Sr,type:this.type}),Z({find:Or,type:this.type})]},addPasteRules(){return[V({find:Rr,type:this.type}),V({find:Nr,type:this.type})]}}),Hr=e=>{const t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},Dr=e=>{const t=/`([^`]+)`(?!`)/g,n=[];let r;for(;(r=t.exec(e))!==null;)r.index>0&&e[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n},$r=oe.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",w(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",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()}}
vendor: 7,351 bytes, lines 5-26
5,addInputRules(){return[Z({find:Hr,type:this.type})]},addPasteRules(){return[V({find:Dr,type:this.type})]}}),mt=4,Br=/^```([a-z]+)?[\s\n]$/,_r=/^~~~([a-z]+)?[\s\n]$/,zr=x.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:mt,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options;if(!n)return null;const r=[...((t=e.firstElementChild)===null||t===void 0?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return r||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",w(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return((n=e.raw)===null||n===void 0?void 0:n.startsWith("```"))===!1&&((r=e.raw)===null||r===void 0?void 0:r.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="";const s=((n=e.attrs)===null||n===void 0?void 0:n.language)||"";return e.content?r=[`\`\`\`${s}`,t.renderChildren(e.content),"```"].join(` 6`):r=`\`\`\`${s} 7 8\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;const n=(t=this.options.tabSize)!==null&&t!==void 0?t:mt,{state:r}=e,{selection:s}=r,{$from:o,empty:i}=s;if(o.parent.type!==this.type)return!1;const a=" ".repeat(n);return i?e.commands.insertContent(a):e.commands.command(({tr:l})=>{const{from:u,to:d}=s,c=r.doc.textBetween(u,d,` 9`,` 10`).split(` 11`).map(p=>a+p).join(` 12`);return l.replaceWith(u,d,r.schema.text(c)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;const n=(t=this.options.tabSize)!==null&&t!==void 0?t:mt,{state:r}=e,{selection:s}=r,{$from:o,empty:i}=s;return o.parent.type!==this.type?!1:i?e.commands.command(({tr:a})=>{var l;const{pos:u}=o,d=o.start(),c=o.end(),p=r.doc.textBetween(d,c,` 13`,` 14`).split(` 15`);let f=0,k=0;const g=u-d;for(let M=0;M<p.length;M+=1){if(k+p[M].length>=g){f=M;break}k+=p[M].length+1}const m=((l=p[f].match(/^ */))===null||l===void 0?void 0:l[0])||"",L=Math.min(m.length,n);if(L===0)return!0;let v=d;for(let M=0;M<f;M+=1)v+=p[M].length+1;return a.delete(v,v+L),u-v<=L&&a.setSelection(K.create(a.doc,v)),!0}):e.commands.command(({tr:a})=>{const{from:l,to:u}=s,d=r.doc.textBetween(l,u,` 16`,` 17`).split(` 18`).map(c=>{var p;const f=((p=c.match(/^ */))===null||p===void 0?void 0:p[0])||"",k=Math.min(f.length,n);return c.slice(k)}).join(` 19`);return a.replaceWith(l,u,r.schema.text(d)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith(` 20 21`);return!o||!i?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type||r.parentOffset!==0)return!1;const o=r.before();return o>0?!1:e.commands.insertDefaultBlock({pos:o})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:s,empty:o}=n;if(!o||s.parent.type!==this.type||s.parentOffset!==s.parent.nodeSize-2)return!1;const i=s.after();return i===void 0?!1:r.nodeAt(i)?e.commands.command(({tr:a})=>(a.setSelection(ke.near(r.resolve(i))),!0)):e.commands.exitCode()}}},addInputRules(){return[Ct({find:Br,type:this.type,getAttributes:e=>({language:e[1]})}),Ct({find:_r,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new S({key:new H("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,o=s?.mode;if(!n||!o)return!1;const{tr:i,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,` 22`));return i.replaceSelectionWith(this.type.create({language:o},l)),i.selection.$from.parent.type!==this.type&&i.setSelection(K.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}}),Ur=x.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 23 24`):""}),jr=x.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",w(this.options.HTMLAttributes,e)]},renderText(){return` 25`},renderMarkdown:()=>` 26`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:s,storedMarks:o}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:a}=r.extensionManager,l=o||s.$to.parentOffset&&s.$from.marks();return t().insertContent({type:this.name}).command(({tr:u,dispatch:d})=>{if(d&&l&&i){const c=l.filter(p=>a.includes(p.type.name));u.ensureMarks(c)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Kr=x.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,w(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;const r=!((n=e.attrs)===null||n===void 0)&&n.level?parseInt(e.attrs.level,10):1,s="#".repeat(r);return e.content?`${s} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>Ct({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}}
26)\\s$`),type:this.type,getAttributes:{level:e}}))}}),Wr=x.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",w(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!lr(t,t.schema.nodes[this.name]))return!1;const{selection:n}=t,{$to:r}=n,s=e();return vn(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:o,tr:i,dispatch:a})=>{if(a){const{$to:l}=i.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?i.setSelection(K.create(i.doc,l.pos+1)):l.nodeAfter.isBlock?i.setSelection(Bt.create(i.doc,l.pos)):i.setSelection(K.create(i.doc,l.pos));else{const d=o.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,c=d?.create();c&&(i.insert(u,c),i.setSelection(K.create(i.doc,u+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ar({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
vendor: 4,494 bytes, line 26
26ype})]}}),Fr=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Gr=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Vr=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,qr=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Xr=oe.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",w(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)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Z({find:Fr,type:this.type}),Z({find:Vr,type:this.type})]},addPasteRules(){return[V({find:Gr,type:this.type}),V({find:qr,type:this.type})]}}),Qr="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
26ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Jr="ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
26ºÐ´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",Mt="numeric",It="ascii",xt="alpha",ce="asciinumeric",le="alphanumeric",St="domain",wn="emoji",Yr="scheme",Zr="slashscheme",gt="whitespace";function es(e,t){return e in t||(t[e]=[]),t[e]}function Q(e,t,n){t[Mt]&&(t[ce]=!0,t[le]=!0),t[It]&&(t[ce]=!0,t[xt]=!0),t[ce]&&(t[le]=!0),t[xt]&&(t[le]=!0),t[le]&&(t[St]=!0),t[wn]&&(t[St]=!0);for(const r in t){const s=es(r,n);s.indexOf(e)<0&&s.push(e)}}function ts(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function I(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}I.groups={};I.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const s=t.jr[r][0],o=t.jr[r][1];if(o&&s.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let s=0;s<e.length;s++)this.tt(e[s],t,n,r)},tr(e,t,n,r){r=r||I.groups;let s;return t&&t.j?s=t:(s=new I(t),n&&r&&Q(t,n,r)),this.jr.push([e,s]),s},ts(e,t,n,r){let s=this;const o=e.length;if(!o)return s;for(let i=0;i<o-1;i++)s=s.tt(e[i]);return s.tt(e[o-1],t,n,r)},tt(e,t,n,r){r=r||I.groups;const s=this;if(t&&t.j)return s.j[e]=t,t;const o=t;let i,a=s.go(e);if(a?(i=new I,Object.assign(i.j,a.j),i.jr.push.apply(i.jr,a.jr),i.jd=a.jd,i.t=a.t):i=new I,o){if(r)if(i.t&&typeof i.t=="string"){const l=Object.assign(ts(i.t,r),n);Q(o,l,r)}else n&&Q(o,n,r);i.t=o}return s.j[e]=i,i}};const y=(e,t,n,r,s)=>e.ta(t,n,r,s),T=(e,t,n,r,s)=>e.tr(t,n,r,s),tn=(e,t,n,r,s)=>e.ts(t,n,r,s),h=(e,t,n,r,s)=>e.tt(t,n,r,s),j="WORD",Rt="UWORD",Mn="ASCIINUMERICAL",In="ALPHANUMERICAL",ve="LOCALHOST",Ot="TLD",Nt="UTLD",Ie="SCHEME",ne="SLASH_SCHEME",_t="NUM",Pt="WS",zt="NL",ue="OPENBRACE",de="CLOSEBRACE",Oe="OPENBRACKET",Ne="CLOSEBRACKET",Pe="OPENPAREN",He="CLOSEPAREN",De="OPENANGLEBRACKET",$e="CLOSEANGLEBRACKET",Be="FULLWIDTHLEFTPAREN",_e="FULLWIDTHRIGHTPAREN",ze="LEFTCORNERBRACKET",Ue="RIGHTCORNERBRACKET",je="LEFTWHITECORNERBRACKET",Ke="RIGHTWHITECORNERBRACKET",We="FULLWIDTHLESSTHAN",Fe="FULLWIDTHGREATERTHAN",Ge="AMPERSAND",Ve="APOSTROPHE",qe="ASTERISK",F="AT",Xe="BACKSLASH",Qe="BACKTICK",Je="CARET",J="COLON",Ut="COMMA",Ye="DOLLAR",D="DOT",Ze="EQUALS",jt="EXCLAMATION",O="HYPHEN",pe="PERCENT",et="PIPE",tt="PLUS",nt="POUND",he="QUERY",Kt="QUOTE",xn="FULLWIDTHMIDDLEDOT",Wt="SEMI",$="SLASH",fe="TILDE",rt="UNDERSCORE",Sn="EMOJI",st="SYM";var Rn=Object.freeze({__proto__:null,ALPHANUMERICAL:In,AMPERSAND:Ge,APOSTROPHE:Ve,ASCIINUMERICAL:Mn,ASTERISK:qe,AT:F,BACKSLASH:Xe,BACKTICK:Qe,CARET:Je,CLOSEANGLEBRACKET:$e,CLOSEBRACE:de,CLOSEBRACKET:Ne,CLOSEPAREN:He,COLON:J,COMMA:Ut,DOLLAR:Ye,DOT:D,EMOJI:Sn,EQUALS:Ze,EXCLAMATION:jt,FULLWIDTHGREATERTHAN:Fe,FULLWIDTHLEFTPAREN:Be,FULLWIDTHLESSTHAN:We,FULLWIDTHMIDDLEDOT:xn,FULLWIDTHRIGHTPAREN:_e,HYPHEN:O,LEFTCORNERBRACKET:ze,LEFTWHITECORNERBRACKET:je,LOCALHOST:ve,NL:zt,NUM:_t,OPENANGLEBRACKET:De,OPENBRACE:ue,OPENBRACKET:Oe,OPENPAREN:Pe,PERCENT:pe,PIPE:et,PLUS:tt,PO
vendor: 9,190 bytes, lines 26-30
26UND:nt,QUERY:he,QUOTE:Kt,RIGHTCORNERBRACKET:Ue,RIGHTWHITECORNERBRACKET:Ke,SCHEME:Ie,SEMI:Wt,SLASH:$,SLASH_SCHEME:ne,SYM:st,TILDE:fe,TLD:Ot,UNDERSCORE:rt,UTLD:Nt,UWORD:Rt,WORD:j,WS:Pt});const _=/[a-z]/,ae=new RegExp("\\p{L}","u"),kt=new RegExp("\\p{Emoji}","u"),z=/\d/,yt=/\s/,nn="\r",vt=` 27`,ns="ï¸",rs="â",bt="";let Te=null,Ae=null;function ss(e=[]){const t={};I.groups=t;const n=new I;Te==null&&(Te=rn(Qr)),Ae==null&&(Ae=rn(Jr)),h(n,"'",Ve),h(n,"{",ue),h(n,"}",de),h(n,"[",Oe),h(n,"]",Ne),h(n,"(",Pe),h(n,")",He),h(n,"<",De),h(n,">",$e),h(n,"ï¼",Be),h(n,"ï¼",_e),h(n,"ã",ze),h(n,"ã",Ue),h(n,"ã",je),h(n,"ã",Ke),h(n,"ï¼",We),h(n,"ï¼",Fe),h(n,"&",Ge),h(n,"*",qe),h(n,"@",F),h(n,"`",Qe),h(n,"^",Je),h(n,":",J),h(n,",",Ut),h(n,"$",Ye),h(n,".",D),h(n,"=",Ze),h(n,"!",jt),h(n,"-",O),h(n,"%",pe),h(n,"|",et),h(n,"+",tt),h(n,"#",nt),h(n,"?",he),h(n,'"',Kt),h(n,"/",$),h(n,";",Wt),h(n,"~",fe),h(n,"_",rt),h(n,"\\",Xe),h(n,"ã»",xn);const r=T(n,z,_t,{[Mt]:!0});T(r,z,r);const s=T(r,_,Mn,{[ce]:!0}),o=T(r,ae,In,{[le]:!0}),i=T(n,_,j,{[It]:!0});T(i,z,s),T(i,_,i),T(s,z,s),T(s,_,s);const a=T(n,ae,Rt,{[xt]:!0});T(a,_),T(a,z,o),T(a,ae,a),T(o,z,o),T(o,_),T(o,ae,o);const l=h(n,vt,zt,{[gt]:!0}),u=h(n,nn,Pt,{[gt]:!0}),d=T(n,yt,Pt,{[gt]:!0});h(n,bt,d),h(u,vt,l),h(u,bt,d),T(u,yt,d),h(d,nn),h(d,vt),T(d,yt,d),h(d,bt,d);const c=T(n,kt,Sn,{[wn]:!0});h(c,"#"),T(c,kt,c),h(c,ns,c);const p=h(c,rs);h(p,"#"),T(p,kt,c);const f=[[_,i],[z,s]],k=[[_,null],[ae,a],[z,o]];for(let g=0;g<Te.length;g++)W(n,Te[g],Ot,j,f);for(let g=0;g<Ae.length;g++)W(n,Ae[g],Nt,Rt,k);Q(Ot,{tld:!0,ascii:!0},t),Q(Nt,{utld:!0,alpha:!0},t),W(n,"file",Ie,j,f),W(n,"mailto",Ie,j,f),W(n,"http",ne,j,f),W(n,"https",ne,j,f),W(n,"ftp",ne,j,f),W(n,"ftps",ne,j,f),Q(Ie,{scheme:!0,ascii:!0},t),Q(ne,{slashscheme:!0,ascii:!0},t),e=e.sort((g,m)=>g[0]>m[0]?1:-1);for(let g=0;g<e.length;g++){const m=e[g][0],v=e[g][1]?{[Yr]:!0}:{[Zr]:!0};m.indexOf("-")>=0?v[St]=!0:_.test(m)?z.test(m)?v[ce]=!0:v[It]=!0:v[Mt]=!0,tn(n,m,m,v)}return tn(n,"localhost",ve,{ascii:!0}),n.jd=new I(st),{start:n,tokens:Object.assign({groups:t},Rn)}}function On(e,t){const n=os(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[];let o=0,i=0;for(;i<r;){let a=e,l=null,u=0,d=null,c=-1,p=-1;for(;i<r&&(l=a.go(n[i]));)a=l,a.accepts()?(c=0,p=0,d=a):c>=0&&(c+=n[i].length,p++),u+=n[i].length,o+=n[i].length,i++;o-=c,i-=p,u-=c,s.push({t:d.t,v:t.slice(o-u,o),s:o-u,e:o})}return s}function os(e){const t=[],n=e.length;let r=0;for(;r<n;){let s=e.charCodeAt(r),o,i=s<55296||s>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(i),r+=i.length}return t}function W(e,t,n,r,s){let o;const i=t.length;for(let a=0;a<i-1;a++){const l=t[a];e.j[l]?o=e.j[l]:(o=new I(r),o.jr=s.slice(),e.j[l]=o),e=o}return o=new I(n),o.jr=s.slice(),e.j[t[i-1]]=o,o}function rn(e){const t=[],n=[];let r=0,s="0123456789";for(;r<e.length;){let o=0;for(;s.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let i=parseInt(e.substring(r,r+o),10);i>0;i--)n.pop();r+=o}else n.push(e[r]),r++}return t}const be={defaultProtocol:"http",events:null,format:sn,formatHref:sn,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ft(e,t=null){let n=Object.assign({},be);e&&(n=Object.assign(n,e instanceof Ft?e.o:e));const r=n.ignoreTags,s=[];for(let o=0;o<r.length;o++)s.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=s}Ft.prototype={o:be,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let s=this.o[e];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:be[e],typeof s=="function"&&r&&(s=s(t,n))):typeof s=="function"&&r&&(s=s(t,n.t,n)),s)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function sn(e){return e}function Nn(e,t){this.t="token",this.v=e,this.tk=t}Nn.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const 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=be.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){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),s=e.get("tagName",n,t),o=this.toFormattedString(e),i={},a=e.get("className",n,t),l=e.get("target",n,t),u=e.get("rel",n,t),d=e.getObj("attributes",n,t),c=e.getObj("events",n,t);return i.href=r,a&&(i.class=a),l&&(i.target=l),u&&(i.rel=u),d&&Object.assign(i,d),{tagName:s,attributes:i,content:o,eventListeners:c}}};function lt(e,t){class n extends Nn{constructor(s,o){super(s,o),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const is=lt("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),on=lt("text"),as=lt("nl"),Ee=lt("url",{isLink:!0,toHref(e=be.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==ve&&e[1].t===J}}),R=e=>new I(e);function ls({groups:e}){const t=e.domain.concat([Ge,qe,F,Xe,Qe,Je,Ye,Ze,O,_t,pe,et,tt,nt,$,st,fe,rt]),n=[Ve,J,Ut,D,jt,pe,he,Kt,Wt,De,$e,ue,de,Ne,Oe,Pe,He,Be,_e,ze,Ue,je,Ke,We,Fe],r=[Ge,Ve,qe,Xe,Qe,Je,Ye,Ze,O,ue,de,pe,et,tt,nt,he,$,st,fe,rt],s=R(),o=h(s,fe);y(o,r,o),y(o,e.domain,o);const i=R(),a=R(),l=R();y(s,e.domain,i),y(s,e.scheme,a),y(s,e.slashscheme,l),y(i,r,o),y(i,e.domain,i);const u=h(i,F);h(o,F,u),h(a,F,u),h(l,F,u);const d=h(o,D);y(d,r,o),y(d,e.domain,o);const c=R();y(u,e.domain,c),y(c,e.domain,c);const p=h(c,D);y(p,e.domain,c);const f=R(is);y(p,e.tld,f),y(p,e.utld,f),h(u,ve,f);const k=h(c,O);h(k,O,k),y(k,e.domain,c),y(f,e.domain,c),h(f,D,p),h(f,O,k);const g=h(i,O),m=h(i,D);h(g,O,g),y(g,e.domain,i),y(m,r,o),y(m,e.domain,i);const L=R(Ee);y(m,e.tld,L),y(m,e.utld,L),y(L,e.domain,i),y(L,r,o),h(L,D,m),h(L,O,g),h(L,F,u);const v=h(L,J),M=R(Ee);y(v,e.numeric,M);const E=R(Ee),ie=R();y(E,t,E),y(E,n,ie),y(ie,t,E),y(ie,n,ie),h(L,$,E),h(M,$,E);const dt=h(a,J),or=h(l,J),ir=h(or,$),pt=h(ir,$);y(a,e.domain,i),h(a,D,m),h(a,O,g),y(l,e.domain,i),h(l,D,m),h(l,O,g),y(dt,e.domain,E),h(dt,$,E),h(dt,he,E),y(pt,e.domain,E),y(pt,t,E),h(pt,$,E);const Yt=[[ue,de],[Oe,Ne],[Pe,He],[De,$e],[Be,_e],[ze,Ue],[je,Ke],[We,Fe]];for(let ht=0;ht<Yt.length;ht++){const[Zt,ft]=Yt[ht],Le=h(E,Zt);h(ie,Zt,Le);const ee=R(Ee);y(Le,t,ee);const te=R();y(Le,n,te),h(Le,ft,E),y(ee,t,ee),y(ee,n,te),y(te,t,ee),y(te,n,te),h(ee,ft,E),h(te,ft,E)}return h(s,ve,L),h(s,zt,as),{start:s,tokens:Rn}}function cs(e,t,n){let r=n.length,s=0,o=[],i=[];for(;s<r;){let a=e,l=null,u=null,d=0,c=null,p=-1;for(;s<r&&!(l=a.go(n[s].t));)i.push(n[s++]);for(;s<r&&(u=l||a.go(n[s].t));)l=null,a=u,a.accepts()?(p=0,c=a):p>=0&&p++,s++,d++;if(p<0)s-=d,s<r&&(i.push(n[s]),s++);else{i.length>0&&(o.push(Lt(on,t,i)),i=[]),s-=p,d-=p;const f=c.t,k=n.slice(s-d,s);o.push(Lt(f,t,k))}}return i.length>0&&o.push(Lt(on,t,i)),o}function Lt(e,t,n){const r=n[0].s,s=n[n.length-1].e,o=t.slice(r,s);return new e(o,n)}const us=typeof console<"u"&&console&&console.warn||(()=>{}),ds="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",b={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ps(){return I.groups={},b.scanner=null,b.parser=null,b.tokenQueue=[],b.pluginQueue=[],b.customSchemes=[],b.initialized=!1,b}function an(e,t=!1){if(b.initialized&&us(`linkifyjs: already initialized - will not register custom scheme "${e}" ${ds}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 281. Must only contain digits, lowercase ASCII letters or "-" 292. Cannot start or end with "-" 303. "-" cannot repeat`);b.customSchemes.push([e,t])}function hs(){b.scanner=ss(b.customSchemes);for(let e=0;e<b.tokenQueue.length;e++)b.tokenQueue[e][1]({scanner:b.scanner});b.parser=ls(b.scanner.tokens);for(let e=0;e<b.pluginQueue.length;e++)b.pluginQueue[e][1]({scanner:b.scanner,parser:b.parser});return b.initialized=!0,b}function Gt(e){return b.initialized||hs(),cs(b.parser.start,e,On(b.scanner.start,e))}Gt.scan=On;function Pn(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new Ft(n),s=Gt(e),o=[];for(let i=0;i<s.length;i++){const a=s[i];a.isLink&&(!t||a.t===t)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}const Vt="[\0-  áá â-\u2029âã]",fs=new RegExp(Vt),ms=new RegExp(`${Vt}$`),gs=new RegExp(Vt,"g");function ks(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}
30function ys(e){return new S({key:new H("autolink"),appendTransaction:(t,n,r)=>{const s=t.some(l=>l.docChanged)&&!n.doc.eq(r.doc),o=t.some(l=>l.getMeta("preventAutolink"));if(!s||o)return;const{tr:i}=r,a=cr(n.doc,[...t]);if(bn(a).forEach(({newRange:l})=>{const u=ur(r.doc,l,p=>p.isTextblock);let d,c;if(u.length>1)d=u[0],c=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(u.length){const p=r.doc.textBetween(l.from,l.to," "," ");if(!ms.test(p))return;d=u[0],c=r.doc.textBetween(d.pos,l.to,void 0," ")}if(d&&c){const p=c.split(fs).filter(Boolean);if(p.length<=0)return!1;const f=p[p.length-1],k=d.pos+c.lastIndexOf(f);if(!f)return!1;const g=Gt(f).map(m=>m.toObject(e.defaultProtocol));if(!ks(g))return!1;g.filter(m=>m.isLink).map(m=>({...m,from:k+m.start+1,to:k+m.end+1})).filter(m=>r.schema.marks.code?!r.doc.rangeHasMark(m.from,m.to,r.schema.marks.code):!0).filter(m=>e.validate(m.value)).filter(m=>e.shouldAutoLink(m.value)).forEach(m=>{dr(m.from,m.to,r.doc).some(L=>L.mark.type===e.type)||i.addMark(m.from,m.to,e.type.create({href:m.href}))})}}),!!i.steps.length)return i}})}function vs(e){return new S({key:new H("handleClickLink"),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{const l=r.target;if(!l)return!1;const u=e.editor.view.dom;s=l.closest("a"),s&&!u.contains(s)&&(s=null)}if(!s)return!1;let o=!1;if(e.enableClickSelection&&(o=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){var i,a;const l=pr(t.state,e.type.name),u=(i=s.href)!==null&&i!==void 0?i:l.href,d=(a=s.target)!==null&&a!==void 0?a:l.target;u&&(window.open(u,d),o=!0)}return o}}})}const bs=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|â(.*?)â|â(.*?)â))?\)$/,Ls=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|â(.*?)â|â(.*?)â))?\)/g;function Hn(e,t){let n=0;for(let r=t-1;r>=0&&e[r]==="\\";r-=1)n+=1;return n%2===1}function Ts(e,t){let n=0,r=0;for(;r<t;){if(e[r]!=="`"){r+=1;continue}if(n===0&&Hn(e,r)){r+=1;continue}let s=0;for(;r<t&&e[r]==="`";)s+=1,r+=1;n===0?n=s:s===n&&(n=0)}return n>0}function Dn(e,t,n){var r,s;const[,o,i]=t;return(t.index?e[t.index-1]:void 0)==="!"||Hn(e,(r=t.index)!==null&&r!==void 0?r:0)||Ts(e,(s=t.index)!==null&&s!==void 0?s:0)?!1:!!o.trim()&&n(i)}function $n(e){var t,n;const[r,s,o,,i,a,l]=e,u=(t=i??a)!==null&&t!==void 0?t:l;return{index:(n=e.index)!==null&&n!==void 0?n:0,text:r,replaceWith:s,data:{href:o,title:u||null,markdown:!0}}}function As(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function Bn(e){var t,n,r;return{href:(t=e.data)===null||t===void 0?void 0:t.href,title:(n=(r=e.data)===null||r===void 0?void 0:r.title)!==null&&n!==void 0?n:null}}function Es(e){const t=Z({find:n=>{const r=bs.exec(n);return!r||!Dn(n,r,e.isAllowedHref)?null:$n(r)},type:e.type,getAttributes:Bn});return new fr({find:t.find,handler:n=>{const r=t.handler(n);return r!==null&&n.state.tr.steps.length&&n.state.tr.setMeta("preventAutolink",!0),r}})}function Cs(e){const t=V({find:n=>{var r,s;const o=[];for(const a of n.matchAll(Ls))Dn(n,a,e.isAllowedHref)&&o.push($n(a));const i=((r=(s=e.findPlainUrls)===null||s===void 0?void 0:s.call(e,n))!==null&&r!==void 0?r:[]).filter(a=>!o.some(l=>As(l,a)));return[...o,...i]},type:e.type,getAttributes:Bn});return new hr({find:t.find,handler:n=>{var r;const s=t.handler(n);return s!==null&&n.state.tr.steps.length&&(!((r=n.match.data)===null||r===void 0)&&r.markdown)&&n.state.tr.setMeta("preventAutolink",!0),s}})}function ws(e){return new S({key:new H("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{shouldAutoLink:s}=e,{state:o}=t,{selection:i}=o,{empty:a}=i;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const u=Pn(l,{defaultProtocol:e.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!u||s!==void 0&&!s(u.value)?!1:e.editor.commands.setMark(e.type,{href:u.href})}}})}function U(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!e||e.replace(gs,"").match(new RegExp(`^(?:(?:${n.map(r=>r.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,"i"))}const Ms=oe.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `val
30idate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){an(e);return}an(e.scheme,e.optionalSlashes)})},onDestroy(){ps()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!U(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{const t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;const r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){var e,t,n;return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:(e=this.options.HTMLAttributes.target)!==null&&e!==void 0?e:null},rel:{default:(t=this.options.HTMLAttributes.rel)!==null&&t!==void 0?t:null},class:{default:(n=this.options.HTMLAttributes.class)!==null&&n!==void 0?n:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!U(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!U(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",w(this.options.HTMLAttributes,e),0]:["a",w(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,s,o;const i=(n=(r=e.attrs)===null||r===void 0?void 0:r.href)!==null&&n!==void 0?n:"",a=(s=(o=e.attrs)===null||o===void 0?void 0:o.title)!==null&&s!==void 0?s:"",l=t.renderChildren(e);return a?`[${l}](${i} "${a}")`:`[${l}](${i})`},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!U(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!U(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addInputRules(){return this.options.markdownLinks?[Es({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:t=>!!U(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){const e=t=>{const n=[];if(t){const{protocols:r,defaultProtocol:s}=this.options;Pn(t).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:i=>!!U(i,r),protocols:r,defaultProtocol:s})).forEach(o=>{this.options.shouldAutoLink(o.value)&&n.push({text:o.value,data:{href:o.href},index:o.start})})}return n};return this.options.markdownLinks?[Cs({type:this.type,isAllowedHref:t=>this.options.isAllowedUri(t,{defaultValidate:n=>!!U(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[V({find:e,type:this.type,getAttributes:t=>{var n;return{href:(n=t.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(ys({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!U(s,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(vs({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(ws({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.t
vendor: 1,043 bytes, lines 30-31
30ype,shouldAutoLink:this.options.shouldAutoLink})),e}}),Is="listItem",ln="textStyle",cn=/^\s*([-+*])\s$/,_n=x.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",w(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 31`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Is,this.editor.getAttributes(ln)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}}
31,addInputRules(){let e=se({find:cn,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=se({find:cn,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(ln),editor:this.editor})),[e]}}),xs=(e,t,n)=>{const{selection:r}=e;if(!r.empty)return null;const{$from:s}=r;if(!s.parent.isTextblock||s.parentOffset!==s.parent.content.size)return null;let o=-1;for(let f=s.depth;f>0;f-=1)if(s.node(f).type.name===t){o=f;break}if(o<0)return null;const i=s.node(o),a=s.index(o);if(a+1>=i.childCount)return null;const l=i.child(a+1);if(!n.includes(l.type.name))return null;const u=e.schema.nodes[t];let d=!1;if(l.forEach(f=>{f.type===u&&f.childCount>1&&(d=!0)}),!d)return null;const c=e.doc.resolve(s.after()).nodeAfter;if(!c||!n.includes(c.type.name))return null;const p=[];return c.forEach(f=>{p.push(f)}),p.length===0?null:{listItemDepth:o,nestedList:c,nestedListPos:s.after(),insertPos:s.after(o),items:p}},Ss=(e,t,n,r)=>{const s=xs(e,n,r);if(!s)return!1;const{selection:o}=e,{nestedList:i,nestedListPos:a,insertPos:l,items:u}=s,d=e.tr;d.delete(a,a+i.nodeSize);const c=d.mapping.map(l);return d.insert(c,ye.from(u)),d.setSelection(o.map(d.doc,d.mapping)),t&&t(d),!0},Rs=(e,t,n)=>Ss(e.state,e.view.dispatch,t,n),zn=(e,t)=>N.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){const n=()=>Rs(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),Un=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],Ce="abcdefghijklmnopqrstuvwxyz",jn=String.raw`\d+|[ivxlcdmIVXLCDM]+|${"[a-zA-Z]{1,2}"}`;function ct(e){let t=e,n="";for(const[r,s]of Un)for(;t>=r;)n+=s,t-=r;return n}function qt(e){return ct(e).toUpperCase()}function Kn(e){const t=e.toLowerCase();let n=0,r=0;for(;n<t.length;){let s=!1;for(const[o,i]of Un)if(t.startsWith(i,n)){r+=o,n+=i.length,s=!0;break}if(!s)return 0}return r}function Os(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;const t=Kn(e);return t<=0?!1:(e===e.toLowerCase()?ct(t):qt(t))===e}function Ns(e){const t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){const n=t.charCodeAt(0)-97,r=t.charCodeAt(1)-97;return(n+1)*26+r+1}return 0}function ot(e){if(e<=26)return Ce[e-1];const t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?Ce[n]:Ce[t]+Ce[n]}function ut(e){if(!(!e||/^\d+$/.test(e))){if(Os(e))return e===e.toLowerCase()?"i":"I";if(/^[a-z]{1,2}$/.test(e))return"a";if(/^[A-Z]{1,2}$/.test(e))return"A"}}function Xt(e){if(/^\d+$/.test(e))return parseInt(e,10);const t=ut(e);if(t==="i"||t==="I")return Kn(e);if(t==="a"||t==="A"){const r=Ns(e);return r>0?r:1}const n=parseInt(e,10);return Number.isNaN(n)?1:n}function Ps(e,t){if(e==="numeric")return String(t);switch(e){case"a":return ot(t);case"A":return ot(t).toUpperCase();case"i":return ct(t);case"I":return qt(t);default:return String(t)}}function Hs(e){var t;if(e.length===0)return!1;const n=(t=ut(e[0]))!==null&&t!==void 0?t:"numeric",r=Xt(e[0]);if(r<1)return!1;for(let s=0;s<e.length;s++){const o=Ps(n,r+s);if(e[s]!==o)return!1}return!0}function Ds(e){return{type:ut(e),start:Xt(e)}}function $s(e){const{type:t,start:n}=Ds(e),r={};return t&&(r.type=t),n!==1&&(r.start=n),r}function Bs(e,t,n=". "){const r=t+1;if(!e||e==="1")return`${r}${n}`;switch(e){case"a":return`${ot(r)}${n}`;case"A":return`${ot(r).toUpperCase()}${n}`;case"i":return`${ct(r)}${n}`;case"I":return`${qt(r)}${n}`;default:return`${r}${n}`}}function _s(e){var t,n;const r=(t=e.tokens)===null||t===void 0?void 0:t[0];return!!(e.text&&((n=e.tokens)===null||n===void 0?void 0:n.length)===1&&r?.type==="list"&&r.ordered&&r.raw===e.text)}function zs(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:"text",raw:e,text:e}])}const Wn=x.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",w(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if(e.type!=="list_item")return[];const r=(n=t.parseBlockChildren)!==null&&n!==void 0?n:t.parseChildren;let s=[];if(e.tokens&&e.tokens.length>0){if(_s(e))return{type:"listItem",content:[{type:"paragraph",content:zs(e.text||"",t)}]};if(e.tokens.some(o=>o.type==="paragraph"))s=r(e.tokens);else{const o=e.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(s=[{type:"paragraph",content:t.parseInline(o.tokens)}],e.tokens.length>1){const i=r(e.tokens.slice(1));s.push(...i)}}else s=r(e.tokens)}}return s.length===0&&(s=[{type:"paragraph",content:[]}]),{type:"listItem",content:s}},renderMarkdown:(e,t,n)=>Ln(e,t,r=>{if(r.parentType==="bulletList")return"- ";if(r.parentType==="orderedList"){var s,o;const i=((s=r.meta)===null||s===void 0||(s=s.parentAttrs)===null||s===void 0?void 0:s.start)||1;return Bs((o=r.meta)===null||o===void 0||(o=o.parentAttrs)===null||o===void 0?void 0:o.type,i-1+(r.index||0),". ")}return"- "},n,{alignNestedToPrefix:n?.parentType==="orderedList"}),addExtensions(){return[zn(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Qt=(e,t)=>
31{const{$from:n}=t.selection,r=vr(e,t.schema);let s=null,o=n.depth,i=n.pos,a=null;for(;o>0&&a===null;)s=n.node(o),s.type===r?a=o:(o-=1,i-=1);return a===null?null:{$pos:t.doc.resolve(i),depth:a}},Fn=(e,t)=>{const n=Qt(e,t);if(!n)return!1;const[,r]=yr(t,e,n.$pos.pos+4);return r},Us=(e,t,n)=>{const{$anchor:r}=e.selection,s=Math.max(0,r.pos-2),o=e.doc.resolve(s).node();return!(!o||!n.includes(o.type.name))},un=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Se(e.state,t)&&Us(e.state,t,n)){const{$anchor:o}=e.state.selection,i=e.state.doc.resolve(o.before()-1),a=[];i.node().descendants((d,c)=>{d.type.name===t&&a.push({node:d,pos:c})});const l=a.at(-1);if(!l)return!1;const u=e.state.doc.resolve(i.start()+l.pos+1);return e.chain().cut({from:o.start()-1,to:o.end()+1},u.end()).joinForward().run()}if(!Se(e.state,t)||!gr(e.state))return!1;const{$from:r}=e.state.selection,s=r.depth-1;return r.node(s).type!==e.schema.nodes[t]||r.index(s)!==0?!1:e.chain().liftListItem(t).run()},js=(e,t)=>{const n=Fn(e,t),r=Qt(e,t);return!r||!n?!1:n>r.depth},Ks=(e,t)=>{const n=Fn(e,t),r=Qt(e,t);return!r||!n?!1:n<r.depth},dn=(e,t)=>{if(!Se(e.state,t)||!kr(e.state,t))return!1;const{selection:n}=e.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:js(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():Ks(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},Ws=(e,t,n)=>{const{state:r}=e,{selection:s}=r;if(!s.empty)return!1;const{$from:o}=s;if(o.parentOffset!==0||!o.parent.isTextblock||Se(r,t))return!1;const i=mr(o);if(!i||!n.includes(i.type.name))return!1;const a=i.lastChild;if(!a||a.type.name!==t)return!1;const l=o.parent;if(!a.canReplace(a.childCount,a.childCount,ye.from(l)))return!1;const u=o.before(),d=o.after(),c=u-2;return e.commands.command(({tr:p,dispatch:f})=>(f&&(p.delete(u,d).insert(c,ye.from(l)),p.setSelection(K.create(p.doc,c+1)),p.scrollIntoView()),!0))},Gn=N.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&dn(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&dn(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&un(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&un(e,n,r)&&(t=!0)}),t},Tab:({editor:e})=>{for(const{itemName:t,wrapperNames:n}of this.options.listTypes)if(e.state.schema.nodes[t]!==void 0&&Ws(e,t,n))return!0;return!1}}}}),Ht=new RegExp(`^(\\s*)(${jn})([.)])\\s+(.*)$`),Fs=/^\s/,re={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function Gs(e){return Ht.test(e.trimStart())}function Vs(e){const t=e.trimStart();return re.bulletItem.test(t)||Gs(t)||re.heading.test(t)||re.thematicBreak.test(t)&&!t.startsWith("-")||/^>\s?/.test(t)||re.codeFence.test(t)||re.blockMath.test(t)}function qs(e){return Object.values(re).some(t=>t.test(e))}function Xs(e){const t=[],n=[];let r=!1;return e.forEach(s=>{if(r){n.push(s);return}if(s.trim()===""){r=!0,n.push(s);return}if(t.length>0&&Vs(s)){r=!0,n.push(s);return}t.push(s)}),{paragraphLines:t,blockLines:n}}function Qs(e){const t=[];let n=0,r=0;for(;n<e.length;){const s=e[n],o=s.match(Ht);if(!o)break;const[,i,a,l,u]=o,d=i.length,c=parseInt(a,10),p=isNaN(c)?ut(a):void 0,f=isNaN(c)?Xt(a):c,k=[u];let g=n+1;const m=[s];let L=!1;for(;g<e.length;){const v=e[g];if(v.match(Ht))break;if(v.trim()==="")m.push(v),k.push(""),L=!0,g+=1;else if(v.match(Fs)){const M=v.length-v.trimStart().length,E=d+a.length+1;m.push(v),k.push(v.slice(Math.min(M,E))),g+=1}else{if(L||qs(v))break;m.push(v),k.push(v),g+=1}}t.push({indent:d,number:f,type:p,content:k.join(` 32`).trim(),contentLines:k,raw:m.join(` 33`)}),r=g,n=g}return[t,r]}const Js=new RegExp(`^(${jn})([.)])\\s+(.+)$`);function Ys(e){const t=e.split(` 34`).filter(r=>r.trim().length>0);if(t.length===0)return null;const n=[];for(const r of t){const s=r.trim().match(Js);if(!s)return null;n.push({marker:s[1],content:s[3]})}return Hs(n.map(r=>r.marker))?{type:"orderedList",attrs:$s(n[0].marker),content:n.map(r=>({type:"listItem",content:[{type:"paragraph",content:[{type:"text",text:r.content}]}]}))}:null}function Vn(e,t,n){const r=[];let s=0;for(;s<e.length;){const o=e[s];if(o.indent===t){const{paragraphLines:i,blockLines:a}=Xs(o.contentLines),l=i.join(` 35`).trim(),u=[];l&&u.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const d=a.join(` 36`).trim();if(d){const f=n.blockTokens(d);u.push(...f)}let c=s+1;const p=[];for(;c<e.length&&e[c].indent>t;)p.push(e[c]),c+=1;
36if(p.length>0){const f=Vn(p,Math.min(...p.map(k=>k.indent)),n);u.push({type:"list",ordered:!0,start:p[0].number,typeMarker:p[0].type,items:f,raw:p.map(k=>k.raw).join(` 37`)})}r.push({type:"list_item",raw:o.raw,tokens:u}),s=c}else s+=1}return r}function Zs(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...t.parseChildren([s]));else if(s.type==="text"&&s.tokens){const o=t.parseChildren([s]);r.push({type:"paragraph",content:o})}else{const o=t.parseChildren([s]);o.length>0&&r.push(...o)}}),{type:"listItem",content:r}})}const eo="listItem",pn="textStyle",hn=/^(\d+)\.\s$/;function fn(e){const t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case"upper-roman":return"I";case"lower-roman":return"i";case"upper-alpha":case"upper-latin":return"A";case"lower-alpha":case"lower-latin":return"a";default:return null}}const qn=x.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>{const t=e.getAttribute("type");if(t)return t;const n=e.getAttribute("style");if(n){const s=fn(n);if(s)return s}const r=e.querySelector("li");if(r){const s=r.getAttribute("style");if(s){const o=fn(s);if(o)return o}}return null}}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,type:n,...r}=e,s=w(this.options.HTMLAttributes,r);return t!==1&&(s.start=t),n&&n!=="1"&&(s.type=n),["ol",s,0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];const n=e.start||1,r=e.typeMarker,s=e.items?Zs(e.items,t):[],o={};return n!==1&&(o.start=n),r&&(o.type=r),Object.keys(o).length>0?{type:"orderedList",attrs:o,content:s}:{type:"orderedList",content:s}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 38`):"",markdownTokenizer:{name:"orderedList",level:"block",start:()=>-1,tokenize:(e,t,n)=>{var r,s;const o=e.split(` 39`),[i,a]=Qs(o);if(i.length===0)return;const l=Vn(i,i[0].indent,n);if(l.length!==0)return{type:"list",ordered:!0,start:((r=i[0])===null||r===void 0?void 0:r.number)||1,typeMarker:(s=i[0])===null||s===void 0?void 0:s.type,items:l,raw:o.slice(0,a).join(` 40`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(eo,this.editor.getAttributes(pn)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new S({props:{handlePaste:(e,t)=>
40{var n,r;const s=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/html");if(s?.trim())return!1;const o=(r=t.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!o)return!1;const i=Ys(o);if(!i)return!1;try{const a=e.state.schema.nodeFromJSON(i),l=e.state.tr.replaceSelectionWith(a);return e.dispatch(l),!0}catch{return!1}}}})]},addInputRules(){const e=(n,r)=>(!r.attrs.type||r.attrs.type==="1")&&r.childCount+r.attrs.start===+n[1];let t=se({find:hn,type:this.type,getAttributes:n=>({start:+n[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=se({find:hn,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:n=>({start:+n[1],...this.editor.getAttributes(pn)}),joinPredicate:e,editor:this.editor})),[t]}}),to=/^\s*(\[([( |x])?\])\s$/,no="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",ro=(e,t,n)=>{var r;return(n==null||(r=n.checkboxLabel)===null||r===void 0?void 0:r.call(n,e,t))||`Task item checkbox for ${e.textContent||"empty task item"}`},so=x.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:e=>{var t;return(t=e.querySelector("div"))!==null&&t!==void 0?t:e}}]},renderHTML({node:e,HTMLAttributes:t}){return["li",w(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{const n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){const r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;const r=`- [${!((n=e.attrs)===null||n===void 0)&&n.checked?"x":" "}] `;return Ln(e,t,r)},addExtensions(){return this.options.nested?[zn(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const s=document.createElement("li"),o=document.createElement("label"),i=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div");i.style.cssText=no;const u=c=>{const p=ro(c,c.attrs.checked,this.options.a11y);a.setAttribute("aria-label",p),i.textContent=p};u(e),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",c=>c.preventDefault()),a.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:f})=>{const k=n();if(typeof k!="number")return!1;const g=f.doc.nodeAt(k);return f.setNodeMarkup(k,void 0,{...g?.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,p])=>{s.setAttribute(c,p)}),s.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,o.append(a,i),s.append(o,l),Object.entries(t).forEach(([c,p])=>{s.setAttribute(c,p)});let d=new Set(Object.keys(t));return{dom:s,contentDOM:l,update:c=>{if(c.type!==this.type)return!1;s.dataset.checked=c.attrs.checked,a.checked=c.attrs.checked,u(c);const p=r.extensionManager.attributes,f=br(c,p),k=new Set(Object.keys(f)),g=this.options.HTMLAttributes;return d.forEach(m=>{k.has(m)||(m in g?s.setAttribute(m,g[m]):s.removeAttribute(m))}),Object.entries(f).forEach(([m,L])=>{L==null?m in g?s.setAttribute(m,g[m]):s.removeAttribute(m):s.setAttribute(m,L)}),d=k,!0}}}}
40,addInputRules(){return[se({find:to,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),oo=x.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",w(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 41`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;const n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))===null||t===void 0?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){const r=o=>{const i=en(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);if(i){const a={type:"taskList",raw:i.raw,items:i.items},l=o.slice(i.raw.length);return l.trim()?[a,...n.blockTokens(l)]:[a]}return n.blockTokens(o)},s=en(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,i)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:i}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});N.create({name:"listKit",addExtensions(){const e=[];return this.options.bulletList!==!1&&e.push(_n.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(Wn.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(Gn.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(qn.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(so.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(oo.configure(this.options.taskList)),e}});const we=" ",Tt="Â ",io=x.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",w(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{const n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);const r=t.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===we||n[0].text===we||n[0].raw===Tt||n[0].text===Tt)&&r.length===1&&r[0].type==="text"&&(r[0].text===we||r[0].text===Tt)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return"";const r=Array.isArray(e.content)?e.content:[];if(r.length===0){var s,o;const i=Array.isArray(n==null||(s=n.previousNode)===null||s===void 0?void 0:s.content)?n.previousNode.content:[];return(n==null||(o=n.previousNode)===null||o===void 0?void 0:o.type)==="paragraph"&&i.length===0?we:""}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),ao=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,lo=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,co=oe.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",w(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}}
41,addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Z({find:ao,type:this.type})]},addPasteRules(){return[V({find:lo,type:this.type})]}}),uo=x.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),po=oe.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",w(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){const r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;const s=r[2].trim();return{type:"underline",raw:r[0],text:s,tokens:n.inlineTokens(s)}}},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()}}});function ho(e={}){return new S({view(t){return new fo(t,e)}})}class fo{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let o=i=>{this[s](i)};return t.dom.addEventListener(s,o),{name:s,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){if(this.cursorPos!=null&&n.doc!=t.state.doc)if(this.lastDragEvent){let r=this.computeTarget(this.lastDragEvent);r==this.cursorPos?this.updateOverlay():this.setCursor(r)}else this.updateOverlay()}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r,s=this.editorView.dom,o=s.getBoundingClientRect(),i=o.width/s.offsetWidth,a=o.height/s.offsetHeight;if(n){let c=t.nodeBefore,p=t.nodeAfter;if(c||p){let f=this.editorView.nodeDOM(this.cursorPos-(c?c.nodeSize:0));if(f){let k=f.getBoundingClientRect(),g=c?k.bottom:k.top;c&&p&&(g=(g+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let m=this.width/2*a;r={left:k.left,right:k.right,top:g-m,bottom:g+m}}}}if(!r){let c=this.editorView.coordsAtPos(this.cursorPos),p=this.width/2*i;r={left:c.left-p,right:c.left+p,top:c.top,bottom:c.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,d=-pageYOffset;else{let c=l.getBoundingClientRect(),p=c.width/l.offsetWidth,f=c.height/l.offsetHeight;u=c.left-l.scrollLeft*p,d=c.top-l.scrollTop*f}this.element.style.left=(r.left-u)/i+"px",this.element.style.top=(r.top-d)/a+"px",this.element.style.width=(r.right-r.left)/i+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}computeTarget(t){let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,o=typeof s=="function"?s(this.editorView,n,t):s;if(!n||o)return null;let i=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Lr(this.editorView.state.doc,i,this.editorView.dragging.slice);a!=null&&(i=a)}return i}dragover(t){if(!this.editorView.editable)return;this.lastDragEvent=t;let n=this.computeTarget(t);n!=null&&(this.setCursor(n),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){this.editorView.dom.contains(t.relatedTarget)||this.setCursor(null)}}class A extends ke{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return A.valid(r)?new A(r):ke.near(r)}content(){return $t.empty}eq(t){return t instanceof A&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new A(t.resolve(n.pos))}getBookmark(){return new Jt(this.anchor)}static valid(t){let n=t.parent;if(n.inlineContent||!mo(t)||!go(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(t.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&A.valid(t))return t;let s=t.pos,o=null;for(let i=t.depth;;i--){let a=t.node(i);if(n>0?t.indexAfter(i)<a.childCount:t.index(i)>0){o=a.child(n>0?t.indexAfter(i):t.index(i)-1);break}else if(i==0)return null;s+=n;let l=t.doc.resolve(s);if(A.valid(l))return l}for(;;){let i=n>0?o.firstChild:o.lastChild;
41if(!i){if(o.isAtom&&!o.isText&&!Bt.isSelectable(o)){t=t.doc.resolve(s+o.nodeSize*n),r=!1;continue e}break}o=i,s+=n;let a=t.doc.resolve(s);if(A.valid(a))return a}return null}}}A.prototype.visible=!1;A.findFrom=A.findGapCursorFrom;ke.jsonID("gapcursor",A);class Jt{constructor(t){this.pos=t}map(t){return new Jt(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return A.valid(n)?new A(n):ke.near(n)}}function Xn(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function mo(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||Xn(s.type))return!0;if(s.inlineContent)return!1}}return!0}function go(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 s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||Xn(s.type))return!0;if(s.inlineContent)return!1}}return!0}function ko(){return new S({props:{decorations:Lo,createSelectionBetween(e,t,n){return t.pos==n.pos&&A.valid(n)?new A(n):null}
vendor: 9,204 bytes, line 41
41,handleClick:vo,handleKeyDown:yo,handleDOMEvents:{beforeinput:bo}}})}const yo=Tr({ArrowLeft:Me("horiz",-1),ArrowRight:Me("horiz",1),ArrowUp:Me("vert",-1),ArrowDown:Me("vert",1)});function Me(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,s,o){let i=r.selection,a=t>0?i.$to:i.$from,l=i.empty;if(i instanceof K){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let u=A.findGapCursorFrom(a,t,l);return u?(s&&s(r.tr.setSelection(new A(u))),!0):!1}}function vo(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!A.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&Bt.isSelectable(e.state.doc.nodeAt(s.inside))?!1:(e.dispatch(e.state.tr.setSelection(new A(r))),!0)}function bo(e,t){if(t.inputType!="insertCompositionText"||!(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 s=ye.empty;for(let i=r.length-1;i>=0;i--)s=ye.from(r[i].createAndFill(null,s));let o=e.state.tr.replace(n.pos,n.pos,new $t(s,0,0));return o.setSelection(K.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function Lo(e){if(!(e.selection instanceof A))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",q.create(e.doc,[at.widget(e.selection.head,t,{key:"gapcursor"})])}var it=200,C=function(){};C.prototype.append=function(t){return t.length?(t=C.from(t),!this.length&&t||t.length<it&&this.leafAppend(t)||this.length<it&&t.leafPrepend(this)||this.appendInner(t)):this};C.prototype.prepend=function(t){return t.length?C.from(t).append(this):this};C.prototype.appendInner=function(t){return new To(this,t)};C.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?C.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};C.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};C.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};C.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(o,i){return s.push(t(o,i))},n,r),s};C.from=function(t){return t instanceof C?t:t&&t.length?new Qn(t):C.empty};var Qn=(function(e){function t(r){e.call(this),this.values=r}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(s,o){return s==0&&o==this.length?this:new t(this.values.slice(s,o))},t.prototype.getInner=function(s){return this.values[s]},t.prototype.forEachInner=function(s,o,i,a){for(var l=o;l<i;l++)if(s(this.values[l],a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(s,o,i,a){for(var l=o-1;l>=i;l--)if(s(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(s){if(this.length+s.length<=it)return new t(this.values.concat(s.flatten()))},t.prototype.leafPrepend=function(s){if(this.length+s.length<=it)return new t(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t})(C);C.empty=new Qn([]);var To=(function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.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(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,s,o,i){var a=this.left.length;if(s<a&&this.left.forEachInner(r,s,Math.min(o,a),i)===!1||o>a&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,o)-a,i+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,s,o,i){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(o,a)-a,i+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(s,a),o,i)===!1)return!1},t.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var o=this.left.length;return s<=o?this.left.slice(r,s):r>=o?this.right.slice(r-o,s-o):this.left.slice(r,o).append(this.right.slice(0,s-o))},t.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new t(this.left,s)},t.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new t(s,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t})(C);const Ao=500;class P{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,o;n&&(s=this.remapping(r,this.items.length),o=s.maps.length);let i=t.tr,a,l,u=[],d=[];return this.items.forEach((c,p)=>{if(!c.step){s||(s=this.remapping(r,p+1),o=s.maps.length),o--,d.push(c);return}if(s){d.push(new B(c.map));let f=c.step.map(s.slice(o)),k;f&&i.maybeStep(f).doc&&(k=i.mapping.maps[i.mapping.maps.length-1],u.push(new B(k,void 0,void 0,u.length+d.length))),o--,k&&s.appendMap(k,o)}else i.maybeStep(c.step);if(c.selection)return a=s?c.selection.map(s.slice(o)):c.selection,l=new P(this.items.slice(0,r).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:i,selection:a}}addTransform(t,n,r,s){let o=[],i=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let d=0;d<t.steps.length;d++){let c=t.steps[d].invert(t.docs[d]),p=new B(t.mapping.maps[d],c,n),f;(f=l&&l.merge(p))&&(p=f,d?o.pop():a=a.slice(0,a.length-1)),o.push(p),n&&(i++,n=void 0),s||(l=p)}let u=i-r.depth;return u>Co&&(a=Eo(a,u),i-=u),new P(a.append(o),i)}remapping(t,n){let r=new Ar;return this.items.forEach((s,o)=>{let i=s.mirrorOffset!=null&&o-s.mirrorOffset>=t?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,i)},t,n),r}addMaps(t){return this.eventCount==0?this:new P(this.items.append(t.map(n=>new B(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),o=t.mapping,i=t.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},s);let l=n;this.items.forEach(p=>{let f=o.getMirror(--l);if(f==null)return;i=Math.min(i,f);let k=o.maps[f];if(p.step){let g=t.steps[f].invert(t.docs[f]),m=p.selection&&p.selection.map(o.slice(l+1,f));m&&a++,r.push(new B(k,g,m))}else r.push(new B(k))},s);let u=[];for(let p=n;p<i;p++)u.push(new B(o.maps[p]));let d=this.items.slice(0,s).append(u).append(r),c=new P(d,a);return c.emptyItemCount()>Ao&&(c=c.compress(this.items.length-r.length)),c}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,s=[],o=0;return this.items.forEach((i,a)=>{if(a>=t)s.push(i),i.selection&&o++;else if(i.step){let l=i.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let d=i.selection&&i.selection.map(n.slice(r));d&&o++;let c=new B(u.invert(),l,d),p,f=s.length-1;(p=s.length&&s[f].merge(c))?s[f]=p:s.push(c)}}else i.map&&r--},this.items.length,0),new P(C.from(s.reverse()),o)}}P.empty=new P(C.empty,0);function Eo(e,t){let n;return e.forEach((r,s)=>{if(r.selection&&t--==0)return n=s,!1}),e.slice(n)}class B{constructor(t,n,r,s){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=s}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new B(n.getMap().invert(),n,this.selection)}}}class G{constructor(t,n,r,s,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=o}}const Co=20;function wo(e,t,n,r){let s=n.getMeta(Y),o;if(s)return s.historyState;n.getMeta(xo)&&(e=new G(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(i&&i.getMeta(Y))return i.getMeta(Y).redo?new G(e.done.addTransform(n,void 0,r,xe(t)),e.undone,mn(n.mapping.maps),e.prevTime,e.prevComposition):new G(e.done,e.undone.addTransform(n,void 0,r,xe(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!i&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Mo(n,e.prevRanges)),u=i?At(e.prevRanges,n.mapping):mn(n.mapping.maps);return new G(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,xe(t)),P.empty,u,n.time,a??e.prevComposition)}else return(o=n.getMeta("rebased"))?new G(e.done.rebased(n,o),e.undone.rebased(n,o),At(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new G(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),At(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Mo(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,s)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&s>=t[o]&&(n=!0)}),n}function mn(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;
41n--)e[n].forEach((r,s,o,i)=>t.push(o,i));return t}function At(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let s=t.map(e[r],1),o=t.map(e[r+1],-1);s<=o&&n.push(s,o)}return n}function Io(e,t,n){let r=xe(t),s=Y.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let i=o.selection.resolve(o.transform.doc),a=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),s,r),l=new G(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(i).setMeta(Y,{redo:n,historyState:l})}let Et=!1,gn=null;function xe(e){let t=e.plugins;if(gn!=t){Et=!1,gn=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){Et=!0;break}}return Et}const Y=new H("history"),xo=new H("closeHistory");function So(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new S({key:Y,state:{init(){return new G(P.empty,P.empty,null,0,-1)},apply(t,n,r){return wo(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,s=r=="historyUndo"?Yn:r=="historyRedo"?Zn:null;return!s||!t.editable?!1:(n.preventDefault(),s(t.state,t.dispatch))}}}})}function Jn(e,t){return(n,r)=>{let s=Y.getState(n);if(!s||(e?s.undone:s.done).eventCount==0)return!1;if(r){let o=Io(s,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const Yn=Jn(!1,!0),Zn=Jn(!0,!0);N.create({name:"characterCount",addOptions(){return{limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)==="textSize"){const n=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(n)}return t.nodeSize},this.storage.words=e=>{const t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new S({key:new H("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const s=this.options.limit,o=this.options.autoTrim;if(s==null||s===0||o===!1){e=!0;return}const i=this.storage.characters({node:r.doc});if(i>s){const a=i-s,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const d=r.tr.deleteRange(l,u);return e=!0,d}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=r||s>r&&o>r&&o<=s)return!0;if(s>r&&o>r&&o>s||!t.getMeta("paste"))return!1;const i=t.selection.$head.pos,a=i-(o-r),l=i;return t.deleteRange(a,l),!(this.storage.characters({node:t.doc})>r)}})]}});const Ro=N.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[ho(this.options)]}});N.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new S({key:new H("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=t,o=[];if(!n||!r)return q.create(e,[]);let i=0;this.options.mode==="deepest"&&e.descendants((l,u)=>{if(!l.isText){if(!(s>=u&&s<=u+l.nodeSize-1))return!1;i+=1}});let a=0;return e.descendants((l,u)=>{if(l.isText||!(s>=u&&s<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&i-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(at.node(u,u+l.nodeSize,{class:this.options.className}))}),q.create(e,o)}}})]}});const Oo=N.create({name:"gapCursor",addProseMirrorPlugins(){return[ko()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Er(Cr(e,"allowGapCursor",n)))!==null&&t!==void 0?t:null}}}),er="placeholder",kn=new H("tiptap__placeholder");function tr(e){const{editor:t,placeholder:n,dataAttribute:r,pos:s,node:o,isEmptyDoc:i,hasAnchor:a,classes:{emptyNode:l,emptyEditor:u}}=e,d=[l];return i&&d.push(u),at.node(s,s+o.nodeSize,{class:d.join(" "),[r]:typeof n=="function"?n({editor:t,node:o,pos:s,hasAnchor:a}):n})}function nr(e,t){return typeof e=="function"?e(t):e}function rr({editor:e,options:t,dataAttribute:n,doc:r,selection:s,from:o,to:i}){const{anchor:a}=s,l=[],u=e.isEmpty;return r.nodesBetween(o,i,(d,c)=>{const p=a>
41=c&&a<=c+d.nodeSize,f=!d.isLeaf&&Tn(d);return d.type.isTextblock&&(p||!t.showOnlyCurrent)&&f&&l.push(tr({editor:e,isEmptyDoc:u,dataAttribute:n,hasAnchor:p,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:nr(t.emptyNodeClass,{editor:e,node:d,pos:c,hasAnchor:p})},node:d,pos:c})),t.includeChildren}),l}function sr({editor:e,options:t,dataAttribute:n,doc:r,selection:s}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;const{anchor:o}=s,i=[],a=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){const l=r.resolve(o),u=l.depth>0?l.node(1):l.nodeAfter,d=l.depth>0?l.before(1):o;if(u&&u.type.isTextblock&&Tn(u)){const c=o>=d&&o<=d+u.nodeSize;i.push(tr({editor:e,isEmptyDoc:a,dataAttribute:n,hasAnchor:c,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:nr(t.emptyNodeClass,{editor:e,node:u,pos:d,hasAnchor:c})},node:u,pos:d}))}}else i.push(...rr({editor:e,options:t,dataAttribute:n,doc:r,selection:s,from:0,to:r.content.size}));return q.create(r,i)}function me(e,t){const n=e.resolve(t);if(n.depth===0){var r;const o=(r=n.nodeAfter)!==null&&r!==void 0?r:n.nodeBefore;if(!o)return{from:t,to:t};const i=n.nodeAfter?t:t-o.nodeSize;return{from:i,to:i+o.nodeSize}}const s=n.before(1);return{from:s,to:s+n.node(1).nodeSize}}function ge(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}function No(e,t,n){const r=[];return e.forEach((s,o)=>{const i=o,a=i+s.nodeSize,l=i+1,u=a+1;l<n&&u>t&&r.push({from:i,to:a})}),r}function Po(e){if(e.length===0)return[];const t=[...e].sort((r,s)=>r.from-s.from),n=[{...t[0]}];for(let r=1;r<t.length;r+=1){const s=n[n.length-1],o=t[r];o.from<=s.to?s.to=Math.max(s.to,o.to):n.push({...o})}return n}function Ho(e,t){const n=No(e,t.from,t.to);return n.push(ge(e,me(e,t.from))),t.to>t.from?n.push(ge(e,me(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&n.push(ge(e,me(e,Math.min(t.from+1,e.content.size)))),n}function Do(e,t,n){const r=[];if(e.docChanged){const s=bn(e);for(const o of s)r.push(...Ho(n.doc,o.newRange))}return e.selectionSet&&(r.push(ge(n.doc,me(n.doc,e.mapping.map(t.selection.anchor)))),r.push(ge(n.doc,me(n.doc,n.selection.anchor)))),Po(r)}function $o(e,t,n){const r=Math.max(0,Math.min(e,n.content.size));return{from:r,to:Math.max(r,Math.min(t,n.content.size))}}function Bo({decorations:e,ranges:t,editor:n,options:r,dataAttribute:s,doc:o,selection:i}){let a=e;for(const l of t){const{from:u,to:d}=$o(l.from,l.to,o),c=a.find(u,d).filter(f=>f.from>=u&&f.to<=d);c.length&&(a=a.remove(c));const p=rr({editor:n,options:r,dataAttribute:s,doc:o,selection:i,from:u,to:d});p.length&&(a=a.add(o,p))}return a}function _o({editor:e,options:t,dataAttribute:n}){return{init(r,s){const o=sr({editor:e,options:t,dataAttribute:n,doc:s.doc,selection:s.selection});return o??q.empty},apply(r,s,o,i){return!r.docChanged&&!r.selectionSet?s:Bo({decorations:s.map(r.mapping,r.doc),ranges:Do(r,o,i),editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection})}}}function zo(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}function Uo({editor:e,options:t}){const n=t.dataAttribute?`data-${zo(t.dataAttribute)}`:`data-${er}`,r=t.showOnlyCurrent&&!t.includeChildren;return new S({key:kn,...r?{}:{state:_o({editor:e,options:t,dataAttribute:n})},props:{decorations:r?({doc:s,selection:o})=>sr({editor:e,options:t,dataAttribute:n,doc:s,selection:o}):s=>{var o;return t.showOnlyWhenEditable&&!e.isEditable?q.empty:(o=kn.getState(s))!==null&&o!==void 0?o:q.empty}}})}N.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:er,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[Uo({editor:this.editor,options:this.options})]}});function Dt(e,t){return!e.selection.empty&&!vn(e.selection)&&t.isEditable}function jo(e,t){return Dt(e,t)&&!t.isFocused&&!t.view.dragging}function Ko(){var e;(e=window.getSelection())===null||e===void 0||e.removeAllRanges()}function Wo(e){e.focus()}N.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;
41return[new S({key:new H("selection"),props:{decorations(n){return jo(n,e)?q.create(n.doc,[at.inline(n.selection.from,n.selection.to,{class:t.className})]):null},handleDOMEvents:{blur(n){return Dt(n.state,e)&&Ko(),!1},focus(n){return Dt(n.state,e)&&requestAnimationFrame(()=>{!e.isDestroyed&&n.hasFocus()&&Wo(n)}),!1}}}})]}});function yn({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}const Fo=N.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;const t=new H(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)===null||e===void 0?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new S({key:t,appendTransaction:(s,o,i)=>{const{doc:a,tr:l,schema:u}=i,d=t.getState(i),c=a.content.size,p=u.nodes[n];if(!s.some(f=>f.getMeta("skipTrailingNode"))&&d)return l.insert(c,p.create())},state:{init:(s,o)=>{const i=o.tr.doc.lastChild;return!yn({node:i,types:r})},apply:(s,o)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return o;const i=s.doc.lastChild;return!yn({node:i,types:r})}}})]}}),Go=N.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Yn(e,t),redo:()=>({state:e,dispatch:t})=>Zn(e,t)}},addProseMirrorPlugins(){return[So(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()}}}),Vo=N.create({name:"starterKit",addExtensions(){const e=[];if(this.options.bold!==!1&&e.push(Pr.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(xr.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(_n.configure(this.options.bulletList)),this.options.code!==!1&&e.push($r.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(zr.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(Ur.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(Ro.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(Oo.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(jr.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(Kr.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(Go.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(Wr.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(Xr.configure(this.options.italic)),this.options.listItem!==!1&&e.push(Wn.configure(this.options.listItem)),this.options.listKeymap!==!1){var t;e.push(Gn.configure((t=this.options)===null||t===void 0?void 0:t.listKeymap))}if(this.options.link!==!1){var n;e.push(Ms.configure((n=this.options)===null||n===void 0?void 0:n.link))}if(this.options.orderedList!==!1&&e.push(qn.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(io.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(co.configure(this.options.strike)),this.options.text!==!1&&e.push(uo.configure(this.options.text)),this.options.underline!==!1){var r;e.push(po.configure((r=this.options)===null||r===void 0?void 0:r.underline))}if(this.options.trailingNode!==!1){var s;e.push(Fo.configure((s=this.options)===null||s===void 0?void 0:s.trailingNode))}return e}});var Xo=Vo;export{Vo as StarterKit,Xo as default};
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.