vde-open 0.1.17 → 0.1.18

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.
@@ -0,0 +1,13 @@
1
+ (function(){function e(e){return e.replace(/^\uFEFF/,``).replace(/\r\n?/g,`
2
+ `)}function t(e){return/^\s*$/.test(e)}function n(e,t){let n=0;for(;n<e.length&&n<t&&e[n]===` `;)n++;return e.slice(n)}function r(e){let t=``;for(let n of e)n.type===`text`||n.type===`inlineCode`?t+=n.value:`children`in n?t+=r(n.children):n.type===`image`&&(t+=n.alt);return t}function i(e=a){let t=/* @__PURE__ */ new Map;return n=>{let r=e(n),i=t.get(r)??1,a=r;for(;t.has(a);)a=`${r}-${++i}`;return t.set(r,i),t.set(a,1),a}}function a(e){return e.toLowerCase().normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).replace(/&[a-z0-9#]+;/gi,``).replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`section`}function o(e){let t=e.replace(/[\u0000-\u001F\u007F\s]+/g,``);return/^(?!https?:|mailto:|tel:)[a-z][a-z0-9+.-]*:/i.test(t)?``:t}function s(e){let t=e.match(/^(?:<([^<>\n]*)>|([^<>\s]*?))(?:\s+(?:"([^"]*)"|'([^']*)'|\(([^)]*)\)))?$/);if(!t)return;let n=t[1]??t[2],r=t[3]??t[4]??t[5];return{href:n.replace(/\\([!-/:-@\[-`{-~])/g,`$1`),...r?{title:r}:{}}}function c(e){return e.trim().replace(/\s+/g,` `).toLowerCase()}function l(e){return c(e).replace(/[^a-z0-9_-]+/g,`-`).replace(/^-+|-+$/g,``)||`footnote`}function u(e,t={}){let n=t.extensions?.flatMap(e=>e.inlineParser?[e.inlineParser]:[])??[],r=n.length?RegExp(p.source+`|[`+n.map(e=>e.markers).join(``).replace(/[\\\]\[\-^]/g,`\\$&`)+`]`,`g`):p,i=m(e,t,{scans:Math.max(e.length*f,1024),depth:0,links:0,parsers:n,marker:r});for(let e of t.extensions??[])i=e.transformInline?.(i,{options:t})??i;return i}function d(e){return e.type===`link`||`children`in e&&e.children.some(d)}let f=16,p=/[\\`!\[_*~<]/g;function m(e,t,n,i=!1){if(n.depth>=32)return e?[{type:`text`,value:e}]:[];n.depth++;let a=t.extensions?n.parsers:[],s=a.length?n.marker:p,c=[],l=0,u=``,f=()=>{u&&=(c.push({type:`text`,value:u}),``)};scan:for(;l<e.length;){let p=e[l],v=e[l+1];if(p===`\\`){if(v===`
3
+ `){f(),c.push({type:`break`}),l+=2;continue}if(v&&/[!-/:-@\[-`{-~]/.test(v)){u+=v,l+=2;continue}}if(p==="`"){let t=y(e,l,"`"),r=b(e,l+t,"`",t,n);if(r!==-1){f(),c.push({type:`inlineCode`,value:e.slice(l+t,r).replace(/\n/g,` `).replace(/^ (?! *$)(.*) $/s,`$1`)}),l=r+t;continue}u+=e.slice(l,l+t),l+=t;continue}for(let r of a){if(!r.markers.includes(p)||n.scans--<=0)continue;let a=r.parse({source:e,index:l,options:t,inLink:i,parseInline:e=>m(e,t,n,i)});if(a){if(!Number.isInteger(a.length)||a.length<=0||a.length>e.length-l)throw RangeError(`Inline parser must consume a positive length within the source`);f(),c.push(a.node),d(a.node)&&n.links++,l+=a.length;continue scan}}if(p===`[`||p===`!`&&v===`[`){let i=p===`!`,a=v===`^`&&h(e,l,t,n);if(a){f(),c.push(a.node),n.links++,l=a.end;continue}let s=g(e,l+Number(i),t,n);if(s){let e=n.links,a=m(s.label,i?t.references?{references:t.references}:{}:t,n,!i),d=!i&&n.links!==e,p=o(s.href),h=t.urlTransform?t.urlTransform(s.href,i?`image`:`link`,p):p;if(h!==null&&(i||!d&&(h||!s.href)))f(),c.push({...i?{type:`image`,src:h,alt:r(a)}:{type:`link`,href:h,children:a},...s.title?{title:s.title}:{}});else{d&&(u+=`[`);for(let e of a)e.type===`text`?u+=e.value:(f(),c.push(e))}n.links=i?e:n.links+1,l=d?l+s.label.length+1:s.end;continue}}if(p===`*`&&v===`*`&&e[l+2]===`*`){let r=x(e,l+3,`***`,n);if(r!==-1){f(),c.push({type:`emphasis`,children:m(e.slice(l+1,r+2),t,n,i)}),l=r+3;continue}}if(p===`~`&&v===`~`&&e[l+2]===`~`){let t=y(e,l,`~`);u+=e.slice(l,l+t),l+=t;continue}if(p===`*`||p===`_`||p===`~`){let r=v===p?2:1,a=p===`_`&&!C(e,l,r,!0)?-1:x(e,l+r,p.repeat(r),n);a===-1?(u+=p.repeat(r),l+=r):(f(),c.push({type:p===`~`?`strike`:r===2?`strong`:`emphasis`,children:m(e.slice(l+r,a),t,n,i)}),l=a+r);continue}if(p===`<`&&t.allowHtml){let t=S(e,l+1,`>`,n);if(t!==-1&&_(e.slice(l,t+1))){f(),c.push({type:`inlineHtml`,value:e.slice(l,t+1)}),l=t+1;continue}}s.lastIndex=l+1;let w=n.scans>0?s.exec(e)?.index??e.length:e.indexOf(`\\`,l+1);u+=e.slice(l,w<0?e.length:w),l=w<0?e.length:w}return f(),n.depth--,c}function h(e,t,n,r){let i=S(e,t+2,`]`,r);if(i===-1)return;let a=c(e.slice(t+2,i)),o=n.footnotes?.[a];if(!o||!n.footnoteOrder)return;let s=n.footnoteOrder.indexOf(a)+1;s||=n.footnoteOrder.push(a);let u=(n.footnoteCounts?.[a]??0)+1;return n.footnoteCounts&&(n.footnoteCounts[a]=u),{node:{type:`footnoteReference`,id:o.id??l(o.label),number:s,...u>1?{referenceIndex:u}:{}},end:i+1}}function g(e,t,n,r){let i=v(e,t,`[`,`]`,r);if(i===-1)return;let a=e.slice(t+1,i),o=i+1,l;if(e[o]===`(`){let t=v(e,o,`(`,`)`,r);if(t===-1)return;l=s(e.slice(o+1,t).trim()),o=t+1}else if(e[o]===`[`){let t=v(e,o,`[`,`]`,r);if(t===-1)return;l=n.references?.[c(e.slice(o+1,t)||a)],o=t+1}else l=n.references?.[c(a)];if(l)return{...l,label:a,end:o}}function _(e){return/^<(?:!--(?:[\s\S]*--|-?)|\?[\s\S]*\?|![A-Z][\s\S]*|!\[CDATA\[[\s\S]*\]\]|\/[A-Za-z][\w:-]*\s*|[A-Za-z][\w:-]*(?:\s+[A-Za-z_:][\w:.-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?)>$/.test(e)}function v(e,t,n,r,i){if(S(e,t+1,r,i)===-1)return-1;let a=0;for(let o=t;o<e.length;o++){if(--i.scans<0)return-1;if(e[o]===`\\`)o++;else if(e[o]===n&&a++,e[o]===r&&(a--,a===0))return o}return-1}function y(e,t,n,r){let i=0;for(;e[t+i]===n&&!(r&&--r.scans<0);)i++;return i}function b(e,t,n,r,i){let a=t;for(;(a=S(e,a,n,i))!==-1;){let t=y(e,a,n,i);if(t===r)return a;a+=t}return-1}function x(e,t,n,r){if(n===`~`&&/[\s\d]/.test(e[t]??``))return-1;for(let i=t;i<e.length;i++){if(--r.scans<0)return-1;if(e[i]===`\\`)i++;else if(e.startsWith(n,i)){if(n[0]===`~`){if(e[i-1]===`~`||e[i+n.length]===`~`)continue;if(n===`~`&&/\s/.test(e[i-1]??``))return-1}else if(e[i+1]===n){let t=y(e,i,n,r),a=x(e,i+t,n.repeat(t),r);if(a>i+t){i=a+t-1;continue}}if(n[0]!==`_`||C(e,i,n.length,!1))return i}}return-1}function S(e,t,n,r){if(r.scans<=0)return-1;let i=e.indexOf(n,t);return r.scans-=(i<0?e.length:i+1)-t,r.scans<0?-1:i}function C(e,t,n,r){let i=e[r?t+n:t-1],a=e[r?t-1:t+n];return i!==void 0&&!/\s/.test(i)&&(a===void 0||/[^\p{L}\p{N}]/u.test(a))}function w(t,n={}){let r=e(t),a=n.frontmatter!==!1,o=r.split(`
4
+ `),s;if(a&&o[0]===`---`){let e=o.findIndex((e,t)=>t>0&&e===`---`);e>0&&(s=o.slice(1,e).join(`
5
+ `),o=o.slice(e+1))}let c=E(o);o=c.lines;let l=[],u=Object.create(null),d=Object.keys(c.references).length>0,f=Object.keys(c.footnotes).length>0,p=d||f?{...n,...d&&{references:c.references},...f&&{footnotes:c.footnotes,footnoteOrder:l,footnoteCounts:u}}:n,m=i(),h=T(o,p,m).parse();f&&l.length>0&&h.push(te(c.footnotes,l,p,m));let g=s===void 0?{type:`root`,children:h}:{type:`root`,frontmatter:s,children:h};for(let e of p.extensions??[])g=e.transformDocument?.(g,{options:p})??g;return g}function T(i,a,o,s={depth:0}){let c=0,l=!1;return{parse:d,get loose(){return l}};function d(){if(s.depth>=64){let e=i.slice(c).join(`
6
+ `);return c=i.length,e?[{type:`paragraph`,children:u(e,a)}]:[]}s.depth++;let e=[];for(;c<i.length;){if(t(S())){e.length&&(l=!0),c++;continue}let n=f();if(n){e.push(n);continue}let r=(/^[a-z]/i.test(S())?void 0:p()??m()??h()??g()??_())??v()??y()??b();e.push(r)}return s.depth--,e}function f(){for(let t of a.extensions??[]){let n=0,r=t.parseBlock?.({lines:i,index:c,options:a,parseInline:e=>u(e,a),parseBlocks:t=>T(e(t).split(`
7
+ `),a,o,s).parse(),consume:e=>{n=e}});if(r)return c+=Math.max(n,1),r}}function p(){let e=S().match(/^( {0,3})(`{3,}|~{3,})(.*)$/);if(!e)return;let t=e[2],r=e[3].trim(),a=[];for(c++;c<i.length;){let r=S();if(r.includes(t)&&/^ {0,3}(?:`+|~+)\s*$/.test(r)){c++;break}a.push(n(r,e[1].length)),c++}return{type:`code`,value:a.join(`
8
+ `),...ee(r)}}function m(){let e=S().match(/^ {0,3}(#{1,6})(?:[ \t]+(.*)|[ \t]*)$/);if(!e)return;let t=e[1].length,n=e[2]??``,r=u((/^#+[ \t]*$/.test(n)?``:n.replace(/[ \t]+#+[ \t]*$/,``)).trim(),a),i=x(r);return c++,i?{type:`heading`,depth:t,id:i,children:r}:{type:`heading`,depth:t,children:r}}function h(){if(/^ {0,3}([-*_])(?:\s*\1){2,}\s*$/.test(S()))return c++,{type:`thematicBreak`}}function g(){if(!/^ {0,3}>\s?/.test(S()))return;let e=[];for(;c<i.length;){let n=S(),r=n.match(/^ {0,3}>\s?(.*)$/s);if(!r){if(!t(n))break;l=!0}e.push(r?.[1]??``),c++}return{type:`blockquote`,children:T(e,a,o,s).parse()}}function _(){let e=D(S());if(!e)return;let r=[],l=e.ordered,u=e.indent,d=!1;for(;c<i.length;){let l=D(S());if(!l||l.marker!==e.marker||l.indent!==u)break;let f=l.content,p=f.match(/^\[([ xX])\]\s+(.*)$/),m=p?p[1].toLowerCase()===`x`:void 0;p&&(f=p[2]);let h=[f];for(c++;c<i.length;){let r=S(),a=D(r);if(a&&a.indent===u)break;if(t(r)){let r=c;for(;r<i.length&&t(i[r]);)r++;let a=i[r];if(a===void 0)break;let o=D(a);if(o?.indent===u){if(o.marker!==e.marker)break;d=!0,c=r;break}if(O(a)<l.contentIndent)break;for(;c<r;)h.push(n(i[c++],l.contentIndent))}else if(O(r)>=l.contentIndent)h.push(n(r,l.contentIndent)),c++;else{if(k(r,C()))break;h.push(r.trimStart()),c++}}let g=T(h,a,o,s),_=g.parse();d||=g.loose;let v={type:`listItem`,children:_};m!==void 0&&(v.checked=m),r.push(v)}return{type:`list`,ordered:l,...l&&{start:e.number},...d&&{loose:!0},items:r}}function v(){let e=S(),n=C();if(!n||!A(e,n))return;let r=j(e),o=j(n).map(re),s=r.length,l=[];for(c+=2;c<i.length;){let e=S();if(t(e)||k(e,C()))break;let n=j(e);l.push(Array.from({length:s},(e,t)=>M(n[t]??``,a))),c++}return{type:`table`,align:o,header:r.map(e=>M(e,a)),rows:l}}function y(){if(!a.allowHtml||!/^ {0,3}<([A-Za-z][\w:-]*|!--|\/[A-Za-z])/.test(S()))return;let e=[];if(/^ {0,3}<!--/.test(S())){for(;c<i.length;){let t=S();if(e.push(t),c++,t.includes(`-->`))break}return{type:`html`,value:e.join(`
9
+ `)}}for(;c<i.length&&!t(S());)e.push(S()),c++;return{type:`html`,value:e.join(`
10
+ `)}}function b(){let e=[];for(;c<i.length;){let n=S();if(t(n)||e.length>0&&k(n,C()))break;e.push(n.trim()),c++}return{type:`paragraph`,children:u(e.join(`
11
+ `),a)}}function x(e){if(a.headingIds===!1)return;let t=r(e);return typeof a.headingIds==`function`?a.headingIds(t,c):o(t)}function S(){return i[c]??``}function C(){return i[c+1]}}function ee(e){let t=e.match(/^([A-Za-z0-9_+.#-]+)/)?.[1],n=t?e.slice(t.length).trim():e,r=n.match(/(?:^|\s)(?:title|file)=(?:"([^"]+)"|'([^']+)'|([^\s}]+))/)?.slice(1).find(Boolean),i=n.match(/(?:^|\s)framework=(?:"([^"]+)"|'([^']+)'|([^\s}]+))/)?.slice(1).find(Boolean),a=n.match(/\{([^}]+)\}|(?:^|\s)lines=([^\s]+)/),o=a?ne(a[1]??a[2]):[];return{...t&&{lang:t},...n&&{meta:n},...r&&{title:r,file:r},...i&&{framework:i.toLowerCase()},...o.length&&{highlightLines:o}}}function E(e){let n=Object.create(null),r=Object.create(null),a=i(l),o=[],u=``,d=0;for(;d<e.length;){let i=e[d],l=(!u||i.includes(u))&&i.match(/^ {0,3}(`{3,}|~{3,})(.*)$/);if(l)u?l[1].startsWith(u)&&t(l[2])&&(u=``):u=l[1];else if(!u){let t=i.match(/^ {0,3}\[\^([^\]\n]+)\]:[ \t]*(.*)$/);if(t){let n=t[1],i=[t[2]??``];for(d++;d<e.length;){let t=e[d];if(!/^(?: {4,}|\t)/.test(t))break;i.push(t.replace(/^(?: {4}|\t)/,``)),d++}let o=c(n);r[o]||(r[o]={label:n,content:i.join(`
12
+ `),id:a(n)});continue}let o=i.match(/^ {0,3}\[([^\]\n]+)\]:[ \t]*(\S.*)$/),l=o&&s(o[2].trimEnd());if(l){n[c(o[1])]??=l,d++;continue}}o.push(i),d++}return{lines:o,references:n,footnotes:r}}function te(t,n,r,i){let a=[];for(let o=0;o<n.length;o++){let s=t[n[o]];s&&a.push({id:s.id??l(s.label),number:o+1,children:T(e(s.content).split(`
13
+ `),r,i).parse()})}for(let e of a){let t=r.footnoteCounts?.[n[e.number-1]]??1;t>1&&(e.referenceCount=t)}return{type:`footnotes`,items:a}}function ne(e){let t=/* @__PURE__ */ new Set;for(let n of e.split(`,`)){let e=n.trim().match(/^(\d+)(?:-(\d+))?$/);if(!e)continue;let r=Number(e[1]),i=Number(e[2]??e[1]);if(!(i>2**53-1))for(let e=r;e<=i&&e<r+1e3;e++)t.add(e)}return[...t].sort((e,t)=>e-t)}function D(e){let t=e.match(/^(\s{0,8})([-+*]|\d{1,9}[.)])(?:([ \t]+)(.*))?$/);if(!t)return;let n=t[2],r=/\d/.test(n[0]);return{ordered:r,...r&&{number:Number.parseInt(n,10)},indent:t[1].length,marker:r?n.at(-1):n,contentIndent:t[1].length+n.length+(t[3]?.length??1),content:t[4]??``}}function O(e){return e.match(/^ */)?.[0].length??0}function k(e,t){let n=D(e);return/^ {0,3}(?:`{3,}|~{3,}|#{1,6}(?:\s|$)|([-*_])(?:\s*\1){2,}\s*$|>)/.test(e)||n!==void 0&&(!n.ordered||n.number===1)||!!t&&A(e,t)}function A(e,t){if(!e.includes(`|`))return!1;let n=j(t);return n.length===j(e).length&&n.every(e=>/^:?-+:?$/.test(e.trim()))}function j(e){let t=e.trim(),n=[],r=``;for(let e=+!!t.startsWith(`|`);e<t.length;e++){let i=t[e];i===`\\`&&t[e+1]===`|`?(r+=`|`,e++):i===`|`?(n.push(r.trim()),r=``):r+=i}return!r&&t.endsWith(`|`)&&n.length||n.push(r.trim()),n}function re(e){let t=e.trim();if(t.startsWith(`:`)&&t.endsWith(`:`))return`center`;if(t.endsWith(`:`))return`right`;if(t.startsWith(`:`))return`left`}function M(e,t){return{type:`tableCell`,children:u(e,t)}}var N;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(N||={});var P;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(P||={});var ie;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(ie||={});var F;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(F||={});var ae;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(ae||={});var oe;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(oe||={});var I;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(I||={});var L;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(L||={}),I.A,L.A,I.ADDRESS,L.ADDRESS,I.ANNOTATION_XML,L.ANNOTATION_XML,I.APPLET,L.APPLET,I.AREA,L.AREA,I.ARTICLE,L.ARTICLE,I.ASIDE,L.ASIDE,I.B,L.B,I.BASE,L.BASE,I.BASEFONT,L.BASEFONT,I.BGSOUND,L.BGSOUND,I.BIG,L.BIG,I.BLOCKQUOTE,L.BLOCKQUOTE,I.BODY,L.BODY,I.BR,L.BR,I.BUTTON,L.BUTTON,I.CAPTION,L.CAPTION,I.CENTER,L.CENTER,I.CODE,L.CODE,I.COL,L.COL,I.COLGROUP,L.COLGROUP,I.DD,L.DD,I.DESC,L.DESC,I.DETAILS,L.DETAILS,I.DIALOG,L.DIALOG,I.DIR,L.DIR,I.DIV,L.DIV,I.DL,L.DL,I.DT,L.DT,I.EM,L.EM,I.EMBED,L.EMBED,I.FIELDSET,L.FIELDSET,I.FIGCAPTION,L.FIGCAPTION,I.FIGURE,L.FIGURE,I.FONT,L.FONT,I.FOOTER,L.FOOTER,I.FOREIGN_OBJECT,L.FOREIGN_OBJECT,I.FORM,L.FORM,I.FRAME,L.FRAME,I.FRAMESET,L.FRAMESET,I.H1,L.H1,I.H2,L.H2,I.H3,L.H3,I.H4,L.H4,I.H5,L.H5,I.H6,L.H6,I.HEAD,L.HEAD,I.HEADER,L.HEADER,I.HGROUP,L.HGROUP,I.HR,L.HR,I.HTML,L.HTML,I.I,L.I,I.IMG,L.IMG,I.IMAGE,L.IMAGE,I.INPUT,L.INPUT,I.IFRAME,L.IFRAME,I.KEYGEN,L.KEYGEN,I.LABEL,L.LABEL,I.LI,L.LI,I.LINK,L.LINK,I.LISTING,L.LISTING,I.MAIN,L.MAIN,I.MALIGNMARK,L.MALIGNMARK,I.MARQUEE,L.MARQUEE,I.MATH,L.MATH,I.MENU,L.MENU,I.META,L.META,I.MGLYPH,L.MGLYPH,I.MI,L.MI,I.MO,L.MO,I.MN,L.MN,I.MS,L.MS,I.MTEXT,L.MTEXT,I.NAV,L.NAV,I.NOBR,L.NOBR,I.NOFRAMES,L.NOFRAMES,I.NOEMBED,L.NOEMBED,I.NOSCRIPT,L.NOSCRIPT,I.OBJECT,L.OBJECT,I.OL,L.OL,I.OPTGROUP,L.OPTGROUP,I.OPTION,L.OPTION,I.P,L.P,I.PARAM,L.PARAM,I.PLAINTEXT,L.PLAINTEXT,I.PRE,L.PRE,I.RB,L.RB,I.RP,L.RP,I.RT,L.RT,I.RTC,L.RTC,I.RUBY,L.RUBY,I.S,L.S,I.SCRIPT,L.SCRIPT,I.SEARCH,L.SEARCH,I.SECTION,L.SECTION,I.SELECT,L.SELECT,I.SOURCE,L.SOURCE,I.SMALL,L.SMALL,I.SPAN,L.SPAN,I.STRIKE,L.STRIKE,I.STRONG,L.STRONG,I.STYLE,L.STYLE,I.SUB,L.SUB,I.SUMMARY,L.SUMMARY,I.SUP,L.SUP,I.TABLE,L.TABLE,I.TBODY,L.TBODY,I.TEMPLATE,L.TEMPLATE,I.TEXTAREA,L.TEXTAREA,I.TFOOT,L.TFOOT,I.TD,L.TD,I.TH,L.TH,I.THEAD,L.THEAD,I.TITLE,L.TITLE,I.TR,L.TR,I.TRACK,L.TRACK,I.TT,L.TT,I.U,L.U,I.UL,L.UL,I.SVG,L.SVG,I.VAR,L.VAR,I.WBR,L.WBR,I.XMP,L.XMP;let R=L,z={[F.HTML]:/* @__PURE__ */ new Set([R.ADDRESS,R.APPLET,R.AREA,R.ARTICLE,R.ASIDE,R.BASE,R.BASEFONT,R.BGSOUND,R.BLOCKQUOTE,R.BODY,R.BR,R.BUTTON,R.CAPTION,R.CENTER,R.COL,R.COLGROUP,R.DD,R.DETAILS,R.DIR,R.DIV,R.DL,R.DT,R.EMBED,R.FIELDSET,R.FIGCAPTION,R.FIGURE,R.FOOTER,R.FORM,R.FRAME,R.FRAMESET,R.H1,R.H2,R.H3,R.H4,R.H5,R.H6,R.HEAD,R.HEADER,R.HGROUP,R.HR,R.HTML,R.IFRAME,R.IMG,R.INPUT,R.LI,R.LINK,R.LISTING,R.MAIN,R.MARQUEE,R.MENU,R.META,R.NAV,R.NOEMBED,R.NOFRAMES,R.NOSCRIPT,R.OBJECT,R.OL,R.P,R.PARAM,R.PLAINTEXT,R.PRE,R.SCRIPT,R.SECTION,R.SELECT,R.SOURCE,R.STYLE,R.SUMMARY,R.TABLE,R.TBODY,R.TD,R.TEMPLATE,R.TEXTAREA,R.TFOOT,R.TH,R.THEAD,R.TITLE,R.TR,R.TRACK,R.UL,R.WBR,R.XMP]),[F.MATHML]:/* @__PURE__ */ new Set([R.MI,R.MO,R.MN,R.MS,R.MTEXT,R.ANNOTATION_XML]),[F.SVG]:/* @__PURE__ */ new Set([R.TITLE,R.FOREIGN_OBJECT,R.DESC]),[F.XLINK]:/* @__PURE__ */ new Set,[F.XML]:/* @__PURE__ */ new Set,[F.XMLNS]:/* @__PURE__ */ new Set};R.H1,R.H2,R.H3,R.H4,R.H5,R.H6,I.STYLE,I.SCRIPT,I.XMP,I.IFRAME,I.NOEMBED,I.NOFRAMES,I.PLAINTEXT;var B;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(B||={}),B.DATA,B.RCDATA,B.RAWTEXT,B.SCRIPT_DATA,B.PLAINTEXT,B.CDATA_SECTION,[.../* @__PURE__ */ new Set([L.DD,L.DT,L.LI,L.OPTGROUP,L.OPTION,L.P,L.RB,L.RP,L.RT,L.RTC]),L.CAPTION,L.COLGROUP,L.TBODY,L.TD,L.TFOOT,L.TH,L.THEAD,L.TR],L.H1,L.H2,L.H3,L.H4,L.H5,L.H6;let V=[L.TBODY,L.TFOOT,L.THEAD];L.TR,L.TEMPLATE,L.HTML,[...V,L.TEMPLATE,L.HTML],L.TABLE,L.TEMPLATE,L.HTML,L.TD,L.TH;let H=/* @__PURE__ */ new Uint8Array(768);for(let[e,t]of[[F.HTML,0],[F.SVG,256],[F.MATHML,512]])for(let n of z[e])H[t+n]=e===F.HTML&&(n===L.ADDRESS||n===L.DIV||n===L.P)?1:3;for(let e of[L.APPLET,L.CAPTION,L.HTML,L.MARQUEE,L.OBJECT,L.TABLE,L.TD,L.TEMPLATE,L.TH,256+L.DESC,256+L.FOREIGN_OBJECT,256+L.TITLE,512+L.ANNOTATION_XML,512+L.MI,512+L.MN,512+L.MO,512+L.MS,512+L.MTEXT])H[e]|=28;H[L.OL]|=8,H[L.UL]|=8,H[L.BUTTON]|=16,H[L.TABLE]|=32,H[L.HTML]|=32;let U=/* @__PURE__ */ new Uint8Array(768);for(let e of[L.A,L.B,L.BIG,L.CODE,L.EM,L.FONT,L.I,L.NOBR,L.S,L.SMALL,L.STRIKE,L.STRONG,L.TT,L.U])U[e]=1;var W;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(W||={}),[.../* @__PURE__ */ `+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`)],new Map((/* @__PURE__ */ `attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`)).map(e=>[e.toLowerCase(),e])),F.XLINK,F.XLINK,F.XLINK,F.XLINK,F.XLINK,F.XLINK,F.XLINK,F.XML,F.XML,F.XMLNS,F.XMLNS,new Map((/* @__PURE__ */ `altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`)).map(e=>[e.toLowerCase(),e])),L.B,L.BIG,L.BLOCKQUOTE,L.BODY,L.BR,L.CENTER,L.CODE,L.DD,L.DIV,L.DL,L.DT,L.EM,L.EMBED,L.H1,L.H2,L.H3,L.H4,L.H5,L.H6,L.HEAD,L.HR,L.I,L.IMG,L.LI,L.LISTING,L.MENU,L.META,L.NOBR,L.OL,L.P,L.PRE,L.RUBY,L.S,L.SMALL,L.SPAN,L.STRONG,L.STRIKE,L.SUB,L.SUP,L.TABLE,L.TT,L.U,L.UL,L.VAR,L.TR,L.TBODY,L.THEAD,L.TFOOT,L.CAPTION,L.COLGROUP,L.TABLE,L.FRAMESET,L.SELECT,L.TEMPLATE,L.TD,L.TH,L.HEAD,L.BODY,L.HTML;var G;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(G||={}),L.TABLE,L.TBODY,L.TFOOT,L.THEAD,L.TR,L.CAPTION,L.COL,L.COLGROUP,L.TBODY,L.TD,L.TFOOT,L.TH,L.THEAD,L.TR,I.AREA,I.BASE,I.BASEFONT,I.BGSOUND,I.BR,I.COL,I.EMBED,I.FRAME,I.HR,I.IMG,I.INPUT,I.KEYGEN,I.LINK,I.META,I.PARAM,I.SOURCE,I.TRACK,I.WBR;function K(e,t){for(let n=0;n<e.length;n+=1)if(e.charCodeAt(n)===t)return!0;return!1}function q(e){let t=``;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);r!==9&&r!==10&&r!==13&&(t+=e[n])}let n=0,r=t.length;for(;n<r&&t.charCodeAt(n)<=32;)n+=1;for(;r>n&&t.charCodeAt(r-1)<=32;)--r;return t.slice(n,r)}let J=/^([a-zA-Z][a-zA-Z0-9+.-]*):/,se=/%(2f|5c|00)/i,ce=/%[0-9a-f]{2}/i;function le(e){let t=q(e);return t===``||t.startsWith(`#`)||t.startsWith(`//`)||K(t,0)||t.includes(`\\`)?!1:!J.test(t)}let Y=/* @__PURE__ */ new Set([`md`,`markdown`,`html`,`htm`]);function ue(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n>0&&Y.has(t.slice(n+1).toLowerCase())}function de(e){let t=q(e);if(t.startsWith(`#`))return{kind:`fragment`};if(t===``||K(t,0)||t.includes(`\\`))return{kind:`other`};let n=J.exec(t)?.[1]?.toLowerCase();if(n!==void 0)return n===`http`||n===`https`||n===`mailto`?{kind:`external`,url:t}:{kind:`other`};if(t.startsWith(`//`))return{kind:`other`};let r=(t.split(`#`,1)[0]??``).split(`?`,1)[0]??``;if(r===``||se.test(r))return{kind:`other`};let i=[];for(let e of r.split(`/`)){let t;try{t=decodeURIComponent(e)}catch{return{kind:`other`}}if(K(t,0)||t.includes(`/`)||t.includes(`\\`)||ce.test(t))return{kind:`other`};t!==``&&t!==`.`&&i.push(t)}let a=i.at(-1);return a===void 0||a===`..`||!ue(a)?{kind:`other`}:{kind:`document`,fromRoot:r.startsWith(`/`),segments:i}}let X={maxNodes:1e5,maxDepth:64};var Z=class extends Error{limit;constructor(e){super(`The document structure exceeds the limit: ${e}.`),this.name=`ParseLimitError`,this.limit=e}};let fe=(e,t)=>`h${String(t+1)}`,pe=/^(https?:|mailto:)/i;function me(e){return e.startsWith(`#`)||pe.test(e)}let he={allowHtml:!1,frontmatter:!0,headingIds:fe,urlTransform:(e,t)=>t===`image`?le(e)?e:null:me(e)||de(e).kind===`document`?e:null};function ge(e){let t=w(e,he);return _e(t),t}function Q(e,t,n){if(t>X.maxDepth)throw new Z(`depth`);for(let r of e){if(n.nodes+=1,n.nodes>X.maxNodes)throw new Z(`nodes`);`children`in r&&Q(r.children,t+1,n)}}function $(e,t,n){if(t>X.maxDepth)throw new Z(`depth`);for(let r of e){if(n.nodes+=1,n.nodes>X.maxNodes)throw new Z(`nodes`);switch(r.type){case`heading`:case`paragraph`:Q(r.children,t+1,n);break;case`blockquote`:case`callout`:case`component`:$(r.children,t+1,n);break;case`list`:for(let e of r.items)$(e.children,t+1,n);break;case`table`:for(let e of r.header)Q(e.children,t+1,n);for(let e of r.rows)for(let r of e)Q(r.children,t+1,n);break;case`footnotes`:for(let e of r.items)$(e.children,t+1,n)}}}function _e(e){$(e.children,1,{nodes:0})}self.addEventListener(`message`,e=>{let{id:t,source:n}=e.data;try{self.postMessage({id:t,ok:!0,document:ge(n)})}catch(e){self.postMessage({id:t,ok:!1,reason:e instanceof Z?`limit-${e.limit}`:`parse-error`})}})})();
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{B as t,Bt as n,C as r,D as i,E as a,F as o,Gt as s,Jt as c,Kt as l,M as u,N as d,Ot as f,Qt as p,S as m,T as h,U as g,Ut as _,Wt as v,Xt as y,Yt as b,_ as ee,a as x,at as S,b as C,ct as w,d as T,f as E,h as D,i as O,it as k,l as A,lt as j,mt as M,n as te,o as N,p as P,pt as F,qt as I,r as L,rn as R,t as ne,tn as re,u as ie,ut as z,v as B,w as V,x as H,z as U,zt as ae}from"./src-B8UfTgKw.js";var W={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};W.node;var oe=p(W),G={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};G.node;var se=p(G),K=e(R(),1),ce=re(),q=f();function le({document:e,open:t,onClose:n,onDetails:r,onRemove:i,finalFocus:a}){return(0,q.jsx)(O,{open:t,onOpenChange:e=>!e&&n(),children:(0,q.jsxs)(N,{showCloseButton:!1,finalFocus:a,className:`top-auto bottom-0 left-0 max-w-none translate-x-0 translate-y-0 gap-2 rounded-b-none pb-[max(1rem,env(safe-area-inset-bottom))] sm:max-w-none data-open:zoom-in-100 data-open:slide-in-from-bottom-4 data-closed:zoom-out-100 data-closed:slide-out-to-bottom-4`,children:[(0,q.jsx)(A,{className:`truncate px-1 pb-1`,children:e?.title}),(0,q.jsxs)(F,{variant:`outline`,size:`lg`,className:`justify-start`,onClick:r,children:[(0,q.jsx)(l,{"aria-hidden":`true`}),`Details`]}),(0,q.jsxs)(F,{variant:`destructive`,size:`lg`,className:`justify-start`,onClick:i,children:[(0,q.jsx)(ae,{"aria-hidden":`true`}),`Remove from the PC list`]}),(0,q.jsx)(x,{render:(0,q.jsx)(F,{variant:`ghost`,size:`lg`}),children:`Cancel`})]})})}var ue={ready:`Ready`,missing:`File missing`,unreadable:`Unreadable`,updating:`Updating`,error:`Error`},de=e=>new Date(e).toLocaleString();function fe(e){switch(e.kind){case`stdin`:return[[`Source`,`Standard input`]];case`generated`:return[[`Source`,`Generated`]];case`outside`:return[[`Repository`,`Outside a repository`],[`File`,e.fileName]];case`pending`:return[[`Repository`,`Checking…`],[`File`,e.fileName]];case`unresolved`:return[[`Repository`,`${e.name} (${S[e.reason]})`],[`Path`,e.path.join(`/`)]];case`repository`:{let{checkout:t}=e;return[[`Repository`,e.name],...t.kind===`linked`?[[`Worktree`,t.full]]:t.kind===`unknown`?[[`Worktree`,`Unknown checkout`]]:[],[`Path`,e.path.join(`/`)]]}}}function pe({document:e,open:t,onClose:n,finalFocus:r}){let i=e===null?[]:[[`Format`,k[e.format]],...fe(e.location),[`Opened`,de(e.openedAt)],[`Last updated`,de(e.updatedAt)],[`File state`,ue[e.sourceState]],...e.effectiveMode===null?[]:[[`HTML view`,e.effectiveMode===`interactive`?`Interactive (scripts run)`:`Static (scripts off)`]]];return(0,q.jsx)(O,{open:t,onOpenChange:e=>!e&&n(),children:(0,q.jsxs)(N,{finalFocus:r,className:`max-h-[85svh] overflow-y-auto`,children:[(0,q.jsx)(A,{className:`pr-8 leading-snug [overflow-wrap:anywhere]`,children:e?.title}),(0,q.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm`,children:i.map(([e,t])=>(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,q.jsx)(`dd`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:(0,q.jsx)(`bdi`,{children:z(t)})})]},e))})]})})}var me=10;function he(e){let t=(0,K.useRef)(null),n=(0,K.useRef)(!1),r=()=>{t.current&&clearTimeout(t.current.timer),t.current=null};return(0,K.useEffect)(()=>{let e=t;return()=>{e.current&&clearTimeout(e.current.timer)}},[]),{onPointerDown:i=>{n.current=!1,r(),i.isPrimary&&i.button===0&&(t.current={x:i.clientX,y:i.clientY,timer:setTimeout(()=>{t.current=null,n.current=!0,e()},500)})},onPointerMove:e=>{let n=t.current;n&&Math.hypot(e.clientX-n.x,e.clientY-n.y)>me&&r()},onPointerUp:r,onPointerCancel:r,onPointerLeave:r,onContextMenu:i=>{i.preventDefault(),t.current&&(n.current=!0),r(),e()},onClickCapture:e=>{n.current&&e.detail!==0&&(n.current=!1,e.preventDefault(),e.stopPropagation())}}}function ge({view:e,onViewChange:t,location:n,onLocationChange:i}){let o=M(a,`h-8 min-w-8 px-1.5`);return(0,q.jsxs)(q.Fragment,{children:[e===`flat`&&(0,q.jsx)(F,{variant:`ghost`,size:`icon`,className:`aria-pressed:bg-muted aria-pressed:text-foreground`,"aria-pressed":n===`shown`,"aria-label":`Locations`,title:n===`shown`?`Hide where each document is`:`Show where each document is`,onClick:()=>i(n===`shown`?`hidden`:`shown`),children:(0,q.jsx)(b,{"aria-hidden":`true`})}),(0,q.jsxs)(r,{value:[e],onValueChange:e=>{let n=e[0];(n===`flat`||n===`tree`)&&t(n)},spacing:.5,className:h,"aria-label":`List layout`,children:[(0,q.jsx)(V,{value:`flat`,"aria-label":`Flat`,title:`Flat list`,className:o,children:(0,q.jsx)(v,{"aria-hidden":`true`})}),(0,q.jsx)(V,{value:`tree`,"aria-label":`Tree`,title:`Group by repository`,className:o,children:(0,q.jsx)(s,{"aria-hidden":`true`})})]})]})}function _e({place:e,directories:t,fileName:n}){let r=[...t,n].join(`/`);switch(e.kind){case`input`:return e.source===`stdin`?`Standard input`:`Generated`;case`outside`:return r;case`pending`:return`Checking repository… ${r}`;case`unresolved`:return`${e.name} (${S[e.reason]}) · ${r}`;case`repository`:{let{checkout:t}=e,n=t.kind===`linked`?` · worktree ${t.label}`:t.kind===`unknown`?` · unknown checkout`:``;return`${e.name}${n} · ${r}`}}}function ve({documents:e,view:t,location:n,current:r,onOpen:i,onRemove:a}){let o=(0,K.useMemo)(()=>e.map(w),[e]),s=(0,K.useMemo)(()=>j(o),[o]),c=(0,K.useMemo)(()=>t===`tree`?te(o):[],[o,t]),[l,u]=(0,K.useState)(null),d=(0,K.useRef)(null),f=e=>e.split(`.`)[0],p=e.find(e=>l!==null&&e.documentId===l.documentId&&f(e.viewEpoch)===f(l.viewEpoch))??null;l!==null&&p===null&&u(null);let m=()=>u(e=>e&&{...e,view:null}),h=()=>d.current?.querySelector(`[data-document-id="${CSS.escape(l?.documentId??``)}"]`)??!0,g=(e,t,n={})=>(0,q.jsx)(ye,{document:e,current:e.documentId===r,...n,onOpen:()=>i(e.documentId),onMenu:()=>u({documentId:e.documentId,viewEpoch:e.viewEpoch,view:`actions`}),children:t});return(0,q.jsxs)(`nav`,{ref:d,"aria-label":`Open documents`,className:`@container/list`,children:[t===`tree`?(0,q.jsx)(J,{nodes:c,depth:0,row:g}):(0,q.jsx)(`ul`,{children:o.map(e=>(0,q.jsx)(be,{entry:e,location:n,short:s.get(e.document.documentId),row:g},e.document.documentId))}),(0,q.jsx)(le,{document:p,open:l?.view===`actions`&&p!==null,onClose:m,onDetails:()=>u(e=>e&&{...e,view:`details`}),onRemove:()=>{m(),p&&a(p.documentId)},finalFocus:()=>l?.view!==`details`&&h()}),(0,q.jsx)(pe,{document:p,open:l?.view===`details`&&p!==null,onClose:m,finalFocus:h})]})}function ye({document:e,current:t,style:n,describedBy:r,onOpen:i,onMenu:a,children:o}){let s=he(a);return(0,q.jsx)(`button`,{type:`button`,className:`flex min-h-12 w-full flex-col justify-center gap-0.5 px-4 py-2 text-left select-none [-webkit-touch-callout:none] active:bg-muted aria-[current=page]:bg-muted aria-[current=page]:font-medium`,style:n,"aria-current":t?`page`:void 0,"aria-describedby":r,"data-document-id":e.documentId,onClick:i,...s,children:o})}function be({entry:e,location:t,short:n,row:r}){let i=(0,K.useId)(),{document:a}=e;return(0,q.jsx)(`li`,{className:`border-b`,children:r(a,(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{className:`flex w-full min-w-0 items-center gap-3`,children:[(0,q.jsx)(u,{format:a.format}),(0,q.jsx)(`span`,{className:`min-w-0 flex-1 break-words`,"data-part":`title`,children:a.title})]}),t===`shown`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`flex w-full min-w-0 items-center gap-1.5 overflow-hidden pl-7 text-xs font-normal text-muted-foreground`,"aria-hidden":`true`,"data-part":`location`,children:(0,q.jsx)(L,{entry:e,short:n})}),(0,q.jsx)(`span`,{id:i,hidden:!0,children:z(_e(e))})]})]}),t===`shown`?{describedBy:i}:{})})}function J({nodes:e,depth:t,row:n}){let r=e=>({paddingLeft:`${String(1+e*.75)}rem`}),i=`flex min-h-8 items-center gap-2 pr-4 text-xs text-muted-foreground`;return(0,q.jsx)(`ul`,{children:e.map(e=>{switch(e.kind){case`document`:return(0,q.jsx)(`li`,{className:`border-b`,children:n(e.document,(0,q.jsxs)(`span`,{className:`flex w-full min-w-0 items-center gap-3`,children:[(0,q.jsx)(u,{format:e.document.format}),(0,q.jsx)(`bdi`,{className:`min-w-0 flex-1 break-words`,children:z(e.name)})]}),{style:r(t)})},e.key);case`repository`:{let a=e.reason===null?null:S[e.reason];return(0,q.jsxs)(`li`,{"data-node":`repository`,children:[(0,q.jsxs)(`div`,{className:M(i,`font-medium text-foreground`),style:r(t),children:[a===null?(0,q.jsx)(b,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}):(0,q.jsx)(y,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,q.jsx)(`bdi`,{className:`max-w-[60%] shrink-0 truncate`,children:z(e.name)}),e.merged!==null&&(0,q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1 font-normal text-muted-foreground`,children:[(0,q.jsx)(I,{className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:`worktree`}),(0,q.jsx)(`bdi`,{className:`truncate`,children:z(e.merged)})]}),a!==null&&(0,q.jsx)(`span`,{className:`sr-only`,children:a})]}),(0,q.jsx)(J,{nodes:e.children,depth:t+1,row:n})]},e.key)}case`worktree`:return(0,q.jsxs)(`li`,{"data-node":`worktree`,children:[(0,q.jsxs)(`div`,{className:e.hidden?`sr-only`:i,style:r(t),children:[(0,q.jsx)(I,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:`worktree`}),(0,q.jsx)(`bdi`,{className:`truncate`,children:z(e.name)})]}),(0,q.jsx)(J,{nodes:e.children,depth:e.hidden?t:t+1,row:n})]},e.key);case`group`:case`directory`:return(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{className:i,style:r(t),children:[(0,q.jsx)(c,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,q.jsx)(`bdi`,{className:`truncate`,children:z(e.name)})]}),(0,q.jsx)(J,{nodes:e.children,depth:t+1,row:n})]},e.key);default:return null}})})}var xe=10;function Se(){return window.matchMedia(`(display-mode: standalone)`).matches||navigator.standalone===!0}function Ce(e,t){for(let n=e instanceof Element?e:null;n;n=n.parentElement){if(n.scrollTop>0)return!1;if(n===t)return!0}return!0}function we(e,t,n){let[r,i]=(0,K.useState)(0),a=(0,K.useEffectEvent)(n);return(0,K.useEffect)(()=>{let n=e.current;if(!t||n===null)return;let r=null,o=0,s=!1,c=e=>{let t=e.touches[0];r=e.touches.length===1&&t!==void 0&&Ce(e.target,n)?{x:t.clientX,y:t.clientY}:null,o=0,s=!1},l=e=>{let t=e.touches[0];if(r===null||t===void 0)return;let n=t.clientY-r.y,a=Math.abs(t.clientX-r.x);if(!s){if(Math.max(Math.abs(n),a)<xe)return;if(n<=a){r=null;return}s=!0}o=Math.max(0,n),i(Math.min(1,o/72))},u=e=>{e.type===`touchend`&&r!==null&&o>=72&&a(),r=null,o=0,s=!1,i(0)};return n.addEventListener(`touchstart`,c,{passive:!0}),n.addEventListener(`touchmove`,l,{passive:!0}),n.addEventListener(`touchend`,u),n.addEventListener(`touchcancel`,u),()=>{n.removeEventListener(`touchstart`,c),n.removeEventListener(`touchmove`,l),n.removeEventListener(`touchend`,u),n.removeEventListener(`touchcancel`,u)}},[e,t]),r}var Te=`Open this document on the PC to read it here.`,Ee=`That document is no longer open on the PC.`,De=`Could not remove the document from the PC list.`,Y=`document`,Oe=`mobile-drawer-toggle`,X=`mobile-document-list`,Z=()=>new URLSearchParams(window.location.search).get(Y),Q=e=>{let t=new URL(window.location.href);return e===null?t.searchParams.delete(Y):t.searchParams.set(Y,e),`${t.pathname}${t.search}${t.hash}`},ke=(e,t)=>`${e.daemonId}\n${t.documentId}\n${t.viewEpoch.split(`.`)[0]??``}`;function Ae({api:e}){let[t,n]=(0,K.useState)(null),[r,i]=(0,K.useState)(`connecting`),[a,o]=(0,K.useState)(Z),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(()=>new Set),[p,h]=m(`mobile-list-view`,`flat`,ee),[g,_]=m(`mobile-list-location`,`shown`,C),[v,y]=(0,K.useState)(!1),b=(0,K.useRef)(null),[x]=(0,K.useState)(Se),S=we(b,x,()=>window.location.reload()),w=(0,K.useRef)(!1),E=(0,K.useCallback)(()=>{w.current=document.getElementById(X)?.contains(document.activeElement)===!0,y(!1)},[]);(0,K.useEffect)(()=>{!v&&w.current&&(w.current=!1,document.getElementById(Oe)?.focus())},[v]),(0,K.useEffect)(()=>{if(!v)return;let e=e=>{e.key===`Escape`&&E()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[v,E]);let[D,O]=(0,K.useState)(!1),[k,A]=(0,K.useState)(()=>document.visibilityState===`visible`),[j,M]=(0,K.useState)(0),[te,N]=(0,K.useState)(0),[P,I]=(0,K.useState)(!1),L=(0,K.useMemo)(()=>ne(async()=>{try{let t=await e.documents();n(t),i(`ready`)}catch(e){throw i(e=>e===`ready`?e:`failed`),e}}),[e]),R=(0,K.useCallback)(()=>{N(e=>e+1),L().then(e=>{I(e),e&&M(e=>e+1),N(e=>e-1)})},[L]),re=(0,K.useEffectEvent)(e=>{e.type===`daemon-stopping`?O(!1):e.type===`changed`&&e.documentId!==void 0&&e.documentId!==a?L():R()});(0,K.useEffect)(()=>{let t=e.events({onConnect:()=>{O(!0),R()},onEvent:e=>re(e),onDisconnect:()=>O(!1)}),n=()=>{let e=document.visibilityState===`visible`;A(e),e&&R()},r=()=>R();return document.addEventListener(`visibilitychange`,n),window.addEventListener(`pageshow`,r),()=>{t.close(),document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pageshow`,r)}},[e,R]),(0,K.useEffect)(()=>{let e=()=>{y(!1),c(null),o(Z())};return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]);let z=(0,K.useCallback)(e=>{if(c(null),a===e)return;let t=window.history.state,n=a===null?{depth:1,fromList:!0}:{depth:(t?.depth??0)+1,fromList:t?.fromList===!0};window.history.pushState(n,``,Q(e)),o(e)},[a]),B=(0,K.useMemo)(()=>t===null||d.size===0?t:{...t,documents:t.documents.filter(e=>!d.has(ke(t,e)))},[t,d]),V=B?.documents.find(e=>e.documentId===a)??null;V===null&&v&&y(!1),t!==null&&a!==null&&V===null&&(o(null),c(Ee),u({documentId:a})),(0,K.useEffect)(()=>{a===null&&Z()!==null&&window.history.replaceState(null,``,Q(null))},[a]),(0,K.useEffect)(()=>{l!==null&&Z()===l.documentId&&window.history.replaceState(null,``,Q(null))},[l]),(0,K.useEffect)(()=>{document.title=V===null?`vo`:`vo - ${V.title}`},[V]);let H=D&&k&&te===0&&P,U=()=>{let e=window.history.state;e?.fromList===!0&&e.depth>0?window.history.go(-e.depth):(window.history.pushState(null,``,Q(null)),c(null),o(null))},ae=()=>new Promise(e=>{let t=window.history.state;t?.fromList===!0&&t.depth>0?(window.addEventListener(`popstate`,()=>e(),{once:!0}),window.history.go(-t.depth)):(o(null),e())}),W=async n=>{let r=t?.documents.find(e=>e.documentId===n);if(t===null||r===void 0)return;let i=ke(t,r);c(null),n===a&&await ae(),f(e=>new Set(e).add(i));try{await e.close(n)}catch{f(e=>{let t=new Set(e);return t.delete(i),t}),c(De);return}L()},G={view:p,location:g,onRemove:e=>void W(e)};return(0,q.jsxs)(`div`,{ref:b,className:`flex h-svh flex-col bg-background text-foreground`,children:[S>0&&(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none fixed inset-x-0 top-12 z-30 flex justify-center`,children:(0,q.jsx)(`span`,{className:`rounded-full border bg-background p-2 shadow-md ${S===1?`text-primary`:`text-muted-foreground`}`,style:{opacity:S,transform:`rotate(${String(S*270)}deg)`},children:(0,q.jsx)(se,{className:`size-4`})})}),(0,q.jsxs)(`header`,{className:`flex h-11 shrink-0 items-center gap-1 border-b bg-chrome px-2`,children:[V===null?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h1`,{className:`flex-1 px-2 text-sm font-medium`,children:`Open documents`}),(0,q.jsx)(ge,{view:p,onViewChange:h,location:g,onLocationChange:_})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(F,{variant:`ghost`,size:`sm`,onClick:U,"aria-label":`Back to the documents`,children:[(0,q.jsx)(oe,{"aria-hidden":`true`}),`Documents`]}),(0,q.jsx)(`h1`,{className:`min-w-0 flex-1 truncate text-sm font-medium`,children:V.title}),(0,q.jsx)(T,{id:Oe,open:v,controls:X,onToggle:()=>y(e=>!e),label:`Switch document`,iconOnly:!0})]}),!D&&r===`ready`&&(0,q.jsx)(`span`,{role:`status`,className:`shrink-0 px-2 text-xs text-muted-foreground`,children:`Reconnecting…`})]}),s!==null&&(0,q.jsx)(`p`,{role:`status`,className:`border-b bg-muted px-3 py-2 text-sm`,children:s}),V!==null&&t!==null&&B!==null?(0,q.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[(0,q.jsx)(ie,{id:X,open:v,children:(0,q.jsx)(`div`,{className:`h-full overflow-y-auto`,children:(0,q.jsx)(ve,{documents:B.documents,current:V.documentId,onOpen:e=>{E(),z(e)},...G})})}),(0,q.jsx)(Ne,{api:e,row:V,live:H,revalidation:j,onOpen:z,onNotice:c,onStale:R},`${t.daemonId}\n${V.documentId}`)]}):(0,q.jsx)(je,{catalog:B,phase:r,onOpen:z,...G,onRetry:()=>{i(`connecting`),R()}})]})}function je({catalog:e,phase:t,onOpen:r,onRetry:i,...a}){return e===null?t===`failed`?(0,q.jsxs)(`main`,{className:`flex flex-1 flex-col items-center justify-center gap-3 p-6 text-sm`,children:[(0,q.jsx)(`p`,{role:`alert`,children:`Could not load the documents from the PC.`}),(0,q.jsxs)(F,{variant:`outline`,onClick:i,children:[(0,q.jsx)(n,{"aria-hidden":`true`}),`Try again`]})]}):(0,q.jsxs)(`main`,{className:`flex flex-1 items-center justify-center gap-2 p-6 text-sm text-muted-foreground`,children:[(0,q.jsx)(_,{className:`size-4 animate-spin`,"aria-hidden":`true`}),`Connecting to the PC…`]}):e.documents.length===0?(0,q.jsx)(`main`,{className:`flex flex-1 items-center justify-center p-6 text-center text-sm text-muted-foreground`,children:`No documents are open on the PC.`}):(0,q.jsx)(`main`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,q.jsx)(ve,{documents:e.documents,current:null,onOpen:r,...a})})}function Me(e,t,n){let[r,i]=e.viewEpoch.split(`.`).map(Number),[a,o]=t.viewEpoch.split(`.`).map(Number);return e.nonce===n&&e.effectiveMode===t.effectiveMode&&e.revision!==t.revision&&r===a&&o===(i??NaN)+1}function Ne({api:e,row:t,live:n,revalidation:r,onOpen:i,onNotice:a,onStale:s}){let[c,l]=(0,K.useState)(0),[u,d]=(0,K.useState)(null),[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(null),g=(0,K.useRef)(new Set),v=`${t.revision??``}\n${t.viewEpoch}\n${String(c)}`,y=u!==null&&u.revision===t.revision&&u.viewEpoch===t.viewEpoch&&u.nonce===c,b=u!==null&&(y||Me(u,t,c))?u:null,ee=b?.grant.grant??null,x=y?u.grant.grant:null,{documentId:S,revision:C,viewEpoch:w,format:T,effectiveMode:E}=t,D=(0,K.useRef)(r);(0,K.useEffect)(()=>{D.current=r});let O=(0,K.useEffectEvent)(()=>s());(0,K.useEffect)(()=>{if(C===null)return;let t=!1,n={documentId:S,revision:C,viewEpoch:w},r=`${C}\n${w}\n${String(c)}`,i=null,a=()=>{i!==null&&e.release([i]).catch(()=>void 0),i=null};return(async()=>{let r=await e.grant(n);if(i=r.grant,t){a();return}let o=T===`markdown`?await e.content(n):null;t?a():(g.current.add(r.grant),i=null,d({revision:C,viewEpoch:w,effectiveMode:E,nonce:c,grant:r,text:o,checkedAt:D.current}),p(null))})().catch(e=>{a(),t||(e instanceof o&&(e.status===409||e.status===404)?O():p({key:r,message:e instanceof Error?e.message:`Could not load.`}))}),()=>{t=!0,a()}},[e,S,C,w,T,E,c]),(0,K.useEffect)(()=>{let t=[...g.current].filter(e=>e!==ee);if(t.length!==0){for(let e of t)g.current.delete(e);e.release(t).catch(()=>void 0)}}),(0,K.useEffect)(()=>()=>{let t=[...g.current];g.current.clear(),e.release(t).catch(()=>void 0)},[e]),(0,K.useEffect)(()=>{if(x===null)return;let t=!1;return e.check(x).then(e=>{t||(e?h({grant:x,revalidation:r}):l(e=>e+1))},()=>void 0),()=>{t=!0}},[e,x,r]),(0,K.useEffect)(()=>{let t=!1,n=()=>{let n=[...g.current];n.length!==0&&(g.current.clear(),t=!0,e.release(n,!0).catch(()=>void 0))},r=()=>{t&&(t=!1,l(e=>e+1))};return window.addEventListener(`pagehide`,n),window.addEventListener(`pageshow`,r),()=>{window.removeEventListener(`pagehide`,n),window.removeEventListener(`pageshow`,r)}},[e]);let k=(0,K.useRef)(null);(0,K.useEffect)(()=>(k.current=x,()=>{k.current=null}),[x]);let A=(0,K.useCallback)(async(t,n)=>{try{let r=await e.resolveLink(t,n);if(k.current!==t)return;r.status===`open`?i(r.documentId):a(Te)}catch{k.current===t&&s()}},[e,i,a,s]),j=n&&b!==null&&x!==null&&(b.checkedAt===r||m?.grant===b.grant.grant&&m.revalidation===r);if(b===null){let e=f?.key===v?f.message:null;return(0,q.jsx)(`main`,{className:`flex flex-1 items-center justify-center gap-2 p-6 text-sm text-muted-foreground`,children:e===null?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(_,{className:`size-4 animate-spin`,"aria-hidden":`true`}),`Preparing the view…`]}):(0,q.jsxs)(`span`,{role:`alert`,children:[`Could not show the document (`,e,`).`]})})}return t.format===`markdown`?(0,q.jsx)(Pe,{shown:b,onOpenLink:A}):t.format===`image`?(0,q.jsx)(Fe,{shown:b,title:t.title}):(0,q.jsx)(Ie,{shown:b,interactive:j,onOpenLink:A})}function Pe({shown:e,onOpenLink:n}){let r=E(e.text),{grant:i}=e,a=(0,K.useMemo)(()=>{let e=new Set(i.assets.filter(e=>e.role===`image`||e.role===`svg`).map(e=>e.logicalPath));return n=>{let r=t(n,i.documentLogicalPath);return r===null||!e.has(r)?null:`${i.filesBaseUrl}${g(r)}`}},[i]),o=(0,K.useCallback)(e=>{let t=i.links.find(t=>t.href===e&&t.kind===`document`);t&&n(i.grant,t.linkId)},[i,n]),s;return s=r.status===`ready`?(0,q.jsx)(`article`,{className:`markdown-body mx-auto max-w-3xl px-4 py-4`,"data-testid":`markdown-body`,children:(0,q.jsx)(d,{document:r.document,resolveImage:a,onOpenLink:o})}):r.status===`parsing`?(0,q.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`Preparing the view…`}):(0,q.jsx)(`pre`,{className:`p-4 font-mono text-sm break-words whitespace-pre-wrap`,children:e.text}),(0,q.jsx)(`main`,{className:`min-h-0 flex-1 overflow-y-auto`,children:s})}function Fe({shown:e,title:t}){let[n,r]=(0,K.useState)(null);return(0,q.jsx)(`main`,{className:`flex min-h-0 flex-1 flex-col`,children:(0,q.jsx)(i,{url:e.grant.documentUrl,title:t,actualSize:!1,result:n,failure:null,onResult:r})})}function Ie({shown:e,interactive:t,onOpenLink:n}){let{grant:r}=e,i=(0,K.useRef)(null),a=r.links.some(e=>e.kind===`document`),o=!t&&r.mode===`interactive`,s=(0,K.useEffectEvent)(e=>{if(!t)return;let i=r.links.find(t=>t.kind===`document`&&t.linkId===e);i&&n(r.grant,i.linkId)});return(0,K.useEffect)(()=>{let e=i.current;if(!e||!a)return;let t,n=({data:e})=>{typeof e==`string`&&s(e)},o=i=>{if(i.source===null||i.source!==e.contentWindow||i.origin!==`null`||i.data!==`vde-open:document-links`||i.ports.length!==1)return;let[a]=i.ports;a&&(t&&r.mode===`interactive`?a.close():(t?.(),a.addEventListener(`message`,n),a.start(),t=()=>{a.removeEventListener(`message`,n),a.close()}))};return window.addEventListener(`message`,o),()=>{window.removeEventListener(`message`,o),t?.()}},[r,a]),(0,q.jsxs)(`main`,{className:`relative min-h-0 flex-1`,children:[(0,q.jsx)(`iframe`,{ref:i,title:`View of ${r.documentLogicalPath}`,src:r.documentUrl??void 0,sandbox:r.mode===`interactive`||a?`allow-scripts`:``,referrerPolicy:`no-referrer`,className:`size-full border-0 bg-white`,"data-testid":`document-frame`,"data-mode":r.mode,inert:o},r.grant),o&&(0,q.jsx)(`div`,{className:`absolute inset-0`,"data-testid":`frame-paused`,"aria-hidden":`true`})]})}var $=`/_/mobile/v1`,Le=1e4,Re=35e3;async function ze(e){let t=await e.json().catch(()=>null);if(!e.ok||!t?.ok)throw new o(t?.error?.code??`E_INTERNAL`,t?.error?.message??`The request failed.`,e.status,{});return t.data}function Be(e){return e.toSorted((e,t)=>e.openedAt===t.openedAt?t.documentId.localeCompare(e.documentId):t.openedAt.localeCompare(e.openedAt))}function Ve(){let e=async e=>ze(await fetch(`${$}${e}`,{cache:`no-store`})),t=async(e,t,n=!1)=>ze(await fetch(`${$}${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),keepalive:n}));return{async documents(){for(let t=0;;t+=1)try{let t=await e(`/documents`),n=[...t.documents],r=t.nextCursor;for(;r!==null;){let i=await e(`/documents?cursor=${encodeURIComponent(r)}`);if(i.daemonId!==t.daemonId||i.catalogVersion!==t.catalogVersion)throw new o(`E_CURSOR_STALE`,`The list changed.`,409,{});n.push(...i.documents),r=i.nextCursor}return{daemonId:t.daemonId,documents:Be(n)}}catch(e){if(!(e instanceof o&&e.status===409)||t>=3)throw e}},async content(t){let n=``,r=await e(`/documents/${t.documentId}/content?revision=${t.revision??``}&viewEpoch=${t.viewEpoch}`);for(n+=r.content;r.nextCursor!==null;)r=await e(`/documents/${t.documentId}/content?cursor=${encodeURIComponent(r.nextCursor)}`),n+=r.content;return n},grant(e){return t(`/documents/${e.documentId}/render-grants`,{revision:e.revision,viewEpoch:e.viewEpoch})},async check(e){return(await t(`/render-grants/check`,{grant:e})).valid},async release(e,n=!1){e.length>0&&await t(`/render-grants/release`,{grants:e},n)},resolveLink(e,n){return t(`/links/resolve`,{grant:e,linkId:n})},async close(e){await t(`/documents/${e}/close`,{})},events({onEvent:e,onConnect:t,onDisconnect:n}){let r=new AbortController,i=0;return(async()=>{for(;!r.signal.aborted;){let a=new AbortController,o=()=>a.abort();r.signal.addEventListener(`abort`,o);let s,c=()=>{clearTimeout(s),s=setTimeout(o,Re)};try{let n=await fetch(`${$}/events`,{cache:`no-store`,signal:a.signal});if(!n.ok||!n.body)throw Error(`events unavailable`);i=0,c(),t();let r=U(t=>{try{e(JSON.parse(t.data))}catch{}}),o=n.body.getReader();for(;;){let{done:e,value:t}=await o.read();if(e)break;c(),r.push(t)}}catch{}finally{clearTimeout(s),r.signal.removeEventListener(`abort`,o)}if(r.signal.aborted)return;n(),i+=1;let l=Math.min(Le,250*2**i)*(.5+Math.random()/2);await new Promise(e=>setTimeout(e,l))}})(),{close:()=>r.abort()}}}}P(H(`theme`,`system`,B),H(`color-palette`,`standard`,D));function He(){let[e]=(0,K.useState)(Ve);return(0,q.jsx)(Ae,{api:e})}var Ue=document.getElementById(`root`);if(!Ue)throw Error(`#root not found`);(0,ce.createRoot)(Ue).render((0,q.jsx)(K.StrictMode,{children:(0,q.jsx)(He,{})}));
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));export{c as n,o as t};