@codename/deck 0.1.0 → 0.1.2

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.
package/dist/deck.js CHANGED
@@ -1,28 +1,36 @@
1
1
  "use strict";(()=>{function Oe(t){let e=t.replace(/\r\n?/g,`
2
2
  `).split(`
3
- `).map(r=>({indent:r.length-r.trimStart().length,text:gn(r).trimEnd(),raw:r})),s=Ce(e,{i:0},0);return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}function gn(t){let e="";for(let n=0;n<t.length;n++){let s=t[n];if(e)s===e&&(e="");else if(s==='"'||s==="'")e=s;else if(s==="#"&&(n===0||/\s/.test(t[n-1])))return t.slice(0,n)}return t}function Ce(t,e,n){for(;e.i<t.length&&!t[e.i].text.trim();)e.i++;if(e.i>=t.length||t[e.i].indent<n)return null;let s=t[e.i].indent;if(/^-(\s|$)/.test(t[e.i].text.trim())){let i=[];for(;e.i<t.length;){let a=t[e.i];if(!a.text.trim()){e.i++;continue}if(a.indent!==s||!/^-(\s|$)/.test(a.text.trim()))break;let o=a.text.trim().slice(1).trim();if(e.i++,!o)i.push(Ce(t,e,s+1));else if(/^[^'"[{][^:]*:(\s|$)/.test(o)){let l=a.raw.indexOf(o);t.splice(e.i,0,{indent:l,text:" ".repeat(l)+o,raw:" ".repeat(l)+o}),i.push(Ce(t,e,l))}else i.push(Te(o))}return i}let r={};for(;e.i<t.length;){let i=t[e.i];if(!i.text.trim()){e.i++;continue}if(i.indent!==s)break;let a=/^("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^:]+?)\s*:(?:\s+(.*))?$/.exec(i.text.trim());if(e.i++,!a)continue;let o=String(Te(a[1])),l=(a[2]??"").trim();l==="|"||l===">"||/^[|>][+-]$/.test(l)?r[o]=mn(t,e,s,l[0]===">"):l?r[o]=Te(l):r[o]=Ce(t,e,s+1)}return r}function mn(t,e,n,s){let r=[];for(;e.i<t.length&&(!t[e.i].raw.trim()||t[e.i].indent>n);)r.push(t[e.i++].raw);for(;r.length&&!r.at(-1)?.trim();)r.pop();let i=Math.min(...r.filter(o=>o.trim()).map(o=>o.length-o.trimStart().length)),a=r.map(o=>o.slice(i)).join(`
4
- `);return s?a.replace(/([^\n])\n(?=[^\n])/g,"$1 "):a}function Te(t){let e=t.trim();if(e.startsWith("[")||e.startsWith("{")){let n=yt(e,{i:0});if(n!==void 0)return n}if(/^"(?:[^"\\]|\\.)*"$/.test(e))try{return JSON.parse(e)}catch{return e.slice(1,-1)}return/^'(?:[^']|'')*'$/.test(e)?e.slice(1,-1).replace(/''/g,"'"):/^(true|yes|on)$/i.test(e)?!0:/^(false|no|off)$/i.test(e)?!1:/^(null|~)$/i.test(e)||e===""?null:/^[-+]?(\d+\.?\d*|\.\d+)(e[-+]?\d+)?$/i.test(e)?Number(e):e}function yt(t,e){let n=()=>{for(;/\s/.test(t[e.i]??"");)e.i++},s=()=>{if(n(),t[e.i]==="["||t[e.i]==="{")return yt(t,e);let a=e.i;if(t[e.i]==='"'||t[e.i]==="'"){let o=t[e.i++];for(;e.i<t.length&&!(t[e.i]===o&&t[e.i-1]!=="\\");)e.i++;e.i++}else for(;e.i<t.length&&!/[,\]}]/.test(t[e.i])&&!(t[e.i]===":"&&/^[\s,\]}]?$/.test(t[e.i+1]??""));)e.i++;return Te(t.slice(a,e.i))},r=t[e.i++];if(n(),r==="["){let a=[];for(;e.i<t.length&&t[e.i]!=="]";){if(a.push(s()),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="]")return;n()}return e.i++,a}let i={};for(;e.i<t.length&&t[e.i]!=="}";){let a=s();if(n(),t[e.i]!==":")return;if(e.i++,i[String(a)]=s(),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="}")return;n()}return e.i++,i}var kn=/^::([\w-]+)::\s*$/;function Ie(t){let n=t.replace(/\r\n?/g,`
3
+ `).map(r=>({indent:r.length-r.trimStart().length,text:gn(r).trimEnd(),raw:r})),s=Ce(e,{i:0},0);return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}function gn(t){let e="";for(let n=0;n<t.length;n++){let s=t[n];if(e)s===e&&(e="");else if(s==='"'||s==="'")e=s;else if(s==="#"&&(n===0||/\s/.test(t[n-1])))return t.slice(0,n)}return t}function Ce(t,e,n){for(;e.i<t.length&&!t[e.i].text.trim();)e.i++;if(e.i>=t.length||t[e.i].indent<n)return null;let s=t[e.i].indent;if(/^-(\s|$)/.test(t[e.i].text.trim())){let i=[];for(;e.i<t.length;){let a=t[e.i];if(!a.text.trim()){e.i++;continue}if(a.indent!==s||!/^-(\s|$)/.test(a.text.trim()))break;let l=a.text.trim().slice(1).trim();if(e.i++,!l)i.push(Ce(t,e,s+1));else if(/^[^'"[{][^:]*:(\s|$)/.test(l)){let o=a.raw.indexOf(l);t.splice(e.i,0,{indent:o,text:" ".repeat(o)+l,raw:" ".repeat(o)+l}),i.push(Ce(t,e,o))}else i.push(Te(l))}return i}let r={};for(;e.i<t.length;){let i=t[e.i];if(!i.text.trim()){e.i++;continue}if(i.indent!==s)break;let a=/^("(?:[^"\\]|\\.)*"|'(?:[^']|'')*'|[^:]+?)\s*:(?:\s+(.*))?$/.exec(i.text.trim());if(e.i++,!a)continue;let l=String(Te(a[1])),o=(a[2]??"").trim();o==="|"||o===">"||/^[|>][+-]$/.test(o)?r[l]=mn(t,e,s,o[0]===">"):o?r[l]=Te(o):r[l]=Ce(t,e,s+1)}return r}function mn(t,e,n,s){let r=[];for(;e.i<t.length&&(!t[e.i].raw.trim()||t[e.i].indent>n);)r.push(t[e.i++].raw);for(;r.length&&!r.at(-1)?.trim();)r.pop();let i=Math.min(...r.filter(l=>l.trim()).map(l=>l.length-l.trimStart().length)),a=r.map(l=>l.slice(i)).join(`
4
+ `);return s?a.replace(/([^\n])\n(?=[^\n])/g,"$1 "):a}function Te(t){let e=t.trim();if(e.startsWith("[")||e.startsWith("{")){let n=yt(e,{i:0});if(n!==void 0)return n}if(/^"(?:[^"\\]|\\.)*"$/.test(e))try{return JSON.parse(e)}catch{return e.slice(1,-1)}return/^'(?:[^']|'')*'$/.test(e)?e.slice(1,-1).replace(/''/g,"'"):/^(true|yes|on)$/i.test(e)?!0:/^(false|no|off)$/i.test(e)?!1:/^(null|~)$/i.test(e)||e===""?null:/^[-+]?(\d+\.?\d*|\.\d+)(e[-+]?\d+)?$/i.test(e)?Number(e):e}function yt(t,e){let n=()=>{for(;/\s/.test(t[e.i]??"");)e.i++},s=()=>{if(n(),t[e.i]==="["||t[e.i]==="{")return yt(t,e);let a=e.i;if(t[e.i]==='"'||t[e.i]==="'"){let l=t[e.i++];for(;e.i<t.length&&!(t[e.i]===l&&t[e.i-1]!=="\\");)e.i++;e.i++}else for(;e.i<t.length&&!/[,\]}]/.test(t[e.i])&&!(t[e.i]===":"&&/^[\s,\]}]?$/.test(t[e.i+1]??""));)e.i++;return Te(t.slice(a,e.i))},r=t[e.i++];if(n(),r==="["){let a=[];for(;e.i<t.length&&t[e.i]!=="]";){if(a.push(s()),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="]")return;n()}return e.i++,a}let i={};for(;e.i<t.length&&t[e.i]!=="}";){let a=s();if(n(),t[e.i]!==":")return;if(e.i++,i[String(a)]=s(),n(),t[e.i]===",")e.i++;else if(t[e.i]!=="}")return;n()}return e.i++,i}var kn=/^::([\w-]+)::\s*$/;function Ie(t){let n=t.replace(/\r\n?/g,`
5
5
  `).split(`
6
- `),s=[0];for(let c of n)s.push(s.at(-1)+c.length+1);let r=[],i=0,a=null,o=!1;for(let c=0;c<n.length;c++){let p=n[c].trimEnd();if(o){o=wt(p,!0);continue}if(p.startsWith("---")&&!/^---\s*-/.test(p)){if((c>i||a)&&r.push({start:i,end:c,matter:a}),a=null,i=c+1,p[3]!=="-"&&n[c+1]?.trim()&&/^\s*([\w-]+\s*:|#\s)/.test(n[c+1])&&!/^#{1,6}\s/.test(n[c+1])){let u=c+1;for(;u<n.length&&n[u].trimEnd()!=="---";)u++;a=[c+1,u],c=u,i=u+1}}else if(/^\s*(`{3,}|~{3,})/.test(p)){let u=/^\s*(`{3,}|~{3,})/.exec(p)[1],h=c+1;for(;h<n.length&&!n[h].trimStart().startsWith(u);)h++;h<n.length&&(c=h)}else o=wt(p,!1)}(i<n.length||a)&&r.push({start:i,end:n.length,matter:a});let l=r.at(-1);if(r.length===1&&l){let c="",p=[];for(let u=l.start;u<l.end;u++){let h=/^\s*(`{3,}|~{3,})/.exec(n[u])?.[1];c?h&&n[u].trimStart().startsWith(c)&&(c=""):h?c=h:/^#{1,2}\s+\S/.test(n[u])&&p.push(u)}if(p.length>=2){r.pop();let u=p[0]>l.start&&!n.slice(l.start,p[0]).some(h=>h.trim())?p:[l.start,...p.slice(p[0]===l.start?1:0)];u.forEach((h,f)=>r.push({start:f===0?l.start:h,end:u[f+1]??l.end,matter:f===0?l.matter:null}))}}let d=r.map(({start:c,end:p,matter:u},h)=>xn(n,s,c,p,u,h)).filter((c,p)=>p===0||c.slots.some(u=>u.text.trim())||Object.keys(c.settings).length);return d.forEach((c,p)=>{c.index=p}),{settings:d[0]?.settings??{},slides:d}}function bn(t){let e=new Map,n=t.findIndex(o=>/^:{3,}[ \t]*\{?[ \t]*\.?columns\b/.test(o));if(n<0)return e;let s=/^:+/.exec(t[n])[0],r=t.findIndex((o,l)=>l>n&&o.trim()===s),i=t.map((o,l)=>[o,l]).filter(([o,l])=>Number(l)>n&&(r<0||Number(l)<r)&&/^:{3,}[ \t]*\{?[ \t]*\.?col(umn)?\b/.test(String(o))).map(([,o])=>Number(o));if(i.length<2)return e;let a=i.length===2?["left","right"]:["left","middle","right",...i.slice(3).map((o,l)=>`col-${l+4}`)];return i.forEach((o,l)=>e.set(o,a[l])),r>0&&t.slice(r+1).some(o=>o.trim())&&e.set(r,"bottom"),e}function wt(t,e){let n=0;for(;;)if(e){let s=t.indexOf("-->",n);if(s<0)return!0;e=!1,n=s+3}else{let s=t.indexOf("<!--",n);if(s<0)return!1;let r=t.indexOf("-->",s+4);if(r<0)return!0;n=r+3}}function xn(t,e,n,s,r,i){let a=r?Oe(t.slice(r[0],r[1]).join(`
7
- `)):{},o=n;for(;o<s&&!t[o].trim();)o++;if(!r&&/^```ya?ml\s*$/.test(t[o]??"")){let E=o+1;for(;E<s&&!t[E].startsWith("```");)E++;a=Oe(t.slice(o+1,E).join(`
8
- `)),n=E+1}let l=t.slice(n,s).join(`
9
- `),d="",c=/^(\?\?\?|Notes?:)[ \t]*(.*)$/m.exec(l);c&&c.index!==void 0&&!/^```/m.test(l.slice(c.index))&&(d=[c[2],l.slice(c.index+c[0].length)].join(`
10
- `).trim(),l=l.slice(0,c.index)),l=l.replace(/<aside\b[^>]*class=["']?notes["']?[^>]*>([\s\S]*?)<\/aside>/gi,(E,C)=>(d+=(d?`
11
- `:"")+C.replace(/<[^>]*>/g," ").replace(/[ \t]+/g," ").trim(),E.replace(/[^\n]/g," "))),l=l.replace(/^(:{3,})[ \t]*\{?[ \t]*\.?notes[ \t]*\}?[ \t]*\n([\s\S]*?)\n\1[ \t]*$/gm,(E,C,F)=>(d+=(d?`
12
- `:"")+F.trim(),E.replace(/[^\n]/g," ")));let u=[...l.matchAll(/<!--([\s\S]*?)-->/g)].at(-1);u&&u.index!==void 0&&!l.slice(u.index+u[0].length).trim()&&(d=[u[1].trim(),d].filter(Boolean).join(`
13
- `),l=l.slice(0,u.index));let h=[],f="default",k=n,m="",w=[],y=()=>h.push({name:f,text:w.join(`
14
- `),start:e[k]}),_=bn(l.split(`
15
- `));for(let[E,C]of l.split(`
16
- `).entries()){let F=/^\s*(`{3,}|~{3,})/.exec(C)?.[1],X=kn.exec(C)??(_.has(E)?[C,_.get(E)]:null);if(m)F&&C.trimStart().startsWith(m)&&(m="");else if(F)m=F;else if(X){y(),f=X[1],w=[],k=n+E+1;continue}w.push(C)}y();let U=h.filter((E,C)=>C>0||E.text.trim()||h.length===1),N=/^#{1,6}\s+(.+)$/m.exec(l.replace(/^```[\s\S]*?^```/gm,""));return{index:i,start:e[r?r[0]-1:n],end:e[s]-1,settings:a,slots:U,notes:d,title:String(a.title??N?.[1]??"").trim()}}function Fe(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var de=Fe();function Lt(t){de=t}var le={exec:()=>null};function he(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(j.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var yn=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),j={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:he(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:he(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:he(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:he(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:he(t=>new RegExp(`^ {0,${t}}(?:</?(?:${ye})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:he(t=>new RegExp(`^ {0,${t}}>`))},wn=/^(?:[ \t]*(?:\n|$))+/,Sn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$n=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ze=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Mt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jt=S(Mt).replace(/bull/g,Ze).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),An=S(Mt).replace(/bull/g,Ze).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),He=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,zn=/^[^\n]+/,Ue=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Cn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ue).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Tn=S(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Ze).getRegex(),ye="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",We=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Rn=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",We).replace("tag",ye).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_t=t=>S(He).replace("hr",xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",ye).getRegex(),En=_t(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Pn=_t(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ln=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Pn).getRegex(),Ge={blockquote:Ln,code:Sn,def:Cn,fences:vn,heading:$n,hr:xe,html:Rn,lheading:jt,list:Tn,newline:wn,paragraph:En,table:le,text:zn},St=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",ye).getRegex(),Mn={...Ge,lheading:An,table:St,paragraph:S(He).replace("hr",xe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",St).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",ye).getRegex()},jn={...Ge,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",We).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:le,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(He).replace("hr",xe).replace("heading",` *#{1,6} *[^
17
- ]`).replace("lheading",jt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_n=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,On=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ot=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,In=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ee=/[\p{P}\p{S}]/u,fe=/[\s\p{P}\p{S}]/u,we=/[^\s\p{P}\p{S}]/u,Nn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,fe).getRegex(),qn=/[\p{Pi}\p{Ps}"']/u,It=/(?!~)[\p{P}\p{S}]/u,Dn=/(?!~)[\s\p{P}\p{S}]/u,Bn=/(?:[^\s\p{P}\p{S}]|~)/u,Fn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Nt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Zn=S(Nt,"u").replace(/punct/g,ee).getRegex(),Hn=S(Nt,"u").replace(/punct/g,It).getRegex(),Un=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Wn=S(Un,"u").replace(/openQuote/g,qn).replace(/punct/g,ee).getRegex(),qt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gn=S(qt,"gu").replace(/notPunctSpace/g,we).replace(/punctSpace/g,fe).replace(/punct/g,ee).getRegex(),Qn=S(qt,"gu").replace(/notPunctSpace/g,Bn).replace(/punctSpace/g,Dn).replace(/punct/g,It).getRegex(),Vn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Xn=S(Vn,"gu").replace(/notPunctSpace/g,we).replace(/punctSpace/g,fe).replace(/punct/g,ee).getRegex(),Kn=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,we).replace(/punctSpace/g,fe).replace(/punct/g,ee).getRegex(),Jn="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Yn=S(Jn,"gu").replace(/notPunctSpace/g,we).replace(/punctSpace/g,fe).replace(/punct/g,ee).getRegex(),er=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ee).getRegex(),tr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",nr=S(tr,"gu").replace(/notPunctSpace/g,we).replace(/punctSpace/g,fe).replace(/punct/g,ee).getRegex(),rr=S(/\\(punct)/,"gu").replace(/punct/g,ee).getRegex(),sr=S(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ee).getRegex(),ir=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ar=S(We).replace("(?:-->|$)","-->").getRegex(),or=S("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ar).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Dt=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ee=S(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Dt).getRegex(),lr=S(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Ee).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cr=S(/^!?\[(label)\]\[(ref)\]/).replace("label",Ee).replace("ref",Ue).getRegex(),dr=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ue).getRegex(),vt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,pr=S(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Dt).getRegex(),ur=S("reflink|nolink(?!\\()","g").replace("reflink",S(/^!?\[(label)\]\[(ref)\]/).replace("label",pr).replace("ref",vt).getRegex()).replace("nolink",S(/^!?\[(ref)\](?:\[\])?/).replace("ref",vt).getRegex()).getRegex(),$t=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,hr=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,fr=S(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,hr).getRegex(),Qe={_backpedal:le,anyPunctuation:rr,anyPunctuationOutsideCode:sr,autolink:ir,blockSkip:Fn,br:Ot,code:On,del:le,delLDelim:le,delRDelim:le,emStrongLDelim:Zn,emStrongRDelimAst:Gn,emStrongRDelimUnd:Kn,escape:_n,link:lr,nolink:dr,punctuation:Nn,reflink:cr,reflinkSearch:ur,tag:or,text:In,url:le},gr={...Qe,emStrongLDelim:Wn,emStrongRDelimAst:Xn,emStrongRDelimUnd:Yn,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",Ee).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ee).getRegex()},qe={...Qe,emStrongRDelimAst:Qn,emStrongLDelim:Hn,delLDelim:er,delRDelim:nr,url:S(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",fr).replace("protocol",$t).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",$t).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},mr={...qe,br:S(Ot).replace("{2,}","*").getRegex(),text:S(qe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Re={normal:Ge,gfm:Mn,pedantic:jn},ke={normal:Qe,gfm:qe,breaks:mr,pedantic:gr},kr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},At=t=>kr[t];function W(t,e){if(e){if(j.escapeTest.test(t))return t.replace(j.escapeReplace,At)}else if(j.escapeTestNoEncode.test(t))return t.replace(j.escapeReplaceNoEncode,At);return t}function br(t){return j.numericCharacterReference.test(t)?t.replace(j.numericCharacterReferenceOrAmpersand,(e,n,s)=>{if(n===void 0&&s===void 0)return"&amp;";let r=n===void 0?Number.parseInt(s,16):Number.parseInt(n,10);return r===0||r>1114111||r>=55296&&r<=57343?"�":r===38?"&amp;":String.fromCodePoint(r)}):t}function zt(t){try{t=encodeURI(t).replace(j.percentDecode,"%")}catch{return null}return t}function Ct(t,e){let n=t.replace(j.findPipe,(i,a,o)=>{let l=!1,d=a;for(;--d>=0&&o[d]==="\\";)l=!l;return l?"|":" |"}),s=n.split(j.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(j.slashPipe,"|");return s}function ie(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s;){let i=t.charAt(s-r-1);if(i===e&&!n)r++;else if(i!==e&&n)r++;else break}return t.slice(0,s-r)}function Tt(t){let e=t.split(`
6
+ `),s=[0];for(let c of n)s.push(s.at(-1)+c.length+1);let r=[],i=0,a=null,l=!1;for(let c=0;c<n.length;c++){let p=n[c].trimEnd();if(l){l=wt(p,!0);continue}if(p.startsWith("---")&&!/^---\s*-/.test(p)){if((c>i||a)&&r.push({start:i,end:c,matter:a}),a=null,i=c+1,p[3]!=="-"&&n[c+1]?.trim()&&/^\s*([\w-]+\s*:|#\s)/.test(n[c+1])&&!/^#{1,6}\s/.test(n[c+1])){let u=c+1;for(;u<n.length&&n[u].trimEnd()!=="---";)u++;a=[c+1,u],c=u,i=u+1}}else if(/^\s*(`{3,}|~{3,})/.test(p)){let u=/^\s*(`{3,}|~{3,})/.exec(p)[1],h=c+1;for(;h<n.length&&!n[h].trimStart().startsWith(u);)h++;h<n.length&&(c=h)}else l=wt(p,!1)}(i<n.length||a)&&r.push({start:i,end:n.length,matter:a});let o=r.at(-1);if(r.length===1&&o){let c="",p=[];for(let u=o.start;u<o.end;u++){let h=/^\s*(`{3,}|~{3,})/.exec(n[u])?.[1];c?h&&n[u].trimStart().startsWith(c)&&(c=""):h?c=h:/^#{1,2}\s+\S/.test(n[u])&&p.push(u)}if(p.length>=2){r.pop();let u=p[0]>o.start&&!n.slice(o.start,p[0]).some(h=>h.trim())?p:[o.start,...p.slice(p[0]===o.start?1:0)];u.forEach((h,f)=>r.push({start:f===0?o.start:h,end:u[f+1]??o.end,matter:f===0?o.matter:null}))}}let d=r.map(({start:c,end:p,matter:u},h)=>xn(n,s,c,p,u,h)).filter((c,p)=>p===0||c.slots.some(u=>u.text.trim())||Object.keys(c.settings).length);return d.forEach((c,p)=>{c.index=p}),{settings:d[0]?.settings??{},slides:d}}function bn(t){let e=new Map,n=t.findIndex(l=>/^:{3,}[ \t]*\{?[ \t]*\.?columns\b/.test(l));if(n<0)return e;let s=/^:+/.exec(t[n])[0],r=t.findIndex((l,o)=>o>n&&l.trim()===s),i=t.map((l,o)=>[l,o]).filter(([l,o])=>Number(o)>n&&(r<0||Number(o)<r)&&/^:{3,}[ \t]*\{?[ \t]*\.?col(umn)?\b/.test(String(l))).map(([,l])=>Number(l));if(i.length<2)return e;let a=i.length===2?["left","right"]:["left","middle","right",...i.slice(3).map((l,o)=>`col-${o+4}`)];return i.forEach((l,o)=>e.set(l,a[o])),r>0&&t.slice(r+1).some(l=>l.trim())&&e.set(r,"bottom"),e}function wt(t,e){let n=0;for(;;)if(e){let s=t.indexOf("-->",n);if(s<0)return!0;e=!1,n=s+3}else{let s=t.indexOf("<!--",n);if(s<0)return!1;let r=t.indexOf("-->",s+4);if(r<0)return!0;n=r+3}}function xn(t,e,n,s,r,i){let a=r?Oe(t.slice(r[0],r[1]).join(`
7
+ `)):{},l=n;for(;l<s&&!t[l].trim();)l++;if(!r&&/^```ya?ml\s*$/.test(t[l]??"")){let E=l+1;for(;E<s&&!t[E].startsWith("```");)E++;a=Oe(t.slice(l+1,E).join(`
8
+ `)),n=E+1}let o=t.slice(n,s).join(`
9
+ `),d="",c=/^(\?\?\?|Notes?:)[ \t]*(.*)$/m.exec(o);c&&c.index!==void 0&&!/^```/m.test(o.slice(c.index))&&(d=[c[2],o.slice(c.index+c[0].length)].join(`
10
+ `).trim(),o=o.slice(0,c.index)),o=o.replace(/<aside\b[^>]*class=["']?notes["']?[^>]*>([\s\S]*?)<\/aside>/gi,(E,C)=>(d+=(d?`
11
+ `:"")+C.replace(/<[^>]*>/g," ").replace(/[ \t]+/g," ").trim(),E.replace(/[^\n]/g," "))),o=o.replace(/^(:{3,})[ \t]*\{?[ \t]*\.?notes[ \t]*\}?[ \t]*\n([\s\S]*?)\n\1[ \t]*$/gm,(E,C,Z)=>(d+=(d?`
12
+ `:"")+Z.trim(),E.replace(/[^\n]/g," ")));let u=[...o.matchAll(/<!--([\s\S]*?)-->/g)].at(-1);u&&u.index!==void 0&&!o.slice(u.index+u[0].length).trim()&&(d=[u[1].trim(),d].filter(Boolean).join(`
13
+ `),o=o.slice(0,u.index));let h=[],f="default",k=n,m="",w=[],y=()=>h.push({name:f,text:w.join(`
14
+ `),start:e[k]}),_=bn(o.split(`
15
+ `));for(let[E,C]of o.split(`
16
+ `).entries()){let Z=/^\s*(`{3,}|~{3,})/.exec(C)?.[1],X=kn.exec(C)??(_.has(E)?[C,_.get(E)]:null);if(m)Z&&C.trimStart().startsWith(m)&&(m="");else if(Z)m=Z;else if(X){y(),f=X[1],w=[],k=n+E+1;continue}w.push(C)}y();let U=h.filter((E,C)=>C>0||E.text.trim()||h.length===1),q=/^#{1,6}\s+(.+)$/m.exec(o.replace(/^```[\s\S]*?^```/gm,""));return{index:i,start:e[r?r[0]-1:n],end:e[s]-1,settings:a,slots:U,notes:d,title:String(a.title??q?.[1]??"").trim()}}var vt=/^[a-z][a-z0-9-]{0,31}$/,yn=/^(auto|min-content|max-content|\d{1,2}(\.\d)?fr|\d{1,3}%)$/,wn=["Title Slide","Title and Content","Section Header","Two Content","Comparison","Title Only","Blank","Content with Caption","Picture with Caption"],St={align:["start","center","end"],justify:["start","center","end"],paper:["paper","fill","ink","soft"],title:["normal","large","huge"]},Ne={title:"cover","title-slide":"cover","two-columns":"two-cols","two-column":"two-cols",columns:"two-cols",comparison:"two-cols-header","three-columns":"three-cols","section-header":"section",divider:"section",big:"fact",number:"fact","image-text":"image-right",closing:"end",thanks:"end"},qe={name:"standard",tokens:{},layouts:Object.fromEntries(Object.entries({default:{label:{en:"Title and content",fr:"Titre et contenu"},pptx:"Title and Content"},cover:{label:{en:"Cover",fr:"Couverture"},justify:"center",paper:"fill",title:"huge",pptx:"Title Slide",numbered:!1},intro:{label:{en:"Introduction",fr:"Introduction"},justify:"center",paper:"fill",title:"large",pptx:"Title Slide",numbered:!1},section:{label:{en:"Section",fr:"Section"},justify:"center",paper:"ink",title:"huge",pptx:"Section Header",numbered:!1},center:{label:{en:"Centred",fr:"Centré"},justify:"center",align:"center",pptx:"Title Only"},statement:{label:{en:"Statement",fr:"Affirmation"},justify:"center",align:"center",title:"large",pptx:"Title Only"},fact:{label:{en:"Big number",fr:"Grand chiffre"},justify:"center",align:"center",title:"huge",pptx:"Title Only"},quote:{label:{en:"Quote",fr:"Citation"},justify:"center",pptx:"Title Only"},end:{label:{en:"Closing",fr:"Clôture"},justify:"center",align:"center",paper:"fill",title:"large",pptx:"Title Slide",numbered:!1},full:{label:{en:"Full",fr:"Plein cadre"},pptx:"Blank",numbered:!1},none:{label:{en:"Blank",fr:"Vide"},pptx:"Blank",numbered:!1},"two-cols":{label:{en:"Two columns",fr:"Deux colonnes"},slots:["default","right"],areas:"default right",columns:"1fr 1fr",pptx:"Two Content"},"two-cols-header":{label:{en:"Comparison",fr:"Comparaison"},slots:["default","left","right","bottom"],areas:"default default | left right | bottom bottom",columns:"1fr 1fr",rows:"auto 1fr auto",pptx:"Comparison"},"three-cols":{label:{en:"Three columns",fr:"Trois colonnes"},slots:["default","left","middle","right"],areas:"default default default | left middle right",columns:"1fr 1fr 1fr",rows:"auto 1fr",pptx:"Comparison"},"image-left":{label:{en:"Picture left",fr:"Image à gauche"},pptx:"Picture with Caption",justify:"center"},"image-right":{label:{en:"Picture right",fr:"Image à droite"},pptx:"Picture with Caption",justify:"center"},image:{label:{en:"Picture",fr:"Image"},pptx:"Blank",numbered:!1}}).map(([t,e])=>[t,$t(e).layout]))};function $t(t){let e=[];if(!t||typeof t!="object")return{layout:null,problems:["not a layout"]};let n={},s=Array.isArray(t.slots)||typeof t.slots=="string"?[t.slots].flat().map(String):t.slots&&typeof t.slots=="object"?Object.entries(t.slots).map(([f,k])=>(k&&typeof k=="object"&&(n[f]=Sn(k)),f==="title"?"default":f)):["default"],r=[...new Set(s)];if(!r.every(f=>vt.test(f)))return{layout:null,problems:["a slot name is not a-z, 0-9 and -"]};r.includes("default")||r.unshift("default");let a=(Array.isArray(t.areas)?t.areas.map(f=>[f].flat().join(" ")):String(t.areas??r.join(" ")).split(/\||\n/)).map(f=>f.trim().replace(/^"|"$/g,"").split(/\s+/)).filter(f=>f.length&&f[0]),l=a[0]?.length??0;if(!a.length||a.some(f=>f.length!==l)||a.flat().some(f=>f!=="."&&!r.includes(f)))return{layout:null,problems:["areas are not a rectangle of its slots"]};for(let f of r){let k=a.flatMap((y,_)=>y.map((U,q)=>[U,q,_])).filter(([y])=>y===f);if(!k.length){f!=="default"&&e.push(`slot ${f} has no area`);continue}let m=k.map(y=>y[1]),w=k.map(y=>y[2]);if(k.length!==(Math.max(...m)-Math.min(...m)+1)*(Math.max(...w)-Math.min(...w)+1))return{layout:null,problems:[`slot ${f} is not a rectangle`]}}let o=(f,k)=>{let m=f===void 0?Array(k).fill("1fr"):(Array.isArray(f)?f:String(f).split(/\s+/)).map(String);return m.length===k&&m.every(w=>yn.test(w))?m:null},d=o(t.columns,l),c=o(t.rows,a.length);if(!d||!c)return{layout:null,problems:["columns or rows are not tracks deck knows (auto, 1fr, 40%…), one per column or row"]};let p=(f,k)=>{let m=String(t[f]??k);return St[f].includes(m)?m:(e.push(`${f} ${m} is not one of ${St[f].join(", ")}`),k)},u=typeof t.label=="string"||t.label&&typeof t.label=="object"?t.label:void 0,h=f=>typeof f=="string"?f.slice(0,300):void 0;return{layout:{label:u,intent:h(t.intent),use_when:h(t.use_when),avoid_when:h(t.avoid_when),slots:r,budgets:n,areas:a,columns:d,rows:c,align:p("align","start"),justify:p("justify","start"),paper:p("paper","paper"),title:p("title","normal"),pptx:wn.includes(t.pptx)?t.pptx:r.length>1?"Comparison":"Title and Content",numbered:t.numbered!==!1},problems:e}}function Sn(t){let e={};for(let n of["max_words","max_chars","item_max_words","heading_max_words"])Number.isInteger(t[n])&&t[n]>0&&(e[n]=t[n]);return Array.isArray(t.items)&&t.items.length===2&&t.items.every(Number.isInteger)&&(e.items=t.items),typeof t.required=="boolean"&&(e.required=t.required),typeof t.kind=="string"&&/^[a-z-]{1,20}$/.test(t.kind)&&(e.kind=t.kind),e}function vn(t){if(!t||typeof t!="object")return{};if(!JSON.stringify(t).includes('"$value"'))return t;let e=u=>u&&typeof u=="object"&&"$value"in u?u.$value:u,n=u=>{let h=e(u);return typeof h=="string"?h:typeof h?.hex=="string"?h.hex:void 0},s=u=>{let h=e(u);return Array.isArray(h)?h.map(String):typeof h=="string"?[h]:void 0},r={bg:"paper",background:"paper",paper:"paper",fg:"ink",text:"ink",ink:"ink",accent:"primary",primary:"primary",muted:"muted",surface:"soft",soft:"soft"},i=u=>Object.fromEntries(Object.entries(u??{}).filter(([h])=>h in r).map(([h,f])=>[r[h],n(f)]).filter(([,h])=>h)),a=t.color??t.colour??{},l={...i(a),...i(a.light)},o=i(a.dark);Object.keys(o).length&&(l.dark=o);let d=t.font??t.fontFamily??{},c=s(d.heading??d.display??d.sans),p=s(d.body??d.text??d.sans);return(c||p)&&(l.fonts={heading:c??p,body:p??c}),l}function De(...t){let e={name:"standard",tokens:{},layouts:{...qe.layouts}},n=[];for(let s of t)if(!(!s||typeof s!="object")){typeof s.name=="string"&&(e.name=s.name),s.tokens&&typeof s.tokens=="object"&&(e.tokens={...e.tokens,...vn(s.tokens)});for(let[r,i]of Object.entries(s.layouts??s.types??{})){if(!vt.test(r)){n.push(`layout ${r}: not a-z, 0-9 and -`);continue}let{layout:a,problems:l}=$t(i);n.push(...l.map(o=>`layout ${r}: ${o}`)),a&&(e.layouts[r]=a)}}return{kit:e,problems:n}}function At(t,e,n){return typeof t.label=="string"?t.label:t.label?.[n]??t.label?.[n.split("-")[0]]??t.label?.en??e}function zt(t){let e=t.slots.map(r=>r.name);if(e.includes("middle"))return"three-cols";if(e.includes("left"))return"two-cols-header";if(e.includes("right"))return"two-cols";if(t.index===0)return"cover";let s=t.slots.map(r=>r.text).join(`
17
+ `).trim().split(`
18
+ `).filter(r=>r.trim());return s.length===1&&/^#{1,2}\s+\S/.test(s[0])?"section":/^#\s+[^\s]*\d[\d\s.,%€$£¥]*\S*\s*$/u.test(s[0]??"")&&s.length<=3&&!/^\s*[-*\d]+[.)]?\s/m.test(s.slice(1).join(`
19
+ `))?"fact":s.length&&s.every((r,i)=>r.startsWith(">")||i===s.length-1&&!r.startsWith("#"))&&s[0].startsWith(">")?"quote":"default"}function x(t,e={},n=[]){let s=document.createElement(t);for(let[r,i]of Object.entries(e))i!==void 0&&i!==!1&&s.setAttribute(r,i===!0?"":String(i));for(let r of n)(r||r==="")&&s.append(r);return s}function $n(t){let e=String(t??"").trim();return/^(https?:|mailto:|blob:|#)/i.test(e)||/^data:image\/(png|jpe?g|gif|webp|avif|svg\+xml);/i.test(e)?e:/^[a-z][\w+.-]*:/i.test(e)?null:e}function Ze(t,e){let n=String(t.settings.layout??"").trim().toLowerCase(),s=e.kit.layouts[n]?n:e.kit.layouts[Ne[n]]?Ne[n]:zt(t),r=e.kit.layouts[s]??qe.layouts.default,i=String(t.settings.class??"").split(/\s+/).filter(u=>["invert","text-center","text-left"].includes(u)),a={step:0},l=new Map(t.slots.map(u=>[u.name,u])),o=r.slots,d=x("section",{class:["deck-slide",`deck-layout-${s}`,...i.map(u=>`deck-class-${u}`)].join(" "),"data-index":t.index,"data-layout":s,"data-paper":r.paper,"data-align":r.align,"data-justify":r.justify,"data-title":r.title,"aria-roledescription":e.slide,role:"group"}),c=x("div",{class:"deck-canvas"});c.style.setProperty("grid-template-areas",r.areas.map(u=>`"${u.map(h=>h==="."?".":`s-${h}`).join(" ")}"`).join(" ")),c.style.setProperty("grid-template-columns",r.columns.join(" ")),c.style.setProperty("grid-template-rows",r.rows.join(" ")),d.append(c);let p=t.settings.image??t.settings.background;if(typeof p=="string"&&["image-left","image-right","image","cover"].includes(s)){let u=e.resolve(p);if(u){let h=x("div",{class:"deck-image",role:"img","aria-label":String(t.settings.alt??"")||void 0});h.style.setProperty("--deck-image",`url("${u.replace(/["\\\n]/g,encodeURIComponent)}")`),c.append(h),d.classList.add("has-image")}}for(let u of o){let h=l.get(u),f=x("div",{class:"deck-slot","data-slot":u},h?Ct(h,e,a):[]);f.style.setProperty("grid-area",`s-${u}`),c.append(f)}for(let u of t.slots)o.includes(u.name)||c.append(x("div",{class:"deck-slot","data-slot":u.name},Ct(u,e,a)));return r.numbered&&t.settings.paginate!==!1&&d.append(x("span",{class:"deck-number","aria-hidden":"true"},[e.number(t.index+1)])),{element:d,steps:a.step}}function Ct(t,e,n){let s=e.lex(t.text),r=[],i=t.start,a="";for(let l of s){let o=i;i+=l.raw.length;let d=l.type==="paragraph"?l.raw.trim().split(`
20
+ `).map(p=>p.trim()):[];if(d.length&&d.every(p=>/^:{3,}/.test(p))){for(let p of d)/^:{3,}[ \t]*\{?[ \t]*\.?incremental\b/.test(p)?a="clicks":/^:{3,}\s*$/.test(p)&&a==="clicks"&&(a="");continue}if(l.type==="html"){let p=/^\s*<(\/?)(v-clicks?|br)\b[^>]*>\s*$/i.exec(l.raw);if(p&&p[2]==="br")r.push(x("br"));else if(p)a=p[1]?"":p[2].toLowerCase()==="v-clicks"?"clicks":"click";else if(/<li\b/i.test(l.raw)){let u=x(/<ol\b/i.test(l.raw)?"ol":"ul",{dir:"auto"});for(let[,h,f]of l.raw.matchAll(/<li\b([^>]*)>([\s\S]*?)(?=<\/li>|<li\b|<\/[ou]l>|$)/gi)){let k=f.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(!k)continue;let m=x("li",{dir:"auto"},[k]);(/\bv-click\b/.test(h)||a==="clicks")&&Fe(m,++n.step),u.append(m)}u.childElementCount&&r.push(u)}else{let u=l.raw.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();u&&r.push(x("p",{},[u]))}continue}let c=He(l,o,e,a==="clicks"?n:null);c&&((a==="click"||a==="clicks"&&l.type!=="list")&&Fe(c,++n.step),r.push(c))}return r}var Fe=(t,e)=>{t.classList.add("deck-step"),t.setAttribute("data-step",String(e))};function He(t,e,n,s){switch(t.type){case"heading":{let r=/^\s*#{1,6}[ \t]+/.exec(t.raw),i=r?Be(e+r[0].length,e+t.raw.replace(/\s*#*\s*$/,"").length):void 0;return n.headings==="real"?x(`h${t.depth}`,{dir:"auto","data-edit":i},W(t.tokens,n)):x("p",{class:`deck-h deck-h${t.depth}`,role:"heading","aria-level":Math.min(6,t.depth+2),dir:"auto","data-edit":i},W(t.tokens,n))}case"paragraph":{let r=t.tokens.length===1&&t.tokens[0].type==="image";return x("p",{dir:"auto",class:r?"deck-picture":void 0,"data-edit":r?void 0:Be(e,e+t.raw.trimEnd().length)},W(t.tokens,n))}case"text":return x("p",{dir:"auto"},W(t.tokens??[{type:"text",text:t.text}],n));case"blockquote":return x("blockquote",{},An(t.tokens,e,t.raw,n));case"list":{let r=0,i=x(t.ordered?"ol":"ul",{start:t.ordered&&t.start!==1?t.start:void 0,class:t.items.some(a=>a.task)?"deck-tasks":void 0});for(let a of t.items){let l=t.raw.indexOf(a.raw,r);r=l+a.raw.length;let o=e+Math.max(0,l),d=/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/.exec(a.raw),c=a.tokens.length===1&&a.tokens[0].type==="text"&&!/\n\s*\S/.test(a.raw.trim().split(`
21
+ `).slice(1).join(`
22
+ `)),p=x("li",{dir:"auto","data-edit":c&&d?Be(o+d[0].length,o+a.raw.trimEnd().length):void 0},[a.task?x("input",{type:"checkbox",checked:a.checked,disabled:!0,"aria-label":a.text}):null,...a.tokens.flatMap(u=>u.type==="text"?W(u.tokens??[{type:"text",text:u.text}],n):[He(u,o+Math.max(0,a.raw.indexOf(u.raw)),n,null)])]);s&&Fe(p,++s.step),i.append(p)}return i}case"code":{let r=/^(\S*)\s*(?:\{([^}]*)\})?/.exec(t.lang??"")??[],i=(r[1]??"").toLowerCase(),a=n.blocks[i];if(a){let d=x("div",{class:`deck-block deck-${i}`,"data-source":t.text});return d.append(x("pre",{class:"deck-block-source",dir:"ltr"},[x("code",{},[t.text])])),queueMicrotask(()=>Promise.resolve(a(d,t.text)).catch(()=>d.classList.add("is-failed"))),d}let l=zn(r[2]??""),o=x("code",{class:i?`language-${i}`:void 0});for(let[d,c]of t.text.split(`
23
+ `).entries())o.append(x("span",{class:l.has(d+1)?"deck-line is-marked":"deck-line"},[c,`
24
+ `]));return x("pre",{dir:"ltr",class:l.size?"has-marks":void 0,tabindex:0},[o])}case"table":{let r=i=>i??void 0;return x("div",{class:"deck-table"},[x("table",{},[x("thead",{},[x("tr",{},t.header.map((i,a)=>x("th",{"data-align":r(t.align[a]),dir:"auto"},W(i.tokens,n))))]),x("tbody",{},t.rows.map(i=>x("tr",{},i.map((a,l)=>x("td",{"data-align":r(t.align[l]),dir:"auto"},W(a.tokens,n))))))])])}default:return null}}function An(t,e,n,s){let r=0;return t.map(i=>{let a=n.indexOf(i.raw,r);return r=Math.max(r,a+i.raw.length),He(i,e+Math.max(0,a),s,null)})}function zn(t){let e=new Set;for(let n of t.split(/[,|]/)){let[s,r]=n.split("-").map(i=>parseInt(i,10));if(Number.isFinite(s))for(let i=s;i<=(Number.isFinite(r)?r:s);i++)e.add(i)}return e}var Be=(t,e)=>e>t?`${t}-${e}`:void 0;function W(t=[],e){return t.flatMap(n=>{switch(n.type){case"text":case"escape":return n.tokens?W(n.tokens,e):[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])];case"strong":return[x("strong",{},W(n.tokens,e))];case"em":return[x("em",{},W(n.tokens,e))];case"del":return[x("del",{},W(n.tokens,e))];case"codespan":return[x("code",{},[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])])];case"br":return[x("br")];case"link":{let s=$n(n.href);return s?[x("a",{href:s,rel:"noopener noreferrer",target:s.startsWith("#")?void 0:"_blank"},W(n.tokens,e))]:W(n.tokens,e)}case"image":{let s=e.resolve(n.href);return s?[x("img",{src:s,alt:n.text,loading:"lazy"})]:[n.text]}case"html":return/^<br\s*\/?>$/i.test(n.raw)?[x("br")]:[];default:return n.text?[n.text]:[]}})}var Tt={default:{paper:"#fffdf8",ink:"#1d1b16",primary:"#f7c531",voice:"calm",radius:10},ocean:{paper:"#f6fafb",ink:"#0d2530",primary:"#0f766e",voice:"calm",radius:6},ember:{paper:"#fff8f3",ink:"#2a160c",primary:"#d9480f",voice:"bold",radius:2},ink:{paper:"#ffffff",ink:"#111111",primary:"#3b5bdb",voice:"elegant",radius:0}},Qe={calm:{heading:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif'},elegant:{heading:'ui-serif, "Iowan Old Style", Georgia, "Noto Serif", serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},bold:{heading:'"Avenir Next Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},friendly:{heading:'ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif',body:'ui-rounded, "SF Pro Rounded", system-ui, sans-serif'}};function Et(t,e={}){let n=Tt[String(t.theme??"")]??Tt.default,s=typeof t.themeConfig=="object"&&t.themeConfig?t.themeConfig:{},r={...n,...Rt(e),...Rt(s)};return Qe[r.voice]||(r.voice="calm"),r}function Rt(t){let e={};for(let n of["paper","ink","primary","muted","soft"])typeof t[n]=="string"&&ne(t[n])&&(e[n]=t[n]);return t.dark&&typeof t.dark=="object"&&(e.dark=Object.fromEntries(Object.entries(t.dark).filter(([,n])=>typeof n=="string"&&ne(n)))),t.fonts&&Array.isArray(t.fonts.heading)&&Array.isArray(t.fonts.body)&&(e.fonts={heading:t.fonts.heading.map(String),body:t.fonts.body.map(String)}),typeof t.voice=="string"&&(e.voice=t.voice),typeof t.radius=="number"&&(e.radius=t.radius),e}function Pt(t,e){let n=ne(t.paper)??[255,253,248],s=ne(t.ink)??[29,27,22],r=e==="dark"?t.dark??{}:{},i=ke(ne(r.paper??"")??(e==="dark"?he(s,[0,0,0],.35):n)),a=ke(ne(r.ink??"")??(e==="dark"?he(n,[255,255,255],.2):s)),l=ne(r.primary??t.primary)??[247,197,49],o=Ue(l,i,4.5),d=Ge(a,l)>=Ge(i,l)?a:i,c=[0,1,2,3,4,5].map(p=>Ue(Cn(l,p*57),i,3));return{paper:ie(i),ink:ie(a),muted:ie(Ue(ke(ne(r.muted??(e==="light"?t.muted??"":""))??he(a,i,.38)),i,4.5)),line:ie(he(a,i,.82)),primary:ie(o),onPrimary:ie(d),soft:ie(ne(r.soft??(e==="light"?t.soft??"":""))??he(l,i,.78)),series:c.map(ie)}}function ne(t){let e=/^#?([\da-f]{3}|[\da-f]{6})$/i.exec(String(t).trim());if(!e)return null;let n=e[1].length===3?[...e[1]].map(s=>s+s).join(""):e[1];return[0,2,4].map(s=>parseInt(n.slice(s,s+2),16))}var ie=t=>`#${t.map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,"0")).join("")}`,ke=t=>t.map(e=>Math.round(Math.max(0,Math.min(255,e)))),he=(t,e,n)=>t.map((s,r)=>s+(e[r]-s)*n);function We(t){let[e,n,s]=t.map(r=>{let i=r/255;return i<=.03928?i/12.92:((i+.055)/1.055)**2.4});return .2126*e+.7152*n+.0722*s}function Ge(t,e){let[n,s]=[We(t),We(e)].sort((r,i)=>i-r);return(n+.05)/(s+.05)}function Ue(t,e,n){let s=We(e)>.18?[0,0,0]:[255,255,255],r=0,i=ke(t);for(;Ge(i,e)<n&&r<1;)i=ke(he(t,s,r=Math.min(1,r+.02)));return i}function Cn(t,e){let[n,s,r]=t.map(w=>w/255),i=Math.max(n,s,r),a=Math.min(n,s,r),l=(i+a)/2,o=i-a,d=o===0?0:o/(1-Math.abs(2*l-1)),c=o===0?0:i===n?(s-r)/o%6:i===s?(r-n)/o+2:(n-s)/o+4;c=(c*60+e+360)%360;let p=(1-Math.abs(2*l-1))*Math.max(d,.55),u=p*(1-Math.abs(c/60%2-1)),h=l-p/2,[f,k,m]=c<60?[p,u,0]:c<120?[u,p,0]:c<180?[0,p,u]:c<240?[0,u,p]:c<300?[u,0,p]:[p,0,u];return[f+h,k+h,m+h].map(w=>w*255)}var Lt={en:{deck:"Slides",slide:"slide",carousel:"carousel",previous:"Previous",next:"Next",present:"Present full screen",presenter:"Presenter view",overview:"All slides",edit:"Change",scheme:"Light or dark",export:"Save as PowerPoint",source:"The deck as text",notes:"Notes",noNotes:"No notes for this slide.",upNext:"Next",last:"Last slide",where:"Slide {n} of {count}",saved:"Saved"},fr:{deck:"Diapositives",slide:"diapositive",carousel:"carrousel",previous:"Précédente",next:"Suivante",present:"Présenter en plein écran",presenter:"Vue présentateur",overview:"Toutes les diapositives",edit:"Modifier",scheme:"Clair ou sombre",export:"Enregistrer en PowerPoint",source:"La présentation en texte",notes:"Notes",noNotes:"Pas de notes pour cette diapositive.",upNext:"Ensuite",last:"Dernière diapositive",where:"Diapositive {n} sur {count}",saved:"Enregistré"},ar:{deck:"الشرائح",slide:"شريحة",carousel:"عرض شرائح",previous:"السابقة",next:"التالية",present:"العرض بملء الشاشة",presenter:"عرض المقدّم",overview:"كل الشرائح",edit:"تعديل",scheme:"فاتح أو داكن",export:"الحفظ بصيغة PowerPoint",source:"العرض كنص",notes:"الملاحظات",noNotes:"لا ملاحظات لهذه الشريحة.",upNext:"التالية",last:"الشريحة الأخيرة",where:"الشريحة {n} من {count}",saved:"تم الحفظ"},ja:{deck:"スライド",slide:"スライド",carousel:"カルーセル",previous:"前へ",next:"次へ",present:"全画面で発表",presenter:"発表者ビュー",overview:"すべてのスライド",edit:"編集",scheme:"ライトまたはダーク",export:"PowerPoint で保存",source:"テキストとしてのスライド",notes:"メモ",noNotes:"このスライドにメモはありません。",upNext:"次",last:"最後のスライド",where:"スライド {n} / {count}",saved:"保存しました"}},Mt=t=>Lt[t.split("-")[0].toLowerCase()]??Lt.en;function Ye(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var de=Ye();function Ht(t){de=t}var oe={exec:()=>null};function fe(t){let e=[];return n=>{let s=Math.max(0,Math.min(3,n-1)),r=e[s];return r||(r=t(s),e[s]=r),r}}function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(j.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var Tn=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),j={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:fe(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:fe(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:fe(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:fe(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:fe(t=>new RegExp(`^ {0,${t}}(?:</?(?:${we})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:fe(t=>new RegExp(`^ {0,${t}}>`))},Rn=/^(?:[ \t]*(?:\n|$))+/,En=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Pn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ye=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ln=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,et=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ut=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wt=S(Ut).replace(/bull/g,et).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Mn=S(Ut).replace(/bull/g,et).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),tt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,jn=/^[^\n]+/,nt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,_n=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",nt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),On=S(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,et).getRegex(),we="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",rt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,In=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",rt).replace("tag",we).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gt=t=>S(tt).replace("hr",ye).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",we).getRegex(),Nn=Gt(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),qn=Gt(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Dn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",qn).getRegex(),st={blockquote:Dn,code:En,def:_n,fences:Pn,heading:Ln,hr:ye,html:In,lheading:Wt,list:On,newline:Rn,paragraph:Nn,table:oe,text:jn},jt=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ye).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",we).getRegex(),Bn={...st,lheading:Mn,table:jt,paragraph:S(tt).replace("hr",ye).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",jt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",we).getRegex()},Fn={...st,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:oe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(tt).replace("hr",ye).replace("heading",` *#{1,6} *[^
25
+ ]`).replace("lheading",Wt).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Zn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qt=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Un=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ee=/[\p{P}\p{S}]/u,ge=/[\s\p{P}\p{S}]/u,Se=/[^\s\p{P}\p{S}]/u,Wn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ge).getRegex(),Gn=/[\p{Pi}\p{Ps}"']/u,Vt=/(?!~)[\p{P}\p{S}]/u,Qn=/(?!~)[\s\p{P}\p{S}]/u,Vn=/(?:[^\s\p{P}\p{S}]|~)/u,Xn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Tn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Xt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Kn=S(Xt,"u").replace(/punct/g,ee).getRegex(),Jn=S(Xt,"u").replace(/punct/g,Vt).getRegex(),Yn=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,er=S(Yn,"u").replace(/openQuote/g,Gn).replace(/punct/g,ee).getRegex(),Kt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",tr=S(Kt,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),nr=S(Kt,"gu").replace(/notPunctSpace/g,Vn).replace(/punctSpace/g,Qn).replace(/punct/g,Vt).getRegex(),rr="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",sr=S(rr,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),ir=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),ar="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",lr=S(ar,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),or=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ee).getRegex(),cr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",dr=S(cr,"gu").replace(/notPunctSpace/g,Se).replace(/punctSpace/g,ge).replace(/punct/g,ee).getRegex(),pr=S(/\\(punct)/,"gu").replace(/punct/g,ee).getRegex(),ur=S(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ee).getRegex(),hr=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fr=S(rt).replace("(?:-->|$)","-->").getRegex(),gr=S("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Jt=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ee=S(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Jt).getRegex(),mr=S(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Ee).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kr=S(/^!?\[(label)\]\[(ref)\]/).replace("label",Ee).replace("ref",nt).getRegex(),br=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",nt).getRegex(),_t=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,xr=S(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Jt).getRegex(),yr=S("reflink|nolink(?!\\()","g").replace("reflink",S(/^!?\[(label)\]\[(ref)\]/).replace("label",xr).replace("ref",_t).getRegex()).replace("nolink",S(/^!?\[(ref)\](?:\[\])?/).replace("ref",_t).getRegex()).getRegex(),Ot=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,wr=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Sr=S(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,wr).getRegex(),it={_backpedal:oe,anyPunctuation:pr,anyPunctuationOutsideCode:ur,autolink:hr,blockSkip:Xn,br:Qt,code:Hn,del:oe,delLDelim:oe,delRDelim:oe,emStrongLDelim:Kn,emStrongRDelimAst:tr,emStrongRDelimUnd:ir,escape:Zn,link:mr,nolink:br,punctuation:Wn,reflink:kr,reflinkSearch:yr,tag:gr,text:Un,url:oe},vr={...it,emStrongLDelim:er,emStrongRDelimAst:sr,emStrongRDelimUnd:lr,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",Ee).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ee).getRegex()},Xe={...it,emStrongRDelimAst:nr,emStrongLDelim:Jn,delLDelim:or,delRDelim:dr,url:S(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Sr).replace("protocol",Ot).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Ot).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},$r={...Xe,br:S(Qt).replace("{2,}","*").getRegex(),text:S(Xe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Re={normal:st,gfm:Bn,pedantic:Fn},be={normal:it,gfm:Xe,breaks:$r,pedantic:vr},Ar={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},It=t=>Ar[t];function G(t,e){if(e){if(j.escapeTest.test(t))return t.replace(j.escapeReplace,It)}else if(j.escapeTestNoEncode.test(t))return t.replace(j.escapeReplaceNoEncode,It);return t}function zr(t){return j.numericCharacterReference.test(t)?t.replace(j.numericCharacterReferenceOrAmpersand,(e,n,s)=>{if(n===void 0&&s===void 0)return"&amp;";let r=n===void 0?Number.parseInt(s,16):Number.parseInt(n,10);return r===0||r>1114111||r>=55296&&r<=57343?"�":r===38?"&amp;":String.fromCodePoint(r)}):t}function Nt(t){try{t=encodeURI(t).replace(j.percentDecode,"%")}catch{return null}return t}function qt(t,e){let n=t.replace(j.findPipe,(i,a,l)=>{let o=!1,d=a;for(;--d>=0&&l[d]==="\\";)o=!o;return o?"|":" |"}),s=n.split(j.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(j.slashPipe,"|");return s}function ae(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s;){let i=t.charAt(s-r-1);if(i===e&&!n)r++;else if(i!==e&&n)r++;else break}return t.slice(0,s-r)}function Dt(t){let e=t.split(`
18
26
  `),n=e.length-1;for(;n>=0&&j.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
19
- `)}function Pe(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Rt(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Ne(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function Et(t,e,n,s,r){let i=e.href,a=e.title||null,o=t[1].replace(r.other.outputLinkReplace,"$1"),l=t[0].charAt(0)==="!",d=s.state.inLink,c=s.state.linkEmitted,p=s.state.inRawBlock;s.state.inLink=!0,s.state.linkEmitted=!1;let u=s.inlineTokens(o),h=s.state.linkEmitted;if(s.state.linkEmitted=c,s.state.inLink=d,!l){if(h){s.state.inRawBlock=p;return}s.state.linkEmitted=!0}return{type:l?"image":"link",raw:n,href:i,title:a,text:o,tokens:u}}function xr(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
20
- `).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[o]=a;return i.slice(Math.min(o.length,r.length))}).join(`
21
- `)}function Pt(t,e,n,s){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let o=s.inline.code.exec(e.slice(r));if(o){r+=o[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(n+r),a=s.inline.tag.exec(i)||s.inline.autolink.exec(i);if(a){if(a[0].length>e.length-r)return!0;r+=a[0].length-1}}return!1}var Le=class{options;rules;lexer;constructor(t){this.options=t||de}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:Tt(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=xr(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=ie(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:"heading",raw:ie(e[0],`
22
- `),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ie(e[0],`
23
- `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=ie(e[0],`
27
+ `)}function Pe(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function Bt(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Ve(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function Ft(t,e,n,s,r){let i=e.href,a=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1"),o=t[0].charAt(0)==="!",d=s.state.inLink,c=s.state.linkEmitted,p=s.state.inRawBlock;s.state.inLink=!0,s.state.linkEmitted=!1;let u=s.inlineTokens(l),h=s.state.linkEmitted;if(s.state.linkEmitted=c,s.state.inLink=d,!o){if(h){s.state.inRawBlock=p;return}s.state.linkEmitted=!0}return{type:o?"image":"link",raw:n,href:i,title:a,text:l,tokens:u}}function Cr(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
28
+ `).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return i.slice(Math.min(l.length,r.length))}).join(`
29
+ `)}function Zt(t,e,n,s){if(!e.includes("<"))return!1;for(let r=0;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="`"){let l=s.inline.code.exec(e.slice(r));if(l){r+=l[0].length-1;continue}}if(e[r]!=="<")continue;let i=t.slice(n+r),a=s.inline.tag.exec(i)||s.inline.autolink.exec(i);if(a){if(a[0].length>e.length-r)return!0;r+=a[0].length-1}}return!1}var Le=class{options;rules;lexer;constructor(t){this.options=t||de}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:Dt(e[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=Cr(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=ae(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(n=s.trim())}return{type:"heading",raw:ae(e[0],`
30
+ `),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:ae(e[0],`
31
+ `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=ae(e[0],`
24
32
  `).split(`
25
- `),s="",r="",i=[];for(;n.length>0;){let a=!1,o=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))o.push(n[l]),a=!0;else if(!a)o.push(n[l]);else break;n=n.slice(l);let d=o.join(`
33
+ `),s="",r="",i=[];for(;n.length>0;){let a=!1,l=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))l.push(n[o]),a=!0;else if(!a)l.push(n[o]);else break;n=n.slice(o);let d=l.join(`
26
34
  `),c=d.replace(this.rules.other.blockquoteSetextReplace,`
27
35
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
28
36
  ${d}`:d,r=r?`${r}
@@ -34,38 +42,38 @@ ${_.join(`
34
42
  `)}`),r=r.substring(0,r.length-h.text.length)+m.text;break}else if(u?.type==="list"){let h=u,f=h.raw+`
35
43
  `+n.join(`
36
44
  `),k=this.list(f);i[i.length-1]=k,s=s.substring(0,s.length-u.raw.length)+k.raw,r=r.substring(0,r.length-h.raw.length)+k.raw,n=f.substring(i.at(-1).raw.length).split(`
37
- `);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=t,s=()=>n.length-t.length,r=e[1].trim(),i=r.length>1,a={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let o=this.rules.other.listItemRegex(r),l=!1;for(;t;){let c=!1,p="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;let u=s();t=t.substring(e[0].length);let h=e[2].split(`
38
- `,1)[0],f=e[1].length,k=this.options.pedantic?Ne(h,f):h.replace(this.rules.other.leadingSpaceTab,U=>Ne(U,f)),m=t.split(`
39
- `,1)[0],w=!k.trim(),y=0;if(this.options.pedantic?(y=2,p=k.trimStart()):w?y=f+1:(y=k.search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=k.slice(y),y+=f),w&&this.rules.other.blankLine.test(m)&&(t=t.substring(m.length+1),c=!0),!c){let U=this.rules.other.nextBulletRegex(y),N=this.rules.other.hrRegex(y),E=this.rules.other.fencesBeginRegex(y),C=this.rules.other.headingBeginRegex(y),F=this.rules.other.htmlBeginRegex(y),X=this.rules.other.blockquoteBeginRegex(y);for(;t;){let q=t.split(`
40
- `,1)[0],K;if(m=q,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),K=m):K=m.replace(this.rules.other.leadingSpaceTab,Y=>Ne(Y)),E.test(m)||C.test(m)||F.test(m)||X.test(m)||U.test(m)||N.test(m))break;if(K.search(this.rules.other.nonSpaceChar)>=y||!m.trim())p+=`
41
- `+K.slice(y);else{if(w||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(k)||C.test(k)||N.test(k))break;p+=`
42
- `+m}w=!m.trim(),t=t.substring(q.length+1),k=K.slice(y)}}let _=n.slice(u,s());a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(_)&&(l=!0)),a.items.push({type:"list_item",raw:_,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]})}let d=a.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;a.raw=n.slice(0,s()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let p=c.tokens.filter(h=>h.type==="space"),u=p.length>0&&p.some(h=>this.rules.other.anyLine.test(h.raw));a.loose=u}for(let c of a.items){let p=c.tokens[0];if(c.task&&(p?.type==="text"||p?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let h={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=h.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let p of c.tokens)p.type==="text"&&(p.type="paragraph")}return a}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Tt(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Rt(e[2],"()")!==-1)return;let n=Pe(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:ie(e[0],`
43
- `),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Ct(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
44
- `):[],i={type:"table",raw:ie(e[0],`
45
- `),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of r)i.rows.push(Ct(a,i.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[l]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:ie(e[0],`
45
+ `);continue}}return{type:"blockquote",raw:s,tokens:i,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=t,s=()=>n.length-t.length,r=e[1].trim(),i=r.length>1,a={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let l=this.rules.other.listItemRegex(r),o=!1;for(;t;){let c=!1,p="";if(!(e=l.exec(t))||this.rules.block.hr.test(t))break;let u=s();t=t.substring(e[0].length);let h=e[2].split(`
46
+ `,1)[0],f=e[1].length,k=this.options.pedantic?Ve(h,f):h.replace(this.rules.other.leadingSpaceTab,U=>Ve(U,f)),m=t.split(`
47
+ `,1)[0],w=!k.trim(),y=0;if(this.options.pedantic?(y=2,p=k.trimStart()):w?y=f+1:(y=k.search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=k.slice(y),y+=f),w&&this.rules.other.blankLine.test(m)&&(t=t.substring(m.length+1),c=!0),!c){let U=this.rules.other.nextBulletRegex(y),q=this.rules.other.hrRegex(y),E=this.rules.other.fencesBeginRegex(y),C=this.rules.other.headingBeginRegex(y),Z=this.rules.other.htmlBeginRegex(y),X=this.rules.other.blockquoteBeginRegex(y);for(;t;){let D=t.split(`
48
+ `,1)[0],K;if(m=D,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),K=m):K=m.replace(this.rules.other.leadingSpaceTab,Y=>Ve(Y)),E.test(m)||C.test(m)||Z.test(m)||X.test(m)||U.test(m)||q.test(m))break;if(K.search(this.rules.other.nonSpaceChar)>=y||!m.trim())p+=`
49
+ `+K.slice(y);else{if(w||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(k)||C.test(k)||q.test(k))break;p+=`
50
+ `+m}w=!m.trim(),t=t.substring(D.length+1),k=K.slice(y)}}let _=n.slice(u,s());a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(_)&&(o=!0)),a.items.push({type:"list_item",raw:_,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]})}let d=a.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;a.raw=n.slice(0,s()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let p=c.tokens.filter(h=>h.type==="space"),u=p.length>0&&p.some(h=>this.rules.other.anyLine.test(h.raw));a.loose=u}for(let c of a.items){let p=c.tokens[0];if(c.task&&(p?.type==="text"||p?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let h={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=h.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let p of c.tokens)p.type==="text"&&(p.type="paragraph")}return a}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=Dt(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Bt(e[2],"()")!==-1)return;let n=Pe(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:ae(e[0],`
51
+ `),href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=qt(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
52
+ `):[],i={type:"table",raw:ae(e[0],`
53
+ `),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of r)i.rows.push(qt(a,i.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[o]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:ae(e[0],`
46
54
  `),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
47
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Pt(t,e[1],n,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let a=ie(s.slice(0,-1),"\\");if((s.length-a.length)%2===0)return}else{let a=Rt(e[2],"()");if(a===-2)return;if(a>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),Et(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Pt(t,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[Pe(r)];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Et(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,a,o=r,l=0,d=s[0][0],c=n===d,p=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+r);(s=p.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){o+=a;continue}else if(s[5]||s[6]){if(r%3&&!((r+a)%3)){l+=a;continue}if(c)break}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let u=[...s[0]][0].length,h=t.slice(0,r+s.index+u+a);if(Math.min(r,a)%2){let k=h.slice(1,-1);return{type:"em",raw:h,text:k,tokens:this.lexer.inlineTokens(k)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,a,o=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,e=e.slice(-1*t.length+r);(s=l.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(a=[...i].length,a!==r))continue;if(s[3]||s[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let d=[...s[0]][0].length,c=t.slice(0,r+s.index+d+a),p=c.slice(r,-r);return{type:"del",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:br(e[0]),escaped:n}}}},G=class De{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||de,this.options.tokenizer=this.options.tokenizer||new Le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let n={other:j,block:Re.normal,inline:ke.normal};this.options.pedantic?(n.block=Re.pedantic,n.inline=ke.pedantic):this.options.gfm&&(n.block=Re.gfm,this.options.breaks?n.inline=ke.breaks:n.inline=ke.gfm),this.tokenizer.rules=n}static get rules(){return{block:Re,inline:ke}}static lex(e,n){return new De(n).lex(e)}static lexInline(e,n){return new De(n).inlineTokens(e)}lex(e){e=e.replace(j.carriageReturn,`
48
- `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(j.tabCharGlobal," ").replace(j.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(o=>(i=o.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let o=n.at(-1);i.raw.length===1&&o!==void 0?o.raw+=`
49
- `:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
55
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Zt(t,e[1],n,this.rules))return;let s=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(s)){if(!this.rules.other.endAngleBracket.test(s))return;let a=ae(s.slice(0,-1),"\\");if((s.length-a.length)%2===0)return}else{let a=Bt(e[2],"()");if(a===-2)return;if(a>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(r);a&&(r=a[1],i=a[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(s)?r=r.slice(1):r=r.slice(1,-1)),Ft(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Zt(t,n[1],s,this.rules))return;let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[Pe(r)];if(!i){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Ft(n,i,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,a,l=r,o=0,d=s[0][0],c=n===d,p=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+r);(s=p.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){l+=a;continue}else if(s[5]||s[6]){if(r%3&&!((r+a)%3)){o+=a;continue}if(c)break}if(l-=a,l>0)continue;a=Math.min(a,a+l+o);let u=[...s[0]][0].length,h=t.slice(0,r+s.index+u+a);if(Math.min(r,a)%2){let k=h.slice(1,-1);return{type:"em",raw:h,text:k,tokens:this.lexer.inlineTokens(k)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,a,l=r,o=this.rules.inline.delRDelim;for(o.lastIndex=0,e=e.slice(-1*t.length+r);(s=o.exec(e))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(a=[...i].length,a!==r))continue;if(s[3]||s[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let d=[...s[0]][0].length,c=t.slice(0,r+s.index+d+a),p=c.slice(r,-r);return{type:"del",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:zr(e[0]),escaped:n}}}},Q=class Ke{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||de,this.options.tokenizer=this.options.tokenizer||new Le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let n={other:j,block:Re.normal,inline:be.normal};this.options.pedantic?(n.block=Re.pedantic,n.inline=be.pedantic):this.options.gfm&&(n.block=Re.gfm,this.options.breaks?n.inline=be.breaks:n.inline=be.gfm),this.tokenizer.rules=n}static get rules(){return{block:Re,inline:be}}static lex(e,n){return new Ke(n).lex(e)}static lexInline(e,n){return new Ke(n).inlineTokens(e)}lex(e){e=e.replace(j.carriageReturn,`
56
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(j.tabCharGlobal," ").replace(j.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},e,n))?(e=e.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
57
+ `:n.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
50
58
  `)?"":`
51
- `)+i.raw,o.text+=`
52
- `+i.text,this.inlineQueue.at(-1).src=o.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let o=n.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
59
+ `)+i.raw,l.text+=`
60
+ `+i.text,this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
53
61
  `)?"":`
54
- `)+i.raw,o.text+=`
55
- `+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let o=1/0,l=e.slice(1),d;this.options.extensions.startBlock.forEach(c=>{d=c.call({lexer:this},l),typeof d=="number"&&d>=0&&(o=Math.min(o,d))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let o=n.at(-1);s&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
62
+ `)+i.raw,l.text+=`
63
+ `+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),n.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let l=1/0,o=e.slice(1),d;this.options.extensions.startBlock.forEach(c=>{d=c.call({lexer:this},o),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(a=e.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let l=n.at(-1);s&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
56
64
  `)?"":`
57
- `)+i.raw,o.text+=`
58
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(i),s=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let o=n.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
65
+ `)+i.raw,l.text+=`
66
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),s=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
59
67
  `)?"":`
60
- `)+i.raw,o.text+=`
61
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=s[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Pe(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,n)}finally{this.state.linkParenPossible=s}}#e(e,n){let s=e;if(this.tokens.links&&e.includes("[")){let o=this.tokenizer.rules.inline.reflinkSearch,l=d=>{let c=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Pe(d.slice(c+1,-1))))return d;if(c>1&&d.charAt(0)!=="!"){let p=d.slice(1,c-1);if(this.linkInText(p))return"["+p.replace(o,l)+"]["+"a".repeat(d.length-c-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};s=s.replace(o,l)}s=s.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(o,l,d)=>d?"+".repeat(o.length):l?l+o.slice(l.length,-l.length).replace(/`/g,"+")+l:o),s=s.replace(this.tokenizer.rules.inline.blockSkip,(o,l,d)=>{let c=d?d.length:0;return o.slice(0,c)+"["+"a".repeat(o.length-c-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let r=!1,i="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let o;if(this.options.extensions?.inline?.some(d=>(o=d.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let d=n.at(-1);o.type==="text"&&d?.type==="text"?(d.raw+=o.raw,d.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,s,i)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e,s,i)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let l=e;if(this.options.extensions?.startInline){let d=1/0,c=e.slice(1),p;this.options.extensions.startInline.forEach(u=>{p=u.call({lexer:this},c),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(l=e.substring(0,d+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(i=o.raw.slice(-1)),r=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=o.raw,d.text+=o.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},Me=class{options;parser;constructor(t){this.options=t||de}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(j.notSpaceStart)?.[0],r=t?t.replace(j.endingNewline,"")+`
62
- `:"";return s?'<pre><code class="language-'+W(s)+'">'+(n?r:W(r,!0))+`</code></pre>
63
- `:"<pre><code>"+(n?r:W(r,!0))+`</code></pre>
68
+ `)+i.raw,l.text+=`
69
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let r=s[0],i=r.lastIndexOf("[");if(!(r.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,Pe(r.slice(i+1,-1))))&&!(i>1&&this.linkInText(r.slice(1,i-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=this.state.linkParenPossible;this.state.linkParenPossible=s&&e.includes(")");try{return this.#e(e,n)}finally{this.state.linkParenPossible=s}}#e(e,n){let s=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,o=d=>{let c=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,Pe(d.slice(c+1,-1))))return d;if(c>1&&d.charAt(0)!=="!"){let p=d.slice(1,c-1);if(this.linkInText(p))return"["+p.replace(l,o)+"]["+"a".repeat(d.length-c-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};s=s.replace(l,o)}s=s.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(l,o,d)=>d?"+".repeat(l.length):o?o+l.slice(o.length,-o.length).replace(/`/g,"+")+o:l),s=s.replace(this.tokenizer.rules.inline.blockSkip,(l,o,d)=>{let c=d?d.length:0;return l.slice(0,c)+"["+"a".repeat(l.length-c-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let r=!1,i="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=""),r=!1;let l;if(this.options.extensions?.inline?.some(d=>(l=d.call({lexer:this},e,n))?(e=e.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let d=n.at(-1);l.type==="text"&&d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(e,s,i)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(e,s,i)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),n.push(l);continue}let o=e;if(this.options.extensions?.startInline){let d=1/0,c=e.slice(1),p;this.options.extensions.startInline.forEach(u=>{p=u.call({lexer:this},c),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(o=e.substring(0,d+1))}if(l=this.tokenizer.inlineText(o)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),r=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},Me=class{options;parser;constructor(t){this.options=t||de}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(j.notSpaceStart)?.[0],r=t?t.replace(j.endingNewline,"")+`
70
+ `:"";return s?'<pre><code class="language-'+G(s)+'">'+(n?r:G(r,!0))+`</code></pre>
71
+ `:"<pre><code>"+(n?r:G(r,!0))+`</code></pre>
64
72
  `}blockquote({tokens:t}){return`<blockquote>
65
73
  ${this.parser.parse(t)}</blockquote>
66
74
  `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
67
75
  `}hr(t){return`<hr>
68
- `}list(t){let e=t.ordered,n=t.start,s="";for(let a=0;a<t.items.length;a++){let o=t.items[a];s+=this.listitem(o)}let r=e?"ol":"ul",i=e&&n!==1?' start="'+n+'"':"";return"<"+r+i+`>
76
+ `}list(t){let e=t.ordered,n=t.start,s="";for(let a=0;a<t.items.length;a++){let l=t.items[a];s+=this.listitem(l)}let r=e?"ol":"ul",i=e&&n!==1?' start="'+n+'"':"";return"<"+r+i+`>
69
77
  `+s+"</"+r+`>
70
78
  `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
71
79
  `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
@@ -76,19 +84,11 @@ ${this.parser.parse(t)}</blockquote>
76
84
  `}tablerow({text:t}){return`<tr>
77
85
  ${t}</tr>
78
86
  `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
79
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${W(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:s,autolink:r}){let i=r?W(n,!0):this.parser.parseInline(s),a=zt(t);if(a===null)return i;t=W(a,r);let o='<a href="'+t+'"';return e&&(o+=' title="'+W(e)+'"'),o+=">"+i+"</a>",o}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=zt(t);if(r===null)return W(n);t=r;let i=`<img src="${W(t)}" alt="${W(n)}"`;return e&&(i+=` title="${W(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:W(t.text)}},Ve=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},J=class Be{options;renderer;textRenderer;constructor(e){this.options=e||de,this.options.renderer=this.options.renderer||new Me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ve}static parse(e,n){return new Be(n).parse(e)}static parseInline(e,n){return new Be(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let a=r,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){n+=o||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){s+=o||"";continue}}let a=i;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"checkbox":{s+=n.checkbox(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},be=class{options;block;constructor(t){this.options=t||de}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?G.lex:G.lexInline}provideParser(t=this.block){return t?J.parse:J.parseInline}};function oe(t,e){if(Array.isArray(e))for(let n=0;n<e.length;n++)t.push(e[n]);else t.push(e)}var yr=class{defaults=Fe();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=J;Renderer=Me;TextRenderer=Ve;Lexer=G;Tokenizer=Le;Hooks=be;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(oe(n,e.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)oe(n,this.walkTokens(i.tokens,e));for(let i of r.rows)for(let a of i)oe(n,this.walkTokens(a.tokens,e));break}case"list":{let r=s;oe(n,this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let a=r[i].flat(1/0);oe(n,this.walkTokens(a,e))}):r.tokens&&oe(n,this.walkTokens(r.tokens,e))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...a){let o=r.renderer.apply(this,a);return o===!1&&(o=i.apply(this,a)),o}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new Me(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,o=n.renderer[a],l=r[a];r[a]=(...d)=>{let c=o.apply(r,d);return c===!1&&(c=l.apply(r,d)),c||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Le(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,o=n.tokenizer[a],l=r[a];r[a]=(...d)=>{let c=o.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new be;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,o=n.hooks[a],l=r[a];be.passThroughHooks.has(i)?r[a]=d=>{if(this.defaults.async&&be.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await o.call(r,d);return l.call(r,p)})();let c=o.call(r,d);return l.call(r,c)}:r[a]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(r,d);return p===!1&&(p=await l.apply(r,d)),p})();let c=o.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(a){let o=[];return o.push(i.call(this,a)),r&&oe(o,r.call(this,a)),o}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return G.lex(t,e??this.defaults)}parser(t,e){return J.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(e):e,o=await(r.hooks?await r.hooks.provideLexer(t):t?G.lex:G.lexInline)(a,r),l=r.hooks?await r.hooks.processAllTokens(o):o;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let d=await(r.hooks?await r.hooks.provideParser(t):t?J.parse:J.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(d):d})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let a=(r.hooks?r.hooks.provideLexer(t):t?G.lex:G.lexInline)(e,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let o=(r.hooks?r.hooks.provideParser(t):t?J.parse:J.parseInline)(a,r);return r.hooks&&(o=r.hooks.postprocess(o)),o}catch(a){return i(a)}}}onError(t,e){return n=>{if(n.message+=`
80
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+W(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},ce=new yr;function T(t,e){return ce.parse(t,e)}T.options=T.setOptions=function(t){return ce.setOptions(t),T.defaults=ce.defaults,Lt(T.defaults),T};T.getDefaults=Fe;T.defaults=de;function wr(...t){return ce.use(...t),T.defaults=ce.defaults,Lt(T.defaults),T}T.use=wr;T.walkTokens=function(t,e){return ce.walkTokens(t,e)};T.parseInline=ce.parseInline;T.Parser=J;T.parser=J.parse;T.Renderer=Me;T.TextRenderer=Ve;T.Lexer=G;T.lexer=G.lex;T.Tokenizer=Le;T.Hooks=be;T.parse=T;var Qr=T.options,Vr=T.setOptions,Xr=T.walkTokens,Kr=T.parseInline;var Jr=J.parse,Yr=G.lex;var Ft=/^[a-z][a-z0-9-]{0,31}$/,Sr=/^(auto|min-content|max-content|\d{1,2}(\.\d)?fr|\d{1,3}%)$/,vr=["Title Slide","Title and Content","Section Header","Two Content","Comparison","Title Only","Blank","Content with Caption","Picture with Caption"],Bt={align:["start","center","end"],justify:["start","center","end"],paper:["paper","fill","ink","soft"],title:["normal","large","huge"]},Xe={title:"cover","title-slide":"cover","two-columns":"two-cols","two-column":"two-cols",columns:"two-cols",comparison:"two-cols-header","three-columns":"three-cols","section-header":"section",divider:"section",big:"fact",number:"fact","image-text":"image-right",closing:"end",thanks:"end"},Ke={name:"standard",tokens:{},layouts:Object.fromEntries(Object.entries({default:{label:{en:"Title and content",fr:"Titre et contenu"},pptx:"Title and Content"},cover:{label:{en:"Cover",fr:"Couverture"},justify:"center",paper:"fill",title:"huge",pptx:"Title Slide",numbered:!1},intro:{label:{en:"Introduction",fr:"Introduction"},justify:"center",paper:"fill",title:"large",pptx:"Title Slide",numbered:!1},section:{label:{en:"Section",fr:"Section"},justify:"center",paper:"ink",title:"huge",pptx:"Section Header",numbered:!1},center:{label:{en:"Centred",fr:"Centré"},justify:"center",align:"center",pptx:"Title Only"},statement:{label:{en:"Statement",fr:"Affirmation"},justify:"center",align:"center",title:"large",pptx:"Title Only"},fact:{label:{en:"Big number",fr:"Grand chiffre"},justify:"center",align:"center",title:"huge",pptx:"Title Only"},quote:{label:{en:"Quote",fr:"Citation"},justify:"center",pptx:"Title Only"},end:{label:{en:"Closing",fr:"Clôture"},justify:"center",align:"center",paper:"fill",title:"large",pptx:"Title Slide",numbered:!1},full:{label:{en:"Full",fr:"Plein cadre"},pptx:"Blank",numbered:!1},none:{label:{en:"Blank",fr:"Vide"},pptx:"Blank",numbered:!1},"two-cols":{label:{en:"Two columns",fr:"Deux colonnes"},slots:["default","right"],areas:"default right",columns:"1fr 1fr",pptx:"Two Content"},"two-cols-header":{label:{en:"Comparison",fr:"Comparaison"},slots:["default","left","right","bottom"],areas:"default default | left right | bottom bottom",columns:"1fr 1fr",rows:"auto 1fr auto",pptx:"Comparison"},"three-cols":{label:{en:"Three columns",fr:"Trois colonnes"},slots:["default","left","middle","right"],areas:"default default default | left middle right",columns:"1fr 1fr 1fr",rows:"auto 1fr",pptx:"Comparison"},"image-left":{label:{en:"Picture left",fr:"Image à gauche"},pptx:"Picture with Caption",justify:"center"},"image-right":{label:{en:"Picture right",fr:"Image à droite"},pptx:"Picture with Caption",justify:"center"},image:{label:{en:"Picture",fr:"Image"},pptx:"Blank",numbered:!1}}).map(([t,e])=>[t,Zt(e).layout]))};function Zt(t){let e=[];if(!t||typeof t!="object")return{layout:null,problems:["not a layout"]};let n={},s=Array.isArray(t.slots)||typeof t.slots=="string"?[t.slots].flat().map(String):t.slots&&typeof t.slots=="object"?Object.entries(t.slots).map(([f,k])=>(k&&typeof k=="object"&&(n[f]=$r(k)),f==="title"?"default":f)):["default"],r=[...new Set(s)];if(!r.every(f=>Ft.test(f)))return{layout:null,problems:["a slot name is not a-z, 0-9 and -"]};r.includes("default")||r.unshift("default");let a=(Array.isArray(t.areas)?t.areas.map(f=>[f].flat().join(" ")):String(t.areas??r.join(" ")).split(/\||\n/)).map(f=>f.trim().replace(/^"|"$/g,"").split(/\s+/)).filter(f=>f.length&&f[0]),o=a[0]?.length??0;if(!a.length||a.some(f=>f.length!==o)||a.flat().some(f=>f!=="."&&!r.includes(f)))return{layout:null,problems:["areas are not a rectangle of its slots"]};for(let f of r){let k=a.flatMap((y,_)=>y.map((U,N)=>[U,N,_])).filter(([y])=>y===f);if(!k.length){f!=="default"&&e.push(`slot ${f} has no area`);continue}let m=k.map(y=>y[1]),w=k.map(y=>y[2]);if(k.length!==(Math.max(...m)-Math.min(...m)+1)*(Math.max(...w)-Math.min(...w)+1))return{layout:null,problems:[`slot ${f} is not a rectangle`]}}let l=(f,k)=>{let m=f===void 0?Array(k).fill("1fr"):(Array.isArray(f)?f:String(f).split(/\s+/)).map(String);return m.length===k&&m.every(w=>Sr.test(w))?m:null},d=l(t.columns,o),c=l(t.rows,a.length);if(!d||!c)return{layout:null,problems:["columns or rows are not tracks deck knows (auto, 1fr, 40%…), one per column or row"]};let p=(f,k)=>{let m=String(t[f]??k);return Bt[f].includes(m)?m:(e.push(`${f} ${m} is not one of ${Bt[f].join(", ")}`),k)},u=typeof t.label=="string"||t.label&&typeof t.label=="object"?t.label:void 0,h=f=>typeof f=="string"?f.slice(0,300):void 0;return{layout:{label:u,intent:h(t.intent),use_when:h(t.use_when),avoid_when:h(t.avoid_when),slots:r,budgets:n,areas:a,columns:d,rows:c,align:p("align","start"),justify:p("justify","start"),paper:p("paper","paper"),title:p("title","normal"),pptx:vr.includes(t.pptx)?t.pptx:r.length>1?"Comparison":"Title and Content",numbered:t.numbered!==!1},problems:e}}function $r(t){let e={};for(let n of["max_words","max_chars","item_max_words","heading_max_words"])Number.isInteger(t[n])&&t[n]>0&&(e[n]=t[n]);return Array.isArray(t.items)&&t.items.length===2&&t.items.every(Number.isInteger)&&(e.items=t.items),typeof t.required=="boolean"&&(e.required=t.required),typeof t.kind=="string"&&/^[a-z-]{1,20}$/.test(t.kind)&&(e.kind=t.kind),e}function Ar(t){if(!t||typeof t!="object")return{};if(!JSON.stringify(t).includes('"$value"'))return t;let e=u=>u&&typeof u=="object"&&"$value"in u?u.$value:u,n=u=>{let h=e(u);return typeof h=="string"?h:typeof h?.hex=="string"?h.hex:void 0},s=u=>{let h=e(u);return Array.isArray(h)?h.map(String):typeof h=="string"?[h]:void 0},r={bg:"paper",background:"paper",paper:"paper",fg:"ink",text:"ink",ink:"ink",accent:"primary",primary:"primary",muted:"muted",surface:"soft",soft:"soft"},i=u=>Object.fromEntries(Object.entries(u??{}).filter(([h])=>h in r).map(([h,f])=>[r[h],n(f)]).filter(([,h])=>h)),a=t.color??t.colour??{},o={...i(a),...i(a.light)},l=i(a.dark);Object.keys(l).length&&(o.dark=l);let d=t.font??t.fontFamily??{},c=s(d.heading??d.display??d.sans),p=s(d.body??d.text??d.sans);return(c||p)&&(o.fonts={heading:c??p,body:p??c}),o}function Je(...t){let e={name:"standard",tokens:{},layouts:{...Ke.layouts}},n=[];for(let s of t)if(!(!s||typeof s!="object")){typeof s.name=="string"&&(e.name=s.name),s.tokens&&typeof s.tokens=="object"&&(e.tokens={...e.tokens,...Ar(s.tokens)});for(let[r,i]of Object.entries(s.layouts??s.types??{})){if(!Ft.test(r)){n.push(`layout ${r}: not a-z, 0-9 and -`);continue}let{layout:a,problems:o}=Zt(i);n.push(...o.map(l=>`layout ${r}: ${l}`)),a&&(e.layouts[r]=a)}}return{kit:e,problems:n}}function Ht(t,e,n){return typeof t.label=="string"?t.label:t.label?.[n]??t.label?.[n.split("-")[0]]??t.label?.en??e}function Ut(t){let e=t.slots.map(r=>r.name);if(e.includes("middle"))return"three-cols";if(e.includes("left"))return"two-cols-header";if(e.includes("right"))return"two-cols";if(t.index===0)return"cover";let s=t.slots.map(r=>r.text).join(`
81
- `).trim().split(`
82
- `).filter(r=>r.trim());return s.length===1&&/^#{1,2}\s+\S/.test(s[0])?"section":/^#\s+[^\s]*\d[\d\s.,%€$£¥]*\S*\s*$/u.test(s[0]??"")&&s.length<=3&&!/^\s*[-*\d]+[.)]?\s/m.test(s.slice(1).join(`
83
- `))?"fact":s.length&&s.every((r,i)=>r.startsWith(">")||i===s.length-1&&!r.startsWith("#"))&&s[0].startsWith(">")?"quote":"default"}function x(t,e={},n=[]){let s=document.createElement(t);for(let[r,i]of Object.entries(e))i!==void 0&&i!==!1&&s.setAttribute(r,i===!0?"":String(i));for(let r of n)(r||r==="")&&s.append(r);return s}function zr(t){let e=String(t??"").trim();return/^(https?:|mailto:|blob:|#)/i.test(e)||/^data:image\/(png|jpe?g|gif|webp|avif|svg\+xml);/i.test(e)?e:/^[a-z][\w+.-]*:/i.test(e)?null:e}function tt(t,e){let n=String(t.settings.layout??"").trim().toLowerCase(),s=e.kit.layouts[n]?n:e.kit.layouts[Xe[n]]?Xe[n]:Ut(t),r=e.kit.layouts[s]??Ke.layouts.default,i=String(t.settings.class??"").split(/\s+/).filter(u=>["invert","text-center","text-left"].includes(u)),a={step:0},o=new Map(t.slots.map(u=>[u.name,u])),l=r.slots,d=x("section",{class:["deck-slide",`deck-layout-${s}`,...i.map(u=>`deck-class-${u}`)].join(" "),"data-index":t.index,"data-layout":s,"data-paper":r.paper,"data-align":r.align,"data-justify":r.justify,"data-title":r.title,"aria-roledescription":"slide",role:"group"}),c=x("div",{class:"deck-canvas"});c.style.setProperty("grid-template-areas",r.areas.map(u=>`"${u.map(h=>h==="."?".":`s-${h}`).join(" ")}"`).join(" ")),c.style.setProperty("grid-template-columns",r.columns.join(" ")),c.style.setProperty("grid-template-rows",r.rows.join(" ")),d.append(c);let p=t.settings.image??t.settings.background;if(typeof p=="string"&&["image-left","image-right","image","cover"].includes(s)){let u=e.resolve(p);if(u){let h=x("div",{class:"deck-image",role:"img","aria-label":String(t.settings.alt??"")||void 0});h.style.setProperty("--deck-image",`url("${u.replace(/["\\\n]/g,encodeURIComponent)}")`),c.append(h),d.classList.add("has-image")}}for(let u of l){let h=o.get(u),f=x("div",{class:"deck-slot","data-slot":u},h?Wt(h,e,a):[]);f.style.setProperty("grid-area",`s-${u}`),c.append(f)}for(let u of t.slots)l.includes(u.name)||c.append(x("div",{class:"deck-slot","data-slot":u.name},Wt(u,e,a)));return r.numbered&&t.settings.paginate!==!1&&d.append(x("span",{class:"deck-number","aria-hidden":"true"},[e.number(t.index+1)])),{element:d,steps:a.step}}function Wt(t,e,n){let s=new G({gfm:!0}).lex(t.text),r=[],i=t.start,a="";for(let o of s){let l=i;i+=o.raw.length;let d=o.type==="paragraph"?o.raw.trim().split(`
84
- `).map(p=>p.trim()):[];if(d.length&&d.every(p=>/^:{3,}/.test(p))){for(let p of d)/^:{3,}[ \t]*\{?[ \t]*\.?incremental\b/.test(p)?a="clicks":/^:{3,}\s*$/.test(p)&&a==="clicks"&&(a="");continue}if(o.type==="html"){let p=/^\s*<(\/?)(v-clicks?|br)\b[^>]*>\s*$/i.exec(o.raw);if(p&&p[2]==="br")r.push(x("br"));else if(p)a=p[1]?"":p[2].toLowerCase()==="v-clicks"?"clicks":"click";else if(/<li\b/i.test(o.raw)){let u=x(/<ol\b/i.test(o.raw)?"ol":"ul",{dir:"auto"});for(let[,h,f]of o.raw.matchAll(/<li\b([^>]*)>([\s\S]*?)(?=<\/li>|<li\b|<\/[ou]l>|$)/gi)){let k=f.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();if(!k)continue;let m=x("li",{dir:"auto"},[k]);(/\bv-click\b/.test(h)||a==="clicks")&&et(m,++n.step),u.append(m)}u.childElementCount&&r.push(u)}else{let u=o.raw.replace(/<!--[\s\S]*?-->/g,"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();u&&r.push(x("p",{},[u]))}continue}let c=nt(o,l,e,a==="clicks"?n:null);c&&((a==="click"||a==="clicks"&&o.type!=="list")&&et(c,++n.step),r.push(c))}return r}var et=(t,e)=>{t.classList.add("deck-step"),t.setAttribute("data-step",String(e))};function nt(t,e,n,s){switch(t.type){case"heading":{let r=/^\s*#{1,6}[ \t]+/.exec(t.raw),i=r?Ye(e+r[0].length,e+t.raw.replace(/\s*#*\s*$/,"").length):void 0;return n.headings==="real"?x(`h${t.depth}`,{dir:"auto","data-edit":i},Q(t.tokens,n)):x("p",{class:`deck-h deck-h${t.depth}`,role:"heading","aria-level":Math.min(6,t.depth+2),dir:"auto","data-edit":i},Q(t.tokens,n))}case"paragraph":{let r=t.tokens.length===1&&t.tokens[0].type==="image";return x("p",{dir:"auto",class:r?"deck-picture":void 0,"data-edit":r?void 0:Ye(e,e+t.raw.trimEnd().length)},Q(t.tokens,n))}case"text":return x("p",{dir:"auto"},Q(t.tokens??[{type:"text",text:t.text}],n));case"blockquote":return x("blockquote",{},Cr(t.tokens,e,t.raw,n));case"list":{let r=0,i=x(t.ordered?"ol":"ul",{start:t.ordered&&t.start!==1?t.start:void 0,class:t.items.some(a=>a.task)?"deck-tasks":void 0});for(let a of t.items){let o=t.raw.indexOf(a.raw,r);r=o+a.raw.length;let l=e+Math.max(0,o),d=/^\s*(?:[-*+]|\d+[.)])\s+(?:\[[ xX]\]\s+)?/.exec(a.raw),c=a.tokens.length===1&&a.tokens[0].type==="text"&&!/\n\s*\S/.test(a.raw.trim().split(`
85
- `).slice(1).join(`
86
- `)),p=x("li",{dir:"auto","data-edit":c&&d?Ye(l+d[0].length,l+a.raw.trimEnd().length):void 0},[a.task?x("input",{type:"checkbox",checked:a.checked,disabled:!0,"aria-label":a.text}):null,...a.tokens.flatMap(u=>u.type==="text"?Q(u.tokens??[{type:"text",text:u.text}],n):[nt(u,l+Math.max(0,a.raw.indexOf(u.raw)),n,null)])]);s&&et(p,++s.step),i.append(p)}return i}case"code":{let r=/^(\S*)\s*(?:\{([^}]*)\})?/.exec(t.lang??"")??[],i=(r[1]??"").toLowerCase(),a=n.blocks[i];if(a){let d=x("div",{class:`deck-block deck-${i}`,"data-source":t.text});return d.append(x("pre",{class:"deck-block-source",dir:"ltr"},[x("code",{},[t.text])])),queueMicrotask(()=>Promise.resolve(a(d,t.text)).catch(()=>d.classList.add("is-failed"))),d}let o=Tr(r[2]??""),l=x("code",{class:i?`language-${i}`:void 0});for(let[d,c]of t.text.split(`
87
- `).entries())l.append(x("span",{class:o.has(d+1)?"deck-line is-marked":"deck-line"},[c,`
88
- `]));return x("pre",{dir:"ltr",class:o.size?"has-marks":void 0,tabindex:0},[l])}case"table":{let r=i=>i??void 0;return x("div",{class:"deck-table"},[x("table",{},[x("thead",{},[x("tr",{},t.header.map((i,a)=>x("th",{"data-align":r(t.align[a]),dir:"auto"},Q(i.tokens,n))))]),x("tbody",{},t.rows.map(i=>x("tr",{},i.map((a,o)=>x("td",{"data-align":r(t.align[o]),dir:"auto"},Q(a.tokens,n))))))])])}default:return null}}function Cr(t,e,n,s){let r=0;return t.map(i=>{let a=n.indexOf(i.raw,r);return r=Math.max(r,a+i.raw.length),nt(i,e+Math.max(0,a),s,null)})}function Tr(t){let e=new Set;for(let n of t.split(/[,|]/)){let[s,r]=n.split("-").map(i=>parseInt(i,10));if(Number.isFinite(s))for(let i=s;i<=(Number.isFinite(r)?r:s);i++)e.add(i)}return e}var Ye=(t,e)=>e>t?`${t}-${e}`:void 0;function Q(t=[],e){return t.flatMap(n=>{switch(n.type){case"text":case"escape":return n.tokens?Q(n.tokens,e):[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])];case"strong":return[x("strong",{},Q(n.tokens,e))];case"em":return[x("em",{},Q(n.tokens,e))];case"del":return[x("del",{},Q(n.tokens,e))];case"codespan":return[x("code",{},[n.text.replace(/&(amp|lt|gt|quot|#39);/g,(s,r)=>({amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"})[r])])];case"br":return[x("br")];case"link":{let s=zr(n.href);return s?[x("a",{href:s,rel:"noopener noreferrer",target:s.startsWith("#")?void 0:"_blank"},Q(n.tokens,e))]:Q(n.tokens,e)}case"image":{let s=e.resolve(n.href);return s?[x("img",{src:s,alt:n.text,loading:"lazy"})]:[n.text]}case"html":return/^<br\s*\/?>$/i.test(n.raw)?[x("br")]:[];default:return n.text?[n.text]:[]}})}var Gt={default:{paper:"#fffdf8",ink:"#1d1b16",primary:"#f7c531",voice:"calm",radius:10},ocean:{paper:"#f6fafb",ink:"#0d2530",primary:"#0f766e",voice:"calm",radius:6},ember:{paper:"#fff8f3",ink:"#2a160c",primary:"#d9480f",voice:"bold",radius:2},ink:{paper:"#ffffff",ink:"#111111",primary:"#3b5bdb",voice:"elegant",radius:0}},at={calm:{heading:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif'},elegant:{heading:'ui-serif, "Iowan Old Style", Georgia, "Noto Serif", serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},bold:{heading:'"Avenir Next Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif',body:'ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif'},friendly:{heading:'ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif',body:'ui-rounded, "SF Pro Rounded", system-ui, sans-serif'}};function Vt(t,e={}){let n=Gt[String(t.theme??"")]??Gt.default,s=typeof t.themeConfig=="object"&&t.themeConfig?t.themeConfig:{},r={...n,...Qt(e),...Qt(s)};return at[r.voice]||(r.voice="calm"),r}function Qt(t){let e={};for(let n of["paper","ink","primary","muted","soft"])typeof t[n]=="string"&&ne(t[n])&&(e[n]=t[n]);return t.dark&&typeof t.dark=="object"&&(e.dark=Object.fromEntries(Object.entries(t.dark).filter(([,n])=>typeof n=="string"&&ne(n)))),t.fonts&&Array.isArray(t.fonts.heading)&&Array.isArray(t.fonts.body)&&(e.fonts={heading:t.fonts.heading.map(String),body:t.fonts.body.map(String)}),typeof t.voice=="string"&&(e.voice=t.voice),typeof t.radius=="number"&&(e.radius=t.radius),e}function Xt(t,e){let n=ne(t.paper)??[255,253,248],s=ne(t.ink)??[29,27,22],r=e==="dark"?t.dark??{}:{},i=Se(ne(r.paper??"")??(e==="dark"?ge(s,[0,0,0],.35):n)),a=Se(ne(r.ink??"")??(e==="dark"?ge(n,[255,255,255],.2):s)),o=ne(r.primary??t.primary)??[247,197,49],l=rt(o,i,4.5),d=it(a,o)>=it(i,o)?a:i,c=[0,1,2,3,4,5].map(p=>rt(Rr(o,p*57),i,3));return{paper:ae(i),ink:ae(a),muted:ae(rt(Se(ne(r.muted??(e==="light"?t.muted??"":""))??ge(a,i,.38)),i,4.5)),line:ae(ge(a,i,.82)),primary:ae(l),onPrimary:ae(d),soft:ae(ne(r.soft??(e==="light"?t.soft??"":""))??ge(o,i,.78)),series:c.map(ae)}}function ne(t){let e=/^#?([\da-f]{3}|[\da-f]{6})$/i.exec(String(t).trim());if(!e)return null;let n=e[1].length===3?[...e[1]].map(s=>s+s).join(""):e[1];return[0,2,4].map(s=>parseInt(n.slice(s,s+2),16))}var ae=t=>`#${t.map(e=>Math.round(Math.max(0,Math.min(255,e))).toString(16).padStart(2,"0")).join("")}`,Se=t=>t.map(e=>Math.round(Math.max(0,Math.min(255,e)))),ge=(t,e,n)=>t.map((s,r)=>s+(e[r]-s)*n);function st(t){let[e,n,s]=t.map(r=>{let i=r/255;return i<=.03928?i/12.92:((i+.055)/1.055)**2.4});return .2126*e+.7152*n+.0722*s}function it(t,e){let[n,s]=[st(t),st(e)].sort((r,i)=>i-r);return(n+.05)/(s+.05)}function rt(t,e,n){let s=st(e)>.18?[0,0,0]:[255,255,255],r=0,i=Se(t);for(;it(i,e)<n&&r<1;)i=Se(ge(t,s,r=Math.min(1,r+.02)));return i}function Rr(t,e){let[n,s,r]=t.map(w=>w/255),i=Math.max(n,s,r),a=Math.min(n,s,r),o=(i+a)/2,l=i-a,d=l===0?0:l/(1-Math.abs(2*o-1)),c=l===0?0:i===n?(s-r)/l%6:i===s?(r-n)/l+2:(n-s)/l+4;c=(c*60+e+360)%360;let p=(1-Math.abs(2*o-1))*Math.max(d,.55),u=p*(1-Math.abs(c/60%2-1)),h=o-p/2,[f,k,m]=c<60?[p,u,0]:c<120?[u,p,0]:c<180?[0,p,u]:c<240?[0,u,p]:c<300?[u,0,p]:[p,0,u];return[f+h,k+h,m+h].map(w=>w*255)}var Kt={en:{deck:"Slides",previous:"Previous",next:"Next",present:"Present full screen",presenter:"Presenter view",overview:"All slides",edit:"Change",scheme:"Light or dark",export:"Save as PowerPoint",source:"The deck as text",notes:"Notes",noNotes:"No notes for this slide.",upNext:"Next",last:"Last slide",where:"Slide {n} of {count}",saved:"Saved"},fr:{deck:"Diapositives",previous:"Précédente",next:"Suivante",present:"Présenter en plein écran",presenter:"Vue présentateur",overview:"Toutes les diapositives",edit:"Modifier",scheme:"Clair ou sombre",export:"Enregistrer en PowerPoint",source:"La présentation en texte",notes:"Notes",noNotes:"Pas de notes pour cette diapositive.",upNext:"Ensuite",last:"Dernière diapositive",where:"Diapositive {n} sur {count}",saved:"Enregistré"},ar:{deck:"الشرائح",previous:"السابقة",next:"التالية",present:"العرض بملء الشاشة",presenter:"عرض المقدّم",overview:"كل الشرائح",edit:"تعديل",scheme:"فاتح أو داكن",export:"الحفظ بصيغة PowerPoint",source:"العرض كنص",notes:"الملاحظات",noNotes:"لا ملاحظات لهذه الشريحة.",upNext:"التالية",last:"الشريحة الأخيرة",where:"الشريحة {n} من {count}",saved:"تم الحفظ"},ja:{deck:"スライド",previous:"前へ",next:"次へ",present:"全画面で発表",presenter:"発表者ビュー",overview:"すべてのスライド",edit:"編集",scheme:"ライトまたはダーク",export:"PowerPoint で保存",source:"テキストとしてのスライド",notes:"メモ",noNotes:"このスライドにメモはありません。",upNext:"次",last:"最後のスライド",where:"スライド {n} / {count}",saved:"保存しました"}},Jt=t=>Kt[t.split("-")[0].toLowerCase()]??Kt.en;var Er=/^(ar|he|fa|ur|ps|sd|ug|yi|dv|ckb)\b/i,Pr={back:"M15 5l-7 7 7 7",next:"M9 5l7 7-7 7",present:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5",presenter:"M3 5h12v9H3zM18 8h3M18 12h3M6 19h6",grid:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z",edit:"M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4",scheme:"M12 3a9 9 0 1 0 9 9 7 7 0 0 1-9-9z",export:"M12 4v11M7 10l5 5 5-5M5 20h14"};function Lr(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("aria-hidden","true"),(t==="back"||t==="next")&&e.setAttribute("class","deck-flip");let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",Pr[t]),e.append(n),e}function Yt(t,e){let n=e.source.replace(/\r\n?/g,`
89
- `),s=Ie(n),r=0,i=0,a=[],o=String(e.lang??s.settings.lang??document.documentElement.lang??"en")||"en",l=String(e.dir??s.settings.dir??(Er.test(o)?"rtl":"ltr")),d={...Jt(o),...e.strings},c=new Intl.NumberFormat(o).format,p=matchMedia("(prefers-color-scheme: dark)"),u="light",h=Date.now();t.classList.add("deck"),t.lang=o,t.dir=l;let f=x("div",{class:"deck-stage",tabindex:0,role:"region","aria-roledescription":"carousel","aria-label":d.deck}),k=x("span",{class:"deck-where","aria-live":"polite"}),m=(g,b,$)=>{let L=x("button",{type:"button","aria-label":b,"data-act":g},[Lr(g)]);return L.addEventListener("click",$),L},w=m("back",d.previous,()=>v(-1)),y=m("next",d.next,()=>v(1)),_=m("edit",d.edit,()=>H("is-editing")),U=m("presenter",d.presenter,()=>H("is-presenting")),N=m("grid",d.overview,()=>H("is-overview")),E=x("div",{class:"deck-bar"},[w,k,y,x("span",{class:"deck-gap"}),N,U,e.editable===!1?null:_,m("scheme",d.scheme,()=>{u=u==="dark"?"light":"dark",D()}),e.onExport?m("export",d.export,()=>e.onExport?.(bt)):null,document.fullscreenEnabled?m("present",d.present,()=>pe()):null]),C=x("textarea",{class:"deck-source",spellcheck:"false","aria-label":d.source,dir:"auto"}),F=x("div",{class:"deck-next"}),X=x("div",{class:"deck-notes",dir:"auto","aria-label":d.notes}),q=x("span",{class:"deck-clock"}),K=x("div",{class:"deck-presenter"},[F,X]);t.replaceChildren(C,f,K,E),E.insertBefore(q,E.querySelector(".deck-gap"));let Y=[],$e=()=>{let g=Je(e.kit,s.settings.kit);return Y=g.problems,g.kit};function D(){te.kit=$e();let g=Vt(s.settings,te.kit.tokens),b=Xt(g,u),$=R=>R.map(M=>/^[\w-]+$/.test(M)?M:`"${M.replace(/["\\]/g,"")}"`).join(", "),L=g.fonts?{heading:$(g.fonts.heading),body:$(g.fonts.body)}:at[g.voice];for(let[R,M]of Object.entries({paper:b.paper,ink:b.ink,muted:b.muted,line:b.line,primary:b.primary,fill:g.primary,"on-fill":b.onPrimary,soft:b.soft,heading:L.heading,body:L.body,radius:`${g.radius}px`,...Object.fromEntries(b.series.map((I,P)=>[`series-${P+1}`,I]))}))t.style.setProperty(`--deck-${R}`,M);t.dataset.scheme=u,t.dispatchEvent(new CustomEvent("deck-scheme",{detail:{scheme:u,colours:b,tokens:g}}))}let re=()=>{let g=e.scheme??s.settings.colorSchema??"auto";u=g==="dark"||g==="auto"&&p.matches?"dark":"light"},te={blocks:e.blocks??{},resolve:e.resolve??(g=>g),headings:e.headings??"real",number:g=>c(g),total:0,kit:Je().kit};function me(){te.total=s.slides.length,a=s.slides.map(g=>tt(g,te));for(let[g,{element:b}]of a.entries())b.setAttribute("aria-label",d.where.replace("{n}",c(g+1)).replace("{count}",c(a.length))),b.addEventListener("click",()=>{t.classList.contains("is-overview")&&(H("is-overview"),O(g,0))});f.replaceChildren(...a.map(({element:g})=>g)),r=Math.min(r,a.length-1),B(),requestAnimationFrame(()=>A())}function A(){for(let{element:g}of a)z(g)}function z(g){let b=!1;for(let $ of g.querySelectorAll(".deck-slot")){let L=1;for($.style.setProperty("--deck-fit","1");$.scrollHeight>$.clientHeight+1&&L>.6;)$.style.setProperty("--deck-fit",String(L=Math.round((L-.05)*100)/100));$.scrollHeight>$.clientHeight+1&&(b=!0)}b?g.dataset.overflow="true":delete g.dataset.overflow}function B(){for(let[b,{element:$,steps:L}]of a.entries()){$.classList.toggle("is-shown",b===r),$.inert=b!==r&&!t.classList.contains("is-overview");for(let R of $.querySelectorAll(".deck-step"))R.classList.toggle("is-on",b<r||b===r&&Number(R.getAttribute("data-step"))<=i||L===0)}k.textContent=`${c(r+1)} / ${c(a.length)}`,w.toggleAttribute("disabled",r===0&&i===0),y.toggleAttribute("disabled",r>=a.length-1&&i>=(a[r]?.steps??0)),X.textContent=s.slides[r]?.notes||d.noNotes;let g=s.slides[r+1];F.replaceChildren(x("span",{},[g?d.upNext:d.last]),...g?[tt(g,te).element]:[]),t.dispatchEvent(new CustomEvent("deck-move",{detail:{at:r,step:i}}))}function v(g){let b=a[r]?.steps??0;if(g>0&&i<b){i++,B();return}if(g<0&&i>0){i--,B();return}let $=r+g;$<0||$>=a.length||O($,g>0?0:a[$].steps)}function O(g,b=0){if(g===r){i=b,B();return}let $=g>r,L=s.slides[$?g:r]?.settings??{},R=String(L.transition??s.settings.transition??"none"),[M,I]=R.split("|").map(Ae=>Ae.trim()),P=$?M:I??M;l==="rtl"&&(P=P.replace(/-(left|right)$/,(Ae,ze)=>ze==="left"?"-right":"-left")),P==="view-transition"&&(P="morph");let se=()=>{r=g,i=b,P==="morph"&&Z(a[g].element),B()},fn=matchMedia("(prefers-reduced-motion: reduce)").matches;if(!document.startViewTransition||P==="none"||fn||t.classList.contains("is-overview"))return se();P==="morph"&&Z(a[r].element,a[g].element),document.documentElement.dataset.deckTransition=P;let xt=document.startViewTransition(se);xt.ready.catch(()=>{}),xt.finished.finally(()=>{delete document.documentElement.dataset.deckTransition;for(let{element:Ae}of a)for(let ze of Ae.querySelectorAll("[data-morph]"))ze.style.removeProperty("view-transition-name"),ze.removeAttribute("data-morph")})}function Z(g,b){let $=R=>`${R.tagName}:${R.tagName==="IMG"?R.getAttribute("src"):(R.textContent??"").trim().slice(0,80)}`,L=R=>[...R.querySelectorAll("h1, h2, h3, h4, .deck-h, li, p, img, .deck-block, blockquote, .deck-image")];if(b){let R=new Map(L(b).map(I=>[$(I),I])),M=0;for(let I of L(g)){let P=R.get($(I));if(!P||P.dataset.morph||I.closest("[data-morph]"))continue;let se=`deck-m${M++}`;I.dataset.morph=P.dataset.morph=se,I.style.setProperty("view-transition-name",se)}return}for(let R of g.querySelectorAll("[data-morph]")){let M=R.dataset.morph;for(let I of f.querySelectorAll(`[data-morph="${M}"]`))I!==R&&I.style.removeProperty("view-transition-name");R.style.setProperty("view-transition-name",M)}}function H(g){for(let b of["is-editing","is-presenting","is-overview"])b!==g&&t.classList.remove(b);t.classList.toggle(g),_.setAttribute("aria-pressed",String(t.classList.contains("is-editing"))),U.setAttribute("aria-pressed",String(t.classList.contains("is-presenting"))),N.setAttribute("aria-pressed",String(t.classList.contains("is-overview"))),t.classList.contains("is-editing")&&(C.value=n,C.focus()),B(),requestAnimationFrame(()=>A())}function pe(){f.requestFullscreen?.().then(()=>f.focus(),()=>{})}function ue(g){n=g.replace(/\r\n?/g,`
90
- `),s=Ie(n),D(),me(),e.onChange?.(n)}let gt=0;C.addEventListener("input",g=>{g.isComposing||(clearTimeout(gt),gt=setTimeout(()=>ue(C.value),120))});let mt=()=>{let g=C.selectionStart,b=s.slides.findIndex($=>g>=$.start&&g<=$.end+1);b>=0&&b!==r&&(r=b,i=a[b]?.steps??0,B())};C.addEventListener("keyup",mt),C.addEventListener("click",mt),f.addEventListener("dblclick",g=>{if(e.editable===!1||document.fullscreenElement)return;let b=g.target.closest("[data-edit]");if(!b)return;let[$,L]=b.dataset.edit.split("-").map(Number);b.contentEditable="true",b.focus();let R=P=>{b.removeEventListener("keydown",M),b.removeEventListener("blur",I),b.contentEditable="false";let se=en(b);P&&se!==n.slice($,L)?ue(n.slice(0,$)+se+n.slice(L)):me()},M=P=>{P.isComposing||(P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),R(!0)),P.key==="Escape"&&(P.preventDefault(),R(!1)))},I=()=>R(!0);b.addEventListener("keydown",M),b.addEventListener("blur",I)}),t.addEventListener("keydown",g=>{let b=g.target;if(b.isContentEditable||b===C||b.tagName==="BUTTON"&&(g.key===" "||g.key==="Enter")){(g.metaKey||g.ctrlKey)&&g.key==="s"&&(g.preventDefault(),e.onSave?.(n));return}let $=l==="rtl"?"ArrowLeft":"ArrowRight",L=l==="rtl"?"ArrowRight":"ArrowLeft";if(g.altKey||g.ctrlKey||g.metaKey){(g.metaKey||g.ctrlKey)&&g.key==="s"&&(g.preventDefault(),e.onSave?.(n));return}let M={[$]:()=>v(1),[L]:()=>v(-1),ArrowDown:()=>v(1),ArrowUp:()=>v(-1),PageDown:()=>v(1),PageUp:()=>v(-1)," ":()=>v(1),Home:()=>O(0),End:()=>O(a.length-1,a.at(-1)?.steps??0),f:pe,p:()=>H("is-presenting"),o:()=>H("is-overview"),e:()=>H("is-editing")}[g.key];M&&(g.preventDefault(),M())}),f.addEventListener("click",g=>{document.fullscreenElement&&!g.target.closest("a, button, input")&&v(1)});let kt=0;f.addEventListener("touchstart",g=>{kt=g.touches[0].clientX},{passive:!0}),f.addEventListener("touchend",g=>{let b=g.changedTouches[0].clientX-kt;Math.abs(b)>50&&v(b<0==(l!=="rtl")?1:-1)}),p.addEventListener("change",()=>{re(),D()});let hn=setInterval(()=>{let g=Math.floor((Date.now()-h)/1e3);q.textContent=t.classList.contains("is-presenting")?`${String(Math.floor(g/60)).padStart(2,"0")}:${String(g%60).padStart(2,"0")}`:""},1e3);re(),D(),me(),document.fonts?.ready.then(()=>A());let bt={root:t,stage:f,get source(){return n},get deck(){return s},get at(){return r},get scheme(){return u},get kit(){return te.kit},get kitProblems(){return Y},lang:o,dir:l,slides:()=>a.map(({element:g})=>g),setSource:ue,go:O,toggle:H,present:pe,fitAll:A,setScheme:g=>{u=g,D()},destroy:()=>clearInterval(hn)};return bt}function en(t){let e="";for(let n of t.childNodes)if(n.nodeType===Node.TEXT_NODE)e+=(n.textContent??"").replace(/([*_`[\]\\])/g,"\\$1");else if(n instanceof HTMLElement){let s=en(n);e+={STRONG:`**${s}**`,B:`**${s}**`,EM:`*${s}*`,I:`*${s}*`,CODE:`\`${n.textContent}\``,DEL:`~~${s}~~`,BR:`
91
- `,A:`[${s}](${n.getAttribute("href")??""})`}[n.tagName]??s}return e.replace(/ /g," ").replace(/\n+$/,"")}var ot=new Map;function tn(t,e){return ot.has(t)||ot.set(t,new Promise((n,s)=>{let r=document.createElement("script");r.src=t,r.onload=()=>n(globalThis[e]),r.onerror=s,document.head.append(r)})),ot.get(t)}var je=(t,e,n,s)=>/node_modules\/$/.test(t)?`${t}${e}/${s}`:`${t}${e}@${n}/${s}`;function nn({base:t,root:e,versions:n={}}){let{echarts:s="6.1.0",pele:r="1.10.0"}=n,i=new Set,a=null;e.addEventListener("deck-scheme",l=>{a=l.detail.colours;for(let d of i)d.chart.setOption(o(d.option,d.box),!0)});let o=(l,d)=>{let c=parseFloat(getComputedStyle(d).fontSize)||16,p=getComputedStyle(d).direction==="rtl",u=Math.round(c*.6),h=(f,k)=>f===void 0?void 0:[f].flat().map(m=>({axisLabel:{color:a?.muted,fontSize:u},axisLine:{lineStyle:{color:a?.line}},splitLine:{lineStyle:{color:a?.line}},nameTextStyle:{color:a?.muted,fontSize:u},...p&&k&&m.type==="category"?{inverse:!0}:{},...p&&!k?{position:"right"}:{},...m}));return{color:a?.series,backgroundColor:"transparent",animation:!matchMedia("(prefers-reduced-motion: reduce)").matches,textStyle:{fontFamily:getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui",color:a?.ink,fontSize:u},...l,title:l.title?{...l.title,textStyle:{color:a?.ink,fontSize:Math.round(c*.8),...l.title?.textStyle}}:void 0,legend:l.legend?{itemWidth:u*1.6,itemHeight:u,...l.legend,textStyle:{color:a?.ink,fontSize:u,...l.legend?.textStyle}}:void 0,grid:{containLabel:!0,left:u,right:u,top:l.title?c*1.8:u,bottom:l.legend?c*1.6:u,...l.grid},xAxis:h(l.xAxis,!0),yAxis:h(l.yAxis,!1),toolbox:void 0,series:[l.series??[]].flat().map(f=>f.type==="pie"?{label:{color:a?.ink,fontSize:u},...f}:f)}};return{async echarts(l,d){let c=JSON.parse(d),p=await tn(je(t,"echarts",s,"dist/echarts.min.js"),"echarts"),u=document.createElement("div");u.className="deck-chart",u.setAttribute("role","img"),u.setAttribute("aria-label",String(c.title?.text??"")),l.append(u);let h=p.init(u,null,{renderer:"svg",locale:document.documentElement.lang?.startsWith("ja")?"JA":"EN"}),f={chart:h,option:c,box:l};i.add(f),h.setOption(o(c,l)),new ResizeObserver(()=>{h.resize(),h.setOption(o(c,l),!0)}).observe(u),Object.assign(l,{chart:h})},async mermaid(l,d){let c=await tn(je(t,"pele",r,"dist/pele.global.js"),"pele"),p=getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui, sans-serif",{svg:u}=c.render(d,{fontFamily:p,links:!1,images:!1,autoDirection:!0,maxWidth:Math.max(320,l.clientWidth*1.4)}),h=`--pele-bg:transparent;--pele-fg:${a?.ink};--pele-muted:${a?.muted};--pele-line:${a?.muted};--pele-surface:${a?.soft};--pele-surface-alt:${a?.line};--pele-border:${a?.primary};--pele-accent:${a?.primary};--pele-font:${p.replace(/[<>"]/g,"")}`,f=document.createElement("img");f.alt=d,f.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(u.replace(/^(<svg\b[^>]*>)/,`$1<style>svg{${h}}</style>`))}`;let k=document.createElement("div");k.className="deck-diagram",k.append(f),l.append(k)}}}var lt="0.1.0";var ct='<script type="text/markdown" id="deck">',Mr="<\/script>",jr=t=>t.replace(/<(\\*)(\/?script)/gi,"<\\$1$2"),dt=t=>t.replace(/<\\(\\*)(\/?script)/gi,"<$1$2"),ve=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),_r=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function Or(t){if(/\\<(!--|\/?script)/i.test(t))throw new Error("This code cannot be held in a page as it is.");return t.replace(/<(!--|\/?script)/gi,"\\x3C$1")}function rn(t){let e=t.indexOf(ct);if(e<0)return null;let n=e+ct.length,s=t.slice(n).search(/<\/script/i);return s<0?null:dt(t.slice(n,n+s).replace(/^\n/,"").replace(/\n$/,""))}var Ir=(t=lt)=>`https://cdn.jsdelivr.net/npm/@codename/deck@${t}/dist/deck.js`;function pt(t,{title:e="",lang:n="en",dir:s="auto",renderer:r={src:Ir()},base:i,generator:a=`deck ${lt}`}={}){let o=i?` data-base="${ve(i)}"`:"",l="src"in r?`<script src="${ve(r.src)}"${o}><\/script>`:`<script${o}>${Or(r.code)}<\/script>`;return`<!doctype html>
87
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${G(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:s,autolink:r}){let i=r?G(n,!0):this.parser.parseInline(s),a=Nt(t);if(a===null)return i;t=G(a,r);let l='<a href="'+t+'"';return e&&(l+=' title="'+G(e)+'"'),l+=">"+i+"</a>",l}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=Nt(t);if(r===null)return G(n);t=r;let i=`<img src="${G(t)}" alt="${G(n)}"`;return e&&(i+=` title="${G(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:G(t.text)}},at=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},J=class Je{options;renderer;textRenderer;constructor(e){this.options=e||de,this.options.renderer=this.options.renderer||new Me,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new at}static parse(e,n){return new Je(n).parse(e)}static parseInline(e,n){return new Je(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let a=r,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){n+=l||"";continue}}let i=r;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(i.type)){s+=l||"";continue}}let a=i;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"checkbox":{s+=n.checkbox(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}},xe=class{options;block;constructor(t){this.options=t||de}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Q.lex:Q.lexInline}provideParser(t=this.block){return t?J.parse:J.parseInline}};function le(t,e){if(Array.isArray(e))for(let n=0;n<e.length;n++)t.push(e[n]);else t.push(e)}var Tr=class{defaults=Ye();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=J;Renderer=Me;TextRenderer=at;Lexer=Q;Tokenizer=Le;Hooks=xe;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(le(n,e.call(this,s)),s.type){case"table":{let r=s;for(let i of r.header)le(n,this.walkTokens(i.tokens,e));for(let i of r.rows)for(let a of i)le(n,this.walkTokens(a.tokens,e));break}case"list":{let r=s;le(n,this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let a=r[i].flat(1/0);le(n,this.walkTokens(a,e))}):r.tokens&&le(n,this.walkTokens(r.tokens,e))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...a){let l=r.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new Me(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=n.renderer[a],o=r[a];r[a]=(...d)=>{let c=l.apply(r,d);return c===!1&&(c=o.apply(r,d)),c||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Le(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=n.tokenizer[a],o=r[a];r[a]=(...d)=>{let c=l.apply(r,d);return c===!1&&(c=o.apply(r,d)),c}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new xe;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=n.hooks[a],o=r[a];xe.passThroughHooks.has(i)?r[a]=d=>{if(this.defaults.async&&xe.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await l.call(r,d);return o.call(r,p)})();let c=l.call(r,d);return o.call(r,c)}:r[a]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(r,d);return p===!1&&(p=await o.apply(r,d)),p})();let c=l.apply(r,d);return c===!1&&(c=o.apply(r,d)),c}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),r&&le(l,r.call(this,a)),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Q.lex(t,e??this.defaults)}parser(t,e){return J.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(e):e,l=await(r.hooks?await r.hooks.provideLexer(t):t?Q.lex:Q.lexInline)(a,r),o=r.hooks?await r.hooks.processAllTokens(l):l;r.walkTokens&&await Promise.all(this.walkTokens(o,r.walkTokens));let d=await(r.hooks?await r.hooks.provideParser(t):t?J.parse:J.parseInline)(o,r);return r.hooks?await r.hooks.postprocess(d):d})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let a=(r.hooks?r.hooks.provideLexer(t):t?Q.lex:Q.lexInline)(e,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let l=(r.hooks?r.hooks.provideParser(t):t?J.parse:J.parseInline)(a,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(a){return i(a)}}}onError(t,e){return n=>{if(n.message+=`
88
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+G(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},ce=new Tr;function T(t,e){return ce.parse(t,e)}T.options=T.setOptions=function(t){return ce.setOptions(t),T.defaults=ce.defaults,Ht(T.defaults),T};T.getDefaults=Ye;T.defaults=de;function Rr(...t){return ce.use(...t),T.defaults=ce.defaults,Ht(T.defaults),T}T.use=Rr;T.walkTokens=function(t,e){return ce.walkTokens(t,e)};T.parseInline=ce.parseInline;T.Parser=J;T.parser=J.parse;T.Renderer=Me;T.TextRenderer=at;T.Lexer=Q;T.lexer=Q.lex;T.Tokenizer=Le;T.Hooks=xe;T.parse=T;var Yr=T.options,es=T.setOptions,ts=T.walkTokens,ns=T.parseInline;var rs=J.parse,ss=Q.lex;var Er=/^(ar|he|fa|ur|ps|sd|ug|yi|dv|ckb)\b/i,Pr={back:"M15 5l-7 7 7 7",next:"M9 5l7 7-7 7",present:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5",presenter:"M3 5h12v9H3zM18 8h3M18 12h3M6 19h6",grid:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z",edit:"M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4",scheme:"M12 3a9 9 0 1 0 9 9 7 7 0 0 1-9-9z",export:"M12 4v11M7 10l5 5 5-5M5 20h14"};function Lr(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("aria-hidden","true"),(t==="back"||t==="next")&&e.setAttribute("class","deck-flip");let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",Pr[t]),e.append(n),e}function Yt(t,e){let n=e.source.replace(/\r\n?/g,`
89
+ `),s=Ie(n),r=0,i=0,a=[],l=String(e.lang??s.settings.lang??document.documentElement.lang??"en")||"en",o=String(e.dir??s.settings.dir??(Er.test(l)?"rtl":"ltr")),d={...Mt(l),...e.strings},c=new Intl.NumberFormat(l).format,p=matchMedia("(prefers-color-scheme: dark)"),u="light",h=Date.now();t.classList.add("deck"),t.lang=l,t.dir=o;let f=x("div",{class:"deck-stage",tabindex:0,role:"region","aria-roledescription":d.carousel,"aria-label":d.deck}),k=x("span",{class:"deck-where","aria-live":"polite"}),m=(g,b,$)=>{let L=x("button",{type:"button","aria-label":b,"data-act":g},[Lr(g)]);return L.addEventListener("click",$),L},w=m("back",d.previous,()=>v(-1)),y=m("next",d.next,()=>v(1)),_=m("edit",d.edit,()=>H("is-editing")),U=m("presenter",d.presenter,()=>H("is-presenting")),q=m("grid",d.overview,()=>H("is-overview")),E=x("div",{class:"deck-bar"},[w,k,y,x("span",{class:"deck-gap"}),q,U,e.editable===!1?null:_,m("scheme",d.scheme,()=>{u=u==="dark"?"light":"dark",B()}),e.onExport?m("export",d.export,()=>e.onExport?.(bt)):null,document.fullscreenEnabled?m("present",d.present,()=>pe()):null]),C=x("textarea",{class:"deck-source",spellcheck:"false","aria-label":d.source,dir:"auto"}),Z=x("div",{class:"deck-next"}),X=x("div",{class:"deck-notes",dir:"auto","aria-label":d.notes}),D=x("span",{class:"deck-clock"}),K=x("div",{class:"deck-presenter"},[Z,X]);t.replaceChildren(C,f,K,E),E.insertBefore(D,E.querySelector(".deck-gap"));let Y=[],$e=()=>{let g=De(e.kit,s.settings.kit);return Y=g.problems,g.kit};function B(){te.kit=$e();let g=Et(s.settings,te.kit.tokens),b=Pt(g,u),$=R=>R.map(M=>/^[\w-]+$/.test(M)?M:`"${M.replace(/["\\]/g,"")}"`).join(", "),L=g.fonts?{heading:$(g.fonts.heading),body:$(g.fonts.body)}:Qe[g.voice];for(let[R,M]of Object.entries({paper:b.paper,ink:b.ink,muted:b.muted,line:b.line,primary:b.primary,fill:g.primary,"on-fill":b.onPrimary,soft:b.soft,heading:L.heading,body:L.body,radius:`${g.radius}px`,...Object.fromEntries(b.series.map((N,P)=>[`series-${P+1}`,N]))}))t.style.setProperty(`--deck-${R}`,M);t.dataset.scheme=u,t.dispatchEvent(new CustomEvent("deck-scheme",{detail:{scheme:u,colours:b,tokens:g}}))}let re=()=>{let g=e.scheme??s.settings.colorSchema??"auto";u=g==="dark"||g==="auto"&&p.matches?"dark":"light"},te={blocks:e.blocks??{},resolve:e.resolve??(g=>g),headings:e.headings??"real",number:g=>c(g),total:0,kit:De().kit,lex:e.lex??(g=>new Q({gfm:!0}).lex(g)),slide:d.slide};function me(){te.total=s.slides.length,a=s.slides.map(g=>Ze(g,te));for(let[g,{element:b}]of a.entries())b.setAttribute("aria-label",d.where.replace("{n}",c(g+1)).replace("{count}",c(a.length))),b.addEventListener("click",()=>{t.classList.contains("is-overview")&&(H("is-overview"),O(g,0))});f.replaceChildren(...a.map(({element:g})=>g)),r=Math.min(r,a.length-1),F(),requestAnimationFrame(()=>A())}function A(){for(let{element:g}of a)z(g)}function z(g){let b=!1;for(let $ of g.querySelectorAll(".deck-slot")){let L=1;for($.style.setProperty("--deck-fit","1");$.scrollHeight>$.clientHeight+1&&L>.6;)$.style.setProperty("--deck-fit",String(L=Math.round((L-.05)*100)/100));$.scrollHeight>$.clientHeight+1&&(b=!0)}b?g.dataset.overflow="true":delete g.dataset.overflow}function F(){for(let[b,{element:$,steps:L}]of a.entries()){$.classList.toggle("is-shown",b===r),$.inert=b!==r&&!t.classList.contains("is-overview");for(let R of $.querySelectorAll(".deck-step"))R.classList.toggle("is-on",b<r||b===r&&Number(R.getAttribute("data-step"))<=i||L===0)}k.textContent=`${c(r+1)} / ${c(a.length)}`,w.toggleAttribute("disabled",r===0&&i===0),y.toggleAttribute("disabled",r>=a.length-1&&i>=(a[r]?.steps??0)),X.textContent=s.slides[r]?.notes||d.noNotes;let g=s.slides[r+1];Z.replaceChildren(x("span",{},[g?d.upNext:d.last]),...g?[Ze(g,te).element]:[]),t.dispatchEvent(new CustomEvent("deck-move",{detail:{at:r,step:i}}))}function v(g){let b=a[r]?.steps??0;if(g>0&&i<b){i++,F();return}if(g<0&&i>0){i--,F();return}let $=r+g;$<0||$>=a.length||O($,g>0?0:a[$].steps)}function O(g,b=0){if(g===r){i=b,F();return}let $=g>r,L=s.slides[$?g:r]?.settings??{},R=String(L.transition??s.settings.transition??"none"),[M,N]=R.split("|").map(Ae=>Ae.trim()),P=$?M:N??M;o==="rtl"&&(P=P.replace(/-(left|right)$/,(Ae,ze)=>ze==="left"?"-right":"-left")),P==="view-transition"&&(P="morph");let se=()=>{r=g,i=b,P==="morph"&&I(a[g].element),F()},fn=matchMedia("(prefers-reduced-motion: reduce)").matches;if(!document.startViewTransition||P==="none"||fn||t.classList.contains("is-overview"))return se();P==="morph"&&I(a[r].element,a[g].element),document.documentElement.dataset.deckTransition=P;let xt=document.startViewTransition(se);xt.ready.catch(()=>{}),xt.finished.finally(()=>{delete document.documentElement.dataset.deckTransition;for(let{element:Ae}of a)for(let ze of Ae.querySelectorAll("[data-morph]"))ze.style.removeProperty("view-transition-name"),ze.removeAttribute("data-morph")})}function I(g,b){let $=R=>`${R.tagName}:${R.tagName==="IMG"?R.getAttribute("src"):(R.textContent??"").trim().slice(0,80)}`,L=R=>[...R.querySelectorAll("h1, h2, h3, h4, .deck-h, li, p, img, .deck-block, blockquote, .deck-image")];if(b){let R=new Map(L(b).map(N=>[$(N),N])),M=0;for(let N of L(g)){let P=R.get($(N));if(!P||P.dataset.morph||N.closest("[data-morph]"))continue;let se=`deck-m${M++}`;N.dataset.morph=P.dataset.morph=se,N.style.setProperty("view-transition-name",se)}return}for(let R of g.querySelectorAll("[data-morph]")){let M=R.dataset.morph;for(let N of f.querySelectorAll(`[data-morph="${M}"]`))N!==R&&N.style.removeProperty("view-transition-name");R.style.setProperty("view-transition-name",M)}}function H(g){for(let b of["is-editing","is-presenting","is-overview"])b!==g&&t.classList.remove(b);t.classList.toggle(g),_.setAttribute("aria-pressed",String(t.classList.contains("is-editing"))),U.setAttribute("aria-pressed",String(t.classList.contains("is-presenting"))),q.setAttribute("aria-pressed",String(t.classList.contains("is-overview"))),t.classList.contains("is-editing")&&(C.value=n,C.focus()),F(),requestAnimationFrame(()=>A())}function pe(){f.requestFullscreen?.().then(()=>f.focus(),()=>{})}function ue(g){n=g.replace(/\r\n?/g,`
90
+ `),s=Ie(n),B(),me(),e.onChange?.(n)}let gt=0;C.addEventListener("input",g=>{g.isComposing||(clearTimeout(gt),gt=setTimeout(()=>ue(C.value),120))});let mt=()=>{let g=C.selectionStart,b=s.slides.findIndex($=>g>=$.start&&g<=$.end+1);b>=0&&b!==r&&(r=b,i=a[b]?.steps??0,F())};C.addEventListener("keyup",mt),C.addEventListener("click",mt),f.addEventListener("dblclick",g=>{if(e.editable===!1||document.fullscreenElement)return;let b=g.target.closest("[data-edit]");if(!b)return;let[$,L]=b.dataset.edit.split("-").map(Number);b.contentEditable="true",b.focus();let R=P=>{b.removeEventListener("keydown",M),b.removeEventListener("blur",N),b.contentEditable="false";let se=en(b);P&&se!==n.slice($,L)?ue(n.slice(0,$)+se+n.slice(L)):me()},M=P=>{P.isComposing||(P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),R(!0)),P.key==="Escape"&&(P.preventDefault(),R(!1)))},N=()=>R(!0);b.addEventListener("keydown",M),b.addEventListener("blur",N)}),t.addEventListener("keydown",g=>{let b=g.target;if(b.isContentEditable||b===C||b.tagName==="BUTTON"&&(g.key===" "||g.key==="Enter")){(g.metaKey||g.ctrlKey)&&g.key==="s"&&(g.preventDefault(),e.onSave?.(n));return}let $=o==="rtl"?"ArrowLeft":"ArrowRight",L=o==="rtl"?"ArrowRight":"ArrowLeft";if(g.altKey||g.ctrlKey||g.metaKey){(g.metaKey||g.ctrlKey)&&g.key==="s"&&(g.preventDefault(),e.onSave?.(n));return}let M={[$]:()=>v(1),[L]:()=>v(-1),ArrowDown:()=>v(1),ArrowUp:()=>v(-1),PageDown:()=>v(1),PageUp:()=>v(-1)," ":()=>v(1),Home:()=>O(0),End:()=>O(a.length-1,a.at(-1)?.steps??0),f:pe,p:()=>H("is-presenting"),o:()=>H("is-overview"),e:()=>H("is-editing")}[g.key];M&&(g.preventDefault(),M())}),f.addEventListener("click",g=>{document.fullscreenElement&&!g.target.closest("a, button, input")&&v(1)});let kt=0;f.addEventListener("touchstart",g=>{kt=g.touches[0].clientX},{passive:!0}),f.addEventListener("touchend",g=>{let b=g.changedTouches[0].clientX-kt;Math.abs(b)>50&&v(b<0==(o!=="rtl")?1:-1)}),p.addEventListener("change",()=>{re(),B()});let hn=setInterval(()=>{let g=Math.floor((Date.now()-h)/1e3);D.textContent=t.classList.contains("is-presenting")?`${String(Math.floor(g/60)).padStart(2,"0")}:${String(g%60).padStart(2,"0")}`:""},1e3);re(),B(),me(),document.fonts?.ready.then(()=>A());let bt={root:t,stage:f,get source(){return n},get deck(){return s},get at(){return r},get scheme(){return u},get kit(){return te.kit},get kitProblems(){return Y},lang:l,dir:o,slides:()=>a.map(({element:g})=>g),setSource:ue,go:O,toggle:H,present:pe,fitAll:A,setScheme:g=>{u=g,B()},destroy:()=>clearInterval(hn)};return bt}function en(t){let e="";for(let n of t.childNodes)if(n.nodeType===Node.TEXT_NODE)e+=(n.textContent??"").replace(/([*_`[\]\\])/g,"\\$1");else if(n instanceof HTMLElement){let s=en(n);e+={STRONG:`**${s}**`,B:`**${s}**`,EM:`*${s}*`,I:`*${s}*`,CODE:`\`${n.textContent}\``,DEL:`~~${s}~~`,BR:`
91
+ `,A:`[${s}](${n.getAttribute("href")??""})`}[n.tagName]??s}return e.replace(/ /g," ").replace(/\n+$/,"")}var lt=new Map;function tn(t,e){return lt.has(t)||lt.set(t,new Promise((n,s)=>{let r=document.createElement("script");r.src=t,r.onload=()=>n(globalThis[e]),r.onerror=s,document.head.append(r)})),lt.get(t)}var je=(t,e,n,s)=>/node_modules\/$/.test(t)?`${t}${e}/${s}`:`${t}${e}@${n}/${s}`;function nn({base:t,root:e,versions:n={}}){let{echarts:s="6.1.0",pele:r="1.10.0"}=n,i=new Set,a=null;e.addEventListener("deck-scheme",o=>{a=o.detail.colours;for(let d of i)d.chart.setOption(l(d.option,d.box),!0)});let l=(o,d)=>{let c=parseFloat(getComputedStyle(d).fontSize)||16,p=getComputedStyle(d).direction==="rtl",u=Math.round(c*.6),h=(f,k)=>f===void 0?void 0:[f].flat().map(m=>({axisLabel:{color:a?.muted,fontSize:u},axisLine:{lineStyle:{color:a?.line}},splitLine:{lineStyle:{color:a?.line}},nameTextStyle:{color:a?.muted,fontSize:u},...p&&k&&m.type==="category"?{inverse:!0}:{},...p&&!k?{position:"right"}:{},...m}));return{color:a?.series,backgroundColor:"transparent",animation:!matchMedia("(prefers-reduced-motion: reduce)").matches,textStyle:{fontFamily:getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui",color:a?.ink,fontSize:u},...o,title:o.title?{...o.title,textStyle:{color:a?.ink,fontSize:Math.round(c*.8),...o.title?.textStyle}}:void 0,legend:o.legend?{itemWidth:u*1.6,itemHeight:u,...o.legend,textStyle:{color:a?.ink,fontSize:u,...o.legend?.textStyle}}:void 0,grid:{containLabel:!0,left:u,right:u,top:o.title?c*1.8:u,bottom:o.legend?c*1.6:u,...o.grid},xAxis:h(o.xAxis,!0),yAxis:h(o.yAxis,!1),toolbox:void 0,series:[o.series??[]].flat().map(f=>f.type==="pie"?{label:{color:a?.ink,fontSize:u},...f}:f)}};return{async echarts(o,d){let c=JSON.parse(d),p=await tn(je(t,"echarts",s,"dist/echarts.min.js"),"echarts"),u=document.createElement("div");u.className="deck-chart",u.setAttribute("role","img"),u.setAttribute("aria-label",String(c.title?.text??"")),o.append(u);let h=p.init(u,null,{renderer:"svg",locale:document.documentElement.lang?.startsWith("ja")?"JA":"EN"}),f={chart:h,option:c,box:o};i.add(f),h.setOption(l(c,o)),new ResizeObserver(()=>{h.resize(),h.setOption(l(c,o),!0)}).observe(u),Object.assign(o,{chart:h})},async mermaid(o,d){let c=await tn(je(t,"pele",r,"dist/pele.global.js"),"pele"),p=getComputedStyle(e).getPropertyValue("--deck-body")||"system-ui, sans-serif",{svg:u}=c.render(d,{fontFamily:p,links:!1,images:!1,autoDirection:!0,maxWidth:Math.max(320,o.clientWidth*1.4)}),h=`--pele-bg:transparent;--pele-fg:${a?.ink};--pele-muted:${a?.muted};--pele-line:${a?.muted};--pele-surface:${a?.soft};--pele-surface-alt:${a?.line};--pele-border:${a?.primary};--pele-accent:${a?.primary};--pele-font:${p.replace(/[<>"]/g,"")}`,f=document.createElement("img");f.alt=d,f.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(u.replace(/^(<svg\b[^>]*>)/,`$1<style>svg{${h}}</style>`))}`;let k=document.createElement("div");k.className="deck-diagram",k.append(f),o.append(k)}}}var ot="0.1.2";var ct='<script type="text/markdown" id="deck">',Mr="<\/script>",jr=t=>t.replace(/<(\\*)(\/?script)/gi,"<\\$1$2"),dt=t=>t.replace(/<\\(\\*)(\/?script)/gi,"<$1$2"),ve=t=>t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),_r=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");function Or(t){if(/\\<(!--|\/?script)/i.test(t))throw new Error("This code cannot be held in a page as it is.");return t.replace(/<(!--|\/?script)/gi,"\\x3C$1")}function rn(t){let e=t.indexOf(ct);if(e<0)return null;let n=e+ct.length,s=t.slice(n).search(/<\/script/i);return s<0?null:dt(t.slice(n,n+s).replace(/^\n/,"").replace(/\n$/,""))}var Ir=(t=ot)=>`https://cdn.jsdelivr.net/npm/@codename/deck@${t}/dist/deck.js`;function pt(t,{title:e="",lang:n="en",dir:s="auto",renderer:r={src:Ir()},base:i,generator:a=`deck ${ot}`}={}){let l=i?` data-base="${ve(i)}"`:"",o="src"in r?`<script src="${ve(r.src)}"${l}><\/script>`:`<script${l}>${Or(r.code)}<\/script>`;return`<!doctype html>
92
92
  <html lang="${ve(n)}" dir="${ve(s)}">
