allyward 1.0.0 → 1.4.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.
@@ -1,9 +1,12 @@
1
1
  import { createRequire as __createRequire } from 'module'; const require = __createRequire(import.meta.url);
2
- import{a as k,c as x,d as I}from"./chunk-6W3JS6DP.mjs";import{c as M,d as j,g as q}from"./chunk-SNU37HWC.mjs";import{h as F}from"./chunk-7UDH5BXX.mjs";function S(t){let[e]=t.split(/\r?\n/,1);return e.length>200?`${e.slice(0,200)}\u2026`:e}var B={"23a2a8":"Image has non-empty accessible name","24afc2":"Important letter spacing in style attributes is wide enough","2779a5":"HTML page has non-empty title","2ee8b8":"Visible label is part of accessible name","2t702h":"Summary element has non-empty accessible name","307n5z":"Element with presentational children has no focusable content","46ca7f":"Element marked as decorative is not exposed","4b1c6c":"Iframe elements with identical accessible names have equivalent purpose","4e8ab6":"Element with role attribute has required states and properties","59796f":"Image button has non-empty accessible name","5b7ae0":"HTML page lang and xml:lang attributes have matching values","5c01ea":"ARIA state or property is permitted","5effbb":"Link in context is descriptive","5f99a7":"ARIA attribute is defined in WAI-ARIA","674b10":"Role attribute has valid value","6a7281":"ARIA state or property has valid value","6cfa84":"Element with aria-hidden has no content in sequential focus navigation","73f2c2":"Autocomplete attribute has valid value","78fd32":"Important line height in style attributes is wide enough","7d6734":"SVG element with explicit role has non-empty accessible name","80f0bf":"Audio or video element avoids automatically playing audio","8fc3b6":"Object element rendering non-text content has non-empty accessible name","97a4e1":"Button has non-empty accessible name","9e45ec":"Important word spacing in style attributes is wide enough",a25f45:"Headers attribute specified on a cell refers to cells in the same table element",afw4f7:"Text has minimum contrast",akn7bn:"Iframe with interactive elements is not excluded from tab-order",b33eff:"Orientation of the page is not restricted using CSS transforms",b4f0c3:"Meta viewport allows for zoom",b5c3f8:"HTML page has lang attribute",bc4a75:"ARIA required owned elements",bc659a:"Meta element has no refresh delay",bf051a:"HTML page lang attribute has valid language tag",c487ae:"Link has non-empty accessible name",cae760:"Iframe element has non-empty accessible name",cf77f2:"Bypass Blocks of Repeated Content",d0f69e:"Table header cell has assigned cells",de46e4:"Element with lang attribute has valid language tag",e086e5:"Form field has non-empty accessible name",e7aa44:"Audio element content has text alternative",eac66b:"Video element auditory content has accessible alternative",f51b46:"Video element auditory content has captions",ff89c9:"ARIA required context role",ffd0e9:"Heading has non-empty accessible name",kb1m8s:"ARIA global properties not used where prohibited",m6b1q3:"Menuitem has non-empty accessible name",qt1vmo:"Image accessible name is descriptive"},h=t=>[`jsx-a11y-x/${t}`,`astro/jsx-a11y/${t}`],m=t=>`vuejs-accessibility/${t}`,b=t=>`@angular-eslint/template/${t}`,u=t=>`svelte/${t}`,w=t=>`@html-eslint/${t}`,A=t=>`allyward/${t}`,N=[{rules:[...h("alt-text"),m("alt-text"),b("alt-text"),"image-alt"],message:"Images need a text alternative",why:"Screen reader users hear nothing, or just the file name, for an image without alt text and miss what it shows.",fix:'Add an alt attribute that says what the image conveys; use alt="" for a purely decorative image.',wcag:["1.1.1"],act:["23a2a8"],example:{bad:'<img src="chart.png">',good:'<img src="chart.png" alt="Sales rose 20% in May">'}},{rules:["input-image-alt"],message:"Image buttons need a text alternative",why:'An <input type="image"> is a button; without alt text screen readers cannot say what it does.',fix:"Add an alt attribute that names the action, not the picture.",wcag:["1.1.1","4.1.2"],act:["59796f"],example:{bad:'<input type="image" src="search.svg">',good:'<input type="image" src="search.svg" alt="Search">'}},{rules:["area-alt"],message:"Image map areas need a text alternative",why:"Each <area> with an href is a link; without alt text screen readers cannot say where it leads.",fix:"Add an alt attribute to every area that names its destination.",wcag:["2.4.4","4.1.2"],act:["c487ae"],example:{bad:`<map name="floors">
2
+ import{a as A,c as k,d as S}from"./chunk-6W3JS6DP.mjs";import{a as B,c as j,d as q,g as N}from"./chunk-SDHUSWGB.mjs";import{h as M}from"./chunk-LUOGX5HV.mjs";function E(a){let[e]=a.split(/\r?\n/,1);return e.length>200?`${e.slice(0,200)}\u2026`:e}var U={html:"html",htm:"html",vue:"vue",svelte:"svelte",jsx:"javascriptreact",tsx:"typescriptreact",astro:"astro",ts:"typescript"},ke=`**/*.{${Object.keys(U).join(",")}}`;function Ae(a){let e=/\.([^./]+)$/.exec(a)?.[1].toLowerCase();return e===void 0?void 0:U[e]}var _e=1;async function Ce(a,e,t,n,s){let o={languageId:e,text:t};if(!N(o))return;let i=await n(o);if(i.status!=="done"){let r=i.status==="paused"?i.reason:"The Check was interrupted";return{file:a,languageId:e,status:"failed",error:r,findings:[],needsReview:[],ignored:0}}return te(a,e,t,i.result,await s?.(i.result)??i.result.findings.map(()=>!1))}function te(a,e,t,n,s){let o=M(t),i=l=>{let g=o.length;for(;o[g-1]>l;)g--;return{line:g,column:l-o[g-1]+1,offset:l}},r=l=>({start:i(l.start),end:i(l.end)});return{file:a,languageId:e,status:"checked",findings:n.findings.map((l,g)=>({ruleId:l.ruleId,criteria:l.criteria,severity:l.severity,layer:"check",message:l.message,helpUrl:l.helpUrl,proof:"proven",range:r(l.range),...l.fix?{fix:l.fix.map(c=>({range:r(c.range),newText:c.newText}))}:{},baselined:s[g]})),needsReview:n.needsReview.map(l=>({criterion:l.criterion,reason:l.reason,...l.ruleId?{ruleId:l.ruleId,proof:"unproven"}:{},...l.range?{range:r(l.range)}:{}})),ignored:n.ignored??0}}var d={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",cyan:"\x1B[36m"};function Se(a=process.stdout,e=process.env){return e.NO_COLOR!==void 0&&e.NO_COLOR!==""?!1:e.FORCE_COLOR!==void 0&&e.FORCE_COLOR!=="0"?!0:!!a.isTTY}function Ee(a,e={}){let t=!!e.color,n=(o,i)=>t?`${o}${i}${d.reset}`:i;return[` ${n(d.dim,"\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E")} ${n(d.bold+d.cyan,"allyward")} ${n(d.dim,`v${a}`)}`,` ${n(d.dim,"\u2502")} ${n(d.green,"\u2593\u2593\u2593\u2593\u2593\u2593\u2593")} ${n(d.dim,"\u2502")} Local WCAG 2.2 AA accessibility checker`,` ${n(d.dim,"\u2502")} ${n(d.green,"\u2593 \u2714 \u2593")} ${n(d.dim,"\u2502")} ${n(d.dim,"HTML \xB7 React \xB7 Vue \xB7 Svelte \xB7 Angular \xB7 Astro")}`,` ${n(d.dim,"\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F")} ${n(d.dim,"Offline \xB7 Zero telemetry \xB7 Zero workspace code execution")}`,""].join(`
3
+ `)}function Le(a,e={}){let t=!!e.color,n=(r,l)=>t?`${r}${l}${d.reset}`:l,s=[];t&&s.push(n(d.dim,"\u256D\u2500 ")+n(d.bold+d.cyan,"allyward")+n(d.dim," \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));for(let r of a.files){if(r.status==="failed"){s.push(n(d.bold+d.underline,r.file),` ${n(d.red,"could not be checked:")} ${r.error}`,"");continue}let l=r.findings.filter(c=>!c.baselined),g=r.needsReview.filter(c=>c.range);if(!(l.length===0&&g.length===0)){s.push(n(d.bold+d.underline,r.file));for(let c of l){let p=n(d.dim,`${c.range.start.line}:${c.range.start.column}`),y=c.severity==="error"?d.red:c.severity==="warning"?d.yellow:d.cyan,C=n(y,c.severity.padEnd(11)),ee=n(d.dim,`WCAG ${c.criteria[0]} ${c.ruleId}`);s.push(` ${p} ${C} ${c.message} ${ee}`,` ${n(d.dim,c.helpUrl)}`)}for(let c of g){let p=n(d.dim,`${c.range.start.line}:${c.range.start.column}`);s.push(` ${p} ${n(d.yellow,"needs review")} WCAG ${c.criterion}: ${c.reason}`)}s.push("")}}let o=a.summary,i=[`${o.files} ${o.files===1?"file":"files"} checked`,`${o.blocking} blocking ${o.blocking===1?"Finding":"Findings"}`,...o.findings>o.blocking?[`${o.findings-o.blocking} not blocking`]:[],...o.baselined||o.fixedSinceBaseline?[`${o.baselined} baselined (${o.fixedSinceBaseline} fixed since the baseline)`]:[],`${o.needsReview} Needs Review`,...o.failedFiles?[`${o.failedFiles} could not be checked`]:[]];if(t){let l=o.blocking===0&&o.failedFiles===0?n(d.bold+d.green,"\u2714"):n(d.bold+d.red,"\u2716");s.push(n(d.dim,"\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),s.push(`${l} ${i.join(", ")}`)}else s.push(i.join(", "));return s.join(`
4
+ `)+`
5
+ `}var ae={error:"error",warning:"warning",information:"note"};function Pe(a,e){let t=i=>({startLine:i.start.line,startColumn:i.start.column,endLine:i.end.line,endColumn:i.end.column}),n=(i,r)=>[{physicalLocation:{artifactLocation:{uri:i},region:t(r)}}],s=new Map,o=a.files.flatMap(i=>[...i.findings.map(r=>(s.has(r.ruleId)||s.set(r.ruleId,{id:r.ruleId,helpUri:r.helpUrl,shortDescription:{text:r.message}}),{ruleId:r.ruleId,level:ae[r.severity],message:{text:`${r.message} (WCAG ${r.criteria.join(", ")})`},locations:n(i.file,r.range),...r.baselined?{suppressions:[{kind:"external",justification:"In the Allyward baseline"}]}:{}})),...i.needsReview.flatMap(r=>r.range?[{ruleId:r.ruleId??`needs-review/${r.criterion}`,level:"note",message:{text:`Needs Review, WCAG ${r.criterion}: ${r.reason}`},locations:n(i.file,r.range)}]:[]),...i.status==="failed"?[{ruleId:"allyward/not-checked",level:"error",message:{text:`Could not be checked: ${i.error}`},locations:[{physicalLocation:{artifactLocation:{uri:i.file}}}]}]:[]]);for(let i of o)s.has(i.ruleId)||s.set(i.ruleId,{id:i.ruleId,shortDescription:{text:i.message.text}});return{$schema:"https://json.schemastore.org/sarif-2.1.0.json",version:"2.1.0",runs:[{tool:{driver:{name:"Allyward",version:e,informationUri:"https://github.com/NotAisu/allyward",rules:[...s.values()]}},results:o}]}}var W={"23a2a8":"Image has non-empty accessible name","24afc2":"Important letter spacing in style attributes is wide enough","2779a5":"HTML page has non-empty title","2ee8b8":"Visible label is part of accessible name","2t702h":"Summary element has non-empty accessible name","307n5z":"Element with presentational children has no focusable content","46ca7f":"Element marked as decorative is not exposed","4b1c6c":"Iframe elements with identical accessible names have equivalent purpose","4e8ab6":"Element with role attribute has required states and properties","59796f":"Image button has non-empty accessible name","5b7ae0":"HTML page lang and xml:lang attributes have matching values","5c01ea":"ARIA state or property is permitted","5effbb":"Link in context is descriptive","5f99a7":"ARIA attribute is defined in WAI-ARIA","674b10":"Role attribute has valid value","6a7281":"ARIA state or property has valid value","6cfa84":"Element with aria-hidden has no content in sequential focus navigation","73f2c2":"Autocomplete attribute has valid value","78fd32":"Important line height in style attributes is wide enough","7d6734":"SVG element with explicit role has non-empty accessible name","80f0bf":"Audio or video element avoids automatically playing audio","8fc3b6":"Object element rendering non-text content has non-empty accessible name","97a4e1":"Button has non-empty accessible name","9e45ec":"Important word spacing in style attributes is wide enough",a25f45:"Headers attribute specified on a cell refers to cells in the same table element",afw4f7:"Text has minimum contrast",akn7bn:"Iframe with interactive elements is not excluded from tab-order",b33eff:"Orientation of the page is not restricted using CSS transforms",b4f0c3:"Meta viewport allows for zoom",b5c3f8:"HTML page has lang attribute",bc4a75:"ARIA required owned elements",bc659a:"Meta element has no refresh delay",bf051a:"HTML page lang attribute has valid language tag",c487ae:"Link has non-empty accessible name",cae760:"Iframe element has non-empty accessible name",cf77f2:"Bypass Blocks of Repeated Content",d0f69e:"Table header cell has assigned cells",de46e4:"Element with lang attribute has valid language tag",e086e5:"Form field has non-empty accessible name",e7aa44:"Audio element content has text alternative",eac66b:"Video element auditory content has accessible alternative",f51b46:"Video element auditory content has captions",ff89c9:"ARIA required context role",ffd0e9:"Heading has non-empty accessible name",kb1m8s:"ARIA global properties not used where prohibited",m6b1q3:"Menuitem has non-empty accessible name",qt1vmo:"Image accessible name is descriptive"},h=a=>[`jsx-a11y-x/${a}`,`astro/jsx-a11y/${a}`],m=a=>`vuejs-accessibility/${a}`,b=a=>`@angular-eslint/template/${a}`,u=a=>`svelte/${a}`,w=a=>`@html-eslint/${a}`,x=a=>`allyward/${a}`,G=[{rules:[...h("alt-text"),m("alt-text"),b("alt-text"),"image-alt"],message:"Images need a text alternative",why:"Screen reader users hear nothing, or just the file name, for an image without alt text and miss what it shows.",fix:'Add an alt attribute that says what the image conveys; use alt="" for a purely decorative image.',wcag:["1.1.1"],act:["23a2a8"],example:{bad:'<img src="chart.png">',good:'<img src="chart.png" alt="Sales rose 20% in May">'}},{rules:["input-image-alt"],message:"Image buttons need a text alternative",why:'An <input type="image"> is a button; without alt text screen readers cannot say what it does.',fix:"Add an alt attribute that names the action, not the picture.",wcag:["1.1.1","4.1.2"],act:["59796f"],example:{bad:'<input type="image" src="search.svg">',good:'<input type="image" src="search.svg" alt="Search">'}},{rules:["area-alt"],message:"Image map areas need a text alternative",why:"Each <area> with an href is a link; without alt text screen readers cannot say where it leads.",fix:"Add an alt attribute to every area that names its destination.",wcag:["2.4.4","4.1.2"],act:["c487ae"],example:{bad:`<map name="floors">
3
6
  <area shape="rect" coords="0,0,80,40" href="/floor-1">
4
7
  </map>`,good:`<map name="floors">
5
8
  <area shape="rect" coords="0,0,80,40" href="/floor-1" alt="First floor">
6
- </map>`}},{rules:["object-alt"],message:"<object> elements need a text alternative",why:"Screen readers cannot describe the content an <object> embeds unless it has an accessible name.",fix:"Name the object with aria-label, aria-labelledby or title.",wcag:["1.1.1"],act:["8fc3b6"],example:{bad:'<object data="org-chart.svg" type="image/svg+xml"></object>',good:'<object data="org-chart.svg" type="image/svg+xml" aria-label="Organisation chart"></object>'}},{rules:["role-img-alt"],message:'Elements with role="img" need a text alternative',why:'An element with role="img" is announced as an image; without a name screen reader users learn nothing about it.',fix:"Name it with aria-label or aria-labelledby.",wcag:["1.1.1"],act:["23a2a8"],example:{bad:'<div role="img" class="rating-4"></div>',good:'<div role="img" class="rating-4" aria-label="Rated 4 of 5"></div>'}},{rules:["svg-img-alt"],message:"SVG images need a text alternative",why:'An <svg> with role="img" is announced as an image; without a name screen reader users learn nothing about it.',fix:"Name it with aria-label, aria-labelledby or a <title> child.",wcag:["1.1.1"],act:["7d6734"],example:{bad:'<svg role="img" viewBox="0 0 24 24"><path d="M3 12h18"></path></svg>',good:'<svg role="img" aria-label="Menu" viewBox="0 0 24 24"><path d="M3 12h18"></path></svg>'}},{rules:[...h("img-redundant-alt"),u("a11y_img_redundant_alt")],message:'Alt text should not say "image" or "picture"',why:"Screen readers already announce the element as an image, so the word is heard twice and adds nothing.",fix:"Describe what the image shows instead.",wcag:["1.1.1"],act:["qt1vmo"],example:{bad:'<img src="team.jpg" alt="Image of our team">',good:'<img src="team.jpg" alt="Our team at the summer meetup">'}},{rules:[u("a11y_missing_attribute")],message:"Element is missing an attribute it needs to be accessible",why:"Some elements only work for everyone with certain attributes: alt on images, href on links, lang on <html>, title on <iframe>.",fix:"Add the attribute the warning names, with a meaningful value.",wcag:["1.1.1","2.1.1","3.1.1","4.1.2"],act:["23a2a8","b5c3f8","cae760"],example:{bad:'<img src="chart.png">',good:'<img src="chart.png" alt="Sales rose 20% in May">'}},{rules:[...h("anchor-has-content"),m("anchor-has-content"),"link-name"],message:"Links need text that names them",why:'A link without text is announced as just "link", so screen reader users cannot tell where it goes.',fix:"Put visible text in the link, or an aria-label when it only holds an icon.",wcag:["2.4.4","4.1.2"],act:["c487ae"],example:{bad:'<a href="/cart"><span class="icon-cart" aria-hidden="true"></span></a>',good:'<a href="/cart"><span class="icon-cart" aria-hidden="true"></span> Cart</a>'}},{rules:["input-button-name","aria-command-name","summary-name",u("a11y_consider_explicit_label")],message:"Buttons need text that names them",why:'A button without text is announced as just "button", so screen reader users cannot tell what it does.',fix:"Put visible text in the button, or an aria-label when it only holds an icon; give an input button a value.",wcag:["4.1.2","2.4.4"],act:["97a4e1","m6b1q3","2t702h"],example:{bad:'<button type="button"><span class="icon-close"></span></button>',good:'<button type="button" aria-label="Close"><span class="icon-close"></span></button>'}},{rules:["button-name",A("button-name")],message:"Buttons need text that names them",why:"A button without an accessible name leaves screen reader users unable to tell what it does.",fix:"Add visible button text, or provide an aria-label for an icon-only button.",wcag:["4.1.2"],act:["97a4e1"],example:{bad:'<button type="button"><span class="icon-close"></span></button>',good:'<button type="button" aria-label="Close"><span class="icon-close"></span></button>'}},{rules:[b("elements-content")],message:"Links, buttons and headings need text content",why:"Without content these elements are announced without a name, so screen reader users cannot tell what they are for.",fix:"Put text in the element, or an aria-label when it only holds an icon.",wcag:["2.4.4","4.1.2","2.4.6","1.3.1"],act:["c487ae","97a4e1","ffd0e9"],example:{bad:'<a href="/cart"></a>',good:'<a href="/cart">Cart</a>'}},{rules:[...h("heading-has-content"),m("heading-has-content"),u("a11y_missing_content")],message:"Headings need text content",why:"Screen reader users navigate by headings; an empty heading is a stop that says nothing.",fix:"Put text in the heading, or remove it.",wcag:["2.4.6","1.3.1"],act:["ffd0e9"],example:{bad:"<h2></h2>",good:"<h2>Shipping address</h2>"}},{rules:h("anchor-ambiguous-text"),message:"Link text must make sense on its own",why:'Screen reader users often list the links of a page; "click here" or "learn more" says nothing about the destination.',fix:"Name where the link goes or what it does.",wcag:["2.4.4"],act:["5effbb"],example:{bad:'<a href="/pricing">Click here</a>',good:'<a href="/pricing">See pricing</a>'}},{rules:[...h("iframe-has-title"),w("require-frame-title"),"frame-title"],message:"Frames need a title",why:"Screen readers announce a frame by its title; without one users cannot tell what the frame holds before entering it.",fix:"Add a title that describes the frame's content.",wcag:["4.1.2"],act:["cae760"],example:{bad:'<iframe src="https://maps.example.com/shop"></iframe>',good:'<iframe src="https://maps.example.com/shop" title="Map to our shop"></iframe>'}},{rules:[m("iframe-has-title")],message:"Iframes need an accessible name",why:"An accessible name tells users what the iframe contains before they enter it.",fix:"Add a title that describes the iframe's content. A title provides the broadest screen reader support.",wcag:["4.1.2"],act:["cae760"],example:{bad:'<iframe src="/map"></iframe>',good:'<iframe src="/map" title="Map to our shop"></iframe>'}},{rules:["frame-title-unique"],message:"Frames need distinct titles",why:"Frames with the same title sound identical, so screen reader users cannot tell them apart.",fix:"Give each frame a title that names its own content.",wcag:["4.1.2"],act:["4b1c6c"],example:{bad:`<div>
9
+ </map>`}},{rules:["object-alt"],message:"<object> elements need a text alternative",why:"Screen readers cannot describe the content an <object> embeds unless it has an accessible name.",fix:"Name the object with aria-label, aria-labelledby or title.",wcag:["1.1.1"],act:["8fc3b6"],example:{bad:'<object data="org-chart.svg" type="image/svg+xml"></object>',good:'<object data="org-chart.svg" type="image/svg+xml" aria-label="Organisation chart"></object>'}},{rules:["role-img-alt"],message:'Elements with role="img" need a text alternative',why:'An element with role="img" is announced as an image; without a name screen reader users learn nothing about it.',fix:"Name it with aria-label or aria-labelledby.",wcag:["1.1.1"],act:["23a2a8"],example:{bad:'<div role="img" class="rating-4"></div>',good:'<div role="img" class="rating-4" aria-label="Rated 4 of 5"></div>'}},{rules:["svg-img-alt"],message:"SVG images need a text alternative",why:'An <svg> with role="img" is announced as an image; without a name screen reader users learn nothing about it.',fix:"Name it with aria-label, aria-labelledby or a <title> child.",wcag:["1.1.1"],act:["7d6734"],example:{bad:'<svg role="img" viewBox="0 0 24 24"><path d="M3 12h18"></path></svg>',good:'<svg role="img" aria-label="Menu" viewBox="0 0 24 24"><path d="M3 12h18"></path></svg>'}},{rules:[...h("img-redundant-alt"),u("a11y_img_redundant_alt")],message:'Alt text should not say "image" or "picture"',why:"Screen readers already announce the element as an image, so the word is heard twice and adds nothing.",fix:"Describe what the image shows instead.",wcag:["1.1.1"],act:["qt1vmo"],example:{bad:'<img src="team.jpg" alt="Image of our team">',good:'<img src="team.jpg" alt="Our team at the summer meetup">'}},{rules:[u("a11y_missing_attribute")],message:"Element is missing an attribute it needs to be accessible",why:"Some elements only work for everyone with certain attributes: alt on images, href on links, lang on <html>, title on <iframe>.",fix:"Add the attribute the warning names, with a meaningful value.",wcag:["1.1.1","2.1.1","3.1.1","4.1.2"],act:["23a2a8","b5c3f8","cae760"],example:{bad:'<img src="chart.png">',good:'<img src="chart.png" alt="Sales rose 20% in May">'}},{rules:[...h("anchor-has-content"),m("anchor-has-content"),"link-name"],message:"Links need text that names them",why:'A link without text is announced as just "link", so screen reader users cannot tell where it goes.',fix:"Put visible text in the link, or an aria-label when it only holds an icon.",wcag:["2.4.4","4.1.2"],act:["c487ae"],example:{bad:'<a href="/cart"><span class="icon-cart" aria-hidden="true"></span></a>',good:'<a href="/cart"><span class="icon-cart" aria-hidden="true"></span> Cart</a>'}},{rules:["input-button-name","aria-command-name","summary-name",u("a11y_consider_explicit_label")],message:"Buttons need text that names them",why:'A button without text is announced as just "button", so screen reader users cannot tell what it does.',fix:"Put visible text in the button, or an aria-label when it only holds an icon; give an input button a value.",wcag:["4.1.2","2.4.4"],act:["97a4e1","m6b1q3","2t702h"],example:{bad:'<button type="button"><span class="icon-close"></span></button>',good:'<button type="button" aria-label="Close"><span class="icon-close"></span></button>'}},{rules:["button-name",x("button-name")],message:"Buttons need text that names them",why:"A button without an accessible name leaves screen reader users unable to tell what it does.",fix:"Add visible button text, or provide an aria-label for an icon-only button.",wcag:["4.1.2"],act:["97a4e1"],example:{bad:'<button type="button"><span class="icon-close"></span></button>',good:'<button type="button" aria-label="Close"><span class="icon-close"></span></button>'}},{rules:[b("elements-content")],message:"Links, buttons and headings need text content",why:"Without content these elements are announced without a name, so screen reader users cannot tell what they are for.",fix:"Put text in the element, or an aria-label when it only holds an icon.",wcag:["2.4.4","4.1.2","2.4.6","1.3.1"],act:["c487ae","97a4e1","ffd0e9"],example:{bad:'<a href="/cart"></a>',good:'<a href="/cart">Cart</a>'}},{rules:[...h("heading-has-content"),m("heading-has-content"),u("a11y_missing_content")],message:"Headings need text content",why:"Screen reader users navigate by headings; an empty heading is a stop that says nothing.",fix:"Put text in the heading, or remove it.",wcag:["2.4.6","1.3.1"],act:["ffd0e9"],example:{bad:"<h2></h2>",good:"<h2>Shipping address</h2>"}},{rules:h("anchor-ambiguous-text"),message:"Link text must make sense on its own",why:'Screen reader users often list the links of a page; "click here" or "learn more" says nothing about the destination.',fix:"Name where the link goes or what it does.",wcag:["2.4.4"],act:["5effbb"],example:{bad:'<a href="/pricing">Click here</a>',good:'<a href="/pricing">See pricing</a>'}},{rules:[...h("iframe-has-title"),w("require-frame-title"),"frame-title"],message:"Frames need a title",why:"Screen readers announce a frame by its title; without one users cannot tell what the frame holds before entering it.",fix:"Add a title that describes the frame's content.",wcag:["4.1.2"],act:["cae760"],example:{bad:'<iframe src="https://maps.example.com/shop"></iframe>',good:'<iframe src="https://maps.example.com/shop" title="Map to our shop"></iframe>'}},{rules:[m("iframe-has-title")],message:"Iframes need an accessible name",why:"An accessible name tells users what the iframe contains before they enter it.",fix:"Add a title that describes the iframe's content. A title provides the broadest screen reader support.",wcag:["4.1.2"],act:["cae760"],example:{bad:'<iframe src="/map"></iframe>',good:'<iframe src="/map" title="Map to our shop"></iframe>'}},{rules:["frame-title-unique"],message:"Frames need distinct titles",why:"Frames with the same title sound identical, so screen reader users cannot tell them apart.",fix:"Give each frame a title that names its own content.",wcag:["4.1.2"],act:["4b1c6c"],example:{bad:`<div>
7
10
  <iframe src="/videos/setup" title="Video"></iframe>
8
11
  <iframe src="/videos/cleaning" title="Video"></iframe>
9
12
  </div>`,good:`<div>
@@ -18,7 +21,7 @@ import{a as k,c as x,d as I}from"./chunk-6W3JS6DP.mjs";import{c as M,d as j,g as
18
21
  <map name="stores">
19
22
  <area shape="rect" coords="0,0,80,40" href="/stores/berlin" alt="Berlin">
20
23
  </map>
21
- </div>`}},{rules:[...h("aria-props"),...h("aria-proptypes"),m("aria-props"),b("valid-aria"),"aria-valid-attr","aria-valid-attr-value",u("a11y_unknown_aria_attribute"),u("a11y_incorrect_aria_attribute_type"),...["boolean","id","idlist","integer","token","tokenlist","tristate"].map(t=>u(`a11y_incorrect_aria_attribute_type_${t}`))],message:"ARIA attributes must exist and have valid values",why:"Assistive technology ignores a misspelled ARIA attribute or a value of the wrong type, so the state it should convey is lost.",fix:"Fix the spelling and use a value of the type the attribute takes, such as true or false for aria-expanded, or an existing id for aria-controls.",wcag:["4.1.2"],act:["5f99a7","6a7281"],example:{bad:'<button type="button" aria-expanded="yes" aria-labeledby="menu-label">Menu</button>',good:'<button type="button" aria-expanded="false">Menu</button>'}},{rules:[...h("aria-role"),m("aria-role"),"aria-roles","aria-deprecated-role",u("a11y_unknown_role"),u("a11y_no_abstract_role"),w("no-abstract-roles")],message:"Roles must be valid, concrete ARIA roles",why:"An unknown, abstract or deprecated role is ignored or misread, so assistive technology cannot tell what the element is.",fix:"Use a non-abstract, non-deprecated role from WAI-ARIA, or a native element that already has the role.",wcag:["4.1.2"],act:["674b10"],example:{bad:'<div role="alrt">Saved</div>',good:'<div role="alert">Saved</div>'}},{rules:[...h("aria-unsupported-elements"),m("aria-unsupported-elements"),u("a11y_aria_attributes"),u("a11y_misplaced_role")],message:"Elements that are never rendered take no role or ARIA attributes",why:"<meta>, <html>, <script> and <style> are not exposed to assistive technology, so a role or ARIA attribute on them does nothing.",fix:"Remove the role and aria-* attributes, or move them to the element they were meant for.",wcag:["4.1.2"],example:{bad:'<meta name="description" content="Handmade shoes" aria-hidden="true">',good:'<meta name="description" content="Handmade shoes">'},overrides:{svelte:{bad:`<svelte:head>
24
+ </div>`}},{rules:[...h("aria-props"),...h("aria-proptypes"),m("aria-props"),b("valid-aria"),"aria-valid-attr","aria-valid-attr-value",u("a11y_unknown_aria_attribute"),u("a11y_incorrect_aria_attribute_type"),...["boolean","id","idlist","integer","token","tokenlist","tristate"].map(a=>u(`a11y_incorrect_aria_attribute_type_${a}`))],message:"ARIA attributes must exist and have valid values",why:"Assistive technology ignores a misspelled ARIA attribute or a value of the wrong type, so the state it should convey is lost.",fix:"Fix the spelling and use a value of the type the attribute takes, such as true or false for aria-expanded, or an existing id for aria-controls.",wcag:["4.1.2"],act:["5f99a7","6a7281"],example:{bad:'<button type="button" aria-expanded="yes" aria-labeledby="menu-label">Menu</button>',good:'<button type="button" aria-expanded="false">Menu</button>'}},{rules:[...h("aria-role"),m("aria-role"),"aria-roles","aria-deprecated-role",u("a11y_unknown_role"),u("a11y_no_abstract_role"),w("no-abstract-roles")],message:"Roles must be valid, concrete ARIA roles",why:"An unknown, abstract or deprecated role is ignored or misread, so assistive technology cannot tell what the element is.",fix:"Use a non-abstract, non-deprecated role from WAI-ARIA, or a native element that already has the role.",wcag:["4.1.2"],act:["674b10"],example:{bad:'<div role="alrt">Saved</div>',good:'<div role="alert">Saved</div>'}},{rules:[...h("aria-unsupported-elements"),m("aria-unsupported-elements"),u("a11y_aria_attributes"),u("a11y_misplaced_role")],message:"Elements that are never rendered take no role or ARIA attributes",why:"<meta>, <html>, <script> and <style> are not exposed to assistive technology, so a role or ARIA attribute on them does nothing.",fix:"Remove the role and aria-* attributes, or move them to the element they were meant for.",wcag:["4.1.2"],example:{bad:'<meta name="description" content="Handmade shoes" aria-hidden="true">',good:'<meta name="description" content="Handmade shoes">'},overrides:{svelte:{bad:`<svelte:head>
22
25
  <meta name="description" content="Handmade shoes" aria-hidden="true">
23
26
  </svelte:head>`,good:`<svelte:head>
24
27
  <meta name="description" content="Handmade shoes">
@@ -56,7 +59,7 @@ import{a as k,c as x,d as I}from"./chunk-6W3JS6DP.mjs";import{c as M,d as j,g as
56
59
  <label for="qty">Quantity</label>
57
60
  <input type="number" id="qty" aria-describedby="qty-hint">
58
61
  <p id="qty-hint">Up to 10</p>
59
- </div>`}},{rules:["label-content-name-mismatch"],message:"The accessible name must contain the visible label",why:"Speech input users say what they see; when aria-label replaces the visible text with other words, the command does not match.",fix:"Start the accessible name with the visible text, or drop the aria-label.",wcag:["2.5.3"],act:["2ee8b8"],example:{bad:'<button type="button" aria-label="Submit form">Send</button>',good:'<button type="button">Send</button>'}},{rules:[...h("autocomplete-valid"),u("a11y_autocomplete_valid"),"autocomplete-valid",A("autocomplete-valid")],message:"autocomplete must use a valid autofill value",why:"Browsers and assistive technology use the autofill token to fill in and identify fields about the user, which helps people with memory, cognitive or motor impairments.",fix:"Use a token from the HTML standard, such as email, given-name, tel or shipping postal-code.",wcag:["1.3.5"],act:["73f2c2"],example:{bad:'<label>Email <input type="email" autocomplete="mail"></label>',good:'<label>Email <input type="email" autocomplete="email"></label>'}},{rules:[A("password-autocomplete")],message:"Password fields must let password managers fill them",why:'Logging in must not depend on remembering or retyping a password; autocomplete="off" keeps password managers out.',fix:'Use autocomplete="current-password" on a login form, or "new-password" where the password is chosen.',wcag:["3.3.8"],example:{bad:'<label>Password <input type="password" autocomplete="off"></label>',good:'<label>Password <input type="password" autocomplete="current-password"></label>'}},{rules:[...h("scope"),b("table-scope"),u("a11y_misplaced_scope")],message:"scope belongs on <th> only",why:"scope tells assistive technology which cells a header applies to; on a data cell it is ignored, so the header relationship is lost.",fix:"Make the cell a <th>, or remove scope.",wcag:["1.3.1"],example:{bad:`<table>
62
+ </div>`}},{rules:["label-content-name-mismatch",x("label-in-name")],message:"The accessible name must contain the visible label",why:"Speech input users say what they see; when aria-label replaces the visible text with other words, the command does not match.",fix:"Start the accessible name with the visible text, or drop the aria-label.",wcag:["2.5.3"],act:["2ee8b8"],example:{bad:'<button type="button" aria-label="Submit form">Send</button>',good:'<button type="button">Send</button>'}},{rules:[...h("autocomplete-valid"),u("a11y_autocomplete_valid"),"autocomplete-valid",x("autocomplete-valid")],message:"autocomplete must use a valid autofill value",why:"Browsers and assistive technology use the autofill token to fill in and identify fields about the user, which helps people with memory, cognitive or motor impairments.",fix:"Use a token from the HTML standard, such as email, given-name, tel or shipping postal-code.",wcag:["1.3.5"],act:["73f2c2"],example:{bad:'<label>Email <input type="email" autocomplete="mail"></label>',good:'<label>Email <input type="email" autocomplete="email"></label>'}},{rules:[x("password-autocomplete")],message:"Password fields must let password managers fill them",why:'Logging in must not depend on remembering or retyping a password; autocomplete="off" keeps password managers out.',fix:'Use autocomplete="current-password" on a login form, or "new-password" where the password is chosen.',wcag:["3.3.8"],example:{bad:'<label>Password <input type="password" autocomplete="off"></label>',good:'<label>Password <input type="password" autocomplete="current-password"></label>'}},{rules:[...h("scope"),b("table-scope"),u("a11y_misplaced_scope")],message:"scope belongs on <th> only",why:"scope tells assistive technology which cells a header applies to; on a data cell it is ignored, so the header relationship is lost.",fix:"Make the cell a <th>, or remove scope.",wcag:["1.3.1"],example:{bad:`<table>
60
63
  <tbody>
61
64
  <tr><td scope="row">Total</td><td>42</td></tr>
62
65
  </tbody>
@@ -163,15 +166,12 @@ import{a as k,c as x,d as I}from"./chunk-6W3JS6DP.mjs";import{c as M,d as j,g as
163
166
  @media (orientation: portrait) {
164
167
  .gallery { grid-template-columns: 1fr; }
165
168
  }
166
- </style>`},overrides:Object.fromEntries(["jsx","vue","svelte","angular","astro"].map(t=>[t,{language:"css",file:"styles.css",bad:`@media (orientation: portrait) {
169
+ </style>`},overrides:Object.fromEntries(["jsx","vue","svelte","angular","astro"].map(a=>[a,{language:"css",file:"styles.css",bad:`@media (orientation: portrait) {
167
170
  body { transform: rotate(90deg); }
168
171
  }`,good:`@media (orientation: portrait) {
169
172
  .gallery { grid-template-columns: 1fr; }
170
- }`}]))},{rules:["avoid-inline-spacing"],message:"Inline text spacing must stay adjustable",why:"People with dyslexia or low vision override letter, word and line spacing with their own styles; !important in a style attribute blocks that.",fix:"Remove !important from letter-spacing, word-spacing and line-height in style attributes.",wcag:["1.4.12"],act:["24afc2","78fd32","9e45ec"],example:{bad:'<p style="letter-spacing: 0.05em !important">Terms</p>',good:'<p style="letter-spacing: 0.05em">Terms</p>'},overrides:{jsx:{bad:"<p ref={p => p?.style.setProperty('letter-spacing', '0.05em', 'important')}>Terms</p>",good:"<p style={{ letterSpacing: '0.05em' }}>Terms</p>"}}},{rules:[A("text-contrast")],message:"Text needs enough contrast with its background",why:"Low-contrast text is hard or impossible to read for people with low vision or colour deficiencies, and for anyone in bright light.",fix:"Darken the text or lighten the background (or the other way round) until the ratio reaches 4.5:1, or 3:1 for large text (24 px, or 18.66 px bold).",wcag:["1.4.3"],act:["afw4f7"],details:!0,example:{bad:'<p style="color: #999999; background-color: #ffffff">Free returns</p>',good:'<p style="color: #595959; background-color: #ffffff">Free returns</p>'}},{rules:[A("non-text-contrast")],message:"Text field boundaries need enough contrast",why:"People with low vision cannot find a field whose border and background barely differ from what surrounds it.",fix:"Give the border, or the field's background, a contrast of at least 3:1 against the surrounding background.",wcag:["1.4.11"],details:!0,example:{bad:'<input type="text" aria-label="Search" style="border: 1px solid #dddddd; background-color: #ffffff">',good:'<input type="text" aria-label="Search" style="border: 1px solid #767676; background-color: #ffffff">'}}];var Z=["html","jsx","vue","svelte","angular","astro"];function xe(t){switch(t){case"javascriptreact":case"typescriptreact":return"jsx";case"vue":return"vue";case"svelte":return"svelte";case"angular":case"typescript":return"angular";case"astro":return"astro";default:return"html"}}var E=new Map;for(let t of N)for(let e of t.rules){if(E.has(e))throw new Error(`Rule ${e} has two docs entries`);E.set(e,t)}function ke(){return[...E.keys()].sort()}function T(t){let e=E.get(t);if(e)return{message:e.message,why:e.why,fix:e.fix,details:e.details??!1,wcag:e.wcag.map(n=>({criterion:n,title:`WCAG ${n} ${x(n)}`,url:I(n)})),act:(e.act??[]).map(n=>({title:`ACT rule: ${B[n]}`,url:`https://www.w3.org/WAI/standards-guidelines/act/rules/${n}/`})),examples:Object.fromEntries(Z.map(n=>[n,te(e,n)]))}}var U={html:"html",jsx:"jsx",vue:"vue",svelte:"svelte",angular:"html",astro:"astro"},ee={vue:"index.html",svelte:"src/app.html",angular:"src/index.html"};function te(t,e){let n=t.overrides?.[e];if(n)return{language:U[e],...n};let a=t.document?ee[e]:void 0;if(a)return{language:"html",file:a,...t.example};let s=ae[e];return{language:U[e],bad:s(t.example.bad),good:s(t.example.good)}}var L=/\son([a-z]+)="(\w+)\(\)"/g,ae={html:t=>t,astro:t=>t,jsx:ie,vue:t=>`<template>
171
- ${t.replace(L,' @$1="$2"').replace(/^/gm," ")}
172
- </template>`,svelte:t=>t.replace(L," on$1={$2}"),angular:t=>t.replace(L,' ($1)="$2()"')},ne={click:"onClick",keydown:"onKeyDown",mouseover:"onMouseOver",mouseout:"onMouseOut",focus:"onFocus",blur:"onBlur"},W={class:"className",for:"htmlFor",tabindex:"tabIndex",srclang:"srcLang",charset:"charSet",autocomplete:"autoComplete",autoplay:"autoPlay",colspan:"colSpan",usemap:"useMap","http-equiv":"httpEquiv"},re="area|br|col|embed|hr|img|input|link|meta|source|track|wbr";function ie(t){return t.replace(L,(e,n,a)=>` ${ne[n]}={${a}}`).replace(/\sstyle="([^"]*)"/g,(e,n)=>` style={{ ${oe(n)} }}`).replace(/(\s)([a-z-]+)(?=[\s=/>])/g,(e,n,a)=>W[a]?n+W[a]:e).replace(new RegExp(`<(${re})\\b([^>]*?)\\s*>`,"g"),"<$1$2 />")}function oe(t){return t.split(";").map(e=>e.trim()).filter(Boolean).map(e=>{let[n,...a]=e.split(":");return`${n.trim().replace(/-([a-z])/g,(o,i)=>i.toUpperCase())}: '${a.join(":").trim()}'`}).join(", ")}var G={"1.1.1":{level:"A",layer:"Check"},"1.2.1":{level:"A",layer:"Person"},"1.2.2":{level:"A",layer:"Person"},"1.2.3":{level:"A",layer:"Person"},"1.2.4":{level:"AA",layer:"Person"},"1.2.5":{level:"AA",layer:"Person"},"1.3.1":{level:"A",layer:"Check"},"1.3.2":{level:"A",layer:"AI Review"},"1.3.3":{level:"A",layer:"AI Review"},"1.3.4":{level:"AA",layer:"Browser audit"},"1.3.5":{level:"AA",layer:"Check"},"1.4.1":{level:"A",layer:"AI Review"},"1.4.2":{level:"A",layer:"Browser audit"},"1.4.3":{level:"AA",layer:"Browser audit"},"1.4.4":{level:"AA",layer:"Browser audit"},"1.4.5":{level:"AA",layer:"Person"},"1.4.10":{level:"AA",layer:"Browser audit"},"1.4.11":{level:"AA",layer:"Browser audit"},"1.4.12":{level:"AA",layer:"Browser audit"},"1.4.13":{level:"AA",layer:"Browser audit"},"2.1.1":{level:"A",layer:"Check"},"2.1.2":{level:"A",layer:"Browser audit"},"2.1.4":{level:"A",layer:"Person"},"2.2.1":{level:"A",layer:"Person"},"2.2.2":{level:"A",layer:"Browser audit"},"2.3.1":{level:"A",layer:"Person"},"2.4.1":{level:"A",layer:"Browser audit"},"2.4.2":{level:"A",layer:"Check"},"2.4.3":{level:"A",layer:"Check"},"2.4.4":{level:"A",layer:"Check"},"2.4.5":{level:"AA",layer:"Person"},"2.4.6":{level:"AA",layer:"Check"},"2.4.7":{level:"AA",layer:"Browser audit"},"2.4.11":{level:"AA",layer:"Browser audit"},"2.5.1":{level:"A",layer:"Person"},"2.5.2":{level:"A",layer:"Browser audit"},"2.5.3":{level:"A",layer:"AI Review"},"2.5.4":{level:"A",layer:"Person"},"2.5.7":{level:"AA",layer:"Person"},"2.5.8":{level:"AA",layer:"Browser audit"},"3.1.1":{level:"A",layer:"Check"},"3.1.2":{level:"AA",layer:"Check"},"3.2.1":{level:"A",layer:"AI Review"},"3.2.2":{level:"A",layer:"AI Review"},"3.2.3":{level:"AA",layer:"Person"},"3.2.4":{level:"AA",layer:"Person"},"3.2.6":{level:"A",layer:"Person"},"3.3.1":{level:"A",layer:"AI Review"},"3.3.2":{level:"A",layer:"AI Review"},"3.3.3":{level:"AA",layer:"AI Review"},"3.3.4":{level:"AA",layer:"Person"},"3.3.7":{level:"A",layer:"Person"},"3.3.8":{level:"AA",layer:"Person"},"4.1.2":{level:"A",layer:"Check"},"4.1.3":{level:"AA",layer:"AI Review"}};var R={html:"HTML",javascriptreact:"JSX",typescriptreact:"TSX",vue:"Vue",svelte:"Svelte",angular:"Angular",typescript:"Angular (TS)",astro:"Astro"};function D(t){return R[t]??t}function H(){let t=G,e=M.rules,n=j,a=new Set,s=new Map;for(let[r,l]of Object.entries(n))for(let g of l??[]){a.add(`${r}:${g}`);let c=T(g);if(c)for(let p of c.wcag){let y=s.get(p.criterion)??[];y.push({languageId:r,languageLabel:D(r),ruleId:g}),s.set(p.criterion,y)}}let o=new Map;for(let[r,l]of Object.entries(e)){let g=T(r);if(!(!g||!l)){for(let[c,p]of Object.entries(l))if(!(!p?.proven||a.has(`${c}:${r}`)))for(let y of g.wcag){let C=o.get(y.criterion)??[];C.push({languageId:c,languageLabel:D(c),ruleId:r,correct:p.correct,wrong:p.wrong,lowerBound:p.lowerBound}),o.set(y.criterion,C)}}}let i=r=>[...r].sort((l,g)=>l.languageLabel.localeCompare(g.languageLabel)||l.ruleId.localeCompare(g.ruleId));return k.map(r=>{let l=t[r];if(!l)throw new Error(`Missing coverage assignment for WCAG ${r}`);let g=l.layer==="Check";return{criterion:r,name:x(r),url:I(r),level:l.level,layer:l.layer,provenRules:g?i(o.get(r)??[]):[],bestPracticeRules:g?i(s.get(r)??[]):[]}})}function Te(t){let e=H(),n=e.filter(r=>r.layer==="Check"),a=n.filter(r=>r.provenRules.length>0).length,s=t.files.filter(r=>r.status==="checked"),o=t.files.reduce((r,l)=>r+l.ignored,0);return[`# Allyward Check report: ${v(t.project)}`,"",`> This report lists what Allyward's automated Check found. Automated checking covers only part of WCAG 2.2 AA: ${a} of ${e.length} criteria are checked in code, with a Proven rule in at least one language, and ${n.length-a} more give Needs Review only; the rest need a browser audit or a person. It does not establish WCAG conformance or legal compliance and does not replace an audit.`,"","| | |","| --- | --- |",`| Project | ${v(t.project)} |`,`| Date | ${t.date.toISOString().slice(0,10)} |`,`| Allyward version | ${v(t.version)} |`,`| Files checked | ${s.length} |`,"",...le(t.files,o),"",...de(t.files),"",...ce(t.files),"","## Ignored Findings","",`${f(o,"Finding is","Findings are")} ignored by an \`allyward-ignore\` comment and not listed.`,...ue(t.files),"",...he(e)].join(`
173
- `)+`
174
- `}var f=(t,e,n=`${e}s`)=>`${t} ${t===1?e:n}`;function le(t,e){let n=t.flatMap(o=>o.findings),a=o=>n.filter(i=>i.severity===o).length,s=t.filter(o=>o.status==="failed").length;return["## Summary","",`- ${f(n.length,"Finding")}: ${f(a("error"),"error")}, ${f(a("warning"),"warning")}, ${a("information")} information`,`- ${f(n.filter(o=>o.baselined).length,"baselined Finding")}`,`- ${f(e,"ignored Finding")}`,`- ${f(t.reduce((o,i)=>o+i.needsReview.length,0),"Needs Review entry","Needs Review entries")}`,...s?[`- ${f(s,"file")} could not be checked`]:[]]}function de(t){let e=t.flatMap(n=>n.findings.map(a=>({file:n.file,line:a.range.start.line,criterion:a.criteria[0],finding:a})));return e.length===0?["## Findings","","The Check found no Findings."]:["## Findings","",...V(e,["Location","Severity","Rule","Message"],({file:n,line:a,finding:s})=>[$(`${n}:${a}`),s.baselined?`${s.severity}, baselined`:s.severity,$(s.ruleId),v(s.message)+(s.criteria.length>1?` (also WCAG ${s.criteria.slice(1).join(", ")})`:"")])]}function ce(t){let e=t.flatMap(n=>n.needsReview.map(a=>({file:n.file,line:a.range?.start.line??0,criterion:a.criterion,entry:a})));return["## Needs Review (not Findings)","","These are not Findings: the Check cannot decide them from source code alone, so a person, an AI Review or a browser audit has to verify each one.",...e.length?["",...V(e,["Location","Rule","Reason"],({file:n,entry:a})=>[$(a.range?`${n}:${a.range.start.line}`:n),a.ruleId?$(a.ruleId):"",v(a.reason)])]:["","The Check left nothing to review."]]}function ue(t){let e=t.filter(n=>n.status==="failed").sort((n,a)=>z(n.file,a.file));return e.length===0?[]:["","## Files not checked","","| File | Reason |","| --- | --- |",...e.map(n=>`| ${$(n.file)} | ${v(n.error??"unknown")} |`)]}function he(t){let e=Object.keys(R),n=a=>{if(a.layer!=="Check")return"";let s=e.filter(i=>a.provenRules.some(r=>r.languageId===i)),o=e.filter(i=>!s.includes(i)).map(i=>R[i]);return s.length===0?"No Proven rule yet: Needs Review only":`Proven in ${s.map(i=>R[i]).join(", ")}${o.length?`; Needs Review only in ${o.join(", ")}`:""}`};return["## WCAG 2.2 AA coverage","","Every WCAG 2.2 level A and AA criterion (4.1.1 Parsing is obsolete) with the Layer that verifies it: the Check in code, an AI Review, a browser audit or a person. A Check criterion reports Findings only in the languages where it has a Proven rule; elsewhere its matches are Needs Review.","","| Criterion | Level | Layer | Check proof status per language |","| --- | --- | --- | --- |",...t.map(a=>`| [${a.criterion} ${v(a.name)}](${a.url}) | ${a.level} | ${a.layer} | ${n(a)} |`)]}function V(t,e,n){let a=o=>{let i=k.indexOf(o);return i===-1?k.length:i};return[...new Set(t.map(o=>o.criterion))].sort((o,i)=>a(o)-a(i)||o.localeCompare(i)).flatMap(o=>[`### ${o} ${v(x(o))}`,"",`| ${e.join(" | ")} |`,`| ${e.map(()=>"---").join(" | ")} |`,...t.filter(i=>i.criterion===o).sort((i,r)=>z(i.file,r.file)||i.line-r.line).map(i=>`| ${n(i).join(" | ")} |`),""]).slice(0,-1)}var z=(t,e)=>t<e?-1:t>e?1:0;function $(t){let e=t.replace(/[\r\n]+/g," ").replace(/\|/g,"\\|"),n="`".repeat(Math.max(0,...[...e.matchAll(/`+/g)].map(a=>a[0].length))+1);return n.length>1?`${n} ${e} ${n}`:`\`${e}\``}function v(t){return t.replace(/\s*[\r\n]+\s*/g," ").replace(/[\\`*_[\]<>|#~&!]/g,e=>`\\${e}`)}var X={html:"html",htm:"html",vue:"vue",svelte:"svelte",jsx:"javascriptreact",tsx:"typescriptreact",astro:"astro",ts:"typescript"},Fe=`**/*.{${Object.keys(X).join(",")}}`;function Me(t){let e=/\.([^./]+)$/.exec(t)?.[1].toLowerCase();return e===void 0?void 0:X[e]}var Ne=1;async function Ue(t,e,n,a,s){let o={languageId:e,text:n};if(!q(o))return;let i=await a(o);if(i.status!=="done"){let r=i.status==="paused"?i.reason:"The Check was interrupted";return{file:t,languageId:e,status:"failed",error:r,findings:[],needsReview:[],ignored:0}}return ge(t,e,n,i.result,s?.(i.result)??i.result.findings.map(()=>!1))}function ge(t,e,n,a,s){let o=F(n),i=l=>{let g=o.length;for(;o[g-1]>l;)g--;return{line:g,column:l-o[g-1]+1,offset:l}},r=l=>({start:i(l.start),end:i(l.end)});return{file:t,languageId:e,status:"checked",findings:a.findings.map((l,g)=>({ruleId:l.ruleId,criteria:l.criteria,severity:l.severity,layer:"check",message:l.message,helpUrl:l.helpUrl,proof:"proven",range:r(l.range),...l.fix?{fix:l.fix.map(c=>({range:r(c.range),newText:c.newText}))}:{},baselined:s[g]})),needsReview:a.needsReview.map(l=>({criterion:l.criterion,reason:l.reason,...l.ruleId?{ruleId:l.ruleId,proof:"unproven"}:{},...l.range?{range:r(l.range)}:{}})),ignored:a.ignored??0}}var d={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",cyan:"\x1B[36m"};function We(t=process.stdout,e=process.env){return e.NO_COLOR!==void 0&&e.NO_COLOR!==""?!1:e.FORCE_COLOR!==void 0&&e.FORCE_COLOR!=="0"?!0:!!t.isTTY}function Ge(t,e={}){let n=!!e.color,a=(o,i)=>n?`${o}${i}${d.reset}`:i;return[` ${a(d.dim,"\u256D\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E")} ${a(d.bold+d.cyan,"allyward")} ${a(d.dim,`v${t}`)}`,` ${a(d.dim,"\u2502")} ${a(d.green,"\u2593\u2593\u2593\u2593\u2593\u2593\u2593")} ${a(d.dim,"\u2502")} Local WCAG 2.2 AA accessibility checker`,` ${a(d.dim,"\u2502")} ${a(d.green,"\u2593 \u2714 \u2593")} ${a(d.dim,"\u2502")} ${a(d.dim,"HTML \xB7 React \xB7 Vue \xB7 Svelte \xB7 Angular \xB7 Astro")}`,` ${a(d.dim,"\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F")} ${a(d.dim,"Offline \xB7 Zero telemetry \xB7 Zero workspace code execution")}`,""].join(`
175
- `)}function De(t,e={}){let n=!!e.color,a=(r,l)=>n?`${r}${l}${d.reset}`:l,s=[];n&&s.push(a(d.dim,"\u256D\u2500 ")+a(d.bold+d.cyan,"allyward")+a(d.dim," \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));for(let r of t.files){if(r.status==="failed"){s.push(a(d.bold+d.underline,r.file),` ${a(d.red,"could not be checked:")} ${r.error}`,"");continue}let l=r.findings.filter(c=>!c.baselined),g=r.needsReview.filter(c=>c.range);if(!(l.length===0&&g.length===0)){s.push(a(d.bold+d.underline,r.file));for(let c of l){let p=a(d.dim,`${c.range.start.line}:${c.range.start.column}`),y=c.severity==="error"?d.red:c.severity==="warning"?d.yellow:d.cyan,C=a(y,c.severity.padEnd(11)),Q=a(d.dim,`WCAG ${c.criteria[0]} ${c.ruleId}`);s.push(` ${p} ${C} ${c.message} ${Q}`,` ${a(d.dim,c.helpUrl)}`)}for(let c of g){let p=a(d.dim,`${c.range.start.line}:${c.range.start.column}`);s.push(` ${p} ${a(d.yellow,"needs review")} WCAG ${c.criterion}: ${c.reason}`)}s.push("")}}let o=t.summary,i=[`${o.files} ${o.files===1?"file":"files"} checked`,`${o.blocking} blocking ${o.blocking===1?"Finding":"Findings"}`,...o.findings>o.blocking?[`${o.findings-o.blocking} not blocking`]:[],...o.baselined||o.fixedSinceBaseline?[`${o.baselined} baselined (${o.fixedSinceBaseline} fixed since the baseline)`]:[],`${o.needsReview} Needs Review`,...o.failedFiles?[`${o.failedFiles} could not be checked`]:[]];if(n){let l=o.blocking===0&&o.failedFiles===0?a(d.bold+d.green,"\u2714"):a(d.bold+d.red,"\u2716");s.push(a(d.dim,"\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),s.push(`${l} ${i.join(", ")}`)}else s.push(i.join(", "));return s.join(`
173
+ }`}]))},{rules:["avoid-inline-spacing",x("text-spacing")],message:"Inline text spacing must stay adjustable",why:"People with dyslexia or low vision override letter, word and line spacing with their own styles; !important in a style attribute blocks that.",fix:"Remove !important from letter-spacing, word-spacing and line-height in style attributes.",wcag:["1.4.12"],act:["24afc2","78fd32","9e45ec"],example:{bad:'<p style="letter-spacing: 0.05em !important">Terms</p>',good:'<p style="letter-spacing: 0.05em">Terms</p>'},overrides:{jsx:{bad:"<p ref={p => p?.style.setProperty('letter-spacing', '0.05em', 'important')}>Terms</p>",good:"<p style={{ letterSpacing: '0.05em' }}>Terms</p>"}}},{rules:[x("text-contrast")],message:"Text needs enough contrast with its background",why:"Low-contrast text is hard or impossible to read for people with low vision or colour deficiencies, and for anyone in bright light.",fix:"Darken the text or lighten the background (or the other way round) until the ratio reaches 4.5:1, or 3:1 for large text (24 px, or 18.66 px bold).",wcag:["1.4.3"],act:["afw4f7"],details:!0,example:{bad:'<p style="color: #999999; background-color: #ffffff">Free returns</p>',good:'<p style="color: #595959; background-color: #ffffff">Free returns</p>'}},{rules:[x("non-text-contrast")],message:"Text field boundaries need enough contrast",why:"People with low vision cannot find a field whose border and background barely differ from what surrounds it.",fix:"Give the border, or the field's background, a contrast of at least 3:1 against the surrounding background.",wcag:["1.4.11"],details:!0,example:{bad:'<input type="text" aria-label="Search" style="border: 1px solid #dddddd; background-color: #ffffff">',good:'<input type="text" aria-label="Search" style="border: 1px solid #767676; background-color: #ffffff">'}}];var ne=["html","jsx","vue","svelte","angular","astro"];function Be(a){switch(a){case"javascriptreact":case"typescriptreact":return"jsx";case"vue":return"vue";case"svelte":return"svelte";case"angular":case"typescript":return"angular";case"astro":return"astro";default:return"html"}}var P=new Map;for(let a of G)for(let e of a.rules){if(P.has(e))throw new Error(`Rule ${e} has two docs entries`);P.set(e,a)}function je(){return[...P.keys()].sort()}function T(a){let e=P.get(a);if(e)return{message:e.message,why:e.why,fix:e.fix,details:e.details??!1,wcag:e.wcag.map(t=>({criterion:t,title:`WCAG ${t} ${k(t)}`,url:S(t)})),act:(e.act??[]).map(t=>({title:`ACT rule: ${W[t]}`,url:`https://www.w3.org/WAI/standards-guidelines/act/rules/${t}/`})),examples:Object.fromEntries(ne.map(t=>[t,ie(e,t)]))}}var D={html:"html",jsx:"jsx",vue:"vue",svelte:"svelte",angular:"html",astro:"astro"},re={vue:"index.html",svelte:"src/app.html",angular:"src/index.html"};function ie(a,e){let t=a.overrides?.[e];if(t)return{language:D[e],...t};let n=a.document?re[e]:void 0;if(n)return{language:"html",file:n,...a.example};let s=oe[e];return{language:D[e],bad:s(a.example.bad),good:s(a.example.good)}}var L=/\son([a-z]+)="(\w+)\(\)"/g,oe={html:a=>a,astro:a=>a,jsx:de,vue:a=>`<template>
174
+ ${a.replace(L,' @$1="$2"').replace(/^/gm," ")}
175
+ </template>`,svelte:a=>a.replace(L," on$1={$2}"),angular:a=>a.replace(L,' ($1)="$2()"')},se={click:"onClick",keydown:"onKeyDown",mouseover:"onMouseOver",mouseout:"onMouseOut",focus:"onFocus",blur:"onBlur"},H={class:"className",for:"htmlFor",tabindex:"tabIndex",srclang:"srcLang",charset:"charSet",autocomplete:"autoComplete",autoplay:"autoPlay",colspan:"colSpan",usemap:"useMap","http-equiv":"httpEquiv"},le="area|br|col|embed|hr|img|input|link|meta|source|track|wbr";function de(a){return a.replace(L,(e,t,n)=>` ${se[t]}={${n}}`).replace(/\sstyle="([^"]*)"/g,(e,t)=>` style={{ ${ce(t)} }}`).replace(/(\s)([a-z-]+)(?=[\s=/>])/g,(e,t,n)=>H[n]?t+H[n]:e).replace(new RegExp(`<(${le})\\b([^>]*?)\\s*>`,"g"),"<$1$2 />")}function ce(a){return a.split(";").map(e=>e.trim()).filter(Boolean).map(e=>{let[t,...n]=e.split(":");return`${t.trim().replace(/-([a-z])/g,(o,i)=>i.toUpperCase())}: '${n.join(":").trim()}'`}).join(", ")}var V={"1.1.1":{level:"A",layer:"Check"},"1.2.1":{level:"A",layer:"Person"},"1.2.2":{level:"A",layer:"Person"},"1.2.3":{level:"A",layer:"Person"},"1.2.4":{level:"AA",layer:"Person"},"1.2.5":{level:"AA",layer:"Person"},"1.3.1":{level:"A",layer:"Check"},"1.3.2":{level:"A",layer:"AI Review"},"1.3.3":{level:"A",layer:"AI Review"},"1.3.4":{level:"AA",layer:"Browser audit"},"1.3.5":{level:"AA",layer:"Check"},"1.4.1":{level:"A",layer:"AI Review"},"1.4.2":{level:"A",layer:"Browser audit"},"1.4.3":{level:"AA",layer:"Browser audit"},"1.4.4":{level:"AA",layer:"Check"},"1.4.5":{level:"AA",layer:"Person"},"1.4.10":{level:"AA",layer:"Browser audit"},"1.4.11":{level:"AA",layer:"Browser audit"},"1.4.12":{level:"AA",layer:"Check"},"1.4.13":{level:"AA",layer:"Browser audit"},"2.1.1":{level:"A",layer:"Check"},"2.1.2":{level:"A",layer:"Browser audit"},"2.1.4":{level:"A",layer:"Person"},"2.2.1":{level:"A",layer:"Check"},"2.2.2":{level:"A",layer:"Check"},"2.3.1":{level:"A",layer:"Person"},"2.4.1":{level:"A",layer:"Browser audit"},"2.4.2":{level:"A",layer:"Check"},"2.4.3":{level:"A",layer:"Check"},"2.4.4":{level:"A",layer:"Check"},"2.4.5":{level:"AA",layer:"Person"},"2.4.6":{level:"AA",layer:"Check"},"2.4.7":{level:"AA",layer:"Browser audit"},"2.4.11":{level:"AA",layer:"Browser audit"},"2.5.1":{level:"A",layer:"Person"},"2.5.2":{level:"A",layer:"Browser audit"},"2.5.3":{level:"A",layer:"Check"},"2.5.4":{level:"A",layer:"Person"},"2.5.7":{level:"AA",layer:"Person"},"2.5.8":{level:"AA",layer:"Browser audit"},"3.1.1":{level:"A",layer:"Check"},"3.1.2":{level:"AA",layer:"Check"},"3.2.1":{level:"A",layer:"AI Review"},"3.2.2":{level:"A",layer:"AI Review"},"3.2.3":{level:"AA",layer:"Person"},"3.2.4":{level:"AA",layer:"Person"},"3.2.6":{level:"A",layer:"Person"},"3.3.1":{level:"A",layer:"AI Review"},"3.3.2":{level:"A",layer:"AI Review"},"3.3.3":{level:"AA",layer:"AI Review"},"3.3.4":{level:"AA",layer:"Person"},"3.3.7":{level:"A",layer:"Person"},"3.3.8":{level:"AA",layer:"Person"},"4.1.2":{level:"A",layer:"Check"},"4.1.3":{level:"AA",layer:"AI Review"}};var R={html:"HTML",javascriptreact:"JSX",typescriptreact:"TSX",vue:"Vue",svelte:"Svelte",angular:"Angular",typescript:"Angular (TS)",astro:"Astro"};function z(a){return R[a]??a}function X(){let a=V,e=j.rules,t=q,n=new Set,s=new Map;for(let[r,l]of Object.entries(t))for(let g of l??[]){n.add(`${r}:${g}`);let c=T(g);if(c)for(let p of c.wcag){let y=s.get(p.criterion)??[];y.push({languageId:r,languageLabel:z(r),ruleId:g}),s.set(p.criterion,y)}}let o=new Map;for(let[r,l]of Object.entries(e)){let g=T(r);if(!(!g||!l)){for(let[c,p]of Object.entries(l))if(!(!p?.proven||n.has(`${c}:${r}`)))for(let y of g.wcag){let C=o.get(y.criterion)??[];C.push({languageId:c,languageLabel:z(c),ruleId:r,correct:p.correct,wrong:p.wrong,lowerBound:p.lowerBound}),o.set(y.criterion,C)}}}let i=r=>[...r].sort((l,g)=>l.languageLabel.localeCompare(g.languageLabel)||l.ruleId.localeCompare(g.ruleId));return A.map(r=>{let l=a[r];if(!l)throw new Error(`Missing coverage assignment for WCAG ${r}`);let g=l.layer==="Check";return{criterion:r,name:k(r),url:S(r),level:l.level,layer:l.layer,provenRules:g?i(o.get(r)??[]):[],bestPracticeRules:g?i(s.get(r)??[]):[]}})}function Je(a){let e=X(),t=e.filter(r=>r.layer==="Check"),n=t.filter(r=>r.provenRules.length>0).length,s=a.files.filter(r=>r.status==="checked"),o=a.files.reduce((r,l)=>r+l.ignored,0);return[`# Allyward Check report: ${v(a.project)}`,"",`> This report lists what Allyward's automated Check found. Automated checking covers only part of WCAG 2.2 AA: ${n} of ${e.length} criteria are checked in code, with a Proven rule in at least one language, and ${t.length-n} more give Needs Review only; the rest need a browser audit or a person. It does not establish WCAG conformance or legal compliance and does not replace an audit.`,"","| | |","| --- | --- |",`| Project | ${v(a.project)} |`,`| Date | ${a.date.toISOString().slice(0,10)} |`,`| Allyward version | ${v(a.version)} |`,`| Files checked | ${s.length} |`,"",...he(a.files,o),"",...ge(a.files),"",...me(a.files),"","## Ignored Findings","",`${f(o,"Finding is","Findings are")} ignored by an \`allyward-ignore\` comment and not listed.`,...pe(a.files),"",...be(e)].join(`
176
176
  `)+`
177
- `}var me={error:"error",warning:"warning",information:"note"};function He(t,e){let n=i=>({startLine:i.start.line,startColumn:i.start.column,endLine:i.end.line,endColumn:i.end.column}),a=(i,r)=>[{physicalLocation:{artifactLocation:{uri:i},region:n(r)}}],s=new Map,o=t.files.flatMap(i=>[...i.findings.map(r=>(s.has(r.ruleId)||s.set(r.ruleId,{id:r.ruleId,helpUri:r.helpUrl,shortDescription:{text:r.message}}),{ruleId:r.ruleId,level:me[r.severity],message:{text:`${r.message} (WCAG ${r.criteria.join(", ")})`},locations:a(i.file,r.range),...r.baselined?{suppressions:[{kind:"external",justification:"In the Allyward baseline"}]}:{}})),...i.needsReview.flatMap(r=>r.range?[{ruleId:r.ruleId??`needs-review/${r.criterion}`,level:"note",message:{text:`Needs Review, WCAG ${r.criterion}: ${r.reason}`},locations:a(i.file,r.range)}]:[]),...i.status==="failed"?[{ruleId:"allyward/not-checked",level:"error",message:{text:`Could not be checked: ${i.error}`},locations:[{physicalLocation:{artifactLocation:{uri:i.file}}}]}]:[]]);for(let i of o)s.has(i.ruleId)||s.set(i.ruleId,{id:i.ruleId,shortDescription:{text:i.message.text}});return{$schema:"https://json.schemastore.org/sarif-2.1.0.json",version:"2.1.0",runs:[{tool:{driver:{name:"Allyward",version:e,informationUri:"https://github.com/NotAisu/allyward",rules:[...s.values()]}},results:o}]}}import{Worker as pe}from"worker_threads";var _=3,Y=3*6e4,J=`${Y/6e4} minutes`,be=512,K=class{constructor(e,n={}){let a=n.now??Date.now,{log:s}=n;this.breaker=new O(a,s);let o={script:e,firstLoadMs:n.firstLoadMs??15e3,breaker:this.breaker,now:a,log:s};this.typing=new P({...o,name:"typing worker",deadlineMs:n.deadlineMs??1e3}),this.background=new P({...o,name:"background worker",deadlineMs:n.backgroundDeadlineMs??1e4})}engines(){return this.breaker.engines()}check(e,n,a={},{background:s=!1}={}){return new Promise(o=>{let[i,r]=s?[this.background,this.typing]:[this.typing,this.background];i.drop(e),r.drop(e,{running:!0}),i.add({key:e,document:n,options:a,resolve:o})})}dispose(){this.typing.dispose(),this.background.dispose()}},O=class{constructor(e,n){this.now=e;this.log=n;this.failures=new Map;this.checkedLanguages=new Set}engines(){return{used:[...this.checkedLanguages].sort(),paused:[...this.failures].filter(([,e])=>e.length>=_).map(([e])=>e).sort()}}pausedReason(e){if(!((this.failures.get(e)?.length??0)<_))return`The ${e} engine failed ${_} times within ${J} and is paused for this session`}recordUse(e){this.checkedLanguages.add(e)}recordFailure(e){let n=this.now(),a=[...(this.failures.get(e)??[]).filter(s=>n-s<=Y),n];this.failures.set(e,a),a.length===_&&this.log?.error(`${e} engine paused for this session after ${_} failures within ${J}`)}},P=class{constructor(e){this.options=e;this.pending=new Map;this.loaded=new Set}drop(e,{running:n=!1}={}){this.pending.get(e)?.resolve({status:"dropped"}),this.pending.delete(e),n&&this.running?.request.key===e&&(this.running.request.resolve({status:"dropped"}),this.running.request={...this.running.request,resolve:()=>{}})}add(e){this.pending.set(e.key,e),this.next()}dispose(){this.running&&(clearTimeout(this.running.deadline),this.running.request.resolve({status:"dropped"})),this.running=void 0,this.pending.forEach(e=>e.resolve({status:"dropped"})),this.pending.clear(),this.worker?.terminate(),this.worker=void 0}next(){if(this.running)return;let[e]=this.pending.values();if(!e)return;this.pending.delete(e.key);let{breaker:n,name:a,log:s,now:o}=this.options,i=e.document.languageId,r=n.pausedReason(i);if(r!==void 0)return e.resolve({status:"paused",reason:r,deadlineExceeded:!1}),this.next();n.recordUse(i),this.worker??=this.spawn();let l=!this.loaded.has(i),g=l?this.options.firstLoadMs:this.options.deadlineMs,c=setTimeout(()=>{this.worker?.terminate(),this.worker=void 0,s?.warn(`${i} Check took longer than ${g} ms; the ${a} is restarted`),this.finish({status:"paused",reason:`The Check took longer than ${g} ms`,deadlineExceeded:!0},!1)},g);this.running={request:e,deadline:c,started:o(),firstLoad:l},this.worker.postMessage({document:e.document,options:e.options})}finish(e,n=e.status==="paused"){this.running&&(clearTimeout(this.running.deadline),n&&this.options.breaker.recordFailure(this.running.request.document.languageId),this.running.request.resolve(e),this.running=void 0,this.next())}spawn(){let{script:e,name:n,log:a,now:s}=this.options,o=new pe(e,{resourceLimits:{maxOldGenerationSizeMb:be}});this.loaded=new Set,a?.info(`The ${n} started`),o.on("message",r=>{if(o!==this.worker||!this.running)return;let{request:l,started:g,firstLoad:c}=this.running;this.loaded.add(l.document.languageId),"result"in r?this.finish({status:"done",result:r.result,durationMs:s()-g,firstLoad:c}):"parseError"in r?(a?.warn(`${l.document.languageId} Check paused: parse error at ${S(r.position)}`),this.finish({status:"paused",reason:r.parseError,deadlineExceeded:!1},!1)):(a?.error(`${l.document.languageId} engine failed: ${S(r.error)}`),this.finish({status:"paused",reason:r.error,deadlineExceeded:!1}))});let i=r=>{o===this.worker&&(this.worker=void 0,a?.error(S(this.running?`${this.running.request.document.languageId} engine: ${r}`:r)),this.finish({status:"paused",reason:r,deadlineExceeded:!1}))};return o.on("error",r=>i(`The ${n} crashed: ${r.message}`)),o.on("exit",r=>i(`The ${n} stopped (exit code ${r})`)),o.unref(),o}};export{S as a,K as b,xe as c,ke as d,T as e,Te as f,Fe as g,Me as h,Ne as i,Ue as j,We as k,Ge as l,De as m,He as n};
177
+ `}var f=(a,e,t=`${e}s`)=>`${a} ${a===1?e:t}`;function he(a,e){let t=a.flatMap(o=>o.findings),n=o=>t.filter(i=>i.severity===o).length,s=a.filter(o=>o.status==="failed").length;return["## Summary","",`- ${f(t.length,"Finding")}: ${f(n("error"),"error")}, ${f(n("warning"),"warning")}, ${n("information")} information`,`- ${f(t.filter(o=>o.baselined).length,"baselined Finding")}`,`- ${f(e,"ignored Finding")}`,`- ${f(a.reduce((o,i)=>o+i.needsReview.length,0),"Needs Review entry","Needs Review entries")}`,...s?[`- ${f(s,"file")} could not be checked`]:[]]}function ge(a){let e=a.flatMap(t=>t.findings.map(n=>({file:t.file,line:n.range.start.line,criterion:n.criteria[0],finding:n})));return e.length===0?["## Findings","","The Check found no Findings."]:["## Findings","",...J(e,["Location","Severity","Rule","Message"],({file:t,line:n,finding:s})=>[$(`${t}:${n}`),s.baselined?`${s.severity}, baselined`:s.severity,$(s.ruleId),v(s.message)+(s.criteria.length>1?` (also WCAG ${s.criteria.slice(1).join(", ")})`:"")])]}function me(a){let e=a.flatMap(t=>t.needsReview.map(n=>({file:t.file,line:n.range?.start.line??0,criterion:n.criterion,entry:n})));return["## Needs Review (not Findings)","","These are not Findings: the Check cannot decide them from source code alone, so a person, an AI Review or a browser audit has to verify each one.",...e.length?["",...J(e,["Location","Rule","Reason"],({file:t,entry:n})=>[$(n.range?`${t}:${n.range.start.line}`:t),n.ruleId?$(n.ruleId):"",v(n.reason)])]:["","The Check left nothing to review."]]}function pe(a){let e=a.filter(t=>t.status==="failed").sort((t,n)=>K(t.file,n.file));return e.length===0?[]:["","## Files not checked","","| File | Reason |","| --- | --- |",...e.map(t=>`| ${$(t.file)} | ${v(t.error??"unknown")} |`)]}function be(a){let e=Object.keys(R),t=n=>{if(n.layer!=="Check")return"";let s=e.filter(i=>n.provenRules.some(r=>r.languageId===i)),o=e.filter(i=>!s.includes(i)).map(i=>R[i]);return s.length===0?"No Proven rule yet: Needs Review only":`Proven in ${s.map(i=>R[i]).join(", ")}${o.length?`; Needs Review only in ${o.join(", ")}`:""}`};return["## WCAG 2.2 AA coverage","","Every WCAG 2.2 level A and AA criterion (4.1.1 Parsing is obsolete) with the Layer that verifies it: the Check in code, an AI Review, a browser audit or a person. A Check criterion reports Findings only in the languages where it has a Proven rule; elsewhere its matches are Needs Review.","","| Criterion | Level | Layer | Check proof status per language |","| --- | --- | --- | --- |",...a.map(n=>`| [${n.criterion} ${v(n.name)}](${n.url}) | ${n.level} | ${n.layer} | ${t(n)} |`)]}function J(a,e,t){let n=o=>{let i=A.indexOf(o);return i===-1?A.length:i};return[...new Set(a.map(o=>o.criterion))].sort((o,i)=>n(o)-n(i)||o.localeCompare(i)).flatMap(o=>[`### ${o} ${v(k(o))}`,"",`| ${e.join(" | ")} |`,`| ${e.map(()=>"---").join(" | ")} |`,...a.filter(i=>i.criterion===o).sort((i,r)=>K(i.file,r.file)||i.line-r.line).map(i=>`| ${t(i).join(" | ")} |`),""]).slice(0,-1)}var K=(a,e)=>a<e?-1:a>e?1:0;function $(a){let e=a.replace(/[\r\n]+/g," ").replace(/\|/g,"\\|"),t="`".repeat(Math.max(0,...[...e.matchAll(/`+/g)].map(n=>n[0].length))+1);return t.length>1?`${t} ${e} ${t}`:`\`${e}\``}function v(a){return a.replace(/\s*[\r\n]+\s*/g," ").replace(/[\\`*_[\]<>|#~&!]/g,e=>`\\${e}`)}function fe(a,e){let t=a.indexOf(">",e.range.start);return a.slice(e.range.start,t===-1?e.range.end:Math.min(t+1,e.range.start+500)).replace(/\s+/g," ").trim()}var I=a=>JSON.stringify([a.ruleId,a.file,a.element]);function Qe(a){let e=new Map;for(let t of a){let n=I(t),s=e.get(n)??{ruleId:t.ruleId,file:t.file,element:t.element,count:0};s.count++,e.set(n,s)}return{version:1,findings:[...e.values()].sort((t,n)=>t.file.localeCompare(n.file)||t.ruleId.localeCompare(n.ruleId)||t.element.localeCompare(n.element))}}function ve(a,e,t){let n=new Map(a.findings.map(i=>[I(i),i.count])),s=e.map(i=>{let r=n.get(I(i))??0;return r>0&&n.set(I(i),r-1),r>0}),o=a.findings.filter(i=>t.has(i.file)).reduce((i,r)=>i+(n.get(I(r))??0),0);return{baselined:s,fixed:o}}function Ze(a,e,t,n){return a?ve(a,n.map(s=>({ruleId:s.ruleId,file:e,element:fe(t,s)})),new Set).baselined:n.map(()=>!1)}function et(a){let e=JSON.parse(a);if(e.version!==1||!Array.isArray(e.findings)||!e.findings.every(t=>typeof t.ruleId=="string"&&typeof t.file=="string"&&typeof t.element=="string"&&Number.isInteger(t.count)&&t.count>0))throw new Error("not an Allyward baseline (version 1)");return{version:1,findings:e.findings.map(t=>({...t,ruleId:B(t.ruleId)}))}}async function tt(a,e){for(let t=a;;t=t.slice(0,t.lastIndexOf("/"))||"/"){if(await e(t))return t;if(t==="/"||!t.includes("/"))return a}}import{Worker as ye}from"worker_threads";var _=3,Z=3*6e4,Y=`${Z/6e4} minutes`,we=512,Q=class{constructor(e,t={}){let n=t.now??Date.now,{log:s}=t;this.breaker=new F(n,s);let o={script:e,firstLoadMs:t.firstLoadMs??15e3,breaker:this.breaker,now:n,log:s};this.typing=new O({...o,name:"typing worker",deadlineMs:t.deadlineMs??1e3}),this.background=new O({...o,name:"background worker",deadlineMs:t.backgroundDeadlineMs??1e4})}engines(){return this.breaker.engines()}check(e,t,n={},{background:s=!1}={}){return new Promise(o=>{let[i,r]=s?[this.background,this.typing]:[this.typing,this.background];i.drop(e),r.drop(e,{running:!0}),i.add({key:e,document:t,options:n,resolve:o})})}dispose(){this.typing.dispose(),this.background.dispose()}},F=class{constructor(e,t){this.now=e;this.log=t;this.failures=new Map;this.checkedLanguages=new Set}engines(){return{used:[...this.checkedLanguages].sort(),paused:[...this.failures].filter(([,e])=>e.length>=_).map(([e])=>e).sort()}}pausedReason(e){if(!((this.failures.get(e)?.length??0)<_))return`The ${e} engine failed ${_} times within ${Y} and is paused for this session`}recordUse(e){this.checkedLanguages.add(e)}recordFailure(e){let t=this.now(),n=[...(this.failures.get(e)??[]).filter(s=>t-s<=Z),t];this.failures.set(e,n),n.length===_&&this.log?.error(`${e} engine paused for this session after ${_} failures within ${Y}`)}},O=class{constructor(e){this.options=e;this.pending=new Map;this.loaded=new Set}drop(e,{running:t=!1}={}){this.pending.get(e)?.resolve({status:"dropped"}),this.pending.delete(e),t&&this.running?.request.key===e&&(this.running.request.resolve({status:"dropped"}),this.running.request={...this.running.request,resolve:()=>{}})}add(e){this.pending.set(e.key,e),this.next()}dispose(){this.running&&(clearTimeout(this.running.deadline),this.running.request.resolve({status:"dropped"})),this.running=void 0,this.pending.forEach(e=>e.resolve({status:"dropped"})),this.pending.clear(),this.worker?.terminate(),this.worker=void 0}next(){if(this.running)return;let[e]=this.pending.values();if(!e)return;this.pending.delete(e.key);let{breaker:t,name:n,log:s,now:o}=this.options,i=e.document.languageId,r=t.pausedReason(i);if(r!==void 0)return e.resolve({status:"paused",reason:r,deadlineExceeded:!1}),this.next();t.recordUse(i),this.worker??=this.spawn();let l=!this.loaded.has(i),g=l?this.options.firstLoadMs:this.options.deadlineMs,c=setTimeout(()=>{this.worker?.terminate(),this.worker=void 0,s?.warn(`${i} Check took longer than ${g} ms; the ${n} is restarted`),this.finish({status:"paused",reason:`The Check took longer than ${g} ms`,deadlineExceeded:!0},!1)},g);this.running={request:e,deadline:c,started:o(),firstLoad:l},this.worker.postMessage({document:e.document,options:e.options})}finish(e,t=e.status==="paused"){this.running&&(clearTimeout(this.running.deadline),t&&this.options.breaker.recordFailure(this.running.request.document.languageId),this.running.request.resolve(e),this.running=void 0,this.next())}spawn(){let{script:e,name:t,log:n,now:s}=this.options,o=new ye(e,{resourceLimits:{maxOldGenerationSizeMb:we}});this.loaded=new Set,n?.info(`The ${t} started`),o.on("message",r=>{if(o!==this.worker||!this.running)return;let{request:l,started:g,firstLoad:c}=this.running;this.loaded.add(l.document.languageId),"result"in r?this.finish({status:"done",result:r.result,durationMs:s()-g,firstLoad:c}):"parseError"in r?(n?.warn(`${l.document.languageId} Check paused: parse error at ${E(r.position)}`),this.finish({status:"paused",reason:r.parseError,deadlineExceeded:!1},!1)):(n?.error(`${l.document.languageId} engine failed: ${E(r.error)}`),this.finish({status:"paused",reason:r.error,deadlineExceeded:!1}))});let i=r=>{o===this.worker&&(this.worker=void 0,n?.error(E(this.running?`${this.running.request.document.languageId} engine: ${r}`:r)),this.finish({status:"paused",reason:r,deadlineExceeded:!1}))};return o.on("error",r=>i(`The ${t} crashed: ${r.message}`)),o.on("exit",r=>i(`The ${t} stopped (exit code ${r})`)),o.unref(),o}};export{E as a,Q as b,Be as c,je as d,T as e,ke as f,Ae as g,_e as h,Ce as i,Se as j,Ee as k,Le as l,Pe as m,Je as n,fe as o,Qe as p,ve as q,Ze as r,et as s,tt as t};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __createRequire } from 'module'; const require = __createRequire(import.meta.url);
2
- import{d as It}from"./chunk-7UDH5BXX.mjs";var Be=44,Et=59,Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fe=new Uint8Array(64),De=new Uint8Array(128);for(let e=0;e<Le.length;e++){let t=Le.charCodeAt(e);Fe[e]=t,De[t]=e}function Z(e){let t=0,i=0,s=0;do{let r=e.next();s=De[r],t|=(s&31)<<i,i+=5}while(s&32);return t}function J(e){return e&1?-2147483648|-(e>>>1):e>>>1}function $(e,t){do{let i=t&31;t>>>=5,t>0&&(i|=32),e.write(Fe[i])}while(t>0)}function ee(e){return e<0?-e<<1|1:e<<1}function Te(e,t){return e.pos>=t?!1:e.peek()!==Be}var Re=1024*16,Oe=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t}},Pt=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Re)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Re&&(this.out+=Oe.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:i}=this;return i>0?t+Oe.decode(e.subarray(0,i)):t}},Nt=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:i}=this,s=t.indexOf(e,i);return s===-1?t.length:s}};function bi(e){let{length:t}=e,i=new Nt(e),s=[],r=0,n=0,o=0,u=0,h=0;do{let f=i.indexOf(";"),p=[],g=!0,C=0;for(r=0;i.pos<f;){let T;r+=J(Z(i)),r<C&&(g=!1),C=r,Te(i,f)?(n+=J(Z(i)),o+=J(Z(i)),u+=J(Z(i)),Te(i,f)?(h+=J(Z(i)),T=[r,n,o,u,h]):T=[r,n,o,u]):T=[r],p.push(T),i.pos++}g||Vt(p),s.push(p),i.pos=f+1}while(i.pos<=t);return s}function Vt(e){e.sort(Lt)}function Lt(e,t){return e[0]-t[0]}function yi(e){let t=new Pt,i=0,s=0,r=0,n=0;for(let o=0;o<e.length;o++){let u=e[o];if(o>0&&t.write(Et),u.length===0)continue;let h=0;for(let f=0;f<u.length;f++){let p=u[f];f>0&&t.write(Be),$(t,ee(p[0]-h)),h=p[0],p.length!==1&&($(t,ee(p[1]-i)),$(t,ee(p[2]-s)),$(t,ee(p[3]-r)),i=p[1],s=p[2],r=p[3],p.length!==4&&($(t,ee(p[4]-n)),n=p[4]))}}return t.flush()}var gi={};It(gi,{Node:()=>ae,Parser:()=>y,Position:()=>Q,SourceLocation:()=>ie,TokContext:()=>E,Token:()=>ge,TokenType:()=>v,defaultOptions:()=>ue,getLineInfo:()=>Ae,isIdentifierChar:()=>R,isIdentifierStart:()=>L,isNewLine:()=>j,keywordTypes:()=>fe,lineBreak:()=>k,lineBreakG:()=>Ke,nonASCIIwhitespace:()=>we,parse:()=>xi,parseExpressionAt:()=>mi,tokContexts:()=>b,tokTypes:()=>a,tokenizer:()=>vi,version:()=>At});var Tt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],We=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],Rt="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1AF0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",He="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0558\u0559\u0560-\u0588\u058B\u058C\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u208F-\u209F\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DD\uA7E2\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB6C\uAB6D\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",be={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ye="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Ot={5:ye,"5module":ye+" export import",6:ye+" const class extends export import super"},ze=/^in(stanceof)?$/,Bt=new RegExp("["+He+"]"),Ft=new RegExp("["+He+Rt+"]");function Se(e,t){for(var i=65536,s=0;s<t.length;s+=2){if(i+=t[s],i>e)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function L(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Bt.test(String.fromCharCode(e)):t===!1?!1:Se(e,We)}function R(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ft.test(String.fromCharCode(e)):t===!1?!1:Se(e,We)||Se(e,Tt)}var v=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function A(e,t){return new v(e,{beforeExpr:!0,binop:t})}var I={beforeExpr:!0},w={startsExpr:!0},fe={};function m(e,t){return t===void 0&&(t={}),t.keyword=e,fe[e]=new v(e,t)}var a={num:new v("num",w),regexp:new v("regexp",w),string:new v("string",w),name:new v("name",w),privateId:new v("privateId",w),eof:new v("eof"),bracketL:new v("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new v("]"),braceL:new v("{",{beforeExpr:!0,startsExpr:!0}),braceR:new v("}"),parenL:new v("(",{beforeExpr:!0,startsExpr:!0}),parenR:new v(")"),comma:new v(",",I),semi:new v(";",I),colon:new v(":",I),dot:new v("."),question:new v("?",I),questionDot:new v("?."),arrow:new v("=>",I),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",I),backQuote:new v("`",w),dollarBraceL:new v("${",{beforeExpr:!0,startsExpr:!0}),eq:new v("=",{beforeExpr:!0,isAssign:!0}),assign:new v("_=",{beforeExpr:!0,isAssign:!0}),incDec:new v("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new v("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:A("||",1),logicalAND:A("&&",2),bitwiseOR:A("|",3),bitwiseXOR:A("^",4),bitwiseAND:A("&",5),equality:A("==/!=/===/!==",6),relational:A("</>/<=/>=",7),bitShift:A("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:A("%",10),star:A("*",10),slash:A("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:A("??",1),_break:m("break"),_case:m("case",I),_catch:m("catch"),_continue:m("continue"),_debugger:m("debugger"),_default:m("default",I),_do:m("do",{isLoop:!0,beforeExpr:!0}),_else:m("else",I),_finally:m("finally"),_for:m("for",{isLoop:!0}),_function:m("function",w),_if:m("if"),_return:m("return",I),_switch:m("switch"),_throw:m("throw",I),_try:m("try"),_var:m("var"),_const:m("const"),_while:m("while",{isLoop:!0}),_with:m("with"),_new:m("new",{beforeExpr:!0,startsExpr:!0}),_this:m("this",w),_super:m("super",w),_class:m("class",w),_extends:m("extends",I),_export:m("export"),_import:m("import",w),_null:m("null",w),_true:m("true",w),_false:m("false",w),_in:m("in",{beforeExpr:!0,binop:7}),_instanceof:m("instanceof",{beforeExpr:!0,binop:7}),_typeof:m("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:m("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:m("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,Ke=new RegExp(k.source,"g");function j(e){return e===10||e===13||e===8232||e===8233}function Qe(e,t,i){i===void 0&&(i=e.length);for(var s=t;s<i;s++){var r=e.charCodeAt(s);if(j(r))return s<i-1&&r===13&&e.charCodeAt(s+1)===10?s+2:s+1}return-1}var we=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,S=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ye=Object.prototype,Dt=Ye.hasOwnProperty,Mt=Ye.toString,Y=Object.hasOwn||(function(e,t){return Dt.call(e,t)}),Me=Array.isArray||(function(e){return Mt.call(e)==="[object Array]"}),Ue=Object.create(null);function M(e){return Ue[e]||(Ue[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function B(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Ut=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Q=function(t,i){this.line=t,this.column=i};Q.prototype.offset=function(t){return new Q(this.line,this.column+t)};var ie=function(t,i,s){this.start=i,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function Ae(e,t){for(var i=1,s=0;;){var r=Qe(e,s,t);if(r<0)return new Q(i,t-s);++i,s=r}}var ue={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},qe=!1;function qt(e){var t={};for(var i in ue)t[i]=e&&Y(e,i)?e[i]:ue[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!qe&&typeof console=="object"&&console.warn&&(qe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
2
+ import{d as It}from"./chunk-LUOGX5HV.mjs";var Be=44,Et=59,Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fe=new Uint8Array(64),De=new Uint8Array(128);for(let e=0;e<Le.length;e++){let t=Le.charCodeAt(e);Fe[e]=t,De[t]=e}function Z(e){let t=0,i=0,s=0;do{let r=e.next();s=De[r],t|=(s&31)<<i,i+=5}while(s&32);return t}function J(e){return e&1?-2147483648|-(e>>>1):e>>>1}function $(e,t){do{let i=t&31;t>>>=5,t>0&&(i|=32),e.write(Fe[i])}while(t>0)}function ee(e){return e<0?-e<<1|1:e<<1}function Te(e,t){return e.pos>=t?!1:e.peek()!==Be}var Re=1024*16,Oe=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let i=0;i<e.length;i++)t+=String.fromCharCode(e[i]);return t}},Pt=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Re)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Re&&(this.out+=Oe.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:i}=this;return i>0?t+Oe.decode(e.subarray(0,i)):t}},Nt=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:i}=this,s=t.indexOf(e,i);return s===-1?t.length:s}};function bi(e){let{length:t}=e,i=new Nt(e),s=[],r=0,n=0,o=0,u=0,h=0;do{let f=i.indexOf(";"),p=[],g=!0,C=0;for(r=0;i.pos<f;){let T;r+=J(Z(i)),r<C&&(g=!1),C=r,Te(i,f)?(n+=J(Z(i)),o+=J(Z(i)),u+=J(Z(i)),Te(i,f)?(h+=J(Z(i)),T=[r,n,o,u,h]):T=[r,n,o,u]):T=[r],p.push(T),i.pos++}g||Vt(p),s.push(p),i.pos=f+1}while(i.pos<=t);return s}function Vt(e){e.sort(Lt)}function Lt(e,t){return e[0]-t[0]}function yi(e){let t=new Pt,i=0,s=0,r=0,n=0;for(let o=0;o<e.length;o++){let u=e[o];if(o>0&&t.write(Et),u.length===0)continue;let h=0;for(let f=0;f<u.length;f++){let p=u[f];f>0&&t.write(Be),$(t,ee(p[0]-h)),h=p[0],p.length!==1&&($(t,ee(p[1]-i)),$(t,ee(p[2]-s)),$(t,ee(p[3]-r)),i=p[1],s=p[2],r=p[3],p.length!==4&&($(t,ee(p[4]-n)),n=p[4]))}}return t.flush()}var gi={};It(gi,{Node:()=>ae,Parser:()=>y,Position:()=>Q,SourceLocation:()=>ie,TokContext:()=>E,Token:()=>ge,TokenType:()=>v,defaultOptions:()=>ue,getLineInfo:()=>Ae,isIdentifierChar:()=>R,isIdentifierStart:()=>L,isNewLine:()=>j,keywordTypes:()=>fe,lineBreak:()=>k,lineBreakG:()=>Ke,nonASCIIwhitespace:()=>we,parse:()=>xi,parseExpressionAt:()=>mi,tokContexts:()=>b,tokTypes:()=>a,tokenizer:()=>vi,version:()=>At});var Tt=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,31,4,33,15,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,7,0,259,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,481,1,61,4,4,5,9,7,3,6,31,3,149,2,12,2,9,1,3,0,33,1,1357,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],We=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,13,65,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,18,21,18,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,18,0,182,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,22,0,239,18,16,0,2,12,2,33,125,0,80,921,103,111,6,206,13,310,2314,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7386,37,33,96,114,14,913,15,50,7710,3,2,6,2,1,2,296,10,0,30,2,3,0,15,4,8,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,340,2,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,129,15,6,55,50,49,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4382,2,5773,3,7472,16,621,2467,541,1507,4938,6,8489,39815,11327],Rt="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7-\u05C9\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B53-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1AF0\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",He="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0558\u0559\u0560-\u0588\u058B\u058C\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u208F-\u209F\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DD\uA7E2\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB6C\uAB6D\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",be={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},ye="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",Ot={5:ye,"5module":ye+" export import",6:ye+" const class extends export import super"},ze=/^in(stanceof)?$/,Bt=new RegExp("["+He+"]"),Ft=new RegExp("["+He+Rt+"]");function Se(e,t){for(var i=65536,s=0;s<t.length;s+=2){if(i+=t[s],i>e)return!1;if(i+=t[s+1],i>=e)return!0}return!1}function L(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Bt.test(String.fromCharCode(e)):t===!1?!1:Se(e,We)}function R(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&Ft.test(String.fromCharCode(e)):t===!1?!1:Se(e,We)||Se(e,Tt)}var v=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null};function A(e,t){return new v(e,{beforeExpr:!0,binop:t})}var I={beforeExpr:!0},w={startsExpr:!0},fe={};function m(e,t){return t===void 0&&(t={}),t.keyword=e,fe[e]=new v(e,t)}var a={num:new v("num",w),regexp:new v("regexp",w),string:new v("string",w),name:new v("name",w),privateId:new v("privateId",w),eof:new v("eof"),bracketL:new v("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new v("]"),braceL:new v("{",{beforeExpr:!0,startsExpr:!0}),braceR:new v("}"),parenL:new v("(",{beforeExpr:!0,startsExpr:!0}),parenR:new v(")"),comma:new v(",",I),semi:new v(";",I),colon:new v(":",I),dot:new v("."),question:new v("?",I),questionDot:new v("?."),arrow:new v("=>",I),template:new v("template"),invalidTemplate:new v("invalidTemplate"),ellipsis:new v("...",I),backQuote:new v("`",w),dollarBraceL:new v("${",{beforeExpr:!0,startsExpr:!0}),eq:new v("=",{beforeExpr:!0,isAssign:!0}),assign:new v("_=",{beforeExpr:!0,isAssign:!0}),incDec:new v("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new v("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:A("||",1),logicalAND:A("&&",2),bitwiseOR:A("|",3),bitwiseXOR:A("^",4),bitwiseAND:A("&",5),equality:A("==/!=/===/!==",6),relational:A("</>/<=/>=",7),bitShift:A("<</>>/>>>",8),plusMin:new v("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:A("%",10),star:A("*",10),slash:A("/",10),starstar:new v("**",{beforeExpr:!0}),coalesce:A("??",1),_break:m("break"),_case:m("case",I),_catch:m("catch"),_continue:m("continue"),_debugger:m("debugger"),_default:m("default",I),_do:m("do",{isLoop:!0,beforeExpr:!0}),_else:m("else",I),_finally:m("finally"),_for:m("for",{isLoop:!0}),_function:m("function",w),_if:m("if"),_return:m("return",I),_switch:m("switch"),_throw:m("throw",I),_try:m("try"),_var:m("var"),_const:m("const"),_while:m("while",{isLoop:!0}),_with:m("with"),_new:m("new",{beforeExpr:!0,startsExpr:!0}),_this:m("this",w),_super:m("super",w),_class:m("class",w),_extends:m("extends",I),_export:m("export"),_import:m("import",w),_null:m("null",w),_true:m("true",w),_false:m("false",w),_in:m("in",{beforeExpr:!0,binop:7}),_instanceof:m("instanceof",{beforeExpr:!0,binop:7}),_typeof:m("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:m("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:m("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},k=/\r\n?|\n|\u2028|\u2029/,Ke=new RegExp(k.source,"g");function j(e){return e===10||e===13||e===8232||e===8233}function Qe(e,t,i){i===void 0&&(i=e.length);for(var s=t;s<i;s++){var r=e.charCodeAt(s);if(j(r))return s<i-1&&r===13&&e.charCodeAt(s+1)===10?s+2:s+1}return-1}var we=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,S=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ye=Object.prototype,Dt=Ye.hasOwnProperty,Mt=Ye.toString,Y=Object.hasOwn||(function(e,t){return Dt.call(e,t)}),Me=Array.isArray||(function(e){return Mt.call(e)==="[object Array]"}),Ue=Object.create(null);function M(e){return Ue[e]||(Ue[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function B(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var Ut=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,Q=function(t,i){this.line=t,this.column=i};Q.prototype.offset=function(t){return new Q(this.line,this.column+t)};var ie=function(t,i,s){this.start=i,this.end=s,t.sourceFile!==null&&(this.source=t.sourceFile)};function Ae(e,t){for(var i=1,s=0;;){var r=Qe(e,s,t);if(r<0)return new Q(i,t-s);++i,s=r}}var ue={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},qe=!1;function qt(e){var t={};for(var i in ue)t[i]=e&&Y(e,i)?e[i]:ue[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!qe&&typeof console=="object"&&console.warn&&(qe=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
3
3
  Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),Me(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}if(Me(t.onComment)&&(t.onComment=jt(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function jt(e,t){return function(i,s,r,n,o,u){var h={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(h.loc=new ie(this,o,u)),e.ranges&&(h.range=[r,n]),t.push(h)}}var q=1,G=2,Ie=4,Xe=8,Ee=16,Ze=32,de=64,Je=128,W=256,se=512,$e=1024,xe=q|G|W;function Pe(e,t){return G|(e?Ie:0)|(t?Xe:0)}var he=0,Ne=1,D=2,et=3,tt=4,it=5,y=function(t,i,s){this.options=t=qt(t),this.sourceFile=t.sourceFile,this.keywords=M(Ot[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=be[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=M(r);var n=(r?r+" ":"")+be.strict;this.reservedWordsStrict=M(n),this.reservedWordsStrictBind=M(n+" "+be.strictBind),this.input=String(i),this.containsEsc=!1,this.pos=s||0,this.curLine=1,t.startLocation?(this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line):s?(this.lineStart=this.input.lastIndexOf(`
4
4
  `,s-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(k).length)):this.lineStart=0,this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?G:q),this.regexpState=null,this.privateNameStack=[]},N={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};y.prototype.parse=function(){var t=this,i=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(i)})};N.inFunction.get=function(){return(this.currentVarScope().flags&G)>0};N.inGenerator.get=function(){return(this.currentVarScope().flags&Xe)>0};N.inAsync.get=function(){return(this.currentVarScope().flags&Ie)>0};N.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(W|se))return!1;if(i&G)return(i&Ie)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};N.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&q)};N.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&de)>0||this.options.allowSuperOutsideMethod};N.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Je)>0};N.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};N.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(W|se)||i&G&&!(i&Ee))return!0}return!1};N.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&$e||!this.inModule&&t&q)};N.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&W)>0};y.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};y.parse=function(t,i){return new this(i,t).parse()};y.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};y.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(y.prototype,N);var _=y.prototype,Gt=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;_.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){S.lastIndex=e,e+=S.exec(this.input)[0].length;var t=Gt.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){S.lastIndex=e+t[0].length;var i=S.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||k.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="="||r==="i"&&Wt(this,s))}e+=t[0].length,S.lastIndex=e,e+=S.exec(this.input)[0].length,this.input[e]===";"&&e++}};function Wt(e,t){for(var i=t+1,s=Math.min(e.input.length,t+11);i<s;){var r=e.fullCharCodeAt(i);if(!R(r,!0))break;i+=r<=65535?1:2}return i===t+2&&e.input.slice(t,i)==="in"||i===t+10&&e.input.slice(t,i)==="instanceof"}_.eat=function(e){return this.type===e?(this.next(),!0):!1};_.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};_.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};_.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};_.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};_.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||k.test(this.input.slice(this.lastTokEnd,this.start))};_.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};_.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};_.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};_.expect=function(e){this.eat(e)||this.unexpected()};_.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var me=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};_.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};_.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};_.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")};_.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var l=y.prototype;l.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==a.eof;){var i=this.parseStatement(null,!0,t);e.body.push(i)}if(this.inModule)for(var s=0,r=Object.keys(this.undefinedExports);s<r.length;s+=1){var n=r[s];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Ve={kind:"loop"},Ht={kind:"switch"};l.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;S.lastIndex=this.pos;var t=S.exec(this.input),i=this.pos+t[0].length,s=this.fullCharCodeAt(i);if(s===91||s===92)return!0;if(e)return!1;if(s===123)return!0;if(L(s)){var r=i;do i+=s<=65535?1:2;while(R(s=this.fullCharCodeAt(i)));if(s===92)return!0;var n=this.input.slice(r,i);if(!ze.test(n))return!0}return!1};l.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;S.lastIndex=this.pos;var e=S.exec(this.input),t=this.pos+e[0].length,i;return!k.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(R(i=this.fullCharCodeAt(t+8))||i===92))};l.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;S.lastIndex=this.pos;var i=S.exec(this.input),s=this.pos+i[0].length;if(k.test(this.input.slice(this.pos,s)))return!1;if(e){var r=s+5,n;if(this.input.slice(s,r)!=="using"||r===this.input.length||R(n=this.fullCharCodeAt(r))||n===92)return!1;S.lastIndex=r;var o=S.exec(this.input);if(s=r+o[0].length,o&&k.test(this.input.slice(r,s)))return!1}var u=this.fullCharCodeAt(s);if(!L(u)&&u!==92)return!1;var h=s;do s+=u<=65535?1:2;while(R(u=this.fullCharCodeAt(s)));if(u===92)return!0;var f=this.input.slice(h,s);if(ze.test(f))return!1;if(t&&!e&&f==="of"){S.lastIndex=s;var p=S.exec(this.input);if(s=s+p[0].length,this.input.charCodeAt(s)!==61||(u=this.input.charCodeAt(s+1))===61||u===62)return!1}return!0};l.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};l.isUsing=function(e){return this.isUsingKeyword(!1,e)};l.parseStatement=function(e,t,i){var s=this.type,r=this.startNode(),n;switch(this.isLet(e)&&(s=a._var,n="let"),s){case a._break:case a._continue:return this.parseBreakContinueStatement(r,s.keyword);case a._debugger:return this.parseDebuggerStatement(r);case a._do:return this.parseDoStatement(r);case a._for:return this.parseForStatement(r);case a._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1,!e);case a._class:return e&&this.unexpected(),this.parseClass(r,!0);case a._if:return this.parseIfStatement(r);case a._return:return this.parseReturnStatement(r);case a._switch:return this.parseSwitchStatement(r);case a._throw:return this.parseThrowStatement(r);case a._try:return this.parseTryStatement(r);case a._const:case a._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(r,n);case a._while:return this.parseWhileStatement(r);case a._with:return this.parseWithStatement(r);case a.braceL:return this.parseBlock(!0,r);case a.semi:return this.parseEmptyStatement(r);case a._export:case a._import:if(this.options.ecmaVersion>10&&s===a._import){S.lastIndex=this.pos;var o=S.exec(this.input),u=this.pos+o[0].length,h=this.input.charCodeAt(u);if(h===40||h===46)return this.parseExpressionStatement(r,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),s===a._import?this.parseImport(r):this.parseExport(r,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(r,!0,!e);var f=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(f)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,"Using declaration is not allowed in single-statement positions"),f==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(r,!1,f),this.semicolon(),this.finishNode(r,"VariableDeclaration");var p=this.value,g=this.parseExpression();return s===a.name&&g.type==="Identifier"&&this.eat(a.colon)?this.parseLabeledStatement(r,p,g,e):this.parseExpressionStatement(r,g)}};l.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(a.semi)||this.insertSemicolon()?e.label=null:this.type!==a.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var s=0;s<this.labels.length;++s){var r=this.labels[s];if((e.label==null||r.name===e.label.name)&&(r.kind!=null&&(i||r.kind==="loop")||e.label&&i))break}return s===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")};l.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};l.parseDoStatement=function(e){return this.next(),this.labels.push(Ve),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(a._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(a.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};l.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Ve),this.enterScope(0),this.expect(a.parenL),this.type===a.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===a._var||this.type===a._const||i){var s=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(s,!0,r),this.finishNode(s,"VariableDeclaration"),this.parseForAfterInit(e,s,t)}var n=this.isContextual("let"),o=!1,u=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(u){var h=this.startNode();return this.next(),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(h,!0,u),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(e,h,t)}var f=this.containsEsc,p=new me,g=this.start,C=t>-1?this.parseExprSubscripts(p,"await"):this.parseExpression(!0,p);return this.type===a._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===a._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(C.start===g&&!f&&C.type==="Identifier"&&C.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),n&&o&&this.raise(C.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(C,!1,p),this.checkLValPattern(C),this.parseForIn(e,C)):(this.checkExpressionErrors(p,!0),t>-1&&this.unexpected(t),this.parseFor(e,C))};l.parseForAfterInit=function(e,t,i){return(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.type===a._in?((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init&&this.raise(this.start,"Using declaration is not allowed in for-in loops"),this.options.ecmaVersion>=9&&i>-1&&this.unexpected(i)):this.options.ecmaVersion>=9&&(e.await=i>-1),this.parseForIn(e,t)):(i>-1&&this.unexpected(i),this.parseFor(e,t))};l.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,te|(i?0:_e),!1,t)};l.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};l.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(a.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};l.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(a.braceL),this.labels.push(Ht),this.enterScope($e);for(var t,i=!1;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var s=this.type===a._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),s?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,t.test=null),this.expect(a.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};l.parseThrowStatement=function(e){return this.next(),k.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var zt=[];l.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ze:0),this.checkLValPattern(e,t?tt:D),this.expect(a.parenR),e};l.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===a._catch){var t=this.startNode();this.next(),this.eat(a.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(a._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};l.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,!1,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};l.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Ve),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};l.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};l.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};l.parseLabeledStatement=function(e,t,i,s){for(var r=0,n=this.labels;r<n.length;r+=1){var o=n[r];o.name===t&&this.raise(i.start,"Label '"+t+"' is already declared")}for(var u=this.type.isLoop?"loop":this.type===a._switch?"switch":null,h=this.labels.length-1;h>=0;h--){var f=this.labels[h];if(f.statementStart===e.start)f.statementStart=this.start,f.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};l.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};l.parseBlock=function(e,t,i){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(a.braceL),e&&this.enterScope(0);this.type!==a.braceR;){var s=this.parseStatement(null);t.body.push(s)}return i&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};l.parseFor=function(e,t){return e.init=t,this.expect(a.semi),e.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),e.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};l.parseForIn=function(e,t){var i=this.type===a._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};l.parseVar=function(e,t,i,s){for(e.declarations=[],e.kind=i;;){var r=this.startNode();if(this.parseVarId(r,i),this.eat(a.eq)?r.init=this.parseMaybeAssign(t):!s&&i==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!s&&(i==="using"||i==="await using")&&this.options.ecmaVersion>=17&&this.type!==a._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):!s&&r.id.type!=="Identifier"&&!(t&&(this.type===a._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):r.init=null,e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(a.comma))break}return e};l.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ne:D,!1)};var te=1,_e=2,st=4;l.parseFunction=function(e,t,i,s,r){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s)&&(this.type===a.star&&t&_e&&this.unexpected(),e.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(e.async=!!s),t&te&&(e.id=t&st&&this.type!==a.name?null:this.parseIdent(),e.id&&!(t&_e)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ne:D:et));var n=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Pe(e.async,e.generator)),t&te||(e.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,!1,r),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(e,t&te?"FunctionDeclaration":"FunctionExpression")};l.parseFunctionParams=function(e){this.expect(a.parenL),e.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};l.parseClass=function(e,t){this.next();var i=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var s=this.enterClassBody(),r=this.startNode(),n=!1;for(r.body=[],this.expect(a.braceL);this.type!==a.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(r.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(n&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),n=!0):o.key&&o.key.type==="PrivateIdentifier"&&Kt(s,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"))}return this.strict=i,this.next(),e.body=this.finishNode(r,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};l.parseClassElement=function(e){if(this.eat(a.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),s="",r=!1,n=!1,o="method",u=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===a.star?u=!0:s="static"}if(i.static=u,!s&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon()?n=!0:s="async"),!s&&(t>=9||!n)&&this.eat(a.star)&&(r=!0),!s&&!n&&!r){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:s=h)}if(s?(i.computed=!1,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=s,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===a.parenL||o!=="method"||r||n){var f=!i.static&&ce(i,"constructor"),p=f&&e;f&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=f?"constructor":o,this.parseClassMethod(i,r,n,p)}else this.parseClassField(i);return i};l.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};l.parseClassElementName=function(e){this.type===a.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)};l.parseClassMethod=function(e,t,i,s){var r=e.key;e.kind==="constructor"?(t&&this.raise(r.start,"Constructor can't be a generator"),i&&this.raise(r.start,"Constructor can't be an async method")):e.static&&ce(e,"prototype")&&this.raise(r.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,s);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};l.parseClassField=function(e){return ce(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&ce(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(a.eq)?(this.enterScope(se|de),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};l.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(W|de);this.type!==a.braceR;){var i=this.parseStatement(null);e.body.push(i)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};l.parseClassId=function(e,t){this.type===a.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,D,!1)):(t===!0&&this.unexpected(),e.id=null)};l.parseClassSuper=function(e){e.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,!1):null};l.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};l.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var s=this.privateNameStack.length,r=s===0?null:this.privateNameStack[s-1],n=0;n<i.length;++n){var o=i[n];Y(t,o.name)||(r?r.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"))}};function Kt(e,t){var i=t.key.name,s=e[i],r="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(r=(t.static?"s":"i")+t.kind),s==="iget"&&r==="iset"||s==="iset"&&r==="iget"||s==="sget"&&r==="sset"||s==="sset"&&r==="sget"?(e[i]="true",!1):s?!0:(e[i]=r,!1)}function ce(e,t){var i=e.computed,s=e.key;return!i&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}l.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};l.parseExport=function(e,t){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(e,t);if(this.eat(a._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var i=0,s=e.specifiers;i<s.length;i+=1){var r=s[i];this.checkUnreserved(r.local),this.checkLocalExport(r.local),r.local.type==="Literal"&&this.raise(r.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};l.parseExportDeclaration=function(e){return this.parseStatement(null)};l.parseExportDefaultDeclaration=function(){var e;if(this.type===a._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,te|st,!1,e)}else if(this.type===a._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else{var s=this.parseMaybeAssign();return this.semicolon(),s}};l.checkExport=function(e,t,i){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),Y(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=!0)};l.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier")this.checkExport(e,t,t.start);else if(i==="ObjectPattern")for(var s=0,r=t.properties;s<r.length;s+=1){var n=r[s];this.checkPatternExport(e,n)}else if(i==="ArrayPattern")for(var o=0,u=t.elements;o<u.length;o+=1){var h=u[o];h&&this.checkPatternExport(e,h)}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"&&this.checkPatternExport(e,t.argument)};l.checkVariableExport=function(e,t){if(e)for(var i=0,s=t;i<s.length;i+=1){var r=s[i];this.checkPatternExport(e,r.id)}};l.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};l.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};l.parseExportSpecifiers=function(e){var t=[],i=!0;for(this.expect(a.braceL);!this.eat(a.braceR);){if(i)i=!1;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;t.push(this.parseExportSpecifier(e))}return t};l.parseImport=function(e){return this.next(),this.type===a.string?(e.specifiers=zt,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===a.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};l.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,D),this.finishNode(e,"ImportSpecifier")};l.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,D),this.finishNode(e,"ImportDefaultSpecifier")};l.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,D),this.finishNode(e,"ImportNamespaceSpecifier")};l.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===a.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(a.comma)))return e;if(this.type===a.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(a.braceL);!this.eat(a.braceR);){if(t)t=!1;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;e.push(this.parseImportSpecifier())}return e};l.parseWithClause=function(){var e=[];if(!this.eat(a._with))return e;this.expect(a.braceL);for(var t={},i=!0;!this.eat(a.braceR);){if(i)i=!1;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;var s=this.parseImportAttribute(),r=s.key.type==="Identifier"?s.key.name:s.key.value;Y(t,r)&&this.raiseRecoverable(s.key.start,"Duplicate attribute key '"+r+"'"),t[r]=!0,e.push(s)}return e};l.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(a.colon),this.type!==a.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};l.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===a.string){var e=this.parseLiteral(this.value);return Ut.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)};l.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};l.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var V=y.prototype;V.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var s=0,r=e.properties;s<r.length;s+=1){var n=r[s];this.toAssignable(n,t),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token")}break;case"Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else i&&this.checkPatternErrors(i,!0);return e};V.toAssignableList=function(e,t){for(var i=e.length,s=0;s<i;s++){var r=e[s];r&&this.toAssignable(r,t)}if(i){var n=e[i-1];this.options.ecmaVersion===6&&t&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start)}return e};V.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};V.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==a.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};V.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case a.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(a.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case a.braceL:return this.parseObj(!0)}return this.parseIdent()};V.parseBindingList=function(e,t,i,s){for(var r=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(a.comma),t&&this.type===a.comma)r.push(null);else{if(i&&this.afterTrailingComma(e))break;if(this.type===a.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),r.push(o),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else r.push(this.parseAssignableListItem(s))}return r};V.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};V.parseBindingListItem=function(e){return e};V.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(a.eq))return i;var s=this.startNodeAt(e,t);return s.left=i,s.right=this.parseMaybeAssign(),this.finishNode(s,"AssignmentPattern")};V.checkLValSimple=function(e,t,i){t===void 0&&(t=he);var s=t!==he;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode"),s&&(t===D&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(Y(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=!0),t!==it&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":s&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return s&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};V.checkLValPattern=function(e,t,i){switch(t===void 0&&(t=he),e.type){case"ObjectPattern":for(var s=0,r=e.properties;s<r.length;s+=1){var n=r[s];this.checkLValInnerPattern(n,t,i)}break;case"ArrayPattern":for(var o=0,u=e.elements;o<u.length;o+=1){var h=u[o];h&&this.checkLValInnerPattern(h,t,i)}break;default:this.checkLValSimple(e,t,i)}};V.checkLValInnerPattern=function(e,t,i){switch(t===void 0&&(t=he),e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var E=function(t,i,s,r,n){this.token=t,this.isExpr=!!i,this.preserveSpace=!!s,this.override=r,this.generator=!!n},b={b_stat:new E("{",!1),b_expr:new E("{",!0),b_tmpl:new E("${",!1),p_stat:new E("(",!1),p_expr:new E("(",!0),q_tmpl:new E("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new E("function",!1),f_expr:new E("function",!0),f_expr_gen:new E("function",!0,!1,null,!0),f_gen:new E("function",!1,!1,null,!0)},X=y.prototype;X.initialContext=function(){return[b.b_stat]};X.curContext=function(){return this.context[this.context.length-1]};X.braceIsBlock=function(e){var t=this.curContext();return t===b.f_expr||t===b.f_stat?!0:e===a.colon&&(t===b.b_stat||t===b.b_expr)?!t.isExpr:e===a._return||e===a.name&&this.exprAllowed?k.test(this.input.slice(this.lastTokEnd,this.start)):e===a._else||e===a.semi||e===a.eof||e===a.parenR||e===a.arrow?!0:e===a.braceL?t===b.b_stat:e===a._var||e===a._const||e===a.name?!1:!this.exprAllowed};X.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};X.updateContext=function(e){var t,i=this.type;i.keyword&&e===a.dot?this.exprAllowed=!1:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr};X.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)};a.parenR.updateContext=a.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===b.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr};a.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?b.b_stat:b.b_expr),this.exprAllowed=!0};a.dollarBraceL.updateContext=function(){this.context.push(b.b_tmpl),this.exprAllowed=!0};a.parenL.updateContext=function(e){var t=e===a._if||e===a._for||e===a._with||e===a._while;this.context.push(t?b.p_stat:b.p_expr),this.exprAllowed=!0};a.incDec.updateContext=function(){};a._function.updateContext=a._class.updateContext=function(e){e.beforeExpr&&e!==a._else&&!(e===a.semi&&this.curContext()!==b.p_stat)&&!(e===a._return&&k.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===a.colon||e===a.braceL)&&this.curContext()===b.b_stat)?this.context.push(b.f_expr):this.context.push(b.f_stat),this.exprAllowed=!1};a.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0};a.backQuote.updateContext=function(){this.curContext()===b.q_tmpl?this.context.pop():this.context.push(b.q_tmpl),this.exprAllowed=!1};a.star.updateContext=function(e){if(e===a._function){var t=this.context.length-1;this.context[t]===b.f_expr?this.context[t]=b.f_expr_gen:this.context[t]=b.f_gen}this.exprAllowed=!0};a.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==a.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var d=y.prototype;d.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var s=e.key,r;switch(s.type){case"Identifier":r=s.name;break;case"Literal":r=String(s.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6){r==="__proto__"&&n==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=s.start):this.raiseRecoverable(s.start,"Redefinition of __proto__ property")),t.proto=!0);return}r="$"+r;var o=t[r];if(o){var u;n==="init"?u=this.strict&&o.init||o.get||o.set:u=o.init||o[n],u&&this.raiseRecoverable(s.start,"Redefinition of property")}else o=t[r]={init:!1,get:!1,set:!1};o[n]=!0}};d.parseExpression=function(e,t){var i=this;return this.catchStackOverflow(function(){var s=i.start,r=i.startLoc,n=i.parseMaybeAssign(e,t);if(i.type===a.comma){var o=i.startNodeAt(s,r);for(o.expressions=[n];i.eat(a.comma);)o.expressions.push(i.parseMaybeAssign(e,t));return i.finishNode(o,"SequenceExpression")}return n})};d.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var s=!1,r=-1,n=-1,o=-1;t?(r=t.parenthesizedAssign,n=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new me,s=!0);var u=this.start,h=this.startLoc;(this.type===a.parenL||this.type===a.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var f=this.parseMaybeConditional(e,t);if(i&&(f=i.call(this,f,u,h)),this.type.isAssign){var p=this.startNodeAt(u,h);return p.operator=this.value,this.type===a.eq&&(f=this.toAssignable(f,!1,t)),s||(t.parenthesizedAssign=t.trailingComma=-1,t.shorthandAssign>=f.start&&(t.shorthandAssign=-1),t.doubleProto>=f.start&&(t.doubleProto=-1)),this.type===a.eq?this.checkLValPattern(f):this.checkLValSimple(f),p.left=f,this.next(),p.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(p,"AssignmentExpression")}else s&&this.checkExpressionErrors(t,!0);return r>-1&&(t.parenthesizedAssign=r),n>-1&&(t.trailingComma=n),f};d.parseMaybeConditional=function(e,t){var i=this.start,s=this.startLoc,r=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return r;if(!(r.type==="ArrowFunctionExpression"&&r.start===i)&&this.eat(a.question)){var n=this.startNodeAt(i,s);return n.test=r,n.consequent=this.parseMaybeAssign(),this.expect(a.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return r};d.parseExprOps=function(e,t){var i=this.start,s=this.startLoc,r=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||r.start===i&&r.type==="ArrowFunctionExpression"?r:this.parseExprOp(r,i,s,-1,e)};d.parseExprOp=function(e,t,i,s,r){var n=this.type.binop;if(n!=null&&(!r||this.type!==a._in)&&n>s){var o=this.type===a.logicalOR||this.type===a.logicalAND,u=this.type===a.coalesce;u&&(n=a.logicalAND.binop);var h=this.value;this.next();var f=this.start,p=this.startLoc,g=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,r),f,p,n,r),C=this.buildBinary(t,i,e,g,h,o||u);return(o&&this.type===a.coalesce||u&&(this.type===a.logicalOR||this.type===a.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(C,t,i,s,r)}return e};d.buildBinary=function(e,t,i,s,r,n){s.type==="PrivateIdentifier"&&this.raise(s.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(e,t);return o.left=i,o.operator=r,o.right=s,this.finishNode(o,n?"LogicalExpression":"BinaryExpression")};d.parseMaybeUnary=function(e,t,i,s){var r=this.start,n=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(s),t=!0;else if(this.type.prefix){var u=this.startNode(),h=this.type===a.incDec;u.operator=this.value,u.prefix=!0,this.next(),u.argument=this.parseMaybeUnary(null,!0,h,s),this.checkExpressionErrors(e,!0),h?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&at(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&ke(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=!0,o=this.finishNode(u,h?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===a.privateId)(s||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==a._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,s),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var f=this.startNodeAt(r,n);f.operator=this.value,f.prefix=!1,f.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(f,"UpdateExpression")}}if(!i&&!(o.type==="ArrowFunctionExpression"&&o.start===r)&&this.eat(a.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(r,n,o,this.parseMaybeUnary(null,!1,!1,s),"**",!1);else return o};function at(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&at(e.expression)}function ke(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&ke(e.expression)||e.type==="ParenthesizedExpression"&&ke(e.expression)}d.parseExprSubscripts=function(e,t){var i=this.start,s=this.startLoc,r=-1,n=-1;e&&(r=e.doubleProto,n=e.shorthandAssign,e.doubleProto=e.shorthandAssign=-1);var o=this.parseExprAtom(e,t);if(o.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return o;var u=this.parseSubscripts(o,i,s,!1,t);return e&&(u.end>o.end&&(this.checkExpressionErrors(e,!0),e.parenthesizedAssign>=u.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=u.start&&(e.parenthesizedBind=-1),e.trailingComma>=u.start&&(e.trailingComma=-1)),r>-1&&(e.doubleProto=r),n>-1&&(e.shorthandAssign=n)),u};d.parseSubscripts=function(e,t,i,s,r){for(var n=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var u=this.parseSubscript(e,t,i,s,n,o,r);if(u.optional&&(o=!0),u.end===e.end||u.type==="ArrowFunctionExpression"){if(o){var h=this.startNodeAt(t,i);h.expression=u,u=this.finishNode(h,"ChainExpression")}return u}e=u,n=!1}};d.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(a.arrow)};d.parseSubscriptAsyncArrow=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!0,s)};d.parseSubscript=function(e,t,i,s,r,n,o){var u=this.options.ecmaVersion>=11,h=u&&this.eat(a.questionDot);s&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var f=this.eat(a.bracketL);if(f||h&&this.type!==a.parenL&&this.type!==a.backQuote||this.eat(a.dot)){var p=this.startNodeAt(t,i);p.object=e,f?(p.property=this.parseExpression(),this.expect(a.bracketR)):this.type===a.privateId&&e.type!=="Super"?p.property=this.parsePrivateIdent():p.property=this.parseIdent(this.options.allowReserved!=="never"),p.computed=!!f,u&&(p.optional=h),e=this.finishNode(p,"MemberExpression")}else if(!s&&this.eat(a.parenL)){var g=new me,C=this.yieldPos,T=this.awaitPos,H=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var ne=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1,g);if(r&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=C,this.awaitPos=T,this.awaitIdentPos=H,this.parseSubscriptAsyncArrow(t,i,ne,o);this.checkExpressionErrors(g,!0),this.yieldPos=C||this.yieldPos,this.awaitPos=T||this.awaitPos,this.awaitIdentPos=H||this.awaitIdentPos;var z=this.startNodeAt(t,i);z.callee=e,z.arguments=ne,u&&(z.optional=h),e=this.finishNode(z,"CallExpression")}else if(this.type===a.backQuote){(h||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var K=this.startNodeAt(t,i);K.tag=e,K.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(K,"TaggedTemplateExpression")}return e};d.parseExprAtom=function(e,t,i){this.type===a.slash&&this.readRegexp();var s,r=this.potentialArrowAt===this.start;switch(this.type){case a._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),s=this.startNode(),this.next(),this.type===a.parenL&&!this.allowDirectSuper&&this.raise(s.start,"super() call outside constructor of a subclass"),this.type!==a.dot&&this.type!==a.bracketL&&this.type!==a.parenL&&this.unexpected(),this.finishNode(s,"Super");case a._this:return s=this.startNode(),this.next(),this.finishNode(s,"ThisExpression");case a.name:var n=this.start,o=this.startLoc,u=this.containsEsc,h=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!u&&h.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(b.f_expr),this.parseFunction(this.startNodeAt(n,o),0,!1,!0,t);if(r&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[h],!1,t);if(this.options.ecmaVersion>=8&&h.name==="async"&&this.type===a.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return h=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(a.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[h],!0,t)}return h;case a.regexp:var f=this.value;return s=this.parseLiteral(f.value),s.regex={pattern:f.pattern,flags:f.flags},s;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return s=this.startNode(),s.value=this.type===a._null?null:this.type===a._true,s.raw=this.type.keyword,this.next(),this.finishNode(s,"Literal");case a.parenL:var p=this.start,g=this.parseParenAndDistinguishExpression(r,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(g)&&(e.parenthesizedAssign=p),e.parenthesizedBind<0&&(e.parenthesizedBind=p)),g;case a.bracketL:return s=this.startNode(),this.next(),s.elements=this.parseExprList(a.bracketR,!0,!0,e),this.finishNode(s,"ArrayExpression");case a.braceL:return this.overrideContext(b.b_expr),this.parseObj(!1,e);case a._function:return s=this.startNode(),this.next(),this.parseFunction(s,0);case a._class:return this.parseClass(this.startNode(),!1);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};d.parseExprAtomDefault=function(){this.unexpected()};d.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===a.parenL&&!e)return this.parseDynamicImport(t);if(this.type===a.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};d.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(a.parenR)?e.options=null:(this.expect(a.comma),this.afterTrailingComma(a.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(a.parenR)||(this.expect(a.comma),this.afterTrailingComma(a.parenR)||this.unexpected())));else if(!this.eat(a.parenR)){var t=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")};d.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};d.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};d.parseParenExpression=function(){this.expect(a.parenL);var e=this.parseExpression();return this.expect(a.parenR),e};d.shouldParseArrow=function(e){return!this.canInsertSemicolon()};d.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,r,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,u=this.startLoc,h=[],f=!0,p=!1,g=new me,C=this.yieldPos,T=this.awaitPos,H;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;)if(f?f=!1:this.expect(a.comma),n&&this.afterTrailingComma(a.parenR,!0)){p=!0;break}else if(this.type===a.ellipsis){H=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else h.push(this.parseMaybeAssign(!1,g,this.parseParenItem));var ne=this.lastTokEnd,z=this.lastTokEndLoc;if(this.expect(a.parenR),e&&this.shouldParseArrow(h)&&this.eat(a.arrow))return this.checkPatternErrors(g,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=C,this.awaitPos=T,this.parseParenArrowList(i,s,h,t);(!h.length||p)&&this.unexpected(this.lastTokStart),H&&this.unexpected(H),this.checkExpressionErrors(g,!0),this.yieldPos=C||this.yieldPos,this.awaitPos=T||this.awaitPos,h.length>1?(r=this.startNodeAt(o,u),r.expressions=h,this.finishNodeAt(r,"SequenceExpression",ne,z)):r=h[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var K=this.startNodeAt(i,s);return K.expression=r,this.finishNode(K,"ParenthesizedExpression")}else return r};d.parseParenItem=function(e){return e};d.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,!1,s)};var Qt=[];d.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var s=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),s,r,!0,!1),e.callee.type==="Super"&&this.raiseRecoverable(s,"Invalid use of 'super'"),this.eat(a.parenL)?e.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Qt,this.finishNode(e,"NewExpression")};d.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===a.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,`
5
5
  `),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
@@ -0,0 +1,2 @@
1
+ import { createRequire as __createRequire } from 'module'; const require = __createRequire(import.meta.url);
2
+ var w=Object.create;var p=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var L=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var A=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(l){throw n=[l],l}};var H=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},W=(t,e)=>{for(var n in e)p(t,n,{get:e[n],enumerable:!0})},b=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of S(e))!E.call(t,s)&&s!==n&&p(t,s,{get:()=>e[s],enumerable:!(l=$(e,s))||l.enumerable});return t};var _=(t,e,n)=>(n=t!=null?w(D(t)):{},b(e||!t||!t.__esModule?p(n,"default",{value:t,enumerable:!0}):n,t)),Y=t=>b(p({},"__esModule",{value:!0}),t);var X=Uint8Array.fromBase64||(t=>new Uint8Array(Buffer.from(t,"base64")));function I(t){return[0,...[...t.matchAll(/\r\n|[\r\n\u2028\u2029]/g)].map(e=>e.index+e[0].length)]}var V=[".css",".scss",".less",".pcss",".postcss"];var q=t=>V.some(e=>t.toLowerCase().endsWith(e)),k="prefers-color-scheme: dark";function K(t){return[...t.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style\s*>/gi)].map(([,e])=>e)}function j(t){let e=new Map,n=new Map,l=new Map,s,r=!1,u=new Set,i=(a,f,c)=>{let m=a.get(f)??[],g=m.findIndex(h=>h.file===c.file);g===-1?m.push(c):m[g]=c,a.set(f,m)};for(let a of[...t].sort((f,c)=>f.file.localeCompare(c.file)))y(a.text,{statement:f=>{let c=/^@custom-variant\s+dark\s*\((.+)\)$/s.exec(f)?.[1],m=c===void 0?void 0:O(c);m&&(s=m)},declaration:(f,c,m)=>{if(!c.startsWith("--"))return;let g={file:a.file,value:m},h=C(f);if(h.kind==="theme"&&/^--color(-\*)?$/.test(c)&&m==="initial"){r=!0;return}if(h.kind==="theme"&&c.startsWith("--color-")&&u.add(c),h.kind==="theme"||h.kind==="root")i(e,c,g);else if(h.kind==="variant"){for(let v of h.names)i(n.get(v)??n.set(v,new Map).get(v),c,g);h.alsoRoot&&i(e,c,g)}else l.has(c)||l.set(c,h.where)}});let o=a=>Object.fromEntries([...a].sort(([f],[c])=>f.localeCompare(c)).map(([f,c])=>{let m=l.get(f);if(m)return[f,{ambiguous:`${f} is also set ${m}`}];let g=[...new Set(c.map(h=>h.value))];return[f,g.length===1?{value:g[0]}:{ambiguous:`${f} has different values in ${c.map(h=>h.file).join(" and ")}`}]})),d=o(e);for(let[a,f]of l)e.has(a)||(d[a]={ambiguous:`${a} is set ${f}`});return{variables:d,variants:[...n].sort(([a],[f])=>a.localeCompare(f)).map(([a,f])=>({name:a,variables:o(f)})),tailwindDark:s??k,...r?{noDefaultColors:r}:{},colors:[...u].sort()}}function C(t){let e,n,l=!1;for(let u of t){if(/^@layer\b/.test(u))continue;if(/^@theme\b/.test(u)){l=!0;continue}let i=/^@media\s*\(\s*prefers-color-scheme\s*:\s*(dark|light)\s*\)$/i.exec(u)?.[1];if(i&&e===void 0){e=`prefers-color-scheme: ${i.toLowerCase()}`;continue}if(u.startsWith("@"))return{kind:"scoped",where:`under ${u}`};if(n!==void 0)return{kind:"scoped",where:`in the nested rule ${n} ${u}`};n=u}if(l)return e||n?{kind:"scoped",where:`in @theme under ${e??n}`}:{kind:"theme"};if(n===void 0)return e?{kind:"scoped",where:`under @media (${e}) outside a rule`}:{kind:"scoped",where:"outside a rule"};let s=[],r=!1;for(let u of x(n)){let i=u.trim();if(M.test(i))r=!0;else{let o=T(i);if(o===void 0)return{kind:"scoped",where:`for ${n}`};s.push(o)}}return e?s.length>0?{kind:"scoped",where:`for ${n} under @media (${e})`}:{kind:"variant",names:[e],alsoRoot:!1}:s.length===0?{kind:"root"}:{kind:"variant",names:s,alsoRoot:r}}var M=/^(?::root|html|:host|body|\*)$/i;function T(t){let e=/^(:root|html|body)?(?::(?:where|is)\(\s*((?:\.[\w-]+|\[[^\]]+\])+)\s*\)|((?:\.[\w-]+|\[[^\]]+\])+))$/i.exec(t),n=e?.[2]??e?.[3];if(!(n===void 0||!e?.[1]&&!R.test(n)))return n.replace(/\s+/g,"").replace(/'/g,'"').replace(/=([^"\]]+)\]/g,'="$1"]')}var R=/dark|light|theme|mode|scheme|contrast/i;function O(t){let e=x(t.replace(/^&\s*:(?:where|is)\(/,"").replace(/\)\s*$/,""))[0]?.trim().replace(/\s+\*$/,"");if(e!==void 0)return/^@media\s*\(\s*prefers-color-scheme\s*:\s*dark\s*\)/i.test(t)?k:T(e)}function x(t){let e=[],n=0,l=0;for(let s=0;s<t.length;s++){let r=t[s];r==="("||r==="["?n++:r===")"||r==="]"?n--:r===","&&n===0&&(e.push(t.slice(l,s)),l=s+1)}return e.push(t.slice(l)),e}function y(t,e){let n=t.replace(/\/\*[\s\S]*?\*\//g," "),l=[],s="",r=0,u=()=>{let i=s.trim();if(s="",!i)return;if(i.startsWith("@")){e.statement(i.replace(/\s+/g," "));return}let o=i.indexOf(":");if(o===-1||l.length===0)return;let d=i.slice(0,o).trim(),a=i.slice(o+1).trim().replace(/\s*!important$/i,"");/^--[\w-]+$|^--[\w-]*\*$/.test(d)&&e.declaration(l,d,a)};for(let i=0;i<n.length;i++){let o=n[i];if(o==='"'||o==="'"){let d=n.indexOf(o,i+1),a=d===-1?n.length:d;s+=n.slice(i,a+1),i=a}else o==="("?(r++,s+=o):o===")"?(r=Math.max(0,r-1),s+=o):r>0?s+=o:o==="{"?(l.push(s.trim().replace(/\s+/g," ")),s=""):o===";"?u():o==="}"?(u(),l.pop()):s+=o}}function z(t,e,n){return e?.variables[n]??t?.variables[n]}function F(t,e){let n=(r,u)=>{let i={...r};for(let[o,d]of Object.entries(u)){let a=i[o];if(a===void 0||"value"in a&&"value"in d&&a.value===d.value)i[o]=d;else{if("ambiguous"in a)continue;i[o]="ambiguous"in d?d:{ambiguous:`${o} has different values in the project's stylesheets and the file's <style>`}}}return i},l=[...new Set([...t.variants,...e.variants].map(r=>r.name))].sort((r,u)=>r.localeCompare(u)),s=(r,u)=>r.variants.find(i=>i.name===u)?.variables??{};return{variables:n(t.variables,e.variables),variants:l.map(r=>({name:r,variables:n(s(t,r),s(e,r))})),tailwindDark:e.tailwindDark!==k?e.tailwindDark:t.tailwindDark,...t.noDefaultColors||e.noDefaultColors?{noDefaultColors:!0}:{},colors:[...new Set([...t.colors,...e.colors])].sort()}}export{L as a,A as b,H as c,W as d,_ as e,Y as f,X as g,I as h,V as i,q as j,k,K as l,j as m,z as n,F as o};