it-tools/dist/client/assets/chunks/chunk-28360120.js

144 lines
482 KiB
JavaScript
Raw Normal View History

2024-04-28 00:48:29 +08:00
import{d as ge,j as ae,D as Ce,E as Pe,a7 as Jt,e as Im,aw as Lm,r as Pm,w as Rm,a1 as zm,h as Vs,T as qm,aD as Hm,n as $m,q as $e,a0 as Vm,G as fc,k as fi,l as Co,m as hn,K as jm,F as vo,U as Wm,B as Um,L as mc,V as Jm,ah as Km,aE as Gm,_ as Ym,g as Xm,aA as Zm,S as Qm}from"./chunk-449c23a2.js";import{_ as eg,b as tg}from"./chunk-a740628f.js";import{I as ng,as as rg,at as ig,au as sg,_ as og}from"../entries/src_pages_Home.page.16dc467b.js";import{_ as gc}from"./chunk-b6d0d6dd.js";import{T as ag}from"./chunk-f1ca2155.js";import"./chunk-cf010ec4.js";import"./chunk-ee54c1e8.js";import"./chunk-fd51fbd2.js";import"./chunk-767079b6.js";import"./chunk-55ba3dae.js";import"./chunk-baa77311.js";import"./chunk-78769b89.js";const lg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},ug=Pe("path",{d:"M9 11l-4 4l4 4m-4-4h11a4 4 0 0 0 0-8h-1",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),cg=[ug],dg=ge({name:"ArrowBack",render:function(e,t){return ae(),Ce("svg",lg,cg)}}),hg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},pg=Pe("path",{d:"M15 13l4-4l-4-4m4 4H8a4 4 0 0 0 0 8h1",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),fg=[pg],mg=ge({name:"ArrowForwardUp",render:function(e,t){return ae(),Ce("svg",hg,fg)}}),gg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Dg=Jt('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 15h15"></path><path d="M21 19H6"></path><path d="M15 11h6"></path><path d="M21 7h-6"></path><path d="M9 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"></path><path d="M3 9h1a1 1 0 1 1-1 1V7.5a2 2 0 0 1 2-2"></path></g>',1),yg=[Dg],bg=ge({name:"Blockquote",render:function(e,t){return ae(),Ce("svg",gg,yg)}}),Cg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},vg=Pe("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[Pe("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7H7z"}),Pe("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7H7v-7"})],-1),kg=[vg],Sg=ge({name:"Bold",render:function(e,t){return ae(),Ce("svg",Cg,kg)}}),wg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Eg=Jt('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 15l4 4m0-4l-4 4"></path><path d="M7 6V5h11v1"></path><path d="M7 19h4"></path><path d="M13 5L9 19"></path></g>',1),xg=[Eg],Ag=ge({name:"ClearFormatting",render:function(e,t){return ae(),Ce("svg",wg,xg)}}),Fg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Tg=Jt('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 12h6"></path><path d="M12 9v6"></path><path d="M6 19a2 2 0 0 1-2-2v-4l-1-1l1-1V7a2 2 0 0 1 2-2"></path><path d="M18 19a2 2 0 0 0 2-2v-4l1-1l-1-1V7a2 2 0 0 0-2-2"></path></g>',1),Mg=[Tg],_g=ge({name:"CodePlus",render:function(e,t){return ae(),Ce("svg",Fg,Mg)}}),Bg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ng=Jt('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 18v-8l-2 2"></path><path d="M4 6v12"></path><path d="M12 6v12"></path><path d="M11 18h2"></path><path d="M3 18h2"></path><path d="M4 12h8"></path><path d="M3 6h2"></path><path d="M11 6h2"></path></g>',1),Og=[Ng],Ig=ge({name:"H1",render:function(e,t){return ae(),Ce("svg",Bg,Og)}}),Lg={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Pg=Jt('<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 12a2 2 0 1 1 4 0c0 .591-.417 1.318-.816 1.858L17 18.001h4"></path><p
`,F(A.gutter,St.replace(/\d/g," "))," ",Nm,F(A.marker,"^").repeat(Om)].join(""),Bm&&E.message&&($s+=" "+F(A.message,E.message))}return[F(A.marker,">"),F(A.gutter,St),ne.length>0?` ${ne}`:"",$s].join("")}else return` ${F(A.gutter,St)}${ne.length>0?` ${ne}`:""}`}).join(`
`);return E.message&&!Y&&(Z=`${" ".repeat(Q+1)}${E.message}
${Z}`),B?T.reset(Z):Z}function k(w,S,E,B={}){if(!f){f=!0;let T="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";{let A=new Error(T);A.name="DeprecationWarning",console.warn(new Error(T))}}return E=Math.max(E,0),C(w,{start:{column:E,line:S}},B)}}),qa={};h(qa,{__debug:()=>_m,check:()=>Tm,doc:()=>_l,format:()=>Nl,formatWithCursor:()=>Bl,getSupportInfo:()=>Mm,util:()=>Ml,version:()=>Fm});var up=(u,c,f,p)=>{if(!(u&&c==null))return c.replaceAll?c.replaceAll(f,p):f.global?c.replace(f,p):c.split(f).join(p)},Hr=up,cp=y(_(),1),Zt="string",Mt="array",Qt="cursor",gt="indent",Dt="align",yt="trim",Te="group",ze="fill",Le="if-break",bt="indent-if-break",Ct="line-suffix",vt="line-suffix-boundary",De="line",ot="label",qe="break-parent",Ha=new Set([Qt,gt,Dt,yt,Te,ze,Le,bt,Ct,vt,De,ot,qe]);function dp(u){if(typeof u=="string")return Zt;if(Array.isArray(u))return Mt;if(!u)return;let{type:c}=u;if(Ha.has(c))return c}var en=dp,hp=u=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(u);function pp(u){let c=u===null?"null":typeof u;if(c!=="string"&&c!=="object")return`Unexpected doc '${c}',
Expected it to be 'string' or 'object'.`;if(en(u))throw new Error("doc is valid.");let f=Object.prototype.toString.call(u);if(f!=="[object Object]")return`Unexpected doc '${f}'.`;let p=hp([...Ha].map(g=>`'${g}'`));return`Unexpected doc.type '${u.type}'.
Expected it to be ${p}.`}var fp=class extends Error{name="InvalidDocError";constructor(u){super(pp(u)),this.doc=u}},An=fp,$a={};function mp(u,c,f,p){let g=[u];for(;g.length>0;){let m=g.pop();if(m===$a){f(g.pop());continue}f&&g.push(m,$a);let C=en(m);if(!C)throw new An(m);if(c?.(m)!==!1)switch(C){case Mt:case ze:{let k=C===Mt?m:m.parts;for(let w=k.length,S=w-1;S>=0;--S)g.push(k[S]);break}case Le:g.push(m.flatContents,m.breakContents);break;case Te:if(p&&m.expandedStates)for(let k=m.expandedStates.length,w=k-1;w>=0;--w)g.push(m.expandedStates[w]);else g.push(m.contents);break;case Dt:case gt:case bt:case ot:case Ct:g.push(m.contents);break;case Zt:case Qt:case yt:case vt:case De:case qe:break;default:throw new An(m)}}}var Ds=mp,gp=()=>{},Dp=gp;function $r(u){return{type:gt,contents:u}}function Fn(u,c){return{type:Dt,contents:c,n:u}}function Va(u,c={}){return Dp(c.expandedStates),{type:Te,id:c.id,contents:u,break:!!c.shouldBreak,expandedStates:c.expandedStates}}function yp(u){return Fn(Number.NEGATIVE_INFINITY,u)}function bp(u){return Fn({type:"root"},u)}function Cp(u){return Fn(-1,u)}function vp(u,c){return Va(u[0],{...c,expandedStates:u})}function ja(u){return{type:ze,parts:u}}function kp(u,c="",f={}){return{type:Le,breakContents:u,flatContents:c,groupId:f.groupId}}function Sp(u,c){return{type:bt,contents:u,groupId:c.groupId,negate:c.negate}}function ys(u){return{type:Ct,contents:u}}var wp={type:vt},Vr={type:qe},Ep={type:yt},bs={type:De,hard:!0},Wa={type:De,hard:!0,literal:!0},Ua={type:De},xp={type:De,soft:!0},tn=[bs,Vr],Ja=[Wa,Vr],Cs={type:Qt};function Ka(u,c){let f=[];for(let p=0;p<c.length;p++)p!==0&&f.push(u),f.push(c[p]);return f}function Ga(u,c,f){let p=u;if(c>0){for(let g=0;g<Math.floor(c/f);++g)p=$r(p);p=Fn(c%f,p),p=Fn(Number.NEGATIVE_INFINITY,p)}return p}function Ap(u,c){return u?{type:ot,label:u,contents:c}:c}var Fp=(u,c,f)=>{if(!(u&&c==null))return Array.isArray(c)||typeof c=="string"?c[f<0?c.length+f:f]:c.at(f)},he=Fp;function Tp(u){let c=u.indexOf("\r");return c>=0?u.charAt(c+1)===`
`?"crlf":"cr":"lf"}function vs(u){switch(u){case"cr":return"\r";case"crlf":return`\r
`;default:return`
`}}function Ya(u,c){let f;switch(c){case`
`:f=/\n/g;break;case"\r":f=/\r/g;break;case`\r
`:f=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(c)}.`)}let p=u.match(f);return p?p.length:0}function Mp(u){return Hr(!1,u,/\r\n?/g,`
`)}var _p=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\
`)):f)}function jp(u){if(u.type===De)return!0}function Wp(u){return Ss(u,jp,!1)}function el(u,c){return u.type===ot?{...u,contents:c(u.contents)}:c(u)}var Me=Symbol("MODE_BREAK"),at=Symbol("MODE_FLAT"),tr=Symbol("cursor");function tl(){return{value:"",length:0,queue:[]}}function Up(u,c){return ws(u,{type:"indent"},c)}function Jp(u,c,f){return c===Number.NEGATIVE_INFINITY?u.root||tl():c<0?ws(u,{type:"dedent"},f):c?c.type==="root"?{...u,root:u}:ws(u,{type:typeof c=="string"?"stringAlign":"numberAlign",n:c},f):u}function ws(u,c,f){let p=c.type==="dedent"?u.queue.slice(0,-1):[...u.queue,c],g="",m=0,C=0,k=0;for(let F of p)switch(F.type){case"indent":E(),f.useTabs?w(1):S(f.tabWidth);break;case"stringAlign":E(),g+=F.n,m+=F.n.length;break;case"numberAlign":C+=1,k+=F.n;break;default:throw new Error(`Unexpected type '${F.type}'`)}return T(),{...u,value:g,length:m,queue:p};function w(F){g+=" ".repeat(F),m+=f.tabWidth*F}function S(F){g+=" ".repeat(F),m+=F}function E(){f.useTabs?B():T()}function B(){C>0&&w(C),A()}function T(){k>0&&S(k),A()}function A(){C=0,k=0}}function Es(u){let c=0,f=0,p=u.length;e:for(;p--;){let g=u[p];if(g===tr){f++;continue}for(let m=g.length-1;m>=0;m--){let C=g[m];if(C===" "||C===" ")c++;else{u[p]=g.slice(0,m+1);break e}}}if(c>0||f>0)for(u.length=p+1;f-- >0;)u.push(tr);return c}function Wr(u,c,f,p,g,m){if(f===Number.POSITIVE_INFINITY)return!0;let C=c.length,k=[u],w=[];for(;f>=0;){if(k.length===0){if(C===0)return!0;k.push(c[--C]);continue}let{mode:S,doc:E}=k.pop();switch(en(E)){case Zt:w.push(E),f-=ks(E);break;case Mt:case ze:{let B=Ip(E);for(let T=B.length-1;T>=0;T--)k.push({mode:S,doc:B[T]});break}case gt:case Dt:case bt:case ot:k.push({mode:S,doc:E.contents});break;case yt:f+=Es(w);break;case Te:{if(m&&E.break)return!1;let B=E.break?Me:S,T=E.expandedStates&&B===Me?he(!1,E.expandedStates,-1):E.contents;k.push({mode:B,doc:T});break}case Le:{let B=(E.groupId?g[E.groupId]||at:S)===Me?E.breakContents:E.flatContents;B&&k.push({mode:S,doc:B});break}case De:if(S===Me||E.hard)return!0;E.soft||(w.push(" "),f--);break;case Ct:p=!0;break;case vt:if(p)return!1;break}}return!1}function Ur(u,c){let f={},p=c.printWidth,g=vs(c.endOfLine),m=0,C=[{ind:tl(),mode:Me,doc:u}],k=[],w=!1,S=[],E=0;for(Rp(u);C.length>0;){let{ind:T,mode:A,doc:F}=C.pop();switch(en(F)){case Zt:{let O=g!==`
`?Hr(!1,F,`
`,g):F;k.push(O),C.length>0&&(m+=ks(O));break}case Mt:for(let O=F.length-1;O>=0;O--)C.push({ind:T,mode:A,doc:F[O]});break;case Qt:if(E>=2)throw new Error("There are too many 'cursor' in doc.");k.push(tr),E++;break;case gt:C.push({ind:Up(T,c),mode:A,doc:F.contents});break;case Dt:C.push({ind:Jp(T,F.n,c),mode:A,doc:F.contents});break;case yt:m-=Es(k);break;case Te:switch(A){case at:if(!w){C.push({ind:T,mode:F.break?Me:at,doc:F.contents});break}case Me:{w=!1;let O={ind:T,mode:at,doc:F.contents},L=p-m,z=S.length>0;if(!F.break&&Wr(O,C,L,z,f))C.push(O);else if(F.expandedStates){let V=he(!1,F.expandedStates,-1);if(F.break){C.push({ind:T,mode:Me,doc:V});break}else for(let Y=1;Y<F.expandedStates.length+1;Y++)if(Y>=F.expandedStates.length){C.push({ind:T,mode:Me,doc:V});break}else{let Q=F.expandedStates[Y],Z={ind:T,mode:at,doc:Q};if(Wr(Z,C,L,z,f)){C.push(Z);break}}}else C.push({ind:T,mode:Me,doc:F.contents});break}}F.id&&(f[F.id]=he(!1,C,-1).mode);break;case ze:{let O=p-m,{parts:L}=F;if(L.length===0)break;let[z,V]=L,Y={ind:T,mode:at,doc:z},Q={ind:T,mode:Me,doc:z},Z=Wr(Y,[],O,S.length>0,f,!0);if(L.length===1){Z?C.push(Y):C.push(Q);break}let ne={ind:T,mode:at,doc:V},ie={ind:T,mode:Me,doc:V};if(L.length===2){Z?C.push(ne,Y):C.push(ie,Q);break}L.splice(0,2);let le={ind:T,mode:A,doc:ja(L)},St=L[0];Wr({ind:T,mode:at,doc:[z,V,St]},[],O,S.length>0,f,!0)?C.push(le,ne,Y):Z?C.push(le,ie,Y):C.push(le,ie,Q);break}case Le:case bt:{let O=F.groupId?f[F.groupId]:A;if(O===Me){let L=F.type===Le?F.breakContents:F.negate?F.contents:$r(F.contents);L&&C.push({ind:T,mode:A,doc:L})}if(O===at){let L=F.type===Le?F.flatContents:F.negate?$r(F.contents):F.contents;L&&C.push({ind:T,mode:A,doc:L})}break}case Ct:S.push({ind:T,mode:A,doc:F.contents});break;case vt:S.length>0&&C.push({ind:T,mode:A,doc:bs});break;case De:switch(A){case at:if(F.hard)w=!0;else{F.soft||(k.push(" "),m+=1);break}case Me:if(S.length>0){C.push({ind:T,mode:A,doc:F},...S.reverse()),S.length=0;break}F.literal?T.root?(k.push(g,T.root.value),m=T.root.length):(k.push(g),m=0):(m-=Es(k),k.push(g+T.value),m=T.length);break}break;case ot:C.push({ind:T,mode:A,doc:F.contents});break;case qe:break;default:throw new An(F)}C.length===0&&S.length>0&&(C.push(...S.reverse()),S.length=0)}let B=k.indexOf(tr);if(B!==-1){let T=k.indexOf(tr,B+1),A=k.slice(0,B).join(""),F=k.slice(B+1,T).join(""),O=k.slice(T+1).join("");return{formatted:A+F+O,cursorNodeStart:A.length,cursorNodeText:F}}return{formatted:k.join("")}}function kt(u){var c;if(!u)return"";if(Array.isArray(u)){let f=[];for(let p of u)if(Array.isArray(p))f.push(...kt(p));else{let g=kt(p);g!==""&&f.push(g)}return f}return u.type===Le?{...u,breakContents:kt(u.breakContents),flatContents:kt(u.flatContents)}:u.type===Te?{...u,contents:kt(u.contents),expandedStates:(c=u.expandedStates)==null?void 0:c.map(kt)}:u.type===ze?{type:"fill",parts:u.parts.map(kt)}:u.contents?{...u,contents:kt(u.contents)}:u}function Kp(u){let c=Object.create(null),f=new Set;return p(kt(u));function p(m,C,k){var w,S;if(typeof m=="string")return JSON.stringify(m);if(Array.isArray(m)){let E=m.map(p).filter(Boolean);return E.length===1?E[0]:`[${E.join(", ")}]`}if(m.type===De){let E=((w=k?.[C+1])==null?void 0:w.type)===qe;return m.literal?E?"literalline":"literallineWithoutBreakParent":m.hard?E?"hardline":"hardlineWithoutBreakParent":m.soft?"softline":"line"}if(m.type===qe)return((S=k?.[C-1])==null?void 0:S.type)===De&&k[C-1].hard?void 0:"breakParent";if(m.type===yt)return"trim";if(m.type===gt)return"indent("+p(m.contents)+")";if(m.type===Dt)return m.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+p(m.contents)+")":m.n<0?"dedent("+p(m.contents)+")":m.n.type==="root"?"markAsRoot("+p(m.contents)+")":"align("+JSON.stringify(m.n)+", "+p(m.contents)+")";if(m.type===Le)return"ifBreak("+p(m.breakContents)+(m.flatContents?", "+p(m.flatContents):"")+(m.groupId?(m.flatContents?"":', ""')+`, { groupId: ${g(m.groupId)} }`:"")+")";if(m.type===bt){let E=[];m.negate&&E.push("negate: true"),m.groupId&&E.push(`groupId: ${g(m.groupId)}`);let B=E.length>0?`, { ${E.join(", ")} }`:"";return`indentIfBreak(${p(m.cont
This option cannot be used with --range-start and --range-end.`,cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:u=>typeof u=="string"||typeof u=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:u=>typeof u=="string"||typeof u=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.
This option cannot be used with --cursor-offset.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.
This option cannot be used with --cursor-offset.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment
in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function il({plugins:u=[],showDeprecated:c=!1}={}){let f=u.flatMap(g=>g.languages??[]),p=[];for(let g of Zp(Object.assign({},...u.map(({options:m})=>m),Yp)))!c&&g.deprecated||(Array.isArray(g.choices)&&(c||(g.choices=g.choices.filter(m=>!m.deprecated)),g.name==="parser"&&(g.choices=[...g.choices,...Xp(g.choices,f,u)])),g.pluginDefaults=Object.fromEntries(u.filter(m=>{var C;return((C=m.defaultOptions)==null?void 0:C[g.name])!==void 0}).map(m=>[m.name,m.defaultOptions[g.name]])),p.push(g));return{languages:f,options:p}}function*Xp(u,c,f){let p=new Set(u.map(g=>g.value));for(let g of c)if(g.parsers){for(let m of g.parsers)if(!p.has(m)){p.add(m);let C=f.find(w=>w.parsers&&Object.prototype.hasOwnProperty.call(w.parsers,m)),k=g.name;C!=null&&C.name&&(k+=` (plugin: ${C.name})`),yield{value:m,description:k}}}}function Zp(u){let c=[];for(let[f,p]of Object.entries(u)){let g={name:f,...p};Array.isArray(g.default)&&(g.default=he(!1,g.default,-1).value),c.push(g)}return c}var Qp=u=>u.split(/[/\\]/).pop();function sl(u,c){if(!c)return;let f=Qp(c).toLowerCase();return u.find(p=>{var g,m;return((g=p.extensions)==null?void 0:g.some(C=>f.endsWith(C)))||((m=p.filenames)==null?void 0:m.some(C=>C.toLowerCase()===f))})}function ef(u,c){if(c)return u.find(({name:f})=>f.toLowerCase()===c)??u.find(({aliases:f})=>f?.includes(c))??u.find(({extensions:f})=>f?.includes(`.${c}`))}function tf(u,c){let f=u.plugins.flatMap(g=>g.languages??[]),p=ef(f,c.language)??sl(f,c.physicalFile)??sl(f,c.file)??(c.physicalFile,void 0);return p?.parsers[0]}var nf=tf,Xe=y(op(),1),As;function rf(u,c,{logger:f=!1,isCLI:p=!1,passThrough:g=!1,FlagSchema:m,descriptor:C}={}){if(p){if(!m)throw new Error("'FlagSchema' option is required.");if(!C)throw new Error("'descriptor' option is required.")}else C=Xe.default.apiDescriptor;let k=g?Array.isArray(g)?(T,A)=>g.includes(T)?{[T]:A}:void 0:(T,A)=>({[T]:A}):(T,A,F)=>{let{_:O,...L}=F.schemas;return Xe.default.levenUnknownHandler(T,A,{...F,schemas:L})},w=sf(c,{isCLI:p,FlagSchema:m}),S=new Xe.default.Normalizer(w,{logger:f,unknown:k,descriptor:C}),E=f!==!1;E&&As&&(S._hasDeprecationWarned=As);let B=S.normalize(u);return E&&(As=S._hasDeprecationWarned),B}function sf(u,{isCLI:c,FlagSchema:f}){let p=[];c&&p.push(Xe.default.AnySchema.create({name:"_"}));for(let g of u)p.push(of(g,{isCLI:c,optionInfos:u,FlagSchema:f})),g.alias&&c&&p.push(Xe.default.AliasSchema.create({name:g.alias,sourceName:g.name}));return p}function of(u,{isCLI:c,optionInfos:f,FlagSchema:p}){let{name:g}=u,m={name:g},C,k={};switch(u.type){case"int":C=Xe.default.IntegerSchema,c&&(m.preprocess=Number);break;case"string":C=Xe.default.StringSchema;break;case"choice":C=Xe.default.ChoiceSchema,m.choices=u.choices.map(w=>w!=null&&w.redirect?{...w,redirect:{to:{key:u.name,value:w.redirect}}}:w);break;case"boolean":C=Xe.default.BooleanSchema;break;case"flag":C=p,m.flags=f.flatMap(w=>[w.alias,w.description&&w.name,w.oppositeDescription&&`no-${w.name}`].filter(Boolean));break;case"path":C=Xe.default.StringSchema;break;default:throw new Error(`Unexpected type ${u.type}`)}if(u.exception?m.validate=(w,S,E)=>u.exception(w)||S.validate(w,E):m.validate=(w,S,E)=>w===void 0||S.validate(w,E),u.redirect&&(k.redirect=w=>w?{to:{key:u.redirect.option,value:u.redirect.value}}:void 0),u.deprecated&&(k.deprecated=!0),c&&!u.array){let w=m.preprocess||(S=>S);m.preprocess=(S,E,B)=>E.preprocess(w(Array.isArray(S)?he(!1,S,-1):S),B)}return u.array?Xe.default.ArraySchema.create({...c?{preproce
`+p,u.codeFrame=p,u}throw u}var nr=gf,Kr,Fs,rr,Gr,yf=class{constructor(u){x(this,Kr),x(this,rr),this.stack=[u]}get key(){let{stack:u,siblings:c}=this;return he(!1,u,c===null?-2:-4)??null}get index(){return this.siblings===null?null:he(!1,this.stack,-2)}get node(){return he(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:u}=this,c=he(!1,u,-3);return Array.isArray(c)?c:null}get next(){let{siblings:u}=this;return u===null?null:u[this.index+1]}get previous(){let{siblings:u}=this;return u===null?null:u[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:u,index:c}=this;return u!==null&&c===u.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...M(this,rr,Gr).call(this)]}getName(){let{stack:u}=this,{length:c}=u;return c>1?he(!1,u,-2):null}getValue(){return he(!1,this.stack,-1)}getNode(u=0){let c=M(this,Kr,Fs).call(this,u);return c===-1?null:this.stack[c]}getParentNode(u=0){return this.getNode(u+1)}call(u,...c){let{stack:f}=this,{length:p}=f,g=he(!1,f,-1);for(let m of c)g=g[m],f.push(m,g);try{return u(this)}finally{f.length=p}}callParent(u,c=0){let f=M(this,Kr,Fs).call(this,c+1),p=this.stack.splice(f+1);try{return u(this)}finally{this.stack.push(...p)}}each(u,...c){let{stack:f}=this,{length:p}=f,g=he(!1,f,-1);for(let m of c)g=g[m],f.push(m,g);try{for(let m=0;m<g.length;++m)f.push(m,g[m]),u(this,m,g),f.length-=2}finally{f.length=p}}map(u,...c){let f=[];return this.each((p,g,m)=>{f[g]=u(p,g,m)},...c),f}match(...u){let c=this.stack.length-1,f=null,p=this.stack[c--];for(let g of u){if(p===void 0)return!1;let m=null;if(typeof f=="number"&&(m=f,f=this.stack[c--],p=this.stack[c--]),g&&!g(p,f,m))return!1;f=this.stack[c--],p=this.stack[c--]}return!0}findAncestor(u){for(let c of M(this,rr,Gr).call(this))if(u(c))return c}hasAncestor(u){for(let c of M(this,rr,Gr).call(this))if(u(c))return!0;return!1}};Kr=new WeakSet,Fs=function(u){let{stack:c}=this;for(let f=c.length-1;f>=0;f-=2)if(!Array.isArray(c[f])&&--u<0)return f;return-1},rr=new WeakSet,Gr=function*(){let{stack:u}=this;for(let c=u.length-3;c>=0;c-=2){let f=u[c];Array.isArray(f)||(yield f)}};var bf=yf,ir=()=>{};ir.ok=ir,ir.strictEqual=ir;var Ts=ir;function sr(u){return(c,f,p)=>{let g=!!(p!=null&&p.backwards);if(f===!1)return!1;let{length:m}=c,C=f;for(;C>=0&&C<m;){let k=c.charAt(C);if(u instanceof RegExp){if(!u.test(k))return C}else if(!u.includes(k))return C;g?C--:C++}return C===-1||C===m?C:!1}}var Cf=sr(/\s/),_t=sr(" "),dl=sr(",; "),hl=sr(/[^\n\r]/);function vf(u,c,f){let p=!!(f!=null&&f.backwards);if(c===!1)return!1;let g=u.charAt(c);if(p){if(u.charAt(c-1)==="\r"&&g===`
`)return c-2;if(g===`
`||g==="\r"||g==="\u2028"||g==="\u2029")return c-1}else{if(g==="\r"&&u.charAt(c+1)===`
`)return c+2;if(g===`
`||g==="\r"||g==="\u2028"||g==="\u2029")return c+1}return c}var nn=vf;function kf(u,c,f={}){let p=_t(u,f.backwards?c-1:c,f),g=nn(u,p,f);return p!==g}var Bt=kf;function Sf(u){return Array.isArray(u)&&u.length>0}var wf=Sf;function Ef(u){return u!==null&&typeof u=="object"}var xf=Ef;function*pl(u,c){let{getVisitorKeys:f,filter:p=()=>!0}=c,g=m=>xf(m)&&p(m);for(let m of f(u)){let C=u[m];if(Array.isArray(C))for(let k of C)g(k)&&(yield k);else g(C)&&(yield C)}}function*Af(u,c){let f=[u];for(let p=0;p<f.length;p++){let g=f[p];for(let m of pl(g,c))yield m,f.push(m)}}function Ff(u){let c=u.type||u.kind||"(unknown type)",f=String(u.name||u.id&&(typeof u.id=="object"?u.id.name:u.id)||u.key&&(typeof u.key=="object"?u.key.name:u.key)||u.value&&(typeof u.value=="object"?"":String(u.value))||u.operator||"");return f.length>20&&(f=f.slice(0,19)+"…"),c+(f?" "+f:"")}function Ms(u,c){(u.comments??(u.comments=[])).push(c),c.printed=!1,c.nodeDescription=Ff(u)}function Mn(u,c){c.leading=!0,c.trailing=!1,Ms(u,c)}function rn(u,c,f){c.leading=!1,c.trailing=!1,f&&(c.marker=f),Ms(u,c)}function _n(u,c){c.leading=!1,c.trailing=!0,Ms(u,c)}var _s=new WeakMap;function Bs(u,c){if(_s.has(u))return _s.get(u);let{printer:{getCommentChildNodes:f,canAttachComment:p,getVisitorKeys:g},locStart:m,locEnd:C}=c;if(!p)return[];let k=(f?.(u,c)??[...pl(u,{getVisitorKeys:Jr(g)})]).flatMap(w=>p(w)?[w]:Bs(w,c));return k.sort((w,S)=>m(w)-m(S)||C(w)-C(S)),_s.set(u,k),k}function fl(u,c,f,p){let{locStart:g,locEnd:m}=f,C=g(c),k=m(c),w=Bs(u,f),S,E,B=0,T=w.length;for(;B<T;){let A=B+T>>1,F=w[A],O=g(F),L=m(F);if(O<=C&&k<=L)return fl(F,c,f,F);if(L<=C){S=F,B=A+1;continue}if(k<=O){E=F,T=A;continue}throw new Error("Comment location overlaps with node location")}if(p?.type==="TemplateLiteral"){let{quasis:A}=p,F=Os(A,c,f);S&&Os(A,S,f)!==F&&(S=null),E&&Os(A,E,f)!==F&&(E=null)}return{enclosingNode:p,precedingNode:S,followingNode:E}}var Ns=()=>!1;function Tf(u,c){let{comments:f}=u;if(delete u.comments,!wf(f)||!c.printer.canAttachComment)return;let p=[],{locStart:g,locEnd:m,printer:{experimentalFeatures:{avoidAstMutation:C=!1}={},handleComments:k={}},originalText:w}=c,{ownLine:S=Ns,endOfLine:E=Ns,remaining:B=Ns}=k,T=f.map((A,F)=>({...fl(u,A,c),comment:A,text:w,options:c,ast:u,isLastComment:f.length-1===F}));for(let[A,F]of T.entries()){let{comment:O,precedingNode:L,enclosingNode:z,followingNode:V,text:Y,options:Q,ast:Z,isLastComment:ne}=F;if(Q.parser==="json"||Q.parser==="json5"||Q.parser==="__js_expression"||Q.parser==="__ts_expression"||Q.parser==="__vue_expression"||Q.parser==="__vue_ts_expression"){if(g(O)-g(Z)<=0){Mn(Z,O);continue}if(m(O)-m(Z)>=0){_n(Z,O);continue}}let ie;if(C?ie=[F]:(O.enclosingNode=z,O.precedingNode=L,O.followingNode=V,ie=[O,Y,Q,Z,ne]),Mf(Y,Q,T,A))O.placement="ownLine",S(...ie)||(V?Mn(V,O):L?_n(L,O):rn(z||Z,O));else if(_f(Y,Q,T,A))O.placement="endOfLine",E(...ie)||(L?_n(L,O):V?Mn(V,O):rn(z||Z,O));else if(O.placement="remaining",!B(...ie))if(L&&V){let le=p.length;le>0&&p[le-1].followingNode!==V&&gl(p,Q),p.push(F)}else L?_n(L,O):V?Mn(V,O):rn(z||Z,O)}if(gl(p,c),!C)for(let A of f)delete A.precedingNode,delete A.enclosingNode,delete A.followingNode}var ml=u=>!/[\S\n\u2028\u2029]/.test(u);function Mf(u,c,f,p){let{comment:g,precedingNode:m}=f[p],{locStart:C,locEnd:k}=c,w=C(g);if(m)for(let S=p-1;S>=0;S--){let{comment:E,precedingNode:B}=f[S];if(B!==m||!ml(u.slice(k(E),w)))break;w=C(E)}return Bt(u,w,{backwards:!0})}function _f(u,c,f,p){let{comment:g,followingNode:m}=f[p],{locStart:C,locEnd:k}=c,w=k(g);if(m)for(let S=p+1;S<f.length;S++){let{comment:E,followingNode:B}=f[S];if(B!==m||!ml(u.slice(w,C(E))))break;w=k(E)}return Bt(u,w)}function gl(u,c){var f,p;let g=u.length;if(g===0)return;let{precedingNode:m,followingNode:C}=u[0],k=c.locStart(C),w;for(w=g;w>0;--w){let{comment:S,precedingNode:E,followingNode:B}=u[w-1];Ts.strictEqual(E,m),Ts.strictEqual(B,C);let T=c.originalText.slice(c.locEnd(S),k);if(((p=(f=c.printer).isGap)==null?void 0:p.call(f,T,c))??/^[\s(]*$/.test(T))k=c.locStart(S);else break}for(let[S,{comment:E}]of u.entries())S<w?_n(m,E):Mn(C,E);for(let S of[m,C])S.comm
`,g)+1),w=p.slice(k,g).match(/^\s*/)[0],S=xs(w,c.tabWidth),E=await El(C,{...c,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:c.cursorOffset>g&&c.cursorOffset<=m?c.cursorOffset-g:-1,endOfLine:"lf"},S),B=E.formatted.trimEnd(),{cursorOffset:T}=c;T>m?T+=B.length-C.length:E.cursorOffset>=0&&(T=E.cursorOffset+g);let A=p.slice(0,g)+B+p.slice(m);if(c.endOfLine!=="lf"){let F=vs(c.endOfLine);T>=0&&F===`\r
`&&(T+=Ya(A.slice(0,T),`
`)),A=Hr(!1,A,`
`,F)}return{formatted:A,cursorOffset:T,comments:E.comments}}function Ps(u,c,f){return typeof c!="number"||Number.isNaN(c)||c<0||c>u.length?f:c}function xl(u,c){let{cursorOffset:f,rangeStart:p,rangeEnd:g}=c;return f=Ps(u,f,-1),p=Ps(u,p,0),g=Ps(u,g,u.length),{...c,cursorOffset:f,rangeStart:p,rangeEnd:g}}function Al(u,c){let{cursorOffset:f,rangeStart:p,rangeEnd:g,endOfLine:m}=xl(u,c),C=u.charAt(0)===Sl;if(C&&(u=u.slice(1),f--,p--,g--),m==="auto"&&(m=Tp(u)),u.includes("\r")){let k=w=>Ya(u.slice(0,Math.max(w,0)),`\r
`);f-=k(f),p-=k(p),g-=k(g),u=Mp(u)}return{hasBOM:C,text:u,options:xl(u,{...c,cursorOffset:f,rangeStart:p,rangeEnd:g,endOfLine:m})}}async function Fl(u,c){let f=await al(c);return!f.hasPragma||f.hasPragma(u)}async function Tl(u,c){let{hasBOM:f,text:p,options:g}=Al(u,await Tn(c));if(g.rangeStart>=g.rangeEnd&&p!==""||g.requirePragma&&!await Fl(p,g))return{formatted:u,cursorOffset:c.cursorOffset,comments:[]};let m;return g.rangeStart>0||g.rangeEnd<p.length?m=await Yf(p,g):(!g.requirePragma&&g.insertPragma&&g.printer.insertPragma&&!await Fl(p,g)&&(p=g.printer.insertPragma(p)),m=await El(p,g)),f&&(m.formatted=Sl+m.formatted,m.cursorOffset>=0&&m.cursorOffset++),m}async function Xf(u,c,f){let{text:p,options:g}=Al(u,await Tn(c)),m=await nr(p,g);return f&&(f.preprocessForPrint&&(m.ast=await bl(m.ast,g)),f.massage&&(m.ast=ff(m.ast,g))),m}async function Zf(u,c){c=await Tn(c);let f=await Yr(u,c);return Ur(f,c)}async function Qf(u,c){let f=Kp(u),{formatted:p}=await Tl(f,{...c,parser:"__js_expression"});return p}async function em(u,c){c=await Tn(c);let{ast:f}=await nr(u,c);return Yr(f,c)}async function tm(u,c){return Ur(u,await Tn(c))}var Ml={};h(Ml,{addDanglingComment:()=>rn,addLeadingComment:()=>Mn,addTrailingComment:()=>_n,getAlignmentSize:()=>xs,getIndentSize:()=>cm,getMaxContinuousCount:()=>lm,getNextNonSpaceNonCommentCharacter:()=>gm,getNextNonSpaceNonCommentCharacterIndex:()=>Cm,getStringWidth:()=>ks,hasNewline:()=>Bt,hasNewlineInRange:()=>hm,hasSpaces:()=>fm,isNextLineEmpty:()=>wm,isNextLineEmptyAfterIndex:()=>Hs,isPreviousLineEmpty:()=>km,makeString:()=>ym,skip:()=>sr,skipEverythingButNewLine:()=>hl,skipInlineComment:()=>Rs,skipNewline:()=>nn,skipSpaces:()=>_t,skipToLineEnd:()=>dl,skipTrailingComment:()=>zs,skipWhitespace:()=>Cf});function nm(u,c){if(c===!1)return!1;if(u.charAt(c)==="/"&&u.charAt(c+1)==="*"){for(let f=c+2;f<u.length;++f)if(u.charAt(f)==="*"&&u.charAt(f+1)==="/")return f+2}return c}var Rs=nm;function rm(u,c){return c===!1?!1:u.charAt(c)==="/"&&u.charAt(c+1)==="/"?hl(u,c):c}var zs=rm;function im(u,c){let f=null,p=c;for(;p!==f;)f=p,p=_t(u,p),p=Rs(u,p),p=zs(u,p),p=nn(u,p);return p}var qs=im;function sm(u,c){let f=null,p=c;for(;p!==f;)f=p,p=dl(u,p),p=Rs(u,p),p=_t(u,p);return p=zs(u,p),p=nn(u,p),p!==!1&&Bt(u,p)}var Hs=sm;function om(u){if(typeof u!="string")throw new TypeError("Expected a string");return u.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function am(u,c){let f=u.match(new RegExp(`(${om(c)})+`,"g"));return f===null?0:f.reduce((p,g)=>Math.max(p,g.length/c.length),0)}var lm=am;function um(u,c){let f=u.lastIndexOf(`
`);return f===-1?0:xs(u.slice(f+1).match(/^[\t ]*/)[0],c)}var cm=um;function dm(u,c,f){for(let p=c;p<f;++p)if(u.charAt(p)===`
`)return!0;return!1}var hm=dm;function pm(u,c,f={}){return _t(u,f.backwards?c-1:c,f)!==c}var fm=pm;function mm(u,c){let f=qs(u,c);return f===!1?"":u.charAt(f)}var gm=mm;function Dm(u,c,f){let p=c==='"'?"'":'"',g=Hr(!1,u,/\\(.)|(["'])/gs,(m,C,k)=>C===p?C:k===c?"\\"+k:k||(f&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(C)?C:"\\"+C));return c+g+c}var ym=Dm;function bm(u,c,f){return qs(u,f(c))}function Cm(u,c){return arguments.length===2||typeof c=="number"?qs(u,c):bm(...arguments)}function vm(u,c,f){return Is(u,f(c))}function km(u,c){return arguments.length===2||typeof c=="number"?Is(u,c):vm(...arguments)}function Sm(u,c,f){return Hs(u,f(c))}function wm(u,c){return arguments.length===2||typeof c=="number"?Hs(u,c):Sm(...arguments)}var _l={};h(_l,{builders:()=>Em,printer:()=>xm,utils:()=>Am});var Em={join:Ka,line:Ua,softline:xp,hardline:tn,literalline:Ja,group:Va,conditionalGroup:vp,fill:ja,lineSuffix:ys,lineSuffixBoundary:wp,cursor:Cs,breakParent:Vr,ifBreak:kp,trim:Ep,indent:$r,indentIfBreak:Sp,align:Fn,addAlignmentToDoc:Ga,markAsRoot:bp,dedentToRoot:yp,dedent:Cp,hardlineWithoutBreakParent:bs,literallineWithoutBreakParent:Wa,label:Ap,concat:u=>u},xm={printDocToString:Ur},Am={willBreak:Pp,traverseDoc:Ds,findInDoc:Ss,mapDoc:jr,removeLines:qp,stripTrailingHardline:Qa,replaceEndOfLine:Vp,canBreak:Wp},Fm="3.0.0";function sn(u,c=1){return async(...f)=>{let p=f[c]??{},g=p.plugins??[];return f[c]={...p,plugins:Array.isArray(g)?g:Object.values(g)},u(...f)}}var Bl=sn(Tl);async function Nl(u,c){let{formatted:f}=await Bl(u,{...c,cursorOffset:-1});return f}async function Tm(u,c){return await Nl(u,c)===u}var Mm=sn(il,0),_m={parse:sn(Xf),formatAST:sn(Zf),formatDoc:sn(Qf),printToDoc:sn(em),printDocToString:sn(tm)};return b(qa)})})(Dc);var o2=Dc.exports,a2=Object.defineProperty,yc=(n,e)=>{for(var t in e)a2(n,t,{get:e[t],enumerable:!0})},bc=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)},Nt=(n,e,t)=>(bc(n,e,"read from private field"),t?t.call(n):e.get(n)),l2=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},u2=(n,e,t,r)=>(bc(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Cc={};yc(Cc,{languages:()=>Vy,options:()=>Wy,parsers:()=>Xc,printers:()=>Uy});var c2=(n,e,t,r)=>{if(!(n&&e==null))return e.replaceAll?e.replaceAll(t,r):t.global?e.replace(t,r):e.split(t).join(r)},Je=c2,Jo="string",Ko="array",Go="cursor",Oi="indent",Ii="align",Yo="trim",Cr="group",Li="fill",Pi="if-break",Ri="indent-if-break",Xo="line-suffix",Zo="line-suffix-boundary",En="line",Qo="label",zi="break-parent",vc=new Set([Go,Oi,Ii,Yo,Cr,Li,Pi,Ri,Xo,Zo,En,Qo,zi]);function d2(n){if(typeof n=="string")return Jo;if(Array.isArray(n))return Ko;if(!n)return;let{type:e}=n;if(vc.has(e))return e}var ea=d2,h2=n=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(n);function p2(n){let e=n===null?"null":typeof n;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
Expected it to be 'string' or 'object'.`;if(ea(n))throw new Error("doc is valid.");let t=Object.prototype.toString.call(n);if(t!=="[object Object]")return`Unexpected doc '${t}'.`;let r=h2([...vc].map(i=>`'${i}'`));return`Unexpected doc.type '${n.type}'.
Expected it to be ${r}.`}var f2=class extends Error{name="InvalidDocError";constructor(n){super(p2(n)),this.doc=n}},kc=f2,m2=()=>{},g2=m2;function Mr(n){return{type:Oi,contents:n}}function Sc(n,e){return{type:Ii,contents:e,n}}function Ke(n,e={}){return g2(e.expandedStates),{type:Cr,id:e.id,contents:n,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function D2(n){return Sc(Number.NEGATIVE_INFINITY,n)}function y2(n){return Sc({type:"root"},n)}function wc(n){return{type:Li,parts:n}}function mi(n,e="",t={}){return{type:Pi,breakContents:n,flatContents:e,groupId:t.groupId}}function b2(n,e){return{type:Ri,contents:n,groupId:e.groupId,negate:e.negate}}var _r={type:zi},C2={type:En,hard:!0},v2={type:En,hard:!0,literal:!0},Be={type:En},et={type:En,soft:!0},se=[C2,_r],k2=[v2,_r];function qi(n,e){let t=[];for(let r=0;r<e.length;r++)r!==0&&t.push(n),t.push(e[r]);return t}var S2=(n,e,t)=>{if(!(n&&e==null))return Array.isArray(e)||typeof e=="string"?e[t<0?e.length+t:t]:e.at(t)},ta=S2;function na(n,e){if(typeof n=="string")return e(n);let t=new Map;return r(n);function r(s){if(t.has(s))return t.get(s);let o=i(s);return t.set(s,o),o}function i(s){switch(ea(s)){case Ko:return e(s.map(r));case Li:return e({...s,parts:s.parts.map(r)});case Pi:return e({...s,breakContents:r(s.breakContents),flatContents:r(s.flatContents)});case Cr:{let{expandedStates:o,contents:a}=s;return o?(o=o.map(r),a=o[0]):a=r(a),e({...s,contents:a,expandedStates:o})}case Ii:case Oi:case Ri:case Qo:case Xo:return e({...s,contents:r(s.contents)});case Jo:case Go:case Yo:case Zo:case En:case zi:return e(s);default:throw new kc(s)}}}function w2(n){switch(ea(n)){case Li:if(n.parts.every(e=>e===""))return"";break;case Cr:if(!n.contents&&!n.id&&!n.break&&!n.expandedStates)return"";if(n.contents.type===Cr&&n.contents.id===n.id&&n.contents.break===n.break&&n.contents.expandedStates===n.expandedStates)return n.contents;break;case Ii:case Oi:case Ri:case Xo:if(!n.contents)return"";break;case Pi:if(!n.flatContents&&!n.breakContents)return"";break;case Ko:{let e=[];for(let t of n){if(!t)continue;let[r,...i]=Array.isArray(t)?t:[t];typeof r=="string"&&typeof ta(!1,e,-1)=="string"?e[e.length-1]+=r:e.push(r),e.push(...i)}return e.length===0?"":e.length===1?e[0]:e}case Jo:case Go:case Yo:case Zo:case En:case Qo:case zi:break;default:throw new kc(n)}return n}function E2(n){return na(n,e=>w2(e))}function rt(n,e=k2){return na(n,t=>typeof t=="string"?qi(e,t.split(`
`)):t)}var x2=class extends Error{name="UnexpectedNodeError";constructor(n,e,t="type"){super(`Unexpected ${e} node ${t}: ${JSON.stringify(n[t])}.`),this.node=n}},A2=x2,Zr="'",Ol='"';function F2(n,e){let t=e===!0||e===Zr?Zr:Ol,r=t===Zr?Ol:Zr,i=0,s=0;for(let o of n)o===t?i++:o===r&&s++;return i>s?r:t}var T2=F2;function M2(n){return n?.type==="front-matter"}var Hi=M2,_2=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens"]);function Ec(n,e){if(n.type==="text"||n.type==="comment"||Hi(n)||n.type==="yaml"||n.type==="toml")return null;n.type==="attribute"&&delete e.value,n.type==="docType"&&delete e.value}Ec.ignoredProperties=_2;var B2=Ec,N2=n=>n.split(/[/\\]/).pop();function Il(n,e){if(!e)return;let t=N2(e).toLowerCase();return n.find(r=>{var i,s;return((i=r.extensions)==null?void 0:i.some(o=>t.endsWith(o)))||((s=r.filenames)==null?void 0:s.some(o=>o.toLowerCase()===t))})}function O2(n,e){if(e)return n.find(({name:t})=>t.toLowerCase()===e)??n.find(({aliases:t})=>t?.includes(e))??n.find(({extensions:t})=>t?.includes(`.${e}`))}function I2(n,e){let t=n.plugins.flatMap(i=>i.languages??[]),r=O2(t,e.language)??Il(t,e.physicalFile)??Il(t,e.file)??(e.physicalFile,void 0);return r?.parsers[0]}var $i=I2,L2="inline",P2={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",source:"block",style:"none",template:"inline",track:"block",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",fieldset:"block",button:"inline-block",details:"block",summary:"block",dialog:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block",search:"block"},R2="normal",z2={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function q2(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ze,H2=class{constructor(n){l2(this,Ze,void 0),u2(this,Ze,new Set(n))}getLeadingWhitespaceCount(n){let e=Nt(this,Ze),t=0;for(let r=0;r<n.length&&e.has(n.charAt(r));r++)t++;return t}getTrailingWhitespaceCount(n){let e=Nt(this,Ze),t=0;for(let r=n.length-1;r>=0&&e.has(n.charAt(r));r--)t++;return t}getLeadingWhitespace(n){let e=this.getLeadingWhitespaceCount(n);return n.slice(0,e)}getTrailingWhitespace(n){let e=this.getTrailingWhitespaceCount(n);return n.slice(n.length-e)}hasLeadingWhitespace(n){return Nt(this,Ze).has(n.charAt(0))}hasTrailingWhitespace(n){return Nt(this,Ze).has(ta(!1,n,-1))}trimStart(n){let e=this.getLeadingWhitespaceCount(n);return n.slice(e)}trimEnd(n){let e=this.getTrailingWhitespaceCount(n);return n.slice(0,n.length-e)}trim(n){return this.trimEnd(this.trimStart(n))}split(n,e=!1){let t=`[${q2([...Nt(this,Ze)].join(""))}]+`,r=new RegExp(e?`(${t})`:t);return n.split(r)}hasWhitespaceCharacter(n){let e=Nt(this,Ze);return Array.prototype.some.call(n,t=>e.has(t))}hasNonWhitespaceCharacter(n){let e=Nt(this,Ze);return Array.prototype.some.call(n,t=>!e.has(t))}isWhitespaceOnly(n){let e=Nt(this,Ze);return Array.prototype.every.call(n,t=>e.has(t))}};Ze=new WeakMap;var $2=H2,V2=[" ",`
`,"\f","\r"," "],j2=new $2(V2),yn=j2;function W2(n){return n.type==="element"&&!n.hasExplicitNamespace&&!["html","svg"].includes(n.namespace)}var vr=W2,U2=n=>Je(!1,n,/^[\t\f\r ]*\n/g,""),xc=n=>U2(yn.trimEnd(n)),J2=n=>{let e=n,t=yn.getLeadingWhitespace(e);t&&(e=e.slice(t.length));let r=yn.getTrailingWhitespace(e);return r&&(e=e.slice(0,-r.length)),{leadingWhitespace:t,trailingWhitespace:r,text:e}};function Ac(n,e){return!!(n.type==="ieConditionalComment"&&n.lastChild&&!n.lastChild.isSelfClosing&&!n.lastChild.endSourceSpan||n.type==="ieConditionalComment"&&!n.complete||$n(n)&&n.children.some(t=>t.type!=="text"&&t.type!=="interpolation")||sa(n,e)&&!At(n)&&n.type!=="interpolation")}function ra(n){return n.type==="attribute"||!n.parent||!n.prev?!1:K2(n.prev)}function K2(n){return n.type==="comment"&&n.value.trim()==="prettier-ignore"}function Ve(n){return n.type==="text"||n.type==="comment"}function At(n){return n.type==="element"&&(n.fullName==="script"||n.fullName==="style"||n.fullName==="svg:style"||n.fullName==="svg:script"||vr(n)&&(n.name==="script"||n.name==="style"))}function G2(n){return n.children&&!At(n)}function Y2(n){return At(n)||n.type==="interpolation"||Fc(n)}function Fc(n){return Ic(n).startsWith("pre")}function X2(n,e){var t,r;let i=s();if(i&&!n.prev&&(r=(t=n.parent)==null?void 0:t.tagDefinition)!=null&&r.ignoreFirstLf)return n.type==="interpolation";return i;function s(){return Hi(n)?!1:(n.type==="text"||n.type==="interpolation")&&n.prev&&(n.prev.type==="text"||n.prev.type==="interpolation")?!0:!n.parent||n.parent.cssDisplay==="none"?!1:$n(n.parent)?!0:!(!n.prev&&(n.parent.type==="root"||$n(n)&&n.parent||At(n.parent)||Vi(n.parent,e)||!o0(n.parent.cssDisplay))||n.prev&&!u0(n.prev.cssDisplay))}}function Z2(n,e){return Hi(n)?!1:(n.type==="text"||n.type==="interpolation")&&n.next&&(n.next.type==="text"||n.next.type==="interpolation")?!0:!n.parent||n.parent.cssDisplay==="none"?!1:$n(n.parent)?!0:!(!n.next&&(n.parent.type==="root"||$n(n)&&n.parent||At(n.parent)||Vi(n.parent,e)||!a0(n.parent.cssDisplay))||n.next&&!l0(n.next.cssDisplay))}function Q2(n){return c0(n.cssDisplay)&&!At(n)}function Qr(n){return Hi(n)||n.next&&n.sourceSpan.end&&n.sourceSpan.end.line+1<n.next.sourceSpan.start.line}function e0(n){return Tc(n)||n.type==="element"&&n.children.length>0&&(["body","script","style"].includes(n.name)||n.children.some(e=>n0(e)))||n.firstChild&&n.firstChild===n.lastChild&&n.firstChild.type!=="text"&&_c(n.firstChild)&&(!n.lastChild.isTrailingSpaceSensitive||Bc(n.lastChild))}function Tc(n){return n.type==="element"&&n.children.length>0&&(["html","head","ul","ol","select"].includes(n.name)||n.cssDisplay.startsWith("table")&&n.cssDisplay!=="table-cell")}function js(n){return Nc(n)||n.prev&&t0(n.prev)||Mc(n)}function t0(n){return Nc(n)||n.type==="element"&&n.fullName==="br"||Mc(n)}function Mc(n){return _c(n)&&Bc(n)}function _c(n){return n.hasLeadingSpaces&&(n.prev?n.prev.sourceSpan.end.line<n.sourceSpan.start.line:n.parent.type==="root"||n.parent.startSourceSpan.end.line<n.sourceSpan.start.line)}function Bc(n){return n.hasTrailingSpaces&&(n.next?n.next.sourceSpan.start.line>n.sourceSpan.end.line:n.parent.type==="root"||n.parent.endSourceSpan&&n.parent.endSourceSpan.start.line>n.sourceSpan.end.line)}function Nc(n){switch(n.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(n.name)}return!1}function ia(n){return n.lastChild?ia(n.lastChild):n}function n0(n){var e;return(e=n.children)==null?void 0:e.some(t=>t.type!=="text")}function Oc(n){if(n)switch(n){case"module":case"text/javascript":case"text/babel":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(n.endsWith("json")||n.endsWith("importmap")||n==="speculationrules")return"json"}}function r0(n,e){let{name:t,attrMap:r}=n;if(t!=="script"||Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:i,lang:s}=n.attrMap;return!s&&!i?"babel
`)){if(t.length===0)continue;let r=yn.getLeadingWhitespaceCount(t);if(r===0)return 0;t.length!==r&&r<e&&(e=r)}return e===Number.POSITIVE_INFINITY?0:e}function Lc(n,e=p0(n)){return e===0?n:n.split(`
`).map(t=>t.slice(e)).join(`
`)}function Pc(n){return Je(!1,Je(!1,n,"&apos;","'"),"&quot;",'"')}function xn(n){return Pc(n.value)}var f0=new Set(["template","style","script"]);function Vi(n,e){return Xn(n,e)&&!f0.has(n.fullName)}function Xn(n,e){return e.parser==="vue"&&n.type==="element"&&n.parent.type==="root"&&n.fullName.toLowerCase()!=="html"}function sa(n,e){return Xn(n,e)&&(Vi(n,e)||n.attrMap.lang&&n.attrMap.lang!=="html")}function m0(n){let e=n.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function g0(n,e){let t=n.parent;if(!Xn(t,e))return!1;let r=t.fullName,i=n.fullName;return r==="script"&&i==="setup"||r==="style"&&i==="vars"}function Rc(n,e=n.value){return n.parent.isWhitespaceSensitive?n.parent.isIndentationSensitive?rt(e):rt(Lc(xc(e)),se):qi(Be,yn.split(e))}function D0(n,e){return Xn(n,e)&&n.name==="script"}function zc(n){return n>=9&&n<=32||n==160}function y0(n){return 48<=n&&n<=57}function qc(n){return n>=97&&n<=122||n>=65&&n<=90}function b0(n){return n>=97&&n<=102||n>=65&&n<=70||y0(n)}function Hc(n){return n===10||n===13}function Pl(n){return 48<=n&&n<=55}function C0(n){return n===39||n===34||n===96}var v0=/-+([a-z0-9])/g;function k0(n){return n.replace(v0,(...e)=>e[1].toUpperCase())}var ko=class $c{constructor(e,t,r,i){this.file=e,this.offset=t,this.line=r,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let t=this.file.content,r=t.length,i=this.offset,s=this.line,o=this.col;for(;i>0&&e<0;)if(i--,e++,t.charCodeAt(i)==10){s--;let a=t.substring(0,i-1).lastIndexOf(String.fromCharCode(10));o=a>0?i-a:i}else o--;for(;i<r&&e>0;){let a=t.charCodeAt(i);i++,e--,a==10?(s++,o=0):o++}return new $c(this.file,i,s,o)}getContext(e,t){let r=this.file.content,i=this.offset;if(i!=null){i>r.length-1&&(i=r.length-1);let s=i,o=0,a=0;for(;o<e&&i>0&&(i--,o++,!(r[i]==`
`&&++a==t)););for(o=0,a=0;o<e&&s<r.length-1&&(s++,o++,!(r[s]==`
`&&++a==t)););return{before:r.substring(i,this.offset),after:r.substring(this.offset,s+1)}}return null}},Vc=class{constructor(n,e){this.content=n,this.url=e}},ee=class{constructor(n,e,t=n,r=null){this.start=n,this.end=e,this.fullStart=t,this.details=r}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},gi;(function(n){n[n.WARNING=0]="WARNING",n[n.ERROR=1]="ERROR"})(gi||(gi={}));var jc=class{constructor(n,e,t=gi.ERROR){this.span=n,this.msg=e,this.level=t}contextualMessage(){let n=this.span.start.getContext(100,3);return n?`${this.msg} ("${n.before}[${gi[this.level]} ->]${n.after}")`:this.msg}toString(){let n=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${n}`}},S0=[E0,x0,F0,M0,_0,O0,B0,N0,I0,T0];function w0(n,e){for(let t of S0)t(n,e);return n}function E0(n){n.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===`
`){let t=e.children[0];t.value.length===1?e.removeChild(t):t.value=t.value.slice(1)}})}function x0(n){let e=t=>{var r,i;return t.type==="element"&&((r=t.prev)==null?void 0:r.type)==="ieConditionalStartComment"&&t.prev.sourceSpan.end.offset===t.startSourceSpan.start.offset&&((i=t.firstChild)==null?void 0:i.type)==="ieConditionalEndComment"&&t.firstChild.sourceSpan.start.offset===t.startSourceSpan.end.offset};n.walk(t=>{if(t.children)for(let r=0;r<t.children.length;r++){let i=t.children[r];if(!e(i))continue;let s=i.prev,o=i.firstChild;t.removeChild(s),r--;let a=new ee(s.sourceSpan.start,o.sourceSpan.end),l=new ee(a.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=l,i.startSourceSpan=a,i.removeChild(o)}})}function A0(n,e,t){n.walk(r=>{if(r.children)for(let i=0;i<r.children.length;i++){let s=r.children[i];if(s.type!=="text"&&!e(s))continue;s.type!=="text"&&(s.type="text",s.value=t(s));let o=s.prev;!o||o.type!=="text"||(o.value+=s.value,o.sourceSpan=new ee(o.sourceSpan.start,s.sourceSpan.end),r.removeChild(s),i--)}})}function F0(n){return A0(n,e=>e.type==="cdata",e=>`<![CDATA[${e.value}]]>`)}function T0(n){let e=t=>{var r,i;return t.type==="element"&&t.attrs.length===0&&t.children.length===1&&t.firstChild.type==="text"&&!yn.hasWhitespaceCharacter(t.children[0].value)&&!t.firstChild.hasLeadingSpaces&&!t.firstChild.hasTrailingSpaces&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces&&((r=t.prev)==null?void 0:r.type)==="text"&&((i=t.next)==null?void 0:i.type)==="text"};n.walk(t=>{if(t.children)for(let r=0;r<t.children.length;r++){let i=t.children[r];if(!e(i))continue;let s=i.prev,o=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+o.value,s.sourceSpan=new ee(s.sourceSpan.start,o.sourceSpan.end),s.isTrailingSpaceSensitive=o.isTrailingSpaceSensitive,s.hasTrailingSpaces=o.hasTrailingSpaces,t.removeChild(i),r--,t.removeChild(o)}})}function M0(n,e){if(e.parser==="html")return;let t=/{{(.+?)}}/s;n.walk(r=>{if(G2(r))for(let i of r.children){if(i.type!=="text")continue;let s=i.sourceSpan.start,o=null,a=i.value.split(t);for(let l=0;l<a.length;l++,s=o){let d=a[l];if(l%2===0){o=s.moveBy(d.length),d.length>0&&r.insertChildBefore(i,{type:"text",value:d,sourceSpan:new ee(s,o)});continue}o=s.moveBy(d.length+4),r.insertChildBefore(i,{type:"interpolation",sourceSpan:new ee(s,o),children:d.length===0?[]:[{type:"text",value:d,sourceSpan:new ee(s.moveBy(2),o.moveBy(-2))}]})}r.removeChild(i)}})}function _0(n){n.walk(e=>{if(!e.children)return;if(e.children.length===0||e.children.length===1&&e.children[0].type==="text"&&yn.trim(e.children[0].value).length===0){e.hasDanglingSpaces=e.children.length>0,e.children=[];return}let t=Y2(e),r=Fc(e);if(!t)for(let i=0;i<e.children.length;i++){let s=e.children[i];if(s.type!=="text")continue;let{leadingWhitespace:o,text:a,trailingWhitespace:l}=J2(s.value),d=s.prev,h=s.next;a?(s.value=a,s.sourceSpan=new ee(s.sourceSpan.start.moveBy(o.length),s.sourceSpan.end.moveBy(-l.length)),o&&(d&&(d.hasTrailingSpaces=!0),s.hasLeadingSpaces=!0),l&&(s.hasTrailingSpaces=!0,h&&(h.hasLeadingSpaces=!0))):(e.removeChild(s),i--,(o||l)&&(d&&(d.hasTrailingSpaces=!0),h&&(h.hasLeadingSpaces=!0)))}e.isWhitespaceSensitive=t,e.isIndentationSensitive=r})}function B0(n){n.walk(e=>{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function N0(n,e){n.walk(t=>{t.type==="element"&&(t.hasHtmComponentClosingTag=t.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(e.originalText.slice(t.endSourceSpan.start.offset,t.endSourceSpan.end.offset)))})}function O0(n,e){n.walk(t=>{t.cssDisplay=h0(t,e)})}function I0(n,e){n.walk(t=>{let{children:r}=t;if(r){if(r.length===0){t.isDanglingSpaceSensitive=Q2(t);return}for(let i of r)i.isLeadingSpaceSensitive=X2(i,e),i.isTrailingSpaceSensitive=Z2(i,e);for(let i=0;i<r.length;i++){let s=r[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===r.l
`+n}function ji(n){return n.sourceSpan.start.offset}function Wi(n){return n.sourceSpan.end.offset}async function z0(n,e){if(n.lang==="yaml"){let t=n.value.trim(),r=t?await e(t,{parser:"yaml"}):"";return y2([n.startDelimiter,se,r,r?se:"",n.endDelimiter])}}var q0=z0,kr=()=>{};kr.ok=kr;kr.strictEqual=kr;var Wc=kr;function H0(n){return Array.isArray(n)&&n.length>0}var $0=H0;function So(n,e){return[n.isSelfClosing?"":V0(n,e),ai(n,e)]}function V0(n,e){return n.lastChild&&Sr(n.lastChild)?"":[j0(n,e),oa(n,e)]}function ai(n,e){return(n.next?Cn(n.next):Or(n.parent))?"":[Nr(n,e),bn(n,e)]}function j0(n,e){return Or(n)?Nr(n.lastChild,e):""}function bn(n,e){return Sr(n)?oa(n.parent,e):Ui(n)?aa(n.next):""}function oa(n,e){if(Wc(!n.isSelfClosing),Uc(n,e))return"";switch(n.type){case"ieConditionalComment":return"<!";case"element":if(n.hasHtmComponentClosingTag)return"<//";default:return`</${n.rawName}`}}function Nr(n,e){if(Uc(n,e))return"";switch(n.type){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]-->";case"ieConditionalStartComment":return"]><!-->";case"interpolation":return"}}";case"element":if(n.isSelfClosing)return"/>";default:return">"}}function Uc(n,e){return!n.isSelfClosing&&!n.endSourceSpan&&(ra(n)||Ac(n.parent,e))}function Cn(n){return n.prev&&n.prev.type!=="docType"&&!Ve(n.prev)&&n.isLeadingSpaceSensitive&&!n.hasLeadingSpaces}function Or(n){var e;return((e=n.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!n.lastChild.hasTrailingSpaces&&!Ve(ia(n.lastChild))&&!$n(n)}function Sr(n){return!n.next&&!n.hasTrailingSpaces&&n.isTrailingSpaceSensitive&&Ve(ia(n))}function Ui(n){return n.next&&!Ve(n.next)&&Ve(n)&&n.isTrailingSpaceSensitive&&!n.hasTrailingSpaces}function W0(n){let e=n.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/s);return e?e[1]?e[1].split(/\s+/):!0:!1}function Ji(n){return!n.prev&&n.isLeadingSpaceSensitive&&!n.hasLeadingSpaces}function U0(n,e,t){var r;let{node:i}=n;if(!$0(i.attrs))return i.isSelfClosing?" ":"";let s=((r=i.prev)==null?void 0:r.type)==="comment"&&W0(i.prev.value),o=typeof s=="boolean"?()=>s:Array.isArray(s)?D=>s.includes(D.rawName):()=>!1,a=n.map(({node:D})=>o(D)?rt(e.originalText.slice(ji(D),Wi(D))):t(),"attrs"),l=i.type==="element"&&i.fullName==="script"&&i.attrs.length===1&&i.attrs[0].fullName==="src"&&i.children.length===0,d=e.singleAttributePerLine&&i.attrs.length>1&&!Xn(i,e)?se:Be,h=[Mr([l?" ":Be,qi(d,a)])];return i.firstChild&&Ji(i.firstChild)||i.isSelfClosing&&Or(i.parent)||l?h.push(i.isSelfClosing?" ":""):h.push(e.bracketSameLine?i.isSelfClosing?" ":"":i.isSelfClosing?Be:et),h}function J0(n){return n.firstChild&&Ji(n.firstChild)?"":la(n)}function wo(n,e,t){let{node:r}=n;return[li(r,e),U0(n,e,t),r.isSelfClosing?"":J0(r)]}function li(n,e){return n.prev&&Ui(n.prev)?"":[vn(n,e),aa(n)]}function vn(n,e){return Ji(n)?la(n.parent):Cn(n)?Nr(n.prev,e):""}function aa(n){switch(n.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<!--[if ${n.condition}`;case"ieConditionalEndComment":return"<!--<!";case"interpolation":return"{{";case"docType":return n.value==="html"?"<!doctype":"<!DOCTYPE";case"element":if(n.condition)return`<!--[if ${n.condition}]><!--><${n.rawName}`;default:return`<${n.rawName}`}}function la(n){switch(Wc(!n.isSelfClosing),n.type){case"ieConditionalComment":return"]>";case"element":if(n.condition)return"><!--<![endif]-->";default:return">"}}var Ws=new WeakMap;function K0(n,e){let{root:t}=n;return Ws.has(t)||Ws.set(t,t.children.some(r=>D0(r,e)&&["ts","typescript"].includes(r.attrMap.lang))),Ws.get(t)}var ua=K0;function G0(n,e){if(!n.endSourceSpan)return"";let t=n.startSourceSpan.end.offset;n.firstChild&&Ji(n.firstChild)&&(t-=la(n).length);let r=n.endSourceSpan.start.offset;return n.lastChild&&Sr(n.lastChild)?r+=oa(n,e).length:Or(n)&&(r-=Nr(n.lastChild,e).length),e.originalText.slice(t,r)}var Jc=G0;function Rl(n){return n===" "||n===`
`||n==="\f"||n==="\r"||n===" "}var Y0=/^[ \t\n\r\u000c]+/,X0=/^[, \t\n\r\u000c]+/,Z0=/^[^ \t\n\r\u000c]+/,Q0=/[,]+$/,zl=/^\d+$/,eD=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function tD(n){let e=n.length,t,r,i,s,o,a=0,l;function d(b){let v,x=b.exec(n.substring(a));if(x)return[v]=x,a+=v.length,v}let h=[];for(;;){if(d(X0),a>=e){if(h.length===0)throw new Error("Must contain one or more image candidate strings.");return h}l=a,t=d(Z0),r=[],t.slice(-1)===","?(t=t.replace(Q0,""),y()):D()}function D(){for(d(Y0),i="",s="in descriptor";;){if(o=n.charAt(a),s==="in descriptor")if(Rl(o))i&&(r.push(i),i="",s="after descriptor");else if(o===","){a+=1,i&&r.push(i),y();return}else if(o==="(")i+=o,s="in parens";else if(o===""){i&&r.push(i),y();return}else i+=o;else if(s==="in parens")if(o===")")i+=o,s="in descriptor";else if(o===""){r.push(i),y();return}else i+=o;else if(s==="after descriptor"&&!Rl(o))if(o===""){y();return}else s="in descriptor",a-=1;a+=1}}function y(){let b=!1,v,x,M,N,_={},P,W,H,X,re;for(N=0;N<r.length;N++)P=r[N],W=P[P.length-1],H=P.substring(0,P.length-1),X=parseInt(H,10),re=parseFloat(H),zl.test(H)&&W==="w"?((v||x)&&(b=!0),X===0?b=!0:v=X):eD.test(H)&&W==="x"?((v||x||M)&&(b=!0),re<0?b=!0:x=re):zl.test(H)&&W==="h"?((M||x)&&(b=!0),X===0?b=!0:M=X):b=!0;if(!b)_.source={value:t,startOffset:l},v&&(_.width={value:v}),x&&(_.density={value:x}),M&&(_.height={value:M}),h.push(_);else throw new Error(`Invalid srcset descriptor found in "${n}" at "${P}".`)}}var nD=tD;function Ki(n,e=!0){return[Mr([et,n]),e?et:""]}function Gi(n,e){let t=n.type==="NGRoot"?n.node.type==="NGMicrosyntax"&&n.node.body.length===1&&n.node.body[0].type==="NGMicrosyntaxExpression"?n.node.body[0].expression:n.node:n.type==="JsExpressionRoot"?n.node:n;return t&&(t.type==="ObjectExpression"||t.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(t.type==="TemplateLiteral"||t.type==="StringLiteral"))}async function Wt(n,e,t,r){t={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...t};let i=!0;r&&(t.__onHtmlBindingRoot=(o,a)=>{i=r(o,a)});let s=await e(n,t,e);return i?Ke(s):Ki(s)}function rD(n){if(n.node.fullName==="srcset"&&(n.parent.fullName==="img"||n.parent.fullName==="source"))return()=>iD(xn(n.node))}function iD(n){let e=nD(n),t=e.some(({width:y})=>y),r=e.some(({height:y})=>y),i=e.some(({density:y})=>y);if(t+r+i>1)throw new Error("Mixed descriptor in srcset is not supported");let s=t?"width":r?"height":"density",o=t?"w":r?"h":"x",a=e.map(y=>y.source.value),l=Math.max(...a.map(y=>y.length)),d=e.map(y=>y[s]?String(y[s].value):""),h=d.map(y=>{let b=y.indexOf(".");return b===-1?y.length:b}),D=Math.max(...h);return Ki(qi([",",Be],a.map((y,b)=>{let v=[y],x=d[b];if(x){let M=l-y.length+1,N=D-h[b],_=" ".repeat(M+N);v.push(mi(_," "),x+o)}return v})))}var sD=rD;function oD(n,e){let{node:t}=n,r=xn(t);if(t.fullName==="class"&&!e.parentParser&&!r.includes("{{"))return()=>r.trim().split(/\s+/).join(" ")}var aD=oD;function lD(n,e){let{node:t}=n,r=xn(n.node).trim();if(t.fullName==="style"&&!e.parentParser&&!r.includes("{{"))return async i=>Ki(await i(r,{parser:"css",__isHTMLStyleAttribute:!0}))}async function uD(n,e,t,r){let i=xn(t.node),{left:s,operator:o,right:a}=cD(i),l=ua(t,r);return[Ke(await Wt(`function _(${s}) {}`,n,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",o," ",await Wt(a,n,{parser:l?"__ts_expression":"__js_expression"})]}function cD(n){let e=/(.*?)\s+(in|of)\s+(.*)/s,t=/,([^,\]}]*)(?:,([^,\]}]*))?$/,r=/^\(|\)$/g,i=n.match(e);if(!i)return;let s={};if(s.for=i[3].trim(),!s.for)return;let o=Je(!1,i[1].trim(),r,""),a=o.match(t);a?(s.alias=o.replace(t,""),s.iterator1=a[1].trim(),a[2]&&(s.iterator2=a[2].trim())):s.alias=o;let l=[s.alias,s.iterator1,s.iterator2];if(!l.some((d,h)=>!d&&(h===0||l.slice(h+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:i[2],right:s.for}}function dD(n,e,{parseWithTs:t}){return Wt(`function _(${n}) {}`,e,{parser:t?"babel-ts":"babel",__isVueBindings:!0})}function hD(n){let e=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/,t=/^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^
If '${n}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(n){return n.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${n}' is disallowed for security reasons, please use (${n.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(n){let e=this._schema.get(n.toLowerCase())||this._schema.get("unknown");return Array.from(e.keys()).map(t=>UD.get(t)??t)}allKnownEventsOfElement(n){return Array.from(this._eventSchema.get(n.toLowerCase())??[])}normalizeAnimationStyleProperty(n){return k0(n)}normalizeAnimationStyleValue(n,e,t){let r="",i=t.toString().trim(),s=null;if(KD(n)&&t!==0&&t!=="0")if(typeof t=="number")r="px";else{let o=t.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(s=`Please provide a CSS unit value for ${e}:${t}`)}return{error:s,value:i+r}}};function KD(n){switch(n){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var U=class{constructor({closedByChildren:n,implicitNamespacePrefix:e,contentType:t=tt.PARSABLE_DATA,closedByParent:r=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:o=!1,canSelfClose:a=!1}={}){this.closedByChildren={},this.closedByParent=!1,n&&n.length>0&&n.forEach(l=>this.closedByChildren[l]=!0),this.isVoid=i,this.closedByParent=r||i,this.implicitNamespacePrefix=e||null,this.contentType=t,this.ignoreFirstLf=s,this.preventNamespaceInheritance=o,this.canSelfClose=a??i}isClosedByChild(n){return this.isVoid||n.toLowerCase()in this.closedByChildren}getContentType(n){return typeof this.contentType=="object"?(n===void 0?void 0:this.contentType[n])??this.contentType.default:this.contentType}},Kl,lr;function Eo(n){return lr||(Kl=new U({canSelfClose:!0}),lr={base:new U({isVoid:!0}),meta:new U({isVoid:!0}),area:new U({isVoid:!0}),embed:new U({isVoid:!0}),link:new U({isVoid:!0}),img:new U({isVoid:!0}),input:new U({isVoid:!0}),param:new U({isVoid:!0}),hr:new U({isVoid:!0}),br:new U({isVoid:!0}),source:new U({isVoid:!0}),track:new U({isVoid:!0}),wbr:new U({isVoid:!0}),p:new U({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new U({closedByChildren:["tbody","tfoot"]}),tbody:new U({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new U({closedByChildren:["tbody"],closedByParent:!0}),tr:new U({closedByChildren:["tr"],closedByParent:!0}),td:new U({closedByChildren:["td","th"],closedByParent:!0}),th:new U({closedByChildren:["td","th"],closedByParent:!0}),col:new U({isVoid:!0}),svg:new U({implicitNamespacePrefix:"svg"}),foreignObject:new U({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new U({implicitNamespacePrefix:"math"}),li:new U({closedByChildren:["li"],closedByParent:!0}),dt:new U({closedByChildren:["dt","dd"]}),dd:new U({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new U({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new U({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new U({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new U({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new U({closedByChildren:["optgroup"],closedByParent:!0}),option:new U({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new U({ignoreFirstLf:!0}),listing:new U({ignoreFirstLf:!0}),style:new U({contentType:tt.RAW_TEXT}),script:new U({contentType:tt.RAW_TEXT}),title:new U({contentType:{default:tt.ESCAPABLE_RAW_TEXT,svg:tt.PARSABLE_DATA}})
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",nbsp:" ",Nopf:"",naturals:"",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"",lsquo:"",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"",primes:"",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"",rationals:"",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"",Rfr:"",real:"",realpart:"",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",Ri
`)}tokenize(){for(;this._cursor.peek()!==0;){let n=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(n):this._attemptStr("--")?this._consumeComment(n):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(n):this._consumeBogusComment(n);else if(this._attemptCharCode(47))this._consumeTagClose(n);else{let e=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=e,this._consumeBogusComment(n)):this._consumeTagOpen(n)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(25),this._endToken([])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(gy(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(n,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=n}_endToken(n,e){if(this._currentTokenStart===null)throw new Us("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(e));if(this._currentTokenType===null)throw new Us("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let t={type:this._currentTokenType,parts:n,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(t),this._currentTokenStart=null,this._currentTokenType=null,t}_createError(n,e){this._isInExpansionForm()&&(n+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let t=new Us(n,this._currentTokenType,e);return this._currentTokenStart=null,this._currentTokenType=null,new Js(t)}handleError(n){if(n instanceof da&&(n=this._createError(n.msg,this._cursor.getSpan(n.cursor))),n instanceof Js)this.errors.push(n.error);else throw n}_attemptCharCode(n){return this._cursor.peek()===n?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(n){return Dy(this._cursor.peek(),n)?(this._cursor.advance(),!0):!1}_requireCharCode(n){let e=this._cursor.clone();if(!this._attemptCharCode(n))throw this._createError(Bn(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(n){let e=n.length;if(this._cursor.charsLeft()<e)return!1;let t=this._cursor.clone();for(let r=0;r<e;r++)if(!this._attemptCharCode(n.charCodeAt(r)))return this._cursor=t,!1;return!0}_attemptStrCaseInsensitive(n){for(let e=0;e<n.length;e++)if(!this._attemptCharCodeCaseInsensitive(n.charCodeAt(e)))return!1;return!0}_requireStr(n){let e=this._cursor.clone();if(!this._attemptStr(n))throw this._createError(Bn(this._cursor.peek()),this._cursor.getSpan(e))}_requireStrCaseInsensitive(n){let e=this._cursor.clone();if(!this._attemptStrCaseInsensitive(n))throw this._createError(Bn(this._cursor.peek()),this._cursor.getSpan(e))}_attemptCharCodeUntilFn(n){for(;!n(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(n,e){let t=this._cursor.clone();if(this._attemptCharCodeUntilFn(n),this._cursor.diff(t)<e)throw this._createError(Bn(this._cursor.peek()),this._cursor.getSpan(t))}_attemptUntilChar(n){for(;this._cursor.peek()!==n;)this._cursor.advance()}_readChar(){let n=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),n}_consumeEntity(n){this._beginToken(9);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){let t=this._attemptCharCode(120)||this._attemptCharCode(88),r=this._cursor.clone();if(this._attemptCharCodeUntilFn(fy),this._cursor.peek()!=59){this._cursor.advance();let s=t?bi.HEX:bi.DEC;throw this._createError(dy(s,this._cursor.getChars(e)),this._cursor.getSpan())}let i=this._cursor.getChars(r);this._cursor.advance();try{let s=parseInt(i,t?16:10);this._endToken([String.fromCharCode(s),this._cursor.getCh
`){let r=this._getParentElement();r!=null&&r.children.length==0&&this.getTagDefinition(r.name).ignoreFirstLf&&(t=t.substring(1))}return t}_consumeText(e){let t=[e],r=e.sourceSpan,i=e.parts[0];if(i.length>0&&i[0]===`
`){let s=this._getParentElement();s!=null&&s.children.length===0&&this.getTagDefinition(s.name).ignoreFirstLf&&(i=i.substring(1),t[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),t.push(e),e.type===8?i+=e.parts.join("").replace(/&([^;]+);/g,Ql):e.type===9?i+=e.parts[0]:i+=e.parts.join("");if(i.length>0){let s=e.sourceSpan;this._addToParent(new GD(i,new ee(r.start,s.end,r.fullStart,r.details),t))}}_closeVoidElement(){let e=this._getParentElement();e&&this.getTagDefinition(e.name).isVoid&&this._elementStack.pop()}_consumeStartTag(e){let[t,r]=e.parts,i=[];for(;this._peek.type===14;)i.push(this._consumeAttr(this._advance()));let s=this._getElementFullName(t,r,this._getParentElement()),o=!1;if(this._peek.type===2){this._advance(),o=!0;let y=this.getTagDefinition(s);this.canSelfClose||y.canSelfClose||ui(s)!==null||y.isVoid||this.errors.push(wt.create(s,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),o=!1);let a=this._peek.sourceSpan.fullStart,l=new ee(e.sourceSpan.start,a,e.sourceSpan.fullStart),d=new ee(e.sourceSpan.start,a,e.sourceSpan.fullStart),h=new ee(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),D=new ey(s,i,[],l,d,void 0,h);this._pushElement(D),o?this._popElement(s,l):e.type===4&&(this._popElement(s,null),this.errors.push(wt.create(s,l,`Opening tag "${s}" not terminated.`)))}_pushElement(e){let t=this._getParentElement();t&&this.getTagDefinition(t.name).isClosedByChild(e.name)&&this._elementStack.pop(),this._addToParent(e),this._elementStack.push(e)}_consumeEndTag(e){let t=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getParentElement());if(t&&this.getTagDefinition(t).isVoid)this.errors.push(wt.create(t,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popElement(t,e.sourceSpan)){let r=`Unexpected closing tag "${t}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(wt.create(t,e.sourceSpan,r))}}_popElement(e,t){let r=!1;for(let i=this._elementStack.length-1;i>=0;i--){let s=this._elementStack[i];if(!e||(ui(s.name)?s.name==e:s.name.toLowerCase()==e.toLowerCase()))return s.endSourceSpan=t,s.sourceSpan.end=t!==null?t.end:s.sourceSpan.end,this._elementStack.splice(i,this._elementStack.length-i),!r;this.getTagDefinition(s.name).closedByParent||(r=!0)}return!1}_consumeAttr(e){let t=Di(e.parts[0],e.parts[1]),r=e.sourceSpan.end,i;this._peek.type===15&&(i=this._advance());let s="",o=[],a,l;if(this._peek.type===16)for(a=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let h=this._advance();o.push(h),h.type===17?s+=h.parts.join("").replace(/&([^;]+);/g,Ql):h.type===9?s+=h.parts[0]:s+=h.parts.join(""),l=r=h.sourceSpan.end}this._peek.type===15&&(l=r=this._advance().sourceSpan.end);let d=a&&l&&new ee(i?.sourceSpan.start??a.start,l,i?.sourceSpan.fullStart??a.fullStart);return new QD(t,s,new ee(e.sourceSpan.start,r,e.sourceSpan.fullStart),e.sourceSpan,d,o.length>0?o:void 0,void 0)}_getParentElement(){return this._elementStack.length>0?this._elementStack[this._elementStack.length-1]:null}_addToParent(e){let t=this._getParentElement();t!=null?t.children.push(e):this.rootNodes.push(e)}_getElementFullName(e,t,r){if(e===""&&(e=this.getTagDefinition(t).implicitNamespacePrefix||"",e===""&&r!=null)){let i=Yi(r.name)[1];this.getTagDefinition(i).preventNamespaceInheritance||(e=ui(r.name))}return Di(e,t)}};function Zl(n,e){return n.length>0&&n[n.length-1]===e}function Ql(n,e){return yi[e]!==void 0?yi[e]||n:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):n}var Sy=class extends vy{constructor(){super(Eo)}parse(n,e,t,r=!1,i){return super.parse(n,e,t,r,i)}},Ks=null,wy=()=>(Ks||(Ks=new Sy),Ks);
`)}}kn.empty=new kn(!0);class Zy{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function gd(n){let e=[];do e.push(Qy(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Qy(n){let e=[];do e.push(e1(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function e1(n){let e=r1(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=t1(n,e);else break;return e}function su(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function t1(n,e){let t=su(n),r=t;return n.eat(",")&&(n.next!="}"?r=su(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function n1(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.groups.indexOf(e)>-1&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function r1(n){if(n.eat("(")){let e=gd(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=n1(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function i1(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,a,l){let d={term:l,to:a};return e[o].push(d),d}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,d)=>l.concat(s(d,a)),[]);if(o.type=="seq")for(let l=0;;l++){let d=s(o.exprs[l],a);if(l==o.exprs.length-1)return d;i(d,a=t())}else if(o.type=="star"){let l=t();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=t();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let d=0;d<o.min;d++){let h=t();i(s(o.expr,l),h),l=h}if(o.max==-1)i(s(o.expr,l),l);else for(let d=o.min;d<o.max;d++){let h=t();r(l,h),i(s(o.expr,l),h),l=h}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Dd(n,e){return e-n}function ou(n,e){let t=[];return r(e),t.sort(Dd);function r(i){let s=n[i];if(s.length==1&&!s[0].term)return r(s[0].to);t.push(i);for(let o=0;o<s.length;o++){let{term:a,to:l}=s[o];!a&&t.indexOf(l)==-1&&r(l)}}}function s1(n){let e=Object.create(null);return t(ou(n,0));function t(r){let i=[];r.forEach(o=>{n[o].forEach(({term:a,to:l})=>{if(!a)return;let d;for(let h=0;h<i.length;h++)i[h][0]==a&&(d=i[h][1]);ou(n,l).forEach(h=>{d||i.push([a,d=[]]),d.indexOf(h)==-1&&d.push(h)})})});let s=e[r.join(",")]=new kn(r.indexOf(n.length-1)>-1);for(let o=0;o<i.length;o++){let a=i[o][1].sort(Dd);s.next.push({type:i[o][0],next:e[a.join(",")]||t(a)})}return s}}function o1(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],s=!i.validEnd,o=[];for(let a=0;a<i.next.length;a++){let{type:l,next:d}=i.next[a];o.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(d)==-1&&r.push(d)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function yd(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function bd(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let s=n[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function Cd(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new a1(n[t]);return e}let au=class vd{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,thi
`):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],s=e.previousSibling;(!i||s&&s.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),i;Sd.hasOwnProperty(r)&&this.parser.normalizeLists&&c1(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,t));if(s?s.ignore:u1.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let o,a=this.top,l=this.needsBlock;if(kd.hasOwnProperty(r))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),o=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}this.addAll(e),o&&this.sync(a),this.needsBlock=l}else this.addElementByRule(e,s,s.consuming===!1?i:void 0)}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=te.none,r=te.none;for(let i=0;i<e.length;i+=2)for(let s=void 0;;){let o=this.parser.matchStyle(e[i],e[i+1],this,s);if(!o)break;if(o.ignore)return null;if(o.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(a=>{o.clearMark(a)&&(r=a.addToSet(r))}):t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),o.consuming===!1)s=o;else break}return[t,r]}addElementByRule(e,t,r){let i,s,o;t.node?(s=this.parser.schema.nodes[t.node],s.isLeaf?this.insertNode(s.create(t.attrs))||this.leafFallback(e):i=this.enter(s,t.attrs||null,t.preserveWhitespace)):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}i&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(e,t,r){let i=t||0;for(let s=t?e.childNodes[t]:e.firstChild,o=r==null?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s);this.findAtPoint(e,i)}findPlace(e){let t,r;for(let i=this.open;i>=0;i--){let s=this.nodes[i],o=s.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,r=s,!o.length)||s.solid)break}if(!t)return!1;this.sync(r);for(let i=0;i<t.length;i++)this.enterInner(t[i],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let i=0;i<e.marks.length;i++)(!t.type||t.type.allowsMarkType(e.marks[i].type))&&(r=e.marks[i].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let i=this.findPlace(e.create(t));return i&&this.enterInner(e,t,!0,r),i}enterInner(e,t=null,r=!1,i){this.closeExtra();let s=this.top;s.applyPending(e),s.match=s.match&&s.match.matchType(e);let o=uu(e,i,s.options);s.options&Dr&&s.content.length==0&&(o|=Dr),this.nodes.push(new ii(e,t,s.activeMarks,s.pendingMarks,r,null,o)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let d=t[a];if(d==""){if(a==t.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let h=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l
`);else{let v=y.childNodes[b-1];h=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(st&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let y=d.focusNode.childNodes[d.focusOffset];y&&y.contentEditable=="false"&&(i=!0)}if(!(i||h&&Ee)&&Sn(a.node,a.offset,d.anchorNode,d.anchorOffset)&&Sn(l.node,l.offset,d.focusNode,d.focusOffset))return;let D=!1;if((d.extend||e==t)&&!h){d.collapse(a.node,a.offset);try{e!=t&&d.extend(l.node,l.offset),D=!0}catch{}}if(!D){if(e>t){let b=a;a=l,l=b}let y=document.createRange();y.setEnd(l.node,l.offset),y.setStart(a.node,a.offset),d.removeAllRanges(),d.addRange(y)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,i=0;i<this.children.length;i++){let s=this.children[i],o=r+s.size;if(r==o?e<=o&&t>=r:e<o&&t>r){let a=r+s.border,l=o-s.border;if(e>=a&&t<=l){this.dirty=e==r||t==o?un:Tu,e==a&&t==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=pt:s.markDirty(e-a,t-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?un:pt}r=o}this.dirty=un}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?un:Tu;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class jd extends Lr{constructor(e,t,r,i){let s,o=t.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==Ge&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class db extends Lr{constructor(e,t,r,i){super(e,[],t,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class wn extends Lr{constructor(e,t,r,i){super(e,[],r,i),this.mark=t}static create(e,t,r,i){let s=i.nodeViews[t.type.name],o=s&&s(t,i,r);return(!o||!o.dom)&&(o=ct.renderSpec(document,t.type.spec.toDOM(t,r))),new wn(e,t,o.dom,o.contentDOM||o.dom)}parseRule(){return this.dirty&pt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(e){return this.dirty!=pt&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Ge){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Ge}}slice(e,t,r){let i=wn.create(this.parent,this.mark,!0,r),s=this.children,o=this.size;t<o&&(s=Ro(s,t,o,r)),e>0&&(s=Ro(s,0,e,r));for(let a=0;a<s.length;a++)s[a].parent=i;return i.children=s,i}}class $t extends Lr{constructor(e,t,r,i,s,o,a,l,d){super(e,[],s,o),this.node=t,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,t,r,i,s,o){let a=s.nodeViews[t.type.name],l,d=a&&a(t,s,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,i),h=d&&d.dom,D=d&&d.contentDOM;if(t.isText){if(!h)h=document.createTextNode(t.text);else if(h.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else h||({dom:h,contentDOM:D}=ct.renderSpec(document,t.type.spec.toDOM(t)));!D&&!t.isText&&h.nodeName!="BR"&&(h.hasAttribute("contenteditable")||(h.contentEditable="false"),t.type.spec.draggable&&(h.draggable=!0));let y=h;return h=Kd(h,r,t),d?l=new hb(e,t,r,i,h,D||null,y,d,s,o+1):t.isText?new rs(e,t,r,i,h,y,s):new $t(e,t,r,i,h,D||null,y,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let
`);return{dom:l,text:y}}function th(n,e,t,r,i){let s=i.parent.type.spec.code,o,a;if(!t&&!e)return null;let l=e&&(r||s||!t);if(l){if(n.someProp("transformPastedText",y=>{e=y(e,s||r,n)}),s)return e?new R(I.from(n.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0):R.empty;let D=n.someProp("clipboardTextParser",y=>y(e,i,r,n));if(D)a=D;else{let y=i.marks(),{schema:b}=n.state,v=ct.fromSchema(b);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(x=>{let M=o.appendChild(document.createElement("p"));x&&M.appendChild(v.serializeNode(b.text(x,y)))})}}else n.someProp("transformPastedHTML",D=>{t=D(t,n)}),o=Mb(t),ns&&_b(o);let d=o&&o.querySelector("[data-pm-slice]"),h=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(h&&h[3])for(let D=+h[3];D>0;D--){let y=o.firstChild;for(;y&&y.nodeType!=1;)y=y.nextSibling;if(!y)break;o=y}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||Vn.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||h),context:i,ruleFromNode(y){return y.nodeName=="BR"&&!y.nextSibling&&y.parentNode&&!Fb.test(y.parentNode.nodeName)?{ignore:!0}:null}})),h)a=Bb($u(a,+h[1],+h[2]),h[4]);else if(a=R.maxOpen(Tb(a.content,i),!0),a.openStart||a.openEnd){let D=0,y=0;for(let b=a.content.firstChild;D<a.openStart&&!b.type.spec.isolating;D++,b=b.firstChild);for(let b=a.content.lastChild;y<a.openEnd&&!b.type.spec.isolating;y++,b=b.lastChild);a=$u(a,D,y)}return n.someProp("transformPasted",D=>{a=D(a,n)}),a}const Fb=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Tb(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.index(t)),s,o=[];if(n.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),d;if(!l)return o=null;if(d=o.length&&s.length&&rh(l,s,a,o[o.length-1],0))o[o.length-1]=d;else{o.length&&(o[o.length-1]=ih(o[o.length-1],s.length));let h=nh(a,l);o.push(h),i=i.matchType(h.type),s=l}}),o)return I.from(o)}return n}function nh(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,I.from(n));return n}function rh(n,e,t,r,i){if(i<n.length&&i<e.length&&n[i]==e[i]){let s=rh(n,e,t,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==n.length-1?t.type:n[i+1]))return r.copy(r.content.append(I.from(nh(t,n,i+1))))}}function ih(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,ih(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(I.empty,!0);return n.copy(t.append(r))}function Ho(n,e,t,r,i,s){let o=e<0?n.firstChild:n.lastChild,a=o.content;return n.childCount>1&&(s=0),i<r-1&&(a=Ho(a,e,t,r,i+1,s)),i>=t&&(a=e<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(I.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(a))}function $u(n,e,t){return e<n.openStart&&(n=new R(Ho(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new R(Ho(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const sh={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Vu=null;function oh(){return Vu||(Vu=document.implementation.createHTMLDocument("title"))}function Mb(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=oh().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),i;if((i=r&&sh[r[1].toLowerCase()])&&(n=i.map(s=>"<"+s+">").join("")+n+i.map(s=>"</"+s+">").reverse().join("")),t.innerHTML=n,i)for(let s=0;s<i.length;s++)t=t.querySelector(i[s])||t;return t}function _b(n){let e=n.querySelectorAll(Se?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function Bb(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:i,openStart:s,openEnd:o}=n;for(let a=r.length-2;a>=0;a-=2){let l=t.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=I.from(l.create(r[a+1],i)),s++,o++}return new R(i,s,o)}const xe={},Ae={},Nb={touchstart:!0,touchmove:!0};class Ob{constructor(){this.shiftKey=!1,this.mouseDown=null,this
`).scrollIntoView()),!0)};function yh(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const IC=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let i=t.node(-1),s=t.indexAfter(-1),o=yh(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let a=t.after(),l=n.tr.replaceWith(a,a,o.createAndFill());l.setSelection(G.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},LC=(n,e)=>{let t=n.selection,{$from:r,$to:i}=t;if(t instanceof it||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=yh(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=n.tr.insert(o,s.createAndFill());a.setSelection(J.create(a.doc,o+1)),e(a.scrollIntoView())}return!0},PC=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(zn(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),i=r&&Zn(r);return i==null?!1:(e&&e(n.tr.lift(r,i).scrollIntoView()),!0)},RC=(n,e)=>{let{$from:t,to:r}=n.selection,i,s=t.sharedDepth(r);return s==0?!1:(i=t.before(s),e&&e(n.tr.setSelection($.create(n.doc,i))),!0)};function zC(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||Kt(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function bh(n,e,t){let r=e.nodeBefore,i=e.nodeAfter,s,o;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(zC(n,e,t))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(s=(o=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&o.matchType(s[0]||i.type).validEnd){if(t){let D=e.pos+i.nodeSize,y=I.empty;for(let x=s.length-1;x>=0;x--)y=I.from(s[x].create(null,y));y=I.from(r.copy(y));let b=n.tr.step(new pe(e.pos-1,D,e.pos,D,new R(y,1,0),s.length,!0)),v=D+2*s.length;Kt(b.doc,v)&&b.join(v),t(b.scrollIntoView())}return!0}let l=G.findFrom(e,1),d=l&&l.$from.blockRange(l.$to),h=d&&Zn(d);if(h!=null&&h>=e.depth)return t&&t(n.tr.lift(d,h).scrollIntoView()),!0;if(a&&Kn(i,"start",!0)&&Kn(r,"end")){let D=r,y=[];for(;y.push(D),!D.isTextblock;)D=D.lastChild;let b=i,v=1;for(;!b.isTextblock;b=b.firstChild)v++;if(D.canReplace(D.childCount,D.childCount,b.content)){if(t){let x=I.empty;for(let N=y.length-1;N>=0;N--)x=I.from(y[N].copy(x));let M=n.tr.step(new pe(e.pos-y.length,e.pos+i.nodeSize,e.pos+v,e.pos+i.nodeSize-v,new R(x,y.length,0),0,!0));t(M.scrollIntoView())}return!0}}return!1}function Ch(n){return function(e,t){let r=e.selection,i=n<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(t&&t(e.tr.setSelection(J.create(e.doc,n<0?i.start(s):i.end(s)))),!0):!1}}const qC=Ch(-1),HC=Ch(1);function $C(n,e=null){return function(t,r){let{$from:i,$to:s}=t.selection,o=i.blockRange(s),a=o&&pa(o,n,e);return a?(r&&r(t.tr.wrap(o,a).scrollIntoView()),!0):!1}}function Qu(n,e=null){return function(t,r){let i=!1;for(let s=0;s<t.selection.ranges.length&&!i;s++){let{$from:{pos:o},$to:{pos:a}}=t.selection.ranges[s];t.doc.nodesBetween(o,a,(l,d)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(n,e)))if(l.type==n)i=!0;else{let h=t.doc.resolve(d),D=h.index();i=h.parent.canReplaceWith(D,D+1,n)}})}if(!i)return!1;if(r){let s=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=t.selection.ranges[o];s.setBlockType(a,l,n,e)}r(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function VC(n,e=null){return function(t,r){let{$from:i,$to:s}=t.selection,o=i.blockRange(s),a=!1,l=o;if(!o)return!1;if(o.depth>=2&&i.node(o.depth-1).type.compatibleContent(n)&&o.startIndex==0){if(i.index(o.depth-1)==0)return!1;let h=
`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function nv(n){return typeof n=="number"}class rv{constructor(e){this.find=e.find,this.handler=e.handler}}const iv=(n,e)=>{if(Ea(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const i=[r.text];return i.index=r.index,i.input=n,i.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(r.replaceWith)),i}):[]};function sv(n){const{editor:e,state:t,from:r,to:i,rule:s,pasteEvent:o,dropEvent:a}=n,{commands:l,chain:d,can:h}=new as({editor:e,state:t}),D=[];return t.doc.nodesBetween(r,i,(b,v)=>{if(!b.isTextblock||b.type.spec.code)return;const x=Math.max(r,v),M=Math.min(i,v+b.content.size),N=b.textBetween(x-v,M-v,void 0,"");iv(N,s.find).forEach(P=>{if(P.index===void 0)return;const W=x+P.index+1,H=W+P[0].length,X={from:t.tr.mapping.map(W),to:t.tr.mapping.map(H)},re=s.handler({state:t,range:X,match:P,commands:l,chain:d,can:h,pasteEvent:o,dropEvent:a});D.push(re)})}),D.every(b=>b!==null)}function ov(n){const{editor:e,rules:t}=n;let r=null,i=!1,s=!1,o=new ClipboardEvent("paste"),a=new DragEvent("drop");return t.map(d=>new Ye({view(h){const D=y=>{var b;r=!((b=h.dom.parentElement)===null||b===void 0)&&b.contains(y.target)?h.dom.parentElement:null};return window.addEventListener("dragstart",D),{destroy(){window.removeEventListener("dragstart",D)}}},props:{handleDOMEvents:{drop:(h,D)=>(s=r===h.dom.parentElement,a=D,!1),paste:(h,D)=>{var y;const b=(y=D.clipboardData)===null||y===void 0?void 0:y.getData("text/html");return o=D,i=!!b?.includes("data-pm-slice"),!1}}},appendTransaction:(h,D,y)=>{const b=h[0],v=b.getMeta("uiEvent")==="paste"&&!i,x=b.getMeta("uiEvent")==="drop"&&!s;if(!v&&!x)return;const M=D.doc.content.findDiffStart(y.doc.content),N=D.doc.content.findDiffEnd(y.doc.content);if(!nv(M)||!N||M===N.b)return;const _=y.tr,P=ss({state:y,transaction:_});if(!(!sv({editor:e,state:P,from:Math.max(M-1,0),to:N.b-1,rule:d,pasteEvent:o,dropEvent:a})||!_.steps.length))return a=new DragEvent("drop"),o=new ClipboardEvent("paste"),_}}))}function av(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}class Pn{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=Pn.resolve(e),this.schema=ZC(this.extensions,t),this.extensions.forEach(r=>{var i;this.editor.extensionStorage[r.name]=r.storage;const s={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:po(r.name,this.schema)};r.type==="mark"&&(!((i=K(q(r,"keepOnSplit",s)))!==null&&i!==void 0)||i)&&this.splittableMarks.push(r.name);const o=q(r,"onBeforeCreate",s);o&&this.editor.on("beforeCreate",o);const a=q(r,"onCreate",s);a&&this.editor.on("create",a);const l=q(r,"onUpdate",s);l&&this.editor.on("update",l);const d=q(r,"onSelectionUpdate",s);d&&this.editor.on("selectionUpdate",d);const h=q(r,"onTransaction",s);h&&this.editor.on("transaction",h);const D=q(r,"onFocus",s);D&&this.editor.on("focus",D);const y=q(r,"onBlur",s);y&&this.editor.on("blur",y);const b=q(r,"onDestroy",s);b&&this.editor.on("destroy",b)})}static resolve(e){const t=Pn.sort(Pn.flatten(e)),r=av(t.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},i=q(t,"addExtensions",r);return i?[t,...this.flatten(i())]:t}).flat(10)}static sort(e){return e.sort((r,i)=>{const s=q(r,"priority")||100,o=q(i,"priority")||100;return s>o?-1:s<o?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:po(t.name,this.schema)},i=q(t,"addCommands",r);return i?{...e,...i()}:e},{})}get plugins(){const{editor:e}=this,t=Pn.sort([...this.extensions].reverse()),r=[],i=[],s=t.map(o=>{const a={name:o.name,options:o.options,storage:o.storage,editor:e,type:po(o.name,this.schema)},l=[],d=q(o,"addKeyboardShortcuts",a);let h={};if(o.type==="mark"&&o.config.exitable&&(h.
`,textSerializers:o={}}=t||{};let a="",l=!0;return n.nodesBetween(r,i,(d,h,D,y)=>{var b;const v=o?.[d.type.name];v?(d.isBlock&&!l&&(a+=s,l=!0),D&&(a+=v({node:d,pos:h,parent:D,index:y,range:e}))):d.isText?(a+=(b=d?.text)===null||b===void 0?void 0:b.slice(Math.max(r,h)-h,i-h),l=!1):d.isBlock&&!l&&(a+=s,l=!0)}),a}function wh(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const uv=Re.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Ye({key:new Gt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(h=>h.$from.pos)),a=Math.max(...s.map(h=>h.$to.pos)),l=wh(t);return Sh(r,{from:o,to:a},{textSerializers:l})}}})]}}),cv=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window?.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),dv=(n=!1)=>({commands:e})=>e.setContent("",n),hv=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:i}=r;return t&&i.forEach(({$from:s,$to:o})=>{n.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:d,mapping:h}=e,D=d.resolve(h.map(l)),y=d.resolve(h.map(l+a.nodeSize)),b=D.blockRange(y);if(!b)return;const v=Zn(b);if(a.type.isTextblock){const{defaultType:x}=D.parent.contentMatchAt(D.index());e.setNodeMarkup(b.start,x)}(v||v===0)&&e.lift(b,v)})}),!0},pv=n=>e=>n(e),fv=()=>({state:n,dispatch:e})=>LC(n,e),mv=(n,e)=>({editor:t,tr:r})=>{const{state:i}=t,s=i.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new J(r.doc.resolve(o-1))),!0},gv=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const i=n.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){const a=i.before(s),l=i.after(s);n.delete(a,l).scrollIntoView()}return!0}return!1},Dv=n=>({tr:e,state:t,dispatch:r})=>{const i=me(n,t.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){const l=s.before(o),d=s.after(o);e.delete(l,d).scrollIntoView()}return!0}return!1},yv=n=>({tr:e,dispatch:t})=>{const{from:r,to:i}=n;return t&&e.delete(r,i),!0},bv=()=>({state:n,dispatch:e})=>wC(n,e),Cv=()=>({commands:n})=>n.keyboardShortcut("Enter"),vv=()=>({state:n,dispatch:e})=>IC(n,e);function _i(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>t.strict?e[i]===n[i]:Ea(e[i])?e[i].test(n[i]):e[i]===n[i]):!0}function jo(n,e,t={}){return n.find(r=>r.type===e&&_i(r.attrs,t))}function kv(n,e,t={}){return!!jo(n,e,t)}function xa(n,e,t={}){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if(n.parentOffset===r.offset&&r.offset!==0&&(r=n.parent.childBefore(n.parentOffset)),!r.node)return;const i=jo([...r.node.marks],e,t);if(!i)return;let s=r.index,o=n.start()+r.offset,a=s+1,l=o+r.node.nodeSize;for(jo([...r.node.marks],e,t);s>0&&i.isInSet(n.parent.child(s-1).marks);)s-=1,o-=n.parent.child(s).nodeSize;for(;a<n.parent.childCount&&kv([...n.parent.child(a).marks],e,t);)l+=n.parent.child(a).nodeSize,a+=1;return{from:o,to:l}}function Xt(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const Sv=(n,e={})=>({tr:t,state:r,dispatch:i})=>{const s=Xt(n,r.schema),{doc:o,selection:a}=t,{$from:l,from:d,to:h}=a;if(i){const D=xa(l,s,e);if(D&&D.from<=d&&D.to>=h){const y=J.create(o,D.from,D.to);t.setSelection(y)}}return!0},wv=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function Eh(n){return n instanceof J}function dn(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function xh(n,e=null){if(!e)return null;const t=G.atStart(n),r=G.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const i=t.from,s=r.to;return e==="all"?J.create(n,dn(0,i,s),dn(n.content.size,i,s)):J.create(n,dn(e,i,s),dn(e,i,s))}function Aa(){return["iPad Simulator","iPhone Simulator","iPod Simulat
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 1px !important;
height: 1px !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}
.tippy-box[data-animation=fade][data-state=hidden] {
opacity: 0
}`;function Nk(n,e,t){const r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),i.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(i),i}let Ok=class extends GC{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=Nk(Bk,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=kh(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(e){if(this.isDestroyed)return;const t=typeof e=="string"?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(_k):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r?.type));this.extensionManager=new Pn(t,this)}createCommandManager(){this.commandManager=new as({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=Ah(this.options.content,this.schema,this.options.parseOptions),t=xh(e,this.options.autofocus);this.view=new fC(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Ln.create({doc:e,selection:t||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(o=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(o)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit(
`,textSerializers:r={}}=e||{};return tk(this.state.doc,{blockSeparator:t,textSerializers:{...wh(this.schema),...r}})}get isEmpty(){return sk(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}};function Gn(n){return new us({find:n.find,handler:({state:e,range:t,match:r})=>{const i=K(n.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),d=t.from+a.indexOf(o),h=d+o.length;if(Fh(t.from,t.to,e.doc).filter(b=>b.mark.type.excluded.find(x=>x===n.type&&x!==b.mark.type)).filter(b=>b.to>d).length)return null;h<t.to&&s.delete(h,t.to),d>t.from&&s.delete(t.from+l,d);const y=t.from+l+o.length;s.addMark(t.from+l,y,n.type.create(i||{})),s.removeStoredMark(n.type)}}})}function Ik(n){return new us({find:n.find,handler:({state:e,range:t,match:r})=>{const i=K(n.getAttributes,void 0,r)||{},{tr:s}=e,o=t.from;let a=t.to;const l=n.type.create(i);if(r[1]){const d=r[0].lastIndexOf(r[1]);let h=o+d;h>a?h=a:a=h+r[1].length;const D=r[0][r[0].length-1];s.insertText(D,o+r[0].length-1),s.replaceWith(h,a,l)}else r[0]&&s.insert(o-1,n.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a));s.scrollIntoView()}})}function Uo(n){return new us({find:n.find,handler:({state:e,range:t,match:r})=>{const i=e.doc.resolve(t.from),s=K(n.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,s)}})}function Tr(n){return new us({find:n.find,handler:({state:e,range:t,match:r,chain:i})=>{const s=K(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),l=o.doc.resolve(t.from).blockRange(),d=l&&pa(l,n.type,s);if(!d)return null;if(o.wrap(l,d),n.keepMarks&&n.editor){const{selection:D,storedMarks:y}=e,{splittableMarks:b}=n.editor.extensionManager,v=y||D.$to.parentOffset&&D.$from.marks();if(v){const x=v.filter(M=>b.includes(M.type.name));o.ensureMarks(x)}}if(n.keepAttributes){const D=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(D,s).run()}const h=o.doc.resolve(t.from-1).nodeBefore;h&&h.type===n.type&&Kt(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,h))&&o.join(t.from-1)}})}class ft{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=K(q(this,"addOptions",{name:this.name}))),this.storage=K(q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ft(e)}configure(e={}){const t=this.extend();return t.options=cs(this.options,e),t.storage=K(q(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new ft(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=K(q(t,"addOptions",{name:t.name})),t.storage=K(q(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(d=>d?.type.name===t.name))return!1;const l=o.find(d=>d?.type.name===t.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}}class we{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=
`);return!s||!o?!1:n.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:s}=t;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0||r.nodeAt(a)?!1:n.commands.exitCode()}}},addInputRules(){return[Uo({find:Yk,type:this.type,getAttributes:n=>({language:n[1]})}),Uo({find:Xk,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new Ye({key:new Gt("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i?.mode;if(!t||!s)return!1;const{tr:o}=n.state;return o.replaceSelectionWith(this.type.create({language:s})),o.setSelection(J.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.insertText(t.replace(/\r\n?/g,`
`)),o.setMeta("paste",!0),n.dispatch(o),!0}}})]}}),Qk=we.create({name:"doc",topNode:!0,content:"block+"});function eS(n={}){return new Ye({view(e){return new tS(e,n)}})}class tS{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r;if(t){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let d=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(d){let h=d.getBoundingClientRect(),D=a?h.bottom:h.top;a&&l&&(D=(D+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:h.left,right:h.right,top:D-this.width/2,bottom:D+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let s,o;if(!i||i==document.body&&getComputedStyle(i).position=="static")s=-pageXOffset,o=-pageYOffset;else{let a=i.getBoundingClientRect();s=a.left-i.scrollLeft,o=a.top-i.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-o+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,t,e):i;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Md(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const nS=Re.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[eS(this.options)]}});class oe extends G{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return oe.valid(r)?new oe(r):G.near(r)}content(){return R.empty}eq(e){return e instanceof oe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new oe(e.resolve(t.pos))}getBookmark(){return new Ma(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!rS(e)||!iS(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let i=t.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&oe.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(t>0?e.indexAfter(o)<a.childCount:e.index(o)>0){s=a.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=t;let l=e.doc.resolve(i);if(oe.valid(l))retur
`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:s}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:h})=>{if(h&&l&&o){const D=l.filter(y=>a.includes(y.type.name));d.ensureMarks(D)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),hS=we.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(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,de(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>Uo({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var Ni=200,fe=function(){};fe.prototype.append=function(e){return e.length?(e=fe.from(e),!this.length&&e||e.length<Ni&&this.leafAppend(e)||this.length<Ni&&e.leafPrepend(this)||this.appendInner(e)):this};fe.prototype.prepend=function(e){return e.length?fe.from(e).append(this):this};fe.prototype.appendInner=function(e){return new pS(this,e)};fe.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?fe.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};fe.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};fe.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)};fe.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},t,r),i};fe.from=function(e){return e instanceof fe?e:e&&e.length?new Th(e):fe.empty};var Th=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,a){for(var l=s;l<o;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,o,a){for(var l=s-1;l>=o;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Ni)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Ni)return new e(i.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(fe);fe.empty=new Th([]);var pS=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,o){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(s,a)