93
93
  <meta charset="utf-8">
94
94
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -99,9 +99,9 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error
99
99
  ${ct}
100
100
  ${jr(t)}
101
101
  ${Mr}
102
- ${l}
102
+ ${o}
103
103
  </html>
104
- `}var sn=13.333,Nr=7.5,an="h1, h2, h3, h4, h5, h6, .deck-h, p, ul, ol, blockquote";function V(t){let e=/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/.exec(t);return e?[e[1],e[2],e[3]].map(n=>Math.round(Number(n)).toString(16).padStart(2,"0")).join("").toUpperCase():t.replace("#","").toUpperCase().slice(0,6)||"000000"}async function ft(t,{PptxGenJS:e,JSZip:n}){let s=new e;s.layout="LAYOUT_WIDE",s.title=t.deck.slides[0]?.title??"",s.rtlMode=t.dir==="rtl";let r=getComputedStyle(t.root),i=f=>f.split(",").map(k=>k.trim().replace(/^["']|["']$/g,"")).find(k=>!/^(ui-|system-ui|-apple|sans-serif|serif|monospace)/.test(k))??"Arial";s.theme={headFontFace:i(r.getPropertyValue("--deck-heading")),bodyFontFace:i(r.getPropertyValue("--deck-body"))};let a={slides:0,charts:0,pictures:0,tables:0,placeholders:0},o=t.dir==="rtl",l=t.slides(),d=new Map,c=[];for(let[f,k]of l.entries()){let m=k.getBoundingClientRect(),w=sn/m.width,y=A=>{let z=A.getBoundingClientRect();return{x:(z.left-m.left)*w,y:(z.top-m.top)*w,w:z.width*w,h:z.height*w}},_=A=>{let z=A.closest(".deck-slot")??A,{x:B,w:v}=y(z),{y:O,h:Z}=y(A),H=getComputedStyle(z),pe=parseFloat(H.paddingInlineStart)*w,ue=parseFloat(H.paddingInlineEnd)*w;return{x:B+(o?ue:pe),y:O,w:v-pe-ue,h:Z*1.08}},U=A=>getComputedStyle(A).justifyContent==="center"?"middle":"top",N=A=>Math.round(A*w*72*10)/10,E=getComputedStyle(k),C=k.dataset.layout??"default",F=[...k.querySelectorAll(".deck-slot")],X=F[0]?.firstElementChild,q=X&&X.matches("h1, h2, h3, .deck-h")?X:null,K=t.kit.layouts[C],Y=`${K?Ht(K,C,t.lang):C}${k.classList.contains("deck-class-invert")?" (dark)":""}`;if(!d.has(Y)){let A=[];q&&A.push({placeholder:{options:{name:"title",type:"title",..._(q),valign:"bottom",margin:0,fontFace:s.theme.headFontFace,color:V(getComputedStyle(q).color),align:o?"right":"left"},text:""}});for(let z of F){let B=y(z),v=q&&z===F[0]?y(q).y+y(q).h:B.y,O=z.firstElementChild&&z.firstElementChild!==q?_(z.firstElementChild):{x:B.x,w:B.w};A.push({placeholder:{options:{name:`body-${z.dataset.slot}`,type:"body",x:O.x,y:v+.08,w:O.w,h:Math.max(.3,B.y+B.h-v-.08),margin:0,valign:U(z),color:V(getComputedStyle(z).color)},text:""}})}s.defineSlideMaster({title:Y,background:{color:V(E.backgroundColor)},objects:A,slideNumber:K?.numbered!==!1?{x:o?.3:sn-.9,y:Nr-.55,w:.6,h:.3,fontSize:10,color:V(r.getPropertyValue("--deck-muted").trim()||"#666666")}:void 0}),d.set(Y,new Set(A.map(z=>z.placeholder.options.name)))}let $e=d.get(Y),D=s.addSlide({masterName:Y});a.slides++;let re=k.querySelector(".deck-image");if(re){let A=/url\("?(.*?)"?\)/.exec(getComputedStyle(re).backgroundImage)?.[1],z=A&&await ht(A,re.clientWidth*2,re.clientHeight*2,!0);z&&(D.addImage({data:z,...y(re)}),a.pictures++)}q&&$e.has("title")&&(D.addText(ut(q,{pt:N,rtl:o,lang:t.lang}),{placeholder:"title"}),a.placeholders++);for(let A of F){let z=[...A.children].filter(v=>v!==q);if(z.length>0&&z.every(v=>v.matches(an))&&$e.has(`body-${A.dataset.slot}`)){D.addText(z.flatMap(v=>ut(v,{pt:N,rtl:o,lang:t.lang})),{placeholder:`body-${A.dataset.slot}`,valign:U(A),...on(A)}),a.placeholders++;continue}for(let v of z){let O=y(v);if(v.matches(an))D.addText(ut(v,{pt:N,rtl:o,lang:t.lang}),{..._(v),valign:"top",margin:0,...on(A)});else if(v.matches("pre"))D.addText(v.textContent?.replace(/\n$/,"")??"",{...O,fontFace:"Consolas",fontSize:N(parseFloat(getComputedStyle(v).fontSize)),color:V(getComputedStyle(v).color),fill:{color:V(getComputedStyle(v).backgroundColor)},valign:"top",margin:6,rtlMode:!1,align:"left"});else if(v.matches(".deck-table"))Dr(D,v,O,{pt:N,rtl:o,lang:t.lang}),a.tables++;else if(v.matches(".deck-echarts")&&v.chart){let Z=v.chart;Br(s,D,Z,O,{pt:N,rtl:o,lang:t.lang,ink:V(E.color)})?a.charts++:(D.addImage({data:await ht(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(Z.renderToSVGString())}`,O.w/w*2,O.h/w*2),...O}),a.pictures++)}else{let Z=v.querySelector("img");if(Z){let H=await ht(Z.src,Z.clientWidth*2,Z.clientHeight*2);H&&(D.addImage({data:H,...y(Z),altText:Z.alt}),a.pictures++)}}}}let te=t.deck.slides[f]?.notes;te&&D.addNotes(te);let me=t.deck.slides[f]?.settings??{};c.push(String(me.transition??t.deck.settings.transition??"none").split("|")[0].trim())}let p=await n.loadAsync(await s.write({outputType:"arraybuffer",compression:!0}));for(let[f,k]of c.entries()){let m=`ppt/slides/slide${f+1}.xml`,w=await p.file(m)?.async("string");!w||k==="none"||p.file(m,w.replace(/<\/p:clrMapOvr>|(?=<p:timing|<\/p:sld>)/,y=>`${y}${Fr(k,o)}`))}let u=await p.file("ppt/theme/theme1.xml")?.async("string");if(u){let f=w=>V(r.getPropertyValue(`--deck-${w}`).trim()),k=[f("fill"),...[2,3,4,5,6].map(w=>f(`series-${w}`))],m=`<a:clrScheme name="Deck"><a:dk1><a:srgbClr val="${f("ink")}"/></a:dk1><a:lt1><a:srgbClr val="${f("paper")}"/></a:lt1><a:dk2><a:srgbClr val="${f("ink")}"/></a:dk2><a:lt2><a:srgbClr val="${f("soft")}"/></a:lt2>${k.map((w,y)=>`<a:accent${y+1}><a:srgbClr val="${w}"/></a:accent${y+1}>`).join("")}<a:hlink><a:srgbClr val="${f("primary")}"/></a:hlink><a:folHlink><a:srgbClr val="${f("primary")}"/></a:folHlink></a:clrScheme>`;p.file("ppt/theme/theme1.xml",u.replace(/<a:clrScheme[\s\S]*?<\/a:clrScheme>/,m))}return{blob:await p.generateAsync({type:"blob",compression:"DEFLATE",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}),report:a}}function on(t){let e=t.firstElementChild,n=e?parseFloat(getComputedStyle(e).marginBlockEnd):0;return{paraSpaceAfter:Math.round(n*.5)}}function ut(t,e){let n=[],s=(i,a)=>{let o=getComputedStyle(i),l={fontSize:e.pt(parseFloat(o.fontSize)),color:V(o.color),bold:Number(o.fontWeight)>=600,lang:e.lang,rtlMode:e.rtl,align:o.textAlign==="center"?"center":e.rtl?"right":"left",...a},d=qr(i,l);d.length&&(d[d.length-1].options.breakLine=!0,n.push(...d))},r=(i,a)=>{let o=0;for(let l of i.children){o++;let d=[...l.children].filter(p=>p.matches("ul, ol")),c=l.cloneNode(!0);for(let p of[...c.children])p.matches("ul, ol, input")&&p.remove();l.after(c),s(c,{bullet:i.tagName==="OL"?{type:"number",startAt:o===1?Number(i.getAttribute("start")??1):void 0}:!0,indentLevel:a}),c.remove();for(let p of d)r(p,a+1)}};if(t.matches("ul, ol"))r(t,0);else if(t.matches("blockquote"))for(let i of t.children)s(i,{italic:getComputedStyle(i).fontStyle==="italic"});else s(t,{});return n}function qr(t,e){let n=[],s=(r,i)=>{if(r.nodeType===Node.TEXT_NODE){let o=(r.textContent??"").replace(/\s+/g," ");o&&n.push({text:o,options:{...i}});return}if(!(r instanceof HTMLElement))return;if(r.tagName==="BR"){n.length&&(n[n.length-1].options.breakLine=!0);return}let a={...i};r.matches("strong, b")&&(a.bold=!0,a.color=V(getComputedStyle(r).color)),r.matches("em, i")&&(a.italic=!0),r.matches("del, s")&&(a.strike="sngStrike"),r.matches("code")&&(a.fontFace="Consolas"),r.matches("a[href]")&&(a.hyperlink={url:r.getAttribute("href")});for(let o of r.childNodes)s(o,a)};for(let r of t.childNodes)s(r,e);return n.length&&(n[0].text=n[0].text.trimStart(),n[n.length-1].text=n[n.length-1].text.trimEnd()),n.filter(r=>r.text)}function Dr(t,e,n,s){let r=[...e.querySelectorAll("tr")].map(o=>[...o.children].map(l=>{let d=getComputedStyle(l),c=l.getAttribute("data-align");return{text:l.textContent?.trim()??"",options:{bold:l.tagName==="TH",fontSize:s.pt(parseFloat(d.fontSize)),color:V(d.color),lang:s.lang,rtlMode:s.rtl,align:c==="center"?"center":c==="right"!==s.rtl?"right":"left",border:[{type:"none"},{type:"none"},{type:"solid",pt:l.tagName==="TH"?1.5:.75,color:V(d.borderBlockEndColor)},{type:"none"}]}}})),i=[...e.querySelector("tr")?.children??[]].map(o=>o.getBoundingClientRect().width),a=i.reduce((o,l)=>o+l,0)||1;t.addTable(s.rtl?r.map(o=>o.reverse()):r,{...n,colW:(s.rtl?i.reverse():i).map(o=>o/a*n.w),margin:.06})}function Br(t,e,n,s,r){let i=n.getOption(),a=i.series??[];if(!a.length)return!1;let o=new Set(a.map(p=>p.type)),l=(i.color??[]).map(V),d=p=>Array.isArray(p)?Number(p.at(-1)):Number(typeof p=="object"&&p!==null?p.value:p),c={...s,showLegend:a.length>1||o.has("pie"),legendPos:"b",legendFontSize:12,legendColor:r.ink,chartColors:l,showTitle:!!i.title?.[0]?.text,title:i.title?.[0]?.text,titleFontSize:16,titleColor:r.ink,catAxisLabelColor:r.ink,valAxisLabelColor:r.ink,dataLabelColor:r.ink,lang:r.lang};if(o.size===1&&o.has("pie")){let p=a[0],u=Array.isArray(p.radius)&&parseFloat(p.radius[0])>0;return e.addChart(u?t.charts.DOUGHNUT:t.charts.PIE,[{name:p.name??"",labels:p.data.map(h=>h.name),values:p.data.map(d)}],{...c,showPercent:!0,showLegend:!0,holeSize:u?55:void 0}),!0}if([...o].every(p=>p==="bar"||p==="line")){let p=i.yAxis?.[0]?.type==="category",u=(p?i.yAxis:i.xAxis)?.[0]?.data??[],h=m=>[{name:m.name??"",labels:u.map(String),values:m.data.map(d)}],f=m=>m.type==="bar"?t.charts.BAR:m.areaStyle?t.charts.AREA:t.charts.LINE,k={catAxisLabelFontSize:11,valAxisLabelFontSize:11,valGridLine:{color:"D9D9D9",size:.5},catAxisOrientation:r.rtl&&!p?"maxMin":"minMax",valAxisLabelFormatCode:"#,##0"};if(o.size===1){let m=a.flatMap(h);e.addChart(f(a[0]),m,{...c,...k,barDir:p?"bar":"col",barGrouping:a.some(w=>w.stack)?"stacked":"clustered",lineDataSymbol:"circle",lineSize:2})}else e.addChart(a.map(m=>({type:f(m),data:h(m),options:{barDir:p?"bar":"col",chartColors:[l[a.indexOf(m)%l.length]]}})),{...c,...k});return!0}if(o.size===1&&o.has("scatter")){let p=a[0].data.map(u=>Array.isArray(u)?u:[u.value?.[0],u.value?.[1]]);return e.addChart(t.charts.SCATTER,[{name:"X",values:p.map(u=>u[0])},{name:a[0].name??"Y",values:p.map(u=>u[1])}],{...c,lineSize:0,lineDataSymbolSize:8}),!0}if(o.size===1&&o.has("radar")){let p=i.radar?.[0]?.indicator??[];return e.addChart(t.charts.RADAR,a[0].data.map(u=>({name:u.name??"",labels:p.map(h=>h.name),values:u.value})),{...c,showLegend:!0,radarStyle:"standard"}),!0}return!1}function Fr(t,e){let n=s=>`<p:transition spd="med"><p:push dir="${s}"/></p:transition>`;return t==="view-transition"||t==="morph"?'<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice xmlns:p159="http://schemas.microsoft.com/office/powerpoint/2015/09/main" Requires="p159"><p:transition spd="slow"><p159:morph option="byObject"/></p:transition></mc:Choice><mc:Fallback><p:transition spd="slow"><p:fade/></p:transition></mc:Fallback></mc:AlternateContent>':t==="slide-left"?n(e?"r":"l"):t==="slide-right"?n(e?"l":"r"):t==="slide-up"?n("u"):t==="slide-down"?n("d"):'<p:transition spd="med"><p:fade/></p:transition>'}async function ht(t,e,n,s=!1){try{let r=new Image;r.crossOrigin="anonymous",r.src=t,await r.decode();let i=document.createElement("canvas");i.width=Math.max(1,Math.round(e)),i.height=Math.max(1,Math.round(n));let a=i.getContext("2d"),o=r.naturalWidth||e,l=r.naturalHeight||n,d=s?Math.max(i.width/o,i.height/l):Math.min(i.width/o,i.height/l);return a.drawImage(r,(i.width-o*d)/2,(i.height-l*d)/2,o*d,l*d),i.toDataURL("image/png")}catch{return null}}var ln=`/* deck: a slide is a 16:9 box, a size container, whose canvas sizes its type and space with the
104
+ `}var sn=13.333,Nr=7.5,an="h1, h2, h3, h4, h5, h6, .deck-h, p:not(.deck-picture), ul, ol, blockquote";function V(t){let e=/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/.exec(t);return e?[e[1],e[2],e[3]].map(n=>Math.round(Number(n)).toString(16).padStart(2,"0")).join("").toUpperCase():t.replace("#","").toUpperCase().slice(0,6)||"000000"}async function ft(t,{PptxGenJS:e,JSZip:n}){let s=new e;s.layout="LAYOUT_WIDE",s.title=t.deck.slides[0]?.title??"",s.rtlMode=t.dir==="rtl";let r=getComputedStyle(t.root),i=f=>f.split(",").map(k=>k.trim().replace(/^["']|["']$/g,"")).find(k=>!/^(ui-|system-ui|-apple|sans-serif|serif|monospace)/.test(k))??"Arial";s.theme={headFontFace:i(r.getPropertyValue("--deck-heading")),bodyFontFace:i(r.getPropertyValue("--deck-body"))};let a={slides:0,charts:0,pictures:0,tables:0,placeholders:0},l=t.dir==="rtl",o=t.slides(),d=new Map,c=[];for(let[f,k]of o.entries()){let m=k.getBoundingClientRect(),w=sn/m.width,y=A=>{let z=A.getBoundingClientRect();return{x:(z.left-m.left)*w,y:(z.top-m.top)*w,w:z.width*w,h:z.height*w}},_=A=>{let z=A.closest(".deck-slot")??A,{x:F,w:v}=y(z),{y:O,h:I}=y(A),H=getComputedStyle(z),pe=parseFloat(H.paddingInlineStart)*w,ue=parseFloat(H.paddingInlineEnd)*w;return{x:F+(l?ue:pe),y:O,w:v-pe-ue,h:I*1.08}},U=A=>getComputedStyle(A).justifyContent==="center"?"middle":"top",q=A=>Math.round(A*w*72*10)/10,E=getComputedStyle(k),C=k.dataset.layout??"default",Z=[...k.querySelectorAll(".deck-slot")],X=Z[0]?.firstElementChild,D=X&&X.matches("h1, h2, h3, .deck-h")?X:null,K=t.kit.layouts[C],Y=`${K?At(K,C,t.lang):C}${k.classList.contains("deck-class-invert")?" (dark)":""}`;if(!d.has(Y)){let A=[];D&&A.push({placeholder:{options:{name:"title",type:"title",..._(D),valign:"bottom",margin:0,fontFace:s.theme.headFontFace,color:V(getComputedStyle(D).color),align:l?"right":"left"},text:""}});for(let z of Z){let F=y(z),v=D&&z===Z[0]?y(D).y+y(D).h:F.y,O=z.firstElementChild&&z.firstElementChild!==D?_(z.firstElementChild):{x:F.x,w:F.w};A.push({placeholder:{options:{name:`body-${z.dataset.slot}`,type:"body",x:O.x,y:v+.08,w:O.w,h:Math.max(.3,F.y+F.h-v-.08),margin:0,valign:U(z),color:V(getComputedStyle(z).color)},text:""}})}s.defineSlideMaster({title:Y,background:{color:V(E.backgroundColor)},objects:A,slideNumber:K?.numbered!==!1?{x:l?.3:sn-.9,y:Nr-.55,w:.6,h:.3,fontSize:10,color:V(r.getPropertyValue("--deck-muted").trim()||"#666666")}:void 0}),d.set(Y,new Set(A.map(z=>z.placeholder.options.name)))}let $e=d.get(Y),B=s.addSlide({masterName:Y});a.slides++;let re=k.querySelector(".deck-image");if(re){let A=/url\("?(.*?)"?\)/.exec(getComputedStyle(re).backgroundImage)?.[1],z=A&&await ht(A,re.clientWidth*2,re.clientHeight*2,!0);z&&(B.addImage({data:z,...y(re)}),a.pictures++)}D&&$e.has("title")&&(B.addText(ut(D,{pt:q,rtl:l,lang:t.lang}),{placeholder:"title"}),a.placeholders++);for(let A of Z){let z=[...A.children].filter(v=>v!==D);if(z.length>0&&z.every(v=>v.matches(an))&&$e.has(`body-${A.dataset.slot}`)){B.addText(z.flatMap(v=>ut(v,{pt:q,rtl:l,lang:t.lang})),{placeholder:`body-${A.dataset.slot}`,valign:U(A),...ln(A)}),a.placeholders++;continue}for(let v of z){let O=y(v);if(v.matches(an))B.addText(ut(v,{pt:q,rtl:l,lang:t.lang}),{..._(v),valign:"top",margin:0,...ln(A)});else if(v.matches("pre"))B.addText(v.textContent?.replace(/\n$/,"")??"",{...O,fontFace:"Consolas",fontSize:q(parseFloat(getComputedStyle(v).fontSize)),color:V(getComputedStyle(v).color),fill:{color:V(getComputedStyle(v).backgroundColor)},valign:"top",margin:6,rtlMode:!1,align:"left"});else if(v.matches(".deck-table"))Dr(B,v,O,{pt:q,rtl:l,lang:t.lang}),a.tables++;else if(v.matches(".deck-echarts")&&v.chart){let I=v.chart;Br(s,B,I,O,{pt:q,rtl:l,lang:t.lang,ink:V(E.color)})?a.charts++:(B.addImage({data:await ht(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(I.renderToSVGString())}`,O.w/w*2,O.h/w*2),...O}),a.pictures++)}else{let I=v.querySelector("img");if(I){I.complete||(I.loading="eager",await I.decode().catch(()=>{}));let H=await ht(I.src,I.clientWidth*2,I.clientHeight*2);H&&(B.addImage({data:H,...y(I),altText:I.alt}),a.pictures++)}}}}let te=t.deck.slides[f]?.notes;te&&B.addNotes(te);let me=t.deck.slides[f]?.settings??{};c.push(String(me.transition??t.deck.settings.transition??"none").split("|")[0].trim())}let p=await n.loadAsync(await s.write({outputType:"arraybuffer",compression:!0}));for(let[f,k]of c.entries()){let m=`ppt/slides/slide${f+1}.xml`,w=await p.file(m)?.async("string");!w||k==="none"||p.file(m,w.replace(/<\/p:clrMapOvr>|(?=<p:timing|<\/p:sld>)/,y=>`${y}${Fr(k,l)}`))}let u=await p.file("ppt/theme/theme1.xml")?.async("string");if(u){let f=w=>V(r.getPropertyValue(`--deck-${w}`).trim()),k=[f("fill"),...[2,3,4,5,6].map(w=>f(`series-${w}`))],m=`<a:clrScheme name="Deck"><a:dk1><a:srgbClr val="${f("ink")}"/></a:dk1><a:lt1><a:srgbClr val="${f("paper")}"/></a:lt1><a:dk2><a:srgbClr val="${f("ink")}"/></a:dk2><a:lt2><a:srgbClr val="${f("soft")}"/></a:lt2>${k.map((w,y)=>`<a:accent${y+1}><a:srgbClr val="${w}"/></a:accent${y+1}>`).join("")}<a:hlink><a:srgbClr val="${f("primary")}"/></a:hlink><a:folHlink><a:srgbClr val="${f("primary")}"/></a:folHlink></a:clrScheme>`;p.file("ppt/theme/theme1.xml",u.replace(/<a:clrScheme[\s\S]*?<\/a:clrScheme>/,m))}return{blob:await p.generateAsync({type:"blob",compression:"DEFLATE",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}),report:a}}function ln(t){let e=t.firstElementChild,n=e?parseFloat(getComputedStyle(e).marginBlockEnd):0;return{paraSpaceAfter:Math.round(n*.5)}}function ut(t,e){let n=[],s=(i,a)=>{let l=getComputedStyle(i),o={fontSize:e.pt(parseFloat(l.fontSize)),color:V(l.color),bold:Number(l.fontWeight)>=600,lang:e.lang,rtlMode:e.rtl,align:l.textAlign==="center"?"center":e.rtl?"right":"left",...a},d=qr(i,o);d.length&&(d[d.length-1].options.breakLine=!0,n.push(...d))},r=(i,a)=>{let l=0;for(let o of i.children){l++;let d=[...o.children].filter(p=>p.matches("ul, ol")),c=o.cloneNode(!0);for(let p of[...c.children])p.matches("ul, ol, input")&&p.remove();o.after(c),s(c,{bullet:i.tagName==="OL"?{type:"number",startAt:l===1?Number(i.getAttribute("start")??1):void 0}:!0,indentLevel:a}),c.remove();for(let p of d)r(p,a+1)}};if(t.matches("ul, ol"))r(t,0);else if(t.matches("blockquote"))for(let i of t.children)s(i,{italic:getComputedStyle(i).fontStyle==="italic"});else s(t,{});return n}function qr(t,e){let n=[],s=(r,i)=>{if(r.nodeType===Node.TEXT_NODE){let l=(r.textContent??"").replace(/\s+/g," ");l&&n.push({text:l,options:{...i}});return}if(!(r instanceof HTMLElement))return;if(r.tagName==="BR"){n.length&&(n[n.length-1].options.breakLine=!0);return}let a={...i};r.matches("strong, b")&&(a.bold=!0,a.color=V(getComputedStyle(r).color)),r.matches("em, i")&&(a.italic=!0),r.matches("del, s")&&(a.strike="sngStrike"),r.matches("code")&&(a.fontFace="Consolas"),r.matches("a[href]")&&(a.hyperlink={url:r.getAttribute("href")});for(let l of r.childNodes)s(l,a)};for(let r of t.childNodes)s(r,e);return n.length&&(n[0].text=n[0].text.trimStart(),n[n.length-1].text=n[n.length-1].text.trimEnd()),n.filter(r=>r.text)}function Dr(t,e,n,s){let r=[...e.querySelectorAll("tr")].map(l=>[...l.children].map(o=>{let d=getComputedStyle(o),c=o.getAttribute("data-align");return{text:o.textContent?.trim()??"",options:{bold:o.tagName==="TH",fontSize:s.pt(parseFloat(d.fontSize)),color:V(d.color),lang:s.lang,rtlMode:s.rtl,align:c==="center"?"center":c==="right"!==s.rtl?"right":"left",border:[{type:"none"},{type:"none"},{type:"solid",pt:o.tagName==="TH"?1.5:.75,color:V(d.borderBlockEndColor)},{type:"none"}]}}})),i=[...e.querySelector("tr")?.children??[]].map(l=>l.getBoundingClientRect().width),a=i.reduce((l,o)=>l+o,0)||1;t.addTable(s.rtl?r.map(l=>l.reverse()):r,{...n,colW:(s.rtl?i.reverse():i).map(l=>l/a*n.w),margin:.06})}function Br(t,e,n,s,r){let i=n.getOption(),a=i.series??[];if(!a.length)return!1;let l=new Set(a.map(p=>p.type)),o=(i.color??[]).map(V),d=p=>Array.isArray(p)?Number(p.at(-1)):Number(typeof p=="object"&&p!==null?p.value:p),c={...s,showLegend:a.length>1||l.has("pie"),legendPos:"b",legendFontSize:12,legendColor:r.ink,chartColors:o,showTitle:!!i.title?.[0]?.text,title:i.title?.[0]?.text,titleFontSize:16,titleColor:r.ink,catAxisLabelColor:r.ink,valAxisLabelColor:r.ink,dataLabelColor:r.ink,lang:r.lang};if(l.size===1&&l.has("pie")){let p=a[0],u=Array.isArray(p.radius)&&parseFloat(p.radius[0])>0;return e.addChart(u?t.charts.DOUGHNUT:t.charts.PIE,[{name:p.name??"",labels:p.data.map(h=>h.name),values:p.data.map(d)}],{...c,showPercent:!0,showLegend:!0,holeSize:u?55:void 0}),!0}if([...l].every(p=>p==="bar"||p==="line")){let p=i.yAxis?.[0]?.type==="category",u=(p?i.yAxis:i.xAxis)?.[0]?.data??[],h=m=>[{name:m.name??"",labels:u.map(String),values:m.data.map(d)}],f=m=>m.type==="bar"?t.charts.BAR:m.areaStyle?t.charts.AREA:t.charts.LINE,k={catAxisLabelFontSize:11,valAxisLabelFontSize:11,valGridLine:{color:"D9D9D9",size:.5},catAxisOrientation:r.rtl&&!p?"maxMin":"minMax",valAxisLabelFormatCode:"#,##0"};if(l.size===1){let m=a.flatMap(h);e.addChart(f(a[0]),m,{...c,...k,barDir:p?"bar":"col",barGrouping:a.some(w=>w.stack)?"stacked":"clustered",lineDataSymbol:"circle",lineSize:2})}else e.addChart(a.map(m=>({type:f(m),data:h(m),options:{barDir:p?"bar":"col",chartColors:[o[a.indexOf(m)%o.length]]}})),{...c,...k});return!0}if(l.size===1&&l.has("scatter")){let p=a[0].data.map(u=>Array.isArray(u)?u:[u.value?.[0],u.value?.[1]]);return e.addChart(t.charts.SCATTER,[{name:"X",values:p.map(u=>u[0])},{name:a[0].name??"Y",values:p.map(u=>u[1])}],{...c,lineSize:0,lineDataSymbolSize:8}),!0}if(l.size===1&&l.has("radar")){let p=i.radar?.[0]?.indicator??[];return e.addChart(t.charts.RADAR,a[0].data.map(u=>({name:u.name??"",labels:p.map(h=>h.name),values:u.value})),{...c,showLegend:!0,radarStyle:"standard"}),!0}return!1}function Fr(t,e){let n=s=>`<p:transition spd="med"><p:push dir="${s}"/></p:transition>`;return t==="view-transition"||t==="morph"?'<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice xmlns:p159="http://schemas.microsoft.com/office/powerpoint/2015/09/main" Requires="p159"><p:transition spd="slow"><p159:morph option="byObject"/></p:transition></mc:Choice><mc:Fallback><p:transition spd="slow"><p:fade/></p:transition></mc:Fallback></mc:AlternateContent>':t==="slide-left"?n(e?"r":"l"):t==="slide-right"?n(e?"l":"r"):t==="slide-up"?n("u"):t==="slide-down"?n("d"):'<p:transition spd="med"><p:fade/></p:transition>'}async function ht(t,e,n,s=!1){try{let r=new Image;r.crossOrigin="anonymous",r.src=t,await r.decode();let i=document.createElement("canvas");i.width=Math.max(1,Math.round(e)),i.height=Math.max(1,Math.round(n));let a=i.getContext("2d"),l=r.naturalWidth||e,o=r.naturalHeight||n,d=s?Math.max(i.width/l,i.height/o):Math.min(i.width/l,i.height/o);return a.drawImage(r,(i.width-l*d)/2,(i.height-o*d)/2,l*d,o*d),i.toDataURL("image/png")}catch{return null}}var on=`/* deck: a slide is a 16:9 box, a size container, whose canvas sizes its type and space with the
105
105
  slide's width (cqi), so it wraps the same at any size; its colours and faces are the look's tokens as custom properties; logical properties
106
106
  only, so a deck in Arabic mirrors. The others are laid out behind the one shown, unseen. */
107
107
  .deck { --deck-paper: #fffdf8; --deck-ink: #1d1b16; --deck-muted: #6b675e; --deck-line: #e4e0d6; --deck-primary: #8a6100; --deck-fill: #f7c531; --deck-on-fill: #1d1b16; --deck-soft: #fdf1c9;
@@ -136,7 +136,7 @@ ${l}
136
136
  .deck-slide pre.has-marks .deck-line:not(.is-marked) { opacity: 0.45; }
137
137
  .deck-slide blockquote { border-inline-start: 0.25em solid var(--deck-fill); padding-inline-start: 0.9em; margin-inline: 0; font-style: italic; }
138
138
  .deck-slide img { max-inline-size: 100%; max-block-size: 100%; object-fit: contain; }
139
- .deck-slide .deck-picture { flex: 1; min-block-size: 0; display: grid; place-items: center; }
139
+ .deck-slide .deck-picture { flex: 1; min-block-size: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
140
140
  .deck-slide .deck-picture img { block-size: 100%; }
141
141
  .deck-table { overflow: hidden; }
142
142
  .deck-slide table { border-collapse: collapse; inline-size: 100%; font-size: 0.85em; }
@@ -270,6 +270,6 @@ body > .deck { min-block-size: 100vh; padding: clamp(0.5rem, 3vw, 2rem); align-c
270
270
  body > .deck > .deck-stage, body > .deck > .deck-bar { inline-size: min(100%, (100vh - 7rem) * 16 / 9); }
271
271
  body > .deck.is-editing { justify-items: stretch; align-content: start; }
272
272
  body > .deck.is-editing > .deck-stage, body > .deck.is-editing > .deck-bar, body > .deck.is-presenting > .deck-stage, body > .deck.is-presenting > .deck-bar, body > .deck.is-overview > .deck-stage { inline-size: auto; }
273
- body > .deck:is(.is-presenting, .is-overview) { justify-items: stretch; align-content: start; }`;function cn(){let t=document.getElementById("deck");if(!t)return;let e=dt(t.textContent??"").replace(/^\n/,"").replace(/\n$/,""),n=new CSSStyleSheet;n.replaceSync(`${ln}
274
- ${Hr}`),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],t.style.display="none";let s=document.createElement("main");document.body.append(s);let r=nn({base:un,root:s}),i=null,a=Yt(s,{source:e,blocks:r,lang:document.documentElement.lang||void 0,async onSave(d){let c=a.deck.settings,p=pt(d,{title:String(c.title??a.deck.slides[0]?.title??document.title),lang:a.lang,dir:a.dir,renderer:_e?.src?{src:_e.src}:{code:_e?.textContent??""},generator:document.querySelector("meta[name=generator]")?.getAttribute("content")??"deck"}),u=decodeURIComponent(location.pathname.split("/").pop()||"slides.deck.html"),h=window.showSaveFilePicker;if(h)try{i??=await h({suggestedName:u,types:[{description:"Deck",accept:{"text/html":[".deck.html",".html"]}}]});let f=await i.createWritable();await f.write(p),await f.close();return}catch(f){if(f.name==="AbortError")return}pn(new Blob([p],{type:"text/html"}),u)},async onExport(d){let{PptxGenJS:c,JSZip:p}=await dn(),{blob:u}=await ft(d,{PptxGenJS:c,JSZip:p});pn(u,`${String(d.deck.settings.title??d.deck.slides[0]?.title??"slides").replace(/[\\/:*?"<>|]+/g," ").trim()||"slides"}.pptx`)}}),o=a.deck.settings.title??a.deck.slides[0]?.title;o&&(document.title=String(o)),s.querySelector(".deck-stage")?.focus({preventScroll:!0}),Object.assign(window,{deckView:a,deckTools:{toPptx:ft,libraries:dn,readDeckFile:rn,writeDeckFile:pt}})}async function dn(){return window.PptxGenJS||await new Promise((t,e)=>{let n=document.createElement("script");n.src=je(un,"pptxgenjs","4.0.1","dist/pptxgen.bundle.js"),n.onload=t,n.onerror=e,document.head.append(n)}),{PptxGenJS:window.PptxGenJS,JSZip:window.JSZip}}function pn(t,e){let n=Object.assign(document.createElement("a"),{href:URL.createObjectURL(t),download:e});document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(n.href),1e4)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",cn):cn();})();
273
+ body > .deck:is(.is-presenting, .is-overview) { justify-items: stretch; align-content: start; }`;function cn(){let t=document.getElementById("deck");if(!t)return;let e=dt(t.textContent??"").replace(/^\n/,"").replace(/\n$/,""),n=new CSSStyleSheet;n.replaceSync(`${on}
274
+ ${Hr}`),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],t.style.display="none";let s=document.createElement("main");document.body.append(s);let r=nn({base:un,root:s}),i=null,a=Yt(s,{source:e,blocks:r,lang:document.documentElement.lang||void 0,async onSave(d){let c=a.deck.settings,p=pt(d,{title:String(c.title??a.deck.slides[0]?.title??document.title),lang:a.lang,dir:a.dir,renderer:_e?.src?{src:_e.src}:{code:_e?.textContent??""},generator:document.querySelector("meta[name=generator]")?.getAttribute("content")??"deck"}),u=decodeURIComponent(location.pathname.split("/").pop()||"slides.deck.html"),h=window.showSaveFilePicker;if(h)try{i??=await h({suggestedName:u,types:[{description:"Deck",accept:{"text/html":[".deck.html",".html"]}}]});let f=await i.createWritable();await f.write(p),await f.close();return}catch(f){if(f.name==="AbortError")return}pn(new Blob([p],{type:"text/html"}),u)},async onExport(d){let{PptxGenJS:c,JSZip:p}=await dn(),{blob:u}=await ft(d,{PptxGenJS:c,JSZip:p});pn(u,`${String(d.deck.settings.title??d.deck.slides[0]?.title??"slides").replace(/[\\/:*?"<>|]+/g," ").trim()||"slides"}.pptx`)}}),l=a.deck.settings.title??a.deck.slides[0]?.title;l&&(document.title=String(l)),s.querySelector(".deck-stage")?.focus({preventScroll:!0}),Object.assign(window,{deckView:a,deckTools:{toPptx:ft,libraries:dn,readDeckFile:rn,writeDeckFile:pt}})}async function dn(){return window.PptxGenJS||await new Promise((t,e)=>{let n=document.createElement("script");n.src=je(un,"pptxgenjs","4.0.1","dist/pptxgen.bundle.js"),n.onload=t,n.onerror=e,document.head.append(n)}),{PptxGenJS:window.PptxGenJS,JSZip:window.JSZip}}function pn(t,e){let n=Object.assign(document.createElement("a"),{href:URL.createObjectURL(t),download:e});document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(n.href),1e4)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",cn):cn();})();
275
275
  //# sourceMappingURL=deck.js.map