@nuasite/cms-studio 0.46.0 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,7 +54,7 @@ var iE=t=>{throw TypeError(t)};var sE=(t,e,n)=>e.has(t)||iE("Cannot "+n);var tt=
|
|
|
54
54
|
`:" ")+s.indentLines(s.containerFlow(r,u.current()),e?nI:YU))),h(),c}}function YU(t,e,n){return e===0?t:nI(t,e,n)}function nI(t,e,n){return(n?"":" ")+t}const QU=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rI.peek=tJ;function WU(){return{canContainEols:["delete"],enter:{strikethrough:ZU},exit:{strikethrough:eJ}}}function XU(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:QU}],handlers:{delete:rI}}}function ZU(t){this.enter({type:"delete",children:[]},t)}function eJ(t){this.exit(t)}function rI(t,e,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(t,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),s(),o}function tJ(){return"~"}function nJ(t){return t.length}function rJ(t,e){const n=e||{},r=(n.align||[]).concat(),i=n.stringLength||nJ,s=[],o=[],u=[],c=[];let h=0,d=-1;for(;++d<t.length;){const E=[],N=[];let M=-1;for(t[d].length>h&&(h=t[d].length);++M<t[d].length;){const j=iJ(t[d][M]);if(n.alignDelimiters!==!1){const P=i(j);N[M]=P,(c[M]===void 0||P>c[M])&&(c[M]=P)}E.push(j)}o[d]=E,u[d]=N}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)s[g]=UN(r[g]);else{const E=UN(r);for(;++g<h;)s[g]=E}g=-1;const y=[],b=[];for(;++g<h;){const E=s[g];let N="",M="";E===99?(N=":",M=":"):E===108?N=":":E===114&&(M=":");let j=n.alignDelimiters===!1?1:Math.max(1,c[g]-N.length-M.length);const P=N+"-".repeat(j)+M;n.alignDelimiters!==!1&&(j=N.length+j+M.length,j>c[g]&&(c[g]=j),b[g]=j),y[g]=P}o.splice(1,0,y),u.splice(1,0,b),d=-1;const k=[];for(;++d<o.length;){const E=o[d],N=u[d];g=-1;const M=[];for(;++g<h;){const j=E[g]||"";let P="",U="";if(n.alignDelimiters!==!1){const L=c[g]-(N[g]||0),C=s[g];C===114?P=" ".repeat(L):C===99?L%2?(P=" ".repeat(L/2+.5),U=" ".repeat(L/2-.5)):(P=" ".repeat(L/2),U=P):U=" ".repeat(L)}n.delimiterStart!==!1&&!g&&M.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||g)&&M.push(" "),n.alignDelimiters!==!1&&M.push(P),M.push(j),n.alignDelimiters!==!1&&M.push(U),n.padding!==!1&&M.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&M.push("|")}k.push(n.delimiterEnd===!1?M.join("").replace(/ +$/,""):M.join(""))}return k.join(`
|
|
55
55
|
`)}function iJ(t){return t==null?"":String(t)}function UN(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function sJ(){return{enter:{table:aJ,tableData:JN,tableHeader:JN,tableRow:lJ},exit:{codeText:uJ,table:oJ,tableData:lx,tableHeader:lx,tableRow:lx}}}function aJ(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function oJ(t){this.exit(t),this.data.inTable=void 0}function lJ(t){this.enter({type:"tableRow",children:[]},t)}function lx(t){this.exit(t)}function JN(t){this.enter({type:"tableCell",children:[]},t)}function uJ(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,cJ));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function cJ(t,e){return e==="|"?e:t}function fJ(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
56
56
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:o,tableCell:c,tableRow:u}};function o(b,k,E,N){return h(d(b,E,N),b.align)}function u(b,k,E,N){const M=g(b,E,N),j=h([M]);return j.slice(0,j.indexOf(`
|
|
57
|
-
`))}function c(b,k,E,N){const M=E.enter("tableCell"),j=E.enter("phrasing"),P=E.containerPhrasing(b,{...N,before:s,after:s});return j(),M(),P}function h(b,k){return rJ(b,{align:k,alignDelimiters:r,padding:n,stringLength:i})}function d(b,k,E){const N=b.children;let M=-1;const j=[],P=k.enter("table");for(;++M<N.length;)j[M]=g(N[M],k,E);return P(),j}function g(b,k,E){const N=b.children;let M=-1;const j=[],P=k.enter("tableRow");for(;++M<N.length;)j[M]=c(N[M],b,k,E);return P(),j}function y(b,k,E){let N=xS.inlineCode(b,k,E);return E.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function hJ(){return{exit:{taskListCheckValueChecked:qN,taskListCheckValueUnchecked:qN,paragraph:dJ}}}function pJ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mJ}}}function qN(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function dJ(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,o;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){o=u;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function mJ(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",o="["+(t.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(o);let c=xS.listItem(t,e,n,{...r,...u.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(d){return d+o}}function gJ(){return[AU(),KU(),WU(),sJ(),hJ()]}function yJ(t){return{extensions:[NU(),GU(t),XU(),fJ(t),pJ()]}}const xJ={tokenize:wJ,partial:!0},iI={tokenize:EJ,partial:!0},sI={tokenize:AJ,partial:!0},aI={tokenize:NJ,partial:!0},bJ={tokenize:TJ,partial:!0},oI={name:"wwwAutolink",tokenize:kJ,previous:uI},lI={name:"protocolAutolink",tokenize:CJ,previous:cI},Hs={name:"emailAutolink",tokenize:vJ,previous:fI},Qi={};function SJ(){return{text:Qi}}let Eo=48;for(;Eo<123;)Qi[Eo]=Hs,Eo++,Eo===58?Eo=65:Eo===91&&(Eo=97);Qi[43]=Hs;Qi[45]=Hs;Qi[46]=Hs;Qi[95]=Hs;Qi[72]=[Hs,lI];Qi[104]=[Hs,lI];Qi[87]=[Hs,oI];Qi[119]=[Hs,oI];function vJ(t,e,n){const r=this;let i,s;return o;function o(g){return!nS(g)||!fI.call(r,r.previous)||ik(r.events)?n(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(g))}function u(g){return nS(g)?(t.consume(g),u):g===64?(t.consume(g),c):n(g)}function c(g){return g===46?t.check(bJ,d,h)(g):g===45||g===95||vn(g)?(s=!0,t.consume(g),c):d(g)}function h(g){return t.consume(g),i=!0,c}function d(g){return s&&i&&sn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(g)):n(g)}}function kJ(t,e,n){const r=this;return i;function i(o){return o!==87&&o!==119||!uI.call(r,r.previous)||ik(r.events)?n(o):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(xJ,t.attempt(iI,t.attempt(sI,s),n),n)(o))}function s(o){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(o)}}function CJ(t,e,n){const r=this;let i="",s=!1;return o;function o(g){return(g===72||g===104)&&cI.call(r,r.previous)&&!ik(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(g),t.consume(g),u):n(g)}function u(g){if(sn(g)&&i.length<5)return i+=String.fromCodePoint(g),t.consume(g),u;if(g===58){const y=i.toLowerCase();if(y==="http"||y==="https")return t.consume(g),c}return n(g)}function c(g){return g===47?(t.consume(g),s?h:(s=!0,c)):n(g)}function h(g){return g===null||Cm(g)||We(g)||Vn(g)||Sg(g)?n(g):t.attempt(iI,t.attempt(sI,d),n)(g)}function d(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(g)}}function wJ(t,e,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,t.consume(o),i):o===46&&r===3?(t.consume(o),s):n(o)}function s(o){return o===null?n(o):e(o)}}function EJ(t,e,n){let r,i,s;return o;function o(h){return h===46||h===95?t.check(aI,c,u)(h):h===null||We(h)||Vn(h)||h!==45&&Sg(h)?c(h):(s=!0,t.consume(h),o)}function u(h){return h===95?r=!0:(i=r,r=void 0),t.consume(h),o}function c(h){return i||r||!s?n(h):e(h)}}function AJ(t,e){let n=0,r=0;return i;function i(o){return o===40?(n++,t.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?t.check(aI,e,s)(o):o===null||We(o)||Vn(o)?e(o):(t.consume(o),i)}function s(o){return o===41&&r++,t.consume(o),i}}function NJ(t,e,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(t.consume(u),r):u===38?(t.consume(u),s):u===93?(t.consume(u),i):u===60||u===null||We(u)||Vn(u)?e(u):n(u)}function i(u){return u===null||u===40||u===91||We(u)||Vn(u)?e(u):r(u)}function s(u){return sn(u)?o(u):n(u)}function o(u){return u===59?(t.consume(u),r):sn(u)?(t.consume(u),o):n(u)}}function TJ(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return vn(s)?n(s):e(s)}}function uI(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||We(t)}function cI(t){return!sn(t)}function fI(t){return!(t===47||nS(t))}function nS(t){return t===43||t===45||t===46||t===95||vn(t)}function ik(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const MJ={tokenize:BJ,partial:!0};function OJ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_J,continuation:{tokenize:zJ},exit:LJ}},text:{91:{name:"gfmFootnoteCall",tokenize:IJ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RJ,resolveTo:DJ}}}}function RJ(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!o||!o._balanced)return n(c);const h=wi(r.sliceSerialize({start:o.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(c):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),e(c))}}function DJ(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...u),t}function IJ(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return u;function u(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),c}function c(g){return g!==94?n(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!o||g===null||g===91||We(g))return n(g);if(g===93){t.exit("chunkString");const y=t.exit("gfmFootnoteCallString");return i.includes(wi(r.sliceSerialize(y)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(g)}return We(g)||(o=!0),s++,t.consume(g),g===92?d:h}function d(g){return g===91||g===92||g===93?(t.consume(g),s++,h):h(g)}}function _J(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,u;return c;function c(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",d):n(k)}function d(k){if(o>999||k===93&&!u||k===null||k===91||We(k))return n(k);if(k===93){t.exit("chunkString");const E=t.exit("gfmFootnoteDefinitionLabelString");return s=wi(r.sliceSerialize(E)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),y}return We(k)||(u=!0),o++,t.consume(k),k===92?g:d}function g(k){return k===91||k===92||k===93?(t.consume(k),o++,d):d(k)}function y(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),i.includes(s)||i.push(s),He(t,b,"gfmFootnoteDefinitionWhitespace")):n(k)}function b(k){return e(k)}}function zJ(t,e,n){return t.check(ju,e,t.attempt(MJ,e,n))}function LJ(t){t.exit("gfmFootnoteDefinition")}function BJ(t,e,n){const r=this;return He(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):n(s)}}function VJ(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,u){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let h=c;for(;h--;)if(o[h][0]==="exit"&&o[h][1].type==="strikethroughSequenceTemporary"&&o[h][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[h][1].end.offset-o[h][1].start.offset){o[c][1].type="strikethroughSequence",o[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[h][1].start),end:Object.assign({},o[c][1].end)},g={type:"strikethroughText",start:Object.assign({},o[h][1].end),end:Object.assign({},o[c][1].start)},y=[["enter",d,u],["enter",o[h][1],u],["exit",o[h][1],u],["enter",g,u]],b=u.parser.constructs.insideSpan.null;b&&Er(y,y.length,0,vg(b,o.slice(h+1,c),u)),Er(y,y.length,0,[["exit",g,u],["enter",o[c][1],u],["exit",o[c][1],u],["exit",d,u]]),Er(o,h-1,c-h+3,y),c=h+y.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function s(o,u,c){const h=this.previous,d=this.events;let g=0;return y;function y(k){return h===126&&d[d.length-1][1].type!=="characterEscape"?c(k):(o.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const E=Iu(h);if(k===126)return g>1?c(k):(o.consume(k),g++,b);if(g<2&&!n)return c(k);const N=o.exit("strikethroughSequenceTemporary"),M=Iu(k);return N._open=!M||M===2&&!!E,N._close=!E||E===2&&!!M,u(k)}}}class FJ{constructor(){this.map=[]}add(e,n,r){PJ(this,e,n,r)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function PJ(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function jJ(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function $J(){return{flow:{null:{name:"table",tokenize:UJ,resolveAll:JJ}}}}function UJ(t,e,n){const r=this;let i=0,s=0,o;return u;function u(K){let de=r.events.length-1;for(;de>-1;){const Re=r.events[de][1].type;if(Re==="lineEnding"||Re==="linePrefix")de--;else break}const ce=de>-1?r.events[de][1].type:null,Se=ce==="tableHead"||ce==="tableRow"?C:c;return Se===C&&r.parser.lazy[r.now().line]?n(K):Se(K)}function c(K){return t.enter("tableHead"),t.enter("tableRow"),h(K)}function h(K){return K===124||(o=!0,s+=1),d(K)}function d(K){return K===null?n(K):Ce(K)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(K),t.exit("lineEnding"),b):n(K):qe(K)?He(t,d,"whitespace")(K):(s+=1,o&&(o=!1,i+=1),K===124?(t.enter("tableCellDivider"),t.consume(K),t.exit("tableCellDivider"),o=!0,d):(t.enter("data"),g(K)))}function g(K){return K===null||K===124||We(K)?(t.exit("data"),d(K)):(t.consume(K),K===92?y:g)}function y(K){return K===92||K===124?(t.consume(K),g):g(K)}function b(K){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(K):(t.enter("tableDelimiterRow"),o=!1,qe(K)?He(t,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):k(K))}function k(K){return K===45||K===58?N(K):K===124?(o=!0,t.enter("tableCellDivider"),t.consume(K),t.exit("tableCellDivider"),E):L(K)}function E(K){return qe(K)?He(t,N,"whitespace")(K):N(K)}function N(K){return K===58?(s+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(K),t.exit("tableDelimiterMarker"),M):K===45?(s+=1,M(K)):K===null||Ce(K)?U(K):L(K)}function M(K){return K===45?(t.enter("tableDelimiterFiller"),j(K)):L(K)}function j(K){return K===45?(t.consume(K),j):K===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(K),t.exit("tableDelimiterMarker"),P):(t.exit("tableDelimiterFiller"),P(K))}function P(K){return qe(K)?He(t,U,"whitespace")(K):U(K)}function U(K){return K===124?k(K):K===null||Ce(K)?!o||i!==s?L(K):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(K)):L(K)}function L(K){return n(K)}function C(K){return t.enter("tableRow"),z(K)}function z(K){return K===124?(t.enter("tableCellDivider"),t.consume(K),t.exit("tableCellDivider"),z):K===null||Ce(K)?(t.exit("tableRow"),e(K)):qe(K)?He(t,z,"whitespace")(K):(t.enter("data"),G(K))}function G(K){return K===null||K===124||We(K)?(t.exit("data"),z(K)):(t.consume(K),K===92?J:G)}function J(K){return K===92||K===124?(t.consume(K),G):G(K)}}function JJ(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],u=!1,c=0,h,d,g;const y=new FJ;for(;++n<t.length;){const b=t[n],k=b[1];b[0]==="enter"?k.type==="tableHead"?(u=!1,c!==0&&(HN(y,e,c,h,d),d=void 0,c=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,e]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],o=[0,n+1,0,0],u&&(u=!1,d={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",d,e]])),i=k.type==="tableDelimiterRow"?2:d?3:1):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],g=Vd(y,e,s,i,void 0,g),s=[0,0,0,0]),o[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],g=Vd(y,e,s,i,void 0,g)),s=o,o=[s[1],n,0,0])):k.type==="tableHead"?(u=!0,c=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(c=n,s[1]!==0?(o[0]=o[1],g=Vd(y,e,s,i,n,g)):o[1]!==0&&(g=Vd(y,e,o,i,n,g)),i=0):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&HN(y,e,c,h,d),y.consume(e.events),n=-1;++n<e.events.length;){const b=e.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=jJ(e.events,n))}return t}function Vd(t,e,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},Eu(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const c=Eu(e.events,n[1]);if(s={type:o,start:Object.assign({},c),end:Object.assign({},c)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const h=Eu(e.events,n[2]),d=Eu(e.events,n[3]),g={type:u,start:Object.assign({},h),end:Object.assign({},d)};if(t.add(n[2],0,[["enter",g,e]]),r!==2){const y=e.events[n[2]],b=e.events[n[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,E=n[3]-n[2]-1;t.add(k,E,[])}}t.add(n[3]+1,0,[["exit",g,e]])}return i!==void 0&&(s.end=Object.assign({},Eu(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function HN(t,e,n,r,i){const s=[],o=Eu(e.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,e])),r.end=Object.assign({},o),s.push(["exit",r,e]),t.add(n+1,0,s)}function Eu(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const qJ={name:"tasklistCheck",tokenize:KJ};function HJ(){return{text:{91:qJ}}}function KJ(t,e,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),s)}function s(c){return We(c)?(t.enter("taskListCheckValueUnchecked"),t.consume(c),t.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(t.enter("taskListCheckValueChecked"),t.consume(c),t.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),u):n(c)}function u(c){return Ce(c)?e(c):qe(c)?t.check({tokenize:GJ},e,n)(c):n(c)}}function GJ(t,e,n){return He(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function YJ(t){return dS([SJ(),OJ(),VJ(t),$J(),HJ()])}const QJ={};function WJ(t){const e=this,n=t||QJ,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(YJ(n)),s.push(gJ()),o.push(yJ(n))}function Fe(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}var sk=Xh("strike_through");Fe(sk,{displayName:"Attr<strikethrough>",group:"Strikethrough"});var up=qu("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(sk.key)(e)],parseMarkdown:{match:e=>e.type==="delete",runner:(e,n,r)=>{e.openMark(r),e.next(n.children),e.closeMark(r)}},toMarkdown:{match:e=>e.type.name==="strike_through",runner:(e,n)=>{e.withMark(n,"delete")}}}));Fe(up.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Fe(up.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});var Hg=Ue("ToggleStrikeThrough",t=>()=>Ag(up.type(t)));Fe(Hg,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});var hI=pr(t=>Gh(new RegExp("(?<![\\w:/])(~{1,2})(.+?)\\1(?!\\w|\\/)"),up.type(t)));Fe(hI,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});var ak=Mr("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(xt);return()=>e.call(Hg.key)}}});Fe(ak.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Fe(ak.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});var cp=Aj({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),_s=en("table",()=>({...cp.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="table",runner:(t,e,n)=>{const r=e.align,i=e.children.map((s,o)=>({...s,align:r,isHeader:o===0}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table",runner:(t,e)=>{const n=e.content.firstChild?.content;if(!n)return;const r=[];n.forEach(i=>{r.push(i.attrs.alignment)}),t.openNode("table",void 0,{align:r}),t.next(e.content),t.closeNode()}}}));Fe(_s.node,{displayName:"NodeSchema<table>",group:"Table"});Fe(_s.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});var fp=en("table_header_row",()=>({...cp.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"},{tag:"tr",getAttrs:t=>t instanceof HTMLElement&&t.querySelector("th")?{}:!1}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:t=>!!(t.type==="tableRow"&&t.isHeader),runner:(t,e,n)=>{const r=e.align,i=e.children.map((s,o)=>({...s,align:r[o],isHeader:e.isHeader}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header_row",runner:(t,e)=>{e.content.size!==0&&(t.openNode("tableRow",void 0,{isHeader:!0}),t.next(e.content),t.closeNode())}}}));Fe(fp.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Fe(fp.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});var Yu=en("table_row",()=>({...cp.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:t=>t.type==="tableRow",runner:(t,e,n)=>{const r=e.align,i=e.children.map((s,o)=>({...s,align:r[o]}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_row",runner:(t,e)=>{e.content.size!==0&&(t.openNode("tableRow"),t.next(e.content),t.closeNode())}}}));Fe(Yu.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Fe(Yu.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});var hp=en("table_cell",()=>({...cp.table_cell,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!t.isHeader,runner:(t,e,n)=>{const r=e.align;t.openNode(n,{alignment:r}).openNode(t.schema.nodes.paragraph).next(e.children).closeNode().closeNode()}},toMarkdown:{match:t=>t.type.name==="table_cell",runner:(t,e)=>{t.openNode("tableCell").next(e.content).closeNode()}}}));Fe(hp.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Fe(hp.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});var Pu=en("table_header",()=>({...cp.table_header,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!!t.isHeader,runner:(t,e,n)=>{const r=e.align;t.openNode(n,{alignment:r}),t.openNode(t.schema.nodes.paragraph),t.next(e.children),t.closeNode(),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header",runner:(t,e)=>{t.openNode("tableCell"),t.next(e.content),t.closeNode()}}}));Fe(Pu.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Fe(Pu.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function pI(t,e=3,n=3){const r=Array(n).fill(0).map(()=>hp.type(t).createAndFill()),i=Array(n).fill(0).map(()=>Pu.type(t).createAndFill()),s=Array(e).fill(0).map((o,u)=>u===0?fp.type(t).create(null,i):Yu.type(t).create(null,r));return _s.type(t).create(null,s)}function dI(t){return(e,n)=>r=>{n=n??r.selection.from;const i=r.doc.resolve(n),s=YB(c=>c.type.name==="table")(i),o=s?{node:s.node,from:s.start}:void 0,u=t==="row";if(o){const c=bt.get(o.node);if(e>=0&&e<(u?c.height:c.width)){const h=c.positionAt(u?e:c.height-1,u?c.width-1:e,o.node),d=r.doc.resolve(o.from+h),g=u?Rt.rowSelection:Rt.colSelection,y=c.positionAt(u?e:0,u?0:e,o.node),b=r.doc.resolve(o.from+y);return TO(r.setSelection(g(d,b)))}}return r}}var XJ=dI("row"),ZJ=dI("col");function mI(t,e,{map:n,tableStart:r,table:i},s){const o=Array(s).fill(0).reduce((c,h,d)=>c+i.child(d).nodeSize,r),u=Array(n.width).fill(0).map((c,h)=>{const d=i.nodeAt(n.map[h]);return hp.type(t).createAndFill({alignment:d?.attrs.alignment})});return e.insert(o,Yu.type(t).create(null,u)),e}function eq(t){const e=ap(t.$from);if(!e)return;const n=bt.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=e.node.nodeAt(r),s=r+e.start;return{pos:s,start:s+1,node:i}})}function tq(t){const e=eq(t.selection);if(e&&e[0]){const n=t.doc.resolve(e[0].pos),r=e[e.length-1];if(r){const i=t.doc.resolve(r.pos);return TO(t.setSelection(new Rt(i,n)))}}return t}var ok=Ue("GoToPrevTableCell",()=>()=>SD(-1));Fe(ok,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});var lk=Ue("GoToNextTableCell",()=>()=>SD(1));Fe(lk,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});var uk=Ue("ExitTable",t=>()=>(e,n)=>{if(!oi(e))return!1;const{$head:r}=e.selection,i=GB(r,_s.type(t));if(!i)return!1;const{to:s}=i,o=e.tr.replaceWith(s,s,Ui.type(t).createAndFill());return o.setSelection(Ve.near(o.doc.resolve(s),1)).scrollIntoView(),n?.(o),!0});Fe(uk,{displayName:"Command<breakTableCommand>",group:"Table"});var ck=Ue("InsertTable",t=>({row:e,col:n}={})=>(r,i)=>{const{selection:s,tr:o}=r,{from:u}=s,c=pI(t,e,n),h=o.replaceSelectionWith(c),d=Ve.findFrom(h.doc.resolve(u),1,!0);return d&&h.setSelection(d),i?.(h),!0});Fe(ck,{displayName:"Command<insertTableCommand>",group:"Table"});var gI=Ue("MoveRow",()=>({from:t,to:e,pos:n}={})=>e$({from:t??0,to:e??0,pos:n}));Fe(gI,{displayName:"Command<moveRowCommand>",group:"Table"});var yI=Ue("MoveCol",()=>({from:t,to:e,pos:n}={})=>t$({from:t??0,to:e??0,pos:n}));Fe(yI,{displayName:"Command<moveColCommand>",group:"Table"});var xI=Ue("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:r}=e;return!!n?.(XJ(t.index,t.pos)(r))});Fe(xI,{displayName:"Command<selectRowCommand>",group:"Table"});var bI=Ue("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:r}=e;return!!n?.(ZJ(t.index,t.pos)(r))});Fe(bI,{displayName:"Command<selectColCommand>",group:"Table"});var SI=Ue("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!e?.(tq(n))});Fe(SI,{displayName:"Command<selectTableCommand>",group:"Table"});var vI=Ue("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof Rt))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?Zj(t,e):i?Kj(t,e):Yj(t,e)});Fe(vI,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});var kI=Ue("AddColBefore",()=>()=>Jj);Fe(kI,{displayName:"Command<addColBeforeCommand>",group:"Table"});var CI=Ue("AddColAfter",()=>()=>qj);Fe(CI,{displayName:"Command<addColAfterCommand>",group:"Table"});var wI=Ue("AddRowBefore",t=>()=>(e,n)=>{if(!oi(e))return!1;if(n){const r=to(e);n(mI(t,e.tr,r,r.top))}return!0});Fe(wI,{displayName:"Command<addRowBeforeCommand>",group:"Table"});var EI=Ue("AddRowAfter",t=>()=>(e,n)=>{if(!oi(e))return!1;if(n){const r=to(e);n(mI(t,e.tr,r,r.bottom))}return!0});Fe(EI,{displayName:"Command<addRowAfterCommand>",group:"Table"});var AI=Ue("SetAlign",()=>(t="left")=>Qj("alignment",t));Fe(AI,{displayName:"Command<setAlignCommand>",group:"Table"});var NI=pr(t=>new Tr(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(e,n,r,i)=>{const s=e.doc.resolve(r);if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),_s.type(t)))return null;const o=pI(t,Math.max(Number(n.groups?.row??0),2),Number(n.groups?.col)),u=e.tr.replaceRangeWith(r,i,o);return u.setSelection(Ae.create(u.doc,r+3)).scrollIntoView()}));Fe(NI,{displayName:"InputRule<insertTableInputRule>",group:"Table"});var TI=cF(t=>({run:(e,n,r)=>{if(r)return e;function i(h){const d=h.childCount,g=h.lastChild?.childCount??0;if(d===0||g===0)return Ui.type(t).create();const y=h.firstChild;if(!(g>0&&y&&y.childCount===0))return h;if(d>=3){const N=h.child(1),M=[];for(let U=0;U<N.childCount;U++){const L=N.child(U);M.push(Pu.type(t).create(L.attrs,L.content,L.marks))}const j=y.type.create(y.attrs,M),P=[];for(let U=2;U<d;U++)P.push(h.child(U));return h.type.create(h.attrs,[j,...P])}const b=Array(g).fill(0).map(()=>Pu.type(t).createAndFill()),k=new H(Q.from(b),0,0),E=y.replace(0,0,k);return h.replace(0,y.nodeSize,new H(Q.from(E),0,0))}function s(h){const d=Yu.type(t),g=[];let y=[],b=!1;function k(){if(y.length===0)return;const E=fp.type(t).createAndFill(),N=_s.type(t).create(null,[E,...y]);g.push(i(N)),y=[]}return h.forEach(E=>{E.type===d?(b=!0,y.push(E)):(k(),g.push(E))}),k(),b?Q.from(g):h}function o(h){let d=s(h),g=d!==h;const y=[];return d.forEach(b=>{if(b.type===_s.type(t)){const k=i(b);k!==b&&(g=!0),y.push(k)}else if(b.childCount>0){const k=o(b.content);k!==b.content?(g=!0,y.push(b.copy(k))):y.push(b)}else y.push(b)}),g?Q.from(y):h}function u(h){const d=[],g=[];h.forEach(y=>g.push(y));for(let y=0;y<g.length;y++){const b=g[y],k=g[y+1];b.type===Ui.type(t)&&b.content.size===0&&k&&k.type===_s.type(t)||d.push(b)}return d.length<g.length?Q.from(d):h}let c=o(e.content);return c=u(c),new H(Q.from(c),e.openStart,e.openEnd)}}));Fe(TI,{displayName:"PasteRule<table>",group:"Table"});var fk=Mr("tableKeymap",{NextCell:{priority:100,shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(xt);return()=>e.call(lk.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(xt);return()=>e.call(ok.key)}},ExitTable:{shortcuts:["Mod-Enter","Enter"],command:t=>{const e=t.get(xt);return()=>e.call(uk.key)}}});Fe(fk.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Fe(fk.shortcuts,{displayName:"Keymap<table>",group:"Table"});var ux="footnote_definition",KN="footnoteDefinition",hk=en("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`dl[data-type="${ux}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Ki(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":ux},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===KN,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===ux,runner:(t,e)=>{t.openNode(KN,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Fe(hk.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Fe(hk.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});var cx="footnote_reference",pk=en("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`sup[data-type="${cx}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Ki(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":cx},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===cx,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Fe(pk.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Fe(pk.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});var dk=Us.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,checked:{default:null,validate:"boolean|null"}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw Ki(r);return{label:r.dataset.label,listType:r.dataset.listType,spread:r.dataset.spread,checked:r.dataset.checked?r.dataset.checked==="true":null}}},...n?.parseDOM||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,s)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,s);return}const o=i.label!=null?`${i.label}.`:"•",u=i.checked!=null?!!i.checked:null,c=i.label!=null?"ordered":"bullet",h=i.spread!=null?`${i.spread}`:"true";r.openNode(s,{label:o,listType:c,spread:h,checked:u}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const s=i.attrs.label,o=i.attrs.listType,u=i.attrs.spread==="true",c=i.attrs.checked;r.openNode("listItem",void 0,{label:s,listType:o,spread:u,checked:c}),r.next(i.content),r.closeNode()}}}});Fe(dk.node,{displayName:"NodeSchema<taskListItem>",group:"ListItem"});Fe(dk.ctx,{displayName:"NodeSchemaCtx<taskListItem>",group:"ListItem"});var MI=pr(()=>new Tr(/^\[(?<checked>\s|x)\]\s$/,(t,e,n,r)=>{const i=t.doc.resolve(n);let s=0,o=i.node(s);for(;o&&o.type.name!=="list_item";)s--,o=i.node(s);if(!o||o.attrs.checked!=null)return null;const u=e.groups?.checked==="x",c=i.before(s),h=t.tr;return h.deleteRange(n,r).setNodeMarkup(c,void 0,{...o.attrs,checked:u}),h}));Fe(MI,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});var nq=[ak,fk].flat(),rq=[NI,MI],iq=[hI],sq=[TI],OI=$s(()=>SU);Fe(OI,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});var aq=$s(()=>f$({}));Fe(aq,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});var RI=$s(()=>v$({allowTableNodeSelection:!0}));Fe(RI,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});var mk=Ni("remarkGFM",()=>WJ);Fe(mk.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Fe(mk.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});var oq=new hr("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function lq(t,e){let n=0;return e.forEach((r,i,s)=>{r===t&&(n=s)}),n}var DI=$s(()=>new fr({key:oq,appendTransaction:(t,e,n)=>{let r;const i=(s,o)=>{if(r||(r=n.tr),s.type.name!=="table_cell")return;const u=n.doc.resolve(o),c=u.node(u.depth),h=u.node(u.depth-1).firstChild;if(!h)return;const d=lq(s,c),g=h.maybeChild(d);if(!g)return;const y=g.attrs.alignment;y!==s.attrs.alignment&&r.setNodeMarkup(o,void 0,{...s.attrs,alignment:y})};return e.doc!==n.doc&&n.doc.descendants(i),r}}));Fe(DI,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});var uq=[DI,OI,mk,RI].flat(),cq=[dk,_s,fp,Yu,Pu,hp,hk,pk,sk,up].flat(),fq=[lk,ok,uk,ck,gI,yI,xI,bI,SI,vI,wI,EI,kI,CI,AI,Hg],II=[cq,rq,sq,iq,nq,fq,uq].flat();const gk={display:"flex",gap:6,alignItems:"center",padding:6,border:"1px solid #d4d4d8",borderRadius:6,background:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",marginTop:6},eg={flex:1,border:"1px solid #d4d4d8",borderRadius:4,padding:"4px 8px",font:"inherit",outline:"none",minWidth:0},_h={border:"1px solid #d4d4d8",background:"#fff",borderRadius:4,padding:"4px 8px",font:"inherit",fontSize:12,cursor:"pointer",color:"#3f3f46",whiteSpace:"nowrap"},hq=gk,pq=eg,fx=_h;function dq({initialUrl:t,isEdit:e,onApply:n,onRemove:r,onClose:i}){const[s,o]=ae.useState(t),u=()=>{const c=s.trim();c!==""&&n(c)};return I.jsxs("div",{style:hq,"data-mdx-action":"link",onMouseDown:c=>c.stopPropagation(),children:[I.jsx("input",{style:pq,autoFocus:!0,placeholder:"https://…",value:s,onChange:c=>o(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),u()),c.key==="Escape"&&i()}}),I.jsx("button",{type:"button",style:{...fx,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},onMouseDown:c=>c.preventDefault(),onClick:u,children:e?"Update":"Add"}),e&&r?I.jsx("button",{type:"button",style:{...fx,color:"#dc2626"},onMouseDown:c=>c.preventDefault(),onClick:r,children:"Remove"}):null,I.jsx("button",{type:"button",style:fx,onMouseDown:c=>c.preventDefault(),onClick:i,children:"Cancel"})]})}const mq={...gk,flexWrap:"wrap"},GN={fontSize:11,color:"#71717a",whiteSpace:"nowrap"};function gq({initialAlt:t,onApply:e,onClose:n}){const[r,i]=ae.useState(t),[s,o]=ae.useState(""),u=()=>e(r.trim(),s.trim()),c=h=>{h.key==="Enter"&&(h.preventDefault(),u()),h.key==="Escape"&&n()};return I.jsxs("div",{style:mq,"data-mdx-action":"image",onMouseDown:h=>h.stopPropagation(),children:[I.jsx("span",{style:GN,children:"Alt"}),I.jsx("input",{style:eg,autoFocus:!0,placeholder:"Alt text for screen readers",value:r,onChange:h=>i(h.currentTarget.value),onKeyDown:c}),I.jsx("span",{style:GN,children:"Caption"}),I.jsx("input",{style:eg,placeholder:"Caption / source (optional)",value:s,onChange:h=>o(h.currentTarget.value),onKeyDown:c}),I.jsx("button",{type:"button",style:{..._h,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},onMouseDown:h=>h.preventDefault(),onClick:u,children:"Insert"}),I.jsx("button",{type:"button",style:_h,onMouseDown:h=>h.preventDefault(),onClick:n,children:"Cancel"})]})}function YN(t){return typeof t!="object"||t===null?!1:"status"in t&&t.status===501||"code"in t&&t.code==="unsupported"}const QN=new Set(["image/svg+xml","image/x-icon"]),yq=[{value:"all",label:"All"},{value:"photo",label:"Photos"},{value:"graphic",label:"Graphics"},{value:"document",label:"Documents"}];function xq(t,e){return e==="all"?!0:e==="photo"?t.startsWith("image/")&&!QN.has(t):e==="graphic"?QN.has(t):e==="document"?t==="application/pdf":!0}const bq={position:"fixed",inset:0,background:"rgba(0,0,0,0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1100},Sq={width:"min(760px, 94vw)",maxHeight:"82vh",display:"flex",flexDirection:"column",background:"#fff",border:"1px solid #d4d4d8",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.28)",overflow:"hidden",fontSize:13,color:"#27272a"},vq={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid #ececed"},kq={display:"flex",flexDirection:"column",gap:10,padding:"12px 16px",borderBottom:"1px solid #ececed"},Wc={display:"flex",alignItems:"center",gap:8},WN={flex:1,border:"1px solid #d4d4d8",borderRadius:6,padding:"6px 10px",font:"inherit",outline:"none"},Au={border:"1px solid #d4d4d8",background:"#fff",borderRadius:6,padding:"6px 12px",font:"inherit",cursor:"pointer",color:"#3f3f46",whiteSpace:"nowrap"},XN={...Au,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},Cq={display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:10,padding:16,overflowY:"auto"},ZN={position:"relative",aspectRatio:"1 / 1",border:"1px solid #e4e4e7",borderRadius:8,overflow:"hidden",cursor:"pointer",background:"#fafafa",padding:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},wq={position:"absolute",left:0,right:0,bottom:0,padding:"4px 6px",fontSize:11,color:"#fff",background:"linear-gradient(to top, rgba(0,0,0,0.65), transparent)",textAlign:"left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};function _I({media:t,context:e,field:n,accept:r="image/*,application/pdf",onSelect:i,onClose:s}){const[o,u]=ae.useState([]),[c,h]=ae.useState([]),[d,g]=ae.useState(""),[y,b]=ae.useState(""),[k,E]=ae.useState("all"),[N,M]=ae.useState(!1),[j,P]=ae.useState(!1),[U,L]=ae.useState(!1),[C,z]=ae.useState(null),[G,J]=ae.useState(!1),[K,de]=ae.useState(""),ce=ae.useRef(null),Se=ae.useMemo(()=>async D=>{M(!0),z(null);try{const F=await t.listMedia({folder:D||void 0});u(F.items),h(F.folders)}catch(F){YN(F)?P(!0):z(F instanceof Error?F.message:"Failed to load media")}finally{M(!1)}},[t]);ae.useEffect(()=>{Se(d)},[Se,d]);const Re=D=>{b(""),g(D)},Y=async D=>{L(!0),z(null);try{const F=await t.uploadMedia(D,{...e,field:n,folder:d||void 0});if(F.success&&F.url){if(F.url.startsWith("./")){i(F.url,F.annotation??"");return}const ee={id:F.id??F.url,url:F.url,filename:F.filename??D.name,annotation:F.annotation,contentType:D.type||"application/octet-stream",folder:d||void 0};u(V=>[ee,...V])}else z(F.error??"Upload failed")}catch(F){YN(F)?P(!0):z(F instanceof Error?F.message:"Upload failed")}finally{L(!1)}},W=async()=>{const D=K.trim();if(!D||!t.createFolder)return;if(/[/\\:*?"<>|]/.test(D)){z("Invalid folder name");return}const F=d?`${d}/${D}`:D;try{const ee=await t.createFolder(F);ee.success?h(V=>[...V,{name:D,path:F}].sort((be,De)=>be.name.localeCompare(De.name))):z(ee.error??"Failed to create folder")}catch(ee){z(ee instanceof Error?ee.message:"Failed to create folder")}de(""),J(!1)},ue=ae.useMemo(()=>{const D=k==="all"?o:o.filter(ee=>xq(ee.contentType,k)),F=y.trim().toLowerCase();return F===""?D:D.filter(ee=>ee.filename.toLowerCase().includes(F))},[o,k,y]),ke=ae.useMemo(()=>{if(!d)return[];const D=d.split("/");return D.map((F,ee)=>({name:F,path:D.slice(0,ee+1).join("/")}))},[d]),ze=!y&&k==="all";return I.jsx("div",{style:bq,onMouseDown:s,"data-cms-ui":"",children:I.jsxs("div",{style:Sq,onMouseDown:D=>D.stopPropagation(),onDrop:D=>{D.preventDefault();const F=D.dataTransfer.files[0];F&&Y(F)},onDragOver:D=>D.preventDefault(),children:[I.jsxs("div",{style:vq,children:[I.jsx("strong",{style:{fontSize:15},children:"Media Library"}),I.jsx("button",{type:"button",style:{...Au,border:"none",fontSize:18,lineHeight:1,padding:2},onClick:s,"aria-label":"Close",children:"×"})]}),I.jsxs("div",{style:kq,children:[ke.length>0?I.jsxs("div",{style:{...Wc,gap:4,fontSize:12,color:"#71717a"},children:[I.jsx("button",{type:"button",style:{...Au,border:"none",padding:"0 2px"},onClick:()=>Re(""),children:"root"}),ke.map((D,F)=>I.jsxs("span",{style:Wc,children:[I.jsx("span",{children:"/"}),F===ke.length-1?I.jsx("span",{style:{color:"#27272a",fontWeight:600},children:D.name}):I.jsx("button",{type:"button",style:{...Au,border:"none",padding:"0 2px"},onClick:()=>Re(D.path),children:D.name})]},D.path))]}):null,I.jsxs("div",{style:Wc,children:[I.jsx("input",{style:WN,placeholder:"Search files…",value:y,onChange:D=>b(D.target.value)}),t.createFolder?I.jsx("button",{type:"button",style:Au,onClick:()=>J(D=>!D),children:"New folder"}):null,I.jsx("button",{type:"button",style:XN,disabled:j||U,onClick:()=>ce.current?.click(),children:U?"Uploading…":"Upload"}),I.jsx("input",{ref:ce,type:"file",accept:r,style:{display:"none"},onChange:D=>{const F=D.target.files?.[0];F&&Y(F),D.target.value=""}})]}),I.jsx("div",{style:{...Wc,gap:4},children:yq.map(D=>I.jsx("button",{type:"button",style:{...Au,padding:"3px 10px",fontSize:12,...k===D.value?{background:"#2563eb",borderColor:"#2563eb",color:"#fff"}:{}},onClick:()=>E(D.value),children:D.label},D.value))}),G&&t.createFolder?I.jsxs("div",{style:Wc,children:[I.jsx("input",{style:WN,autoFocus:!0,placeholder:"Folder name…",value:K,onChange:D=>de(D.target.value),onKeyDown:D=>{D.key==="Enter"&&W(),D.key==="Escape"&&(J(!1),de(""))}}),I.jsx("button",{type:"button",style:XN,onClick:()=>{W()},children:"Create"})]}):null,j?I.jsx("div",{style:{fontSize:12,color:"#a16207"},children:"Media uploads are not configured for this project."}):null,C?I.jsx("div",{style:{fontSize:12,color:"#dc2626"},children:C}):null]}),N?I.jsx("div",{style:{padding:32,textAlign:"center",color:"#a1a1aa"},children:"Loading…"}):c.length===0&&ue.length===0?I.jsx("div",{style:{padding:32,textAlign:"center",color:"#a1a1aa"},children:y||k!=="all"?"No matching files.":"No files yet. Upload one to get started."}):I.jsxs("div",{style:Cq,children:[ze?c.map(D=>I.jsxs("button",{type:"button",style:ZN,onClick:()=>Re(D.path),title:D.name,children:[I.jsx("span",{style:{fontSize:30},children:"📁"}),I.jsx("span",{style:{fontSize:12,color:"#52525b",maxWidth:"90%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:D.name})]},D.path)):null,ue.map(D=>I.jsxs("button",{type:"button",style:ZN,title:D.filename,onClick:()=>i(D.url,D.annotation||D.filename||"Image"),children:[D.contentType.startsWith("image/")?I.jsx("img",{src:D.url,alt:D.annotation||D.filename,style:{width:"100%",height:"100%",objectFit:"cover"}}):I.jsx("span",{style:{fontSize:30},children:D.contentType==="application/pdf"?"📄":"📎"}),I.jsx("span",{style:wq,children:D.filename})]},D.id))]}),I.jsxs("div",{style:{padding:"10px 16px",borderTop:"1px solid #ececed",fontSize:12,color:"#a1a1aa",textAlign:"center"},children:["Drag and drop a file here to upload",d?` to ${d}`:"","."]})]})})}const rS={bold:!1,italic:!1,strikethrough:!1,link:!1,linkHref:null,bulletList:!1,orderedList:!1,listStyle:null,blockquote:!1,heading:null};function Eq(t){const{state:e}=t,{$from:n,from:r,to:i}=e.selection;let s=!1,o=!1,u=!1,c=!1,h=null;const d=e.storedMarks||n.marks();for(const N of d)N.type.name==="strong"&&(s=!0),N.type.name==="emphasis"&&(o=!0),N.type.name==="strike_through"&&(u=!0),N.type.name==="link"&&(c=!0,h=typeof N.attrs.href=="string"?N.attrs.href:null);r!==i&&e.doc.nodesBetween(r,i,N=>{for(const M of N.marks)M.type.name==="strong"&&(s=!0),M.type.name==="emphasis"&&(o=!0),M.type.name==="strike_through"&&(u=!0),M.type.name==="link"&&(c=!0,h=typeof M.attrs.href=="string"?M.attrs.href:null)});let g=!1,y=!1,b=null,k=!1,E=null;for(let N=n.depth;N>0;N--){const M=n.node(N);(M.type.name==="bullet_list"||M.type.name==="ordered_list")&&(M.type.name==="bullet_list"&&(g=!0),M.type.name==="ordered_list"&&(y=!0),b===null&&(b=typeof M.attrs.listStyle=="string"?M.attrs.listStyle:null)),M.type.name==="blockquote"&&(k=!0)}if(n.parent.type.name==="heading"){const N=n.parent.attrs.level;E=typeof N=="number"?N:null}return{bold:s,italic:o,strikethrough:u,link:c,linkHref:h,bulletList:g,orderedList:y,listStyle:b,blockquote:k,heading:E}}function Aq(t,e){const{$from:n}=t.state.selection;for(let r=n.depth;r>0;r--)if(n.node(r).type.name===e)return!0;return!1}function Nq(t,e){const{state:n}=t,r=n.schema.nodes.heading,i=n.schema.nodes.paragraph;if(!r||!i)return;const{$from:s}=n.selection,o=s.parent.type.name==="heading"&&s.parent.attrs.level===e,u=o?i:r,c=o?void 0:{level:e},h=s.before(s.depth),d=n.selection.$to.after(n.selection.$to.depth);t.dispatch(n.tr.setBlockType(h,d,u,c)),t.focus()}function Tq(t){const{state:e}=t,{from:n,to:r}=e.selection,i=e.schema.marks.link;if(!i)return;let s=n,o=r;e.doc.nodesBetween(n,n===r?r+1:r,(u,c)=>{if(i.isInSet(u.marks))return s=c,o=c+u.nodeSize,!1}),t.dispatch(e.tr.removeMark(s,o,i))}function Mq(t,e){return t.bold===e.bold&&t.italic===e.italic&&t.strikethrough===e.strikethrough&&t.link===e.link&&t.linkHref===e.linkHref&&t.bulletList===e.bulletList&&t.orderedList===e.orderedList&&t.listStyle===e.listStyle&&t.blockquote===e.blockquote&&t.heading===e.heading}function Oq(t,e){let n=0,r=rS;const i=()=>{const u=t.ctx.get(gn),c=Eq(u);Mq(c,r)||(r=c,e(c))},s=t.ctx.get(gn),o=s.dispatch.bind(s);return s.dispatch=u=>{o(u),(u.selectionSet||u.docChanged)&&(cancelAnimationFrame(n),n=requestAnimationFrame(i))},i(),()=>{cancelAnimationFrame(n)}}const Rq=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],eT={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function zI(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function Dq(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function Iq(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function tT(t){return Iq(t)||zI(t)}const _q=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Kg(t,e){const n=e||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,o=-1,u="",c,h;n.position&&("start"in n.position||"indent"in n.position?(h=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,g=(c?c.column:0)||1,y=k(),b;for(s--;++s<=t.length;)if(b===10&&(g=(h?h[o]:0)||1),b=t.charCodeAt(s),b===38){const M=t.charCodeAt(s+1);if(M===9||M===10||M===12||M===32||M===38||M===60||Number.isNaN(M)||r&&M===r){u+=String.fromCharCode(b),g++;continue}const j=s+1;let P=j,U=j,L;if(M===35){U=++P;const Se=t.charCodeAt(U);Se===88||Se===120?(L="hexadecimal",U=++P):L="decimal"}else L="named";let C="",z="",G="";const J=L==="named"?tT:L==="decimal"?zI:Dq;for(U--;++U<=t.length;){const Se=t.charCodeAt(U);if(!J(Se))break;G+=String.fromCharCode(Se),L==="named"&&Rq.includes(G)&&(C=G,z=fh(G))}let K=t.charCodeAt(U)===59;if(K){U++;const Se=L==="named"?fh(G):!1;Se&&(C=G,z=Se)}let de=1+U-j,ce="";if(!(!K&&n.nonTerminated===!1))if(!G)L!=="named"&&E(4,de);else if(L==="named"){if(K&&!z)E(5,1);else if(C!==G&&(U=P+C.length,de=1+U-P,K=!1),!K){const Se=C?1:3;if(n.attribute){const Re=t.charCodeAt(U);Re===61?(E(Se,de),z=""):tT(Re)?z="":E(Se,de)}else E(Se,de)}ce=z}else{K||E(2,de);let Se=Number.parseInt(G,L==="hexadecimal"?16:10);if(zq(Se))E(7,de),ce="�";else if(Se in eT)E(6,de),ce=eT[Se];else{let Re="";Lq(Se)&&E(6,de),Se>65535&&(Se-=65536,Re+=String.fromCharCode(Se>>>10|55296),Se=56320|Se&1023),ce=Re+String.fromCharCode(Se)}}if(ce){N(),y=k(),s=U-1,g+=U-j+1,i.push(ce);const Se=k();Se.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,ce,{start:y,end:Se},t.slice(j-1,U)),y=Se}else G=t.slice(j-1,U),u+=G,g+=G.length,s=U-1}else b===10&&(d++,o++,g=0),Number.isNaN(b)?N():(u+=String.fromCharCode(b),g++);return i.join("");function k(){return{line:d,column:g,offset:s+((c?c.offset:0)||0)}}function E(M,j){let P;n.warning&&(P=k(),P.column+=j,P.offset+=j,n.warning.call(n.warningContext||void 0,_q[M],P,M))}function N(){u&&(i.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:y,end:k()}),u="")}}function zq(t){return t>=55296&&t<=57343||t>1114111}function Lq(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const Bq=/["&'<>`]/g,Vq=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fq=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pq=/[|\\{}()[\]^$+*?.]/g,nT=new WeakMap;function jq(t,e){if(t=t.replace(e.subset?$q(e.subset):Bq,r),e.subset||e.escapeOnly)return t;return t.replace(Vq,n).replace(Fq,r);function n(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function $q(t){let e=nT.get(t);return e||(e=Uq(t),nT.set(t,e)),e}function Uq(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Pq,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function Jq(t){return"&#x"+t.toString(16).toUpperCase()+";"}function qq(t,e){return jq(t,Object.assign({format:Jq},e))}function Hq(){return{canContainEols:["textDirective"],enter:{directiveContainer:Kq,directiveContainerAttributes:px,directiveContainerLabel:Qq,directiveLeaf:Gq,directiveLeafAttributes:px,directiveText:Yq,directiveTextAttributes:px},exit:{directiveContainer:bx,directiveContainerAttributeClassValue:mx,directiveContainerAttributeIdValue:dx,directiveContainerAttributeName:yx,directiveContainerAttributeValue:gx,directiveContainerAttributes:xx,directiveContainerLabel:Wq,directiveContainerName:hx,directiveLeaf:bx,directiveLeafAttributeClassValue:mx,directiveLeafAttributeIdValue:dx,directiveLeafAttributeName:yx,directiveLeafAttributeValue:gx,directiveLeafAttributes:xx,directiveLeafName:hx,directiveText:bx,directiveTextAttributeClassValue:mx,directiveTextAttributeIdValue:dx,directiveTextAttributeName:yx,directiveTextAttributeValue:gx,directiveTextAttributes:xx,directiveTextName:hx}}}function Kq(t){yk.call(this,"containerDirective",t)}function Gq(t){yk.call(this,"leafDirective",t)}function Yq(t){yk.call(this,"textDirective",t)}function yk(t,e){this.enter({type:t,name:"",attributes:{},children:[]},e)}function hx(t){const e=this.stack[this.stack.length-1];e.type==="containerDirective"||e.type==="leafDirective"||e.type,e.name=this.sliceSerialize(t)}function Qq(t){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},t)}function Wq(t){this.exit(t)}function px(){this.data.directiveAttributes=[],this.buffer()}function dx(t){this.data.directiveAttributes.push(["id",Kg(this.sliceSerialize(t),{attribute:!0})])}function mx(t){this.data.directiveAttributes.push(["class",Kg(this.sliceSerialize(t),{attribute:!0})])}function gx(t){const e=this.data.directiveAttributes;e[e.length-1][1]=Kg(this.sliceSerialize(t),{attribute:!0})}function yx(t){this.data.directiveAttributes.push([this.sliceSerialize(t),""])}function xx(){const t=this.data.directiveAttributes,e={};let n=-1;for(;++n<t.length;){const i=t[n];i[0]==="class"&&e.class?e.class+=" "+i[1]:e[i[0]]=i[1]}this.data.directiveAttributes=void 0,this.resume();const r=this.stack[this.stack.length-1];r.type==="containerDirective"||r.type==="leafDirective"||r.type,r.attributes=e}function bx(t){this.exit(t)}function xk(t,e,n,r,i,s,o,u,c,h,d,g,y,b,k){let E,N;return M;function M(Y){return t.enter(r),t.enter(i),t.consume(Y),t.exit(i),j}function j(Y){return Y===35?(E=o,P(Y)):Y===46?(E=u,P(Y)):Y===58||Y===95||sn(Y)?(t.enter(s),t.enter(c),t.consume(Y),C):k&&qe(Y)?He(t,j,"whitespace")(Y):!k&&We(Y)?Ts(t,j)(Y):Re(Y)}function P(Y){const W=E+"Marker";return t.enter(s),t.enter(E),t.enter(W),t.consume(Y),t.exit(W),U}function U(Y){if(Y===null||Y===34||Y===35||Y===39||Y===46||Y===60||Y===61||Y===62||Y===96||Y===125||We(Y))return n(Y);const W=E+"Value";return t.enter(W),t.consume(Y),L}function L(Y){if(Y===null||Y===34||Y===39||Y===60||Y===61||Y===62||Y===96)return n(Y);if(Y===35||Y===46||Y===125||We(Y)){const W=E+"Value";return t.exit(W),t.exit(E),t.exit(s),j(Y)}return t.consume(Y),L}function C(Y){return Y===45||Y===46||Y===58||Y===95||vn(Y)?(t.consume(Y),C):(t.exit(c),k&&qe(Y)?He(t,z,"whitespace")(Y):!k&&We(Y)?Ts(t,z)(Y):z(Y))}function z(Y){return Y===61?(t.enter(h),t.consume(Y),t.exit(h),G):(t.exit(s),j(Y))}function G(Y){return Y===null||Y===60||Y===61||Y===62||Y===96||Y===125||k&&Ce(Y)?n(Y):Y===34||Y===39?(t.enter(d),t.enter(y),t.consume(Y),t.exit(y),N=Y,K):k&&qe(Y)?He(t,G,"whitespace")(Y):!k&&We(Y)?Ts(t,G)(Y):(t.enter(g),t.enter(b),t.consume(Y),N=void 0,J)}function J(Y){return Y===null||Y===34||Y===39||Y===60||Y===61||Y===62||Y===96?n(Y):Y===125||We(Y)?(t.exit(b),t.exit(g),t.exit(s),j(Y)):(t.consume(Y),J)}function K(Y){return Y===N?(t.enter(y),t.consume(Y),t.exit(y),t.exit(d),t.exit(s),Se):(t.enter(g),de(Y))}function de(Y){return Y===N?(t.exit(g),K(Y)):Y===null?n(Y):Ce(Y)?k?n(Y):Ts(t,de)(Y):(t.enter(b),t.consume(Y),ce)}function ce(Y){return Y===N||Y===null||Ce(Y)?(t.exit(b),de(Y)):(t.consume(Y),ce)}function Se(Y){return Y===125||We(Y)?j(Y):Re(Y)}function Re(Y){return Y===125?(t.enter(i),t.consume(Y),t.exit(i),t.exit(r),e):n(Y)}}function bk(t,e,n,r,i,s,o){let u=0,c=0,h;return d;function d(N){return t.enter(r),t.enter(i),t.consume(N),t.exit(i),g}function g(N){return N===93?(t.enter(i),t.consume(N),t.exit(i),t.exit(r),e):(t.enter(s),y(N))}function y(N){if(N===93&&!c)return E(N);const M=t.enter("chunkText",{contentType:"text",previous:h});return h&&(h.next=M),h=M,b(N)}function b(N){return N===null||u>999||N===91&&++c>32?n(N):N===93&&!c--?(t.exit("chunkText"),E(N)):Ce(N)?o?n(N):(t.consume(N),t.exit("chunkText"),y):(t.consume(N),N===92?k:b)}function k(N){return N===91||N===92||N===93?(t.consume(N),u++,b):b(N)}function E(N){return t.exit(s),t.enter(i),t.consume(N),t.exit(i),t.exit(r),e}}function Sk(t,e,n,r){const i=this;return s;function s(u){return sn(u)?(t.enter(r),t.consume(u),o):n(u)}function o(u){return u===45||u===95||vn(u)?(t.consume(u),o):(t.exit(r),i.previous===45||i.previous===95?n(u):e(u))}}const Xq={tokenize:tH,concrete:!0},Zq={tokenize:nH,partial:!0},eH={tokenize:rH,partial:!0},Fd={tokenize:iH,partial:!0};function tH(t,e,n){const r=this,i=r.events[r.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let o=0,u;return c;function c(J){return t.enter("directiveContainer"),t.enter("directiveContainerFence"),t.enter("directiveContainerSequence"),h(J)}function h(J){return J===58?(t.consume(J),o++,h):o<3?n(J):(t.exit("directiveContainerSequence"),Sk.call(r,t,d,n,"directiveContainerName")(J))}function d(J){return J===91?t.attempt(Zq,g,g)(J):g(J)}function g(J){return J===123?t.attempt(eH,y,y)(J):y(J)}function y(J){return He(t,b,"whitespace")(J)}function b(J){return t.exit("directiveContainerFence"),J===null?z(J):Ce(J)?r.interrupt?e(J):t.attempt(Fd,k,z)(J):n(J)}function k(J){return J===null?z(J):Ce(J)?t.check(Fd,P,z)(J):(t.enter("directiveContainerContent"),E(J))}function E(J){return t.attempt({tokenize:G,partial:!0},C,s?He(t,N,"linePrefix",s+1):N)(J)}function N(J){return J===null?C(J):Ce(J)?t.check(Fd,j,C)(J):j(J)}function M(J){if(J===null){const K=t.exit("chunkDocument");return r.parser.lazy[K.start.line]=!1,C(J)}return Ce(J)?t.check(Fd,U,L)(J):(t.consume(J),M)}function j(J){const K=t.enter("chunkDocument",{contentType:"document",previous:u});return u&&(u.next=K),u=K,M(J)}function P(J){return t.enter("directiveContainerContent"),E(J)}function U(J){t.consume(J);const K=t.exit("chunkDocument");return r.parser.lazy[K.start.line]=!1,E}function L(J){const K=t.exit("chunkDocument");return r.parser.lazy[K.start.line]=!1,C(J)}function C(J){return t.exit("directiveContainerContent"),z(J)}function z(J){return t.exit("directiveContainer"),e(J)}function G(J,K,de){let ce=0;return He(J,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function Se(W){return J.enter("directiveContainerFence"),J.enter("directiveContainerSequence"),Re(W)}function Re(W){return W===58?(J.consume(W),ce++,Re):ce<o?de(W):(J.exit("directiveContainerSequence"),He(J,Y,"whitespace")(W))}function Y(W){return W===null||Ce(W)?(J.exit("directiveContainerFence"),K(W)):de(W)}}}function nH(t,e,n){return bk(t,e,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function rH(t,e,n){return xk(t,e,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function iH(t,e,n){const r=this;return i;function i(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}const sH={tokenize:lH},aH={tokenize:uH,partial:!0},oH={tokenize:cH,partial:!0};function lH(t,e,n){const r=this;return i;function i(d){return t.enter("directiveLeaf"),t.enter("directiveLeafSequence"),t.consume(d),s}function s(d){return d===58?(t.consume(d),t.exit("directiveLeafSequence"),Sk.call(r,t,o,n,"directiveLeafName")):n(d)}function o(d){return d===91?t.attempt(aH,u,u)(d):u(d)}function u(d){return d===123?t.attempt(oH,c,c)(d):c(d)}function c(d){return He(t,h,"whitespace")(d)}function h(d){return d===null||Ce(d)?(t.exit("directiveLeaf"),e(d)):n(d)}}function uH(t,e,n){return bk(t,e,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function cH(t,e,n){return xk(t,e,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const fH={tokenize:mH,previous:dH},hH={tokenize:gH,partial:!0},pH={tokenize:yH,partial:!0};function dH(t){return t!==58||this.events[this.events.length-1][1].type==="characterEscape"}function mH(t,e,n){const r=this;return i;function i(c){return t.enter("directiveText"),t.enter("directiveTextMarker"),t.consume(c),t.exit("directiveTextMarker"),Sk.call(r,t,s,n,"directiveTextName")}function s(c){return c===58?n(c):c===91?t.attempt(hH,o,o)(c):o(c)}function o(c){return c===123?t.attempt(pH,u,u)(c):u(c)}function u(c){return t.exit("directiveText"),e(c)}}function gH(t,e,n){return bk(t,e,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function yH(t,e,n){return xk(t,e,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function xH(){return{text:{58:fH},flow:{58:[Xq,sH]}}}const tg="youtube";function bH(t){if(!t||typeof t!="object")return"";const e=Object.entries(t),n=t.id;if(typeof n=="string"&&n)return n;for(const[r,i]of e)if(i===""||i==null)return r;return""}const LI=Ju("youtube",()=>({group:"block",atom:!0,isolating:!0,selectable:!0,draggable:!1,attrs:{videoId:{default:""}},toDOM:t=>{const e=document.createElement("div");return e.setAttribute("data-youtube",t.attrs.videoId),e.className="youtube-block",e},parseDOM:[{tag:"div[data-youtube]",getAttrs:t=>({videoId:t.getAttribute("data-youtube")||""})}],parseMarkdown:{match:t=>(t.type==="leafDirective"||t.type==="containerDirective"||t.type==="textDirective")&&t.name===tg,runner:(t,e,n)=>{const r=bH(e.attributes);t.addNode(n,{videoId:r})}},toMarkdown:{match:t=>t.type.name==="youtube",runner:(t,e)=>{t.addNode("leafDirective",void 0,void 0,{name:tg,attributes:{id:e.attrs.videoId}})}}}));function SH(t){const e=t.attributes,n=e&&typeof e=="object"?String(e.id??""):"";return`::${tg}{#${n}}`}const vH=function(){const t=this.data("toMarkdownExtensions")??[],e={handlers:{leafDirective:SH}};t.push(e),this.data("toMarkdownExtensions",t)},kH=Ni("remarkYoutubeDirective",()=>vH),BI=Ue("insertYoutube",()=>t=>(e,n)=>{if(!t)return!1;const r=e.schema.nodes.youtube;if(!r)return!1;const i=r.create({videoId:t});return n&&n(e.tr.replaceSelectionWith(i).scrollIntoView()),!0}),iS="list",CH=/^[A-Za-z0-9_-]+$/,wH=new Set(["textDirective","leafDirective","containerDirective"]);function Pi(t){if(typeof t!="string")return null;const[e]=t.trim().split(/\s+/);return!e||!CH.test(e)?null:e}function zs(t){return Array.isArray(t?.children)?t.children:null}function Sx(t){const e=zs(t);return e&&e.length>0?e[e.length-1]:void 0}function VI(t){return!t.attributes||typeof t.attributes!="object"||Array.isArray(t.attributes)?null:t.attributes}function EH(t){return Pi(VI(t)?.class)}function FI(t,e){const n=zs(t);if(t?.type!=="paragraph"||n?.length!==1)return!1;const r=n[0];return r?.type!=="text"||typeof r.value!="string"?!1:e===void 0?!0:r.value===e}function AH(t){if(!FI(t))return null;const e=zs(t)?.[0];return typeof e?.value!="string"?null:/^:::list\{\.([A-Za-z0-9_-]+)\}$/.exec(e.value)?.[1]??null}function rT(t){return t?.type==="list"}function NH(t,e,n){if(FI(e[n],":::"))return e.splice(n,1),!0;const r=Sx(t),i=Sx(r);if(!i||i.type!=="paragraph")return!1;const s=zs(i),o=Sx(i);if(!s||o?.type!=="text"||typeof o.value!="string")return!1;if(o.value===":::")s.pop();else if(o.value.endsWith(`
|
|
57
|
+
`))}function c(b,k,E,N){const M=E.enter("tableCell"),j=E.enter("phrasing"),P=E.containerPhrasing(b,{...N,before:s,after:s});return j(),M(),P}function h(b,k){return rJ(b,{align:k,alignDelimiters:r,padding:n,stringLength:i})}function d(b,k,E){const N=b.children;let M=-1;const j=[],P=k.enter("table");for(;++M<N.length;)j[M]=g(N[M],k,E);return P(),j}function g(b,k,E){const N=b.children;let M=-1;const j=[],P=k.enter("tableRow");for(;++M<N.length;)j[M]=c(N[M],b,k,E);return P(),j}function y(b,k,E){let N=xS.inlineCode(b,k,E);return E.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function hJ(){return{exit:{taskListCheckValueChecked:qN,taskListCheckValueUnchecked:qN,paragraph:dJ}}}function pJ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mJ}}}function qN(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function dJ(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,o;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){o=u;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function mJ(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",o="["+(t.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(o);let c=xS.listItem(t,e,n,{...r,...u.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(d){return d+o}}function gJ(){return[AU(),KU(),WU(),sJ(),hJ()]}function yJ(t){return{extensions:[NU(),GU(t),XU(),fJ(t),pJ()]}}const xJ={tokenize:wJ,partial:!0},iI={tokenize:EJ,partial:!0},sI={tokenize:AJ,partial:!0},aI={tokenize:NJ,partial:!0},bJ={tokenize:TJ,partial:!0},oI={name:"wwwAutolink",tokenize:kJ,previous:uI},lI={name:"protocolAutolink",tokenize:CJ,previous:cI},Hs={name:"emailAutolink",tokenize:vJ,previous:fI},Qi={};function SJ(){return{text:Qi}}let Eo=48;for(;Eo<123;)Qi[Eo]=Hs,Eo++,Eo===58?Eo=65:Eo===91&&(Eo=97);Qi[43]=Hs;Qi[45]=Hs;Qi[46]=Hs;Qi[95]=Hs;Qi[72]=[Hs,lI];Qi[104]=[Hs,lI];Qi[87]=[Hs,oI];Qi[119]=[Hs,oI];function vJ(t,e,n){const r=this;let i,s;return o;function o(g){return!nS(g)||!fI.call(r,r.previous)||ik(r.events)?n(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),u(g))}function u(g){return nS(g)?(t.consume(g),u):g===64?(t.consume(g),c):n(g)}function c(g){return g===46?t.check(bJ,d,h)(g):g===45||g===95||vn(g)?(s=!0,t.consume(g),c):d(g)}function h(g){return t.consume(g),i=!0,c}function d(g){return s&&i&&sn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(g)):n(g)}}function kJ(t,e,n){const r=this;return i;function i(o){return o!==87&&o!==119||!uI.call(r,r.previous)||ik(r.events)?n(o):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(xJ,t.attempt(iI,t.attempt(sI,s),n),n)(o))}function s(o){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(o)}}function CJ(t,e,n){const r=this;let i="",s=!1;return o;function o(g){return(g===72||g===104)&&cI.call(r,r.previous)&&!ik(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(g),t.consume(g),u):n(g)}function u(g){if(sn(g)&&i.length<5)return i+=String.fromCodePoint(g),t.consume(g),u;if(g===58){const y=i.toLowerCase();if(y==="http"||y==="https")return t.consume(g),c}return n(g)}function c(g){return g===47?(t.consume(g),s?h:(s=!0,c)):n(g)}function h(g){return g===null||Cm(g)||We(g)||Vn(g)||Sg(g)?n(g):t.attempt(iI,t.attempt(sI,d),n)(g)}function d(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(g)}}function wJ(t,e,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,t.consume(o),i):o===46&&r===3?(t.consume(o),s):n(o)}function s(o){return o===null?n(o):e(o)}}function EJ(t,e,n){let r,i,s;return o;function o(h){return h===46||h===95?t.check(aI,c,u)(h):h===null||We(h)||Vn(h)||h!==45&&Sg(h)?c(h):(s=!0,t.consume(h),o)}function u(h){return h===95?r=!0:(i=r,r=void 0),t.consume(h),o}function c(h){return i||r||!s?n(h):e(h)}}function AJ(t,e){let n=0,r=0;return i;function i(o){return o===40?(n++,t.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?t.check(aI,e,s)(o):o===null||We(o)||Vn(o)?e(o):(t.consume(o),i)}function s(o){return o===41&&r++,t.consume(o),i}}function NJ(t,e,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(t.consume(u),r):u===38?(t.consume(u),s):u===93?(t.consume(u),i):u===60||u===null||We(u)||Vn(u)?e(u):n(u)}function i(u){return u===null||u===40||u===91||We(u)||Vn(u)?e(u):r(u)}function s(u){return sn(u)?o(u):n(u)}function o(u){return u===59?(t.consume(u),r):sn(u)?(t.consume(u),o):n(u)}}function TJ(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return vn(s)?n(s):e(s)}}function uI(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||We(t)}function cI(t){return!sn(t)}function fI(t){return!(t===47||nS(t))}function nS(t){return t===43||t===45||t===46||t===95||vn(t)}function ik(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const MJ={tokenize:BJ,partial:!0};function OJ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_J,continuation:{tokenize:zJ},exit:LJ}},text:{91:{name:"gfmFootnoteCall",tokenize:IJ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RJ,resolveTo:DJ}}}}function RJ(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!o||!o._balanced)return n(c);const h=wi(r.sliceSerialize({start:o.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(c):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),e(c))}}function DJ(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...u),t}function IJ(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return u;function u(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),c}function c(g){return g!==94?n(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!o||g===null||g===91||We(g))return n(g);if(g===93){t.exit("chunkString");const y=t.exit("gfmFootnoteCallString");return i.includes(wi(r.sliceSerialize(y)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(g)}return We(g)||(o=!0),s++,t.consume(g),g===92?d:h}function d(g){return g===91||g===92||g===93?(t.consume(g),s++,h):h(g)}}function _J(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,u;return c;function c(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",d):n(k)}function d(k){if(o>999||k===93&&!u||k===null||k===91||We(k))return n(k);if(k===93){t.exit("chunkString");const E=t.exit("gfmFootnoteDefinitionLabelString");return s=wi(r.sliceSerialize(E)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),y}return We(k)||(u=!0),o++,t.consume(k),k===92?g:d}function g(k){return k===91||k===92||k===93?(t.consume(k),o++,d):d(k)}function y(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),i.includes(s)||i.push(s),He(t,b,"gfmFootnoteDefinitionWhitespace")):n(k)}function b(k){return e(k)}}function zJ(t,e,n){return t.check(ju,e,t.attempt(MJ,e,n))}function LJ(t){t.exit("gfmFootnoteDefinition")}function BJ(t,e,n){const r=this;return He(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):n(s)}}function VJ(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,u){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let h=c;for(;h--;)if(o[h][0]==="exit"&&o[h][1].type==="strikethroughSequenceTemporary"&&o[h][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[h][1].end.offset-o[h][1].start.offset){o[c][1].type="strikethroughSequence",o[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[h][1].start),end:Object.assign({},o[c][1].end)},g={type:"strikethroughText",start:Object.assign({},o[h][1].end),end:Object.assign({},o[c][1].start)},y=[["enter",d,u],["enter",o[h][1],u],["exit",o[h][1],u],["enter",g,u]],b=u.parser.constructs.insideSpan.null;b&&Er(y,y.length,0,vg(b,o.slice(h+1,c),u)),Er(y,y.length,0,[["exit",g,u],["enter",o[c][1],u],["exit",o[c][1],u],["exit",d,u]]),Er(o,h-1,c-h+3,y),c=h+y.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function s(o,u,c){const h=this.previous,d=this.events;let g=0;return y;function y(k){return h===126&&d[d.length-1][1].type!=="characterEscape"?c(k):(o.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const E=Iu(h);if(k===126)return g>1?c(k):(o.consume(k),g++,b);if(g<2&&!n)return c(k);const N=o.exit("strikethroughSequenceTemporary"),M=Iu(k);return N._open=!M||M===2&&!!E,N._close=!E||E===2&&!!M,u(k)}}}class FJ{constructor(){this.map=[]}add(e,n,r){PJ(this,e,n,r)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function PJ(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function jJ(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function $J(){return{flow:{null:{name:"table",tokenize:UJ,resolveAll:JJ}}}}function UJ(t,e,n){const r=this;let i=0,s=0,o;return u;function u(K){let de=r.events.length-1;for(;de>-1;){const Re=r.events[de][1].type;if(Re==="lineEnding"||Re==="linePrefix")de--;else break}const ce=de>-1?r.events[de][1].type:null,Se=ce==="tableHead"||ce==="tableRow"?C:c;return Se===C&&r.parser.lazy[r.now().line]?n(K):Se(K)}function c(K){return t.enter("tableHead"),t.enter("tableRow"),h(K)}function h(K){return K===124||(o=!0,s+=1),d(K)}function d(K){return K===null?n(K):Ce(K)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(K),t.exit("lineEnding"),b):n(K):qe(K)?He(t,d,"whitespace")(K):(s+=1,o&&(o=!1,i+=1),K===124?(t.enter("tableCellDivider"),t.consume(K),t.exit("tableCellDivider"),o=!0,d):(t.enter("data"),g(K)))}function g(K){return K===null||K===124||We(K)?(t.exit("data"),d(K)):(t.consume(K),K===92?y:g)}function y(K){return K===92||K===124?(t.consume(K),g):g(K)}function b(K){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(K):(t.enter("tableDelimiterRow"),o=!1,qe(K)?He(t,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):k(K))}function k(K){return K===45||K===58?N(K):K===124?(o=!0,t.enter("tableCellDivider"),t.consume(K),t.exit("tableCellDivider"),E):L(K)}function E(K){return qe(K)?He(t,N,"whitespace")(K):N(K)}function N(K){return K===58?(s+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(K),t.exit("tableDelimiterMarker"),M):K===45?(s+=1,M(K)):K===null||Ce(K)?U(K):L(K)}function M(K){return K===45?(t.enter("tableDelimiterFiller"),j(K)):L(K)}function j(K){return K===45?(t.consume(K),j):K===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(K),t.exit("tableDelimiterMarker"),P):(t.exit("tableDelimiterFiller"),P(K))}function P(K){return qe(K)?He(t,U,"whitespace")(K):U(K)}function U(K){return K===124?k(K):K===null||Ce(K)?!o||i!==s?L(K):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(K)):L(K)}function L(K){return n(K)}function C(K){return t.enter("tableRow"),z(K)}function z(K){return K===124?(t.enter("tableCellDivider"),t.consume(K),t.exit("tableCellDivider"),z):K===null||Ce(K)?(t.exit("tableRow"),e(K)):qe(K)?He(t,z,"whitespace")(K):(t.enter("data"),G(K))}function G(K){return K===null||K===124||We(K)?(t.exit("data"),z(K)):(t.consume(K),K===92?J:G)}function J(K){return K===92||K===124?(t.consume(K),G):G(K)}}function JJ(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],u=!1,c=0,h,d,g;const y=new FJ;for(;++n<t.length;){const b=t[n],k=b[1];b[0]==="enter"?k.type==="tableHead"?(u=!1,c!==0&&(HN(y,e,c,h,d),d=void 0,c=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,e]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],o=[0,n+1,0,0],u&&(u=!1,d={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",d,e]])),i=k.type==="tableDelimiterRow"?2:d?3:1):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],g=Vd(y,e,s,i,void 0,g),s=[0,0,0,0]),o[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],g=Vd(y,e,s,i,void 0,g)),s=o,o=[s[1],n,0,0])):k.type==="tableHead"?(u=!0,c=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(c=n,s[1]!==0?(o[0]=o[1],g=Vd(y,e,s,i,n,g)):o[1]!==0&&(g=Vd(y,e,o,i,n,g)),i=0):i&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&HN(y,e,c,h,d),y.consume(e.events),n=-1;++n<e.events.length;){const b=e.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=jJ(e.events,n))}return t}function Vd(t,e,n,r,i,s){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},Eu(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const c=Eu(e.events,n[1]);if(s={type:o,start:Object.assign({},c),end:Object.assign({},c)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const h=Eu(e.events,n[2]),d=Eu(e.events,n[3]),g={type:u,start:Object.assign({},h),end:Object.assign({},d)};if(t.add(n[2],0,[["enter",g,e]]),r!==2){const y=e.events[n[2]],b=e.events[n[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,E=n[3]-n[2]-1;t.add(k,E,[])}}t.add(n[3]+1,0,[["exit",g,e]])}return i!==void 0&&(s.end=Object.assign({},Eu(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function HN(t,e,n,r,i){const s=[],o=Eu(e.events,n);i&&(i.end=Object.assign({},o),s.push(["exit",i,e])),r.end=Object.assign({},o),s.push(["exit",r,e]),t.add(n+1,0,s)}function Eu(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const qJ={name:"tasklistCheck",tokenize:KJ};function HJ(){return{text:{91:qJ}}}function KJ(t,e,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),s)}function s(c){return We(c)?(t.enter("taskListCheckValueUnchecked"),t.consume(c),t.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(t.enter("taskListCheckValueChecked"),t.consume(c),t.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),u):n(c)}function u(c){return Ce(c)?e(c):qe(c)?t.check({tokenize:GJ},e,n)(c):n(c)}}function GJ(t,e,n){return He(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function YJ(t){return dS([SJ(),OJ(),VJ(t),$J(),HJ()])}const QJ={};function WJ(t){const e=this,n=t||QJ,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(YJ(n)),s.push(gJ()),o.push(yJ(n))}function Fe(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}var sk=Xh("strike_through");Fe(sk,{displayName:"Attr<strikethrough>",group:"Strikethrough"});var up=qu("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(sk.key)(e)],parseMarkdown:{match:e=>e.type==="delete",runner:(e,n,r)=>{e.openMark(r),e.next(n.children),e.closeMark(r)}},toMarkdown:{match:e=>e.type.name==="strike_through",runner:(e,n)=>{e.withMark(n,"delete")}}}));Fe(up.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Fe(up.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});var Hg=Ue("ToggleStrikeThrough",t=>()=>Ag(up.type(t)));Fe(Hg,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});var hI=pr(t=>Gh(new RegExp("(?<![\\w:/])(~{1,2})(.+?)\\1(?!\\w|\\/)"),up.type(t)));Fe(hI,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});var ak=Mr("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(xt);return()=>e.call(Hg.key)}}});Fe(ak.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Fe(ak.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});var cp=Aj({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),_s=en("table",()=>({...cp.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="table",runner:(t,e,n)=>{const r=e.align,i=e.children.map((s,o)=>({...s,align:r,isHeader:o===0}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table",runner:(t,e)=>{const n=e.content.firstChild?.content;if(!n)return;const r=[];n.forEach(i=>{r.push(i.attrs.alignment)}),t.openNode("table",void 0,{align:r}),t.next(e.content),t.closeNode()}}}));Fe(_s.node,{displayName:"NodeSchema<table>",group:"Table"});Fe(_s.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});var fp=en("table_header_row",()=>({...cp.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"},{tag:"tr",getAttrs:t=>t instanceof HTMLElement&&t.querySelector("th")?{}:!1}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:t=>!!(t.type==="tableRow"&&t.isHeader),runner:(t,e,n)=>{const r=e.align,i=e.children.map((s,o)=>({...s,align:r[o],isHeader:e.isHeader}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header_row",runner:(t,e)=>{e.content.size!==0&&(t.openNode("tableRow",void 0,{isHeader:!0}),t.next(e.content),t.closeNode())}}}));Fe(fp.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Fe(fp.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});var Yu=en("table_row",()=>({...cp.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:t=>t.type==="tableRow",runner:(t,e,n)=>{const r=e.align,i=e.children.map((s,o)=>({...s,align:r[o]}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_row",runner:(t,e)=>{e.content.size!==0&&(t.openNode("tableRow"),t.next(e.content),t.closeNode())}}}));Fe(Yu.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Fe(Yu.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});var hp=en("table_cell",()=>({...cp.table_cell,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!t.isHeader,runner:(t,e,n)=>{const r=e.align;t.openNode(n,{alignment:r}).openNode(t.schema.nodes.paragraph).next(e.children).closeNode().closeNode()}},toMarkdown:{match:t=>t.type.name==="table_cell",runner:(t,e)=>{t.openNode("tableCell").next(e.content).closeNode()}}}));Fe(hp.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Fe(hp.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});var Pu=en("table_header",()=>({...cp.table_header,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!!t.isHeader,runner:(t,e,n)=>{const r=e.align;t.openNode(n,{alignment:r}),t.openNode(t.schema.nodes.paragraph),t.next(e.children),t.closeNode(),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header",runner:(t,e)=>{t.openNode("tableCell"),t.next(e.content),t.closeNode()}}}));Fe(Pu.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Fe(Pu.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function pI(t,e=3,n=3){const r=Array(n).fill(0).map(()=>hp.type(t).createAndFill()),i=Array(n).fill(0).map(()=>Pu.type(t).createAndFill()),s=Array(e).fill(0).map((o,u)=>u===0?fp.type(t).create(null,i):Yu.type(t).create(null,r));return _s.type(t).create(null,s)}function dI(t){return(e,n)=>r=>{n=n??r.selection.from;const i=r.doc.resolve(n),s=YB(c=>c.type.name==="table")(i),o=s?{node:s.node,from:s.start}:void 0,u=t==="row";if(o){const c=bt.get(o.node);if(e>=0&&e<(u?c.height:c.width)){const h=c.positionAt(u?e:c.height-1,u?c.width-1:e,o.node),d=r.doc.resolve(o.from+h),g=u?Rt.rowSelection:Rt.colSelection,y=c.positionAt(u?e:0,u?0:e,o.node),b=r.doc.resolve(o.from+y);return TO(r.setSelection(g(d,b)))}}return r}}var XJ=dI("row"),ZJ=dI("col");function mI(t,e,{map:n,tableStart:r,table:i},s){const o=Array(s).fill(0).reduce((c,h,d)=>c+i.child(d).nodeSize,r),u=Array(n.width).fill(0).map((c,h)=>{const d=i.nodeAt(n.map[h]);return hp.type(t).createAndFill({alignment:d?.attrs.alignment})});return e.insert(o,Yu.type(t).create(null,u)),e}function eq(t){const e=ap(t.$from);if(!e)return;const n=bt.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(r=>{const i=e.node.nodeAt(r),s=r+e.start;return{pos:s,start:s+1,node:i}})}function tq(t){const e=eq(t.selection);if(e&&e[0]){const n=t.doc.resolve(e[0].pos),r=e[e.length-1];if(r){const i=t.doc.resolve(r.pos);return TO(t.setSelection(new Rt(i,n)))}}return t}var ok=Ue("GoToPrevTableCell",()=>()=>SD(-1));Fe(ok,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});var lk=Ue("GoToNextTableCell",()=>()=>SD(1));Fe(lk,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});var uk=Ue("ExitTable",t=>()=>(e,n)=>{if(!oi(e))return!1;const{$head:r}=e.selection,i=GB(r,_s.type(t));if(!i)return!1;const{to:s}=i,o=e.tr.replaceWith(s,s,Ui.type(t).createAndFill());return o.setSelection(Ve.near(o.doc.resolve(s),1)).scrollIntoView(),n?.(o),!0});Fe(uk,{displayName:"Command<breakTableCommand>",group:"Table"});var ck=Ue("InsertTable",t=>({row:e,col:n}={})=>(r,i)=>{const{selection:s,tr:o}=r,{from:u}=s,c=pI(t,e,n),h=o.replaceSelectionWith(c),d=Ve.findFrom(h.doc.resolve(u),1,!0);return d&&h.setSelection(d),i?.(h),!0});Fe(ck,{displayName:"Command<insertTableCommand>",group:"Table"});var gI=Ue("MoveRow",()=>({from:t,to:e,pos:n}={})=>e$({from:t??0,to:e??0,pos:n}));Fe(gI,{displayName:"Command<moveRowCommand>",group:"Table"});var yI=Ue("MoveCol",()=>({from:t,to:e,pos:n}={})=>t$({from:t??0,to:e??0,pos:n}));Fe(yI,{displayName:"Command<moveColCommand>",group:"Table"});var xI=Ue("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:r}=e;return!!n?.(XJ(t.index,t.pos)(r))});Fe(xI,{displayName:"Command<selectRowCommand>",group:"Table"});var bI=Ue("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:r}=e;return!!n?.(ZJ(t.index,t.pos)(r))});Fe(bI,{displayName:"Command<selectColCommand>",group:"Table"});var SI=Ue("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!e?.(tq(n))});Fe(SI,{displayName:"Command<selectTableCommand>",group:"Table"});var vI=Ue("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof Rt))return!1;const r=n.isRowSelection(),i=n.isColSelection();return r&&i?Zj(t,e):i?Kj(t,e):Yj(t,e)});Fe(vI,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});var kI=Ue("AddColBefore",()=>()=>Jj);Fe(kI,{displayName:"Command<addColBeforeCommand>",group:"Table"});var CI=Ue("AddColAfter",()=>()=>qj);Fe(CI,{displayName:"Command<addColAfterCommand>",group:"Table"});var wI=Ue("AddRowBefore",t=>()=>(e,n)=>{if(!oi(e))return!1;if(n){const r=to(e);n(mI(t,e.tr,r,r.top))}return!0});Fe(wI,{displayName:"Command<addRowBeforeCommand>",group:"Table"});var EI=Ue("AddRowAfter",t=>()=>(e,n)=>{if(!oi(e))return!1;if(n){const r=to(e);n(mI(t,e.tr,r,r.bottom))}return!0});Fe(EI,{displayName:"Command<addRowAfterCommand>",group:"Table"});var AI=Ue("SetAlign",()=>(t="left")=>Qj("alignment",t));Fe(AI,{displayName:"Command<setAlignCommand>",group:"Table"});var NI=pr(t=>new Tr(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(e,n,r,i)=>{const s=e.doc.resolve(r);if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),_s.type(t)))return null;const o=pI(t,Math.max(Number(n.groups?.row??0),2),Number(n.groups?.col)),u=e.tr.replaceRangeWith(r,i,o);return u.setSelection(Ae.create(u.doc,r+3)).scrollIntoView()}));Fe(NI,{displayName:"InputRule<insertTableInputRule>",group:"Table"});var TI=cF(t=>({run:(e,n,r)=>{if(r)return e;function i(h){const d=h.childCount,g=h.lastChild?.childCount??0;if(d===0||g===0)return Ui.type(t).create();const y=h.firstChild;if(!(g>0&&y&&y.childCount===0))return h;if(d>=3){const N=h.child(1),M=[];for(let U=0;U<N.childCount;U++){const L=N.child(U);M.push(Pu.type(t).create(L.attrs,L.content,L.marks))}const j=y.type.create(y.attrs,M),P=[];for(let U=2;U<d;U++)P.push(h.child(U));return h.type.create(h.attrs,[j,...P])}const b=Array(g).fill(0).map(()=>Pu.type(t).createAndFill()),k=new H(Q.from(b),0,0),E=y.replace(0,0,k);return h.replace(0,y.nodeSize,new H(Q.from(E),0,0))}function s(h){const d=Yu.type(t),g=[];let y=[],b=!1;function k(){if(y.length===0)return;const E=fp.type(t).createAndFill(),N=_s.type(t).create(null,[E,...y]);g.push(i(N)),y=[]}return h.forEach(E=>{E.type===d?(b=!0,y.push(E)):(k(),g.push(E))}),k(),b?Q.from(g):h}function o(h){let d=s(h),g=d!==h;const y=[];return d.forEach(b=>{if(b.type===_s.type(t)){const k=i(b);k!==b&&(g=!0),y.push(k)}else if(b.childCount>0){const k=o(b.content);k!==b.content?(g=!0,y.push(b.copy(k))):y.push(b)}else y.push(b)}),g?Q.from(y):h}function u(h){const d=[],g=[];h.forEach(y=>g.push(y));for(let y=0;y<g.length;y++){const b=g[y],k=g[y+1];b.type===Ui.type(t)&&b.content.size===0&&k&&k.type===_s.type(t)||d.push(b)}return d.length<g.length?Q.from(d):h}let c=o(e.content);return c=u(c),new H(Q.from(c),e.openStart,e.openEnd)}}));Fe(TI,{displayName:"PasteRule<table>",group:"Table"});var fk=Mr("tableKeymap",{NextCell:{priority:100,shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(xt);return()=>e.call(lk.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(xt);return()=>e.call(ok.key)}},ExitTable:{shortcuts:["Mod-Enter","Enter"],command:t=>{const e=t.get(xt);return()=>e.call(uk.key)}}});Fe(fk.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Fe(fk.shortcuts,{displayName:"Keymap<table>",group:"Table"});var ux="footnote_definition",KN="footnoteDefinition",hk=en("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`dl[data-type="${ux}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Ki(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":ux},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===KN,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===ux,runner:(t,e)=>{t.openNode(KN,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Fe(hk.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Fe(hk.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});var cx="footnote_reference",pk=en("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:"",validate:"string"}},parseDOM:[{tag:`sup[data-type="${cx}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Ki(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":cx},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===cx,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Fe(pk.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Fe(pk.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});var dk=Us.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,checked:{default:null,validate:"boolean|null"}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:r=>{if(!(r instanceof HTMLElement))throw Ki(r);return{label:r.dataset.label,listType:r.dataset.listType,spread:r.dataset.spread,checked:r.dataset.checked?r.dataset.checked==="true":null}}},...n?.parseDOM||[]],toDOM:r=>n.toDOM&&r.attrs.checked==null?n.toDOM(r):["li",{"data-item-type":"task","data-label":r.attrs.label,"data-list-type":r.attrs.listType,"data-spread":r.attrs.spread,"data-checked":r.attrs.checked},0],parseMarkdown:{match:({type:r})=>r==="listItem",runner:(r,i,s)=>{if(i.checked==null){n.parseMarkdown.runner(r,i,s);return}const o=i.label!=null?`${i.label}.`:"•",u=i.checked!=null?!!i.checked:null,c=i.label!=null?"ordered":"bullet",h=i.spread!=null?`${i.spread}`:"true";r.openNode(s,{label:o,listType:c,spread:h,checked:u}),r.next(i.children),r.closeNode()}},toMarkdown:{match:r=>r.type.name==="list_item",runner:(r,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(r,i);return}const s=i.attrs.label,o=i.attrs.listType,u=i.attrs.spread==="true",c=i.attrs.checked;r.openNode("listItem",void 0,{label:s,listType:o,spread:u,checked:c}),r.next(i.content),r.closeNode()}}}});Fe(dk.node,{displayName:"NodeSchema<taskListItem>",group:"ListItem"});Fe(dk.ctx,{displayName:"NodeSchemaCtx<taskListItem>",group:"ListItem"});var MI=pr(()=>new Tr(/^\[(?<checked>\s|x)\]\s$/,(t,e,n,r)=>{const i=t.doc.resolve(n);let s=0,o=i.node(s);for(;o&&o.type.name!=="list_item";)s--,o=i.node(s);if(!o||o.attrs.checked!=null)return null;const u=e.groups?.checked==="x",c=i.before(s),h=t.tr;return h.deleteRange(n,r).setNodeMarkup(c,void 0,{...o.attrs,checked:u}),h}));Fe(MI,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});var nq=[ak,fk].flat(),rq=[NI,MI],iq=[hI],sq=[TI],OI=$s(()=>SU);Fe(OI,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});var aq=$s(()=>f$({}));Fe(aq,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});var RI=$s(()=>v$({allowTableNodeSelection:!0}));Fe(RI,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});var mk=Ni("remarkGFM",()=>WJ);Fe(mk.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Fe(mk.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});var oq=new hr("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function lq(t,e){let n=0;return e.forEach((r,i,s)=>{r===t&&(n=s)}),n}var DI=$s(()=>new fr({key:oq,appendTransaction:(t,e,n)=>{let r;const i=(s,o)=>{if(r||(r=n.tr),s.type.name!=="table_cell")return;const u=n.doc.resolve(o),c=u.node(u.depth),h=u.node(u.depth-1).firstChild;if(!h)return;const d=lq(s,c),g=h.maybeChild(d);if(!g)return;const y=g.attrs.alignment;y!==s.attrs.alignment&&r.setNodeMarkup(o,void 0,{...s.attrs,alignment:y})};return e.doc!==n.doc&&n.doc.descendants(i),r}}));Fe(DI,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});var uq=[DI,OI,mk,RI].flat(),cq=[dk,_s,fp,Yu,Pu,hp,hk,pk,sk,up].flat(),fq=[lk,ok,uk,ck,gI,yI,xI,bI,SI,vI,wI,EI,kI,CI,AI,Hg],II=[cq,rq,sq,iq,nq,fq,uq].flat();const gk={display:"flex",gap:6,alignItems:"center",padding:6,border:"1px solid #d4d4d8",borderRadius:6,background:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.12)",marginTop:6},eg={flex:1,border:"1px solid #d4d4d8",borderRadius:4,padding:"4px 8px",font:"inherit",outline:"none",minWidth:0},_h={border:"1px solid #d4d4d8",background:"#fff",borderRadius:4,padding:"4px 8px",font:"inherit",fontSize:12,cursor:"pointer",color:"#3f3f46",whiteSpace:"nowrap"},hq=gk,pq=eg,fx=_h;function dq({initialUrl:t,isEdit:e,onApply:n,onRemove:r,onClose:i}){const[s,o]=ae.useState(t),u=()=>{const c=s.trim();c!==""&&n(c)};return I.jsxs("div",{style:hq,"data-mdx-action":"link",onMouseDown:c=>c.stopPropagation(),children:[I.jsx("input",{style:pq,autoFocus:!0,placeholder:"https://…",value:s,onChange:c=>o(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),u()),c.key==="Escape"&&i()}}),I.jsx("button",{type:"button",style:{...fx,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},onMouseDown:c=>c.preventDefault(),onClick:u,children:e?"Update":"Add"}),e&&r?I.jsx("button",{type:"button",style:{...fx,color:"#dc2626"},onMouseDown:c=>c.preventDefault(),onClick:r,children:"Remove"}):null,I.jsx("button",{type:"button",style:fx,onMouseDown:c=>c.preventDefault(),onClick:i,children:"Cancel"})]})}const mq={...gk,flexWrap:"wrap"},GN={fontSize:11,color:"#71717a",whiteSpace:"nowrap"};function gq({initialAlt:t,onApply:e,onClose:n}){const[r,i]=ae.useState(t),[s,o]=ae.useState(""),u=()=>e(r.trim(),s.trim()),c=h=>{h.key==="Enter"&&(h.preventDefault(),u()),h.key==="Escape"&&n()};return I.jsxs("div",{style:mq,"data-mdx-action":"image",onMouseDown:h=>h.stopPropagation(),children:[I.jsx("span",{style:GN,children:"Alt"}),I.jsx("input",{style:eg,autoFocus:!0,placeholder:"Alt text for screen readers",value:r,onChange:h=>i(h.currentTarget.value),onKeyDown:c}),I.jsx("span",{style:GN,children:"Caption"}),I.jsx("input",{style:eg,placeholder:"Caption / source (optional)",value:s,onChange:h=>o(h.currentTarget.value),onKeyDown:c}),I.jsx("button",{type:"button",style:{..._h,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},onMouseDown:h=>h.preventDefault(),onClick:u,children:"Insert"}),I.jsx("button",{type:"button",style:_h,onMouseDown:h=>h.preventDefault(),onClick:n,children:"Cancel"})]})}function YN(t){return typeof t!="object"||t===null?!1:"status"in t&&t.status===501||"code"in t&&t.code==="unsupported"}const QN=new Set(["image/svg+xml","image/x-icon"]),yq=[{value:"all",label:"All"},{value:"photo",label:"Photos"},{value:"graphic",label:"Graphics"},{value:"document",label:"Documents"}];function xq(t,e){return e==="all"?!0:e==="photo"?t.startsWith("image/")&&!QN.has(t):e==="graphic"?QN.has(t):e==="document"?t==="application/pdf":!0}const bq={position:"fixed",inset:0,background:"rgba(0,0,0,0.45)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1100},Sq={width:"min(760px, 94vw)",maxHeight:"82vh",display:"flex",flexDirection:"column",background:"#fff",border:"1px solid #d4d4d8",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.28)",overflow:"hidden",fontSize:13,color:"#27272a"},vq={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:"1px solid #ececed"},kq={display:"flex",flexDirection:"column",gap:10,padding:"12px 16px",borderBottom:"1px solid #ececed"},Wc={display:"flex",alignItems:"center",gap:8},WN={flex:1,border:"1px solid #d4d4d8",borderRadius:6,padding:"6px 10px",font:"inherit",outline:"none"},Au={border:"1px solid #d4d4d8",background:"#fff",borderRadius:6,padding:"6px 12px",font:"inherit",cursor:"pointer",color:"#3f3f46",whiteSpace:"nowrap"},XN={...Au,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},Cq={display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:10,padding:16,overflowY:"auto"},ZN={position:"relative",aspectRatio:"1 / 1",border:"1px solid #e4e4e7",borderRadius:8,overflow:"hidden",cursor:"pointer",background:"#fafafa",padding:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},wq={position:"absolute",left:0,right:0,bottom:0,padding:"4px 6px",fontSize:11,color:"#fff",background:"linear-gradient(to top, rgba(0,0,0,0.65), transparent)",textAlign:"left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"};function _I({media:t,context:e,field:n,accept:r="image/*,application/pdf",onSelect:i,onClose:s}){const[o,u]=ae.useState([]),[c,h]=ae.useState([]),[d,g]=ae.useState(""),[y,b]=ae.useState(""),[k,E]=ae.useState("all"),[N,M]=ae.useState(!1),[j,P]=ae.useState(!1),[U,L]=ae.useState(!1),[C,z]=ae.useState(null),[G,J]=ae.useState(!1),[K,de]=ae.useState(""),ce=ae.useRef(null),Se=ae.useMemo(()=>async D=>{M(!0),z(null);try{const F=await t.listMedia({folder:D||void 0});u(F.items),h(F.folders)}catch(F){YN(F)?P(!0):z(F instanceof Error?F.message:"Failed to load media")}finally{M(!1)}},[t]);ae.useEffect(()=>{Se(d)},[Se,d]);const Re=D=>{b(""),g(D)},Y=async D=>{L(!0),z(null);try{const F=await t.uploadMedia(D,{...e,field:n,folder:d||void 0});if(F.success&&F.url){if(F.url.startsWith("./")){i(F.url,F.annotation??"");return}const ee={id:F.id??F.url,url:F.url,filename:F.filename??D.name,annotation:F.annotation,contentType:D.type||"application/octet-stream",folder:d||void 0};u(V=>[ee,...V])}else z(F.error??"Upload failed")}catch(F){YN(F)?P(!0):z(F instanceof Error?F.message:"Upload failed")}finally{L(!1)}},W=async()=>{const D=K.trim();if(!D||!t.createFolder)return;if(/[/\\:*?"<>|]/.test(D)){z("Invalid folder name");return}const F=d?`${d}/${D}`:D;try{const ee=await t.createFolder(F);ee.success?h(V=>[...V,{name:D,path:F}].sort((be,De)=>be.name.localeCompare(De.name))):z(ee.error??"Failed to create folder")}catch(ee){z(ee instanceof Error?ee.message:"Failed to create folder")}de(""),J(!1)},ue=ae.useMemo(()=>{const D=k==="all"?o:o.filter(ee=>xq(ee.contentType,k)),F=y.trim().toLowerCase();return F===""?D:D.filter(ee=>ee.filename.toLowerCase().includes(F))},[o,k,y]),ke=ae.useMemo(()=>{if(!d)return[];const D=d.split("/");return D.map((F,ee)=>({name:F,path:D.slice(0,ee+1).join("/")}))},[d]),ze=!y&&k==="all";return I.jsx("div",{style:bq,onMouseDown:s,"data-cms-ui":"",children:I.jsxs("div",{style:Sq,onMouseDown:D=>D.stopPropagation(),onDrop:D=>{D.preventDefault();const F=D.dataTransfer.files[0];F&&Y(F)},onDragOver:D=>D.preventDefault(),children:[I.jsxs("div",{style:vq,children:[I.jsx("strong",{style:{fontSize:15},children:"Media Library"}),I.jsx("button",{type:"button",style:{...Au,border:"none",fontSize:18,lineHeight:1,padding:2},onClick:s,"aria-label":"Close",children:"×"})]}),I.jsxs("div",{style:kq,children:[ke.length>0?I.jsxs("div",{style:{...Wc,gap:4,fontSize:12,color:"#71717a"},children:[I.jsx("button",{type:"button",style:{...Au,border:"none",padding:"0 2px"},onClick:()=>Re(""),children:"root"}),ke.map((D,F)=>I.jsxs("span",{style:Wc,children:[I.jsx("span",{children:"/"}),F===ke.length-1?I.jsx("span",{style:{color:"#27272a",fontWeight:600},children:D.name}):I.jsx("button",{type:"button",style:{...Au,border:"none",padding:"0 2px"},onClick:()=>Re(D.path),children:D.name})]},D.path))]}):null,I.jsxs("div",{style:Wc,children:[I.jsx("input",{style:WN,placeholder:"Search files…",value:y,onChange:D=>b(D.target.value)}),t.createFolder?I.jsx("button",{type:"button",style:Au,onClick:()=>J(D=>!D),children:"New folder"}):null,I.jsx("button",{type:"button",style:XN,disabled:j||U,onClick:()=>ce.current?.click(),children:U?"Uploading…":"Upload"}),I.jsx("input",{ref:ce,type:"file",accept:r,style:{display:"none"},onChange:D=>{const F=D.target.files?.[0];F&&Y(F),D.target.value=""}})]}),I.jsx("div",{style:{...Wc,gap:4},children:yq.map(D=>I.jsx("button",{type:"button",style:{...Au,padding:"3px 10px",fontSize:12,...k===D.value?{background:"#2563eb",borderColor:"#2563eb",color:"#fff"}:{}},onClick:()=>E(D.value),children:D.label},D.value))}),G&&t.createFolder?I.jsxs("div",{style:Wc,children:[I.jsx("input",{style:WN,autoFocus:!0,placeholder:"Folder name…",value:K,onChange:D=>de(D.target.value),onKeyDown:D=>{D.key==="Enter"&&W(),D.key==="Escape"&&(J(!1),de(""))}}),I.jsx("button",{type:"button",style:XN,onClick:()=>{W()},children:"Create"})]}):null,j?I.jsx("div",{style:{fontSize:12,color:"#a16207"},children:"Media uploads are not configured for this project."}):null,C?I.jsx("div",{style:{fontSize:12,color:"#dc2626"},children:C}):null]}),N?I.jsx("div",{style:{padding:32,textAlign:"center",color:"#a1a1aa"},children:"Loading…"}):c.length===0&&ue.length===0?I.jsx("div",{style:{padding:32,textAlign:"center",color:"#a1a1aa"},children:y||k!=="all"?"No matching files.":"No files yet. Upload one to get started."}):I.jsxs("div",{style:Cq,children:[ze?c.map(D=>I.jsxs("button",{type:"button",style:ZN,onClick:()=>Re(D.path),title:D.name,children:[I.jsx("span",{style:{fontSize:30},children:"📁"}),I.jsx("span",{style:{fontSize:12,color:"#52525b",maxWidth:"90%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:D.name})]},D.path)):null,ue.map(D=>I.jsxs("button",{type:"button",style:ZN,title:D.filename,onClick:()=>i(D.url,D.annotation||D.filename||"Image"),children:[D.contentType.startsWith("image/")?I.jsx("img",{src:D.url,alt:D.annotation||D.filename,style:{width:"100%",height:"100%",objectFit:"cover"}}):I.jsx("span",{style:{fontSize:30},children:D.contentType==="application/pdf"?"📄":"📎"}),I.jsx("span",{style:wq,children:D.filename})]},D.id))]}),I.jsxs("div",{style:{padding:"10px 16px",borderTop:"1px solid #ececed",fontSize:12,color:"#a1a1aa",textAlign:"center"},children:["Drag and drop a file here to upload",d?` to ${d}`:"","."]})]})})}const rS={bold:!1,italic:!1,strikethrough:!1,link:!1,linkHref:null,bulletList:!1,orderedList:!1,listStyle:null,blockquote:!1,heading:null};function Eq(t){const{state:e}=t,{$from:n,from:r,to:i}=e.selection;let s=!1,o=!1,u=!1,c=!1,h=null;const d=e.storedMarks||n.marks();for(const N of d)N.type.name==="strong"&&(s=!0),N.type.name==="emphasis"&&(o=!0),N.type.name==="strike_through"&&(u=!0),N.type.name==="link"&&(c=!0,h=typeof N.attrs.href=="string"?N.attrs.href:null);r!==i&&e.doc.nodesBetween(r,i,N=>{for(const M of N.marks)M.type.name==="strong"&&(s=!0),M.type.name==="emphasis"&&(o=!0),M.type.name==="strike_through"&&(u=!0),M.type.name==="link"&&(c=!0,h=typeof M.attrs.href=="string"?M.attrs.href:null)});let g=!1,y=!1,b=null,k=!1,E=null;for(let N=n.depth;N>0;N--){const M=n.node(N);(M.type.name==="bullet_list"||M.type.name==="ordered_list")&&(M.type.name==="bullet_list"&&(g=!0),M.type.name==="ordered_list"&&(y=!0),b===null&&(b=typeof M.attrs.listStyle=="string"?M.attrs.listStyle:null)),M.type.name==="blockquote"&&(k=!0)}if(n.parent.type.name==="heading"){const N=n.parent.attrs.level;E=typeof N=="number"?N:null}return{bold:s,italic:o,strikethrough:u,link:c,linkHref:h,bulletList:g,orderedList:y,listStyle:b,blockquote:k,heading:E}}function Aq(t,e){const{$from:n}=t.state.selection;for(let r=n.depth;r>0;r--)if(n.node(r).type.name===e)return!0;return!1}function Nq(t,e){const{state:n}=t,r=n.schema.nodes.heading,i=n.schema.nodes.paragraph;if(!r||!i)return;const{$from:s}=n.selection,o=s.parent.type.name==="heading"&&s.parent.attrs.level===e,u=o?i:r,c=o?void 0:{level:e},h=s.before(s.depth),d=n.selection.$to.after(n.selection.$to.depth);t.dispatch(n.tr.setBlockType(h,d,u,c)),t.focus()}function Tq(t){const{state:e}=t,{from:n,to:r}=e.selection,i=e.schema.marks.link;if(!i)return;let s=n,o=r;e.doc.nodesBetween(n,n===r?r+1:r,(u,c)=>{if(i.isInSet(u.marks))return s=c,o=c+u.nodeSize,!1}),t.dispatch(e.tr.removeMark(s,o,i))}function Mq(t,e){return t.bold===e.bold&&t.italic===e.italic&&t.strikethrough===e.strikethrough&&t.link===e.link&&t.linkHref===e.linkHref&&t.bulletList===e.bulletList&&t.orderedList===e.orderedList&&t.listStyle===e.listStyle&&t.blockquote===e.blockquote&&t.heading===e.heading}function Oq(t,e){let n=0,r=rS;const i=()=>{const u=t.ctx.get(gn),c=Eq(u);Mq(c,r)||(r=c,e(c))},s=t.ctx.get(gn),o=s.dispatch.bind(s);return s.dispatch=u=>{o(u),(u.selectionSet||u.docChanged)&&(cancelAnimationFrame(n),n=requestAnimationFrame(i))},i(),()=>{cancelAnimationFrame(n)}}const Rq=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],eT={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function zI(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=48&&e<=57}function Dq(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=102||e>=65&&e<=70||e>=48&&e<=57}function Iq(t){const e=typeof t=="string"?t.charCodeAt(0):t;return e>=97&&e<=122||e>=65&&e<=90}function tT(t){return Iq(t)||zI(t)}const _q=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Kg(t,e){const n=e||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,i=[];let s=0,o=-1,u="",c,h;n.position&&("start"in n.position||"indent"in n.position?(h=n.position.indent,c=n.position.start):c=n.position);let d=(c?c.line:0)||1,g=(c?c.column:0)||1,y=k(),b;for(s--;++s<=t.length;)if(b===10&&(g=(h?h[o]:0)||1),b=t.charCodeAt(s),b===38){const M=t.charCodeAt(s+1);if(M===9||M===10||M===12||M===32||M===38||M===60||Number.isNaN(M)||r&&M===r){u+=String.fromCharCode(b),g++;continue}const j=s+1;let P=j,U=j,L;if(M===35){U=++P;const Se=t.charCodeAt(U);Se===88||Se===120?(L="hexadecimal",U=++P):L="decimal"}else L="named";let C="",z="",G="";const J=L==="named"?tT:L==="decimal"?zI:Dq;for(U--;++U<=t.length;){const Se=t.charCodeAt(U);if(!J(Se))break;G+=String.fromCharCode(Se),L==="named"&&Rq.includes(G)&&(C=G,z=fh(G))}let K=t.charCodeAt(U)===59;if(K){U++;const Se=L==="named"?fh(G):!1;Se&&(C=G,z=Se)}let de=1+U-j,ce="";if(!(!K&&n.nonTerminated===!1))if(!G)L!=="named"&&E(4,de);else if(L==="named"){if(K&&!z)E(5,1);else if(C!==G&&(U=P+C.length,de=1+U-P,K=!1),!K){const Se=C?1:3;if(n.attribute){const Re=t.charCodeAt(U);Re===61?(E(Se,de),z=""):tT(Re)?z="":E(Se,de)}else E(Se,de)}ce=z}else{K||E(2,de);let Se=Number.parseInt(G,L==="hexadecimal"?16:10);if(zq(Se))E(7,de),ce="�";else if(Se in eT)E(6,de),ce=eT[Se];else{let Re="";Lq(Se)&&E(6,de),Se>65535&&(Se-=65536,Re+=String.fromCharCode(Se>>>10|55296),Se=56320|Se&1023),ce=Re+String.fromCharCode(Se)}}if(ce){N(),y=k(),s=U-1,g+=U-j+1,i.push(ce);const Se=k();Se.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,ce,{start:y,end:Se},t.slice(j-1,U)),y=Se}else G=t.slice(j-1,U),u+=G,g+=G.length,s=U-1}else b===10&&(d++,o++,g=0),Number.isNaN(b)?N():(u+=String.fromCharCode(b),g++);return i.join("");function k(){return{line:d,column:g,offset:s+((c?c.offset:0)||0)}}function E(M,j){let P;n.warning&&(P=k(),P.column+=j,P.offset+=j,n.warning.call(n.warningContext||void 0,_q[M],P,M))}function N(){u&&(i.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:y,end:k()}),u="")}}function zq(t){return t>=55296&&t<=57343||t>1114111}function Lq(t){return t>=1&&t<=8||t===11||t>=13&&t<=31||t>=127&&t<=159||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534}const Bq=/["&'<>`]/g,Vq=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fq=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pq=/[|\\{}()[\]^$+*?.]/g,nT=new WeakMap;function jq(t,e){if(t=t.replace(e.subset?$q(e.subset):Bq,r),e.subset||e.escapeOnly)return t;return t.replace(Vq,n).replace(Fq,r);function n(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function $q(t){let e=nT.get(t);return e||(e=Uq(t),nT.set(t,e)),e}function Uq(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Pq,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}function Jq(t){return"&#x"+t.toString(16).toUpperCase()+";"}function qq(t,e){return jq(t,Object.assign({format:Jq},e))}function Hq(){return{canContainEols:["textDirective"],enter:{directiveContainer:Kq,directiveContainerAttributes:px,directiveContainerLabel:Qq,directiveLeaf:Gq,directiveLeafAttributes:px,directiveText:Yq,directiveTextAttributes:px},exit:{directiveContainer:bx,directiveContainerAttributeClassValue:mx,directiveContainerAttributeIdValue:dx,directiveContainerAttributeName:yx,directiveContainerAttributeValue:gx,directiveContainerAttributes:xx,directiveContainerLabel:Wq,directiveContainerName:hx,directiveLeaf:bx,directiveLeafAttributeClassValue:mx,directiveLeafAttributeIdValue:dx,directiveLeafAttributeName:yx,directiveLeafAttributeValue:gx,directiveLeafAttributes:xx,directiveLeafName:hx,directiveText:bx,directiveTextAttributeClassValue:mx,directiveTextAttributeIdValue:dx,directiveTextAttributeName:yx,directiveTextAttributeValue:gx,directiveTextAttributes:xx,directiveTextName:hx}}}function Kq(t){yk.call(this,"containerDirective",t)}function Gq(t){yk.call(this,"leafDirective",t)}function Yq(t){yk.call(this,"textDirective",t)}function yk(t,e){this.enter({type:t,name:"",attributes:{},children:[]},e)}function hx(t){const e=this.stack[this.stack.length-1];e.type==="containerDirective"||e.type==="leafDirective"||e.type,e.name=this.sliceSerialize(t)}function Qq(t){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},t)}function Wq(t){this.exit(t)}function px(){this.data.directiveAttributes=[],this.buffer()}function dx(t){this.data.directiveAttributes.push(["id",Kg(this.sliceSerialize(t),{attribute:!0})])}function mx(t){this.data.directiveAttributes.push(["class",Kg(this.sliceSerialize(t),{attribute:!0})])}function gx(t){const e=this.data.directiveAttributes;e[e.length-1][1]=Kg(this.sliceSerialize(t),{attribute:!0})}function yx(t){this.data.directiveAttributes.push([this.sliceSerialize(t),""])}function xx(){const t=this.data.directiveAttributes,e={};let n=-1;for(;++n<t.length;){const i=t[n];i[0]==="class"&&e.class?e.class+=" "+i[1]:e[i[0]]=i[1]}this.data.directiveAttributes=void 0,this.resume();const r=this.stack[this.stack.length-1];r.type==="containerDirective"||r.type==="leafDirective"||r.type,r.attributes=e}function bx(t){this.exit(t)}function xk(t,e,n,r,i,s,o,u,c,h,d,g,y,b,k){let E,N;return M;function M(Y){return t.enter(r),t.enter(i),t.consume(Y),t.exit(i),j}function j(Y){return Y===35?(E=o,P(Y)):Y===46?(E=u,P(Y)):Y===58||Y===95||sn(Y)?(t.enter(s),t.enter(c),t.consume(Y),C):k&&qe(Y)?He(t,j,"whitespace")(Y):!k&&We(Y)?Ts(t,j)(Y):Re(Y)}function P(Y){const W=E+"Marker";return t.enter(s),t.enter(E),t.enter(W),t.consume(Y),t.exit(W),U}function U(Y){if(Y===null||Y===34||Y===35||Y===39||Y===46||Y===60||Y===61||Y===62||Y===96||Y===125||We(Y))return n(Y);const W=E+"Value";return t.enter(W),t.consume(Y),L}function L(Y){if(Y===null||Y===34||Y===39||Y===60||Y===61||Y===62||Y===96)return n(Y);if(Y===35||Y===46||Y===125||We(Y)){const W=E+"Value";return t.exit(W),t.exit(E),t.exit(s),j(Y)}return t.consume(Y),L}function C(Y){return Y===45||Y===46||Y===58||Y===95||vn(Y)?(t.consume(Y),C):(t.exit(c),k&&qe(Y)?He(t,z,"whitespace")(Y):!k&&We(Y)?Ts(t,z)(Y):z(Y))}function z(Y){return Y===61?(t.enter(h),t.consume(Y),t.exit(h),G):(t.exit(s),j(Y))}function G(Y){return Y===null||Y===60||Y===61||Y===62||Y===96||Y===125||k&&Ce(Y)?n(Y):Y===34||Y===39?(t.enter(d),t.enter(y),t.consume(Y),t.exit(y),N=Y,K):k&&qe(Y)?He(t,G,"whitespace")(Y):!k&&We(Y)?Ts(t,G)(Y):(t.enter(g),t.enter(b),t.consume(Y),N=void 0,J)}function J(Y){return Y===null||Y===34||Y===39||Y===60||Y===61||Y===62||Y===96?n(Y):Y===125||We(Y)?(t.exit(b),t.exit(g),t.exit(s),j(Y)):(t.consume(Y),J)}function K(Y){return Y===N?(t.enter(y),t.consume(Y),t.exit(y),t.exit(d),t.exit(s),Se):(t.enter(g),de(Y))}function de(Y){return Y===N?(t.exit(g),K(Y)):Y===null?n(Y):Ce(Y)?k?n(Y):Ts(t,de)(Y):(t.enter(b),t.consume(Y),ce)}function ce(Y){return Y===N||Y===null||Ce(Y)?(t.exit(b),de(Y)):(t.consume(Y),ce)}function Se(Y){return Y===125||We(Y)?j(Y):Re(Y)}function Re(Y){return Y===125?(t.enter(i),t.consume(Y),t.exit(i),t.exit(r),e):n(Y)}}function bk(t,e,n,r,i,s,o){let u=0,c=0,h;return d;function d(N){return t.enter(r),t.enter(i),t.consume(N),t.exit(i),g}function g(N){return N===93?(t.enter(i),t.consume(N),t.exit(i),t.exit(r),e):(t.enter(s),y(N))}function y(N){if(N===93&&!c)return E(N);const M=t.enter("chunkText",{contentType:"text",previous:h});return h&&(h.next=M),h=M,b(N)}function b(N){return N===null||u>999||N===91&&++c>32?n(N):N===93&&!c--?(t.exit("chunkText"),E(N)):Ce(N)?o?n(N):(t.consume(N),t.exit("chunkText"),y):(t.consume(N),N===92?k:b)}function k(N){return N===91||N===92||N===93?(t.consume(N),u++,b):b(N)}function E(N){return t.exit(s),t.enter(i),t.consume(N),t.exit(i),t.exit(r),e}}function Sk(t,e,n,r){const i=this;return s;function s(u){return sn(u)?(t.enter(r),t.consume(u),o):n(u)}function o(u){return u===45||u===95||vn(u)?(t.consume(u),o):(t.exit(r),i.previous===45||i.previous===95?n(u):e(u))}}const Xq={tokenize:tH,concrete:!0},Zq={tokenize:nH,partial:!0},eH={tokenize:rH,partial:!0},Fd={tokenize:iH,partial:!0};function tH(t,e,n){const r=this,i=r.events[r.events.length-1],s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let o=0,u;return c;function c(J){return t.enter("directiveContainer"),t.enter("directiveContainerFence"),t.enter("directiveContainerSequence"),h(J)}function h(J){return J===58?(t.consume(J),o++,h):o<3?n(J):(t.exit("directiveContainerSequence"),Sk.call(r,t,d,n,"directiveContainerName")(J))}function d(J){return J===91?t.attempt(Zq,g,g)(J):g(J)}function g(J){return J===123?t.attempt(eH,y,y)(J):y(J)}function y(J){return He(t,b,"whitespace")(J)}function b(J){return t.exit("directiveContainerFence"),J===null?z(J):Ce(J)?r.interrupt?e(J):t.attempt(Fd,k,z)(J):n(J)}function k(J){return J===null?z(J):Ce(J)?t.check(Fd,P,z)(J):(t.enter("directiveContainerContent"),E(J))}function E(J){return t.attempt({tokenize:G,partial:!0},C,s?He(t,N,"linePrefix",s+1):N)(J)}function N(J){return J===null?C(J):Ce(J)?t.check(Fd,j,C)(J):j(J)}function M(J){if(J===null){const K=t.exit("chunkDocument");return r.parser.lazy[K.start.line]=!1,C(J)}return Ce(J)?t.check(Fd,U,L)(J):(t.consume(J),M)}function j(J){const K=t.enter("chunkDocument",{contentType:"document",previous:u});return u&&(u.next=K),u=K,M(J)}function P(J){return t.enter("directiveContainerContent"),E(J)}function U(J){t.consume(J);const K=t.exit("chunkDocument");return r.parser.lazy[K.start.line]=!1,E}function L(J){const K=t.exit("chunkDocument");return r.parser.lazy[K.start.line]=!1,C(J)}function C(J){return t.exit("directiveContainerContent"),z(J)}function z(J){return t.exit("directiveContainer"),e(J)}function G(J,K,de){let ce=0;return He(J,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function Se(W){return J.enter("directiveContainerFence"),J.enter("directiveContainerSequence"),Re(W)}function Re(W){return W===58?(J.consume(W),ce++,Re):ce<o?de(W):(J.exit("directiveContainerSequence"),He(J,Y,"whitespace")(W))}function Y(W){return W===null||Ce(W)?(J.exit("directiveContainerFence"),K(W)):de(W)}}}function nH(t,e,n){return bk(t,e,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function rH(t,e,n){return xk(t,e,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function iH(t,e,n){const r=this;return i;function i(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}const sH={tokenize:lH},aH={tokenize:uH,partial:!0},oH={tokenize:cH,partial:!0};function lH(t,e,n){const r=this;return i;function i(d){return t.enter("directiveLeaf"),t.enter("directiveLeafSequence"),t.consume(d),s}function s(d){return d===58?(t.consume(d),t.exit("directiveLeafSequence"),Sk.call(r,t,o,n,"directiveLeafName")):n(d)}function o(d){return d===91?t.attempt(aH,u,u)(d):u(d)}function u(d){return d===123?t.attempt(oH,c,c)(d):c(d)}function c(d){return He(t,h,"whitespace")(d)}function h(d){return d===null||Ce(d)?(t.exit("directiveLeaf"),e(d)):n(d)}}function uH(t,e,n){return bk(t,e,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function cH(t,e,n){return xk(t,e,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const fH={tokenize:mH,previous:dH},hH={tokenize:gH,partial:!0},pH={tokenize:yH,partial:!0};function dH(t){return t!==58||this.events[this.events.length-1][1].type==="characterEscape"}function mH(t,e,n){const r=this;return i;function i(c){return t.enter("directiveText"),t.enter("directiveTextMarker"),t.consume(c),t.exit("directiveTextMarker"),Sk.call(r,t,s,n,"directiveTextName")}function s(c){return c===58?n(c):c===91?t.attempt(hH,o,o)(c):o(c)}function o(c){return c===123?t.attempt(pH,u,u)(c):u(c)}function u(c){return t.exit("directiveText"),e(c)}}function gH(t,e,n){return bk(t,e,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function yH(t,e,n){return xk(t,e,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function xH(){return{text:{58:fH},flow:{58:[Xq,sH]}}}const tg="youtube";function bH(t){if(!t||typeof t!="object")return"";const e=Object.entries(t),n=t.id;if(typeof n=="string"&&n)return n;for(const[r,i]of e)if(i===""||i==null)return r;return""}const LI=Ju("youtube",()=>({group:"block",atom:!0,isolating:!0,selectable:!0,draggable:!1,attrs:{videoId:{default:""}},toDOM:t=>["div",{"data-youtube":t.attrs.videoId,class:"youtube-block"}],parseDOM:[{tag:"div[data-youtube]",getAttrs:t=>({videoId:t.getAttribute("data-youtube")||""})}],parseMarkdown:{match:t=>(t.type==="leafDirective"||t.type==="containerDirective"||t.type==="textDirective")&&t.name===tg,runner:(t,e,n)=>{const r=bH(e.attributes);t.addNode(n,{videoId:r})}},toMarkdown:{match:t=>t.type.name==="youtube",runner:(t,e)=>{t.addNode("leafDirective",void 0,void 0,{name:tg,attributes:{id:e.attrs.videoId}})}}}));function SH(t){const e=t.attributes,n=e&&typeof e=="object"?String(e.id??""):"";return`::${tg}{#${n}}`}const vH=function(){const t=this.data("toMarkdownExtensions")??[],e={handlers:{leafDirective:SH}};t.push(e),this.data("toMarkdownExtensions",t)},kH=Ni("remarkYoutubeDirective",()=>vH),BI=Ue("insertYoutube",()=>t=>(e,n)=>{if(!t)return!1;const r=e.schema.nodes.youtube;if(!r)return!1;const i=r.create({videoId:t});return n&&n(e.tr.replaceSelectionWith(i).scrollIntoView()),!0}),iS="list",CH=/^[A-Za-z0-9_-]+$/,wH=new Set(["textDirective","leafDirective","containerDirective"]);function Pi(t){if(typeof t!="string")return null;const[e]=t.trim().split(/\s+/);return!e||!CH.test(e)?null:e}function zs(t){return Array.isArray(t?.children)?t.children:null}function Sx(t){const e=zs(t);return e&&e.length>0?e[e.length-1]:void 0}function VI(t){return!t.attributes||typeof t.attributes!="object"||Array.isArray(t.attributes)?null:t.attributes}function EH(t){return Pi(VI(t)?.class)}function FI(t,e){const n=zs(t);if(t?.type!=="paragraph"||n?.length!==1)return!1;const r=n[0];return r?.type!=="text"||typeof r.value!="string"?!1:e===void 0?!0:r.value===e}function AH(t){if(!FI(t))return null;const e=zs(t)?.[0];return typeof e?.value!="string"?null:/^:::list\{\.([A-Za-z0-9_-]+)\}$/.exec(e.value)?.[1]??null}function rT(t){return t?.type==="list"}function NH(t,e,n){if(FI(e[n],":::"))return e.splice(n,1),!0;const r=Sx(t),i=Sx(r);if(!i||i.type!=="paragraph")return!1;const s=zs(i),o=Sx(i);if(!s||o?.type!=="text"||typeof o.value!="string")return!1;if(o.value===":::")s.pop();else if(o.value.endsWith(`
|
|
58
58
|
:::`))o.value=o.value.slice(0,-4);else return!1;return s.length===0&&zs(r)?.pop(),!0}function TH(t){return t==="containerDirective"?":::":t==="leafDirective"?"::":":"}function MH(t){if(!t||typeof t!="object"||Array.isArray(t))return"";const e=[];for(const[n,r]of Object.entries(t))if(n==="class"&&typeof r=="string")for(const i of r.split(/\s+/).filter(Boolean))e.push(`.${i}`);else n==="id"&&typeof r=="string"?e.push(`#${r}`):r===""||r==null?e.push(n):e.push(`${n}="${String(r)}"`);return e.length>0?`{${e.join(" ")}}`:""}function Xc(t){return{type:"text",value:t}}function OH(t){const e=TH(t.type),n=typeof t.name=="string"?t.name:"",r=zs(t)??[],i=MH(t.attributes);if(t.type==="textDirective"){const o=[Xc(`${e}${n}`)];return r.length>0&&o.push(Xc("["),...r,Xc("]")),i&&o.push(Xc(i)),o}return[{type:"paragraph",children:[Xc(`${e}${n}${i}`)]},...r]}function PI(t){const e=zs(t);if(e)for(let n=0;n<e.length;n++){const r=e[n];if(!r)continue;if(r.type==="containerDirective"){const o=r,u=o.name===iS?EH(o):null,c=zs(o),h=c?.length===1?c[0]:void 0;if(u&&rT(h)){e[n]={...h,listStyle:u};continue}}const i=AH(r),s=e[n+1];if(i&&rT(s)&&NH(s,e,n+2)){e.splice(n,1),e[n]={...s,listStyle:i};continue}if(PI(r),wH.has(r.type)){if(r.name===tg)continue;const o=r.type==="containerDirective"&&r.name===iS?zs(r)??[]:OH(r);e.splice(n,1,...o),n+=o.length-1}}}function RH(t){return!!(t&&typeof t=="object"&&"containerFlow"in t&&typeof t.containerFlow=="function")}const DH=(t,e,n,r)=>{if(!RH(n))return"";const i=Pi(VI(t)?.class),s=n.containerFlow(t,r);return`:::list${i?`{.${i}}`:""}
|
|
59
59
|
${s}
|
|
60
60
|
:::`},IH=function(){const t=this.data("toMarkdownExtensions")??[],e={handlers:{containerDirective:DH}};return t.push(e),this.data("toMarkdownExtensions",t),n=>{PI(n)}},_H=Ni("remarkListDirective",()=>IH),zH=function(){const t=this.data("micromarkExtensions")??[];t.push(xH()),this.data("micromarkExtensions",t);const e=this.data("fromMarkdownExtensions")??[];e.push(Hq()),this.data("fromMarkdownExtensions",e)},LH=Ni("remarkDirective",()=>zH);function jI(t){return t&&typeof t=="object"?t:{}}function BH(t){if(t)return{name:iS,attributes:{class:t}}}function $I(t,e,n){const r=Pi(e.attrs.listStyle),i=BH(r);i&&t.openNode("containerDirective",void 0,i),t.openNode("list",void 0,n).next(e.content).closeNode(),i&&t.closeNode()}const VH=ml.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,listStyle:{default:null,validate:"string|null"}},parseDOM:[{tag:"ul",getAttrs:r=>{const i=jI(n.parseDOM?.[0]?.getAttrs?.(r)),s=r instanceof HTMLElement?Pi(r.className):null;return{...i,listStyle:s}}}],toDOM:r=>{const i=Pi(r.attrs.listStyle);return["ul",{...e.get(Lg.key)(r),...i?{class:i}:{},"data-spread":r.attrs.spread},0]},parseMarkdown:{match:({type:r,ordered:i})=>r==="list"&&!i,runner:(r,i,s)=>{r.openNode(s,{spread:i.spread===!0,listStyle:Pi(i.listStyle)}).next(i.children).closeNode()}},toMarkdown:{match:r=>r.type.name==="bullet_list",runner:(r,i)=>{$I(r,i,{ordered:!1,spread:i.attrs.spread===!0})}}}}),FH=gl.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,listStyle:{default:null,validate:"string|null"}},parseDOM:[{tag:"ol",getAttrs:r=>{const i=jI(n.parseDOM?.[0]?.getAttrs?.(r)),s=r instanceof HTMLElement?Pi(r.className):null;return{...i,listStyle:s}}}],toDOM:r=>{const i=Pi(r.attrs.listStyle);return["ol",{...e.get(Vg.key)(r),...r.attrs.order===1?{}:{start:r.attrs.order},...i?{class:i}:{},"data-spread":r.attrs.spread},0]},parseMarkdown:{match:({type:r,ordered:i})=>r==="list"&&!!i,runner:(r,i,s)=>{r.openNode(s,{order:typeof i.start=="number"?i.start:1,spread:i.spread===!0,listStyle:Pi(i.listStyle)}).next(i.children).closeNode()}},toMarkdown:{match:r=>r.type.name==="ordered_list",runner:(r,i)=>{$I(r,i,{ordered:!0,start:typeof i.attrs.order=="number"?i.attrs.order:1,spread:i.attrs.spread===!0})}}}}),UI=Ue("SetListStyle",()=>t=>(e,n)=>{const r=new Set([e.schema.nodes.bullet_list,e.schema.nodes.ordered_list].filter(Boolean));if(r.size===0)return!1;const i=Pi(t),s=new Map,{from:o,to:u,$from:c}=e.selection;for(let h=c.depth;h>0;h--){const d=c.node(h);if(r.has(d.type)){s.set(c.before(h),d);break}}if(e.doc.nodesBetween(o,u,(h,d)=>{r.has(h.type)&&s.set(d,h)}),s.size===0)return!1;if(n){let h=e.tr;for(const[d,g]of s)h=h.setNodeMarkup(d,void 0,{...g.attrs,listStyle:i});n(h.scrollIntoView())}return!0}),PH=[LH,_H,VH,FH,UI].flat(),jH=/^[A-Za-z0-9_-]{11}$/,$H=/(?:youtu\.be\/|\/(?:embed|shorts|v)\/)([A-Za-z0-9_-]{11})/;function UH(t){const e=t.trim();if(!e)return null;if(jH.test(e))return e;const n=/[?&]v=([A-Za-z0-9_-]{11})/.exec(e);if(n)return n[1]??null;const r=$H.exec(e);return r?r[1]??null:null}const JH={fontSize:11,color:"#dc2626",whiteSpace:"nowrap"};function qH({onApply:t,onClose:e}){const[n,r]=ae.useState(""),[i,s]=ae.useState(!1),o=()=>{const u=UH(n);if(!u){s(!0);return}t(u)};return I.jsxs("div",{style:gk,"data-mdx-action":"youtube",onMouseDown:u=>u.stopPropagation(),children:[I.jsx("input",{style:eg,autoFocus:!0,placeholder:"YouTube URL or ID",value:n,onChange:u=>{r(u.currentTarget.value),i&&s(!1)},onKeyDown:u=>{u.key==="Enter"&&(u.preventDefault(),o()),u.key==="Escape"&&e()}}),i?I.jsx("span",{style:JH,children:"No video id found"}):null,I.jsx("button",{type:"button",style:{..._h,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},onMouseDown:u=>u.preventDefault(),onClick:o,children:"Insert"}),I.jsx("button",{type:"button",style:_h,onMouseDown:u=>u.preventDefault(),onClick:e,children:"Cancel"})]})}function HH(t){const[e,n]=ae.useState(rS);return ae.useEffect(()=>{if(!t){n(rS);return}return Oq(t,n)},[t]),e}function vx(t,e){Nq(t.ctx.get(gn),e)}function iT(t,e){const n=t.ctx.get(gn);Aq(n,e==="bullet"?"bullet_list":"ordered_list")?t.action(ki(Pg.key)):t.action(ki(e==="bullet"?Bg.key:Fg.key))}function KH(t,e){t.ctx.get(gn).focus(),t.action(ki(UI.key,e))}function GH(t,e,n,r){t.action(i=>{const s=i.get(gn),o=s.state.schema.nodes.image;o&&(s.focus(),s.dispatch(s.state.tr.replaceSelectionWith(o.create({src:e,alt:n,title:r})).scrollIntoView()))})}function YH(t,e){t.action(ki(BI.key,e))}const QH={display:"flex",flexWrap:"wrap",alignItems:"center",gap:3,padding:"4px 6px",borderBottom:"1px solid #ececed",background:"#fafafa"},kx={width:1,height:18,background:"#e4e4e7",margin:"0 3px"},JI={border:"1px solid transparent",background:"transparent",borderRadius:4,padding:"2px 7px",font:"inherit",fontSize:12,lineHeight:1.4,cursor:"pointer",color:"#52525b"},WH={...JI,background:"#2563eb",borderColor:"#2563eb",color:"#fff"},XH={border:"1px solid #d4d4d8",borderRadius:4,background:"#fff",color:"#3f3f46",font:"inherit",fontSize:12,lineHeight:1.4,padding:"2px 6px",maxWidth:150};function ar({active:t,title:e,onClick:n,style:r,children:i}){return I.jsx("button",{type:"button",title:e,"data-mdx-action":"format",onMouseDown:s=>s.preventDefault(),onClick:n,style:{...t?WH:JI,...r},children:i})}function qI({editor:t,listStyles:e,media:n,mediaContext:r,field:i,onInsertComponent:s}){const o=HH(t),[u,c]=ae.useState(!1),[h,d]=ae.useState(!1),[g,y]=ae.useState(!1),[b,k]=ae.useState(null),E=t===null,N=(e?.length??0)>0,M=o.bulletList||o.orderedList,j=o.listStyle&&e?.some(L=>L.class===o.listStyle)?o.listStyle:"",P=L=>{if(c(!1),!t)return;t.ctx.get(gn).focus(),t.action(ki(o.link?iv.key:rv.key,{href:L}))},U=()=>{if(c(!1),!t)return;const L=t.ctx.get(gn);L.focus(),Tq(L)};return I.jsxs("div",{children:[I.jsxs("div",{style:QH,children:[I.jsx(ar,{active:o.bold,title:"Bold",onClick:()=>t?.action(ki(Dg.key)),style:{fontWeight:700},children:"B"}),I.jsx(ar,{active:o.italic,title:"Italic",onClick:()=>t?.action(ki(Rg.key)),style:{fontStyle:"italic"},children:"I"}),I.jsx(ar,{active:o.strikethrough,title:"Strikethrough",onClick:()=>t?.action(ki(Hg.key)),style:{textDecoration:"line-through"},children:"S"}),I.jsx("span",{style:kx}),I.jsx(ar,{active:o.heading===2,title:"Heading 2",onClick:()=>t&&vx(t,2),children:"H2"}),I.jsx(ar,{active:o.heading===3,title:"Heading 3",onClick:()=>t&&vx(t,3),children:"H3"}),I.jsx(ar,{active:o.heading===4,title:"Heading 4",onClick:()=>t&&vx(t,4),children:"H4"}),I.jsx("span",{style:kx}),I.jsx(ar,{active:o.bulletList,title:"Bullet list",onClick:()=>t&&iT(t,"bullet"),children:"• List"}),I.jsx(ar,{active:o.orderedList,title:"Numbered list",onClick:()=>t&&iT(t,"ordered"),children:"1. List"}),N?I.jsxs("select",{title:"List style","aria-label":"List style",disabled:E||!M,value:j,onChange:L=>{t&&KH(t,L.currentTarget.value||null)},style:{...XH,opacity:E||!M?.55:1,cursor:E||!M?"not-allowed":"default"},children:[I.jsx("option",{value:"",children:"Default"}),e?.map(L=>I.jsx("option",{value:L.class,children:L.label},L.class))]}):null,I.jsx(ar,{active:o.blockquote,title:"Quote",onClick:()=>t?.action(ki(zg.key)),children:"❝"}),I.jsx(ar,{title:"Insert table",onClick:()=>t?.action(ki(ck.key,{row:3,col:3})),children:"▦ Table"}),I.jsx(ar,{active:g,title:"Insert YouTube",onClick:()=>!E&&y(L=>!L),children:"YouTube"}),I.jsx("span",{style:kx}),I.jsx(ar,{active:o.link||u,title:"Link",onClick:()=>!E&&c(L=>!L),children:"🔗 Link"}),n?I.jsx(ar,{title:"Insert image",onClick:()=>!E&&d(!0),children:"🖼 Image"}):null,s?I.jsxs(I.Fragment,{children:[I.jsx("span",{style:{flex:1}}),I.jsx(ar,{title:"Insert component block",onClick:()=>!E&&s(),style:{border:"1px solid #d4d4d8",color:"#3f3f46"},children:"+ Component"})]}):null]}),u?I.jsx("div",{style:{padding:"0 6px"},children:I.jsx(dq,{initialUrl:o.linkHref??"https://",isEdit:o.link,onApply:P,onRemove:o.link?U:void 0,onClose:()=>c(!1)})}):null,g?I.jsx("div",{style:{padding:"0 6px"},children:I.jsx(qH,{onApply:L=>{y(!1),t&&YH(t,L)},onClose:()=>y(!1)})}):null,b?I.jsx("div",{style:{padding:"0 6px"},children:I.jsx(gq,{initialAlt:b.alt,onApply:(L,C)=>{const{url:z}=b;k(null),t&&GH(t,z,L,C)},onClose:()=>k(null)})}):null,h&&n?I.jsx(_I,{media:n,context:r,field:i,accept:"image/*",onSelect:(L,C)=>{d(!1),t&&k({url:L,alt:C??""})},onClose:()=>d(!1)}):null]})}function ZH(){return{enter:{mdxFlowExpression:tK,mdxTextExpression:nK},exit:{mdxFlowExpression:sT,mdxFlowExpressionChunk:aT,mdxTextExpression:sT,mdxTextExpressionChunk:aT}}}function eK(){return{handlers:{mdxFlowExpression:oT,mdxTextExpression:oT},unsafe:[{character:"{",inConstruct:["phrasing"]},{atBreak:!0,character:"{"}]}}function tK(t){this.enter({type:"mdxFlowExpression",value:""},t),this.buffer()}function nK(t){this.enter({type:"mdxTextExpression",value:""},t),this.buffer()}function sT(t){const e=this.resume(),n=t.estree,r=this.stack[this.stack.length-1];r.type==="mdxFlowExpression"||r.type,this.exit(t),r.value=e,n&&(r.data={estree:n})}function aT(t){this.config.enter.data.call(this,t),this.config.exit.data.call(this,t)}function oT(t,e,n){const r=t.value||"";return"{"+n.indentLines(r,function(s,o,u){return(o===0||u?"":" ")+s})+"}"}const HI=" ";function rK(){return{canContainEols:["mdxJsxTextElement"],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:g,mdxJsxFlowTagExpressionAttribute:y,mdxJsxFlowTagAttributeValueLiteral:t,mdxJsxFlowTagAttributeValueExpression:t,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:g,mdxJsxTextTagExpressionAttribute:y,mdxJsxTextTagAttributeValueLiteral:t,mdxJsxTextTagAttributeValueExpression:t,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:u,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:h,mdxJsxFlowTagNameLocal:d,mdxJsxFlowTagExpressionAttribute:b,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:k,mdxJsxFlowTagAttributeNameLocal:E,mdxJsxFlowTagAttributeValueLiteral:N,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:M,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:j,mdxJsxFlowTag:P,mdxJsxTextTagClosingMarker:u,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:h,mdxJsxTextTagNameLocal:d,mdxJsxTextTagExpressionAttribute:b,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:k,mdxJsxTextTagAttributeNameLocal:E,mdxJsxTextTagAttributeValueLiteral:N,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:M,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:j,mdxJsxTextTag:P}};function t(){this.buffer()}function e(z){return{line:z.line,column:z.column,offset:z.offset}}function n(z){this.config.enter.data.call(this,z),this.config.exit.data.call(this,z)}function r(z){const G={name:void 0,attributes:[],close:!1,selfClosing:!1,start:z.start,end:z.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=G,this.buffer()}function i(z){if(this.data.mdxJsxTagStack.length===0)throw new mt("Unexpected closing slash `/` in tag, expected an open tag first",{start:z.start,end:z.end},"mdast-util-mdx-jsx:unexpected-closing-slash")}function s(z){if(this.data.mdxJsxTag.close)throw new mt("Unexpected attribute in closing tag, expected the end of the tag",{start:z.start,end:z.end},"mdast-util-mdx-jsx:unexpected-attribute")}function o(z){if(this.data.mdxJsxTag.close)throw new mt("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:z.start,end:z.end},"mdast-util-mdx-jsx:unexpected-self-closing-slash")}function u(){const z=this.data.mdxJsxTag;z.close=!0}function c(z){const G=this.data.mdxJsxTag;G.name=this.sliceSerialize(z)}function h(z){const G=this.data.mdxJsxTag;G.name+="."+this.sliceSerialize(z)}function d(z){const G=this.data.mdxJsxTag;G.name+=":"+this.sliceSerialize(z)}function g(z){const G=this.data.mdxJsxTag;s.call(this,z),G.attributes.push({type:"mdxJsxAttribute",name:"",value:null,position:{start:e(z.start),end:void 0}})}function y(z){const G=this.data.mdxJsxTag;s.call(this,z),G.attributes.push({type:"mdxJsxExpressionAttribute",value:"",position:{start:e(z.start),end:void 0}}),this.buffer()}function b(z){const G=this.data.mdxJsxTag,J=G.attributes[G.attributes.length-1];J.type;const K=z.estree;J.value=this.resume(),J.position,J.position.end=e(z.end),K&&(J.data={estree:K})}function k(z){const G=this.data.mdxJsxTag,J=G.attributes[G.attributes.length-1];J.type,J.name=this.sliceSerialize(z),J.position,J.position.end=e(z.end)}function E(z){const G=this.data.mdxJsxTag,J=G.attributes[G.attributes.length-1];J.type,J.name+=":"+this.sliceSerialize(z),J.position,J.position.end=e(z.end)}function N(z){const G=this.data.mdxJsxTag,J=G.attributes[G.attributes.length-1];J.value=Kg(this.resume(),{nonTerminated:!1}),J.position,J.position.end=e(z.end)}function M(z){const G=this.data.mdxJsxTag,J=G.attributes[G.attributes.length-1];J.type;const K={type:"mdxJsxAttributeValueExpression",value:this.resume()},de=z.estree;de&&(K.data={estree:de}),J.value=K,J.position,J.position.end=e(z.end)}function j(){const z=this.data.mdxJsxTag;z.selfClosing=!0}function P(z){const G=this.data.mdxJsxTag,J=this.data.mdxJsxTagStack,K=J[J.length-1];if(G.close&&K.name!==G.name)throw new mt("Unexpected closing tag `"+C(G)+"`, expected corresponding closing tag for `"+C(K)+"` ("+Ms(K)+")",{start:z.start,end:z.end},"mdast-util-mdx-jsx:end-tag-mismatch");this.resume(),G.close?J.pop():this.enter({type:z.type==="mdxJsxTextTag"?"mdxJsxTextElement":"mdxJsxFlowElement",name:G.name||null,attributes:G.attributes,children:[]},z,U),G.selfClosing||G.close?this.exit(z,L):J.push(G)}function U(z,G){const J=this.data.mdxJsxTagStack,K=J[J.length-1],de=z?" before the end of `"+z.type+"`":"",ce=z?{start:z.start,end:z.end}:void 0;throw new mt("Expected a closing tag for `"+C(K)+"` ("+Ms({start:G.start,end:G.end})+")"+de,ce,"mdast-util-mdx-jsx:end-tag-mismatch")}function L(z,G){const J=this.data.mdxJsxTag;throw new mt("Expected the closing tag `"+C(J)+"` either after the end of `"+G.type+"` ("+Ms(G.end)+") or another opening tag after the start of `"+G.type+"` ("+Ms(G.start)+")",{start:z.start,end:z.end},"mdast-util-mdx-jsx:end-tag-mismatch")}function C(z){return"<"+(z.close?"/":"")+(z.name||"")+">"}}function iK(t){const e=t||{},n=e.quote||'"',r=e.quoteSmart||!1,i=e.tightSelfClosing||!1,s=e.printWidth||Number.POSITIVE_INFINITY,o=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return u.peek=aK,{handlers:{mdxJsxFlowElement:u,mdxJsxTextElement:u},unsafe:[{character:"<",inConstruct:["phrasing"]},{atBreak:!0,character:"<"}],fences:!0,resourceLink:!0};function u(c,h,d,g){const y=c.type==="mdxJsxFlowElement",b=c.name?!c.children||c.children.length===0:!1,k=KI(d),E=GI(k),N=d.createTracker(g),M=d.createTracker(g),j=[],P=(y?E:"")+"<"+(c.name||""),U=d.enter(c.type);if(N.move(P),M.move(P),c.attributes&&c.attributes.length>0){if(!c.name)throw new Error("Cannot serialize fragment w/ attributes");let J=-1;for(;++J<c.attributes.length;){const K=c.attributes[J];let de;if(K.type==="mdxJsxExpressionAttribute")de="{"+(K.value||"")+"}";else{if(!K.name)throw new Error("Cannot serialize attribute w/o name");const ce=K.value,Se=K.name;let Re="";if(ce!=null)if(typeof ce=="object")Re="{"+(ce.value||"")+"}";else{const Y=r&&Zm(ce,n)>Zm(ce,o)?o:n;Re=Y+qq(ce,{subset:[Y]})+Y}de=Se+(Re?"=":"")+Re}j.push(de)}}let L=!1;const C=j.join(" ");y&&(/\r?\n|\r/.test(C)||N.current().now.column+C.length+(b?i?2:3:1)>s)&&(L=!0);let z=N,G=P;if(L){z=M;let J=-1;for(;++J<j.length;)j[J]=E+HI+j[J];G+=z.move(`
|
package/dist/spa/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
html, body, #nua-studio-root { height: 100%; margin: 0; }
|
|
9
9
|
body { background: #f8fafc; }
|
|
10
10
|
</style>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-hsoq6odv.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./assets/index-GbeaN-XG.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"directory": "packages/cms-studio"
|
|
15
15
|
},
|
|
16
16
|
"license": "Apache-2.0",
|
|
17
|
-
"version": "0.46.
|
|
17
|
+
"version": "0.46.1",
|
|
18
18
|
"module": "src/index.ts",
|
|
19
19
|
"types": "src/index.ts",
|
|
20
20
|
"type": "module",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"cms-studio": "src/cli.ts"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@nuasite/cms-core": "0.46.
|
|
33
|
-
"@nuasite/cms-sidecar": "0.46.
|
|
32
|
+
"@nuasite/cms-core": "0.46.1",
|
|
33
|
+
"@nuasite/cms-sidecar": "0.46.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@nuasite/collections-admin": "0.46.
|
|
36
|
+
"@nuasite/collections-admin": "0.46.1",
|
|
37
37
|
"@types/bun": "1.3.11",
|
|
38
38
|
"@types/react": "^19.2.7",
|
|
39
39
|
"@types/react-dom": "^19.2.3",
|