@aaa_iii/fzv 0.1.0 → 0.2.0
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/README.ja.md +162 -0
- package/README.md +115 -72
- package/dist/client/assets/{c-BOwhf9XG.js → c-BrjaNpVh.js} +1 -1
- package/dist/client/assets/{cpp-DpzZLjVG.js → cpp-BIxKXcra.js} +1 -1
- package/dist/client/assets/{highlight-8tepxCyl.js → highlight-hBTJsM0d.js} +3 -3
- package/dist/client/assets/index-DmtUQAD5.js +69 -0
- package/dist/client/assets/{java-CLOHQwSj.js → java-D_0z2NwT.js} +1 -1
- package/dist/client/assets/{jsx-6cZ_qQIQ.js → jsx-Dyxbavxn.js} +1 -1
- package/dist/client/assets/{latex-BdQ50_4Z.js → latex-D_hv-EHy.js} +1 -1
- package/dist/client/assets/{lua-COOzpq9a.js → lua-BkwxsP7-.js} +1 -1
- package/dist/client/assets/{pdf-BKh0TLgl.js → pdf-CIufTche.js} +2 -2
- package/dist/client/assets/{r-CcRq0cGl.js → r-B-o4EwkG.js} +1 -1
- package/dist/client/assets/{ruby-DMlj-gdq.js → ruby-C11HOYlt.js} +1 -1
- package/dist/client/assets/{tsx-CoAl8Bip.js → tsx-BIbTecDf.js} +1 -1
- package/dist/client/assets/{typescript-CEZCLEMH.js → typescript-BMg-mt7U.js} +1 -1
- package/dist/client/assets/{xml-CLG99EYI.js → xml-BQ9PLRGp.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/catalog.js +6 -0
- package/dist/server/cli.js +35 -10
- package/dist/server/network.js +4 -0
- package/dist/server/office.js +244 -0
- package/dist/server/server.js +53 -4
- package/dist/shared.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-BdokDwpe.js +0 -69
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/pdf-CIufTche.js","assets/pdf-C_UMrClT.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=class{indexed;a;b;constructor(e){let t=0,n=e=>/[\p{L}\p{N}]/u.test(e),r=e=>e&&e.toLocaleLowerCase()===e&&e.toLocaleUpperCase()!==e,i=e=>e&&e.toLocaleUpperCase()===e&&e.toLocaleLowerCase()!==e;this.indexed=e.map(e=>{let a=Array.from(e.path),o=a.map(e=>e.toLocaleLowerCase()),s=new Int8Array(a.length);for(let e=0;e<a.length;e++){let t=a[e],o=a[e-1]??``;e===0||o===`/`||o===`\\`||([`_`,`-`,`.`].includes(o)||!n(o))&&n(t)?s[e]=8:(r(o)&&i(t)||/\d/.test(t)&&!/\d/.test(o))&&(s[e]=7)}return t=Math.max(t,a.length),{file:e,chars:a,lower:o,bonuses:s}}),this.a=new Int32Array(t),this.b=new Int32Array(t)}termScore(e,t){let{chars:n,lower:r,bonuses:i}=t,a=n.length;if(e.chars.length>a)return-1;let o=(t,i)=>e.smartCase?e.chars[t]===n[i]:e.lower[t]===r[i],s=0;for(let t=0;t<e.chars.length;t++){let e=!1;for(;s<a;)if(o(t,s++)){e=!0;break}if(!e)return-1}let c=-1073741823,l=this.a,u=this.b;l.fill(c,0,a);for(let e=0;e<a;e++)o(0,e)&&(l[e]=16+2*i[e]);for(let t=1;t<e.chars.length;t++){u.fill(c,0,a);let e=c;for(let n=0;n<a;n++){if(n>=2&&l[n-2]>c&&(e=Math.max(e,l[n-2]+n-2)),!o(t,n))continue;let r=n>0&&l[n-1]>c?l[n-1]+16+i[n]+4:c,a=e>c?e+16+i[n]-3-(n-2):c;u[n]=Math.max(r,a)}[l,u]=[u,l]}let d=c;for(let e=0;e<a;e++)d=Math.max(d,l[e]);return d}search(e,t=250){let n=e.trim(),r=n.endsWith(`/`)?n.slice(0,-1):``;if(!n||this.indexed.some(e=>e.file.kind===`directory`&&e.file.path===r)){let e=r?`${r}/`:``,n=this.indexed.map(e=>e.file).filter(t=>t.path.startsWith(e)&&!t.path.slice(e.length).includes(`/`)).sort((e,t)=>Number(t.kind===`directory`)-Number(e.kind===`directory`)||e.path.localeCompare(t.path));return{files:n.slice(0,t),total:n.length}}let i=e.trim().split(/\s+/).filter(Boolean).map(e=>{let t=Array.from(e);return{chars:t,lower:t.map(e=>e.toLocaleLowerCase()),smartCase:/[A-Z]/.test(e)}}),a=[];for(let e of this.indexed){let t=0;for(let n of i){let r=this.termScore(n,e);if(r<0){t=-1;break}t+=r}t>=0&&a.push({file:e.file,score:t})}return a.sort((e,t)=>t.score-e.score||e.file.path.length-t.file.path.length||e.file.path.localeCompare(t.file.path)),{files:a.slice(0,t).map(e=>e.file),total:a.length}}};function t(e,t=1){return`fzv:project:${e}:v${t}`}function n(e){if(!e||typeof e!=`object`)return null;let t=e;if(t.version!==2||!Array.isArray(t.groups)||!t.groups.length||t.groups.length>32)return null;let n=[],r=new Set;for(let e of t.groups){if(!e||typeof e.id!=`string`||r.has(e.id)||!Array.isArray(e.tabs))return null;r.add(e.id);let t=new Set,i=[];for(let n of e.tabs)n&&typeof n.path==`string`&&!t.has(n.path)&&(t.add(n.path),i.push({path:n.path,mode:n.mode===`source`?`source`:`viewer`}));n.push({id:e.id,tabs:i,active:typeof e.active==`string`&&t.has(e.active)?e.active:i[0]?.path??null})}let i=new Set,a=new Set,o=(e,t=0)=>{if(!e||typeof e!=`object`||t>32)return null;let n=e;if(typeof n.id!=`string`)return null;if(n.type===`group`)return!r.has(n.id)||i.has(n.id)?null:(i.add(n.id),{type:`group`,id:n.id});if(n.type!==`split`||a.has(n.id)||![`x`,`y`].includes(n.axis)||!Number.isFinite(n.ratio)||n.ratio<=0||n.ratio>=1||!Array.isArray(n.children)||n.children.length!==2)return null;a.add(n.id);let s=o(n.children[0],t+1),c=o(n.children[1],t+1);return s&&c?{type:`split`,id:n.id,axis:n.axis,ratio:n.ratio,children:[s,c]}:null},s=o(t.layout);return!s||i.size!==r.size?null:{version:2,layout:s,groups:n,activeGroup:typeof t.activeGroup==`string`&&r.has(t.activeGroup)?t.activeGroup:n[0].id}}function r(e,r){try{let i=n(JSON.parse(e.getItem(t(r,2))??`null`));if(i)return i;let a=JSON.parse(e.getItem(t(r))??`null`);return!a||typeof a!=`object`||!(`version`in a)||a.version!==1||!(`tabs`in a)||!Array.isArray(a.tabs)?null:{version:1,tabs:[...new Set(a.tabs.filter(e=>typeof e==`string`))],active:`active`in a&&typeof a.active==`string`?a.active:null}}catch{return null}}function i(e,n,r){try{e.setItem(t(n,r.version),JSON.stringify(r))}catch{}}function a(e){let t=document.createElement(`i`);return t.className=`codicon codicon-${e}`,t.setAttribute(`aria-hidden`,`true`),t}function o(e){return a(e.kind===`directory`?`folder`:e.kind===`pdf`?`file-pdf`:e.kind===`image`?`file-media`:e.kind===`html`?`file-code`:e.kind===`office`?/\.xlsx$/i.test(e.name)?`table`:/\.pptx$/i.test(e.name)?`preview`:`file-text`:/\.md$/i.test(e.name)?`markdown`:/\.(?:[cm]?js|jsx|ts|tsx|py|rs|go|c|cc|cpp|h|hpp|cs|java|rb|lua|sh|json|ya?ml|toml|css|scss|xml|sql|tex|sty|bib|bst)$/i.test(e.name)||[`Makefile`,`Dockerfile`].includes(e.name)?`file-code`:`file`)}function s(e,t,n,r,i){if(e.type===`split`)return{...e,children:e.children.map(e=>s(e,t,n,r,i))};if(e.id!==t)return e;let a={type:`group`,id:n};return{type:`split`,id:i,axis:r===`left`||r===`right`?`x`:`y`,ratio:.5,children:r===`left`||r===`up`?[a,e]:[e,a]}}function c(e,t){if(e.type===`group`)return e.id===t?null:e;let n=c(e.children[0],t),r=c(e.children[1],t);return n?r?{...e,children:[n,r]}:n:r}function l(e){return e.type===`group`?[e.id]:e.children.flatMap(l)}function u(e,t){if(e.type===`group`)return t===`x`?220:140;let n=e.children.map(e=>u(e,t));return e.axis===t?n[0]+n[1]+4:Math.max(...n)}function d(e,t){let n=Math.max(0,t-4),r=u(e.children[0],e.axis),i=u(e.children[1],e.axis);if(n<=r+i){let e=r/(r+i);return[e,e]}return[r/n,1-i/n]}function f(e,t){let n=new Map,r=new Map,i=(e,t)=>{if(e.type===`group`){n.set(e.id,t);return}let a=e.axis===`x`,o=a?t.width:t.height,s=Math.min(4,o),[c,l]=d(e,o),u=Math.max(c,Math.min(l,e.ratio)),f=Math.max(0,o-s)*u,p=Math.max(0,o-s-f),m={...t,[a?`width`:`height`]:f},h=a?{...t,x:t.x+f+s,width:p}:{...t,y:t.y+f+s,height:p},g=a?{...t,x:t.x+f,width:s}:{...t,y:t.y+f,height:s};r.set(e.id,{node:e,rect:t,sash:g}),i(e.children[0],m),i(e.children[1],h)};return i(e,t),{groups:n,splits:r}}function p(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var m=p();function h(e){m=e}var g={exec:()=>null};function _(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function v(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(y.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ee=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),y={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:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:_(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:_(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:_(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:_(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:_(e=>RegExp(`^ {0,${e}}(?:</?(?:${de})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,`i`)),blockquoteBeginRegex:_(e=>RegExp(`^ {0,${e}}>`))},b=/^(?:[ \t]*(?:\n|$))+/,te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,S=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ne=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,re=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,C=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ie=v(C).replace(/bull/g,re).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(),ae=v(C).replace(/bull/g,re).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(),oe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,se=/^[^\n]+/,ce=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,le=v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,ce).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ue=v(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,re).getRegex(),de=`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`,fe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pe=v(`^ {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`,fe).replace(`tag`,de).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),me=e=>v(oe).replace(`hr`,S).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`,e).replace(`html`,` {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,de).getRegex(),he=me(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),ge=me(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),_e={blockquote:v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,ge).getRegex(),code:te,def:le,fences:x,heading:ne,hr:S,html:pe,lheading:ie,list:ue,newline:b,paragraph:he,table:g,text:se},w=v(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,S).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`,de).getRegex(),ve={..._e,lheading:ae,table:w,paragraph:v(oe).replace(`hr`,S).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,w).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`,de).getRegex()},ye={..._e,html:v(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,fe).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:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:v(oe).replace(`hr`,S).replace(`heading`,` *#{1,6} *[^
|
|
3
|
+
]`).replace(`lheading`,ie).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},be=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Se=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Ce=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,we=/[\s\p{P}\p{S}]/u,Te=/[^\s\p{P}\p{S}]/u,E=v(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,we).getRegex(),Ee=/[\p{Pi}\p{Ps}"']/u,D=/(?!~)[\p{P}\p{S}]/u,De=/(?!~)[\s\p{P}\p{S}]/u,O=/(?:[^\s\p{P}\p{S}]|~)/u,Oe=v(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ee?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),ke=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ae=v(ke,`u`).replace(/punct/g,T).getRegex(),je=v(ke,`u`).replace(/punct/g,D).getRegex(),Me=v(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Ee).replace(/punct/g,T).getRegex(),Ne=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Pe=v(Ne,`gu`).replace(/notPunctSpace/g,Te).replace(/punctSpace/g,we).replace(/punct/g,T).getRegex(),k=v(Ne,`gu`).replace(/notPunctSpace/g,O).replace(/punctSpace/g,De).replace(/punct/g,D).getRegex(),Fe=v(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Te).replace(/punctSpace/g,we).replace(/punct/g,T).getRegex(),Ie=v(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Te).replace(/punctSpace/g,we).replace(/punct/g,T).getRegex(),Le=v(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Te).replace(/punctSpace/g,we).replace(/punct/g,T).getRegex(),Re=v(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,T).getRegex(),ze=v(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Te).replace(/punctSpace/g,we).replace(/punct/g,T).getRegex(),Be=v(/\\(punct)/,`gu`).replace(/punct/g,T).getRegex(),Ve=v(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,`gu`).replace(/punct/g,T).getRegex(),He=v(/^<(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(),Ue=v(fe).replace(`(?:-->|$)`,`-->`).getRegex(),We=v(`^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`,Ue).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ge=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Ke=v(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Ge).getRegex(),qe=v(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,Ke).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Je=v(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Ke).replace(`ref`,ce).getRegex(),Ye=v(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,ce).getRegex(),Xe=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Ze=v(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Ge).getRegex(),Qe=v(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,v(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Ze).replace(`ref`,Xe).getRegex()).replace(`nolink`,v(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Xe).getRegex()).getRegex(),$e=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,et=v(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),tt={_backpedal:g,anyPunctuation:Be,anyPunctuationOutsideCode:Ve,autolink:He,blockSkip:Oe,br:Se,code:xe,del:g,delLDelim:g,delRDelim:g,emStrongLDelim:Ae,emStrongRDelimAst:Pe,emStrongRDelimUnd:Ie,escape:be,link:qe,nolink:Ye,punctuation:E,reflink:Je,reflinkSearch:Qe,tag:We,text:Ce,url:g},nt={...tt,emStrongLDelim:Me,emStrongRDelimAst:Fe,emStrongRDelimUnd:Le,link:v(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Ke).getRegex(),reflink:v(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Ke).getRegex()},rt={...tt,emStrongRDelimAst:k,emStrongLDelim:je,delLDelim:Re,delRDelim:ze,url:v(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,et).replace(`protocol`,$e).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:v(/^(?:[^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`,$e).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},it={...rt,br:v(Se).replace(`{2,}`,`*`).getRegex(),text:v(rt.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},A={normal:_e,gfm:ve,pedantic:ye},j={normal:tt,gfm:rt,breaks:it,pedantic:nt},at={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},ot=e=>at[e];function M(e,t){if(t){if(y.escapeTest.test(e))return e.replace(y.escapeReplace,ot)}else if(y.escapeTestNoEncode.test(e))return e.replace(y.escapeReplaceNoEncode,ot);return e}function st(e){return y.numericCharacterReference.test(e)?e.replace(y.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return`&`;let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:r===38?`&`:String.fromCodePoint(r)}):e}function ct(e){try{e=encodeURI(e).replace(y.percentDecode,`%`)}catch{return null}return e}function lt(e,t){let n=e.replace(y.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(y.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(y.slashPipe,`|`);return n}function N(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function ut(e){let t=e.split(`
|
|
4
|
+
`),n=t.length-1;for(;n>=0&&y.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
5
|
+
`)}function dt(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function ft(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function P(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function pt(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`,l=r.state.inLink,u=r.state.linkEmitted,d=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let f=r.inlineTokens(s),p=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=l,!c){if(p){r.state.inRawBlock=d;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:f}}function mt(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
6
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
7
|
+
`)}function ht(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var gt=class{options;rules;lexer;constructor(e){this.options=e||m}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:ut(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=mt(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=N(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:N(t[0],`
|
|
8
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:N(t[0],`
|
|
9
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=N(t[0],`
|
|
10
|
+
`).split(`
|
|
11
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
12
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
13
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
14
|
+
${s}`:s,r=r?`${r}
|
|
15
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`||u?.type===`heading`||u?.type===`hr`||u?.type===`html`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
16
|
+
`),o=t.raw+`
|
|
17
|
+
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
18
|
+
`).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
|
|
19
|
+
${d.join(`
|
|
20
|
+
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
21
|
+
`+e.join(`
|
|
22
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
23
|
+
`)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=e,r=()=>n.length-e.length,i=t[1].trim(),a=i.length>1,o={type:`list`,raw:``,ordered:a,start:a?+i.slice(0,-1):``,loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:`[*+-]`);let s=this.rules.other.listItemRegex(i),c=!1;for(;e;){let i=!1,a=``;if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;let l=r();e=e.substring(t[0].length);let u=t[2].split(`
|
|
24
|
+
`,1)[0],d=t[1].length,f=this.options.pedantic?P(u,d):u.replace(this.rules.other.leadingSpaceTab,e=>P(e,d)),p=e.split(`
|
|
25
|
+
`,1)[0],m=!f.trim(),h=0;if(this.options.pedantic?(h=2,a=f.trimStart()):m?h=d+1:(h=f.search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=f.slice(h),h+=d),m&&this.rules.other.blankLine.test(p)&&(e=e.substring(p.length+1),i=!0),!i){let t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),r=this.rules.other.fencesBeginRegex(h),i=this.rules.other.headingBeginRegex(h),o=this.rules.other.htmlBeginRegex(h),s=this.rules.other.blockquoteBeginRegex(h);for(;e;){let c=e.split(`
|
|
26
|
+
`,1)[0],l;if(p=c,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting,` `),l=p):l=p.replace(this.rules.other.leadingSpaceTab,e=>P(e)),r.test(p)||i.test(p)||o.test(p)||s.test(p)||t.test(p)||n.test(p))break;if(l.search(this.rules.other.nonSpaceChar)>=h||!p.trim())a+=`
|
|
27
|
+
`+l.slice(h);else{if(m||f.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||r.test(f)||i.test(f)||n.test(f))break;a+=`
|
|
28
|
+
`+p}m=!p.trim(),e=e.substring(c.length+1),f=l.slice(h)}}let g=n.slice(l,r());o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(c=!0)),o.items.push({type:`list_item`,raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=n.slice(0,r()).trimEnd();for(let e of o.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!o.loose){let t=e.tokens.filter(e=>e.type===`space`);o.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of o.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,o.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=ut(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&ft(t[2],`()`)!==-1)return;let e=dt(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:N(t[0],`
|
|
29
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=lt(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
30
|
+
`):[],a={type:`table`,raw:N(t[0],`
|
|
31
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(lt(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:N(t[0],`
|
|
32
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
33
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&ht(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=N(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=ft(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),pt(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&ht(e,n[1],r,this.rules))return;let i=t[dt((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return pt(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:st(t[0]),escaped:e}}}},F=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||m,this.options.tokenizer=this.options.tokenizer||new gt,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 t={other:y,block:A.normal,inline:j.normal};this.options.pedantic?(t.block=A.pedantic,t.inline=j.pedantic):this.options.gfm&&(t.block=A.gfm,t.inline=this.options.breaks?j.breaks:j.gfm),this.tokenizer.rules=t}static get rules(){return{block:A,inline:j}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(y.carriageReturn,`
|
|
34
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(y.tabCharGlobal,` `).replace(y.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(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
35
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
36
|
+
`)?``:`
|
|
37
|
+
`)+i.raw,n.text+=`
|
|
38
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if((i=this.tokenizer.fences(e))||(i=this.tokenizer.heading(e))||(i=this.tokenizer.hr(e))||(i=this.tokenizer.blockquote(e))||(i=this.tokenizer.list(e))||(i=this.tokenizer.html(e))){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
39
|
+
`)?``:`
|
|
40
|
+
`)+i.raw,n.text+=`
|
|
41
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if((i=this.tokenizer.table(e))||(i=this.tokenizer.lheading(e))){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
42
|
+
`)?``:`
|
|
43
|
+
`)+i.raw,r.text+=`
|
|
44
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length)}else if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
45
|
+
`)?``:`
|
|
46
|
+
`)+i.raw,n.text+=`
|
|
47
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,dt(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,dt(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(e,t,n)=>n?`+`.repeat(e.length):t?t+e.slice(t.length,-t.length).replace(/`/g,`+`)+t:e),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;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(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if((o=this.tokenizer.emStrong(e,n,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,n,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},_t=class{options;parser;constructor(e){this.options=e||m}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(y.notSpaceStart)?.[0],i=e?e.replace(y.endingNewline,``)+`
|
|
48
|
+
`:``;return r?`<pre><code class="language-`+M(r)+`">`+(n?i:M(i,!0))+`</code></pre>
|
|
49
|
+
`:`<pre><code>`+(n?i:M(i,!0))+`</code></pre>
|
|
50
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
51
|
+
${this.parser.parse(e)}</blockquote>
|
|
52
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
53
|
+
`}hr(e){return`<hr>
|
|
54
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
55
|
+
`+r+`</`+i+`>
|
|
56
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
57
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
58
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
59
|
+
<thead>
|
|
60
|
+
`+t+`</thead>
|
|
61
|
+
`+r+`</table>
|
|
62
|
+
`}tablerow({text:e}){return`<tr>
|
|
63
|
+
${e}</tr>
|
|
64
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
65
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${M(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?M(n,!0):this.parser.parseInline(r),o=ct(e);if(o===null)return a;e=M(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+M(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=ct(e);if(i===null)return M(n);e=i;let a=`<img src="${M(e)}" alt="${M(n)}"`;return t&&(a+=` title="${M(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:M(e.text)}},vt=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},I=class e{options;renderer;textRenderer;constructor(e){this.options=e||m,this.options.renderer=this.options.renderer||new _t,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vt}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},yt=class{options;block;constructor(e){this.options=e||m}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?F.lex:F.lexInline}provideParser(e=this.block){return e?I.parse:I.parseInline}};function bt(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);else e.push(t)}var L=new class{defaults=p();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=I;Renderer=_t;TextRenderer=vt;Lexer=F;Tokenizer=gt;Hooks=yt;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(bt(n,t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)bt(n,this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)bt(n,this.walkTokens(e.tokens,t));break}case`list`:{let e=r;bt(n,this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);bt(n,this.walkTokens(i,t))}):e.tokens&&bt(n,this.walkTokens(e.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new _t(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new gt(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new yt;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=yt.passThroughHooks.has(n)?e=>{if(this.defaults.async&&yt.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&bt(n,t.call(this,e)),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return F.lex(e,t??this.defaults)}parser(e,t){return I.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(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 t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?F.lex:F.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?I.parse:I.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?F.lex:F.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?I.parse:I.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
66
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+M(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function R(e,t){return L.parse(e,t)}R.options=R.setOptions=function(e){return L.setOptions(e),R.defaults=L.defaults,h(R.defaults),R},R.getDefaults=p,R.defaults=m;function xt(...e){return L.use(...e),R.defaults=L.defaults,h(R.defaults),R}R.use=xt,R.walkTokens=function(e,t){return L.walkTokens(e,t)},R.parseInline=L.parseInline,R.Parser=I,R.parser=I.parse,R.Renderer=_t,R.TextRenderer=vt,R.Lexer=F,R.lexer=F.lex,R.Tokenizer=gt,R.Hooks=yt,R.parse=R,R.options,R.setOptions,R.walkTokens,R.parseInline,I.parse,F.lex;function St(e,t){this.v=e,this.k=t}function Ct(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function wt(e){if(Array.isArray(e))return e}function Tt(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Et(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
67
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dt(e,t){return wt(e)||Tt(e,t)||Ot(e,t)||Et()}function Ot(e,t){if(e){if(typeof e==`string`)return Ct(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}function kt(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof St;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}kt.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},kt.prototype.next=function(e){return this._invoke(`next`,e)},kt.prototype.throw=function(e){return this._invoke(`throw`,e)},kt.prototype.return=function(e){return this._invoke(`return`,e)};var At=Object.entries,jt=Object.setPrototypeOf,Mt=Object.isFrozen,Nt=Object.getPrototypeOf,Pt=Object.getOwnPropertyDescriptor,z=Object.freeze,B=Object.seal,Ft=Object.create,It=typeof Reflect<`u`&&Reflect,Lt=It.apply,Rt=It.construct;z||=function(e){return e},B||=function(e){return e},Lt||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Rt||=function(e){return new e(...[...arguments].slice(1))};var zt=W(Array.prototype.forEach);Array.prototype.indexOf;var Bt=W(Array.prototype.lastIndexOf),Vt=W(Array.prototype.pop),Ht=W(Array.prototype.push),Ut=W(Array.prototype.slice),Wt=W(Array.prototype.splice),Gt=Array.isArray,Kt=sn(Set),qt=W(Set.prototype.add),Jt=W(Set.prototype.has),Yt=W(String.prototype.toLowerCase),Xt=W(String.prototype.toString),Zt=W(String.prototype.match),Qt=W(String.prototype.replace),$t=W(String.prototype.indexOf),en=W(String.prototype.trim),tn=W(Number.prototype.toString),nn=W(Boolean.prototype.toString),rn=typeof BigInt>`u`?null:W(BigInt.prototype.toString),V=typeof Symbol>`u`?null:W(Symbol.prototype.toString),H=W(Object.prototype.hasOwnProperty),an=W(Object.prototype.toString),U=W(RegExp.prototype.test),on=sn(TypeError);function W(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Lt(e,t,n)}}function sn(e){return function(){return Rt(e,[...arguments])}}function G(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yt;if(jt&&jt(e,null),!Gt(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Mt(t)||(t[r]=e),i=e)}e[i]=!0}return e}function cn(e){for(let t=0;t<e.length;t++)H(e,t)||(e[t]=null);return e}function K(e){let t=Ft(null);for(let r of At(e)){var n=Dt(r,2);let i=n[0],a=n[1];H(e,i)&&(t[i]=Gt(a)?cn(a):a&&typeof a==`object`&&a.constructor===Object?K(a):a)}return t}function ln(e){switch(typeof e){case`string`:return e;case`number`:return tn(e);case`boolean`:return nn(e);case`bigint`:return rn?rn(e):`0`;case`symbol`:return V?V(e):`Symbol()`;case`undefined`:return an(e);case`function`:case`object`:{if(e===null)return an(e);let t=e,n=q(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:an(e)}return an(e)}default:return an(e)}}function q(e,t){for(;e!==null;){let n=Pt(e,t);if(n){if(n.get)return W(n.get);if(typeof n.value==`function`)return W(n.value)}e=Nt(e)}function n(){return null}return n}function un(e,t){for(;e!==null;){let n=Pt(e,t);if(n)return n.get?W(n.get):null;e=Nt(e)}return null}function dn(e){try{return U(e,``),!0}catch{return!1}}var fn=z(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),pn=z(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),mn=z([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),hn=z([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),gn=z(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),_n=z([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),vn=z([`#text`]),yn=z(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),bn=z(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),xn=z(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Sn=z([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Cn=B(/{{[\w\W]*|^[\w\W]*}}/g),wn=B(/<%[\w\W]*|^[\w\W]*%>/g),Tn=B(/\${[\w\W]*/g),En=B(/^data-[\-\w.\u00B7-\uFFFF]+$/),Dn=B(/^aria-[\-\w]+$/),On=B(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kn=B(/^(?:\w+script|data):/i),An=B(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jn=B(/^html$/i),Mn=B(/^[a-z][.\w]*(-[.\w]+)+$/i),Nn=B(/<[/\w!]/g),Pn=B(/<[/\w]/g),Fn=B(/<\/no(script|embed|frames)/i),In=B(/\/>/i),J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ln=z(G({},[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`])),Rn=function(){return typeof window>`u`?null:window},zn=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Bn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Vn=function(e,t,n,r){return H(e,t)&&Gt(e[t])?G(r.base?K(r.base):{},e[t],r.transform):n},Hn=function(e,t,n){let r=H(e,t)?e[t]:void 0;return r&&typeof r==`object`?K(r):n()};function Un(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rn(),t=e=>Un(e);if(t.version=`3.4.17`,t.removed=[],!e||!e.document||e.document.nodeType!==J.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=q(d,`cloneNode`),p=q(d,`remove`),m=q(d,`removeAttributeNode`),h=q(d,`nextSibling`),g=q(d,`childNodes`),_=q(d,`parentNode`),v=q(d,`shadowRoot`),ee=q(d,`attributes`),y=o&&o.prototype?q(o.prototype,`nodeType`):null,b=o&&o.prototype?q(o.prototype,`nodeName`):null,te=o&&o.prototype?q(o.prototype,`ownerDocument`):null,x=function(e){return y?y(e):e.nodeType},S=function(e){return b?b(e):e.nodeName},ne=un(d,`namespaceURI`),re=function(e){return ne?ne(e):e.namespaceURI};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let C,ie=``,ae,oe=!1,se=0,ce=function(){if(se>0)throw on(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},le=function(e){ce(),se++;try{return C.createHTML(e)}finally{se--}},ue=function(e){ce(),se++;try{return C.createScriptURL(e)}finally{se--}},de=function(){return oe||=(ae=zn(u,i),!0),ae},fe=n,pe=fe.implementation,me=fe.createNodeIterator,he=fe.createDocumentFragment,ge=fe.getElementsByTagName,_e=r.importNode,w=Bn();t.isSupported=typeof At==`function`&&typeof _==`function`&&pe&&pe.createHTMLDocument!==void 0;let ve=Cn,ye=wn,be=Tn,xe=En,Se=Dn,Ce=kn,T=An,we=Mn,Te=On,E=null,Ee=G({},[...fn,...pn,...mn,...gn,...vn]),D=null,De=G({},[...yn,...bn,...xn,...Sn]),O=Object.seal(Ft(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,ke=null,Ae=Object.seal(Ft(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),je=!0,Me=!0,Ne=!1,Pe=!0,k=!1,Fe=!0,Ie=!1,Le=!1,Re=null,ze=null,Be=!1,Ve=!1,He=!1,Ue=!1,We=!0,Ge=!1,Ke=`user-content-`,qe=!0,Je=!1,Ye=null,Xe={},Ze=null,Qe=G({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),$e=null,et=G({},[`audio`,`video`,`img`,`source`,`image`,`track`]),tt=null,nt=G({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),rt=`http://www.w3.org/1998/Math/MathML`,it=`http://www.w3.org/2000/svg`,A=`http://www.w3.org/1999/xhtml`,j=A,at=!1,ot=null,M=G({},[rt,it,A],Xt),st=z([`mi`,`mo`,`mn`,`ms`,`mtext`]),ct=G({},st),lt=z([`annotation-xml`]),N=G({},lt),ut=G({},[`title`,`style`,`font`,`a`,`script`]),dt=null,ft=[`application/xhtml+xml`,`text/html`],P=null,pt=null,mt=n.createElement(`form`),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pt&&pt===e)return;(!e||typeof e!=`object`)&&(e={}),e=K(e),dt=ft.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,P=dt===`application/xhtml+xml`?Xt:Yt,E=Vn(e,`ALLOWED_TAGS`,Ee,{transform:P}),D=Vn(e,`ALLOWED_ATTR`,De,{transform:P}),ot=Vn(e,`ALLOWED_NAMESPACES`,M,{transform:Xt}),tt=Vn(e,`ADD_URI_SAFE_ATTR`,nt,{transform:P,base:nt}),$e=Vn(e,`ADD_DATA_URI_TAGS`,et,{transform:P,base:et}),Ze=Vn(e,`FORBID_CONTENTS`,Qe,{transform:P}),Oe=Vn(e,`FORBID_TAGS`,K({}),{transform:P}),ke=Vn(e,`FORBID_ATTR`,K({}),{transform:P}),Xe=H(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?K(e.USE_PROFILES):e.USE_PROFILES:!1,je=e.ALLOW_ARIA_ATTR!==!1,Me=e.ALLOW_DATA_ATTR!==!1,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=e.SAFE_FOR_TEMPLATES||!1,Fe=e.SAFE_FOR_XML!==!1,Ie=e.WHOLE_DOCUMENT||!1,Ve=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Ue=e.RETURN_TRUSTED_TYPE||!1,Be=e.FORCE_BODY||!1,We=e.SANITIZE_DOM!==!1,Ge=e.SANITIZE_NAMED_PROPS||!1,qe=e.KEEP_CONTENT!==!1,Je=e.IN_PLACE||!1,Te=dn(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:On,j=typeof e.NAMESPACE==`string`?e.NAMESPACE:A,ct=Hn(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>G({},st)),N=Hn(e,`HTML_INTEGRATION_POINTS`,()=>G({},lt));let t=Hn(e,`CUSTOM_ELEMENT_HANDLING`,()=>Ft(null));if(O=Ft(null),H(t,`tagNameCheck`)&&ht(t.tagNameCheck)&&(O.tagNameCheck=t.tagNameCheck),H(t,`attributeNameCheck`)&&ht(t.attributeNameCheck)&&(O.attributeNameCheck=t.attributeNameCheck),H(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(O.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),B(O),k&&(Me=!1),He&&(Ve=!0),Xe&&(E=G({},vn),D=Ft(null),Xe.html===!0&&(G(E,fn),G(D,yn)),Xe.svg===!0&&(G(E,pn),G(D,bn),G(D,Sn)),Xe.svgFilters===!0&&(G(E,mn),G(D,bn),G(D,Sn)),Xe.mathMl===!0&&(G(E,gn),G(D,xn),G(D,Sn))),Ae.tagCheck=null,Ae.attributeCheck=null,H(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Ae.tagCheck=e.ADD_TAGS:Gt(e.ADD_TAGS)&&(E===Ee&&(E=K(E)),G(E,e.ADD_TAGS,P))),H(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Ae.attributeCheck=e.ADD_ATTR:Gt(e.ADD_ATTR)&&(D===De&&(D=K(D)),G(D,e.ADD_ATTR,P))),H(e,`ADD_FORBID_CONTENTS`)&&Gt(e.ADD_FORBID_CONTENTS)&&(Ze===Qe&&(Ze=K(Ze)),G(Ze,e.ADD_FORBID_CONTENTS,P)),qe&&(E[`#text`]=!0),Ie&&G(E,[`html`,`head`,`body`]),E.table&&(G(E,[`tbody`]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw on(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw on(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=C;C=e.TRUSTED_TYPES_POLICY;try{ie=le(``)}catch(e){throw C=t,e}}else e.TRUSTED_TYPES_POLICY===null?(C=void 0,ie=``):(C===void 0&&(C=de()),C&&typeof ie==`string`&&(ie=le(``)));z&&z(e),pt=e},F=G({},[...pn,...mn,...hn]),_t=G({},[...gn,..._n]),vt=function(e,t,n){return t.namespaceURI===A?e===`svg`:t.namespaceURI===rt?e===`svg`&&(n===`annotation-xml`||ct[n]):!!F[e]},I=function(e,t,n){return t.namespaceURI===A?e===`math`:t.namespaceURI===it?e===`math`&&N[n]:!!_t[e]},yt=function(e,t,n){return t.namespaceURI===it&&!N[n]||t.namespaceURI===rt&&!ct[n]?!1:!_t[e]&&(ut[e]||!F[e])},bt=function(e){let t=re(e),n=Yt(S(e)),r=_(e),i,a;return r&&x(r)===J.element?(i={namespaceURI:re(r)},a=Yt(S(r))):(i={namespaceURI:j},a=`template`),ot[t]?t===it?vt(n,i,a):t===rt?I(n,i,a):t===A?yt(n,i,a):!!(dt===`application/xhtml+xml`&&ot[t]):!1},L=function(e){Ht(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw on(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},R=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},xt=function(e){Tt(e);let t=g(e);t&&zt(Ut(t),e=>{try{p(e)}catch{}});let n=x(e)===J.element?ee(e):null;if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&R(e,r,i)}},St=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Ht(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Ve||He)try{L(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},Ct=function(e){let t=ee(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||D[P(i)]||R(e,r,i)}},wt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=[e];for(;r.length>0;){let e=r.pop();if(t(e)===!1)continue;if(n&&x(e)===J.element){let t=v(e);V(t)&&r.push(t)}let i=g(e);if(i)for(let e=i.length-1;e>=0;--e)r.push(i[e])}},Tt=function(e){wt(e,e=>{x(e)===J.element&&Ct(e)})},Et=function(e){let t=[];return wt(e,e=>{t.push(e)},!0),t},Dt=function(e,t){let n=Kt();zt(Et(e),e=>{x(e)===J.element&&qt(n,e)}),zt(t,e=>{x(e)===J.element&&!Jt(n,e)&&Ct(e)})},Ot=function(e,n){let r=!1;return zt(t.removed,t=>{t.element&&(r||=t.element===e,Tt(t.element))}),Dt(e,n),r},kt=function(e,t){let n=Ye,r=null,i=()=>(r||(r=Kt(),zt(t,e=>{qt(r,e)})),r);for(let t=0;;t++){let r=Et(e),a=[e],o=!1;if(zt(r,e=>{x(e)===J.documentFragment?Ht(a,e):!o&&!Jt(n,e)&&(o=Jt(i(),e))}),!o)return;if(t>=8)throw on(`the tree kept changing during in-place sanitization; refusing to return it`);zt(a,(t,n)=>{jt(t,n>0,e,i())})}},jt=function(e,t,n,r){let i=Lt(e),a;for(;a=i.nextNode();)Jt(r,a)&&!Jt(Ye,a)&&(t&&W(w.uponSanitizeShadowNode,a,null),qn(a,n),er(a,n),V(a.content)&&tr(a.content))},Mt=function(e){Ye&&qt(Ye,e)},Nt=function(e,t){return Fe?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},Pt=function(e){Fe&&wt(e,e=>{let t=x(e);if(t===J.processingInstruction||t===J.comment&&U(Pn,e.data)){try{p(e)}catch{}return!1}if(t===J.element){let t=e,n=P(S(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Nt(`for`,n)&&t.removeAttribute(`for`)}catch{}}return!0})},It=function(e){let t=null,r=null;if(Be)e=`<remove></remove>`+e;else{let t=Zt(e,/^[\r\n\t ]+/);r=t&&t[0]}dt===`application/xhtml+xml`&&j===A&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=C?le(e):e;if(j===A)try{t=new l().parseFromString(i,dt)}catch{}if(!t||!t.documentElement){t=pe.createDocument(j,`template`,null);try{t.documentElement.innerHTML=at?ie:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),j===A?ge.call(t,Ie?`html`:`body`)[0]:Ie?t.documentElement:a},Lt=function(e){let t=te?te(e):e.ownerDocument;return me.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Rt=function(e){return e=Qt(e,ve,` `),e=Qt(e,ye,` `),e=Qt(e,be,` `),e},tn=function(e){nn(e);let t=e.querySelectorAll?.call(e,`template`);t&&zt(t,e=>{V(e.content)&&tn(e.content)})},nn=function(e){e.normalize();let t=te?te(e):e.ownerDocument,n=me.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Rt(r.data),r=n.nextNode()},rn=function(e){let t=b?b(e):null;return typeof t!=`string`||P(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ee(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==g(e)},V=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===J.documentFragment}catch{return!1}},an=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function W(e,n,r){e.length!==0&&zt(e,e=>{e.call(t,n,r,pt)})}let sn=function(e,t){return!!(Fe&&e.hasChildNodes()&&!an(e.firstElementChild)&&U(Nn,e.textContent)&&U(Nn,e.innerHTML)||Fe&&Ln[t]&&x(e)===J.element&&re(e)===A&&(an(e.firstElementChild)||typeof e.textContent==`string`&&U(Nn,e.textContent))||e.nodeType===J.processingInstruction||Fe&&e.nodeType===J.comment&&U(Pn,e.data))},cn=function(e,t){return e instanceof RegExp?U(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},Wn=function(e,t,n){if(!Oe[t]&&Xn(t)&&cn(O.tagNameCheck,t))return!1;if(qe&&!Ze[t]&&!Ze[Yt(t)]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return L(e),!0},Gn=function(e,t,n,r){return e.length===0?t:t===n||t===r?K(t):t},Kn=function(e,t){return e===t||_(e)!==null?!1:(Je&&Tt(e),!0)},qn=function(e,n){if(Mt(e),W(w.beforeSanitizeElements,e,null),Kn(e,n))return!0;if(rn(e))return L(e),!0;let r=P(S(e));if(E=Gn(w.uponSanitizeElement,E,Ee,Re),W(w.uponSanitizeElement,e,{tagName:r,allowedTags:E}),Kn(e,n))return!0;if(sn(e,r))return L(e),!0;if(Oe[r]||!(Ae.tagCheck instanceof Function&&Ae.tagCheck(r))&&!E[r]){let t=Wn(e,r,n);return t===!1&&(W(w.afterSanitizeElements,e,null),Kn(e,n))?!0:t}if(x(e)===J.element&&!bt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&U(Fn,e.innerHTML))return L(e),!0;if(k&&e.nodeType===J.text){let n=Rt(e.textContent);e.textContent!==n&&(Ht(t.removed,{element:e.cloneNode()}),e.textContent=n)}return W(w.afterSanitizeElements,e,null),Kn(e,n)},Jn=function(e,t,r){if(ke[t]||Nt(t,e)||We&&(t===`id`||t===`name`)&&(r in n||r in mt))return!1;let i=D[t]||Ae.attributeCheck instanceof Function&&Ae.attributeCheck(t,e);return Me&&U(xe,t)||je&&U(Se,t)?!0:i?tt[t]||U(Te,Qt(r,T,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&$t(r,`data:`)===0&&$e[e]||Ne&&!U(Ce,Qt(r,T,``))?!0:!r:Xn(e)&&cn(O.tagNameCheck,e)&&cn(O.attributeNameCheck,t,e)||t===`is`&&O.allowCustomizedBuiltInElements&&cn(O.tagNameCheck,r)},Yn=G({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Xn=function(e){return!Yn[Yt(e)]&&U(we,e)},Zn=function(e,t,n,r){if(C&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return le(r);case`TrustedScriptURL`:return ue(r)}return r},Qn=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!rn(e)||(L(e),!1)}catch{return St(t,e),!1}},$n=function(e,t){return Fe&&U(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,t)?!0:Yt(e)===`attributename`&&Zt(t,`href`)!==null},er=function(e,n){if(W(w.beforeSanitizeAttributes,e,null),Kn(e,n))return;let r=e.attributes;if(!r||rn(e))return;D=Gn(w.uponSanitizeAttribute,D,De,ze);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:D,forceKeepAttr:void 0},a=r.length,o=P(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=P(s),d=l,f=s===`value`?d:en(d),p=!1;i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,W(w.uponSanitizeAttribute,e,i),f=i.attrValue,Ge&&(u===`id`||u===`name`)&&$t(f,Ke)!==0&&(St(s,e,n),f=Ke+f,p=!0),$n(s,f)?St(s,e,n):i.forceKeepAttr||(i.keepAttr?!Pe&&U(In,f)?St(s,e,n):(k&&(f=Rt(f)),Jn(o,u,f)?(f=Zn(o,u,c,f),f!==d&&Qn(e,s,c,f)&&p&&Vt(t.removed)):St(s,e,n)):St(s,e,n))}W(w.afterSanitizeAttributes,e,null),Kn(e,n)},tr=function(e){let t=null,n=Lt(e);for(W(w.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(W(w.uponSanitizeShadowNode,t,null),qn(t,e),er(t,e),V(t.content)&&tr(t.content),x(t)===J.element){let e=v(t);V(e)&&(nr(e),tr(e))}k&&nn(e),W(w.afterSanitizeShadowDOM,e,null)},nr=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){tr(e.shadow);continue}let n=e.node,r=x(n)===J.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&P(e)===`template`){let e=n.content;V(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);V(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(at=!e,at&&(e=`<!-->`),typeof e!=`string`&&!an(e)&&(e=ln(e),typeof e!=`string`))throw on(`dirty is not a string, aborting`);if(!t.isSupported)return e;Le?(E=Re,D=ze):gt(n),(w.uponSanitizeElement.length>0||w.uponSanitizeAttribute.length>0)&&(E=K(E)),w.uponSanitizeAttribute.length>0&&(D=K(D)),t.removed=[];let c=Je&&typeof e!=`string`&&an(e),l=[],u=Ye;if(c){Pt(e);let t=S(e);if(typeof t==`string`){let n=P(t);if(!E[n]||Oe[n])throw xt(e),on(`root node is forbidden and cannot be sanitized in-place`)}if(rn(e))throw xt(e),on(`root node is clobbered and cannot be sanitized in-place`);l=Et(e),Ye=Kt()}else if(an(e))i=It(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===J.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),nr(i);else{if(!Ve&&!k&&!Ie&&e.indexOf(`<`)===-1)return C&&Ue?le(e):e;if(i=It(e),!i)return Ve?null:Ue?ie:``}i&&Be&&L(i.firstChild);let d=c?e:i;try{c&&nr(e);let t=Lt(d);for(;o=t.nextNode();)qn(o,d),er(o,d),V(o.content)&&tr(o.content);c&&kt(e,l)}catch(t){throw c&&(xt(e),Ot(e,l)),t}finally{Ye=u}if(c){if(Ot(e,l))throw on(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return k&&tn(e),e}if(Ve){if(k&&tn(i),He)for(s=he.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(D.shadowroot||D.shadowrootmode)&&(s=_e.call(r,s,!0)),s}let f=Ie?i.outerHTML:i.innerHTML;return Ie&&E[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&U(jn,i.ownerDocument.doctype.name)&&(f=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
68
|
+
`+f),k&&(f=Rt(f)),C&&Ue?le(f):f},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gt(e),Le=!0,Re=E,ze=D},t.clearConfig=function(){pt=null,Le=!1,Re=null,ze=null,C=ae,ie=``},t.isValidAttribute=function(e,t,n){pt||gt({});let r=P(e),i=P(t);return typeof n==`string`&&($n(t,n)||!Pe&&U(In,n))?!1:Jn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&H(w,e)&&Ht(w[e],t)},t.removeHook=function(e,t){if(H(w,e)){if(t!==void 0){let n=Bt(w[e],t);return n===-1?void 0:Wt(w[e],n,1)[0]}return Vt(w[e])}},t.removeHooks=function(e){H(w,e)&&(w[e]=[])},t.removeAllHooks=function(){w=Bn()},t}var Wn=Un(),Gn=`modulepreload`,Kn=function(e){return`/_fzv/`+e},qn={},Jn=function(e){return e.pathname.endsWith(`.css`)},Yn=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Xn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Kn(t,n);let r=s(t),i=Jn(r);return Yn(qn,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Gn,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Zn(e,t){if(e.startsWith(`#`))return e;let n=new URL(t.split(`/`).map(encodeURIComponent).join(`/`),`https://project.invalid/`),r=new URL(e,n);return r.origin===n.origin?`/asset${r.pathname}${r.search}${r.hash}`:[`http:`,`https:`,`mailto:`].includes(r.protocol)?r.href:null}function Qn(e,t){let n=document.createElement(`article`);n.className=`markdown-preview`,n.append(Wn.sanitize(R.parse(e,{async:!1}),{USE_PROFILES:{html:!0},FORBID_TAGS:[`style`,`form`,`button`],FORBID_ATTR:[`style`,`id`,`name`,`class`],RETURN_DOM_FRAGMENT:!0}));for(let e of n.querySelectorAll(`a, img`)){let n=e.tagName===`A`?`href`:`src`,r=e.getAttribute(n);if(e.removeAttribute(`srcset`),r){try{let i=Zn(r,t);i?e.setAttribute(n,i):e.removeAttribute(n)}catch{e.removeAttribute(n)}e instanceof HTMLAnchorElement&&(e.target=`_blank`,e.rel=`noopener noreferrer`)}}return n}function $n(e,t,n,r){let i=document.createElement(`div`);i.className=`source-preview`;let o=document.createElement(`div`);o.className=`source-toolbar`;let s=document.createElement(`button`);s.type=`button`,s.className=`toolbar-button`,s.setAttribute(`aria-label`,`Copy source code`),s.title=`Copy source code`,s.append(a(`copy`),document.createTextNode(`Copy source code`)),s.addEventListener(`click`,()=>r(e),{signal:n}),o.append(s);let c=document.createElement(`pre`);c.className=`line-numbers`,c.setAttribute(`aria-hidden`,`true`),c.textContent=Array.from({length:e.split(/\r\n|\r|\n/).length},(e,t)=>String(t+1)).join(`
|
|
69
|
+
`);let l=document.createElement(`pre`);return l.className=`text-preview source-text`,l.textContent=e,i.append(o,c,l),Xn(async()=>{let{highlightSource:e}=await import(`./highlight-hBTJsM0d.js`);return{highlightSource:e}},[]).then(({highlightSource:r})=>r(l,e,t,n)).catch(()=>{}),i}function er(e){return e.kind===`html`||e.kind===`text`&&/\.md$/i.test(e.name)}function tr(e){return e.kind===`text`&&!er(e)?`source`:`viewer`}function nr(e,t=0,n=!1){return`${n?`/file`:e.kind===`html`?`/preview-html`:e.kind===`office`?`/office-pdf`:`/file`}?${new URLSearchParams({path:e.path,revision:String(t)})}`}function rr(e,t){e.classList.add(`preview-error`);let n=document.createElement(`p`);n.textContent=t,e.replaceChildren(n)}function ir(e,t=0,n=tr(e),r=()=>{}){let i=document.createElement(`section`);i.className=`preview-pane`,i.hidden=!0,i.setAttribute(`role`,`tabpanel`),i.setAttribute(`aria-label`,e.path);let o=new AbortController,s=!1,c=o.signal,l=nr(e,t),u;if(e.kind===`text`||e.kind===`html`){let a=document.createElement(`div`);a.className=`viewer-surface`;let o=document.createElement(`div`);o.className=`source-surface`,o.textContent=`Loading…`;let s=er(e);s&&i.append(a),i.append(o),s||(n=`source`);let d=n,f,p=!1,m=!1,h=()=>{f===void 0||c.aborted||(d===`source`&&!p&&(o.replaceChildren($n(f,e.name,c,r)),p=!0),d===`viewer`&&e.kind===`text`&&!m&&(a.replaceChildren(Qn(f,e.path)),m=!0))},g,_=()=>{g??=fetch(nr(e,t,!0),{signal:c}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(e=>{f=e,h()}).catch(t=>{if(c.aborted)return;let n=`Could not load ${e.path}: ${t}`;rr(o,n),e.kind===`text`&&rr(a,n)})};if(e.kind===`html`){let t=document.createElement(`iframe`);t.title=e.path,t.setAttribute(`sandbox`,`allow-scripts`),a.append(t),u=n=>{d=n,a.hidden=n!==`viewer`,o.hidden=n!==`source`,n===`source`?(_(),h()):t.hasAttribute(`src`)||(t.src=l,fetch(l,{method:`HEAD`,signal:c}).then(t=>{t.ok||rr(a,`Could not load ${e.path} (HTTP ${t.status}).`)}).catch(e=>{c.aborted||rr(a,String(e))}))}}else a.textContent=`Loading…`,_(),u=e=>{s||(e=`source`),d=e,a.hidden=e!==`viewer`,o.hidden=e!==`source`,h()};u(n)}else if(e.kind===`pdf`)i.textContent=`Loading…`,Xn(async()=>{let{mountPdf:e}=await import(`./pdf-CIufTche.js`);return{mountPdf:e}},__vite__mapDeps([0,1])).then(({mountPdf:e})=>{if(!c.aborted)return e(i,l,c,()=>s)}).catch(t=>{c.aborted||rr(i,`Could not load ${e.path}: ${t}`)});else if(e.kind===`office`){i.textContent=`Converting…`;let t=fetch(l,{signal:c}).then(async e=>{if(!e.ok)throw Error((await e.text()).trim()||`HTTP ${e.status}`);return new Uint8Array(await e.arrayBuffer())});Promise.all([Xn(()=>import(`./pdf-CIufTche.js`),__vite__mapDeps([0,1])),t]).then(([{mountPdf:e},t])=>{if(!c.aborted)return e(i,t,c,()=>s)}).catch(t=>{c.aborted||rr(i,`Could not preview ${e.path}. ${t instanceof Error?t.message:t}`)})}else if(e.kind===`image`){let t=document.createElement(`div`);t.className=`image-stage`;let n=document.createElement(`img`);n.src=l,n.alt=e.path,n.draggable=!1,n.addEventListener(`error`,()=>rr(i,`Could not load ${e.path}.`),{signal:c}),t.append(n);let r=document.createElement(`div`);r.className=`image-toolbar`,r.setAttribute(`role`,`group`),r.setAttribute(`aria-label`,`Image zoom`);let o=document.createElement(`span`);o.className=`image-zoom-value`,o.textContent=`100%`;let s=1,u=0,d=0,f=!1,p=0,m=0,h=()=>{n.style.transform=`translate3d(${u}px, ${d}px, 0) scale(${s})`,o.textContent=`${Math.round(s*100)}%`,t.classList.toggle(`zoomed`,s>1.001)},g=(e,n,r)=>{let i=Math.max(.1,Math.min(12,e)),a=i/s;if(n!==void 0&&r!==void 0){let e=t.getBoundingClientRect(),i=n-e.left-e.width/2,o=r-e.top-e.height/2;u=i-(i-u)*a,d=o-(o-d)*a}else u*=a,d*=a;s=i,h()},_=(e,t,n)=>{let r=document.createElement(`button`);return r.type=`button`,r.title=e,r.setAttribute(`aria-label`,e),r.textContent=t,r.addEventListener(`click`,n,{signal:c}),r},v=_(`Zoom out`,``,()=>g(s/1.25));v.append(a(`remove`)),v.className=`image-zoom-out`;let ee=_(`Fit image to viewer`,`Fit`,()=>{u=0,d=0,g(1)});ee.className=`image-fit`;let y=_(`Zoom in`,``,()=>g(s*1.25));y.append(a(`add`)),y.className=`image-zoom-in`,r.append(v,o,ee,y),t.addEventListener(`wheel`,e=>{e.ctrlKey&&(e.preventDefault(),g(s*Math.exp(-e.deltaY*.002),e.clientX,e.clientY))},{passive:!1,signal:c}),t.addEventListener(`pointerdown`,e=>{e.button!==0||s<=1.001||(f=!0,p=e.clientX,m=e.clientY,t.classList.add(`dragging`),t.setPointerCapture(e.pointerId))},{signal:c}),t.addEventListener(`pointermove`,e=>{f&&(u+=e.clientX-p,d+=e.clientY-m,p=e.clientX,m=e.clientY,h())},{signal:c});let b=()=>{f=!1,t.classList.remove(`dragging`)};t.addEventListener(`pointerup`,b,{signal:c}),t.addEventListener(`pointercancel`,b,{signal:c}),t.addEventListener(`lostpointercapture`,b,{signal:c}),i.append(t,r)}return{element:i,setActive:e=>{s=e},setMode:u,dispose:()=>{o.abort(),i.querySelectorAll(`iframe`).forEach(e=>e.remove()),i.remove()}}}function ar(e,t){Object.assign(e.style,{left:`${t.x}px`,top:`${t.y}px`,width:`${t.width}px`,height:`${t.height}px`})}var or=class{host;onChange;copyToClipboard;groups=new Map;tree;selectedGroup;sequence=0;tabSequence=0;revision=0;sashes=new Map;measured;dragged=null;dragSurface=document.createElement(`div`);highlight=document.createElement(`div`);resizeSurface=document.createElement(`div`);resizeObserver;constructor(e,t,n){this.host=e,this.onChange=t,this.copyToClipboard=n,this.selectedGroup=this.makeGroup(),this.tree={type:`group`,id:this.selectedGroup.id},this.measured=f(this.tree,this.hostRect()),this.dragSurface.className=`editor-drag-surface`,this.dragSurface.hidden=!0,this.highlight.className=`editor-drop-highlight`,this.dragSurface.append(this.highlight),this.resizeSurface.className=`editor-resize-surface`,this.resizeSurface.hidden=!0,e.append(this.dragSurface,this.resizeSurface),e.addEventListener(`dragover`,e=>this.dragOver(e)),e.addEventListener(`drop`,e=>{if(!this.dragged)return;e.preventDefault(),e.stopPropagation();let t=this.dropTarget(e),n=this.dragged;this.endDrag(),t&&this.transfer(n,t,this.isCopy(e))}),e.addEventListener(`dragleave`,t=>{e.contains(t.relatedTarget)||(this.highlight.hidden=!0)}),window.addEventListener(`dragend`,()=>this.endDrag()),window.addEventListener(`drop`,()=>this.endDrag()),window.addEventListener(`keydown`,e=>{e.key===`Escape`&&this.endDrag()}),window.addEventListener(`blur`,()=>{setTimeout(()=>this.activateFrame(document.activeElement),0)}),this.resizeObserver=new ResizeObserver(()=>this.layout()),this.resizeObserver.observe(e),this.render(!1)}get activeTab(){return this.selectedGroup.active}get tabs(){return l(this.tree).flatMap(e=>this.groups.get(e)?.tabs??[])}hostRect(){return{x:0,y:0,width:this.host.clientWidth,height:this.host.clientHeight}}makeGroup(){let e;do e=`group-${++this.sequence}`;while(this.groups.has(e));let t=document.createElement(`section`);t.className=`editor-group`,t.dataset.groupId=e,t.setAttribute(`role`,`region`);let n=document.getElementById(`editor-group-template`);t.append(n.content.cloneNode(!0));for(let n of t.querySelectorAll(`[id]`))n.dataset.control=n.id,this.groups.size&&(n.id+=`-${e}`);let r=e=>t.querySelector(`[data-control="${e}"]`);r(`current-path`).classList.add(`current-path`);let i={id:e,element:t,header:t.querySelector(`.group-header`),tabbar:r(`tabbar`),tabs:[],active:null,control:r};return t.addEventListener(`pointerdown`,()=>this.selectGroup(i),{capture:!0}),t.addEventListener(`focusin`,()=>this.selectGroup(i)),r(`group-focus`).addEventListener(`click`,()=>{this.selectGroup(i),this.focus()}),r(`reload-file`).addEventListener(`click`,()=>this.reload(i.active)),r(`copy-path`).addEventListener(`click`,()=>{let e=i.active?.file.path;e&&this.copyToClipboard(e,`File path`)}),r(`viewer-mode`).addEventListener(`click`,()=>this.setMode(i.active,`viewer`)),r(`source-mode`).addEventListener(`click`,()=>this.setMode(i.active,`source`)),r(`split-right`).addEventListener(`click`,()=>this.split(i,`right`)),r(`split-down`).addEventListener(`click`,()=>this.split(i,`down`)),this.groups.set(e,i),this.host.append(t),i}selectGroup(e){this.selectedGroup!==e&&(this.selectedGroup=e,this.render())}activate(e,t=!1){this.selectedGroup=e.group,e.group.active=e,this.render(),e.element.scrollIntoView({block:`nearest`,inline:`nearest`}),t&&e.button.focus()}mountPane(e){let t=e.pane.element;t.id=`${e.id}-panel`,t.setAttribute(`aria-labelledby`,e.id),t.addEventListener(`pointerdown`,()=>this.selectGroup(e.group),{capture:!0}),t.addEventListener(`focusin`,()=>this.selectGroup(e.group)),this.host.append(t)}makeTab(e,t,n=tr(e)){let r=`file-tab-${++this.tabSequence}`,i=document.createElement(`div`);i.className=`tab`,i.setAttribute(`role`,`presentation`),i.draggable=!0;let s=document.createElement(`button`);s.type=`button`,s.className=`tab-select tab-label`,s.setAttribute(`role`,`tab`),s.id=r,s.title=e.path,s.setAttribute(`aria-label`,e.path),s.setAttribute(`aria-controls`,`${r}-panel`);let c=document.createElement(`span`);c.textContent=e.name,s.append(o(e),c);let l={id:r,file:e,group:t,mode:n,element:i,button:s,pane:ir(e,0,n,e=>this.copyToClipboard(e,`Source`)),revision:0};s.addEventListener(`click`,()=>this.activate(l)),s.addEventListener(`keydown`,e=>{let t=l.group.tabs,n=t.indexOf(l),r=e.key===`ArrowRight`?(n+1)%t.length:e.key===`ArrowLeft`?(n-1+t.length)%t.length:e.key===`Home`?0:e.key===`End`?t.length-1:-1;e.key===`Delete`?(e.preventDefault(),this.close(l,!0)):r>=0&&(e.preventDefault(),this.activate(t[r],!0))});let u=document.createElement(`button`);return u.type=`button`,u.className=`tab-close`,u.title=`Close tab`,u.setAttribute(`aria-label`,`Close ${e.path}`),u.append(a(`close`)),u.addEventListener(`click`,()=>this.close(l,!0)),i.append(s,u),i.addEventListener(`dragstart`,e=>{e.dataTransfer&&(this.dragged=l,e.dataTransfer.effectAllowed=`copyMove`,e.dataTransfer.setData(`application/x-fzv-tab`,l.id),this.host.classList.add(`dragging-tab`),requestAnimationFrame(()=>{this.dragged&&(this.dragSurface.hidden=!1,this.highlight.hidden=!0)}))}),this.mountPane(l),t.tabs.push(l),t.active=l,l}open(e){let t=this.selectedGroup;this.activate(t.tabs.find(t=>t.file.path===e.path)??this.makeTab(e,t))}close(e,t=!1){this.dragged===e&&this.endDrag();let n=e.group,r=n.tabs.indexOf(e);r<0||(n.tabs.splice(r,1),e.pane.dispose(),e.element.remove(),n.active===e&&(n.active=n.tabs[Math.min(r,n.tabs.length-1)]??null),this.removeEmptyGroup(n),this.render(),t&&this.focus())}removeEmptyGroup(e){if(e.tabs.length||this.groups.size===1)return;let t=l(this.tree).indexOf(e.id);if(this.tree=c(this.tree,e.id),this.groups.delete(e.id),e.element.remove(),this.selectedGroup===e){let e=l(this.tree);this.selectedGroup=this.groups.get(e[Math.min(t,e.length-1)])}}focus(){(this.activeTab?.button??document.getElementById(`main`))?.focus()}cycle(e){let t=this.selectedGroup;if(!t.tabs.length)return;let n=t.active?t.tabs.indexOf(t.active):-1;this.activate(t.tabs[(n+e+t.tabs.length)%t.tabs.length])}focusGroup(e){let t=l(this.tree)[e],n=this.groups.get(t);n&&(this.selectGroup(n),this.focus())}splitActive(e){this.split(this.selectedGroup,e)}split(e,t){e.active&&this.transfer(e.active,{group:e,direction:t},!0)}transfer(e,t,n){let r=e.group,i=t.group;if(t.direction){if(this.groups.size>=32||!n&&r===i&&r.tabs.length===1)return;let e=this.makeGroup();this.tree=s(this.tree,i.id,e.id,t.direction,`split-${++this.sequence}`),i=e}let a=i.tabs.find(t=>t.file.path===e.file.path);if(i===r){t.index!==void 0&&(i.tabs.splice(i.tabs.indexOf(e),1),i.tabs.splice(t.index,0,e)),this.activate(e,!0);return}if(a&&t.index!==void 0&&(i.tabs.splice(i.tabs.indexOf(a),1),i.tabs.splice(t.index,0,a)),n){let n=a??this.makeTab(e.file,i,e.mode);!a&&t.index!==void 0&&(i.tabs.splice(i.tabs.indexOf(n),1),i.tabs.splice(t.index,0,n)),this.activate(n,!0);return}let o=r.tabs.indexOf(e);r.tabs.splice(o,1),r.active===e&&(r.active=r.tabs[Math.min(o,r.tabs.length-1)]??null),a?(e.pane.dispose(),e.element.remove()):(e.group=i,i.tabs.splice(t.index??i.tabs.length,0,e)),this.selectedGroup=i,i.active=a??e,this.removeEmptyGroup(r),this.activate(a??e,!0)}reload(e=this.activeTab){e&&(e.pane.dispose(),e.revision=++this.revision,e.pane=ir(e.file,e.revision,e.mode,e=>this.copyToClipboard(e,`Source`)),this.mountPane(e),this.render())}setMode(e,t){e?.pane.setMode&&er(e.file)&&(e.mode=t,e.pane.setMode(t),this.render())}frameTab(e){return this.tabs.find(t=>t.group.active===t&&t.file.kind===`html`&&t.mode===`viewer`&&t.pane.element.querySelector(`iframe`)?.contentWindow===e)}activateFrame(e){if(!(e instanceof HTMLIFrameElement))return;let t=this.frameTab(e.contentWindow);t&&this.selectGroup(t.group)}snapshot(){return{version:2,layout:this.tree,activeGroup:this.selectedGroup.id,groups:l(this.tree).map(e=>{let t=this.groups.get(e);return{id:e,tabs:t.tabs.map(e=>({path:e.file.path,mode:e.mode})),active:t.active?.file.path??null}})}}restore(e,t){if(!e){this.render();return}let n=new Map(t.map(e=>[e.path,e]));if(e.version===1){for(let t of e.tabs){let e=n.get(t);e&&this.makeTab(e,this.selectedGroup)}this.selectedGroup.active=this.selectedGroup.tabs.find(t=>t.file.path===e.active)??this.selectedGroup.tabs[0]??null}else{for(let e of this.groups.values())e.element.remove();this.groups.clear();let t=new Map;for(let r of e.groups){let e=this.makeGroup();t.set(r.id,e.id);for(let t of r.tabs){let r=n.get(t.path);r&&this.makeTab(r,e,er(r)?t.mode:tr(r))}e.active=e.tabs.find(e=>e.file.path===r.active)??e.tabs[0]??null}let r=e=>e.type===`group`?{type:`group`,id:t.get(e.id)}:{...e,id:`split-${++this.sequence}`,children:[r(e.children[0]),r(e.children[1])]};this.tree=r(e.layout),this.selectedGroup=this.groups.get(t.get(e.activeGroup));for(let e of[...this.groups.values()])this.removeEmptyGroup(e)}this.render()}render(e=!0){let t=0;for(let e of l(this.tree)){let n=this.groups.get(e);n.element.setAttribute(`aria-label`,`Editor group ${++t}`),n.element.classList.toggle(`focused`,n===this.selectedGroup),n.element.classList.toggle(`multiple`,this.groups.size>1);let r=n.control(`group-focus`);r.hidden=this.groups.size===1,r.textContent=String(t),r.setAttribute(`aria-label`,`Focus editor group ${t}`),r.setAttribute(`aria-pressed`,String(n===this.selectedGroup)),r.title=`Focus editor group ${t} (f)`,n.element.setAttribute(`aria-owns`,n.tabs.map(e=>e.pane.element.id).join(` `));let i=n.active;n.control(`no-tabs`).hidden=!!n.tabs.length,n.control(`empty-state`).hidden=!!i,n.control(`current-path`).textContent=i?.file.path??`Ready when you are`,n.control(`current-path`).title=i?.file.path??``;for(let e of[`reload-file`,`split-right`,`split-down`])n.control(e).disabled=!i||e.startsWith(`split-`)&&this.groups.size>=32;if(n.control(`copy-path`).disabled=!i,n.control(`open-file`).hidden=!i,n.control(`download-file`).hidden=!i,i&&(n.control(`open-file`).href=nr(i.file,i.revision)),i){let e=n.control(`download-file`);e.href=nr(i.file,i.revision,!0),e.download=i.file.name}n.control(`preview-modes`).hidden=!i||!er(i.file),n.control(`viewer-mode`).setAttribute(`aria-pressed`,String(i?.mode===`viewer`)),n.control(`source-mode`).setAttribute(`aria-pressed`,String(i?.mode===`source`)),n.tabs.forEach((e,t)=>{let r=n.tabbar.children[t];r!==e.element&&n.tabbar.insertBefore(e.element,r??null);let a=e===i;e.element.classList.toggle(`active`,a),e.button.setAttribute(`aria-selected`,String(a)),e.button.tabIndex=a?0:-1,e.pane.element.hidden=!a,e.pane.element.dataset.groupId=n.id,e.pane.setActive(a&&n===this.selectedGroup)})}this.layout(),e&&this.onChange()}layout(){this.measured=f(this.tree,this.hostRect());for(let[e,t]of this.measured.groups){let n=this.groups.get(e);ar(n.element,t);let r=Math.min(t.height,n.header.offsetHeight);for(let e of n.tabs)ar(e.pane.element,{...t,y:t.y+r,height:Math.max(0,t.height-r)})}for(let[e,t]of this.sashes)this.measured.splits.has(e)||(t.remove(),this.sashes.delete(e));for(let[e,{node:t,rect:n,sash:r}]of this.measured.splits){let i=this.sashes.get(e);i||(i=this.makeSash(e),this.sashes.set(e,i),this.host.append(i)),i.dataset.axis=t.axis,i.setAttribute(`aria-orientation`,t.axis===`x`?`vertical`:`horizontal`),i.setAttribute(`aria-label`,t.axis===`x`?`Resize editor columns`:`Resize editor rows`);let[a,o]=d(t,t.axis===`x`?n.width:n.height);i.setAttribute(`aria-valuemin`,String(Math.round(a*100))),i.setAttribute(`aria-valuemax`,String(Math.round(o*100))),i.setAttribute(`aria-valuenow`,String(Math.round(Math.max(a,Math.min(o,t.ratio))*100))),ar(i,r)}}makeSash(e){let t=document.createElement(`div`);t.className=`editor-sash`,t.setAttribute(`role`,`separator`),t.tabIndex=0;let n=null,r=(r=!1)=>{if(!n)return;let i=this.measured.splits.get(e);r&&i&&(i.node.ratio=n.ratio);let a=n.pointer;n=null,t.hasPointerCapture(a)&&t.releasePointerCapture(a),this.resizeSurface.hidden=!0,t.classList.remove(`resizing`),this.layout(),this.onChange()};return t.addEventListener(`pointerdown`,r=>{if(r.button!==0)return;r.preventDefault();let i=this.measured.splits.get(e);n={ratio:i.node.ratio,pointer:r.pointerId},t.setPointerCapture(r.pointerId),t.focus(),t.classList.add(`resizing`),this.resizeSurface.style.cursor=i.node.axis===`x`?`col-resize`:`row-resize`,this.resizeSurface.hidden=!1}),t.addEventListener(`pointermove`,t=>{if(!n)return;let r=this.measured.splits.get(e),i=this.host.getBoundingClientRect(),a=r.node.axis===`x`?r.rect.width:r.rect.height,o=r.node.axis===`x`?t.clientX-i.left-r.rect.x:t.clientY-i.top-r.rect.y,[s,c]=d(r.node,a);r.node.ratio=Math.max(s,Math.min(c,(o-2)/Math.max(1,a-4))),this.layout()}),t.addEventListener(`pointerup`,()=>r()),t.addEventListener(`pointercancel`,()=>r(!0)),t.addEventListener(`lostpointercapture`,()=>r()),t.addEventListener(`keydown`,t=>{if(t.key===`Escape`&&n){t.preventDefault(),r(!0);return}let i=this.measured.splits.get(e),a=i.node.axis===`x`?`ArrowLeft`:`ArrowUp`;if(![a,i.node.axis===`x`?`ArrowRight`:`ArrowDown`,`Home`,`End`].includes(t.key))return;t.preventDefault();let[o,s]=d(i.node,i.node.axis===`x`?i.rect.width:i.rect.height);i.node.ratio=t.key===`Home`?o:t.key===`End`?s:Math.max(o,Math.min(s,i.node.ratio+(t.key===a?-.05:.05))),this.layout(),this.onChange()}),t.addEventListener(`dblclick`,()=>{this.measured.splits.get(e).node.ratio=.5,this.layout(),this.onChange()}),t}isCopy(e){return/Mac|iPhone|iPad/.test(navigator.platform)?e.altKey:e.ctrlKey}endDrag(){this.dragged=null,this.host.classList.remove(`dragging-tab`),this.dragSurface.hidden=!0,this.highlight.hidden=!0}dropTarget(e){let t=this.host.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;for(let[t,i]of this.measured.groups){if(n<i.x||n>i.x+i.width||r<i.y||r>i.y+i.height)continue;let a=this.groups.get(t),o=a.tabbar.getBoundingClientRect();if(e.clientY<o.bottom){e.clientX<o.left+24&&(a.tabbar.scrollLeft-=12),e.clientX>o.right-24&&(a.tabbar.scrollLeft+=12);let t=a.tabs.filter(e=>e.file.path!==this.dragged?.file.path),n=t.findIndex(t=>{let n=t.element.getBoundingClientRect();return e.clientX<n.left+n.width/2});return{group:a,index:n<0?t.length:n}}let s=a.header.offsetHeight,c=(n-i.x)/i.width,l=(r-i.y-s)/Math.max(1,i.height-s),u;return l>=0&&(c<.1||c>.9||l<.1||l>.9)&&(u=c<1/3?`left`:c>2/3?`right`:l<.5?`up`:`down`),{group:a,direction:u}}return null}dragOver(e){if(!this.dragged)return;e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.isCopy(e)?`copy`:`move`);let t=this.dropTarget(e);if(this.highlight.hidden=!t,!t)return;let n=this.measured.groups.get(t.group.id);if(t.index!==void 0){let e=t.group.tabs.filter(e=>e.file.path!==this.dragged?.file.path),r=e[t.index]?.element.getBoundingClientRect(),i=e[t.index-1]?.element.getBoundingClientRect(),a=t.group.tabbar.getBoundingClientRect(),o=this.host.getBoundingClientRect(),s=Math.max(a.left,Math.min(a.right-2,r?.left??i?.right??a.left));this.highlight.classList.add(`tab-insertion`),ar(this.highlight,{x:s-o.left,y:n.y,width:2,height:a.height});return}this.highlight.classList.remove(`tab-insertion`);let r=t.group.header.offsetHeight,i={...n,y:n.y+r,height:Math.max(0,n.height-r)};(t.direction===`left`||t.direction===`right`)&&(i.width/=2,t.direction===`right`&&(i.x+=i.width)),(t.direction===`up`||t.direction===`down`)&&(i.height/=2,t.direction===`down`&&(i.y+=i.height)),ar(this.highlight,i)}},sr=`fzv:theme`;function cr(e){let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=null;try{let e=localStorage.getItem(sr);(e===`light`||e===`dark`)&&(n=e)}catch{}let r=t=>{document.documentElement.dataset.theme=t;let n=t===`light`?`Switch to dark theme`:`Switch to light theme`;e.setAttribute(`aria-label`,n),e.setAttribute(`aria-pressed`,String(t===`dark`)),e.title=n;let r=document.createElement(`span`);r.textContent=t===`light`?`Dark`:`Light`,e.replaceChildren(a(`color-mode`),r)};r(n??(t.matches?`dark`:`light`)),t.addEventListener(`change`,()=>{n||r(t.matches?`dark`:`light`)}),e.addEventListener(`click`,()=>{n=document.documentElement.dataset.theme===`dark`?`light`:`dark`,r(n);try{localStorage.setItem(sr,n)}catch{}})}function lr(e={}){let t=new AbortController,n=t.signal,r=0,i=null,a=[],o=``,s=null,c=()=>{i?.remove(),i=null,a=[],o=``,r=0},l=()=>{if(!s)return;let e=s;s=null,e.open&&e.close(),e.remove()},u=()=>{if(s)return;c();let t=document.createElement(`dialog`);s=t,t.setAttribute(`aria-labelledby`,`fzv-keyboard-help-title`),Object.assign(t.style,{position:`fixed`,inset:`0`,margin:`auto`,width:`min(520px, calc(100vw - 28px))`,maxHeight:`min(80vh, 640px)`,overflow:`auto`,padding:`20px 22px`,border:`1px solid #8888`,borderRadius:`8px`,background:`#f8f8f8`,color:`#202020`,boxShadow:`0 12px 40px #0005`,font:`13px/1.5 system-ui, sans-serif`,zIndex:`2147483647`});let r=document.createElement(`div`);Object.assign(r.style,{display:`flex`,alignItems:`center`,gap:`12px`,marginBottom:`14px`});let i=document.createElement(`h2`);i.id=`fzv-keyboard-help-title`,i.textContent=`Keyboard shortcuts`,Object.assign(i.style,{flex:`1`,margin:`0`,fontSize:`16px`});let a=document.createElement(`button`);a.type=`button`,a.textContent=`Close`,a.setAttribute(`aria-label`,`Close keyboard shortcuts`),Object.assign(a.style,{padding:`5px 9px`,border:`1px solid #8888`,borderRadius:`4px`,background:`#fff`,color:`inherit`,font:`inherit`,cursor:`pointer`}),a.addEventListener(`click`,l,{signal:n}),r.append(i,a);let o=[[`/`,`Find a file`],[`r`,`Reload the active preview`],[`f`,e.bridgeWorkspace?`Show workspace hints`:`Show hints for links and controls`],[`h j k l`,`Scroll the active preview`],[`gg`,`Scroll to the top`],[`G`,`Scroll to the bottom`],[`?`,`Show this keyboard help`],[`Escape`,`Cancel hints or close this help`]];e.bridgeWorkspace||o.push([`Ctrl/Cmd + Tab`,`Switch tabs in the focused group`],[`Alt + j / k`,`Switch tabs in the focused group`],[`Ctrl/Cmd + 1–9`,`Focus an editor group`],[`Ctrl/Cmd + \\`,`Split the editor to the right`],[`Ctrl/Cmd + Shift + \\`,`Split the editor below`],[`Ctrl/Cmd + f`,`Find in a PDF`],[`Ctrl/Cmd + + / − / 0`,`Zoom an image or PDF`]);let u=document.createElement(`div`);Object.assign(u.style,{display:`grid`,gridTemplateColumns:`minmax(125px, auto) minmax(0, 1fr)`,gap:`7px 14px`,alignItems:`center`});for(let[e,t]of o){let n=document.createElement(`kbd`);n.textContent=e,Object.assign(n.style,{justifySelf:`start`,padding:`2px 5px`,border:`1px solid #aaa`,borderRadius:`3px`,background:`#eee`,color:`inherit`,font:`11px ui-monospace, monospace`,whiteSpace:`nowrap`});let r=document.createElement(`span`);r.textContent=t,u.append(n,r)}t.append(r,u),t.addEventListener(`cancel`,e=>{e.preventDefault(),l()},{signal:n}),document.body.append(t),t.showModal(),a.focus()},d=e=>e instanceof HTMLElement&&(e.isContentEditable||!!e.closest(`input, textarea, select, [role="textbox"]`)),f=()=>{c();let e=document.querySelector(`dialog[open]`)??document.body,t=[...e.querySelectorAll(`a[href], button:not(:disabled), input:not(:disabled):not([type="hidden"]), textarea:not(:disabled), select:not(:disabled), summary, [role="button"], [tabindex]:not([tabindex="-1"]), [contenteditable]:not([contenteditable="false"]), iframe`)].filter(e=>{if(e.matches(`:disabled`)||e.closest(`[hidden], [inert], [aria-disabled="true"]`))return!1;let t=getComputedStyle(e);if(t.visibility!==`visible`||t.display===`none`||t.opacity===`0`)return!1;let n=e.getBoundingClientRect(),r=Math.max(0,n.left),i=Math.min(innerWidth,n.right),a=Math.max(0,n.top),o=Math.min(innerHeight,n.bottom);if(r>=i||a>=o)return!1;let s=document.elementFromPoint((r+i)/2,(a+o)/2);return s===e||!!(s&&e.contains(s))});if(!t.length)return;i=document.createElement(`div`),i.className=`vim-hints`,i.setAttribute(`aria-label`,`Link hints; type a label to jump, Escape to cancel`),i.style.pointerEvents=`none`;let n=Math.max(1,Math.ceil(Math.log(t.length)/Math.log(9)));a=t.map((e,t)=>{let r=t,a=``;for(let e=0;e<n;e++)a=`asdfghjkl`[r%9]+a,r=Math.floor(r/9);let o=e.getBoundingClientRect(),s=document.createElement(`span`);return s.className=`vim-hint`,s.dataset.hintTarget=e.id||e.getAttribute(`aria-label`)||e.textContent?.trim()||e.tagName,s.textContent=a.toUpperCase(),s.setAttribute(`aria-hidden`,`true`),Object.assign(s.style,{position:`fixed`,zIndex:`2147483647`,pointerEvents:`none`,left:`${Math.max(0,Math.min(innerWidth-32,o.left))}px`,top:`${Math.max(0,Math.min(innerHeight-20,o.top))}px`,font:`bold 12px/18px monospace`,padding:`0 3px`,color:`#1f1f1f`,backgroundColor:`#ffdf80`,border:`1px solid #b78618`,borderRadius:`2px`,boxShadow:`0 1px 2px #0003`}),i.append(s),{target:e,label:a,badge:s}}),e.append(i)},p=()=>{let t=e.getScrollRoot?.();if(t)return t;let n=document.activeElement;for(;n instanceof HTMLElement&&n!==document.body;){let e=getComputedStyle(n);if(/(auto|scroll)/.test(e.overflowY+e.overflowX)&&(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth))return n;n=n.parentElement}return document.scrollingElement},m=e=>{let t=p();t&&(e===`top`?t.scrollTo({top:0,behavior:`instant`}):e===`bottom`?t.scrollTo({top:t.scrollHeight,behavior:`instant`}):t.scrollBy({left:e===`h`?-64:e===`l`?64:0,top:e===`j`?64:e===`k`?-64:0,behavior:`instant`}))};return window.addEventListener(`keydown`,t=>{if(t.defaultPrevented||t.isComposing||d(t.composedPath()[0]??t.target)||t.ctrlKey||t.metaKey||t.altKey){r=0;return}let n=()=>{t.preventDefault(),t.stopImmediatePropagation()};if(s){t.key===`Escape`&&(l(),n());return}if(t.key===`Escape`){(i||r)&&(c(),n());return}if(i){if(n(),t.key===`Backspace`)o=o.slice(0,-1);else if(t.key.length===1)o+=t.key.toLowerCase();else return;let r=a.filter(e=>e.label.startsWith(o));for(let e of a)e.badge.hidden=!e.label.startsWith(o);if(!r.length){c();return}let i=r.find(e=>e.label===o);if(i){let t=i.target;c(),t.isConnected&&(t.focus(),e.onHintActivate?.(t)||t.click())}return}let p=r;if(r=0,t.key===`/`&&e.onSearch){n(),e.onSearch();return}if(t.key===`?`){n(),u();return}if(t.key===`r`&&e.onReload){n(),e.onReload();return}if(t.key===`f`&&!t.repeat){n(),e.bridgeWorkspace?parent.postMessage({type:`fzv:shortcut`,key:`f`},`*`):f();return}if(t.key===`g`){if(n(),t.repeat)return;let i=performance.now();p&&i-p<800?e.onScroll?.(`top`)||m(`top`):r=i;return}if(![`h`,`j`,`k`,`l`,`G`].includes(t.key))return;n();let h=t.key===`G`?`bottom`:t.key;e.onScroll?.(h)||m(h)},{capture:!0,signal:n}),window.addEventListener(`blur`,c,{signal:n}),window.addEventListener(`message`,t=>{e.bridgeWorkspace&&parent!==window&&t.source===parent&&(t.data?.type===`fzv:show-hints`&&f(),t.data?.type===`fzv:scroll`&&[`h`,`j`,`k`,`l`,`top`,`bottom`].includes(t.data.key)&&m(t.data.key))},{signal:n}),window.addEventListener(`resize`,c,{signal:n}),document.addEventListener(`pointerdown`,c,{capture:!0,signal:n}),document.addEventListener(`pointerdown`,()=>e.onFocus?.(),{capture:!0,signal:n}),document.addEventListener(`focusin`,()=>e.onFocus?.(),{signal:n}),document.addEventListener(`scroll`,()=>{i&&c()},{capture:!0,signal:n}),document.addEventListener(`focusin`,e=>{r=0,d(e.target)&&c()},{signal:n}),{cancel:c,showHints:f,showHelp:u,dispose:()=>{c(),l(),t.abort()}}}function Y(e){let t=document.getElementById(e);if(!t)throw Error(`Missing UI element: ${e}`);return t}var X=Y(`search`),Z=Y(`search-panel`),ur=Y(`results`),dr=Y(`result-count`),fr=Y(`refresh-files`),pr=Y(`notification`);cr(Y(`theme-toggle`));var mr=[],hr=new e([]),gr=``,_r=[],Q=0,vr,yr=0,br=0,xr=0,Sr,Cr=!1,wr;try{wr=window.localStorage}catch{}function Tr(e){pr.textContent=e,pr.hidden=!1,clearTimeout(vr),vr=setTimeout(()=>{pr.hidden=!0},5e3)}function Er(e){let t=document.activeElement,n=window.getSelection(),r=n?Array.from({length:n.rangeCount},(e,t)=>n.getRangeAt(t).cloneRange()):[],i=window.scrollX,a=window.scrollY,o=document.createElement(`textarea`);o.value=e,o.readOnly=!0,o.setAttribute(`aria-hidden`,`true`),Object.assign(o.style,{position:`fixed`,left:`-10000px`,top:`0`,width:`1px`,height:`1px`,opacity:`0`,fontSize:`16px`}),document.body.append(o);let s=!1;try{o.focus({preventScroll:!0}),o.select(),s=document.execCommand(`copy`)}catch{s=!1}if(o.remove(),t instanceof HTMLElement&&t.isConnected&&t.focus({preventScroll:!0}),n){n.removeAllRanges();for(let e of r)n.addRange(e)}return window.scrollTo(i,a),s}async function Dr(e,t){try{await navigator.clipboard.writeText(e),Tr(`${t} copied to clipboard.`)}catch{Tr(Er(e)?`${t} copied to clipboard.`:`Could not copy ${t.toLowerCase()}.`)}}function Or(){wr&&gr&&i(wr,gr,$.snapshot())}function kr(){let e=hr.search(X.value);_r=e.files,Q=Math.min(Math.max(Q,0),Math.max(0,_r.length-1));let t=_r.map((e,t)=>{let n=document.createElement(`button`);n.type=`button`,n.className=`result monaco-list-row quick-input-list-entry`,n.title=e.path,n.setAttribute(`aria-label`,e.path),n.classList.toggle(`active`,e.path===$.activeTab?.file.path),n.classList.toggle(`keyboard-selected`,t===Q&&document.activeElement===X),e.path===$.activeTab?.file.path&&n.setAttribute(`aria-current`,`true`);let r=document.createElement(`span`);r.className=`result-text`;let i=document.createElement(`span`);i.className=`result-name`,i.textContent=e.name+(e.kind===`directory`?`/`:``);let a=document.createElement(`span`);return a.className=`result-path`,a.textContent=e.path,r.append(i,a),n.append(o(e),r),n.addEventListener(`click`,()=>Nr(e)),n});if(ur.replaceChildren(...t),!_r.length){let e=document.createElement(`div`);e.className=`no-results`,e.textContent=mr.length?`No files match your search.`:`No previewable files yet. Add a PDF, HTML, image, or text file, then refresh.`,ur.append(e)}dr.textContent=X.value.trim()?`${e.total} match${e.total===1?``:`es`}`:`${e.total} item${e.total===1?``:`s`}`,e.total>_r.length&&(dr.textContent+=` · showing ${_r.length}`)}function Ar(){$.focus()}function jr(e){Vr.cancel(),e?(X.value=``,Q=0,Z.open||Z.showModal(),X.focus(),kr(),zr(!1)):(Z.close(),Ar())}function Mr(){jr(!0)}function Nr(e){e.kind===`directory`?(X.value=`${e.path}/`,Q=0,X.focus(),kr()):($.open(e),jr(!1))}function Pr(e){return[...new Set(e.version===1?e.tabs:e.groups.flatMap(e=>e.tabs.map(e=>e.path)))]}async function Fr(e){let t=[],n=[],r=0;for(let i of Pr(e)){let e=new URLSearchParams({path:i}).toString().length+7;e>12e3||((n.length===32||n.length>0&&r+e>12e3)&&(t.push(n),n=[],r=0),n.push(i),r+=e)}return n.length&&t.push(n),(await Promise.all(t.map(async e=>{let t=new URLSearchParams;for(let n of e)t.append(`path`,n);let n=await fetch(`/api/session-files?${t}`);if(!n.ok)throw Error(`HTTP ${n.status}`);return await n.json()}))).flat()}function Ir(t,n){return t<xr?!1:(xr=t,mr=n.files,hr=new e([...n.directories,...mr]),!0)}function Lr(e){let{paths:t}=e;for(let e of $.tabs)(!t||er(e.file)&&e.mode===`viewer`||t.some(t=>e.file.path===t||e.file.path.startsWith(`${t}/`)))&&$.reload(e);zr(!0)}function Rr(e){Sr=Br(e).finally(()=>{Sr=void 0,Cr&&(Cr=!1,Rr(`background`))})}function zr(e){Sr?e&&(Cr=!0):Rr(`background`)}async function Br(e=`refresh`){let t=++br;e!==`background`&&(fr.disabled=!0,dr.textContent=`Loading files…`);try{if(e===`initial`){let e=fetch(`/api/files`).then(async e=>e.ok?{data:await e.json()}:{error:Error(`HTTP ${e.status}`)},e=>({error:e})),n=await fetch(`/api/project`);if(!n.ok)throw Error(`HTTP ${n.status}`);let i=await n.json();i.watch&&new EventSource(`/api/events`).addEventListener(`change`,e=>Lr(JSON.parse(e.data))),gr=i.id,Y(`project-name`).textContent=i.name,Y(`status-project`).textContent=i.name;let a=wr?r(wr,gr):null,o=!1;if(a)try{$.restore(a,await Fr(a)),o=!0}catch{}let s=await e;if(`error`in s)throw s.error;let c=s.data;a&&!o&&$.restore(a,c.files),Ir(t,c),kr()}else{let n=await fetch(`/api/files`);if(!n.ok)throw Error(`HTTP ${n.status}`);let r=await n.json();if(!Ir(t,r))return;gr=r.project.id;let i=new Set(r.files.map(e=>e.path));Y(`project-name`).textContent=r.project.name,Y(`status-project`).textContent=r.project.name;for(let e of $.tabs)i.has(e.file.path)||$.close(e);kr(),e===`refresh`&&Tr(`File list refreshed.`)}}catch(e){if(t!==br)return;dr.textContent=`Could not load files`,Tr(`Could not load the project: ${e}`)}finally{t===br&&(fr.disabled=!1)}}X.addEventListener(`input`,()=>{Q=0,cancelAnimationFrame(yr),yr=requestAnimationFrame(kr)}),X.addEventListener(`focus`,kr),X.addEventListener(`blur`,()=>{for(let e of ur.children)e.classList.remove(`keyboard-selected`)}),X.addEventListener(`keydown`,e=>{e.key===`Escape`?(e.preventDefault(),jr(!1)):([`Enter`,`ArrowDown`,`ArrowUp`].includes(e.key)&&(cancelAnimationFrame(yr),kr()),e.key===`Enter`&&_r[Q]&&(e.preventDefault(),Nr(_r[Q])),(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),Q=Math.max(0,Math.min(_r.length-1,Q+(e.key===`ArrowDown`?1:-1))),kr(),ur.children[Q]?.scrollIntoView({block:`nearest`})))}),Z.addEventListener(`close`,()=>{Z.open||Ar()}),Z.addEventListener(`cancel`,e=>{e.preventDefault(),jr(!1)}),Z.addEventListener(`click`,e=>{if(e.target!==Z)return;let t=Z.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&jr(!1)}),Y(`close-search`).addEventListener(`click`,()=>jr(!1)),Y(`find-file`).addEventListener(`click`,Mr),fr.addEventListener(`click`,()=>{Br()}),window.addEventListener(`keydown`,e=>{if(e.defaultPrevented||e.isComposing||document.querySelector(`dialog[open]`))return;let t=document.activeElement,n=t instanceof HTMLElement&&(t.isContentEditable||!!t.closest(`input,textarea,select,[role="textbox"]`));if(e.altKey&&!e.ctrlKey&&!e.metaKey&&[`j`,`k`].includes(e.key.toLowerCase())){e.preventDefault(),$.cycle(e.key.toLowerCase()===`j`?1:-1);return}if(e.ctrlKey&&e.key===`Tab`){e.preventDefault(),$.cycle(e.shiftKey?-1:1);return}if(!n&&(e.ctrlKey||e.metaKey)&&!e.altKey&&!Z.open){if(e.code===`Backslash`){e.preventDefault(),$.splitActive(e.shiftKey?`down`:`right`);return}if(/^[1-9]$/.test(e.key)){e.preventDefault(),$.focusGroup(Number(e.key)-1);return}}let r=$.activeTab;if(!n&&(e.ctrlKey||e.metaKey)&&!e.altKey&&r?.file.kind===`image`){let t=[`+`,`=`].includes(e.key)?`.image-zoom-in`:[`-`,`_`].includes(e.key)?`.image-zoom-out`:e.key===`0`?`.image-fit`:null;t&&(e.preventDefault(),r.pane.element.querySelector(t)?.click())}});var Vr=lr({onSearch:Mr,onScroll:e=>{let t=$.activeTab;if(!t||t.file.kind!==`html`||t.mode!==`viewer`)return!1;let n=t.pane.element.querySelector(`iframe`);return n?.contentWindow?(n.contentWindow.postMessage({type:`fzv:scroll`,key:e},`*`),!0):!1},onHintActivate:e=>!(e instanceof HTMLIFrameElement)||!$.frameTab(e.contentWindow)?!1:($.activateFrame(e),e.contentWindow?.postMessage({type:`fzv:show-hints`},`*`),!0),onReload:()=>{Z.open||$.reload()},getScrollRoot:()=>Z.open?ur:[...$.activeTab?.pane.element.querySelectorAll(`.source-preview, .viewer-surface, .pdf-scroll`)??[]].find(e=>e.getClientRects().length>0)??null}),$=new or(Y(`preview`),()=>{Vr.cancel();let e=$.activeTab;document.title=e?`${e.file.name} — fzv`:`fzv`;let t=$.tabs.length;Y(`tab-count`).textContent=`${t} open tab${t===1?``:`s`}`,kr(),Or()},(e,t)=>void Dr(e,t));window.addEventListener(`message`,e=>{if(e.origin!==`null`)return;let t=$.frameTab(e.source);t&&(e.data?.type===`fzv:focus`?$.activateFrame(t.pane.element.querySelector(`iframe`)):t===$.activeTab&&e.data?.type===`fzv:shortcut`&&(e.data.key===`/`&&Mr(),e.data.key===`r`&&$.reload(),e.data.key===`f`&&!Z.open&&($.focus(),Vr.showHints())))}),Rr(`initial`);export{Xn as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./highlight-8tepxCyl.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"Java","name":"java","patterns":[{"begin":"\\\\b(package)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.other.package.java"}},"contentName":"storage.modifier.package.java","end":"\\\\s*(;)","endCaptures":{"1":{"name":"punctuation.terminator.java"}},"name":"meta.package.java","patterns":[{"include":"#comments"},{"match":"(?<=\\\\.)\\\\s*\\\\.|\\\\.(?=\\\\s*;)","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!_)_(?=\\\\s*([.;]))|\\\\b\\\\d+|-+","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"[A-Z]+","name":"invalid.deprecated.package_name_not_lowercase.java"},{"match":"\\\\b(?<!\\\\$)(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|non-sealed|package|permits|private|protected|public|return|sealed|short|static|strictfp|super|switch|syncronized|this|throws??|transient|try|void|volatile|while|yield|true|false|null)\\\\b","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\.","name":"punctuation.separator.java"}]},{"begin":"\\\\b(import)\\\\b\\\\s*\\\\b(static)?\\\\b\\\\s","beginCaptures":{"1":{"name":"keyword.other.import.java"},"2":{"name":"storage.modifier.java"}},"contentName":"storage.modifier.import.java","end":"\\\\s*(;)","endCaptures":{"1":{"name":"punctuation.terminator.java"}},"name":"meta.import.java","patterns":[{"include":"#comments"},{"match":"(?<=\\\\.)\\\\s*\\\\.|\\\\.(?=\\\\s*;)","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!\\\\.)\\\\s*\\\\*","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!_)_(?=\\\\s*([.;]))|\\\\b\\\\d+|-+","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\b(?<!\\\\$)(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|non-sealed|package|permits|private|protected|public|return|sealed|short|static|strictfp|super|switch|syncronized|this|throws??|transient|try|void|volatile|while|yield|true|false|null)\\\\b","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\.","name":"punctuation.separator.java"},{"match":"\\\\*","name":"variable.language.wildcard.java"}]},{"include":"#comments-javadoc"},{"include":"#code"},{"include":"#module"}],"repository":{"all-types":{"patterns":[{"include":"#primitive-arrays"},{"include":"#primitive-types"},{"include":"#object-types"}]},"annotations":{"patterns":[{"begin":"((@)\\\\s*([^(\\\\s]+))(\\\\()","beginCaptures":{"2":{"name":"punctuation.definition.annotation.java"},"3":{"name":"storage.type.annotation.java"},"4":{"name":"punctuation.definition.annotation-arguments.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.annotation-arguments.end.bracket.round.java"}},"name":"meta.declaration.annotation.java","patterns":[{"captures":{"1":{"name":"constant.other.key.java"},"2":{"name":"keyword.operator.assignment.java"}},"match":"(\\\\w*)\\\\s*(=)"},{"include":"#code"}]},{"captures":{"1":{"name":"punctuation.definition.annotation.java"},"2":{"name":"storage.modifier.java"},"3":{"name":"storage.type.annotation.java"},"5":{"name":"punctuation.definition.annotation.java"},"6":{"name":"storage.type.annotation.java"}},"match":"(@)(interface)\\\\s+(\\\\w*)|((@)\\\\s*(\\\\w+))","name":"meta.declaration.annotation.java"}]},"anonymous-block-and-instance-initializer":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.java"}},"patterns":[{"include":"#code"}]},"anonymous-classes-and-new":{"begin":"\\\\bnew\\\\b","beginCaptures":{"0":{"name":"keyword.control.new.java"}},"end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"include":"#function-call"},{"include":"#all-types"},{"begin":"(?<=\\\\))","end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.inner-class.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.inner-class.end.bracket.curly.java"}},"name":"meta.inner-class.java","patterns":[{"include":"#class-body"}]}]},{"begin":"(?<=])","end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.array-initializer.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.array-initializer.end.bracket.curly.java"}},"name":"meta.array-initializer.java","patterns":[{"include":"#code"}]}]},{"include":"#parens"}]},"assertions":{"patterns":[{"begin":"\\\\b(assert)\\\\s","beginCaptures":{"1":{"name":"keyword.control.assert.java"}},"end":"$","name":"meta.declaration.assertion.java","patterns":[{"match":":","name":"keyword.operator.assert.expression-separator.java"},{"include":"#code"}]}]},"class":{"begin":"(?=\\\\w?[-\\\\w\\\\s]*\\\\b(?:class|(?<!@)interface|enum)\\\\s+[$\\\\w]+)","end":"}","endCaptures":{"0":{"name":"punctuation.section.class.end.bracket.curly.java"}},"name":"meta.class.java","patterns":[{"include":"#storage-modifiers"},{"include":"#generics"},{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.java"},"2":{"name":"entity.name.type.class.java"}},"match":"(class|(?<!@)interface|enum)\\\\s+([$\\\\w]+)","name":"meta.class.identifier.java"},{"begin":"extends","beginCaptures":{"0":{"name":"storage.modifier.extends.java"}},"end":"(?=\\\\{|implements|permits)","name":"meta.definition.class.inherited.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"(implements)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\s*extends|permits|\\\\{)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"(permits)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.permits.java"}},"end":"(?=\\\\s*extends|implements|\\\\{)","name":"meta.definition.class.permits.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.class.begin.bracket.curly.java"}},"contentName":"meta.class.body.java","end":"(?=})","patterns":[{"include":"#class-body"}]}]},"class-body":{"patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"include":"#enums"},{"include":"#class"},{"include":"#generics"},{"include":"#static-initializer"},{"include":"#class-fields-and-methods"},{"include":"#annotations"},{"include":"#storage-modifiers"},{"include":"#member-variables"},{"include":"#code"}]},"class-fields-and-methods":{"patterns":[{"begin":"(?==)","end":"(?=;)","patterns":[{"include":"#code"}]},{"include":"#methods"}]},"code":{"patterns":[{"include":"#annotations"},{"include":"#comments"},{"include":"#enums"},{"include":"#class"},{"include":"#record"},{"include":"#anonymous-block-and-instance-initializer"},{"include":"#try-catch-finally"},{"include":"#assertions"},{"include":"#parens"},{"include":"#constants-and-special-vars"},{"include":"#numbers"},{"include":"#anonymous-classes-and-new"},{"include":"#lambda-expression"},{"include":"#keywords"},{"include":"#storage-modifiers"},{"include":"#method-call"},{"include":"#function-call"},{"include":"#variables"},{"include":"#variables-local"},{"include":"#objects"},{"include":"#properties"},{"include":"#strings"},{"include":"#all-types"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"},{"match":";","name":"punctuation.terminator.java"}]},"comments":{"patterns":[{"captures":{"0":{"name":"punctuation.definition.comment.java"}},"match":"/\\\\*\\\\*/","name":"comment.block.empty.java"},{"include":"#comments-inline"}]},"comments-inline":{"patterns":[{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.java"}},"end":"\\\\*/","name":"comment.block.java"},{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.java"}},"end":"(?!\\\\G)","patterns":[{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.java"}},"end":"\\\\n","name":"comment.line.double-slash.java"}]}]},"comments-javadoc":{"patterns":[{"begin":"^\\\\s*(/\\\\*\\\\*)(?!/)","beginCaptures":{"1":{"name":"punctuation.definition.comment.java"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.java"}},"name":"comment.block.javadoc.java","patterns":[{"match":"@(author|deprecated|return|see|serial|since|version)\\\\b","name":"keyword.other.documentation.javadoc.java"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"variable.parameter.java"}},"match":"(@param)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"entity.name.type.class.java"}},"match":"(@(?:exception|throws))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"entity.name.type.class.java"},"3":{"name":"variable.parameter.java"}},"match":"\\\\{(@link)\\\\s+(\\\\S+)?#([$\\\\w]+\\\\s*\\\\([^()]*\\\\)).*?}"}]}]},"constants-and-special-vars":{"patterns":[{"match":"\\\\b(true|false|null)\\\\b","name":"constant.language.java"},{"match":"\\\\bthis\\\\b","name":"variable.language.this.java"},{"match":"\\\\bsuper\\\\b","name":"variable.language.java"}]},"enums":{"begin":"^\\\\s*([\\\\w\\\\s]*)(enum)\\\\s+(\\\\w+)","beginCaptures":{"1":{"patterns":[{"include":"#storage-modifiers"}]},"2":{"name":"storage.modifier.java"},"3":{"name":"entity.name.type.enum.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.enum.end.bracket.curly.java"}},"name":"meta.enum.java","patterns":[{"begin":"\\\\b(extends)\\\\b","beginCaptures":{"1":{"name":"storage.modifier.extends.java"}},"end":"(?=\\\\{|\\\\bimplements\\\\b)","name":"meta.definition.class.inherited.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\b(implements)\\\\b","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\{|\\\\bextends\\\\b)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.enum.begin.bracket.curly.java"}},"end":"(?=})","patterns":[{"begin":"(?<=\\\\{)","end":"(?=[;}])","patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"begin":"\\\\b(\\\\w+)\\\\b","beginCaptures":{"1":{"name":"constant.other.enum.java"}},"end":"(,)|(?=[;}])","endCaptures":{"1":{"name":"punctuation.separator.delimiter.java"}},"patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"patterns":[{"include":"#class-body"}]}]}]},{"include":"#class-body"}]}]},"function-call":{"begin":"([$A-Z_a-z][$\\\\w]*)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.java"},"2":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.function-call.java","patterns":[{"include":"#code"}]},"generics":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.bracket.angle.java"}},"end":">","endCaptures":{"0":{"name":"punctuation.bracket.angle.java"}},"patterns":[{"match":"\\\\b(extends|super)\\\\b","name":"storage.modifier.$1.java"},{"captures":{"1":{"name":"storage.type.java"}},"match":"(?<!\\\\.)([$A-Z_a-z][$0-9A-Z_a-z]*)(?=\\\\s*<)"},{"include":"#primitive-arrays"},{"match":"[$A-Z_a-z][$0-9A-Z_a-z]*","name":"storage.type.generic.java"},{"match":"\\\\?","name":"storage.type.generic.wildcard.java"},{"match":"&","name":"punctuation.separator.types.java"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"},{"include":"#parens"},{"include":"#generics"},{"include":"#comments"}]},"keywords":{"patterns":[{"match":"\\\\bthrow\\\\b","name":"keyword.control.throw.java"},{"match":"[:?]","name":"keyword.control.ternary.java"},{"match":"\\\\b(return|yield|break|case|continue|default|do|while|for|switch|if|else)\\\\b","name":"keyword.control.java"},{"match":"\\\\b(instanceof)\\\\b","name":"keyword.operator.instanceof.java"},{"match":"(<<|>>>?|[\\\\^~])","name":"keyword.operator.bitwise.java"},{"match":"(([\\\\&^|]|<<|>>>?)=)","name":"keyword.operator.assignment.bitwise.java"},{"match":"(===?|!=|<=|>=|<>|[<>])","name":"keyword.operator.comparison.java"},{"match":"([-%*+/]=)","name":"keyword.operator.assignment.arithmetic.java"},{"match":"(=)","name":"keyword.operator.assignment.java"},{"match":"(--|\\\\+\\\\+)","name":"keyword.operator.increment-decrement.java"},{"match":"([-%*+/])","name":"keyword.operator.arithmetic.java"},{"match":"(!|&&|\\\\|\\\\|)","name":"keyword.operator.logical.java"},{"match":"([\\\\&|])","name":"keyword.operator.bitwise.java"},{"match":"\\\\b(const|goto)\\\\b","name":"keyword.reserved.java"}]},"lambda-expression":{"patterns":[{"match":"->","name":"storage.type.function.arrow.java"}]},"member-variables":{"begin":"(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)","end":"(?=[;=])","patterns":[{"include":"#storage-modifiers"},{"include":"#variables"},{"include":"#primitive-arrays"},{"include":"#object-types"}]},"method-call":{"begin":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"entity.name.function.java"},"3":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method-call.java","patterns":[{"include":"#code"}]},"methods":{"begin":"(?!new)(?=[<\\\\w].*\\\\s+)(?=([^/=]|/(?!/))+\\\\()","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.java"},"2":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method.identifier.java","patterns":[{"include":"#parameters"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#generics"},{"begin":"(?=\\\\w.*\\\\s+\\\\w+\\\\s*\\\\()","end":"(?=\\\\s+\\\\w+\\\\s*\\\\()","name":"meta.method.return-type.java","patterns":[{"include":"#all-types"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#throws"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]},{"include":"#comments"}]},"module":{"begin":"((open)\\\\s)?(module)\\\\s+(\\\\w+)","beginCaptures":{"1":{"name":"storage.modifier.java"},"3":{"name":"storage.modifier.java"},"4":{"name":"entity.name.type.module.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.module.end.bracket.curly.java"}},"name":"meta.module.java","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.module.begin.bracket.curly.java"}},"contentName":"meta.module.body.java","end":"(?=})","patterns":[{"include":"#comments"},{"include":"#comments-javadoc"},{"match":"\\\\b(requires|transitive|exports|opens|to|uses|provides|with)\\\\b","name":"keyword.module.java"}]}]},"numbers":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])((?<!\\\\.)\\\\h([_\\\\h]*\\\\h)?[Ll]?(?!\\\\.)|(\\\\h([_\\\\h]*\\\\h)?\\\\.?|(\\\\h([_\\\\h]*\\\\h)?)?\\\\.\\\\h([_\\\\h]*\\\\h)?)[Pp][-+]?[0-9]([0-9_]*[0-9])?[DFdf]?)\\\\b(?!\\\\$)","name":"constant.numeric.hex.java"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]([01_]*[01])?[Ll]?\\\\b(?!\\\\$)","name":"constant.numeric.binary.java"},{"match":"\\\\b(?<!\\\\$)0[0-7]([0-7_]*[0-7])?[Ll]?\\\\b(?!\\\\$)","name":"constant.numeric.octal.java"},{"match":"(?<!\\\\$)(\\\\b[0-9]([0-9_]*[0-9])?\\\\.\\\\B(?!\\\\.)|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([Ee][-+]?[0-9]([0-9_]*[0-9])?)[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]\\\\b|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([0-9]([0-9_]*[0-9])?)([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]?\\\\b|(?<!\\\\.)\\\\B\\\\.[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]\\\\b|\\\\b(0|[1-9]([0-9_]*[0-9])?)(?!\\\\.)[Ll]?\\\\b)(?!\\\\$)","name":"constant.numeric.decimal.java"}]},"object-types":{"patterns":[{"include":"#generics"},{"begin":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*)([A-Z_]\\\\w*)\\\\s*(?=\\\\[)","beginCaptures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]},"2":{"name":"storage.type.object.array.java"}},"end":"(?!\\\\s*\\\\[)","patterns":[{"include":"#comments"},{"include":"#parens"}]},{"captures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]}},"match":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*[A-Z_]\\\\w*)\\\\s*(?=<)"},{"captures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]}},"match":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*[A-Z_]\\\\w*)\\\\b((?=\\\\s*[\\\\n$A-Z_a-z])|(?=\\\\s*\\\\.\\\\.\\\\.))"}]},"object-types-inherited":{"patterns":[{"include":"#generics"},{"captures":{"1":{"name":"punctuation.separator.period.java"}},"match":"\\\\b(?:[A-Z]\\\\w*\\\\s*(\\\\.)\\\\s*)*[A-Z]\\\\w*\\\\b","name":"entity.other.inherited-class.java"},{"match":",","name":"punctuation.separator.delimiter.java"}]},"objects":{"match":"(?<![$\\\\w])[$A-Z_a-z][$\\\\w]*(?=\\\\s*\\\\.\\\\s*[$\\\\w]+)","name":"variable.other.object.java"},"parameters":{"patterns":[{"match":"\\\\bfinal\\\\b","name":"storage.modifier.java"},{"include":"#annotations"},{"include":"#all-types"},{"include":"#strings"},{"match":"\\\\w+","name":"variable.parameter.java"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.\\\\.\\\\.","name":"punctuation.definition.parameters.varargs.java"}]},"parens":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.bracket.square.java"}},"end":"]","endCaptures":{"0":{"name":"punctuation.bracket.square.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"patterns":[{"include":"#code"}]}]},"primitive-arrays":{"patterns":[{"begin":"\\\\b(void|boolean|byte|char|short|int|float|long|double)\\\\b\\\\s*(?=\\\\[)","beginCaptures":{"1":{"name":"storage.type.primitive.array.java"}},"end":"(?!\\\\s*\\\\[)","patterns":[{"include":"#comments"},{"include":"#parens"}]}]},"primitive-types":{"match":"\\\\b(void|boolean|byte|char|short|int|float|long|double)\\\\b","name":"storage.type.primitive.java"},"properties":{"patterns":[{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"keyword.control.new.java"}},"match":"(\\\\.)\\\\s*(new)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"variable.other.object.property.java"}},"match":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)(?=\\\\s*\\\\.\\\\s*[$A-Z_a-z][$\\\\w]*)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"variable.other.object.property.java"}},"match":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"invalid.illegal.identifier.java"}},"match":"(\\\\.)\\\\s*([0-9][$\\\\w]*)"}]},"record":{"begin":"(?=\\\\w?[\\\\w\\\\s]*\\\\brecord\\\\s+[$\\\\w]+)","end":"}","endCaptures":{"0":{"name":"punctuation.section.class.end.bracket.curly.java"}},"name":"meta.record.java","patterns":[{"include":"#storage-modifiers"},{"include":"#generics"},{"include":"#comments"},{"begin":"(record)\\\\s+([$\\\\w]+)(<[$\\\\w]+>)?(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.java"},"2":{"name":"entity.name.type.record.java"},"3":{"patterns":[{"include":"#generics"}]},"4":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.record.identifier.java","patterns":[{"include":"#code"}]},{"begin":"(implements)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\s*\\\\{)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"include":"#record-body"}]},"record-body":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.class.begin.bracket.curly.java"}},"end":"(?=})","name":"meta.record.body.java","patterns":[{"include":"#record-constructor"},{"include":"#class-body"}]},"record-constructor":{"begin":"(?!new)(?=[<\\\\w].*\\\\s+)(?=([^(/=]|/(?!/))+(?=\\\\{))","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)","beginCaptures":{"1":{"name":"entity.name.function.java"}},"end":"(?=\\\\s*\\\\{)","name":"meta.method.identifier.java","patterns":[{"include":"#comments"}]},{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},"static-initializer":{"patterns":[{"include":"#anonymous-block-and-instance-initializer"},{"match":"static","name":"storage.modifier.java"}]},"storage-modifiers":{"match":"\\\\b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|volatile|default|strictfp|sealed|non-sealed)\\\\b","name":"storage.modifier.java"},"strings":{"patterns":[{"begin":"\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"\\"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.triple.java","patterns":[{"match":"(\\\\\\\\\\"\\"\\")(?!\\")|(\\\\\\\\.)","name":"constant.character.escape.java"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.double.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.single.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]}]},"throws":{"begin":"throws","beginCaptures":{"0":{"name":"storage.modifier.java"}},"end":"(?=[;{])","name":"meta.throwables.java","patterns":[{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"[$A-Z_a-z][$.0-9A-Z_a-z]*","name":"storage.type.java"},{"include":"#comments"}]},"try-catch-finally":{"patterns":[{"begin":"\\\\btry\\\\b","beginCaptures":{"0":{"name":"keyword.control.try.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.try.end.bracket.curly.java"}},"name":"meta.try.java","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.try.resources.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.try.resources.end.bracket.round.java"}},"name":"meta.try.resources.java","patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.try.begin.bracket.curly.java"}},"contentName":"meta.try.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\b(catch)\\\\b","beginCaptures":{"1":{"name":"keyword.control.catch.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.catch.end.bracket.curly.java"}},"name":"meta.catch.java","patterns":[{"include":"#comments"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"contentName":"meta.catch.parameters.java","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"patterns":[{"include":"#comments"},{"include":"#storage-modifiers"},{"begin":"[$A-Z_a-z][$.0-9A-Z_a-z]*","beginCaptures":{"0":{"name":"storage.type.java"}},"end":"(\\\\|)|(?=\\\\))","endCaptures":{"1":{"name":"punctuation.catch.separator.java"}},"patterns":[{"include":"#comments"},{"captures":{"0":{"name":"variable.parameter.java"}},"match":"\\\\w+"}]}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.catch.begin.bracket.curly.java"}},"contentName":"meta.catch.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\bfinally\\\\b","beginCaptures":{"0":{"name":"keyword.control.finally.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.finally.end.bracket.curly.java"}},"name":"meta.finally.java","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.finally.begin.bracket.curly.java"}},"contentName":"meta.finally.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]}]},"variables":{"begin":"(?=\\\\b((void|boolean|byte|char|short|int|float|long|double)|(?>(\\\\w+\\\\.)*[A-Z_]+\\\\w*))\\\\b\\\\s*(<[],.<>?\\\\[\\\\w\\\\s]*>)?\\\\s*((\\\\[])*)?\\\\s+[$A-Z_a-z][$\\\\w]*([]$,\\\\[\\\\w][],\\\\[\\\\w\\\\s]*)?\\\\s*([:;=]))","end":"(?=[:;=])","name":"meta.definition.variable.java","patterns":[{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([$A-Z_a-z][$\\\\w]*)(?=\\\\s*(\\\\[])*\\\\s*([,:;=]))"},{"include":"#all-types"},{"include":"#code"}]},"variables-local":{"begin":"(?=\\\\b(var)\\\\b\\\\s+[$A-Z_a-z][$\\\\w]*\\\\s*([:;=]))","end":"(?=[:;=])","name":"meta.definition.variable.local.java","patterns":[{"match":"\\\\bvar\\\\b","name":"storage.type.local.java"},{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([$A-Z_a-z][$\\\\w]*)(?=\\\\s*(\\\\[])*\\\\s*([:;=]))"},{"include":"#code"}]}},"scopeName":"source.java"}`))];export{t as n,n as t};
|
|
1
|
+
import{t as e}from"./highlight-hBTJsM0d.js";var t=e({default:()=>n}),n=[Object.freeze(JSON.parse(`{"displayName":"Java","name":"java","patterns":[{"begin":"\\\\b(package)\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.other.package.java"}},"contentName":"storage.modifier.package.java","end":"\\\\s*(;)","endCaptures":{"1":{"name":"punctuation.terminator.java"}},"name":"meta.package.java","patterns":[{"include":"#comments"},{"match":"(?<=\\\\.)\\\\s*\\\\.|\\\\.(?=\\\\s*;)","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!_)_(?=\\\\s*([.;]))|\\\\b\\\\d+|-+","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"[A-Z]+","name":"invalid.deprecated.package_name_not_lowercase.java"},{"match":"\\\\b(?<!\\\\$)(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|non-sealed|package|permits|private|protected|public|return|sealed|short|static|strictfp|super|switch|syncronized|this|throws??|transient|try|void|volatile|while|yield|true|false|null)\\\\b","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\.","name":"punctuation.separator.java"}]},{"begin":"\\\\b(import)\\\\b\\\\s*\\\\b(static)?\\\\b\\\\s","beginCaptures":{"1":{"name":"keyword.other.import.java"},"2":{"name":"storage.modifier.java"}},"contentName":"storage.modifier.import.java","end":"\\\\s*(;)","endCaptures":{"1":{"name":"punctuation.terminator.java"}},"name":"meta.import.java","patterns":[{"include":"#comments"},{"match":"(?<=\\\\.)\\\\s*\\\\.|\\\\.(?=\\\\s*;)","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!\\\\.)\\\\s*\\\\*","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"(?<!_)_(?=\\\\s*([.;]))|\\\\b\\\\d+|-+","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\b(?<!\\\\$)(abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|non-sealed|package|permits|private|protected|public|return|sealed|short|static|strictfp|super|switch|syncronized|this|throws??|transient|try|void|volatile|while|yield|true|false|null)\\\\b","name":"invalid.illegal.character_not_allowed_here.java"},{"match":"\\\\.","name":"punctuation.separator.java"},{"match":"\\\\*","name":"variable.language.wildcard.java"}]},{"include":"#comments-javadoc"},{"include":"#code"},{"include":"#module"}],"repository":{"all-types":{"patterns":[{"include":"#primitive-arrays"},{"include":"#primitive-types"},{"include":"#object-types"}]},"annotations":{"patterns":[{"begin":"((@)\\\\s*([^(\\\\s]+))(\\\\()","beginCaptures":{"2":{"name":"punctuation.definition.annotation.java"},"3":{"name":"storage.type.annotation.java"},"4":{"name":"punctuation.definition.annotation-arguments.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.annotation-arguments.end.bracket.round.java"}},"name":"meta.declaration.annotation.java","patterns":[{"captures":{"1":{"name":"constant.other.key.java"},"2":{"name":"keyword.operator.assignment.java"}},"match":"(\\\\w*)\\\\s*(=)"},{"include":"#code"}]},{"captures":{"1":{"name":"punctuation.definition.annotation.java"},"2":{"name":"storage.modifier.java"},"3":{"name":"storage.type.annotation.java"},"5":{"name":"punctuation.definition.annotation.java"},"6":{"name":"storage.type.annotation.java"}},"match":"(@)(interface)\\\\s+(\\\\w*)|((@)\\\\s*(\\\\w+))","name":"meta.declaration.annotation.java"}]},"anonymous-block-and-instance-initializer":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.java"}},"patterns":[{"include":"#code"}]},"anonymous-classes-and-new":{"begin":"\\\\bnew\\\\b","beginCaptures":{"0":{"name":"keyword.control.new.java"}},"end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"include":"#function-call"},{"include":"#all-types"},{"begin":"(?<=\\\\))","end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.inner-class.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.inner-class.end.bracket.curly.java"}},"name":"meta.inner-class.java","patterns":[{"include":"#class-body"}]}]},{"begin":"(?<=])","end":"(?=[])-.:;?}]|/(?![*/])|[!%\\\\&=^|])","patterns":[{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.array-initializer.begin.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.array-initializer.end.bracket.curly.java"}},"name":"meta.array-initializer.java","patterns":[{"include":"#code"}]}]},{"include":"#parens"}]},"assertions":{"patterns":[{"begin":"\\\\b(assert)\\\\s","beginCaptures":{"1":{"name":"keyword.control.assert.java"}},"end":"$","name":"meta.declaration.assertion.java","patterns":[{"match":":","name":"keyword.operator.assert.expression-separator.java"},{"include":"#code"}]}]},"class":{"begin":"(?=\\\\w?[-\\\\w\\\\s]*\\\\b(?:class|(?<!@)interface|enum)\\\\s+[$\\\\w]+)","end":"}","endCaptures":{"0":{"name":"punctuation.section.class.end.bracket.curly.java"}},"name":"meta.class.java","patterns":[{"include":"#storage-modifiers"},{"include":"#generics"},{"include":"#comments"},{"captures":{"1":{"name":"storage.modifier.java"},"2":{"name":"entity.name.type.class.java"}},"match":"(class|(?<!@)interface|enum)\\\\s+([$\\\\w]+)","name":"meta.class.identifier.java"},{"begin":"extends","beginCaptures":{"0":{"name":"storage.modifier.extends.java"}},"end":"(?=\\\\{|implements|permits)","name":"meta.definition.class.inherited.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"(implements)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\s*extends|permits|\\\\{)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"(permits)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.permits.java"}},"end":"(?=\\\\s*extends|implements|\\\\{)","name":"meta.definition.class.permits.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.class.begin.bracket.curly.java"}},"contentName":"meta.class.body.java","end":"(?=})","patterns":[{"include":"#class-body"}]}]},"class-body":{"patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"include":"#enums"},{"include":"#class"},{"include":"#generics"},{"include":"#static-initializer"},{"include":"#class-fields-and-methods"},{"include":"#annotations"},{"include":"#storage-modifiers"},{"include":"#member-variables"},{"include":"#code"}]},"class-fields-and-methods":{"patterns":[{"begin":"(?==)","end":"(?=;)","patterns":[{"include":"#code"}]},{"include":"#methods"}]},"code":{"patterns":[{"include":"#annotations"},{"include":"#comments"},{"include":"#enums"},{"include":"#class"},{"include":"#record"},{"include":"#anonymous-block-and-instance-initializer"},{"include":"#try-catch-finally"},{"include":"#assertions"},{"include":"#parens"},{"include":"#constants-and-special-vars"},{"include":"#numbers"},{"include":"#anonymous-classes-and-new"},{"include":"#lambda-expression"},{"include":"#keywords"},{"include":"#storage-modifiers"},{"include":"#method-call"},{"include":"#function-call"},{"include":"#variables"},{"include":"#variables-local"},{"include":"#objects"},{"include":"#properties"},{"include":"#strings"},{"include":"#all-types"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"},{"match":";","name":"punctuation.terminator.java"}]},"comments":{"patterns":[{"captures":{"0":{"name":"punctuation.definition.comment.java"}},"match":"/\\\\*\\\\*/","name":"comment.block.empty.java"},{"include":"#comments-inline"}]},"comments-inline":{"patterns":[{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.java"}},"end":"\\\\*/","name":"comment.block.java"},{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.java"}},"end":"(?!\\\\G)","patterns":[{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.java"}},"end":"\\\\n","name":"comment.line.double-slash.java"}]}]},"comments-javadoc":{"patterns":[{"begin":"^\\\\s*(/\\\\*\\\\*)(?!/)","beginCaptures":{"1":{"name":"punctuation.definition.comment.java"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.java"}},"name":"comment.block.javadoc.java","patterns":[{"match":"@(author|deprecated|return|see|serial|since|version)\\\\b","name":"keyword.other.documentation.javadoc.java"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"variable.parameter.java"}},"match":"(@param)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"entity.name.type.class.java"}},"match":"(@(?:exception|throws))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"keyword.other.documentation.javadoc.java"},"2":{"name":"entity.name.type.class.java"},"3":{"name":"variable.parameter.java"}},"match":"\\\\{(@link)\\\\s+(\\\\S+)?#([$\\\\w]+\\\\s*\\\\([^()]*\\\\)).*?}"}]}]},"constants-and-special-vars":{"patterns":[{"match":"\\\\b(true|false|null)\\\\b","name":"constant.language.java"},{"match":"\\\\bthis\\\\b","name":"variable.language.this.java"},{"match":"\\\\bsuper\\\\b","name":"variable.language.java"}]},"enums":{"begin":"^\\\\s*([\\\\w\\\\s]*)(enum)\\\\s+(\\\\w+)","beginCaptures":{"1":{"patterns":[{"include":"#storage-modifiers"}]},"2":{"name":"storage.modifier.java"},"3":{"name":"entity.name.type.enum.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.enum.end.bracket.curly.java"}},"name":"meta.enum.java","patterns":[{"begin":"\\\\b(extends)\\\\b","beginCaptures":{"1":{"name":"storage.modifier.extends.java"}},"end":"(?=\\\\{|\\\\bimplements\\\\b)","name":"meta.definition.class.inherited.classes.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\b(implements)\\\\b","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\{|\\\\bextends\\\\b)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.enum.begin.bracket.curly.java"}},"end":"(?=})","patterns":[{"begin":"(?<=\\\\{)","end":"(?=[;}])","patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"begin":"\\\\b(\\\\w+)\\\\b","beginCaptures":{"1":{"name":"constant.other.enum.java"}},"end":"(,)|(?=[;}])","endCaptures":{"1":{"name":"punctuation.separator.delimiter.java"}},"patterns":[{"include":"#comments-javadoc"},{"include":"#comments"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"patterns":[{"include":"#class-body"}]}]}]},{"include":"#class-body"}]}]},"function-call":{"begin":"([$A-Z_a-z][$\\\\w]*)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.java"},"2":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.function-call.java","patterns":[{"include":"#code"}]},"generics":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.bracket.angle.java"}},"end":">","endCaptures":{"0":{"name":"punctuation.bracket.angle.java"}},"patterns":[{"match":"\\\\b(extends|super)\\\\b","name":"storage.modifier.$1.java"},{"captures":{"1":{"name":"storage.type.java"}},"match":"(?<!\\\\.)([$A-Z_a-z][$0-9A-Z_a-z]*)(?=\\\\s*<)"},{"include":"#primitive-arrays"},{"match":"[$A-Z_a-z][$0-9A-Z_a-z]*","name":"storage.type.generic.java"},{"match":"\\\\?","name":"storage.type.generic.wildcard.java"},{"match":"&","name":"punctuation.separator.types.java"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"},{"include":"#parens"},{"include":"#generics"},{"include":"#comments"}]},"keywords":{"patterns":[{"match":"\\\\bthrow\\\\b","name":"keyword.control.throw.java"},{"match":"[:?]","name":"keyword.control.ternary.java"},{"match":"\\\\b(return|yield|break|case|continue|default|do|while|for|switch|if|else)\\\\b","name":"keyword.control.java"},{"match":"\\\\b(instanceof)\\\\b","name":"keyword.operator.instanceof.java"},{"match":"(<<|>>>?|[\\\\^~])","name":"keyword.operator.bitwise.java"},{"match":"(([\\\\&^|]|<<|>>>?)=)","name":"keyword.operator.assignment.bitwise.java"},{"match":"(===?|!=|<=|>=|<>|[<>])","name":"keyword.operator.comparison.java"},{"match":"([-%*+/]=)","name":"keyword.operator.assignment.arithmetic.java"},{"match":"(=)","name":"keyword.operator.assignment.java"},{"match":"(--|\\\\+\\\\+)","name":"keyword.operator.increment-decrement.java"},{"match":"([-%*+/])","name":"keyword.operator.arithmetic.java"},{"match":"(!|&&|\\\\|\\\\|)","name":"keyword.operator.logical.java"},{"match":"([\\\\&|])","name":"keyword.operator.bitwise.java"},{"match":"\\\\b(const|goto)\\\\b","name":"keyword.reserved.java"}]},"lambda-expression":{"patterns":[{"match":"->","name":"storage.type.function.arrow.java"}]},"member-variables":{"begin":"(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)","end":"(?=[;=])","patterns":[{"include":"#storage-modifiers"},{"include":"#variables"},{"include":"#primitive-arrays"},{"include":"#object-types"}]},"method-call":{"begin":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"entity.name.function.java"},"3":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method-call.java","patterns":[{"include":"#code"}]},"methods":{"begin":"(?!new)(?=[<\\\\w].*\\\\s+)(?=([^/=]|/(?!/))+\\\\()","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.java"},"2":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.method.identifier.java","patterns":[{"include":"#parameters"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#generics"},{"begin":"(?=\\\\w.*\\\\s+\\\\w+\\\\s*\\\\()","end":"(?=\\\\s+\\\\w+\\\\s*\\\\()","name":"meta.method.return-type.java","patterns":[{"include":"#all-types"},{"include":"#parens"},{"include":"#comments"}]},{"include":"#throws"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]},{"include":"#comments"}]},"module":{"begin":"((open)\\\\s)?(module)\\\\s+(\\\\w+)","beginCaptures":{"1":{"name":"storage.modifier.java"},"3":{"name":"storage.modifier.java"},"4":{"name":"entity.name.type.module.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.module.end.bracket.curly.java"}},"name":"meta.module.java","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.module.begin.bracket.curly.java"}},"contentName":"meta.module.body.java","end":"(?=})","patterns":[{"include":"#comments"},{"include":"#comments-javadoc"},{"match":"\\\\b(requires|transitive|exports|opens|to|uses|provides|with)\\\\b","name":"keyword.module.java"}]}]},"numbers":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])((?<!\\\\.)\\\\h([_\\\\h]*\\\\h)?[Ll]?(?!\\\\.)|(\\\\h([_\\\\h]*\\\\h)?\\\\.?|(\\\\h([_\\\\h]*\\\\h)?)?\\\\.\\\\h([_\\\\h]*\\\\h)?)[Pp][-+]?[0-9]([0-9_]*[0-9])?[DFdf]?)\\\\b(?!\\\\$)","name":"constant.numeric.hex.java"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]([01_]*[01])?[Ll]?\\\\b(?!\\\\$)","name":"constant.numeric.binary.java"},{"match":"\\\\b(?<!\\\\$)0[0-7]([0-7_]*[0-7])?[Ll]?\\\\b(?!\\\\$)","name":"constant.numeric.octal.java"},{"match":"(?<!\\\\$)(\\\\b[0-9]([0-9_]*[0-9])?\\\\.\\\\B(?!\\\\.)|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([Ee][-+]?[0-9]([0-9_]*[0-9])?)[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]\\\\b|\\\\b[0-9]([0-9_]*[0-9])?\\\\.([0-9]([0-9_]*[0-9])?)([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]?\\\\b|(?<!\\\\.)\\\\B\\\\.[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)[DFdf]?\\\\b|\\\\b[0-9]([0-9_]*[0-9])?([Ee][-+]?[0-9]([0-9_]*[0-9])?)?[DFdf]\\\\b|\\\\b(0|[1-9]([0-9_]*[0-9])?)(?!\\\\.)[Ll]?\\\\b)(?!\\\\$)","name":"constant.numeric.decimal.java"}]},"object-types":{"patterns":[{"include":"#generics"},{"begin":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*)([A-Z_]\\\\w*)\\\\s*(?=\\\\[)","beginCaptures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]},"2":{"name":"storage.type.object.array.java"}},"end":"(?!\\\\s*\\\\[)","patterns":[{"include":"#comments"},{"include":"#parens"}]},{"captures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]}},"match":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*[A-Z_]\\\\w*)\\\\s*(?=<)"},{"captures":{"1":{"patterns":[{"match":"[A-Z_a-z]\\\\w*","name":"storage.type.java"},{"match":"\\\\.","name":"punctuation.separator.period.java"}]}},"match":"\\\\b((?:[A-Z_a-z]\\\\w*\\\\s*\\\\.\\\\s*)*[A-Z_]\\\\w*)\\\\b((?=\\\\s*[\\\\n$A-Z_a-z])|(?=\\\\s*\\\\.\\\\.\\\\.))"}]},"object-types-inherited":{"patterns":[{"include":"#generics"},{"captures":{"1":{"name":"punctuation.separator.period.java"}},"match":"\\\\b(?:[A-Z]\\\\w*\\\\s*(\\\\.)\\\\s*)*[A-Z]\\\\w*\\\\b","name":"entity.other.inherited-class.java"},{"match":",","name":"punctuation.separator.delimiter.java"}]},"objects":{"match":"(?<![$\\\\w])[$A-Z_a-z][$\\\\w]*(?=\\\\s*\\\\.\\\\s*[$\\\\w]+)","name":"variable.other.object.java"},"parameters":{"patterns":[{"match":"\\\\bfinal\\\\b","name":"storage.modifier.java"},{"include":"#annotations"},{"include":"#all-types"},{"include":"#strings"},{"match":"\\\\w+","name":"variable.parameter.java"},{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"\\\\.\\\\.\\\\.","name":"punctuation.definition.parameters.varargs.java"}]},"parens":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.bracket.round.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.bracket.square.java"}},"end":"]","endCaptures":{"0":{"name":"punctuation.bracket.square.java"}},"patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.bracket.curly.java"}},"patterns":[{"include":"#code"}]}]},"primitive-arrays":{"patterns":[{"begin":"\\\\b(void|boolean|byte|char|short|int|float|long|double)\\\\b\\\\s*(?=\\\\[)","beginCaptures":{"1":{"name":"storage.type.primitive.array.java"}},"end":"(?!\\\\s*\\\\[)","patterns":[{"include":"#comments"},{"include":"#parens"}]}]},"primitive-types":{"match":"\\\\b(void|boolean|byte|char|short|int|float|long|double)\\\\b","name":"storage.type.primitive.java"},"properties":{"patterns":[{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"keyword.control.new.java"}},"match":"(\\\\.)\\\\s*(new)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"variable.other.object.property.java"}},"match":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)(?=\\\\s*\\\\.\\\\s*[$A-Z_a-z][$\\\\w]*)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"variable.other.object.property.java"}},"match":"(\\\\.)\\\\s*([$A-Z_a-z][$\\\\w]*)"},{"captures":{"1":{"name":"punctuation.separator.period.java"},"2":{"name":"invalid.illegal.identifier.java"}},"match":"(\\\\.)\\\\s*([0-9][$\\\\w]*)"}]},"record":{"begin":"(?=\\\\w?[\\\\w\\\\s]*\\\\brecord\\\\s+[$\\\\w]+)","end":"}","endCaptures":{"0":{"name":"punctuation.section.class.end.bracket.curly.java"}},"name":"meta.record.java","patterns":[{"include":"#storage-modifiers"},{"include":"#generics"},{"include":"#comments"},{"begin":"(record)\\\\s+([$\\\\w]+)(<[$\\\\w]+>)?(\\\\()","beginCaptures":{"1":{"name":"storage.modifier.java"},"2":{"name":"entity.name.type.record.java"},"3":{"patterns":[{"include":"#generics"}]},"4":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"name":"meta.record.identifier.java","patterns":[{"include":"#code"}]},{"begin":"(implements)\\\\s","beginCaptures":{"1":{"name":"storage.modifier.implements.java"}},"end":"(?=\\\\s*\\\\{)","name":"meta.definition.class.implemented.interfaces.java","patterns":[{"include":"#object-types-inherited"},{"include":"#comments"}]},{"include":"#record-body"}]},"record-body":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.class.begin.bracket.curly.java"}},"end":"(?=})","name":"meta.record.body.java","patterns":[{"include":"#record-constructor"},{"include":"#class-body"}]},"record-constructor":{"begin":"(?!new)(?=[<\\\\w].*\\\\s+)(?=([^(/=]|/(?!/))+(?=\\\\{))","end":"(})|(?=;)","endCaptures":{"1":{"name":"punctuation.section.method.end.bracket.curly.java"}},"name":"meta.method.java","patterns":[{"include":"#storage-modifiers"},{"begin":"(\\\\w+)","beginCaptures":{"1":{"name":"entity.name.function.java"}},"end":"(?=\\\\s*\\\\{)","name":"meta.method.identifier.java","patterns":[{"include":"#comments"}]},{"include":"#comments"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.method.begin.bracket.curly.java"}},"contentName":"meta.method.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},"static-initializer":{"patterns":[{"include":"#anonymous-block-and-instance-initializer"},{"match":"static","name":"storage.modifier.java"}]},"storage-modifiers":{"match":"\\\\b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|volatile|default|strictfp|sealed|non-sealed)\\\\b","name":"storage.modifier.java"},"strings":{"patterns":[{"begin":"\\"\\"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"\\"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.triple.java","patterns":[{"match":"(\\\\\\\\\\"\\"\\")(?!\\")|(\\\\\\\\.)","name":"constant.character.escape.java"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.double.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.java"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.java"}},"name":"string.quoted.single.java","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.java"}]}]},"throws":{"begin":"throws","beginCaptures":{"0":{"name":"storage.modifier.java"}},"end":"(?=[;{])","name":"meta.throwables.java","patterns":[{"match":",","name":"punctuation.separator.delimiter.java"},{"match":"[$A-Z_a-z][$.0-9A-Z_a-z]*","name":"storage.type.java"},{"include":"#comments"}]},"try-catch-finally":{"patterns":[{"begin":"\\\\btry\\\\b","beginCaptures":{"0":{"name":"keyword.control.try.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.try.end.bracket.curly.java"}},"name":"meta.try.java","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.try.resources.begin.bracket.round.java"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.try.resources.end.bracket.round.java"}},"name":"meta.try.resources.java","patterns":[{"include":"#code"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.try.begin.bracket.curly.java"}},"contentName":"meta.try.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\b(catch)\\\\b","beginCaptures":{"1":{"name":"keyword.control.catch.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.catch.end.bracket.curly.java"}},"name":"meta.catch.java","patterns":[{"include":"#comments"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.bracket.round.java"}},"contentName":"meta.catch.parameters.java","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.bracket.round.java"}},"patterns":[{"include":"#comments"},{"include":"#storage-modifiers"},{"begin":"[$A-Z_a-z][$.0-9A-Z_a-z]*","beginCaptures":{"0":{"name":"storage.type.java"}},"end":"(\\\\|)|(?=\\\\))","endCaptures":{"1":{"name":"punctuation.catch.separator.java"}},"patterns":[{"include":"#comments"},{"captures":{"0":{"name":"variable.parameter.java"}},"match":"\\\\w+"}]}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.catch.begin.bracket.curly.java"}},"contentName":"meta.catch.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]},{"begin":"\\\\bfinally\\\\b","beginCaptures":{"0":{"name":"keyword.control.finally.java"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.finally.end.bracket.curly.java"}},"name":"meta.finally.java","patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.finally.begin.bracket.curly.java"}},"contentName":"meta.finally.body.java","end":"(?=})","patterns":[{"include":"#code"}]}]}]},"variables":{"begin":"(?=\\\\b((void|boolean|byte|char|short|int|float|long|double)|(?>(\\\\w+\\\\.)*[A-Z_]+\\\\w*))\\\\b\\\\s*(<[],.<>?\\\\[\\\\w\\\\s]*>)?\\\\s*((\\\\[])*)?\\\\s+[$A-Z_a-z][$\\\\w]*([]$,\\\\[\\\\w][],\\\\[\\\\w\\\\s]*)?\\\\s*([:;=]))","end":"(?=[:;=])","name":"meta.definition.variable.java","patterns":[{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([$A-Z_a-z][$\\\\w]*)(?=\\\\s*(\\\\[])*\\\\s*([,:;=]))"},{"include":"#all-types"},{"include":"#code"}]},"variables-local":{"begin":"(?=\\\\b(var)\\\\b\\\\s+[$A-Z_a-z][$\\\\w]*\\\\s*([:;=]))","end":"(?=[:;=])","name":"meta.definition.variable.local.java","patterns":[{"match":"\\\\bvar\\\\b","name":"storage.type.local.java"},{"captures":{"1":{"name":"variable.other.definition.java"}},"match":"([$A-Z_a-z][$\\\\w]*)(?=\\\\s*(\\\\[])*\\\\s*([:;=]))"},{"include":"#code"}]}},"scopeName":"source.java"}`))];export{t as n,n as t};
|