sveast 0.9.4 → 0.9.5

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.
Files changed (56) hide show
  1. package/README.md +1 -1
  2. package/core.js +1 -1
  3. package/entities.js +1 -1
  4. package/index.d.ts +3 -1
  5. package/index.js +1 -1
  6. package/is-valid-type.js +1 -1
  7. package/lexer.js +3 -3
  8. package/module.js +1 -1
  9. package/package.json +1 -1
  10. package/parse-imports-exports.js +1 -1
  11. package/parse-module.js +1 -1
  12. package/parse-sections.js +1 -1
  13. package/parse.js +1 -1
  14. package/runes.js +1 -1
  15. package/scope.d.ts +3 -1
  16. package/scope.js +1 -1
  17. package/shared-2pngd0mg.js +10 -0
  18. package/shared-5tpb3h6x.js +2 -0
  19. package/shared-bzqbnvee.js +2 -0
  20. package/shared-cs1ezg1f.js +2 -0
  21. package/shared-dgdrqgdn.js +2 -0
  22. package/shared-drb44hb9.js +2 -0
  23. package/shared-h6z1kjbb.js +2 -0
  24. package/shared-jpvd0875.js +2 -0
  25. package/shared-ke0fgd3r.js +2 -0
  26. package/shared-m0dcdh24.js +5 -0
  27. package/shared-m3dr31c3.js +2 -0
  28. package/shared-nan648gn.js +10 -0
  29. package/shared-qkp49nav.js +2 -0
  30. package/shared-rce4ty8a.js +3 -0
  31. package/shared-rvkvagj5.js +2 -0
  32. package/shared-xwzsb4m8.js +3 -0
  33. package/shared-y3nf00py.js +3 -0
  34. package/shared-y41kz9tv.js +2 -0
  35. package/shared-z9y4mrek.js +2 -0
  36. package/typescript.js +1 -1
  37. package/walk.js +1 -1
  38. package/shared-2by923ar.js +0 -3
  39. package/shared-3371ehgf.js +0 -2
  40. package/shared-4wqe6a27.js +0 -5
  41. package/shared-4zk9ntab.js +0 -2
  42. package/shared-artd3d80.js +0 -2
  43. package/shared-c9gzmr05.js +0 -2
  44. package/shared-h6c4cer7.js +0 -2
  45. package/shared-hjcsmz9f.js +0 -2
  46. package/shared-jxkrk6hx.js +0 -10
  47. package/shared-n0fpkmn8.js +0 -2
  48. package/shared-n1wnwhk8.js +0 -3
  49. package/shared-nbaaegmc.js +0 -2
  50. package/shared-rh41v5ez.js +0 -3
  51. package/shared-shxvsq2a.js +0 -2
  52. package/shared-stdj6se1.js +0 -2
  53. package/shared-v0nj05q2.js +0 -2
  54. package/shared-vjpq32kx.js +0 -2
  55. package/shared-xyqvjc3m.js +0 -10
  56. package/shared-znzncsf2.js +0 -2
@@ -0,0 +1,10 @@
1
+ import{internName,locate3,lineBreaksBefore,lineText,isNode,fieldsOf,mapChildren}from"./shared-m0dcdh24.js";import{definePlugin,extendParser,hasLineBreak,hasName}from"./shared-2pngd0mg.js";import{missingTypeScript}from"./shared-h6z1kjbb.js";var REGEX_LEADING_TABS=/^\t+/;class ParseError2 extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(node,code,reason){super(`${reason}
2
+ https://svelte.dev/e/${code}`);this.code=code,this.reason=reason;let start=typeof node==="number"?node:node?.start,end=typeof node==="number"?node:node?.end;if(start!==void 0)this.position=[start,end??start],this.start=locate3(this.position[0]),this.end=locate3(this.position[1]),this.frame=codeFrame(this.start.line-1,this.end.column)}}var tabsToSpaces=(text)=>text.replace(REGEX_LEADING_TABS,(match)=>" ".repeat(match.length));function codeFrame(line,column){let frameStart=Math.max(0,line-2),lines=[];for(let i=frameStart;i<line+3;i++){let text=lineText(i);if(text===void 0)break;lines.push(text)}let digits=String(frameStart+lines.length+1).length;return lines.map((text,i)=>{let numbered=`${String(frameStart+i+1).padStart(digits," ")}: ${tabsToSpaces(text)}`;if(frameStart+i!==line)return numbered;return`${numbered}
3
+ ${" ".repeat(digits+2+tabsToSpaces(text.slice(0,column)).length)}^`}).join(`
4
+ `)}function attribute_duplicate(node){throw new ParseError2(node,"attribute_duplicate","Attributes need to be unique")}function attribute_empty_shorthand(node){throw new ParseError2(node,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function block_duplicate_clause(node,name){throw new ParseError2(node,"block_duplicate_clause",`${name} cannot appear more than once within a block`)}function block_invalid_continuation_placement(node){throw new ParseError2(node,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function block_invalid_elseif(node){throw new ParseError2(node,"block_invalid_elseif","'elseif' should be 'else if'")}function block_invalid_placement(node,name,location){throw new ParseError2(node,"block_invalid_placement",`{#${name} ...} block cannot be ${location}`)}function block_unclosed(node){throw new ParseError2(node,"block_unclosed","Block was left open")}function block_unexpected_close(node){throw new ParseError2(node,"block_unexpected_close","Unexpected block closing tag")}function const_tag_invalid_expression(node){throw new ParseError2(node,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function css_empty_declaration(node){throw new ParseError2(node,"css_empty_declaration","Declaration cannot be empty")}function css_expected_identifier(node){throw new ParseError2(node,"css_expected_identifier","Expected a valid CSS identifier")}function css_selector_invalid(node){throw new ParseError2(node,"css_selector_invalid","Invalid selector")}function debug_tag_invalid_arguments(node){throw new ParseError2(node,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function declaration_tag_invalid_type(node){throw new ParseError2(node,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function directive_invalid_value(node){throw new ParseError2(node,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function directive_missing_name(node,type){throw new ParseError2(node,"directive_missing_name",`\`${type}\` name cannot be empty`)}function element_invalid_closing_tag(node,name){throw new ParseError2(node,"element_invalid_closing_tag",`\`</${name}>\` attempted to close an element that was not open`)}function element_invalid_closing_tag_autoclosed(node,name,reason){throw new ParseError2(node,"element_invalid_closing_tag_autoclosed",`\`</${name}>\` attempted to close element that was already automatically closed by \`<${reason}>\` (cannot nest \`<${reason}>\` inside \`<${name}>\`)`)}function element_unclosed(node,name){throw new ParseError2(node,"element_unclosed",`\`<${name}>\` was left open`)}function expected_attribute_value(node){throw new ParseError2(node,"expected_attribute_value","Expected attribute value")}function expected_block_type(node){throw new ParseError2(node,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function expected_identifier(node){throw new ParseError2(node,"expected_identifier","Expected an identifier")}function expected_pattern(node){throw new ParseError2(node,"expected_pattern","Expected identifier or destructure pattern")}function expected_tag(node){throw new ParseError2(node,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function expected_token(node,token){throw new ParseError2(node,"expected_token",`Expected token ${token}`)}function expected_whitespace(node){throw new ParseError2(node,"expected_whitespace","Expected whitespace")}function js_parse_error(node,message){throw new ParseError2(node,"js_parse_error",`${message}`)}function render_tag_invalid_expression(node){throw new ParseError2(node,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function script_duplicate(node){throw new ParseError2(node,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function script_invalid_attribute_value(node,name){throw new ParseError2(node,"script_invalid_attribute_value",`If the \`${name}\` attribute is supplied, it must be a boolean attribute`)}function script_invalid_context(node){throw new ParseError2(node,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function script_reserved_attribute(node,name){throw new ParseError2(node,"script_reserved_attribute",`The \`${name}\` attribute is reserved and cannot be used`)}function style_duplicate(node){throw new ParseError2(node,"style_duplicate","A component can have a single top-level `<style>` element")}function svelte_component_invalid_this(node){throw new ParseError2(node,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function svelte_component_missing_this(node){throw new ParseError2(node,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function svelte_element_missing_this(node){throw new ParseError2(node,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function svelte_meta_duplicate(node,name){throw new ParseError2(node,"svelte_meta_duplicate",`A component can only have one \`<${name}>\` element`)}function svelte_meta_invalid_content(node,name){throw new ParseError2(node,"svelte_meta_invalid_content",`<${name}> cannot have children`)}function svelte_meta_invalid_placement(node,name){throw new ParseError2(node,"svelte_meta_invalid_placement",`\`<${name}>\` tags cannot be inside elements or blocks`)}function svelte_meta_invalid_tag(node,list){throw new ParseError2(node,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${list}`)}function svelte_options_deprecated_tag(node){throw new ParseError2(node,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function svelte_options_invalid_attribute(node){throw new ParseError2(node,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function svelte_options_invalid_attribute_value(node,list){throw new ParseError2(node,"svelte_options_invalid_attribute_value",`Value must be ${list}, if specified`)}function svelte_options_invalid_customelement(node){throw new ParseError2(node,"svelte_options_invalid_customelement",'"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | `ShadowRootInit`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }')}function svelte_options_invalid_customelement_props(node){throw new ParseError2(node,"svelte_options_invalid_customelement_props",'"props" must be a statically analyzable object literal of the form "{ [key: string]: { attribute?: string; reflect?: boolean; type?: "String" | "Boolean" | "Number" | "Array" | "Object" }"')}function svelte_options_invalid_customelement_shadow(node){throw new ParseError2(node,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function svelte_options_invalid_tagname(node){throw new ParseError2(node,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function svelte_options_reserved_tagname(node){throw new ParseError2(node,"svelte_options_reserved_tagname","Tag name is reserved")}function svelte_options_unknown_attribute(node,name){throw new ParseError2(node,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${name}'`)}function tag_invalid_name(node){throw new ParseError2(node,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function tag_invalid_placement(node,name,location){throw new ParseError2(node,"tag_invalid_placement",`{@${name} ...} tag cannot be ${location}`)}function unexpected_eof(node){throw new ParseError2(node,"unexpected_eof","Unexpected end of input")}function unexpected_reserved_word(node,word){throw new ParseError2(node,"unexpected_reserved_word",`'${word}' is a reserved word in JavaScript and cannot be used here`)}function unterminated_string_constant(node){throw new ParseError2(node,"unterminated_string_constant","Unterminated string constant")}function void_element_invalid_content(node){throw new ParseError2(node,"void_element_invalid_content","Void elements cannot have children or closing tags")}var commentSource="",commentSink=[],commentEnd=0,queue=[],next=0;function bindOnComment(source,comments){commentSource=source,commentSink=comments,commentEnd=0}function lastCommentEnd(){return commentEnd}function skipComment(_block,_value,_start,end){commentEnd=end}function onComment(block,rawValue,start,end,startLoc,endLoc){commentEnd=end;let value=rawValue;if(block&&value.includes(`
5
+ `)){let lineStart=commentSource.lastIndexOf(`
6
+ `,start-1)+1,indentEnd=lineStart,code=commentSource.charCodeAt(indentEnd);while(code===32||code===9)code=commentSource.charCodeAt(++indentEnd);if(indentEnd>lineStart)value=stripLeadingIndentation(value,commentSource.slice(lineStart,indentEnd))}let comment={type:block?"Block":"Line",value,start,end};if(startLoc&&endLoc)comment.loc={start:startLoc,end:endLoc};commentSink.push(comment)}function stripLeadingIndentation(value,indentation){let from=value.startsWith(indentation)?indentation.length:0,result="",newline=value.indexOf(`
7
+ `,from);while(newline!==-1){if(result+=value.slice(from,newline+1),from=newline+1,value.startsWith(indentation,from))from+=indentation.length;newline=value.indexOf(`
8
+ `,from)}return result+value.slice(from)}function attachComments(ast,comments,fromIndex){let low=0,high=comments.length;while(low<high){let mid=low+high>>>1;if(comments[mid].start<fromIndex)low=mid+1;else high=mid}if(low>=comments.length)return;if(queue=comments.slice(low).map(({type,value,start,end})=>({type,value,start,end})),next=0,visit(ast,void 0,!1),next<queue.length&&(queue[next].start>=ast.end||ast.type==="Program")){ast.trailingComments??=[];while(next<queue.length)ast.trailingComments.push(queue[next++])}}var LIST_KEYS=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function gapBlocked(from,to){for(let i=from;i<to;i++){let code=commentSource.charCodeAt(i);if(code!==44&&code!==41&&code!==32&&code!==9)return!0}return!1}function visit(node,parent,lastInBody){while(next<queue.length&&queue[next].start<node.start)node.leadingComments??=[],node.leadingComments.push(queue[next++]);if(next>=queue.length)return;let upcoming=queue[next].start;if(upcoming<node.end||!gapBlocked(node.end,upcoming)){let fields=fieldsOf(node),listKey=LIST_KEYS.get(node.type),list=listKey===void 0?void 0:fields[listKey],listEmpty=Array.isArray(list)&&list.length===0;for(let key in fields){if(next>=queue.length)return;if(key==="type")continue;let value=fields[key];if(Array.isArray(value)){let inList=key===listKey;for(let i=0;i<value.length;i++){let child=value[i];if(isNode(child))visit(child,node,inList?i===value.length-1:listEmpty)}}else if(isNode(value))visit(value,node,listEmpty)}if(next>=queue.length)return}if(parent!==void 0&&node.end===parent.end)return;if(lastInBody)while(next<queue.length){if(parent&&queue[next].start>=parent.end)break;node.trailingComments??=[],node.trailingComments.push(queue[next++])}else if(node.end<=queue[next].start&&!gapBlocked(node.end,queue[next].start))node.trailingComments=[queue[next++]]}var RESERVED_WORDS=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" "));var sawParenthesized=!1,SCOPE_TOP=1,SCOPE_FUNCTION=2,SCOPE_SIMPLE_CATCH=32,SCOPE_CLASS_STATIC_BLOCK=256,SCOPE_VAR=SCOPE_TOP|SCOPE_FUNCTION|SCOPE_CLASS_STATIC_BLOCK,BIND_LEXICAL=2,BIND_FUNCTION=3,BIND_SIMPLE_CATCH=4,LINE_BREAK=/\r\n?|\n|\u2028|\u2029/,WORD_TESTERS=new Map;function wordTester(words){if(!(words instanceof RegExp))return words;let tester=WORD_TESTERS.get(words);if(!tester){let set=new Set(words.source.slice(4,-2).split("|"));tester={test:(word)=>set.has(word)},WORD_TESTERS.set(words,tester)}return tester}var declarations=definePlugin((Base)=>class extends Base{declareName(name,bindingType,pos){let redeclared=!1;if(bindingType===BIND_LEXICAL){let scope=this.currentScope();if(redeclared=hasName(scope.lexical,name)||hasName(scope.functions,name)||hasName(scope.var,name),scope.lexical.push(name),this.inModule&&scope.flags&SCOPE_TOP)delete this.undefinedExports[name]}else if(bindingType===BIND_SIMPLE_CATCH)this.currentScope().lexical.push(name);else if(bindingType===BIND_FUNCTION){let scope=this.currentScope();redeclared=this.treatFunctionsAsVar?hasName(scope.lexical,name):hasName(scope.lexical,name)||hasName(scope.var,name),scope.functions.push(name)}else for(let i=this.scopeStack.length-1;i>=0;--i){let scope=this.scopeStack[i];if(hasName(scope.lexical,name)&&!(scope.flags&SCOPE_SIMPLE_CATCH&&scope.lexical[0]===name)||!this.treatFunctionsAsVarInScope(scope)&&hasName(scope.functions,name)){redeclared=!0;break}if(scope.var.push(name),this.inModule&&scope.flags&SCOPE_TOP)delete this.undefinedExports[name];if(scope.flags&SCOPE_VAR)break}if(redeclared)this.raiseRecoverable(pos,`Identifier '${name}' has already been declared`)}}),tweaks=definePlugin((Base)=>{let{keywordTypes,tokTypes}=Base.acorn,keywordTokens=new Map("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 const class extends export import super".split(" ").map((word)=>[word,keywordTypes[word]])),initialContext;return class extends Base{constructor(options,input,startPos){super(options,input,startPos);this.keywords=wordTester(this.keywords),this.reservedWords=wordTester(this.reservedWords),this.reservedWordsStrict=wordTester(this.reservedWordsStrict),this.reservedWordsStrictBind=wordTester(this.reservedWordsStrictBind),initialContext??=this.context[0]}reset(input,pos,startLocation){if(super.reset?.(input,pos,startLocation),this.input=input,this.containsEsc=!1,this.pos=pos,startLocation)this.lineStart=pos-startLocation.column,this.curLine=startLocation.line;else this.lineStart=input.lastIndexOf(`
9
+ `,pos-1)+1,this.curLine=this.options.locations?input.slice(0,this.lineStart).split(LINE_BREAK).length:1;this.type=tokTypes.eof,this.value=null,this.start=this.end=pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=pos;let context=this.context;if(context.length!==1||context[0]!==initialContext)this.context=this.initialContext();if(this.exprAllowed=!0,this.strict=!0,this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels.length>0)this.labels=[];for(let _ in this.undefinedExports){this.undefinedExports=Object.create(null);break}let scopes=this.scopeStack,top=scopes[0];if(scopes.length!==1||top.flags!==SCOPE_TOP||top.var.length>0||top.lexical.length>0||top.functions.length>0||top.tsTypes!==void 0||top.tsExportOnly!==void 0||top.tsEnums!==void 0)this.scopeStack=[],this.enterScope(SCOPE_TOP);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(canBeArrow,forInit){let node=super.parseParenAndDistinguishExpression(canBeArrow,forInit);if(node.type==="ParenthesizedExpression")sawParenthesized=!0;return node}checkUnreserved(ref){if(RESERVED_WORDS.has(ref.name))super.checkUnreserved(ref)}canInsertSemicolon(){let type=this.type;return type===tokTypes.eof||type===tokTypes.braceR||hasLineBreak(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let input=this.input,locations=this.options.locations,pos=this.pos,code=input.charCodeAt(pos);for(;;)if(code===32||code===9)code=input.charCodeAt(++pos);else if(code===10){if(code=input.charCodeAt(++pos),locations)this.curLine++,this.lineStart=pos}else break;if(this.pos=pos,code===47||code<33||code>=128)super.skipSpace()}readWord1(){let input=this.input,start=this.pos,end=start,code=input.charCodeAt(end),hash=0;while(code>=97&&code<=122||code>=65&&code<=90||code>=48&&code<=57||code===95||code===36)hash=Math.imul(hash,31)+code|0,code=input.charCodeAt(++end);if(code>=128||code===92)return super.readWord1();return this.containsEsc=!1,this.pos=end,internName(input,start,end,hash)}readWord(){let word=this.readWord1();return this.finishToken(keywordTokens.get(word)??tokTypes.name,word)}}}),JSParser=extendParser(declarations,tweaks),REGEX_POSITION_SUFFIX=/ \(\d+:\d+\)$/;function estree(node){return node}function isSyntaxErrorAt(error){return error instanceof SyntaxError&&"pos"in error&&typeof error.pos==="number"}function run(context,source,start,preserveParens,parse,commentsBefore=context.root.comments.length){let comments=context.root.comments;bindOnComment(source,comments);let options={onComment:context.comments?onComment:skipComment,sourceType:"module",ecmaVersion:16,locations:context.loc,preserveParens};if(context.lfOnly)options.startLocation=locate3(start);let ParserClass=context.isTypeScript?context.typescript:JSParser;if(!ParserClass)missingTypeScript();let node;try{node=parse(ParserClass,options)}catch(error){if(!isSyntaxErrorAt(error))throw error;js_parse_error(error.pos,error.message.replace(REGEX_POSITION_SUFFIX,""))}if(comments.length>commentsBefore)attachComments(estree(node),comments,start);return node}function parseProgram(context,source,start=0){return estree(run(context,source,0,!1,(ParserClass,options)=>{if(start>0&&options.locations)options.startLocation=locate3(start);let program=new ParserClass(options,source,start).parse();return program.start=0,program},0))}function acornLocation(index,locations){if(!locations)return{line:1,column:0};let{column}=locate3(index);return{line:lineBreaksBefore(index-column)+1,column}}var acornExpressionParses={count:0},spare,readExpression=(parser)=>parser.parseExpression();function parseWithSpare(ParserClass,options,source,index,read){let entry=spare;if(spare=void 0,entry?.ParserClass===ParserClass&&entry.onComment===options.onComment&&entry.locations===options.locations&&entry.parser.reset)entry.parser.reset(source,index,options.startLocation);else entry={ParserClass,onComment:options.onComment,locations:options.locations,parser:new ParserClass(options,source,index)};let parser=entry.parser;parser.nextToken();let node=read(parser);return parser.input="",spare=entry,node}function parseMarkupAt(context,source,index,read){return acornExpressionParses.count+=1,sawParenthesized=!1,run(context,source,index,!0,(ParserClass,options)=>(options.startLocation??=acornLocation(index,options.locations),parseWithSpare(ParserClass,options,source,index,read)))}function parseExpressionAt(context,source,index,keepParens=!1){let node=estree(parseMarkupAt(context,source,index,readExpression)),end=Math.max(node.end,lastCommentEnd());return{node:sawParenthesized&&!keepParens?removeParens(node):node,end}}function parsePatternAt(context,source,index){let comments=context.root.comments.length,complete=!0,node=parseMarkupAt(context,source,index,(parser)=>{let refDestructuringErrors={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},left=parser.parseMaybeConditional(void 0,refDestructuringErrors);if(parser.type!==JSParser.acorn.tokTypes.eof)return complete=!1,left;let pattern=parser.toAssignable(left,!1,refDestructuringErrors);return parser.checkLValPattern(pattern),pattern});if(!complete){context.root.comments.length=comments;return}let pattern=estree(node);return sawParenthesized?removeParens(pattern):pattern}function parseStatementAt(context,source,index){return estree(run(context,source,index,!1,(ParserClass,options)=>{let parser=new ParserClass(options,source,index);try{return parser.nextToken(),parser.parseStatement(null,!0,Object.create(null))}catch(error){if(isSyntaxErrorAt(error)&&error.pos===source.length)unexpected_eof(source.length);throw error}}))}function parseStatementsAt(context,source,find){let program=run(context,source,0,!1,(ParserClass,options)=>{let parser=new ParserClass(options,source,0),node=parser.startNode(),body=[],exports=Object.create(null);return find((index)=>{parser.pos=index,parser.context=parser.initialContext(),parser.exprAllowed=!0,parser.nextToken();let statement=parser.parseStatement(null,!0,exports);return body.push(statement),statement.end}),node.body=body,parser.finishNode(node,"Program")});return estree(program).body}function removeParens(node){let inner=node;while(inner.type==="ParenthesizedExpression")inner=inner.expression;return mapChildren(inner,removeParens),inner}
10
+ export{ParseError2,attribute_duplicate,attribute_empty_shorthand,block_duplicate_clause,block_invalid_continuation_placement,block_invalid_elseif,block_invalid_placement,block_unclosed,block_unexpected_close,const_tag_invalid_expression,css_empty_declaration,css_expected_identifier,css_selector_invalid,debug_tag_invalid_arguments,declaration_tag_invalid_type,directive_invalid_value,directive_missing_name,element_invalid_closing_tag,element_invalid_closing_tag_autoclosed,element_unclosed,expected_attribute_value,expected_block_type,expected_identifier,expected_pattern,expected_tag,expected_token,expected_whitespace,render_tag_invalid_expression,script_duplicate,script_invalid_attribute_value,script_invalid_context,script_reserved_attribute,style_duplicate,svelte_component_invalid_this,svelte_component_missing_this,svelte_element_missing_this,svelte_meta_duplicate,svelte_meta_invalid_content,svelte_meta_invalid_placement,svelte_meta_invalid_tag,svelte_options_deprecated_tag,svelte_options_invalid_attribute,svelte_options_invalid_attribute_value,svelte_options_invalid_customelement,svelte_options_invalid_customelement_props,svelte_options_invalid_customelement_shadow,svelte_options_invalid_tagname,svelte_options_reserved_tagname,svelte_options_unknown_attribute,tag_invalid_name,tag_invalid_placement,unexpected_eof,unexpected_reserved_word,unterminated_string_constant,void_element_invalid_content,RESERVED_WORDS,declarations,tweaks,parseProgram,parseExpressionAt,parsePatternAt,parseStatementAt,parseStatementsAt};
@@ -0,0 +1,2 @@
1
+ import{parseComponent}from"./shared-xwzsb4m8.js";import{htmlEntityNames}from"./shared-drb44hb9.js";import{TypeScriptParser}from"./shared-ke0fgd3r.js";var support={typescript:TypeScriptParser,entityNames:htmlEntityNames};function parse2(source,options){return parseComponent(source,options,support)}
2
+ export{parse2};
@@ -0,0 +1,3 @@
1
+ import{closingTagOmitted}from"./shared-dgdrqgdn.js";import{withoutByteOrderMark,isWhitespace,skipWhitespace,isTypeScript,closingScriptTag,closingScriptTagEnd,isVoid,styleContentEnd,isQuote,nameEnd,endsUnquotedValue}from"./shared-5tpb3h6x.js";import{closingBracket}from"./shared-y3nf00py.js";var BLOCK="{",LT=60,GT=62,SLASH=47,EQUALS=61,BRACE=123,REGEX_CLOSING_STYLE_TAG_END=/\s*>/y,REGEX_CLOSING_TEXTAREA=/<\/textarea(\s[^>]*)?>/iy,SECTION_TAG_NAMES=["cript","tyle","velte:options"],CLOSING_OPTIONS_TAG="</svelte:options";function lexComponent2(input){let source=withoutByteOrderMark(input).trimEnd();return lex(source,isTypeScript(source),null)}function topLevelTags(source){let found={tags:[],comments:[]};return lex(source,!1,found),found}function lex(source,typescript,found){let component={typescript,instance:null,module:null,css:null,options:null},last=lastSectionTag(source),stack=[],i=0;while(i<=last){let code=source.charCodeAt(i);if(code===LT)i=readTag(source,i,stack,component,found);else if(code===BRACE)i=readMustache(source,i,stack);else i++}return component}function lastSectionTag(source){let last=-1,i=source.indexOf("<s");while(i!==-1){let end=sectionTagNameEnd(source,i+2);if(end!==-1){let code=source.charCodeAt(end);if(end===source.length||isWhitespace(code)||code===SLASH||code===GT)last=i}i=source.indexOf("<s",i+2)}return last}function sectionTagNameEnd(source,from){for(let name of SECTION_TAG_NAMES)if(source.startsWith(name,from))return from+name.length;return-1}function expressionEnd(source,from){return Math.min(closingBracket(source,from)+1,source.length)}function readMustache(source,start,stack){let i=skipWhitespace(source,start+1),code=source.charCodeAt(i),next=source.charCodeAt(i+1);if(code===35||code===58||code===64||code===SLASH&&next!==SLASH&&next!==42){i++;while(i<source.length){let letter=source.charCodeAt(i);if(letter<97||letter>122)break;i++}if(code===35)stack.push(BLOCK);else if(code===SLASH){let open=stack.lastIndexOf(BLOCK);if(open!==-1)stack.length=open}}return expressionEnd(source,i)}function readTag(source,start,stack,component,found){if(source.startsWith("!--",start+1)){let close=source.indexOf("-->",start+4),end=close===-1?source.length:close+3;if(found&&stack.length===0)found.comments.push(start,end);return end}if(source.charCodeAt(start+1)===SLASH){let nameStart=start+2,name=source.slice(nameStart,nameEnd(source,nameStart,!1)),open=stack.lastIndexOf(name);if(open!==-1)stack.length=open;return eatGreaterThan(source,skipWhitespace(source,nameStart+name.length))}let name=source.slice(start+1,nameEnd(source,start+1,!1)),i=skipWhitespace(source,start+1+name.length),parent=stack[stack.length-1];if(parent!==void 0&&closingTagOmitted(parent,name))stack.pop();let topLevel=stack.length===0;if(found&&topLevel&&(name==="script"||name==="style"||name==="svelte:options"))found.tags.push(start);if(topLevel&&(name==="script"||name==="style")){let attributes=[];if(i=eatGreaterThan(source,readStaticAttributes(source,i,attributes)),name==="script"){let script=readScript(source,start,i,attributes);if(script.context==="module")component.module??=script;else component.instance??=script;return script.end}let css=readStyle(source,start,i,attributes);return component.css??=css,css.end}let attributes=topLevel&&name==="svelte:options"?[]:null;if(i=readAttributes(source,i,attributes),source.charCodeAt(i)===SLASH||isVoid(name)){if(source.charCodeAt(i)===SLASH)i++;i=eatGreaterThan(source,i)}else{if(i=eatGreaterThan(source,i),name==="textarea")return textareaEnd(source,i);if(name==="script"||name==="style"){let closer=`</${name}>`,close=source.indexOf(closer,i);return close===-1?source.length:close+closer.length}if(attributes&&source.startsWith(CLOSING_OPTIONS_TAG,i))i=eatGreaterThan(source,skipWhitespace(source,i+CLOSING_OPTIONS_TAG.length));else return stack.push(name),i}if(attributes)component.options??={start,end:i,attributes};return i}function eatGreaterThan(source,i){return source.charCodeAt(i)===GT?i+1:i}function readScript(source,start,contentStart,attributes){let close=closingScriptTag(source,contentStart),contentEnd=close===-1?source.length:close,module=attributes.some((attribute)=>attribute.name==="module"||attribute.name==="context");return{start,end:close===-1?source.length:closingScriptTagEnd(source,close),context:module?"module":"default",attributes,content:{start:contentStart,end:contentEnd}}}function readStyle(source,start,contentStart,attributes){let contentEnd=styleContentEnd(source,contentStart),end=contentEnd;if(source.startsWith("</style",end)){end+=7,REGEX_CLOSING_STYLE_TAG_END.lastIndex=end;let close=REGEX_CLOSING_STYLE_TAG_END.exec(source);if(close)end+=close[0].length}return{start,end,attributes,content:{start:contentStart,end:contentEnd}}}function readStaticAttributes(source,from,into){let i=from;for(;;){let start=i,end=nameEnd(source,i,!0);if(end===start)return i;i=end;let value=!0;if(source.charCodeAt(i)===EQUALS){let at=skipWhitespace(source,i+1),quote=source.charCodeAt(at),valueEnd=-1;if(isQuote(quote)){let close=source.indexOf(source[at],at+1);if(close!==-1)valueEnd=close+1}if(valueEnd===-1){valueEnd=at;while(valueEnd<source.length&&source.charCodeAt(valueEnd)!==GT&&!isWhitespace(source.charCodeAt(valueEnd)))valueEnd++}let quotes=isQuote(quote)?1:0;value=source.slice(at+quotes,valueEnd-quotes),i=valueEnd}into.push({name:source.slice(start,end),value,start,end:i}),i=skipWhitespace(source,i)}}function readAttributes(source,from,into){let i=from;for(;;){for(;;){if(source.startsWith("/*",i)){let end=source.indexOf("*/",i+2);i=end===-1?source.length:end+2}else if(source.startsWith("//",i)){let end=source.indexOf(`
2
+ `,i+2);i=end===-1?source.length:end}else break;i=skipWhitespace(source,i)}let start=i;if(source.charCodeAt(i)===BRACE){i=skipWhitespace(source,expressionEnd(source,i+1));continue}let nameEndAt=nameEnd(source,i,!0);if(nameEndAt===start)return i;let end=nameEndAt,value=!0;if(i=skipWhitespace(source,nameEndAt),source.charCodeAt(i)===EQUALS){let at=skipWhitespace(source,i+1);end=source.startsWith("/>",at)?at+1:attributeValueEnd(source,at),value=isQuote(source.charCodeAt(at))?source.slice(at+1,Math.max(at+1,end-1)):source.slice(at,end),i=skipWhitespace(source,end)}into?.push({name:source.slice(start,nameEndAt),value,start,end})}}function attributeValueEnd(source,from){let quote=source.charCodeAt(from);if(isQuote(quote)){let i=from+1;while(i<source.length){let code=source.charCodeAt(i);if(code===quote)return i+1;i=code===BRACE?expressionEnd(source,i+1):i+1}return source.length}let i=from;while(i<source.length&&!endsUnquotedValue(source,i))i=source.charCodeAt(i)===BRACE?expressionEnd(source,i+1):i+1;return i}function textareaEnd(source,from){let i=from;while(i<source.length){let code=source.charCodeAt(i);if(code===LT){if(REGEX_CLOSING_TEXTAREA.lastIndex=i,REGEX_CLOSING_TEXTAREA.test(source))return REGEX_CLOSING_TEXTAREA.lastIndex}i=code===BRACE?expressionEnd(source,i+1):i+1}return source.length}
3
+ export{lexComponent2,topLevelTags};
@@ -0,0 +1,2 @@
1
+ import{setSource}from"./shared-m0dcdh24.js";import{parseStatementsAt}from"./shared-nan648gn.js";import{scan}from"./shared-y3nf00py.js";function parseImportsExportsWith(source,options,typescript){setSource(source);let context={isTypeScript:options.typescript??!1,typescript,loc:!1,comments:!1,root:{comments:[]}};return parseStatementsAt(context,source,(parseAt)=>scan(source,options.localExports??!0,parseAt))}
2
+ export{parseImportsExportsWith};
@@ -0,0 +1,3 @@
1
+ import{closingTagOmitted}from"./shared-dgdrqgdn.js";import{setSource,locate3,position,mapChildren,assertType}from"./shared-m0dcdh24.js";import{isIdentifierStart,isIdentifierChar}from"./shared-2pngd0mg.js";import{ParseError2,attribute_duplicate,attribute_empty_shorthand,block_duplicate_clause,block_invalid_continuation_placement,block_invalid_elseif,block_invalid_placement,block_unclosed,block_unexpected_close,const_tag_invalid_expression,css_empty_declaration,css_expected_identifier,css_selector_invalid,debug_tag_invalid_arguments,declaration_tag_invalid_type,directive_invalid_value,directive_missing_name,element_invalid_closing_tag,element_invalid_closing_tag_autoclosed,element_unclosed,expected_attribute_value,expected_block_type,expected_identifier,expected_pattern,expected_tag,expected_token,expected_whitespace,render_tag_invalid_expression,script_duplicate,script_invalid_attribute_value,script_invalid_context,script_reserved_attribute,style_duplicate,svelte_component_invalid_this,svelte_component_missing_this,svelte_element_missing_this,svelte_meta_duplicate,svelte_meta_invalid_content,svelte_meta_invalid_placement,svelte_meta_invalid_tag,svelte_options_deprecated_tag,svelte_options_invalid_attribute,svelte_options_invalid_attribute_value,svelte_options_invalid_customelement,svelte_options_invalid_customelement_props,svelte_options_invalid_customelement_shadow,svelte_options_invalid_tagname,svelte_options_reserved_tagname,svelte_options_unknown_attribute,tag_invalid_name,tag_invalid_placement,unexpected_eof,unexpected_reserved_word,unterminated_string_constant,void_element_invalid_content,RESERVED_WORDS,parseProgram,parseExpressionAt,parsePatternAt,parseStatementAt}from"./shared-nan648gn.js";import{withoutByteOrderMark,isDigit,isWhitespace,skipWhitespace,isTypeScript,closingScriptTag,closingScriptTagEnd,isVoid,styleContentEnd,isQuote,nameEnd,endsUnquotedValue}from"./shared-5tpb3h6x.js";import{decodeCharacterReferences}from"./shared-bzqbnvee.js";import{missingTypeScript}from"./shared-h6z1kjbb.js";var REGEX_NON_LF_LINE_BREAK=/\r(?!\n)|[\u2028\u2029]/,REGEX_WHITESPACE_THEN_CLOSING_BRACE=/\s*}/y;function scanIdentifier(source,from){let code=source.codePointAt(from);if(code===void 0||!isIdentifierStart(code,!0))return from;let end=from+(code<=65535?1:2),next=source.codePointAt(end);while(next!==void 0&&isIdentifierChar(next,!0))end+=next<=65535?1:2,next=source.codePointAt(end);return end}class TemplateParserState{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(source,originalLength,support,options={}){if(this.source=source,this.loc=options.loc??!1,this.lfOnly=this.loc&&!REGEX_NON_LF_LINE_BREAK.test(source),this.isTypeScript=isTypeScript(source),this.typescript=support.typescript,this.isTypeScript&&!this.typescript)missingTypeScript();this.entityNames=support.entityNames,this.css=options.css??!0,this.script=options.script??!0,this.comments=options.comments??!0,this.root={type:"Root",start:0,end:originalLength,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(str){if(str.length===1)return this.source.charCodeAt(this.index)===str.charCodeAt(0);return this.source.startsWith(str,this.index)}matchRegex(pattern){return pattern.lastIndex=this.index,pattern.exec(this.source)?.[0]??null}eat(str,required=!1){if(this.match(str))return this.index+=str.length,!0;if(required)expected_token(this.index,str);return!1}read(pattern){let result=this.matchRegex(pattern);if(result)this.index+=result.length;return result}readUntil(needle){if(this.index>=this.source.length)unexpected_eof(this.source.length);let found=this.source.indexOf(needle,this.index),end=found===-1?this.source.length:found,result=this.source.slice(this.index,end);return this.index=end,result}allowWhitespace(){this.index=skipWhitespace(this.source,this.index)}requireWhitespace(){if(!isWhitespace(this.source.charCodeAt(this.index)))expected_whitespace(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(start,end){return this.loc?{start:locate3(start),end:locate3(end)}:void 0}readIdentifierName(){let start=this.index,end=scanIdentifier(this.source,start),name=this.source.slice(start,end);if(this.index=end,RESERVED_WORDS.has(name))unexpected_reserved_word(start,name);let identifier={type:"Identifier",name,start,end};if(this.loc)identifier.loc=this.sourceLocation(start,end);return identifier}current(){return this.stack[this.stack.length-1]}append(node){this.fragments[this.fragments.length-1].nodes.push(node)}open(node,fragment){this.append(node),this.stack.push(node),this.fragments.push(fragment)}setFragment(fragment){this.fragments[this.fragments.length-1]=fragment}close(){this.stack.pop(),this.fragments.pop()}}var PRECEDENCE={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function literal(source,start,end,value){return{type:"Literal",start,end,value,raw:source.slice(start,end)}}function scanLiteral(source,from){let first=source.charCodeAt(from);if(first===34||first===39){for(let end=from+1;end<source.length;end++){let code=source.charCodeAt(end);if(code===first)return literal(source,from,end+1,source.slice(from+1,end));if(code===92||code===10||code===13)return null}return null}let end=from;for(;end<source.length;end++){let code=source.charCodeAt(end);if(code<48||code>57)break}if(end===from||first===48&&end-from>1)return null;return literal(source,from,end,Number(source.slice(from,end)))}function scanAtom(source,from,typescript){let identifierEnd=scanIdentifier(source,from);if(identifierEnd===from)return scanLiteral(source,from);let name=source.slice(from,identifierEnd);if(name==="true"||name==="false"||name==="null")return literal(source,from,identifierEnd,name==="null"?null:name==="true");if(RESERVED_WORDS.has(name))return null;let node={type:"Identifier",start:from,end:identifierEnd,name};for(let index=identifierEnd;;){let next=source.charCodeAt(index);if(next===40){let call=scanArguments(source,index+1,typescript);if(!call)return null;node={type:"CallExpression",start:from,end:call.end,callee:node,arguments:call.arguments,optional:!1},index=call.end;continue}let property,end;if(next===46){if(end=scanIdentifier(source,index+1),end===index+1)return null;property={type:"Identifier",start:index+1,end,name:source.slice(index+1,end)}}else if(next===91){if(property=scanLiteral(source,index+1),!property||source.charCodeAt(property.end)!==93)return null;end=property.end+1}else return node;node={type:"MemberExpression",start:from,end,object:node,property,computed:next===91,optional:!1},index=end}}function scanArguments(source,from,typescript){let args=[],index=skipWhitespace(source,from);if(source.charCodeAt(index)===41)return{arguments:args,end:index+1};for(;;){let argument=scanConditional(source,index,typescript);if(!argument)return null;args.push(argument),index=skipWhitespace(source,argument.end);let code=source.charCodeAt(index);if(code===41)return{arguments:args,end:index+1};if(code!==44)return null;if(index=skipWhitespace(source,index+1),source.charCodeAt(index)===41)return null}}function scanUnary(source,from,typescript){let code=source.charCodeAt(from),next=source.charCodeAt(from+1);if(!(code===33&&next!==61)&&!(code===45&&next!==45&&next!==61))return scanAtom(source,from,typescript);let argument=scanUnary(source,skipWhitespace(source,from+1),typescript);if(!argument)return null;return{type:"UnaryExpression",start:from,end:argument.end,operator:code===33?"!":"-",prefix:!0,argument}}function operatorAt(source,index,typescript){let code=source.charCodeAt(index),next=source.charCodeAt(index+1);switch(code){case 124:return next===124&&source.charCodeAt(index+2)!==61?"||":null;case 38:return next===38&&source.charCodeAt(index+2)!==61?"&&":null;case 63:return next===63&&source.charCodeAt(index+2)!==61?"??":null;case 61:if(next!==61)return null;return source.charCodeAt(index+2)===61?"===":"==";case 33:if(next!==61)return null;return source.charCodeAt(index+2)===61?"!==":"!=";case 60:case 62:if(typescript||next===code)return null;if(next===61)return code===60?"<=":">=";return code===60?"<":">";case 43:return next===43||next===61?null:"+";case 45:return next===45||next===61?null:"-";case 42:return next===42||next===61?null:"*";case 47:return next===47||next===42||next===61?null:"/";case 37:return next===61?null:"%";default:return null}}function scanBinary(source,left,minPrecedence,typescript){if(isClosing(source.charCodeAt(left.end)))return left;let index=skipWhitespace(source,left.end),operator=operatorAt(source,index,typescript);if(operator===null)return left;let precedence=PRECEDENCE[operator];if(precedence<=minPrecedence)return left;let operand=scanUnary(source,skipWhitespace(source,index+operator.length),typescript);if(!operand)return null;let right=scanBinary(source,operand,operator==="??"?2:precedence,typescript);if(!right)return null;let node;if(operator==="||"||operator==="&&"||operator==="??"){let after=operatorAt(source,skipWhitespace(source,right.end),typescript);if(operator==="??"?after==="||"||after==="&&":after==="??")return null;node={type:"LogicalExpression",start:left.start,end:right.end,left,operator,right}}else node={type:"BinaryExpression",start:left.start,end:right.end,left,operator,right};return scanBinary(source,node,minPrecedence,typescript)}function scanConditional(source,from,typescript){let operand=scanUnary(source,from,typescript);if(!operand)return null;let test=scanBinary(source,operand,-1,typescript);if(!test||isClosing(source.charCodeAt(test.end)))return test;let question=skipWhitespace(source,test.end);if(source.charCodeAt(question)!==63)return test;let next=source.charCodeAt(question+1);if(next===46||next===63)return null;let consequent=scanConditional(source,skipWhitespace(source,question+1),typescript);if(!consequent)return null;let colon=skipWhitespace(source,consequent.end);if(source.charCodeAt(colon)!==58)return null;let alternate=scanConditional(source,skipWhitespace(source,colon+1),typescript);if(!alternate)return null;return{type:"ConditionalExpression",start:test.start,end:alternate.end,test,consequent,alternate}}function isClosing(code){return code===125||code===41||code===44||code===58}function atTerminator(source,from){let code=source.charCodeAt(skipWhitespace(source,from));return code===125||code===41}function scanTrivialExpression(source,from,typescript){let node=scanConditional(source,from,typescript);return node&&atTerminator(source,node.end)?node:null}function addLocations(node){switch(node.loc={start:position(node.start),end:position(node.end)},node.type){case"MemberExpression":addLocations(node.object),addLocations(node.property);break;case"CallExpression":addLocations(node.callee);for(let argument of node.arguments)addLocations(argument);break;case"UnaryExpression":addLocations(node.argument);break;case"BinaryExpression":case"LogicalExpression":addLocations(node.left),addLocations(node.right);break;case"ConditionalExpression":addLocations(node.test),addLocations(node.consequent),addLocations(node.alternate);break}}function readExpression(state){let trivial=!state.loc||state.lfOnly?scanTrivialExpression(state.source,state.index,state.isTypeScript):null;if(trivial){if(state.index=trivial.end,state.loc)addLocations(trivial);return trivial}let{node,end}=parseExpressionAt(state,state.source,state.index);return state.index=end,node}var RESERVED_ATTRIBUTES=new Set(["server","client","worker","test","default"]);function readScript(state,start,attributes){let{source,index:scriptStart}=state;if(scriptStart>=source.length)unexpected_eof(source.length);let close=closingScriptTag(source,scriptStart);if(close===-1)element_unclosed(source.length,"script");state.index=closingScriptTagEnd(source,close);let program=state.script?parseProgram(state,source.slice(0,close),scriptStart):{type:"Program",start:scriptStart,end:close,body:[],sourceType:"module"};if(program.start=scriptStart,program.loc)Object.assign(program.loc.start,position(start)),Object.assign(program.loc.end,position(state.index));else if(state.loc)program.loc={start:position(start),end:position(state.index)};let context="default";for(let attribute of attributes){if(RESERVED_ATTRIBUTES.has(attribute.name))script_reserved_attribute(attribute,attribute.name);if(attribute.name==="module"){if(attribute.value!==!0)script_invalid_attribute_value(attribute,attribute.name);context="module"}if(attribute.name==="context"){let value=attribute.value;if(!Array.isArray(value)||value.length!==1||value[0].type!=="Text"||value[0].data!=="module")script_invalid_context(attribute);context="module"}}return{type:"Script",start,end:state.index,context,content:program,attributes}}var REGEX_NTH_OF=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,REGEX_PERCENTAGE=/\d+(\.\d+)?%/y,REGEX_UNICODE_SEQUENCE=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,REGEX_CLOSING_STYLE_TAG_END=/\s*>/y,NONE=-1,DOUBLE_QUOTE=34,HASH=35,DOLLAR=36,AMPERSAND=38,SINGLE_QUOTE=39,OPEN_PAREN=40,CLOSE_PAREN=41,ASTERISK=42,PLUS=43,HYPHEN=45,DOT=46,SLASH=47,COLON=58,SEMICOLON=59,LESS_THAN=60,EQUALS=61,GREATER_THAN=62,OPEN_BRACKET=91,BACKSLASH=92,CLOSE_BRACKET=93,CARET=94,OPEN_BRACE=123,PIPE=124,CLOSE_BRACE=125,TILDE=126,comments=[];function readStyle(state,start,attributes){let contentStart=state.index;comments=[];let children=state.css?readBody(state):skipBody(state),contentEnd=state.index;return state.eat("</style",!0),state.read(REGEX_CLOSING_STYLE_TAG_END),{type:"StyleSheet",start,end:state.index,attributes,children,comments,content:{start:contentStart,end:contentEnd,styles:state.source.slice(contentStart,contentEnd),comment:null}}}function skipBody(state){return state.index=styleContentEnd(state.source,state.index),[]}function readBody(state){let children=[];for(;;){if(allowCommentOrWhitespace(state,!0),state.match("</style")||state.index>=state.source.length)break;children.push(state.match("@")?readAtRule(state):readRule(state))}return children}function readAtRule(state){let start=state.index;state.eat("@",!0);let name=readIdentifier(state),prelude=readValue(state,!0),block=null;if(state.match("{"))block=readBlock(state);else state.eat(";",!0);return{type:"Atrule",start,end:state.index,name,prelude,block}}function readRule(state){let start=state.index;return{type:"Rule",prelude:readSelectorList(state,!1),block:readBlock(state),start,end:state.index}}function readSelectorList(state,insidePseudoClass){let children=[];allowCommentOrWhitespace(state,!0);let start=state.index;while(state.index<state.source.length){children.push(readSelector(state,insidePseudoClass));let end=state.index;if(allowCommentOrWhitespace(state,!0),state.match(insidePseudoClass?")":"{"))return{type:"SelectorList",start,end,children};state.eat(",",!0),allowCommentOrWhitespace(state,!0)}return unexpected_eof(state.source.length)}function createRelativeSelector(combinator,start){return{type:"RelativeSelector",combinator,selectors:[],start,end:-1}}function readSelector(state,insidePseudoClass){let{source,index:listStart}=state,children=[],relativeSelector=createRelativeSelector(null,state.index);while(state.index<source.length){let start=state.index,code=source.charCodeAt(start),selectors=relativeSelector.selectors;if(code===AMPERSAND)state.index++,selectors.push({type:"NestingSelector",name:"&",start,end:state.index});else if(code===ASTERISK)state.index++,selectors.push(readTypeSelectorRest(state,start,"*"));else if(code===HASH)state.index++,selectors.push({type:"IdSelector",name:readIdentifier(state),start,end:state.index});else if(code===DOT)state.index++,selectors.push({type:"ClassSelector",name:readIdentifier(state),start,end:state.index});else if(code===COLON){let isElement=source.charCodeAt(start+1)===COLON;state.index+=isElement?2:1;let name=readIdentifier(state),args=null;if(state.eat("("))args=readSelectorList(state,!0),state.eat(")",!0);if(isElement)selectors.push({type:"PseudoElementSelector",name,start,end:state.index,...args&&{args}});else selectors.push({type:"PseudoClassSelector",name,args,start,end:state.index})}else if(code===OPEN_BRACKET)state.index++,selectors.push(readAttributeSelector(state,start));else{let nth=insidePseudoClass?state.read(REGEX_NTH_OF):null,percentage=!nth&&isDigit(code)?state.read(REGEX_PERCENTAGE):null;if(nth)selectors.push({type:"Nth",value:nth,start,end:state.index});else if(percentage)selectors.push({type:"Percentage",value:percentage,start,end:state.index});else if(combinatorLength(source,start)===0){let name=readIdentifier(state);selectors.push(readTypeSelectorRest(state,start,name))}}let index=state.index;allowCommentOrWhitespace(state,!1);let end=state.match(",")||state.match(insidePseudoClass?")":"{");if(state.index=index,end)return relativeSelector.end=index,children.push(relativeSelector),{type:"ComplexSelector",start:listStart,end:index,children};let combinator=readCombinator(state);if(combinator){if(relativeSelector.selectors.length>0)relativeSelector.end=index,children.push(relativeSelector);if(relativeSelector=createRelativeSelector(combinator,combinator.start),state.allowWhitespace(),state.match(",")||state.match(insidePseudoClass?")":"{"))css_selector_invalid(state.index)}}return unexpected_eof(source.length)}function readTypeSelectorRest(state,start,first){let name=first,namespace;if(state.eat("|"))namespace=name,name=state.eat("*")?"*":readIdentifier(state);return{type:"TypeSelector",name,...namespace!==void 0&&{namespace},start,end:state.index}}function readAttributeSelector(state,start){let source=state.source;state.allowWhitespace();let name=readIdentifier(state);state.allowWhitespace();let value=null,matcher=null,code=source.charCodeAt(state.index);if(code===EQUALS)matcher="=";else if((code===TILDE||code===CARET||code===DOLLAR||code===ASTERISK||code===PIPE)&&source.charCodeAt(state.index+1)===EQUALS)matcher=source.slice(state.index,state.index+2);if(matcher)state.index+=matcher.length,state.allowWhitespace(),value=readAttributeValue(state);state.allowWhitespace();let flagsStart=state.index;while(isAsciiLetter(source.charCodeAt(state.index)))state.index++;let flags=state.index>flagsStart?source.slice(flagsStart,state.index):null;return state.allowWhitespace(),state.eat("]",!0),{type:"AttributeSelector",start,end:state.index,name,matcher,value,flags}}function combinatorLength(source,index){let code=source.charCodeAt(index);if(code===PLUS||code===TILDE||code===GREATER_THAN)return 1;if(code===PIPE&&source.charCodeAt(index+1)===PIPE)return 2;return 0}function readCombinator(state){let start=state.index;state.allowWhitespace();let index=state.index,length=combinatorLength(state.source,index);if(length>0){state.index+=length;let end=state.index;return state.allowWhitespace(),{type:"Combinator",name:state.source.slice(index,end),start:index,end}}if(state.index!==start)return{type:"Combinator",name:" ",start,end:state.index};return null}function readBlock(state){let start=state.index;state.eat("{",!0);let children=[];while(state.index<state.source.length){if(allowCommentOrWhitespace(state,!0),state.match("}"))break;children.push(readBlockItem(state))}return state.eat("}",!0),{type:"Block",start,end:state.index,children}}function readBlockItem(state){if(state.match("@"))return readAtRule(state);let start=state.index;readValue(state,!1);let code=state.source.charCodeAt(state.index);return state.index=start,code===OPEN_BRACE?readRule(state):readDeclaration(state)}function readDeclaration(state){let{source,index:start}=state;if(start>=source.length)unexpected_eof(source.length);let propertyEnd=start;while(propertyEnd<source.length){let code=source.charCodeAt(propertyEnd);if(code===COLON||isWhitespace(code))break;propertyEnd++}let property=source.slice(start,propertyEnd);state.index=propertyEnd,state.allowWhitespace(),state.eat(":");let index=state.index;state.allowWhitespace();let value=readValue(state,!0);if(!value&&!property.startsWith("--"))css_empty_declaration({start,end:index});let end=state.index;if(!state.match("}"))state.eat(";",!0);return{type:"Declaration",start,end,property,value}}function readValue(state,capture){let source=state.source,length=source.length,value="",segmentStart=state.index,valueComments=null,escaped=!1,inUrl=!1,quoteMark=NONE,i=state.index;while(i<length){let code=source.charCodeAt(i);if(escaped){escaped=!1,i++;continue}if(code===BACKSLASH){escaped=!0,i++;continue}if(code===quoteMark)quoteMark=NONE;else if(code===CLOSE_PAREN)inUrl=!1;else if(quoteMark===NONE&&(code===DOUBLE_QUOTE||code===SINGLE_QUOTE))quoteMark=code;else if(code===OPEN_PAREN){if(endsWithUrl(source,value,segmentStart,i))inUrl=!0}else if((code===SEMICOLON||code===OPEN_BRACE||code===CLOSE_BRACE)&&!inUrl&&quoteMark===NONE){if(state.index=i,!capture)return"";if(value+=source.slice(segmentStart,i),valueComments){let leadingWhitespace=value.length-value.trimStart().length;for(let comment of valueComments)comment.position=Math.max(0,(comment.position??0)-leadingWhitespace)}return value.trim()}else if(code===SLASH&&!inUrl&&quoteMark===NONE&&source.charCodeAt(i+1)===ASTERISK){value+=source.slice(segmentStart,i),state.index=i;let comment=readComment(state);if(capture)comment.position=value.length,comments.push(comment),valueComments??=[],valueComments.push(comment);i=state.index,segmentStart=i;continue}i++}return state.index=length,unexpected_eof(length)}function endsWithUrl(source,value,segmentStart,end){if(end-segmentStart>=3)return source.charCodeAt(end-3)===117&&source.charCodeAt(end-2)===114&&source.charCodeAt(end-1)===108;return(value+source.slice(segmentStart,end)).endsWith("url")}function readAttributeValue(state){let source=state.source,quoteMark=NONE;if(state.eat('"'))quoteMark=DOUBLE_QUOTE;else if(state.eat("'"))quoteMark=SINGLE_QUOTE;let start=state.index,escaped=!1,i=start;while(i<source.length){let code=source.charCodeAt(i);if(escaped)escaped=!1;else if(code===BACKSLASH)escaped=!0;else if(quoteMark===NONE?code===CLOSE_BRACKET||isWhitespace(code):code===quoteMark)return state.index=quoteMark===NONE?i:i+1,source.slice(start,i).trim();i++}return state.index=i,unexpected_eof(source.length)}function readIdentifier(state){let{source,index:start}=state,first=source.charCodeAt(start);if(isDigit(first)||first===HYPHEN&&isDigit(source.charCodeAt(start+1)))css_expected_identifier(start);let identifier="",runStart=start,i=start;while(i<source.length){let code=source.charCodeAt(i);if(code===BACKSLASH){identifier+=source.slice(runStart,i),state.index=i;let sequence=state.matchRegex(REGEX_UNICODE_SEQUENCE);if(sequence){let character=String.fromCodePoint(Number.parseInt(sequence.slice(1),16));identifier+=character==="\\"?"\\\\":character,i+=sequence.length}else identifier+=`\\${source[i+1]}`,i+=2;runStart=i}else if(code>=160||isIdentifierChar2(code))i++;else break}if(identifier+=source.slice(runStart,i),state.index=i,identifier==="")css_expected_identifier(start);return identifier}function allowCommentOrWhitespace(state,capture){let source=state.source;state.allowWhitespace();for(;;){let code=source.charCodeAt(state.index);if(code===SLASH&&source.charCodeAt(state.index+1)===ASTERISK){let comment=readComment(state);if(capture)comments.push(comment)}else if(code===LESS_THAN&&state.eat("<!--"))state.readUntil("-->"),state.eat("-->",!0);else break;state.allowWhitespace()}}function readComment(state){let start=state.index;state.eat("/*",!0);let value=state.readUntil("*/");return state.eat("*/",!0),{type:"CSSComment",value,start,end:state.index}}function isAsciiLetter(code){return code>=65&&code<=90||code>=97&&code<=122}function isIdentifierChar2(code){return isAsciiLetter(code)||isDigit(code)||code===95||code===45}var REGEX_CLOSING_TEXTAREA=/<\/textarea(\s[^>]*)?>/iy,REGEX_DOCTYPE_NAME=/^![a-zA-Z]+$/,REGEX_NAMESPACED_NAME=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,REGEX_CUSTOM_ELEMENT_NAME=/^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u,ID_JOINERS="\\u200C\\u200D",REGEX_COMPONENT_NAME=new RegExp(`^(?:\\p{Lu}[$${ID_JOINERS}\\p{ID_Continue}.]*|\\p{ID_Start}[$${ID_JOINERS}\\p{ID_Continue}]*(?:\\.[$${ID_JOINERS}\\p{ID_Continue}]+)+)$`,"u"),DIRECTIVES=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),META_TAGS=new Map([["svelte:head",["SvelteHead",!0]],["svelte:options",["SvelteOptions",!0]],["svelte:window",["SvelteWindow",!0]],["svelte:document",["SvelteDocument",!0]],["svelte:body",["SvelteBody",!0]],["svelte:element",["SvelteElement",!1]],["svelte:component",["SvelteComponent",!1]],["svelte:self",["SvelteSelf",!1]],["svelte:fragment",["SvelteFragment",!1]],["svelte:boundary",["SvelteBoundary",!1]]]),META_TAG_NAMES=[...META_TAGS.keys()],META_TAG_LIST=`${META_TAG_NAMES.slice(0,-1).join(", ")} or ${META_TAG_NAMES.at(-1)}`,GT=62,BRACE=123;function readName(state,isAttribute){let start=state.index;if(start>=state.source.length)unexpected_eof(state.source.length);let end=nameEnd(state.source,start,isAttribute);return state.index=end,{name:state.source.slice(start,end),start,end,loc:state.sourceLocation(start,end)}}var text=(start,end,raw,data=raw)=>({start,end,type:"Text",raw,data});function isComponentName(name){let first=name.charCodeAt(0);if(first>=97&&first<=122&&!name.includes("."))return!1;return REGEX_COMPONENT_NAME.test(name)}function isElementName(name){let simple=!0;for(let i=0;i<name.length&&simple;i++){let code=name.charCodeAt(i);simple=code>=97&&code<=122||i>0&&code>=48&&code<=57}return simple&&name.length>0||REGEX_DOCTYPE_NAME.test(name)||REGEX_NAMESPACED_NAME.test(name)||REGEX_CUSTOM_ELEMENT_NAME.test(name)}function hasAncestor(stack,matches){for(let i=stack.length-1;i>=0;i--){let found=matches(stack[i]);if(found!==void 0)return found}return!1}function elementType(state,name,isComponent){let meta=META_TAGS.get(name);if(meta)return meta[0];if(isComponent)return"Component";if(name==="title"){if(hasAncestor(state.stack,({type})=>{if(type==="SvelteHead")return!0;return type==="RegularElement"||type==="Component"?!1:void 0}))return"TitleElement"}if(name==="slot"){if(!hasAncestor(state.stack,(node)=>node.type==="RegularElement"&&node.attributes.some((a)=>a.type==="Attribute"&&a.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function readElement(state){let start=state.index++;if(state.eat("!--")){let data=state.readUntil("-->");state.eat("-->",!0),state.append({type:"Comment",start,end:state.index,data})}else if(state.eat("/"))closeElement(state,start);else openElement(state,start)}function closeElement(state,start){let{name}=readName(state,!1);if(state.allowWhitespace(),state.eat(">",!0),isVoid(name))void_element_invalid_content(start);let open=state.current();while(!("name"in open)||open.name!==name){if(open.type!=="RegularElement"){let autoClosed=state.lastAutoClosedTag;if(autoClosed?.tag===name)element_invalid_closing_tag_autoclosed(start,name,autoClosed.reason);element_invalid_closing_tag(start,name)}open.end=start,state.close(),open=state.current()}if(open.end=state.index,state.close(),state.stack.length<(state.lastAutoClosedTag?.depth??0))state.lastAutoClosedTag=void 0}function createElement(type,start,name){return{type,start,end:-1,name}}function openElement(state,start){let tag=readName(state,!1),{name}=tag,meta=META_TAGS.get(name);if(!meta&&name.startsWith("svelte:"))svelte_meta_invalid_tag(tag,META_TAG_LIST);let isComponent=isComponentName(name);if(!isComponent&&!isElementName(name))tag_invalid_name(tag);if(meta?.[1]){if(state.metaTags.has(name))svelte_meta_duplicate(start,name);if(state.current().type!=="Root")svelte_meta_invalid_placement(start,name);state.metaTags.add(name)}let element=createElement(elementType(state,name,isComponent),start,name);if(state.loc)element.name_loc=tag.loc;element.attributes=[],element.fragment={type:"Fragment",nodes:[]},state.allowWhitespace();let parent=state.current();if(parent.type==="RegularElement"&&closingTagOmitted(parent.name,name))parent.end=start,state.close(),state.lastAutoClosedTag={tag:parent.name,reason:name,depth:state.stack.length};if((name==="script"||name==="style")&&state.current().type==="Root"){let attributes=[];element.attributes=attributes,readAttributes(state,attributes,readStaticAttribute),readTopLevelBlock(state,element,start,attributes);return}if(readAttributes(state,element.attributes,readAttribute),element.type==="SvelteComponent"){let definition=takeThis(element);if(!definition)svelte_component_missing_this(start);if(!isExpressionValue(definition.value))svelte_component_invalid_this(definition.start);element.expression=expressionOf(definition.value)}else if(element.type==="SvelteElement"){let definition=takeThis(element);if(!definition)svelte_element_missing_this(start);if(definition.value===!0)svelte_element_missing_this(definition);element.tag=isExpressionValue(definition.value)?expressionOf(definition.value):literalTag(definition.value[0])}if(!state.eat("/")&&!isVoid(name))if(state.eat(">",!0),name==="textarea")element.fragment.nodes=readSequence(state,(source,i)=>(REGEX_CLOSING_TEXTAREA.lastIndex=i,REGEX_CLOSING_TEXTAREA.test(source)),"inside <textarea>"),state.read(REGEX_CLOSING_TEXTAREA);else if(name==="script"||name==="style")element.fragment.nodes.push(readRawText(state,`</${name}>`));else{state.open(element,element.fragment);return}else state.eat(">",!0);element.end=state.index,state.append(element)}function readRawText(state,closer){let start=state.index,found=state.source.indexOf(closer,start);state.index=found===-1?state.source.length:found;let node=text(start,state.index,state.source.slice(start,state.index));return state.eat(closer,!0),node}function readTopLevelBlock(state,element,start,attributes){state.eat(">",!0);let comment=commentBefore(state.root.fragment.nodes,start);if(element.name==="style"){let css=readStyle(state,start,attributes);if(css.content.comment=comment,state.root.css)style_duplicate(start);state.root.css=css;return}let script=readScript(state,start,attributes);if(comment&&state.comments)script.content.leadingComments=[{type:"Line",value:comment.data}];let slot=script.context==="module"?"module":"instance";if(state.root[slot])script_duplicate(start);state.root[slot]=script}function commentBefore(nodes,start){let last=nodes.length-1;if(last<0||nodes[last].end!==start)return null;for(let i=last;i>=0;i--){let node=nodes[i];if(node.type==="Comment")return node;if(node.type!=="Text"||node.data.trim())return null}return null}var isThisAttribute=(node)=>node.type==="Attribute"&&node.name==="this";function takeThis(element){let found=element.attributes.find(isThisAttribute);if(found)element.attributes.splice(element.attributes.indexOf(found),1);return found}function isExpressionValue(value){if(value===!0)return!1;if(!Array.isArray(value))return!0;return value.length===1&&value[0].type==="ExpressionTag"}function expressionOf(value){return(Array.isArray(value)?value[0]:value).expression}function literalTag(chunk){if(chunk.type!=="Text")return chunk.expression;return{type:"Literal",value:chunk.data,raw:`'${chunk.raw}'`,start:chunk.start,end:chunk.end}}function readAttributes(state,into,read){let seen=new Set;for(;;){let parsed=read(state);if(!parsed)return;let{type}=parsed;if(type==="Attribute"||type==="BindDirective"||type==="StyleDirective"||type==="ClassDirective"){let key=`${type==="BindDirective"?"Attribute":type}${parsed.name}`;if(seen.has(key))attribute_duplicate(parsed);if(parsed.name!=="this")seen.add(key)}into.push(parsed),state.allowWhitespace()}}function createAttribute(state,name,start,end,value){return state.loc?{type:"Attribute",start,end,name:name.name,name_loc:name.loc,value}:{type:"Attribute",start,end,name:name.name,value}}function rejectQuote(state){if(isQuote(state.source.charCodeAt(state.index)))expected_token(state.index,"=")}function readStaticAttribute(state){let start=state.index,name=readName(state,!0);if(!name.name)return null;let value=!0;if(state.eat("=")){state.allowWhitespace();let{source}=state,at=state.index,quoted=isQuote(source.charCodeAt(at)),end=-1;if(quoted){let close=source.indexOf(source[at],at+1);if(close!==-1)end=close+1}if(end===-1){end=at;while(end<source.length&&source.charCodeAt(end)!==GT&&!isWhitespace(source.charCodeAt(end)))end++;if(end===at)expected_attribute_value(at)}state.index=end;let quotes=quoted?1:0,raw=source.slice(at+quotes,end-quotes);value=[text(end-raw.length-quotes,end-quotes,raw,decodeCharacterReferences(raw,!0,state.entityNames))]}return rejectQuote(state),createAttribute(state,name,start,state.index,value)}function readJsComment(state){let start=state.index,block=state.match("/*");if(!block&&!state.match("//"))return!1;state.index+=2;let value=state.readUntil(block?"*/":`
2
+ `);if(block)state.eat("*/");let comment={type:block?"Block":"Line",start,end:state.index,value},loc=state.sourceLocation(start,state.index);if(loc)comment.loc=loc;if(state.comments)state.root.comments.push(comment);return!0}function readAttribute(state){while(readJsComment(state))state.allowWhitespace();let start=state.index;if(state.eat("{"))return readBraceAttribute(state,start);let name=readName(state,!0);if(!name.name)return null;let end=state.index;state.allowWhitespace();let value=!0;if(state.eat("=")){if(state.allowWhitespace(),state.match("/>"))value=[text(state.index,state.index+1,"/")],state.index++;else value=readAttributeValue2(state);end=state.index}else rejectQuote(state);let colon=name.name.indexOf(":"),type=colon>0?DIRECTIVES.get(name.name.slice(0,colon)):void 0;return type?directive(state,type,name,colon,start,end,value):createAttribute(state,name,start,end,value)}function readBraceAttribute(state,start){if(state.allowWhitespace(),state.eat("@attach")){state.requireWhitespace();let expression=readExpression(state);return state.eatClosingBrace(),{type:"AttachTag",start,end:state.index,expression}}if(state.eat("...")){let expression=readExpression(state);return state.eatClosingBrace(),{type:"SpreadAttribute",start,end:state.index,expression}}let id=state.readIdentifierName();if(id.name==="")attribute_empty_shorthand(start);state.eatClosingBrace();let value={type:"ExpressionTag",start:id.start,end:id.end,expression:id};return createAttribute(state,id,start,state.index,value)}function firstChunk(value){if(value===!0)return;return Array.isArray(value)?value[0]:value}function directive(state,type,tag,colon,start,end,value){let[name,...modifiers]=tag.name.slice(colon+1).split("|");if(name==="")directive_missing_name({start,end:start+colon+1},tag.name);let node={start,end,type,name};if(state.loc)node.name_loc=tag.loc;if(type==="StyleDirective")return node.modifiers=modifiers,node.value=value,node;let first=firstChunk(value);if(first&&(Array.isArray(value)&&value.length>1||first.type==="Text"))directive_invalid_value(first.start);if(node.expression=first?.expression??null,node.modifiers=modifiers,type==="TransitionDirective"){let direction=tag.name.slice(0,colon);node.intro=direction!=="out",node.outro=direction!=="in"}if((type==="BindDirective"||type==="ClassDirective")&&!node.expression)node.expression={start:start+colon+1,end,type:"Identifier",name};return node}function readAttributeValue2(state){let quote=state.source.charCodeAt(state.index),quoted=isQuote(quote);if(quoted){if(state.index++,state.source.charCodeAt(state.index)===quote)return state.index++,[text(state.index-1,state.index-1,"")]}let value;try{value=readSequence(state,quoted?(source,i)=>source.charCodeAt(i)===quote:endsUnquotedValue,"in attribute value",quoted?quote:void 0)}catch(error){let jsErrorAt=error instanceof ParseError2&&error.code==="js_parse_error"?error.position?.[0]:void 0;if(jsErrorAt!==void 0&&state.source.startsWith("/>",jsErrorAt-1))state.index=jsErrorAt,expected_token(jsErrorAt,quoted?String.fromCharCode(quote):"}");throw error}if(quoted)state.index++;else if(value.length===0)expected_attribute_value(state.index);return quoted||value.length>1||value[0].type==="Text"?value:value[0]}function readSequence(state,ends,location,quote){let{source}=state,chunks=[],textStart=state.index,flushText=(end)=>{if(end<=textStart)return;let raw=source.slice(textStart,end);chunks.push(text(textStart,end,raw,decodeCharacterReferences(raw,!0,state.entityNames)))};while(state.index<source.length){let at=state.index;if(ends(source,at))return flushText(at),chunks;if(source.charCodeAt(at)!==BRACE){if(state.index++,quote!==void 0)while(state.index<source.length&&source.charCodeAt(state.index)!==BRACE&&source.charCodeAt(state.index)!==quote)state.index++;continue}state.index++;let marker=source.charCodeAt(state.index);if(marker===35||marker===64){state.index++;let nameStart=state.index;while(state.index<source.length&&source.charCodeAt(state.index)>=97&&source.charCodeAt(state.index)<=122)state.index++;let name=source.slice(nameStart,state.index);(marker===35?block_invalid_placement:tag_invalid_placement)(at,name,location)}flushText(at),state.allowWhitespace();let expression=readExpression(state);state.eatClosingBrace(),chunks.push({type:"ExpressionTag",start:at,end:state.index,expression}),textStart=state.index}unexpected_eof(source.length)}var NAMESPACES=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),PROP_READERS=new Map([["type",(prop,value)=>{if(value!=="String"&&value!=="Number"&&value!=="Boolean"&&value!=="Array"&&value!=="Object")return!1;return prop.type=value,!0}],["reflect",(prop,value)=>{if(typeof value!=="boolean")return!1;return prop.reflect=value,!0}],["attribute",(prop,value)=>{if(typeof value!=="string")return!1;return prop.attribute=value,!0}]]),NAME_CHAR="[a-z0-9_.\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}-]",REGEX_CUSTOM_ELEMENT_NAME2=new RegExp(`^[a-z]${NAME_CHAR}*-${NAME_CHAR}*$`,"u"),RESERVED_NAMES=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),flag=(key)=>(options,attribute)=>{let value=staticValue(attribute);if(typeof value!=="boolean")svelte_options_invalid_attribute_value(attribute,"true or false");options[key]=value},READERS=new Map([["runes",flag("runes")],["immutable",flag("immutable")],["preserveWhitespace",flag("preserveWhitespace")],["accessors",flag("accessors")],["namespace",(options,attribute)=>{let namespace=NAMESPACES.get(staticValue(attribute));if(!namespace)svelte_options_invalid_attribute_value(attribute,'"html", "mathml" or "svg"');options.namespace=namespace}],["css",(options,attribute)=>{if(staticValue(attribute)!=="injected")svelte_options_invalid_attribute_value(attribute,'"injected"');options.css="injected"}],["tag",(_,attribute)=>svelte_options_deprecated_tag(attribute)],["customElement",(options,attribute)=>{let customElement=readCustomElement(attribute);if(customElement)options.customElement=customElement}]]);function readOptions(node){let attributes=[],options={start:node.start,end:node.end,attributes};for(let attribute of node.attributes){if(attribute.type!=="Attribute")svelte_options_invalid_attribute(attribute);attributes.push(attribute);let read=READERS.get(attribute.name);if(!read)svelte_options_unknown_attribute(attribute,attribute.name);read(options,attribute)}return options}function staticValue({value}){if(value===!0)return!0;let chunks=Array.isArray(value)?value:[value];if(chunks.length===0)return!0;if(chunks.length>1)return null;let[chunk]=chunks;if(chunk.type==="Text")return chunk.data;return chunk.expression.type==="Literal"?chunk.expression.value:null}function checkName(node,name){if(typeof name!=="string")svelte_options_invalid_tagname(node);if(!name)return;if(!REGEX_CUSTOM_ELEMENT_NAME2.test(name))svelte_options_invalid_tagname(node);if(RESERVED_NAMES.has(name))svelte_options_reserved_tagname(node)}function isNamedProperty(property){return property.type==="Property"&&!property.computed&&property.key.type==="Identifier"}function propertiesOf(object,fail){let properties=new Map;for(let property of object.properties){if(!isNamedProperty(property))fail();if(!properties.has(property.key.name))properties.set(property.key.name,property.value)}return properties}function readCustomElement(attribute){let fail=()=>svelte_options_invalid_customelement(attribute);if(attribute.value===!0)fail();let chunk=Array.isArray(attribute.value)?attribute.value[0]:attribute.value;if(chunk.type==="Text"){let tag=staticValue(attribute);return checkName(attribute,tag),{tag}}let{expression}=chunk;if(expression.type!=="ObjectExpression"){if(expression.type==="Literal"&&expression.value===null)return;fail()}let properties=propertiesOf(expression,fail),customElement={},tagValue=properties.get("tag");if(tagValue){let tag=tagValue.type==="Literal"?tagValue.value:void 0;checkName(null,tag),customElement.tag=tag}let props=properties.get("props");if(props){let failProps=()=>svelte_options_invalid_customelement_props(attribute);if(props.type!=="ObjectExpression")failProps();customElement.props={};for(let property of props.properties){if(!isNamedProperty(property)||property.value.type!=="ObjectExpression")failProps();let prop={};customElement.props[property.key.name]=prop;for(let field of property.value.properties){if(!isNamedProperty(field)||field.value.type!=="Literal")failProps();if(!PROP_READERS.get(field.key.name)?.(prop,field.value.value))failProps()}}}let shadow=properties.get("shadow");if(shadow)if(shadow.type==="ObjectExpression")customElement.shadow=shadow;else if(shadow.type==="Literal"&&(shadow.value==="open"||shadow.value==="none"))customElement.shadow=shadow.value;else svelte_options_invalid_customelement_shadow(attribute);let extend=properties.get("extend");if(extend)customElement.extend=extend;return customElement}var DEFAULT_BRACKETS={"{":"}","(":")","[":"]"};function matchBracket(source,start,brackets=DEFAULT_BRACKETS){let close=Object.values(brackets),stack=[],i=start;while(i<source.length){let char=source[i++];if(char==="'"||char==='"'||char==="`")i=matchQuote(source,i,char);else if(Object.hasOwn(brackets,char))stack.push(char);else if(close.includes(char)){let expected=brackets[stack.pop()??""];if(char!==expected)expected_token(i-1,expected);if(stack.length===0)return i}}unexpected_eof(source.length)}function matchQuote(source,start,quote){let i=start;while(i<source.length){let char=source[i++];if(char===quote)return i;if(char==="\\")i++;else if(quote==="`"&&char==="$"&&source[i]==="{")i=matchBracket(source,i)}unterminated_string_constant(start)}var REGEX_OPTIONAL_PARAM_COLON=/\?\s*:/g;function readPattern(state){let start=state.index,id=state.readIdentifierName();if(id.name!=="")return{...id,typeAnnotation:readTypeAnnotation(state)};let char=state.source[state.index];if(char!=="{"&&char!=="[")expected_pattern(state.index);state.index=matchBracket(state.source,start);let pattern=parsePatternAt(state,state.source.slice(0,state.index),start)??assignedPattern(state,start);assertType(pattern,"ObjectPattern","ArrayPattern");let typeAnnotation=readTypeAnnotation(state);if(pattern.typeAnnotation=typeAnnotation,typeAnnotation)pattern.end=typeAnnotation.end;return pattern}function assignedPattern(state,start){let{node}=parseExpressionAt(state,`${state.source.slice(0,state.index)} = 1`,start);return assertType(node,"AssignmentExpression"),node.left}function readTypeAnnotation(state){let start=state.index;if(state.allowWhitespace(),!state.eat(":")){state.index=start;return}let insert="_ as ",a=state.index-insert.length,synthetic=state.source.slice(0,a)+insert+state.source.slice(state.index).replace(REGEX_OPTIONAL_PARAM_COLON,":"),expression=parseExpressionAt(state,synthetic,a).node;if(expression.type==="AssignmentExpression"){let b=expression.right.start;while(synthetic[b]!=="=")b-=1;expression=parseExpressionAt(state,synthetic.slice(0,b),a).node}if(expression.type==="SequenceExpression")expression=expression.expressions[0];return assertType(expression,"TSAsExpression"),state.index=expression.end,{type:"TSTypeAnnotation",start,end:state.index,typeAnnotation:expression.typeAnnotation}}var CLOSING_WORDS={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},fragment=()=>({type:"Fragment",nodes:[]});function openBlock(state,start){if(state.eat("if")){state.requireWhitespace();let test=readExpression(state);state.eatClosingBrace();let consequent=fragment();state.open({type:"IfBlock",elseif:!1,start,end:-1,test,consequent,alternate:null},consequent)}else if(state.eat("each"))openEach(state,start);else if(state.eat("await")){state.requireWhitespace();let expression=readExpression(state);state.allowWhitespace();let block={type:"AwaitBlock",start,end:-1,expression,value:null,error:null,pending:null,then:null,catch:null},body=fragment();if(state.eat("then"))block.value=readAwaitBinding(state),block.then=body;else if(state.eat("catch"))block.error=readAwaitBinding(state),block.catch=body;else block.pending=body;state.eat("}",!0),state.open(block,body)}else if(state.eat("key")){state.requireWhitespace();let expression=readExpression(state);state.eatClosingBrace();let body=fragment();state.open({type:"KeyBlock",start,end:-1,expression,fragment:body},body)}else if(state.eat("snippet"))openSnippet(state,start);else expected_block_type(state.index)}function readAwaitBinding(state){if(state.matchRegex(REGEX_WHITESPACE_THEN_CLOSING_BRACE))return state.allowWhitespace(),null;state.requireWhitespace();let pattern=readPattern(state);return state.allowWhitespace(),pattern}function stripTrailingAssertion(root){let found={assertion:null},end=root.end,unwrap=(node)=>{if(node.type==="TSAsExpression"&&node.end===root.end)return found.assertion=node,end=node.expression.end,node.expression;return mapChildren(node,unwrap),node},expression=root;if(root.type==="TSAsExpression")found.assertion=root,expression=root.expression,end=expression.end;else mapChildren(root,unwrap);return expression.end=end,{expression,assertion:found.assertion}}function openEach(state,start){state.requireWhitespace();let source=state.source,expression;while(!expression)try{expression=readExpression(state)}catch(error){let end=((error instanceof ParseError2?error.position:void 0)?.[0]??start)-2;while(end>start&&state.source.slice(end,end+2)!=="as")end-=1;if(end<=start)throw state.source=source,error;state.source=source.slice(0,end)}if(state.source=source,state.allowWhitespace(),!state.match("as")){if(expression.type==="SequenceExpression")expression=expression.expressions[0];let stripped=stripTrailingAssertion(expression);if(expression=stripped.expression,stripped.assertion){let rewind=stripped.assertion.typeAnnotation.start-2;while(state.source.slice(rewind,rewind+2)!=="as")rewind-=1;state.index=rewind}}let context=null,index,key;if(state.eat("as"))state.requireWhitespace(),context=readPattern(state);else state.index=expression.end;if(state.allowWhitespace(),state.eat(",")){if(state.allowWhitespace(),index=state.readIdentifierName().name,!index)expected_identifier(state.index);state.allowWhitespace()}if(state.eat("("))state.allowWhitespace(),key=readExpression(state),state.allowWhitespace(),state.eat(")",!0),state.allowWhitespace();state.eat("}",!0);let body=fragment();state.open({type:"EachBlock",start,end:-1,expression,body,context,index,key},body)}function openSnippet(state,start){state.requireWhitespace();let id=state.readIdentifierName();if(id.name==="")expected_identifier(state.index);state.allowWhitespace();let paramsStart=state.index,typeParams;if(state.isTypeScript&&state.match("<")){let end=matchBracket(state.source,paramsStart,{"<":">"});typeParams=state.source.slice(paramsStart+1,end-1),state.index=end}state.allowWhitespace(),state.eat("(",!0);let parentheses=1;while(state.index<state.source.length&&(!state.match(")")||parentheses!==1)){if(state.match("("))parentheses++;if(state.match(")"))parentheses--;state.index+=1}state.eat(")",!0);let{node}=parseExpressionAt(state,`${state.source.slice(0,state.index)} => {}`,paramsStart,!0);state.eatClosingBrace();let body=fragment();state.open({type:"SnippetBlock",start,end:-1,expression:id,typeParams,parameters:node.type==="ArrowFunctionExpression"?node.params:void 0,body},body)}function nextBlockClause(state,tagStart){let start=state.index-1,block=state.current();if(block.type==="IfBlock"){if(!state.eat("else"))expected_token(start,"{:else} or {:else if}");if(state.eat("if"))block_invalid_elseif(start);if(state.allowWhitespace(),block.alternate=fragment(),state.setFragment(block.alternate),state.eat("if")){state.requireWhitespace();let test=readExpression(state);state.eatClosingBrace();let consequent=fragment();state.open({start:tagStart,end:-1,type:"IfBlock",elseif:!0,test,consequent,alternate:null},consequent)}else state.eatClosingBrace()}else if(block.type==="EachBlock"){if(!state.eat("else"))expected_token(start,"{:else}");state.eatClosingBrace(),block.fallback=fragment(),state.setFragment(block.fallback)}else if(block.type==="AwaitBlock"){let clause;if(state.eat("then"))clause="then";else if(state.eat("catch"))clause="catch";else expected_token(start,"{:then ...} or {:catch ...}");if(block[clause])block_duplicate_clause(start,`{:${clause}}`);if(!state.eat("}")){state.requireWhitespace();let pattern=readPattern(state);if(clause==="then")block.value=pattern;else block.error=pattern;state.eatClosingBrace()}let body=fragment();block[clause]=body,state.setFragment(body)}else block_invalid_continuation_placement(start)}function closeBlock(state){let block=state.current(),word=CLOSING_WORDS[block.type];if(!word)block_unexpected_close(state.index-1);state.eat(word,!0),state.eatClosingBrace();while(block.type==="IfBlock"&&block.elseif)block.end=state.index,state.close(),block=state.current();block.end=state.index,state.close()}function isCall(expression){return expression.type==="CallExpression"||expression.type==="ChainExpression"&&expression.expression.type==="CallExpression"}function readSpecialTag(state,start){if(state.eat("html")){state.requireWhitespace();let expression=readExpression(state);state.eatClosingBrace(),state.append({type:"HtmlTag",start,end:state.index,expression})}else if(state.eat("debug")){let identifiers=[];if(!state.read(REGEX_WHITESPACE_THEN_CLOSING_BRACE)){let expression=readExpression(state),nodes=expression.type==="SequenceExpression"?expression.expressions:[expression];for(let node of nodes){if(node.type!=="Identifier")debug_tag_invalid_arguments(node.start);identifiers.push(node)}state.eatClosingBrace()}state.append({type:"DebugTag",start,end:state.index,identifiers})}else if(state.eat("const")){state.requireWhitespace();let id=readPattern(state);state.allowWhitespace(),state.eat("=",!0),state.allowWhitespace();let expressionStart=state.index,init=readExpression(state),declaratorEnd=state.index;if(init.type==="SequenceExpression"&&!state.source.slice(expressionStart,init.start).includes("("))const_tag_invalid_expression(init);state.eatClosingBrace();let declarator={type:"VariableDeclarator",id,init,start:id.start,end:declaratorEnd};state.append({type:"ConstTag",start,end:state.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[declarator],start:start+2,end:state.index-1}})}else if(state.eat("render")){state.requireWhitespace();let expression=readExpression(state);if(!isCall(expression))render_tag_invalid_expression(expression);state.eatClosingBrace(),state.append({type:"RenderTag",start,end:state.index,expression})}else expected_tag(state.index)}var REGEX_UNSUPPORTED_DECLARATION=/(?:var|interface|enum)\b/y,REGEX_MAYBE_DECLARATION=/(?:let|const|type)\b/y;function readTag(state){let start=state.index;if(state.index+=1,state.allowWhitespace(),state.eat("#"))openBlock(state,start);else if(state.eat(":"))nextBlockClause(state,start);else if(state.eat("@"))readSpecialTag(state,start);else if(state.match("/")&&!state.match("/*")&&!state.match("//"))state.index+=1,closeBlock(state);else if(!readDeclarationTag(state,start)){let expression=readExpression(state);state.eatClosingBrace(),state.append({type:"ExpressionTag",start,end:state.index,expression})}}function readDeclarationTag(state,tagStart){let start=state.index,unsupported=state.matchRegex(REGEX_UNSUPPORTED_DECLARATION);if(unsupported)declaration_tag_invalid_type({start,end:start+unsupported.length});if(!state.matchRegex(REGEX_MAYBE_DECLARATION))return!1;let commentsBefore=state.root.comments.length,statement=parseStatementAt(state,state.source,start);if(statement.type==="ExpressionStatement")return state.root.comments.length=commentsBefore,!1;if(statement.type!=="VariableDeclaration"||statement.kind!=="let"&&statement.kind!=="const")declaration_tag_invalid_type(statement);return state.index=statement.end,state.eatClosingBrace(),state.append({type:"DeclarationTag",start:tagStart,end:state.index,declaration:statement}),!0}function readText(state){let{source,index:start}=state;if(state.nextAngle<start)state.nextAngle=find(source,"<",start);if(state.nextBrace<start)state.nextBrace=find(source,"{",start);let end=Math.min(state.nextAngle,state.nextBrace);state.index=end;let raw=source.slice(start,end);state.append({type:"Text",start,end,raw,data:decodeCharacterReferences(raw,!1,state.entityNames)})}function find(source,char,from){let index=source.indexOf(char,from);return index===-1?source.length:index}function parseComponent(source,options,support){let state=componentState(source,options,support);while(state.index<state.source.length)readNode(state);return finishComponent(state)}function componentState(source,options,support){let template=withoutByteOrderMark(source);return setSource(template),new TemplateParserState(template.trimEnd(),template.length,support,options)}function finishComponent(state){if(state.stack.length>1){let current=state.current();if(current.end=current.start+1,current.type==="RegularElement")element_unclosed(current,current.name);block_unclosed(current)}let{nodes:rootNodes}=state.root.fragment,optionsIndex=rootNodes.findIndex((node)=>node.type==="SvelteOptions"),raw=rootNodes[optionsIndex];if(raw?.type==="SvelteOptions"){rootNodes.splice(optionsIndex,1),state.root.options=readOptions(raw);let{nodes}=raw.fragment;if(nodes.length>0)svelte_meta_invalid_content({start:nodes[0].start,end:nodes[nodes.length-1].end},raw.name)}return state.root}function readNode(state){if(state.match("<"))readElement(state);else if(state.match("{"))readTag(state);else readText(state)}
3
+ export{readElement,parseComponent,componentState,finishComponent,readNode};
@@ -0,0 +1,3 @@
1
+ import{isDigit,isWhitespace}from"./shared-5tpb3h6x.js";var STATEMENT_START=0,OPERATOR=1,BLOCK_OPENER=2,VALUE=3,PAREN=0,HEAD_PAREN=1,BLOCK=2,OBJECT=3,TEMPLATE=4,HEAD=4,IMPORT=5,EXPORT=6,KEYWORDS={await:OPERATOR,case:OPERATOR,default:OPERATOR,delete:OPERATOR,extends:OPERATOR,in:OPERATOR,instanceof:OPERATOR,new:OPERATOR,of:OPERATOR,return:OPERATOR,throw:OPERATOR,typeof:OPERATOR,void:OPERATOR,yield:OPERATOR,do:BLOCK_OPENER,else:BLOCK_OPENER,finally:BLOCK_OPENER,try:BLOCK_OPENER,for:HEAD,if:HEAD,while:HEAD,with:HEAD,import:IMPORT,export:EXPORT},LONGEST_KEYWORD=10,KEYWORDS_BY_KEY=Array(keywordKey(128,0)).fill(null);for(let entry of Object.entries(KEYWORDS)){let key=keywordKey(entry[0].charCodeAt(0),entry[0].length),entries=KEYWORDS_BY_KEY[key]??[];entries.push(entry),KEYWORDS_BY_KEY[key]=entries}function keywordKey(first,length){return first*(LONGEST_KEYWORD+1)+length}function wordKind(source,start,end){let first=source.charCodeAt(start);if(first>=128||end-start>LONGEST_KEYWORD)return VALUE;let key=keywordKey(first,end-start),entries=KEYWORDS_BY_KEY[key];if(entries===null)return VALUE;for(let i=0;i<entries.length;i++)if(source.startsWith(entries[i][0],start))return entries[i][1];return VALUE}var ASCII_WORD=new Uint8Array(128);for(let range of["az","AZ","09","__","$$","\\\\"])for(let code=range.charCodeAt(0);code<=range.charCodeAt(1);code++)ASCII_WORD[code]=1;function isWordCode(code){return code>=128?!isWhitespace(code):ASCII_WORD[code]===1}function scan(source,localExports,parseAt){tokenize(source,lastStatementKeyword(source,localExports),localExports,parseAt,void 0)}function scanLiterals(source,literal){tokenize(source,source.length-1,!1,void 0,literal)}function tokenize(source,last,localExports,parseAt,literal){let stack=[],pos=source.startsWith("#!")?lineEnd(source,2):0,prev=STATEMENT_START,afterDot=!1,head=!1,decorators=-1,statementEnd=()=>{if(prev=STATEMENT_START,stack.length===0)decorators=-1};while(pos<=last){let code=source.charCodeAt(pos);if(code===32||code===10||isWhitespace(code)){pos++;continue}if(code===47){let end=commentEnd(source,pos);if(end!==-1){pos=end;continue}}let wasAfterDot=afterDot,wasHead=head;if(afterDot=!1,head=!1,isWordCode(code)||code===35){let start=pos;pos=wordEnd(source,pos+1);let kind=wasAfterDot?VALUE:wordKind(source,start,pos);if(parseAt!==void 0&&stack.length===0&&(kind===EXPORT?localExports||isReexport(source,pos):kind===IMPORT&&isImportDeclaration(source,pos)))pos=Math.max(pos,parseAt(decorators!==-1&&kind===EXPORT?decorators:start,start)),statementEnd();else if(kind===EXPORT)prev=BLOCK_OPENER;else if(kind===HEAD)head=!0,prev=VALUE;else prev=kind===OPERATOR||kind===BLOCK_OPENER?kind:VALUE;continue}switch(pos++,code){case 34:case 39:{let start=pos-1;pos=stringEnd(source,pos,code),literal?.(start,pos,!1),prev=VALUE;break}case 96:{let start=pos;pos=templateEnd(source,pos,stack),literal?.(start,quasiEnd(source,pos),!0),prev=source.charCodeAt(pos-1)===123?OPERATOR:VALUE;break}case 47:{let end=prev===VALUE?-1:regexEnd(source,pos);if(end===-1)prev=OPERATOR;else pos=wordCodesEnd(source,end),prev=VALUE;break}case 40:stack.push(wasHead?HEAD_PAREN:PAREN),prev=OPERATOR;break;case 41:prev=stack.pop()===HEAD_PAREN?BLOCK_OPENER:VALUE;break;case 123:stack.push(prev===OPERATOR?OBJECT:BLOCK),prev=STATEMENT_START;break;case 125:{let open=stack.pop();if(open===TEMPLATE){let start=pos;pos=templateEnd(source,pos,stack),literal?.(start,quasiEnd(source,pos),!0),prev=source.charCodeAt(pos-1)===123?OPERATOR:VALUE}else if(open===OBJECT)prev=VALUE;else statementEnd();break}case 59:statementEnd();break;case 93:prev=VALUE;break;case 46:if(isDigit(source.charCodeAt(pos)))pos=wordCodesEnd(source,pos),prev=VALUE;else if(source.startsWith("..",pos))pos+=2,prev=OPERATOR;else afterDot=!0,prev=OPERATOR;break;case 63:if(source.charCodeAt(pos)===46&&!isDigit(source.charCodeAt(pos+1)))pos++,afterDot=!0;prev=OPERATOR;break;case 33:prev=prev===VALUE&&!isWhitespace(source.charCodeAt(pos-2))?VALUE:OPERATOR;break;case 43:case 45:if(source.charCodeAt(pos)===code&&prev===VALUE)pos++;else prev=OPERATOR;break;case 61:if(prev=source.charCodeAt(pos)===62?BLOCK_OPENER:OPERATOR,prev===BLOCK_OPENER)pos++;break;case 64:if(stack.length===0&&decorators===-1)decorators=pos-1;prev=OPERATOR;break;default:prev=OPERATOR}}}function closingBracket(source,from,word){let length=source.length,stack=[],pos=from,prev=OPERATOR,afterDot=!1;while(pos<length){let code=source.charCodeAt(pos);if(code===32||code===10||isWhitespace(code)){pos++;continue}if(code===47){let end=commentEnd(source,pos);if(end!==-1){pos=end;continue}}let wasAfterDot=afterDot;if(afterDot=!1,isWordCode(code)||code===35){let start=pos;if(pos=wordEnd(source,pos+1),!wasAfterDot&&word?.(start,pos))return-1;let kind=wasAfterDot?VALUE:wordKind(source,start,pos);prev=kind===OPERATOR||kind===BLOCK_OPENER||kind===HEAD?OPERATOR:VALUE;continue}switch(pos++,code){case 34:case 39:pos=stringEnd(source,pos,code),prev=VALUE;break;case 96:pos=templateEnd(source,pos,stack),prev=source.charCodeAt(pos-1)===123?OPERATOR:VALUE;break;case 47:{let end=prev===VALUE?-1:regexEnd(source,pos);if(end===-1)prev=OPERATOR;else pos=wordCodesEnd(source,end),prev=VALUE;break}case 40:stack.push(PAREN),prev=OPERATOR;break;case 41:if(stack.length===0)return pos-1;stack.pop(),prev=VALUE;break;case 123:stack.push(prev===OPERATOR?OBJECT:BLOCK),prev=STATEMENT_START;break;case 125:{if(stack.length===0)return pos-1;let open=stack.pop();if(open===TEMPLATE)pos=templateEnd(source,pos,stack),prev=source.charCodeAt(pos-1)===123?OPERATOR:VALUE;else prev=open===OBJECT?VALUE:STATEMENT_START;break}case 93:prev=VALUE;break;case 46:if(isDigit(source.charCodeAt(pos)))pos=wordCodesEnd(source,pos),prev=VALUE;else if(source.startsWith("..",pos))pos+=2,prev=OPERATOR;else afterDot=!0,prev=OPERATOR;break;case 63:if(source.charCodeAt(pos)===46&&!isDigit(source.charCodeAt(pos+1)))pos++,afterDot=!0;prev=OPERATOR;break;case 33:prev=prev===VALUE&&!isWhitespace(source.charCodeAt(pos-2))?VALUE:OPERATOR;break;case 43:case 45:if(source.charCodeAt(pos)===code&&prev===VALUE)pos++;else prev=OPERATOR;break;case 61:if(source.charCodeAt(pos)===62)pos++;prev=OPERATOR;break;default:prev=OPERATOR}}return length}function isLineBreak(code){return code===10||code===13||code===8232||code===8233}function lineEnd(source,pos){for(let i=pos;i<source.length;i++)if(isLineBreak(source.charCodeAt(i)))return i;return source.length}function commentEnd(source,slash){let next=source.charCodeAt(slash+1);if(next===47)return lineEnd(source,slash+2);if(next!==42)return-1;let end=source.indexOf("*/",slash+2);return end===-1?source.length:end+2}function wordEnd(source,pos){let i=pos;while(i<source.length){let code=source.charCodeAt(i);if(code===92)i+=2;else if(isWordCode(code))i++;else break}return i}function wordCodesEnd(source,pos){let i=pos;while(i<source.length&&isWordCode(source.charCodeAt(i)))i++;return i}function stringEnd(source,pos,quote){for(let i=pos;i<source.length;i++){let code=source.charCodeAt(i);if(code===quote)return i+1;if(code===92)i+=source.startsWith(`\r
2
+ `,i+1)?2:1;else if(code===10||code===13)return i}return source.length}function templateEnd(source,pos,stack){for(let i=pos;i<source.length;i++){let code=source.charCodeAt(i);if(code===96)return i+1;if(code===92)i++;else if(code===36&&source.charCodeAt(i+1)===123)return stack.push(TEMPLATE),i+2}return source.length}function quasiEnd(source,pos){let code=source.charCodeAt(pos-1);if(code===96)return pos-1;if(code===123&&source.charCodeAt(pos-2)===36)return pos-2;return pos}function regexEnd(source,pos){let inClass=!1;for(let i=pos;i<source.length;i++){let code=source.charCodeAt(i);if(isLineBreak(code))return-1;if(code===92)i++;else if(code===91)inClass=!0;else if(code===93)inClass=!1;else if(code===47&&!inClass)return i+1}return-1}function skipTrivia(source,pos){let i=pos;while(i<source.length){let code=source.charCodeAt(i);if(isWhitespace(code)){i++;continue}let end=code===47?commentEnd(source,i):-1;if(end===-1)return i;i=end}return source.length}function isWordAt(source,pos,word){return source.charCodeAt(pos)===word.charCodeAt(0)&&source.startsWith(word,pos)&&!isWordCode(source.charCodeAt(pos+word.length))}function isImportDeclaration(source,pos){let code=source.charCodeAt(skipTrivia(source,pos));return code!==40&&code!==46}function isReexport(source,pos){let i=skipTrivia(source,pos);if(isWordAt(source,i,"import"))return!0;if(isWordAt(source,i,"type"))i=skipTrivia(source,i+4);let code=source.charCodeAt(i);if(code===42)return!0;if(code!==123)return!1;for(i++;i<source.length;i++){let inner=source.charCodeAt(i);if(inner===125)break;if(inner===34||inner===39)i=stringEnd(source,i+1,inner)-1;else if(inner===47)i=Math.max(i,skipTrivia(source,i)-1)}return isWordAt(source,skipTrivia(source,i+1),"from")}var STATEMENT_KEYWORD=/import|export/g;function lastStatementKeyword(source,localExports){let last=-1;STATEMENT_KEYWORD.lastIndex=0;for(let match=STATEMENT_KEYWORD.exec(source);match!==null;match=STATEMENT_KEYWORD.exec(source)){let start=match.index,end=start+6;if(!isWordCode(source.charCodeAt(start-1))&&!isWordCode(source.charCodeAt(end))&&(source.charCodeAt(start)===105?isImportDeclaration(source,end):localExports||isReexport(source,end)))last=start}return last}
3
+ export{isWordCode,scan,scanLiterals,closingBracket,lineEnd,wordCodesEnd,skipTrivia,isWordAt};
@@ -0,0 +1,2 @@
1
+ import{decodeCharacterReferences}from"./shared-bzqbnvee.js";import{readElement,componentState,finishComponent,readNode}from"./shared-xwzsb4m8.js";import{topLevelTags}from"./shared-rce4ty8a.js";import{htmlEntityNames}from"./shared-drb44hb9.js";import{TypeScriptParser}from"./shared-ke0fgd3r.js";function parseComponentSections(source,options,support){let state=componentState(source,options,support);return readTopLevelTags(state),finishComponent(state)}function readTopLevelTags(state){let{source}=state,{tags,comments}=topLevelTags(source),nodes=state.root.fragment.nodes,appendText=(start,end)=>{if(end<=start)return;let raw=source.slice(start,end),data=raw.includes("<")||raw.includes("{")?raw:decodeCharacterReferences(raw,!1,state.entityNames);nodes.push({type:"Text",start,end,raw,data})},index=0,comment=0;for(let start of tags){for(;comment<comments.length&&comments[comment]<start;comment+=2){let commentStart=comments[comment];if(commentStart<index)continue;let end=comments[comment+1];appendText(index,commentStart),nodes.push({type:"Comment",start:commentStart,end,data:source.slice(commentStart+4,end-3)}),index=end}if(start<index)continue;appendText(index,start),state.index=start,readElement(state);while(state.stack.length>1&&state.index<source.length)readNode(state);index=state.index}let options=nodes.filter((node)=>node.type==="SvelteOptions");nodes.length=0,nodes.push(...options)}var support={typescript:TypeScriptParser,entityNames:htmlEntityNames};function parseSections2(source,options){return parseComponentSections(source,options,support)}
2
+ export{parseSections2};
@@ -0,0 +1,2 @@
1
+ import{setSource}from"./shared-m0dcdh24.js";import{parseProgram}from"./shared-nan648gn.js";function parseModuleWith(source,options,typescript){return setSource(source),parseProgram({isTypeScript:options.typescript??!1,typescript,loc:options.loc??!1,comments:options.comments??!0,root:{comments:[]}},source)}
2
+ export{parseModuleWith};
package/typescript.js CHANGED
@@ -1 +1 @@
1
- import"./shared-xyqvjc3m.js";import"./shared-4wqe6a27.js";import"./shared-jxkrk6hx.js";import"./shared-c9gzmr05.js";import{c}from"./shared-vjpq32kx.js";import{vt}from"./shared-h6c4cer7.js";var t=vt(c);export{t as typescript};
1
+ import"./shared-2pngd0mg.js";import"./shared-m0dcdh24.js";import"./shared-nan648gn.js";import"./shared-cs1ezg1f.js";import{TypeScriptParser}from"./shared-ke0fgd3r.js";import{typeScriptSupport}from"./shared-h6z1kjbb.js";var typescript=typeScriptSupport(TypeScriptParser);export{typescript};
package/walk.js CHANGED
@@ -1 +1 @@
1
- import{p,I,Nt,Ct,x,Pt,g,j,y,L,_t,It}from"./shared-4zk9ntab.js";import{Lt}from"./shared-4wqe6a27.js";export{y as SKIP,j as STOP,It as children,Lt as createLocator,p as extractIdentifiers,_t as forEachChild,I as isReference,Nt as locate,Pt as markupVisitorKeys,Ct as skipTypeWrappers,g as valueVisitorKeys,x as visitorKeys,L as walk};
1
+ import{extractIdentifiers2,isReference2,locate2,skipTypeWrappers2,visitorKeys2,markupVisitorKeys2,valueVisitorKeys2,STOP2,SKIP2,walk2,forEachChild2,children2}from"./shared-jpvd0875.js";import{createLocator2}from"./shared-m0dcdh24.js";export{SKIP2 as SKIP,STOP2 as STOP,children2 as children,createLocator2 as createLocator,extractIdentifiers2 as extractIdentifiers,forEachChild2 as forEachChild,isReference2 as isReference,locate2 as locate,markupVisitorKeys2 as markupVisitorKeys,skipTypeWrappers2 as skipTypeWrappers,valueVisitorKeys2 as valueVisitorKeys,visitorKeys2 as visitorKeys,walk2 as walk};
@@ -1,3 +0,0 @@
1
- import{s,i}from"./shared-nbaaegmc.js";var x=0,d=1,C=2,h=3,M=0,P=1,N=2,y=3,_=4,w=4,Y=5,T=6,ee={await:d,case:d,default:d,delete:d,extends:d,in:d,instanceof:d,new:d,of:d,return:d,throw:d,typeof:d,void:d,yield:d,do:C,else:C,finally:C,try:C,for:w,if:w,while:w,with:w,import:Y,export:T},I=10,K=Array(v(128,0)).fill(null);for(let e of Object.entries(ee)){let r=v(e[0].charCodeAt(0),e[0].length),t=K[r]??[];t.push(e),K[r]=t}function v(e,r){return e*(I+1)+r}function H(e,r,t){let f=e.charCodeAt(r);if(f>=128||t-r>I)return h;let l=v(f,t-r),o=K[l];if(o===null)return h;for(let n=0;n<o.length;n++)if(e.startsWith(o[n][0],r))return o[n][1];return h}var z=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let r=e.charCodeAt(0);r<=e.charCodeAt(1);r++)z[r]=1;function a(e){return e>=128?!i(e):z[e]===1}function G(e,r,t){U(e,te(e,r),r,t,void 0)}function Ne(e,r){U(e,e.length-1,!1,void 0,r)}function U(e,r,t,f,l){let o=[],n=e.startsWith("#!")?oe(e,2):0,c=x,A=!1,E=!1,m=-1,p=()=>{if(c=x,o.length===0)m=-1};while(n<=r){let k=e.charCodeAt(n);if(k===32||k===10||i(k)){n++;continue}if(k===47){let u=S(e,n);if(u!==-1){n=u;continue}}let F=A,Q=E;if(A=!1,E=!1,a(k)||k===35){let u=n;n=J(e,n+1);let g=F?h:H(e,u,n);if(f!==void 0&&o.length===0&&(g===T?t||Z(e,n):g===Y&&X(e,n)))n=Math.max(n,f(m!==-1&&g===T?m:u,u)),p();else if(g===T)c=C;else if(g===w)E=!0,c=h;else c=g===d||g===C?g:h;continue}switch(n++,k){case 34:case 39:{let u=n-1;n=L(e,n,k),l?.(u,n,!1),c=h;break}case 96:{let u=n;n=W(e,n,o),l?.(u,B(e,n),!0),c=e.charCodeAt(n-1)===123?d:h;break}case 47:{let u=c===h?-1:V(e,n);if(u===-1)c=d;else n=O(e,u),c=h;break}case 40:o.push(Q?P:M),c=d;break;case 41:c=o.pop()===P?C:h;break;case 123:o.push(c===d?y:N),c=x;break;case 125:{let u=o.pop();if(u===_){let g=n;n=W(e,n,o),l?.(g,B(e,n),!0),c=e.charCodeAt(n-1)===123?d:h}else if(u===y)c=h;else p();break}case 59:p();break;case 93:c=h;break;case 46:if(s(e.charCodeAt(n)))n=O(e,n),c=h;else if(e.startsWith("..",n))n+=2,c=d;else A=!0,c=d;break;case 63:if(e.charCodeAt(n)===46&&!s(e.charCodeAt(n+1)))n++,A=!0;c=d;break;case 33:c=c===h&&!i(e.charCodeAt(n-2))?h:d;break;case 43:case 45:if(e.charCodeAt(n)===k&&c===h)n++;else c=d;break;case 61:if(c=e.charCodeAt(n)===62?C:d,c===C)n++;break;case 64:if(o.length===0&&m===-1)m=n-1;c=d;break;default:c=d}}}function R(e,r,t){let f=e.length,l=[],o=r,n=d,c=!1;while(o<f){let A=e.charCodeAt(o);if(A===32||A===10||i(A)){o++;continue}if(A===47){let m=S(e,o);if(m!==-1){o=m;continue}}let E=c;if(c=!1,a(A)||A===35){let m=o;if(o=J(e,o+1),!E&&t?.(m,o))return-1;let p=E?h:H(e,m,o);n=p===d||p===C||p===w?d:h;continue}switch(o++,A){case 34:case 39:o=L(e,o,A),n=h;break;case 96:o=W(e,o,l),n=e.charCodeAt(o-1)===123?d:h;break;case 47:{let m=n===h?-1:V(e,o);if(m===-1)n=d;else o=O(e,m),n=h;break}case 40:l.push(M),n=d;break;case 41:if(l.length===0)return o-1;l.pop(),n=h;break;case 123:l.push(n===d?y:N),n=x;break;case 125:{if(l.length===0)return o-1;let m=l.pop();if(m===_)o=W(e,o,l),n=e.charCodeAt(o-1)===123?d:h;else n=m===y?h:x;break}case 93:n=h;break;case 46:if(s(e.charCodeAt(o)))o=O(e,o),n=h;else if(e.startsWith("..",o))o+=2,n=d;else c=!0,n=d;break;case 63:if(e.charCodeAt(o)===46&&!s(e.charCodeAt(o+1)))o++,c=!0;n=d;break;case 33:n=n===h&&!i(e.charCodeAt(o-2))?h:d;break;case 43:case 45:if(e.charCodeAt(o)===A&&n===h)o++;else n=d;break;case 61:if(e.charCodeAt(o)===62)o++;n=d;break;default:n=d}}return f}function j(e){return e===10||e===13||e===8232||e===8233}function oe(e,r){for(let t=r;t<e.length;t++)if(j(e.charCodeAt(t)))return t;return e.length}function S(e,r){let t=e.charCodeAt(r+1);if(t===47)return oe(e,r+2);if(t!==42)return-1;let f=e.indexOf("*/",r+2);return f===-1?e.length:f+2}function J(e,r){let t=r;while(t<e.length){let f=e.charCodeAt(t);if(f===92)t+=2;else if(a(f))t++;else break}return t}function O(e,r){let t=r;while(t<e.length&&a(e.charCodeAt(t)))t++;return t}function L(e,r,t){for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(l===t)return f+1;if(l===92)f+=e.startsWith(`\r
2
- `,f+1)?2:1;else if(l===10||l===13)return f}return e.length}function W(e,r,t){for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(l===96)return f+1;if(l===92)f++;else if(l===36&&e.charCodeAt(f+1)===123)return t.push(_),f+2}return e.length}function B(e,r){let t=e.charCodeAt(r-1);if(t===96)return r-1;if(t===123&&e.charCodeAt(r-2)===36)return r-2;return r}function V(e,r){let t=!1;for(let f=r;f<e.length;f++){let l=e.charCodeAt(f);if(j(l))return-1;if(l===92)f++;else if(l===91)t=!0;else if(l===93)t=!1;else if(l===47&&!t)return f+1}return-1}function b(e,r){let t=r;while(t<e.length){let f=e.charCodeAt(t);if(i(f)){t++;continue}let l=f===47?S(e,t):-1;if(l===-1)return t;t=l}return e.length}function q(e,r,t){return e.charCodeAt(r)===t.charCodeAt(0)&&e.startsWith(t,r)&&!a(e.charCodeAt(r+t.length))}function X(e,r){let t=e.charCodeAt(b(e,r));return t!==40&&t!==46}function Z(e,r){let t=b(e,r);if(q(e,t,"import"))return!0;if(q(e,t,"type"))t=b(e,t+4);let f=e.charCodeAt(t);if(f===42)return!0;if(f!==123)return!1;for(t++;t<e.length;t++){let l=e.charCodeAt(t);if(l===125)break;if(l===34||l===39)t=L(e,t+1,l)-1;else if(l===47)t=Math.max(t,b(e,t)-1)}return q(e,b(e,t+1),"from")}var D=/import|export/g;function te(e,r){let t=-1;D.lastIndex=0;for(let f=D.exec(e);f!==null;f=D.exec(e)){let l=f.index,o=l+6;if(!a(e.charCodeAt(l-1))&&!a(e.charCodeAt(o))&&(e.charCodeAt(l)===105?X(e,o):r||Z(e,o)))t=l}return t}
3
- export{a,G,Ne,R,oe,O,b,q};
@@ -1,2 +0,0 @@
1
- import{A}from"./shared-n0fpkmn8.js";import{ne,he,fe,de}from"./shared-rh41v5ez.js";import{we}from"./shared-n1wnwhk8.js";import{v}from"./shared-v0nj05q2.js";import{c}from"./shared-vjpq32kx.js";function u(t,n,a){let p=he(t,n,a);return y(p),fe(p)}function y(t){let{source:n}=t,{tags:a,comments:p}=we(n),i=t.root.fragment.nodes,f=(e,r)=>{if(r<=e)return;let o=n.slice(e,r),d=o.includes("<")||o.includes("{")?o:A(o,!1,t.entityNames);i.push({type:"Text",start:e,end:r,raw:o,data:d})},s=0,m=0;for(let e of a){for(;m<p.length&&p[m]<e;m+=2){let r=p[m];if(r<s)continue;let o=p[m+1];f(s,r),i.push({type:"Comment",start:r,end:o,data:n.slice(r+4,o-3)}),s=o}if(e<s)continue;f(s,e),t.index=e,ne(t);while(t.stack.length>1&&t.index<n.length)de(t);s=t.index}let l=i.filter((e)=>e.type==="SvelteOptions");i.length=0,i.push(...l)}var S={typescript:c,entityNames:v};function ue(t,n){return u(t,n,S)}
2
- export{ue};
@@ -1,5 +0,0 @@
1
- var m=Array(2048).fill(void 0);function g(){m.fill(void 0)}function At(e,n,t,r){let i=r&2047,s=m[i];if(s!==void 0&&s.length===t-n&&e.startsWith(s,n))return s;let b=e.slice(n,t);return m[i]=b,b}var p="",u=[0],c=0,d=0,l;function C(e){g(),p=e,u=[0],c=0,d=0,l=void 0}function x(e){while(c<=e){let n=p.indexOf(`
2
- `,c);if(n===-1){c=Number.POSITIVE_INFINITY;return}c=n+1,u.push(c)}}function Ae(e){let n=[0],t=e.indexOf(`
3
- `);while(t!==-1)n.push(t+1),t=e.indexOf(`
4
- `,t+1);return n}function ie(e,n,t){let r=0,i=e.length-1;if(n>=e[t])r=t;else i=t-1;if(r<i&&n<e[r+1])i=r;while(r<i){let s=r+i+1>>>1;if(e[s]<=n)r=s;else i=s-1}return r}function h(e){return x(e),d=ie(u,e,d),{line:d+1,column:e-u[d],character:e}}var a=/\r\n?|\n|\u2028|\u2029/g,E=/[\r\u2028\u2029]/;function wt(e){if(l===void 0){l=E.test(p)?[]:null,a.lastIndex=0;while(l!==null&&a.exec(p)!==null)l.push(a.lastIndex)}if(l===null)return x(e),ie(u,e,d);let n=0,t=l.length;while(n<t){let r=n+t>>>1;if(l[r]<=e)n=r+1;else t=r}return n}function _(e){let{line:n,column:t}=h(e);return{line:n,column:t}}function Et(e){while(u.length<=e+1&&c!==Number.POSITIVE_INFINITY)x(c);if(e>=u.length)return;let n=e+1<u.length?u[e+1]-1:p.length;return p.slice(u[e],n)}function Lt(e){let n,t=0;return(r)=>(n??=Ae(e),t=ie(n,r,t),{line:t+1,column:r-n[t]})}function o(e){return typeof e==="object"&&e!==null&&typeof f(e).type==="string"}function f(e){return e}function F(e,n){let t=f(e);for(let r in t){let i=t[r];if(Array.isArray(i)){for(let s=0;s<i.length;s++)if(o(i[s]))i[s]=n(i[s])}else if(o(i))t[r]=n(i)}}function ce(e,...n){if(!n.some((t)=>t===e.type))throw Error(`expected ${n.join(" or ")}, got ${e.type}`)}
5
- export{At,C,Ae,ie,h,wt,_,Et,Lt,o,f,F,ce};
@@ -1,2 +0,0 @@
1
- import{Ae,ie,o,f}from"./shared-4wqe6a27.js";function p(t){let e=[];return T(t,e),e}function T(t,e){switch(t.type){case"Identifier":e.push(t);return;case"ObjectPattern":for(let n of t.properties)T(n.type==="RestElement"?n.argument:n.value,e);return;case"ArrayPattern":for(let n of t.elements)if(n!==null)T(n,e);return;case"RestElement":T(t.argument,e);return;case"AssignmentPattern":T(t.left,e);return;case"TSParameterProperty":T(t.parameter,e);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":T(t.expression,e)}}function I(t,e){if(t.type!=="Identifier")return!1;if(e===null)return!0;switch(e.type){case"MemberExpression":return e.computed||t===e.object;case"MethodDefinition":return e.computed;case"Property":case"PropertyDefinition":return e.computed||t===e.value;case"ExportSpecifier":case"ImportSpecifier":return t===e.local;case"MetaProperty":case"ImportAttribute":case"ExportAllDeclaration":case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":case"TSInstantiationExpression":case"TSExportAssignment":return t===e.expression;case"TSEnumMember":return t===e.initializer;case"TSParameterProperty":case"TSEnumDeclaration":case"TSImportEqualsDeclaration":return!0;default:return!e.type.startsWith("TS")}}var k=64,A=new Map;function Nt(t,e){let n=A.get(t);if(n===void 0){if(A.size>=k)A.delete(A.keys().next().value);n={starts:Ae(t),last:0},A.set(t,n)}let s=ie(n.starts,e,n.last);return n.last=s,{line:s+1,column:e-n.starts[s]}}function Ct(t){let e=t;while(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression"||e.type==="TSTypeAssertion"||e.type==="TSNonNullExpression"||e.type==="TSInstantiationExpression")e=e.expression;return e}var x={Root:["module","instance","fragment","css"],Script:["attributes","content"],Fragment:["nodes"],Text:[],Comment:[],ExpressionTag:["expression"],HtmlTag:["expression"],ConstTag:["declaration"],DeclarationTag:["declaration"],DebugTag:["identifiers"],RenderTag:["expression"],AttachTag:["expression"],Attribute:["value"],SpreadAttribute:["expression"],AnimateDirective:["expression"],BindDirective:["expression"],ClassDirective:["expression"],LetDirective:["expression"],OnDirective:["expression"],StyleDirective:["value"],TransitionDirective:["expression"],UseDirective:["expression"],Component:["attributes","fragment"],TitleElement:["attributes","fragment"],SlotElement:["attributes","fragment"],RegularElement:["attributes","fragment"],SvelteBody:["attributes","fragment"],SvelteBoundary:["attributes","fragment"],SvelteComponent:["expression","attributes","fragment"],SvelteDocument:["attributes","fragment"],SvelteElement:["tag","attributes","fragment"],SvelteFragment:["attributes","fragment"],SvelteHead:["attributes","fragment"],SvelteOptions:["attributes","fragment"],SvelteSelf:["attributes","fragment"],SvelteWindow:["attributes","fragment"],IfBlock:["test","consequent","alternate"],EachBlock:["expression","context","key","body","fallback"],AwaitBlock:["expression","pending","value","then","error","catch"],KeyBlock:["expression","fragment"],SnippetBlock:["expression","parameters","body"],StyleSheet:["attributes","children"],Rule:["prelude","block"],Atrule:["block"],SelectorList:["children"],ComplexSelector:["children"],RelativeSelector:["combinator","selectors"],Combinator:[],TypeSelector:[],IdSelector:[],ClassSelector:[],AttributeSelector:[],PseudoElementSelector:["args"],PseudoClassSelector:["args"],Percentage:[],Nth:[],NestingSelector:[],Block:["children"],Declaration:[],Program:["body"],ExpressionStatement:["expression"],BlockStatement:["body"],StaticBlock:["body"],EmptyStatement:[],DebuggerStatement:[],WithStatement:["object","body"],ReturnStatement:["argument"],LabeledStatement:["label","body"],BreakStatement:["label"],ContinueStatement:["label"],IfStatement:["test","consequent","alternate"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],CatchClause:["param","body"],WhileStatement:["test","body"],DoWhileStatement:["body","test"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","typeParameters","params","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],ArrowFunctionExpression:["typeParameters","params","returnType","body"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","implements","body"],ClassBody:["body"],MethodDefinition:["decorators","key","typeParameters","value"],PropertyDefinition:["decorators","key","typeAnnotation","value"],Property:["decorators","key","value"],ThisExpression:[],Super:[],Literal:[],Identifier:["decorators","typeAnnotation"],PrivateIdentifier:[],ArrayExpression:["elements"],ObjectExpression:["properties"],UnaryExpression:["argument"],UpdateExpression:["argument"],BinaryExpression:["left","right"],LogicalExpression:["left","right"],AssignmentExpression:["left","right"],MemberExpression:["object","property"],ConditionalExpression:["test","consequent","alternate"],CallExpression:["callee","typeArguments","arguments"],NewExpression:["callee","typeArguments","arguments"],SequenceExpression:["expressions"],TemplateLiteral:["quasis","expressions"],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],SpreadElement:["argument"],RestElement:["decorators","argument","typeAnnotation"],YieldExpression:["argument"],AwaitExpression:["argument"],ImportExpression:["source","options","arguments"],ChainExpression:["expression"],ParenthesizedExpression:["expression"],MetaProperty:["meta","property"],ObjectPattern:["decorators","properties","typeAnnotation"],ArrayPattern:["decorators","elements","typeAnnotation"],AssignmentPattern:["decorators","left","right"],ImportDeclaration:["specifiers","source","attributes"],ImportSpecifier:["imported","local"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportAttribute:["key","value"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ExportDefaultDeclaration:["declaration"],ExportAllDeclaration:["exported","source","attributes"],Decorator:["expression"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterDeclaration:["params"],TSTypeParameterInstantiation:["params"],TSTypeParameter:["constraint","default"],TSAnyKeyword:[],TSBigIntKeyword:[],TSBooleanKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSNamedTupleMember:["label","elementType"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSLiteralType:["literal"],TSTypeReference:["typeName","typeArguments"],TSQualifiedName:["left","right"],TSTypeQuery:["exprName","typeArguments"],TSImportType:["argument","qualifier","typeArguments"],TSTypeLiteral:["members"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation"],TSFunctionType:["typeParameters","parameters","typeAnnotation"],TSConstructorType:["typeParameters","parameters","typeAnnotation"],TSIndexSignature:["decorators","parameters","typeAnnotation"],TSTypePredicate:["parameterName","typeAnnotation"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSDeclareFunction:["id","typeParameters","params","returnType"],TSDeclareMethod:["typeParameters","params","returnType"],TSParameterProperty:["parameter"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSNonNullExpression:["expression"],TSInstantiationExpression:["expression","typeArguments"]},i=["attributes","fragment"],Pt={Root:["fragment"],Fragment:["nodes"],Text:[],Comment:[],ExpressionTag:[],HtmlTag:[],ConstTag:[],DeclarationTag:[],DebugTag:[],RenderTag:[],AttachTag:[],Attribute:["value"],SpreadAttribute:[],AnimateDirective:[],BindDirective:[],ClassDirective:[],LetDirective:[],OnDirective:[],StyleDirective:["value"],TransitionDirective:[],UseDirective:[],Component:i,TitleElement:i,SlotElement:i,RegularElement:i,SvelteBody:i,SvelteBoundary:i,SvelteComponent:i,SvelteDocument:i,SvelteElement:i,SvelteFragment:i,SvelteHead:i,SvelteOptions:i,SvelteSelf:i,SvelteWindow:i,IfBlock:["consequent","alternate"],EachBlock:["body","fallback"],AwaitBlock:["pending","then","catch"],KeyBlock:["fragment"],SnippetBlock:["body"]},r=[],g={...x,FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],ArrowFunctionExpression:["params","body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],MethodDefinition:["decorators","key","value"],PropertyDefinition:["decorators","key","value"],Identifier:["decorators"],CallExpression:["callee","arguments"],NewExpression:["callee","arguments"],TaggedTemplateExpression:["tag","quasi"],RestElement:["decorators","argument"],ObjectPattern:["decorators","properties"],ArrayPattern:["decorators","elements"],TSTypeAnnotation:r,TSTypeParameterDeclaration:r,TSTypeParameterInstantiation:r,TSTypeParameter:r,TSArrayType:r,TSTupleType:r,TSNamedTupleMember:r,TSOptionalType:r,TSRestType:r,TSUnionType:r,TSIntersectionType:r,TSConditionalType:r,TSInferType:r,TSParenthesizedType:r,TSTypeOperator:r,TSIndexedAccessType:r,TSMappedType:r,TSLiteralType:r,TSTypeReference:r,TSTypeQuery:r,TSImportType:r,TSTypeLiteral:r,TSPropertySignature:r,TSMethodSignature:r,TSCallSignatureDeclaration:r,TSConstructSignatureDeclaration:r,TSFunctionType:r,TSConstructorType:r,TSIndexSignature:r,TSTypePredicate:r,TSInterfaceDeclaration:r,TSInterfaceBody:r,TSExpressionWithTypeArguments:r,TSTypeAliasDeclaration:r,TSNamespaceExportDeclaration:r,TSDeclareFunction:["id"],TSDeclareMethod:r,TSAsExpression:["expression"],TSSatisfiesExpression:["expression"],TSTypeAssertion:["expression"],TSInstantiationExpression:["expression"]},K=Object.assign(Object.create(null),x),O=Object.assign(Object.create(null),g),D=[],j=Symbol("sveast.walk.stop"),y=Symbol("sveast.walk.skip");function L(t,e,n){E(t,null,null,null,e,B(n))}function B(t){if(t===void 0||t===x)return w;if(t===g)return C;return(e)=>N(t,e.type)}function N(t,e){return Object.hasOwn(t,e)?t[e]:void 0}function M(t,e){if(t===void 0||t===x)return w(e);if(t===g)return C(e);return N(t,e.type)}function _t(t,e,n){let s=M(n,t);if(s===void 0)throw Error(`unknown node type: ${t.type}`);let l=f(t);for(let c=0;c<s.length;c++){let u=s[c],a=l[u];if(Array.isArray(a))for(let S=0;S<a.length;S++){let d=a[S];if(o(d))e(d,u,S)}else if(o(a))e(a,u,null)}}var R=Object.freeze([]),h=new WeakMap,V=new WeakMap;function It(t,e=x){let n=e===x?V:h.get(e);if(n===void 0)n=new WeakMap,h.set(e,n);let s=n.get(t);if(s===void 0){let l=[];_t(t,(c)=>l.push(c),e),s=l.length===0?R:l,n.set(t,s)}return s}function E(t,e,n,s,l,c){let u=c(t);if(u===void 0)throw Error(`unknown node type: ${t.type}`);let a=l.enter?.(t,e,n,s);if(a===j)return!0;if(a!==y){if(a!==t&&o(a))return W(a,e,n,s,l,c);let S=f(t);for(let d=0;d<u.length;d++){let v=u[d],m=S[v];if(Array.isArray(m))for(let b=0;b<m.length;b++){let P=m[b];if(o(P)&&E(P,t,v,b,l,c))return!0}else if(o(m)&&E(m,t,v,null,l,c))return!0}}return l.leave?.(t,e,n,s)===j}function w(t){let e=t.type;if(e==="Identifier")return t.typeAnnotation===void 0&&t.decorators===void 0?D:x.Identifier;if(e==="Literal")return x.Literal;if(e==="Text")return x.Text;return K[e]}function C(t){let e=t.type;if(e==="Identifier")return t.decorators===void 0?D:g.Identifier;if(e==="Literal")return g.Literal;if(e==="Text")return g.Text;return O[e]}function W(t,e,n,s,l,c){if(e===null||n===null)throw Error("walk can't replace the node it was called with");let u=f(e),a=u[n];if(s===null)u[n]=t;else if(Array.isArray(a))a[s]=t;return E(t,e,n,s,l,c)}
2
- export{p,I,Nt,Ct,x,Pt,g,j,y,L,_t,It};
@@ -1,2 +0,0 @@
1
- import{C}from"./shared-4wqe6a27.js";import{Z}from"./shared-jxkrk6hx.js";function T(e,r,o){return C(e),Z({isTypeScript:r.typescript??!1,typescript:o,loc:r.loc??!1,comments:r.comments??!0,root:{comments:[]}},e)}
2
- export{T};
@@ -1,2 +0,0 @@
1
- import{M,V,l}from"./shared-xyqvjc3m.js";var N=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,F=new Map([["any","TSAnyKeyword"],["bigint","TSBigIntKeyword"],["boolean","TSBooleanKeyword"],["never","TSNeverKeyword"],["null","TSNullKeyword"],["number","TSNumberKeyword"],["object","TSObjectKeyword"],["string","TSStringKeyword"],["symbol","TSSymbolKeyword"],["undefined","TSUndefinedKeyword"],["unknown","TSUnknownKeyword"],["void","TSVoidKeyword"]]),q=new Set("public private protected readonly declare abstract override static accessor".split(" ")),O=new Set("public private protected readonly override".split(" ")),K=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),H=new Set("var let const function class interface enum".split(" ")),k=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),L=1,U=32,j=256,G=0,Q=1,f=2,W=3,Y=4,T=6,C=7,R=256,E=1024,X=8|E,J=f|R,w=1,Z=2,I=40,tt=41,et=44,P=46,_=58,y=61,v=60,m=123,st=91,S=42,it=35,b=34,A=39,rt=SyntaxError("speculative parse failed"),z=M((x)=>{let{tokTypes:s,keywordTypes:D,isIdentifierChar:B,isIdentifierStart:u}=x.acorn,d=new x.acorn.TokenType("@");class g extends x{inType=!1;$4=!1;$5=!1;$7=null;$k=null;$l=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(t,e,r){super(t,e,r);let i=this.options.onComment;if(typeof i==="function")this.options.onComment=(n,a,h,o,c,p)=>{if(h<this.$t)return;this.$t=o,i.call(this,n,a,h,o,c,p)}}reset(){this.inType=!1,this.$4=!1,this.$5=!1,this.$7=null,this.$k=null,this.$l=!1,this.$m=!1,this.$f=null,this.$9=[[]],this.$n=0,this.$t=0,this.$o=-1}getTokenFromCode(t){if(t===64)return++this.pos,this.finishToken(d);return super.getTokenFromCode(t)}readToken_lt_gt(t){if(this.inType)return this.finishOp(s.relational,1);return super.readToken_lt_gt(t)}$a(t){let e=this.inType;this.inType=!0;let r=t();if(this.inType=e,!e&&this.type===s.relational)this.pos=this.start,this.nextToken();return r}$1(){return this.type===s.relational&&this.value==="<"}$p(){if(this.type===s.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(s.relational,"<");return this.$1()}$c(){return this.type===s.relational&&this.value===">"}$u(){return this.type===s.prefix&&this.value==="!"}hasPrecedingLineBreak(){return V(this.input,this.lastTokEnd,this.start)}$d(t=this.pos){return N.lastIndex=t,N.exec(this.input),N.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let t=this.$d(),e=t;while(e<this.input.length&&B(this.input.charCodeAt(e)))e++;return this.input.slice(t,e)}$b(){return!V(this.input,this.pos,this.$d())}$14(){return this.$b()&&u(this.$2())&&!Object.hasOwn(D,this.$3())}$15(){return{pos:this.pos,type:this.type,value:this.value,start:this.start,end:this.end,startLoc:this.startLoc,endLoc:this.endLoc,lastTokStart:this.lastTokStart,lastTokEnd:this.lastTokEnd,lastTokStartLoc:this.lastTokStartLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,context:this.context.slice(),exprAllowed:this.exprAllowed,containsEsc:this.containsEsc,inType:this.inType,$4:this.$4,$5:this.$5,$7:this.$7,scopes:this.scopeStack.length,privateNames:this.privateNameStack.length,labels:this.labels,labelCount:this.labels.length,strict:this.strict,yieldPos:this.yieldPos,awaitPos:this.awaitPos,awaitIdentPos:this.awaitIdentPos,potentialArrowAt:this.potentialArrowAt,potentialArrowInForAwait:this.potentialArrowInForAwait}}$16(t){this.pos=t.pos,this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.startLoc=t.startLoc,this.endLoc=t.endLoc,this.lastTokStart=t.lastTokStart,this.lastTokEnd=t.lastTokEnd,this.lastTokStartLoc=t.lastTokStartLoc,this.lastTokEndLoc=t.lastTokEndLoc,this.curLine=t.curLine,this.lineStart=t.lineStart,this.context=t.context,this.exprAllowed=t.exprAllowed,this.containsEsc=t.containsEsc,this.inType=t.inType,this.$4=t.$4,this.$5=t.$5,this.$7=t.$7,this.scopeStack.length=t.scopes,this.privateNameStack.length=t.privateNames,this.labels=t.labels,this.labels.length=t.labelCount,this.strict=t.strict,this.yieldPos=t.yieldPos,this.awaitPos=t.awaitPos,this.awaitIdentPos=t.awaitIdentPos,this.potentialArrowAt=t.potentialArrowAt,this.potentialArrowInForAwait=t.potentialArrowInForAwait}raise(t,e){if(this.$n>0)throw rt;return super.raise(t,e)}$1y(t,e){try{super.raise(t,e)}catch(r){if(r instanceof SyntaxError)r.$1z=!0;throw r}throw Error("unreachable")}$g(t,e=!1){let r=this.$15();this.$n++;try{let i=t();if(e||i===void 0)this.$16(r);return i}catch(i){if(!(i instanceof SyntaxError)||!e&&i.$1z)throw i;this.$16(r);return}finally{this.$n--}}$v(t){return this.$g(t,!0)===!0}$17(t){if(t.end=this.lastTokEnd,this.options.locations)t.loc.end=this.lastTokEndLoc}$q(t,e){if(t.start=e.start,this.options.locations)t.loc.start=e.loc.start}$6(t=!1){let e=this.startNode();return e.typeAnnotation=this.$a(()=>(this.next(),t?this.$20():this.$0())),this.finishNode(e,"TSTypeAnnotation")}$h(t,e){if(e&&this.eat(s.question))t.optional=!0,this.$17(t);if(this.type===s.colon)t.typeAnnotation=this.$6(),this.$17(t);return t}$20(){if(this.type!==s.name&&this.type!==s._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&u(this.$2())){let t=this.startNode();if(this.next(),t.parameterName=this.type===s._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(t,!0);return t.asserts=!0,t.typeAnnotation=null,this.finishNode(t,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let t=this.startNode();return t.parameterName=this.type===s._this?this.$w():this.parseIdent(!0),this.$x(t,!1)}return this.$0()}$x(t,e){this.next();let r=this.startNode();return r.typeAnnotation=this.$0(),t.typeAnnotation=this.finishNode(r,"TSTypeAnnotation"),t.asserts=e,this.finishNode(t,"TSTypePredicate")}$w(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let t=this.$0();if(this.type!==s.eof)this.unexpected();return t}$0(){let t=this.$18();if(this.$4||this.type!==s._extends||this.hasPrecedingLineBreak())return t;let e=this.startNodeAt(t.start,t.loc?.start);return this.next(),e.checkType=t,e.extendsType=this.$i(!0,()=>this.$18()),this.expect(s.question),e.trueType=this.$i(!1,()=>this.$0()),this.expect(s.colon),e.falseType=this.$i(!1,()=>this.$0()),this.finishNode(e,"TSConditionalType")}$i(t,e){let r=this.$4;this.$4=t;let i=e();return this.$4=r,i}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===s._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",s.bitwiseOR,()=>this.$1a("TSIntersectionType",s.bitwiseAND,()=>this.$1b()))}$19(t){let e=this.startNode();if(t==="TSConstructorType"){if(e.abstract=this.isContextual("abstract"),e.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(e,s.arrow)),this.finishNode(e,t)}$r(t,e){if(this.$1())t.typeParameters=this.$8();if(this.expect(s.parenL),t.parameters=this.parseBindingList(s.parenR,!1,!0),this.type===e)t.typeAnnotation=this.$6(!0);else if(e===s.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==s.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===s.parenR||this.type===s.ellipsis)return!0;if(this.type===s.name||this.type===s._this)this.next();else if(this.type===s.braceL||this.type===s.bracketL)this.parseBindingAtom();else return!1;let t=this.type;if(t===s.colon||t===s.comma||t===s.question||t===s.eq)return!0;if(t!==s.parenR)return!1;return this.next(),this.type===s.arrow})}$1a(t,e,r){let i=this.startNode(),n=this.eat(e),a=[];do a.push(r());while(this.eat(e));if(a.length===1&&!n)return a[0];return i.types=a,this.finishNode(i,t)}$1b(){if(this.type===s.name&&!this.containsEsc){let t=this.value;if(t==="keyof"||t==="unique"||t==="readonly"){let e=this.startNode();return this.next(),e.operator=t,e.typeAnnotation=this.$1b(),this.finishNode(e,"TSTypeOperator")}if(t==="infer"){let e=this.startNode();this.next();let r=this.startNode();r.name=this.$y();let i=this.$g(()=>this.$22());if(i)r.constraint=i;return e.typeParameter=this.finishNode(r,"TSTypeParameter"),this.finishNode(e,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(s._extends))return;let t=this.$i(!0,()=>this.$0());return this.$4||this.type!==s.question?t:void 0}$y(){if(this.type!==s.name&&!this.type.keyword)this.unexpected();let t=this.type===s.name?this.value:this.type.keyword;return this.next(),t}$23(){let t=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(s.bracketL)){let e=this.startNodeAt(t.start,t.loc?.start);if(this.eat(s.bracketR))e.elementType=t,t=this.finishNode(e,"TSArrayType");else e.objectType=t,e.indexType=this.$0(),this.expect(s.bracketR),t=this.finishNode(e,"TSIndexedAccessType")}return t}$24(){switch(this.type){case s.name:case s._void:case s._null:{let t=F.get(this.value);if(t&&(this.type!==s.name||!this.containsEsc&&this.$2()!==P)){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.$1c()}case s.string:case s.num:case s._true:case s._false:{let t=this.startNode();return t.literal=this.parseExprAtom(),this.finishNode(t,"TSLiteralType")}case s.plusMin:{if(this.value!=="-")break;let t=this.startNode(),e=this.startNode();if(this.next(),this.type!==s.num)this.unexpected();return e.operator="-",e.prefix=!0,e.argument=this.parseExprAtom(),t.literal=this.finishNode(e,"UnaryExpression"),this.finishNode(t,"TSLiteralType")}case s.backQuote:return this.$25();case s._this:{let t=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let e=this.startNodeAt(t.start,t.loc?.start);return e.parameterName=t,this.$x(e,!1)}return t}case s._typeof:return this.$26();case s._import:return this.$1d();case s.braceL:return this.$27()?this.$28():this.$29();case s.bracketL:return this.$2a();case s.parenL:{let t=this.startNode();return this.next(),t.typeAnnotation=this.$0(),this.expect(s.parenR),this.finishNode(t,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let t=this.startNode();if(t.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeReference")}$j(){let t=this.parseIdent(!0);while(this.eat(s.dot)){let e=this.startNodeAt(t.start,t.loc?.start);e.left=t,e.right=this.parseIdent(!0),t=this.finishNode(e,"TSQualifiedName")}return t}$26(){let t=this.startNode();if(this.next(),t.exprName=this.type===s._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSTypeQuery")}$1d(){let t=this.startNode();if(this.next(),t.argument=this.$1e(),this.eat(s.dot))t.qualifier=this.$j();if(this.$1())t.typeArguments=this.$e();return this.finishNode(t,"TSImportType")}$z(){if(this.type!==s.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(s.parenL);let t=this.$z();return this.expect(s.parenR),t}$25(){let t=this.startNode(),e=this.startNode();this.next(),e.expressions=[];let r=this.parseTemplateElement({isTagged:!1});e.quasis=[r];while(!r.tail){if(this.type===s.eof)this.raise(this.pos,"Unterminated template literal");this.expect(s.dollarBraceL),e.expressions.push(this.$0()),this.expect(s.braceR),r=this.parseTemplateElement({isTagged:!1}),e.quasis.push(r)}return this.next(),t.literal=this.finishNode(e,"TemplateLiteral"),this.finishNode(t,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===s.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==s.bracketL)return!1;if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s._in})}$28(){let t=this.startNode();if(this.expect(s.braceL),this.type===s.plusMin)t.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))t.readonly=!0;this.expect(s.bracketL);let e=this.startNode();if(e.name=this.$y(),this.expect(s._in),e.constraint=this.$0(),t.typeParameter=this.finishNode(e,"TSTypeParameter"),t.nameType=this.eatContextual("as")?this.$0():null,this.expect(s.bracketR),this.type===s.plusMin)t.optional=this.value,this.next(),this.expect(s.question);else if(this.eat(s.question))t.optional=!0;if(this.eat(s.colon))t.typeAnnotation=this.$0();return this.semicolon(),this.expect(s.braceR),this.finishNode(t,"TSMappedType")}$29(){let t=this.startNode();return t.members=this.$1f(),this.finishNode(t,"TSTypeLiteral")}$1f(){this.expect(s.braceL);let t=[];while(!this.eat(s.braceR))t.push(this.$2b());return t}$2b(){let t=this.startNode(),e="TSPropertySignature",r=this.type===s._new?this.$2():-1;if(this.type===s.parenL||this.$1())e="TSCallSignatureDeclaration",this.$r(t,s.colon);else if(r===I||r===v)e="TSConstructSignatureDeclaration",this.next(),this.$r(t,s.colon);else{let i=this.type===s._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),t.readonly=!0;if(this.type===s.bracketL&&this.$1g())return this.$1h(t);let n="method";if(i)t.key=i;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))n=this.value,this.next();this.parsePropertyName(t)}if(this.eat(s.question))t.optional=!0;if(this.type===s.parenL||this.$1()){if(e="TSMethodSignature",n!=="method")t.kind=n;this.$r(t,s.colon),t.kind=n}else if(this.type===s.colon)t.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(t,e)}$1i(){if(!this.eat(s.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==s.name)return!1;return this.next(),this.type===s.colon})}$1h(t){if(this.expect(s.bracketL),t.parameters=[this.$h(this.parseIdent(),!1)],this.expect(s.bracketR),this.type===s.colon)t.typeAnnotation=this.$6();return this.$1i(),this.finishNode(t,"TSIndexSignature")}$2a(){let t=this.startNode();this.expect(s.bracketL),t.elementTypes=[];while(!this.eat(s.bracketR))if(t.elementTypes.push(this.$2c()),this.type!==s.bracketR)this.expect(s.comma);return this.finishNode(t,"TSTupleType")}$2c(){let t=this.start,e=this.startLoc,r=this.eat(s.ellipsis),i;if((this.type===s.name||this.type.keyword)&&this.$2d()){let n=this.startNode();n.label=this.parseIdent(!0),n.optional=this.eat(s.question),this.expect(s.colon),n.elementType=this.$0(),i=this.finishNode(n,"TSNamedTupleMember")}else if(i=this.$0(),this.eat(s.question)){let n=this.startNodeAt(i.start,i.loc?.start);n.typeAnnotation=i,i=this.finishNode(n,"TSOptionalType")}if(r){let n=this.startNodeAt(t,e);n.typeAnnotation=i,i=this.finishNode(n,"TSRestType")}return i}$2d(){let t=this.$d();if(this.input.charCodeAt(t)===63)t=this.$d(t+1);return this.input.charCodeAt(t)===_}$8(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c()){let e=this.startNode();while((this.type===s._const||this.type===s._in||this.isContextual("out"))&&u(this.$2()))e[this.value]=!0,this.next();if(e.name=this.$y(),this.eat(s._extends))e.constraint=this.$0();if(this.eat(s.eq))e.default=this.$0();if(t.params.push(this.finishNode(e,"TSTypeParameter")),!this.$c()){if(this.expect(s.comma),this.$c())t.extra={trailingComma:this.lastTokStart}}}if(this.next(),t.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(t,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let t=this.startNode();this.next(),t.params=[];while(!this.$c())if(t.params.push(this.$0()),!this.$c())this.expect(s.comma);if(t.params.length===0)this.unexpected();return this.next(),this.finishNode(t,"TSTypeParameterInstantiation")})}$1j(){let t=[];do{let e=this.startNode();if(e.expression=this.$j(),this.$1())e.typeParameters=this.$e();t.push(this.finishNode(e,"TSExpressionWithTypeArguments"))}while(this.eat(s.comma));return t}$1k(t=!1){if(this.type!==s.name||this.containsEsc){if(this.type===s._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(t);return this.$1l(this.startNode(),this.value)}$2e(t){switch(t){case"interface":case"type":case"namespace":return this.$14();case"enum":return u(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let e=this.$2();return this.$b()&&(e===b||e===A||u(e))}case"declare":return this.$b()&&K.has(this.$3());case"global":return this.$b()&&this.$2()===m}return!1}$1l(t,e){switch(e){case"interface":return this.$1m(t);case"type":return this.$2g(t);case"enum":return this.$10(t);case"abstract":return this.$1n(t,!0);case"global":return t.global=!0,t.id=this.parseIdent(),t.body=this.$11(),this.finishNode(t,"TSModuleDeclaration")}return this.$2h(t)}$2f(t){let e=this.$5;this.$5=!0;let r=this.startNode();this.next();let i=this.value;if(i==="const"&&this.$3()==="enum")r.const=!0;if(!t&&H.has(i))r.declare=!0;let n;if(r.const)n=this.$10(r);else if(i==="var"||i==="let"||i==="const")n=this.parseVarStatement(r,i,!0);else if(i==="function")this.next(),n=this.parseFunction(r,w,!1,!1);else if(i==="class")n=this.parseClass(r,!0);else n=this.$1l(r,i);return n.declare=!0,this.$5=e,n}$1n(t,e){return this.next(),t.abstract=!0,this.parseClass(t,e)}$1m(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,C),this.$1())t.typeParameters=this.$8();return this.$a(()=>{if(this.eat(s._extends))t.extends=this.$1j();let e=this.startNode();e.body=this.$1f(),t.body=this.finishNode(e,"TSInterfaceBody")}),this.finishNode(t,"TSInterfaceDeclaration")}$2g(t){if(this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,T),this.$1())t.typeParameters=this.$8();return t.typeAnnotation=this.$a(()=>(this.expect(s.eq),this.$0())),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}$10(t){if(this.type===s._const)t.const=!0,this.next();this.next(),t.id=this.parseIdent(),this.checkLValSimple(t.id,J),this.expect(s.braceL),t.members=[];while(!this.eat(s.braceR)){let e=this.startNode();if(e.id=this.type===s.string?this.parseExprAtom():this.parseIdent(!0),this.eat(s.eq))e.initializer=this.parseMaybeAssign();if(t.members.push(this.finishNode(e,"TSEnumMember")),this.type!==s.braceR)this.expect(s.comma)}return this.finishNode(t,"TSEnumDeclaration")}$2h(t){if(this.next(),this.type===s.string){if(t.id=this.parseExprAtom(),this.type===s.braceL)t.body=this.$11();else this.semicolon();return this.finishNode(t,"TSModuleDeclaration")}return t.id=this.parseIdent(),this.checkLValSimple(t.id,X),this.$1o(t)}$1o(t){if(this.eat(s.dot)){let e=this.startNode();e.id=this.parseIdent(),t.body=this.$1o(e)}else t.body=this.$11();return this.finishNode(t,"TSModuleDeclaration")}$11(){this.enterScope(j);let t=this.startNode();this.enterScope(0),this.expect(s.braceL),t.body=[];while(!this.eat(s.braceR))t.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(t,"TSModuleBlock")}$1p(t,e){if(t.isExport=e,t.id=this.parseIdent(),this.checkLValSimple(t.id,f),this.expect(s.eq),this.isContextual("require")&&this.$2()===I){let r=this.startNode();this.next(),r.expression=this.$1e(),t.moduleReference=this.finishNode(r,"TSExternalModuleReference")}else t.moduleReference=this.$j();return this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}$2i(){let t=this.$d();if(this.input.charCodeAt(t)!==y)return!1;let e=this.input.charCodeAt(t+1);return e!==y&&e!==62}parseStatement(t,e,r){if(this.type===d)this.$1q(!0);let i=this.$1k();if(i)return i;return super.parseStatement(t,e,r)}parseVarStatement(t,e,r){return super.parseVarStatement(t,e,r||this.$5)}parseVarId(t,e){if(super.parseVarId(t,e),t.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),t.definite=!0;this.$h(t.id,!1)}parseCatchClauseParam(){let t=this.$h(this.parseBindingAtom(),!1),e=t.type==="Identifier";return this.enterScope(e?U:0),this.checkLValPattern(t,e?Y:f),this.expect(s.parenR),t}parseImport(t){if(this.next(),t.importKind="value",this.type===s.string)t.specifiers=[],t.source=this.parseExprAtom();else{if(this.isContextual("type")){let e=this.$2();if(e===m||e===S||u(e)&&this.$3()!=="from")t.importKind="type",this.next()}if(this.type===s.name&&this.$2i())return this.$1p(t,!1);t.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),t.source=this.$z()}return this.$1r(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=s._with;return this.type===s._with?super.parseWithClause():void 0}$1r(t){let e=this.parseWithClause();if(e)t.attributes=e}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(t){return this.$1s("exportKind",()=>super.parseExportSpecifier(t))}$1s(t,e){let r=this.isContextual("type")?this.$2():-1;if(r===b||r===A||u(r)&&this.$3()!=="as"){let n=this.startNode();this.next();let a=e();return this.$q(a,n),a[t]="type",a}let i=e();return i[t]="value",i}parseExport(t,e){if(this.next(),this.eat(s._import)){if(t.importKind="value",this.isContextual("type")&&u(this.$2())&&this.$3()!=="from")t.importKind="type",this.next();return this.$1p(t,!0)}if(this.eat(s.eq))return t.expression=this.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),t.id=this.parseIdent(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration");if(t.exportKind="value",this.isContextual("type")){let n=this.$2();if(n===m||n===S)t.exportKind="type",this.next()}if(this.eat(s.star))return this.parseExportAllDeclaration(t,e);if(this.eat(s._default)){if(this.isContextual("interface")&&this.$14())t.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")t.declaration=this.$1n(this.startNode(),"nullableID");else t.declaration=this.parseExportDefaultDeclaration();return this.finishNode(t,"ExportDefaultDeclaration")}let r=this.isContextual("declare"),i=this.$1k(!0);if(i||this.shouldParseExportStatement()){if(t.declaration=i??this.parseStatement(null),r||t.declaration.type==="TSInterfaceDeclaration"||t.declaration.type==="TSTypeAliasDeclaration")t.exportKind="type";return t.specifiers=[],t.source=null,this.finishNode(t,"ExportNamedDeclaration")}if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))t.source=this.$z(),this.$1r(t);else{for(let n of t.specifiers)if(this.checkUnreserved(n.local),this.checkLocalExport(n.local),n.local.type==="Literal")this.raise(n.local.start,"A string literal cannot be used as an exported binding without `from`.");t.source=null}return this.semicolon(),this.finishNode(t,"ExportNamedDeclaration")}parseFunction(t,e,r,i,n){let a=e&w;if(a)this.$f=t,this.$o=t.start;super.parseFunction(t,e,r,i,n),this.$f=null;let h=!t.body;if(h)t.type="TSDeclareFunction";if(a&&t.id){if(h){if(this.$5&&this.currentScope().flags&L)this.declareName(t.id.name,E,t.id.start);this.checkLValSimple(t.id,G)}else if(!(e&Z)){let o=W;if(this.strict||t.generator||t.async)o=this.treatFunctionsAsVar?Q:f;this.checkLValSimple(t.id,o)}}return t}parseFunctionParams(t){if(this.$1())t.typeParameters=this.$8();if(super.parseFunctionParams(t),this.type===s.colon)t.returnType=this.$6(!0)}parseFunctionBody(t,e,r,i){if(r&&this.type===s.colon)t.returnType=this.$6(!0);if(e||this.type===s.braceL||t.start!==this.$o){super.parseFunctionBody(t,e,r,i);return}this.semicolon(),this.exitScope()}parseMethod(t,e,r){let i=this.$k;this.$k=null;let n=super.parseMethod(t,e,r);if(!n.body)n.type="TSDeclareMethod";if(i)n.typeParameters=i;return n}parseBindingList(t,e,r,i){let n=i===!0||this.$l;return this.$l=!1,super.parseBindingList(t,e,r,n)}$s(t){if(!t&&!this.$b())return!1;let e=this.$2();return e===st||e===m||e===S||e===P||e===it||e===b||e===A||e>=48&&e<=57||u(e)}parseAssignableListItem(t){let e=this.$12(),r=this.start,i=this.startLoc,n,a=!1,h=!1;if(t)while(this.type===s.name&&O.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")a=!0;else if(this.value==="override")h=!0;else n=this.value;this.next()}let o;if(this.type===s._this)o=this.startNode(),o.name="this",this.next(),this.finishNode(o,"Identifier");else o=this.parseBindingAtom();let c=this.type===s.eq?this.parseMaybeDefault(r,i,o):this.parseMaybeDefault(o.start,o.loc?.start,this.$h(o,!0));if(e.length>0)c.decorators=e;if(!n&&!a&&!h)return c;let p=this.startNodeAt(r,i);if(n)p.accessibility=n;if(a)p.readonly=!0;if(h)p.override=!0;return p.parameter=c,this.finishNode(p,"TSParameterProperty")}parseBindingListItem(t){if(t.type==="RestElement")this.$h(t,!0);return t}checkLValSimple(t,e,r){if(this.$f&&t===this.$f.id){this.$f=null;return}if(!e&&k.has(t.type)){this.checkLValSimple(t.expression,e,r);return}switch(t.type){case"TSParameterProperty":this.checkLValInnerPattern(t.parameter,e,r);return;case"Identifier":if(t.name==="this")return}super.checkLValSimple(t,e,r)}toAssignable(t,e,r){if(t&&!e&&k.has(t.type))return t;return super.toAssignable(t,e,r)}declareName(t,e,r){let i=this.currentScope();if(e&E){this.$1t(i,t),i.$1u??=[],i.$1u.push(t);return}if(e===T||e===C){if(i.$13??=[],e===T&&l(i.$13,t))this.raise(r,`type '${t}' has already been declared.`);i.$13.push(t),this.$1t(i,t);return}if(e&R){if(i.$1v??=[],l(i.$1v,t))return;super.declareName(t,f,r),i.$1v.push(t);return}super.declareName(t,e,r)}$1t(t,e){if(this.inModule&&t.flags&L)delete this.undefinedExports[e]}checkLocalExport(t){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(l(r.$13,t.name)||l(r.$1u,t.name))return}super.checkLocalExport(t)}checkExport(){}raiseRecoverable(t,e){if(e==="Duplicate constructor in the same class")return;super.raiseRecoverable(t,e)}$12(){let t=[];while(this.type===d)t.push(this.$1w());return t}$1q(t){let e=this.$9[this.$9.length-1];while(this.type===d)e.push(this.$1w());if(this.type===s._export){if(!t)this.unexpected()}else if(this.type!==s._class&&!((this.isContextual("abstract")||this.isContextual("declare"))&&this.$3()==="class"))this.raise(this.start,"Leading decorators must be attached to a class declaration.")}$1w(){let t=this.startNode();this.next(),this.$9.push([]);let e=this.start,r=this.startLoc,i;if(this.type===s.parenL){if(this.next(),i=this.parseExpression(),this.expect(s.parenR),this.options.preserveParens){let a=this.startNodeAt(e,r);a.expression=i,i=this.finishNode(a,"ParenthesizedExpression")}}else{i=this.parseIdent(!1);while(this.eat(s.dot)){let a=this.startNodeAt(e,r);a.object=i,a.property=this.parseIdent(!0),a.computed=!1,i=this.finishNode(a,"MemberExpression")}}let n=this.$p()?this.$e():void 0;if(this.eat(s.parenL)){let a=this.startNodeAt(i.start,i.loc?.start);if(a.callee=i,a.arguments=this.parseExprList(s.parenR,!1,!1),n)a.typeArguments=n;i=this.finishNode(a,"CallExpression")}else if(n){let a=this.startNodeAt(i.start,i.loc?.start);a.expression=i,a.typeArguments=n,i=this.finishNode(a,"TSInstantiationExpression")}return t.expression=i,this.$9.pop(),this.finishNode(t,"Decorator")}shouldParseExportStatement(){return this.type===d||super.shouldParseExportStatement()}parseExprAtom(t,e,r){if(this.type===d)this.$1q(!1);return super.parseExprAtom(t,e,r)}parseProperty(t,e){if(t||this.type!==d)return super.parseProperty(t,e);let r=this.$12(),i=super.parseProperty(t,e);if(i.type==="SpreadElement")this.raise(i.start,"Decorators can't be used with SpreadElement");return i.decorators=r,i}parseClassId(t,e){let r=this.$9.length-1,i=this.$9[r];if(i.length>0)t.decorators=i,this.$q(t,i[0]),this.$9[r]=[];if(!this.isContextual("implements")||e===!0)super.parseClassId(t,e);if(this.$1())t.typeParameters=this.$8()}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&this.$1())t.superTypeParameters=this.$e();if(this.eatContextual("implements"))t.implements=this.$a(()=>this.$1j())}parseClassElement(t){if(this.type===d){let h=this.$12();if(this.type===s.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let o=this.parseClassElement(t);return o.decorators=h,this.$q(o,h[0]),o}if(this.eat(s.semi))return null;let e=this.startNode();while(this.type===s.name&&q.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let h=this.value;if(this.next(),h==="static"&&this.type===s.braceL)return this.next(),this.parseClassStaticBlock(e),e;if(h==="public"||h==="private"||h==="protected")e.accessibility=h;else e[h]=!0}if(this.type===s.bracketL&&this.$1g())return this.$1h(e);e.static??=!1;let r="",i=!1,n=!1,a="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===s.star)&&!this.canInsertSemicolon())n=!0;else r="async";if(!r&&this.eat(s.star))i=!0;if(!r&&!n&&!i){let h=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=h;else r=h}if(r)e.computed=!1,e.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),e.key.name=r,this.finishNode(e.key,"Identifier");else this.parseClassElementName(e);if(this.eat(s.question))e.optional=!0;if(this.type===s.parenL||this.$1()||a!=="method"||i||n){let h=e.key,o=!e.static&&!e.computed&&(h.type==="Identifier"&&h.name==="constructor"||h.type==="Literal"&&h.value==="constructor");if(e.kind=o?"constructor":a,this.$1())e.typeParameters=this.$8();this.$l=o,this.$o=this.start,this.parseClassMethod(e,i,n,o&&t)}else{if(!e.optional&&this.$u())this.next(),e.definite=!0;if(this.type===s.colon)e.typeAnnotation=this.$6();this.parseClassField(e)}return e}parseMaybeAssign(t,e,r){if(this.$p()){let i=this.$g(()=>{let n=this.$8(),a=super.parseMaybeAssign(t,e,r);if(a.type!=="ArrowFunctionExpression")return;return a.typeParameters=n,this.$q(a,n),a});if(i)return i}return super.parseMaybeAssign(t,e,r)}parseMaybeUnary(t,e,r,i){if(this.$p()){let n=this.startNode();return n.typeAnnotation=this.$a(()=>{this.next();let a=this.$0();if(!this.$c())this.unexpected();return this.next(),a}),n.expression=this.parseMaybeUnary(null,!1,!1,i),this.finishNode(n,"TSTypeAssertion")}return super.parseMaybeUnary(t,e,r,i)}parseMaybeConditional(t,e){let r=this.start,i=this.startLoc,n=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return n;if(this.type===s.question&&!(n.type==="ArrowFunctionExpression"&&n.start===r)&&!this.$2j()){this.next();let a=this.startNodeAt(r,i);return a.test=n,a.consequent=this.parseMaybeAssign(),this.expect(s.colon),a.alternate=this.parseMaybeAssign(t),this.finishNode(a,"ConditionalExpression")}return n}$2j(){let t=this.$d(),e=this.input.charCodeAt(t);if(e===_||e===et||e===tt)return!0;return e===y&&this.input.charCodeAt(t+1)!==y}parseParenItem(t){return this.$h(t,!0)}$1x(){if(this.type!==s.colon)return!0;let t=this.$g(()=>{let e=this.$6(!0);return this.type===s.arrow&&!this.canInsertSemicolon()?e:void 0});if(!t)return!1;return this.$7=t,!0}shouldParseArrow(t){return this.$1x()&&super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(t,e,r,i){if(this.$7)t.returnType=this.$7,this.$7=null;return super.parseArrowExpression(t,e,r,i)}parseExprList(t,e,r,i){if(!this.$m)return super.parseExprList(t,e,r,i);this.$m=!1;let n=[],a=!0;while(!this.eat(t)){if(a)a=!1;else if(this.expect(s.comma),e&&this.afterTrailingComma(t))break;if(this.type===s.ellipsis){let h=this.parseSpread(i);if(this.eat(s.question))h.optional=!0;if(this.type===s.colon)h.typeAnnotation=this.$6();n.push(h)}else n.push(this.parseMaybeAssign(!1,i,this.parseParenItem))}return n}parseSubscript(t,e,r,i,n,a,h){if(this.$u()&&!this.hasPrecedingLineBreak()){let c=this.startNodeAt(e,r);return this.exprAllowed=!1,this.next(),c.expression=t,this.finishNode(c,"TSNonNullExpression")}if(n&&this.$1()){let c=this.$g(()=>this.$2k(e,r,h));if(c)return c}let o=this.type===s.questionDot&&this.$2()===v;if(this.$1()||o||this.type===s.bitShift&&this.value==="<<"){let c=this.$g(()=>{if(o)this.next();this.$p();let p=this.$e();if(this.type===s.parenL&&!i)return p;if(this.type===s.backQuote)return o?void 0:p;if(o)return;if(this.$c()||this.type===s.bitShift||this.type.startsExpr&&this.type!==s.parenL&&!this.hasPrecedingLineBreak())return;return p});if(c){let p=this.startNodeAt(e,r);if(this.type===s.parenL&&!i){if(this.next(),p.callee=t,p.arguments=this.parseExprList(s.parenR,!0,!1),p.typeArguments=c,o)t.optional=!0;if(o||a)p.optional=o;return this.finishNode(p,"CallExpression")}if(this.type===s.backQuote)return p.tag=t,p.quasi=this.parseTemplate({isTagged:!0}),p.typeArguments=c,this.finishNode(p,"TaggedTemplateExpression");return p.expression=t,p.typeArguments=c,this.finishNode(p,"TSInstantiationExpression")}}if(n&&this.type===s.parenL)this.$m=!0;return super.parseSubscript(t,e,r,i,n,a,h)}$2k(t,e,r){let i=this.startNodeAt(t,e);if(i.typeParameters=this.$8(),this.expect(s.parenL),i.params=this.parseBindingList(s.parenR,!1,!0),this.type===s.colon)i.returnType=this.$6(!0);if(this.type!==s.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(i,i.params,!0,r)}parseDynamicImport(t){if(this.next(),t.source=this.parseMaybeAssign(),this.eat(s.comma)&&this.type!==s.parenR)t.arguments=[this.parseExpression()];return this.expect(s.parenR),this.finishNode(t,"ImportExpression")}parseNew(){let t=super.parseNew();if(t.callee?.type!=="TSInstantiationExpression")return t;let e=this.startNodeAt(t.start,t.loc?.start);return e.callee=t.callee.expression,e.typeArguments=t.callee.typeArguments,e.arguments=t.arguments,this.finishNodeAt(e,"NewExpression",t.end,t.loc?.end)}parseExprOp(t,e,r,i,n){if(s._in.binop>i&&this.type===s.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let a=this.value==="satisfies",h=this.startNodeAt(e,r);return h.expression=t,h.typeAnnotation=this.$a(()=>{if(this.next(),!a&&this.type===s._const){let o=this.startNode();return o.typeName=this.parseIdent(!0),this.finishNode(o,"TSTypeReference")}return this.$0()}),this.finishNode(h,a?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(h,e,r,i,n)}return super.parseExprOp(t,e,r,i,n)}parseGetterSetter(t){t.kind=t.key.name,super.parseGetterSetter(t)}parsePropertyValue(t,e,r,i,n,a,h,o){if(!e&&this.$1()){if(this.$k=this.$8(),this.type!==s.parenL)this.unexpected();t.kind="init"}return super.parsePropertyValue(t,e,r,i,n,a,h,o)}}return g});
2
- export{z};
@@ -1,2 +0,0 @@
1
- function vt(t){return{support:"typescript",parser:t}}function Tt(t){return{support:"entities",names:t}}function ee(t){return t&&"parser"in t?t.parser:void 0}function kt(t){return t&&"names"in t?t.names:void 0}function te(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}
2
- export{vt,Tt,ee,kt,te};
@@ -1,2 +0,0 @@
1
- import{C}from"./shared-4wqe6a27.js";import{St}from"./shared-jxkrk6hx.js";import{G}from"./shared-2by923ar.js";function k(t,r,o){C(t);let e={isTypeScript:r.typescript??!1,typescript:o,loc:!1,comments:!1,root:{comments:[]}};return St(e,t,(s)=>G(t,r.localExports??!0,s))}
2
- export{k};
@@ -1,10 +0,0 @@
1
- import{At,h,wt,Et,o,f,F}from"./shared-4wqe6a27.js";import{M,re,V,l}from"./shared-xyqvjc3m.js";import{te}from"./shared-h6c4cer7.js";var Y=/^\t+/;class e extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(t,r,s){super(`${s}
2
- https://svelte.dev/e/${r}`);this.code=r,this.reason=s;let c=typeof t==="number"?t:t?.start,p=typeof t==="number"?t:t?.end;if(c!==void 0)this.position=[c,p??c],this.start=h(this.position[0]),this.end=h(this.position[1]),this.frame=Q(this.start.line-1,this.end.column)}}var I=(t)=>t.replace(Y,(r)=>" ".repeat(r.length));function Q(t,r){let s=Math.max(0,t-2),c=[];for(let i=s;i<t+3;i++){let a=Et(i);if(a===void 0)break;c.push(a)}let p=String(s+c.length+1).length;return c.map((i,a)=>{let u=`${String(s+a+1).padStart(p," ")}: ${I(i)}`;if(s+a!==t)return u;return`${u}
3
- ${" ".repeat(p+2+I(i.slice(0,r)).length)}^`}).join(`
4
- `)}function Ce(t){throw new e(t,"attribute_duplicate","Attributes need to be unique")}function _e(t){throw new e(t,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function Pe(t,r){throw new e(t,"block_duplicate_clause",`${r} cannot appear more than once within a block`)}function Ie(t){throw new e(t,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function Le(t){throw new e(t,"block_invalid_elseif","'elseif' should be 'else if'")}function Re(t,r,s){throw new e(t,"block_invalid_placement",`{#${r} ...} block cannot be ${s}`)}function $e(t){throw new e(t,"block_unclosed","Block was left open")}function Oe(t){throw new e(t,"block_unexpected_close","Unexpected block closing tag")}function qe(t){throw new e(t,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function De(t){throw new e(t,"css_empty_declaration","Declaration cannot be empty")}function ye(t){throw new e(t,"css_expected_identifier","Expected a valid CSS identifier")}function Be(t){throw new e(t,"css_selector_invalid","Invalid selector")}function Fe(t){throw new e(t,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function xe(t){throw new e(t,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function Me(t){throw new e(t,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function Ve(t,r){throw new e(t,"directive_missing_name",`\`${r}\` name cannot be empty`)}function We(t,r){throw new e(t,"element_invalid_closing_tag",`\`</${r}>\` attempted to close an element that was not open`)}function je(t,r,s){throw new e(t,"element_invalid_closing_tag_autoclosed",`\`</${r}>\` attempted to close element that was already automatically closed by \`<${s}>\` (cannot nest \`<${s}>\` inside \`<${r}>\`)`)}function ae(t,r){throw new e(t,"element_unclosed",`\`<${r}>\` was left open`)}function ge(t){throw new e(t,"expected_attribute_value","Expected attribute value")}function ze(t){throw new e(t,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function be(t){throw new e(t,"expected_identifier","Expected an identifier")}function Ue(t){throw new e(t,"expected_pattern","Expected identifier or destructure pattern")}function Ke(t){throw new e(t,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function d(t,r){throw new e(t,"expected_token",`Expected token ${r}`)}function Ge(t){throw new e(t,"expected_whitespace","Expected whitespace")}function R(t,r){throw new e(t,"js_parse_error",`${r}`)}function He(t){throw new e(t,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function Qe(t){throw new e(t,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function Xe(t,r){throw new e(t,"script_invalid_attribute_value",`If the \`${r}\` attribute is supplied, it must be a boolean attribute`)}function Ye(t){throw new e(t,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function Je(t,r){throw new e(t,"script_reserved_attribute",`The \`${r}\` attribute is reserved and cannot be used`)}function Ze(t){throw new e(t,"style_duplicate","A component can have a single top-level `<style>` element")}function et(t){throw new e(t,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function tt(t){throw new e(t,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function Se(t){throw new e(t,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function it(t,r){throw new e(t,"svelte_meta_duplicate",`A component can only have one \`<${r}>\` element`)}function rt(t,r){throw new e(t,"svelte_meta_invalid_content",`<${r}> cannot have children`)}function st(t,r){throw new e(t,"svelte_meta_invalid_placement",`\`<${r}>\` tags cannot be inside elements or blocks`)}function nt(t,r){throw new e(t,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${r}`)}function ot(t){throw new e(t,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function at(t){throw new e(t,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function le(t,r){throw new e(t,"svelte_options_invalid_attribute_value",`Value must be ${r}, if specified`)}function lt(t){throw new e(t,"svelte_options_invalid_customelement",'"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | `ShadowRootInit`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }')}function ct(t){throw new e(t,"svelte_options_invalid_customelement_props",'"props" must be a statically analyzable object literal of the form "{ [key: string]: { attribute?: string; reflect?: boolean; type?: "String" | "Boolean" | "Number" | "Array" | "Object" }"')}function pt(t){throw new e(t,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function ve(t){throw new e(t,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function ut(t){throw new e(t,"svelte_options_reserved_tagname","Tag name is reserved")}function ht(t,r){throw new e(t,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${r}'`)}function ft(t){throw new e(t,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function dt(t,r,s){throw new e(t,"tag_invalid_placement",`{@${r} ...} tag cannot be ${s}`)}function n(t){throw new e(t,"unexpected_eof","Unexpected end of input")}function mt(t,r){throw new e(t,"unexpected_reserved_word",`'${r}' is a reserved word in JavaScript and cannot be used here`)}function yt(t){throw new e(t,"unterminated_string_constant","Unterminated string constant")}function xt(t){throw new e(t,"void_element_invalid_content","Void elements cannot have children or closing tags")}var b="",W=[],L=0,g=[],x=0;function j(t,r){b=t,W=r,L=0}function U(){return L}function z(t,r,s,c){L=c}function K(t,r,s,c,p,i){L=c;let a=r;if(t&&a.includes(`
5
- `)){let m=b.lastIndexOf(`
6
- `,s-1)+1,_=m,v=b.charCodeAt(_);while(v===32||v===9)v=b.charCodeAt(++_);if(_>m)a=ee(a,b.slice(m,_))}let u={type:t?"Block":"Line",value:a,start:s,end:c};if(p&&i)u.loc={start:p,end:i};W.push(u)}function ee(t,r){let s=t.startsWith(r)?r.length:0,c="",p=t.indexOf(`
7
- `,s);while(p!==-1){if(c+=t.slice(s,p+1),s=p+1,t.startsWith(r,s))s+=r.length;p=t.indexOf(`
8
- `,s)}return c+t.slice(s)}function X(t,r,s){let c=0,p=r.length;while(c<p){let i=c+p>>>1;if(r[i].start<s)c=i+1;else p=i}if(c>=r.length)return;if(g=r.slice(c).map(({type:i,value:a,start:u,end:m})=>({type:i,value:a,start:u,end:m})),x=0,P(t,void 0,!1),x<g.length&&(g[x].start>=t.end||t.type==="Program")){t.trailingComments??=[];while(x<g.length)t.trailingComments.push(g[x++])}}var ne=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function D(t,r){for(let s=t;s<r;s++){let c=b.charCodeAt(s);if(c!==44&&c!==41&&c!==32&&c!==9)return!0}return!1}function P(t,r,s){while(x<g.length&&g[x].start<t.start)t.leadingComments??=[],t.leadingComments.push(g[x++]);if(x>=g.length)return;let c=g[x].start;if(c<t.end||!D(t.end,c)){let p=f(t),i=ne.get(t.type),a=i===void 0?void 0:p[i],u=Array.isArray(a)&&a.length===0;for(let m in p){if(x>=g.length)return;if(m==="type")continue;let _=p[m];if(Array.isArray(_)){let v=m===i;for(let w=0;w<_.length;w++){let O=_[w];if(o(O))P(O,t,v?w===_.length-1:u)}}else if(o(_))P(_,t,u)}if(x>=g.length)return}if(r!==void 0&&t.end===r.end)return;if(s)while(x<g.length){if(r&&g[x].start>=r.end)break;t.trailingComments??=[],t.trailingComments.push(g[x++])}else if(t.end<=g[x].start&&!D(t.end,g[x].start))t.trailingComments=[g[x++]]}var B=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" "));var E=!1,y=1,oe=2,ie=32,se=256,ce=y|oe|se,de=2,pe=3,ue=4,me=/\r\n?|\n|\u2028|\u2029/,G=new Map;function S(t){if(!(t instanceof RegExp))return t;let r=G.get(t);if(!r){let s=new Set(t.source.slice(4,-2).split("|"));r={test:(c)=>s.has(c)},G.set(t,r)}return r}var Te=M((t)=>class extends t{declareName(r,s,c){let p=!1;if(s===de){let i=this.currentScope();if(p=l(i.lexical,r)||l(i.functions,r)||l(i.var,r),i.lexical.push(r),this.inModule&&i.flags&y)delete this.undefinedExports[r]}else if(s===ue)this.currentScope().lexical.push(r);else if(s===pe){let i=this.currentScope();p=this.treatFunctionsAsVar?l(i.lexical,r):l(i.lexical,r)||l(i.var,r),i.functions.push(r)}else for(let i=this.scopeStack.length-1;i>=0;--i){let a=this.scopeStack[i];if(l(a.lexical,r)&&!(a.flags&ie&&a.lexical[0]===r)||!this.treatFunctionsAsVarInScope(a)&&l(a.functions,r)){p=!0;break}if(a.var.push(r),this.inModule&&a.flags&y)delete this.undefinedExports[r];if(a.flags&ce)break}if(p)this.raiseRecoverable(c,`Identifier '${r}' has already been declared`)}}),ke=M((t)=>{let{keywordTypes:r,tokTypes:s}=t.acorn,c=new Map("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 const class extends export import super".split(" ").map((i)=>[i,r[i]])),p;return class extends t{constructor(i,a,u){super(i,a,u);this.keywords=S(this.keywords),this.reservedWords=S(this.reservedWords),this.reservedWordsStrict=S(this.reservedWordsStrict),this.reservedWordsStrictBind=S(this.reservedWordsStrictBind),p??=this.context[0]}reset(i,a,u){if(super.reset?.(i,a,u),this.input=i,this.containsEsc=!1,this.pos=a,u)this.lineStart=a-u.column,this.curLine=u.line;else this.lineStart=i.lastIndexOf(`
9
- `,a-1)+1,this.curLine=this.options.locations?i.slice(0,this.lineStart).split(me).length:1;this.type=s.eof,this.value=null,this.start=this.end=a,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=a;let m=this.context;if(m.length!==1||m[0]!==p)this.context=this.initialContext();if(this.exprAllowed=!0,this.strict=!0,this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels.length>0)this.labels=[];for(let w in this.undefinedExports){this.undefinedExports=Object.create(null);break}let _=this.scopeStack,v=_[0];if(_.length!==1||v.flags!==y||v.var.length>0||v.lexical.length>0||v.functions.length>0||v.tsTypes!==void 0||v.tsExportOnly!==void 0||v.tsEnums!==void 0)this.scopeStack=[],this.enterScope(y);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(i,a){let u=super.parseParenAndDistinguishExpression(i,a);if(u.type==="ParenthesizedExpression")E=!0;return u}checkUnreserved(i){if(B.has(i.name))super.checkUnreserved(i)}canInsertSemicolon(){let i=this.type;return i===s.eof||i===s.braceR||V(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let i=this.input,a=this.options.locations,u=this.pos,m=i.charCodeAt(u);for(;;)if(m===32||m===9)m=i.charCodeAt(++u);else if(m===10){if(m=i.charCodeAt(++u),a)this.curLine++,this.lineStart=u}else break;if(this.pos=u,m===47||m<33||m>=128)super.skipSpace()}readWord1(){let i=this.input,a=this.pos,u=a,m=i.charCodeAt(u),_=0;while(m>=97&&m<=122||m>=65&&m<=90||m>=48&&m<=57||m===95||m===36)_=Math.imul(_,31)+m|0,m=i.charCodeAt(++u);if(m>=128||m===92)return super.readWord1();return this.containsEsc=!1,this.pos=u,At(i,a,u,_)}readWord(){let i=this.readWord1();return this.finishToken(c.get(i)??s.name,i)}}}),J=re(Te,ke),he=/ \(\d+:\d+\)$/;function k(t){return t}function q(t){return t instanceof SyntaxError&&"pos"in t&&typeof t.pos==="number"}function C(t,r,s,c,p,i=t.root.comments.length){let a=t.root.comments;j(r,a);let u={onComment:t.comments?K:z,sourceType:"module",ecmaVersion:16,locations:t.loc,preserveParens:c};if(t.lfOnly)u.startLocation=h(s);let m=t.isTypeScript?t.typescript:J;if(!m)te();let _;try{_=p(m,u)}catch(v){if(!q(v))throw v;R(v.pos,v.message.replace(he,""))}if(a.length>i)X(k(_),a,s);return _}function Z(t,r,s=0){return k(C(t,r,0,!1,(c,p)=>{if(s>0&&p.locations)p.startLocation=h(s);let i=new c(p,r,s).parse();return i.start=0,i},0))}function fe(t,r){if(!r)return{line:1,column:0};let{column:s}=h(t);return{line:wt(t-s)+1,column:s}}var we={count:0},A,Ne=(t)=>t.parseExpression();function Ee(t,r,s,c,p){let i=A;if(A=void 0,i?.ParserClass===t&&i.onComment===r.onComment&&i.locations===r.locations&&i.parser.reset)i.parser.reset(s,c,r.startLocation);else i={ParserClass:t,onComment:r.onComment,locations:r.locations,parser:new t(r,s,c)};let a=i.parser;a.nextToken();let u=p(a);return a.input="",A=i,u}function H(t,r,s,c){return we.count+=1,E=!1,C(t,r,s,!0,(p,i)=>(i.startLocation??=fe(s,i.locations),Ee(p,i,r,s,c)))}function N(t,r,s,c=!1){let p=k(H(t,r,s,Ne)),i=Math.max(p.end,U());return{node:E&&!c?T(p):p,end:i}}function gt(t,r,s){let c=t.root.comments.length,p=!0,i=H(t,r,s,(u)=>{let m={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},_=u.parseMaybeConditional(void 0,m);if(u.type!==J.acorn.tokTypes.eof)return p=!1,_;let v=u.toAssignable(_,!1,m);return u.checkLValPattern(v),v});if(!p){t.root.comments.length=c;return}let a=k(i);return E?T(a):a}function bt(t,r,s){return k(C(t,r,s,!1,(c,p)=>{let i=new c(p,r,s);try{return i.nextToken(),i.parseStatement(null,!0,Object.create(null))}catch(a){if(q(a)&&a.pos===r.length)n(r.length);throw a}}))}function St(t,r,s){let c=C(t,r,0,!1,(p,i)=>{let a=new p(i,r,0),u=a.startNode(),m=[],_=Object.create(null);return s((v)=>{a.pos=v,a.context=a.initialContext(),a.exprAllowed=!0,a.nextToken();let w=a.parseStatement(null,!0,_);return m.push(w),w.end}),u.body=m,a.finishNode(u,"Program")});return k(c).body}function T(t){let r=t;while(r.type==="ParenthesizedExpression")r=r.expression;return F(r,T),r}
10
- export{e,Ce,_e,Pe,Ie,Le,Re,$e,Oe,qe,De,ye,Be,Fe,xe,Me,Ve,We,je,ae,ge,ze,be,Ue,Ke,d,Ge,He,Qe,Xe,Ye,Je,Ze,et,tt,Se,it,rt,st,nt,ot,at,le,lt,ct,pt,ve,ut,ht,ft,dt,n,mt,yt,xt,B,Te,ke,Z,N,gt,bt,St};
@@ -1,2 +0,0 @@
1
- var b=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376],p=/[:!]/;function me(e){let n;return()=>(n??=m(e),n)}function m(e){let n=new Map,a=0,t="";for(let u of e.split(" ")){let o=u.search(p);t=t.slice(0,Number.parseInt(u[0],36))+u.slice(1,o);let r=Number.parseInt(u.slice(o+1),36);if(n.set(`${t};`,r),u[o]==="!")n.set(t,r);a=Math.max(a,t.length+1)}return{table:n,longest:a}}var Ee=me("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),l=(e)=>e>=48&&e<=57,E=(e)=>l(e)||e>=65&&e<=70||e>=97&&e<=102,g=(e)=>l(e)||e>=65&&e<=90||e>=97&&e<=122,c=0;function N(e,n,a,t){if(e.charCodeAt(n)===35){let i=(e.charCodeAt(n+1)|32)===120,f=n+(i?2:1),s=f;while(s<e.length&&(i?E:l)(e.charCodeAt(s)))s++;if(s===f)return 0;return c=e.charCodeAt(s)===59?s+1:s,Number.parseInt(e.slice(f,s),i?16:10)}let{table:u,longest:o}=t(),r=n;while(r-n<o&&g(e.charCodeAt(r)))r++;if(e.charCodeAt(r)===59){let i=u.get(e.slice(n,r+1));if(i!==void 0)return c=r+1,i}for(let i=r;i>n;i--){let f=u.get(e.slice(n,i));if(f===void 0)continue;if(a){let s=e.charCodeAt(i);if(g(s)||s===95||s===61)continue}return c=i,f}return 0}function y(e,n){if(e===10&&!n)return 32;if(e<128)return e;if(e<=159)return b[e-128];if(e>=55296&&e<=57343)return 0;if(e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return 0}function A(e,n,a){let t=e.indexOf("&");if(t===-1)return e;let u="",o=0;while(t!==-1){let r=N(e,t+1,n,a);if(r)u+=e.slice(o,t)+String.fromCodePoint(y(r,n)),o=c;t=e.indexOf("&",r?o:t+1)}return u+e.slice(o)}
2
- export{me,Ee,A};
@@ -1,3 +0,0 @@
1
- import{K}from"./shared-stdj6se1.js";import{w,i,t,H,Q,X,D,Y,u,E,J}from"./shared-nbaaegmc.js";import{R}from"./shared-2by923ar.js";var T="{",v=60,C=62,p=47,y=61,b=123,S=/\s*>/y,L=/<\/textarea(\s[^>]*)?>/iy,I=["cript","tyle","velte:options"],O="</svelte:options";function se(e){let r=w(e).trimEnd();return G(r,H(r),null)}function we(e){let r={tags:[],comments:[]};return G(e,!1,r),r}function G(e,r,d){let n={typescript:r,instance:null,module:null,css:null,options:null},o=_(e),s=[],l=0;while(l<=o){let f=e.charCodeAt(l);if(f===v)l=M(e,l,s,n,d);else if(f===b)l=N(e,l,s);else l++}return n}function _(e){let r=-1,d=e.indexOf("<s");while(d!==-1){let n=W(e,d+2);if(n!==-1){let o=e.charCodeAt(n);if(n===e.length||i(o)||o===p||o===C)r=d}d=e.indexOf("<s",d+2)}return r}function W(e,r){for(let d of I)if(e.startsWith(d,r))return r+d.length;return-1}function A(e,r){return Math.min(R(e,r)+1,e.length)}function N(e,r,d){let n=t(e,r+1),o=e.charCodeAt(n),s=e.charCodeAt(n+1);if(o===35||o===58||o===64||o===p&&s!==p&&s!==42){n++;while(n<e.length){let l=e.charCodeAt(n);if(l<97||l>122)break;n++}if(o===35)d.push(T);else if(o===p){let l=d.lastIndexOf(T);if(l!==-1)d.length=l}}return A(e,n)}function M(e,r,d,n,o){if(e.startsWith("!--",r+1)){let h=e.indexOf("-->",r+4),c=h===-1?e.length:h+3;if(o&&d.length===0)o.comments.push(r,c);return c}if(e.charCodeAt(r+1)===p){let h=r+2,c=e.slice(h,E(e,h,!1)),g=d.lastIndexOf(c);if(g!==-1)d.length=g;return x(e,t(e,h+c.length))}let s=e.slice(r+1,E(e,r+1,!1)),l=t(e,r+1+s.length),f=d[d.length-1];if(f!==void 0&&K(f,s))d.pop();let a=d.length===0;if(o&&a&&(s==="script"||s==="style"||s==="svelte:options"))o.tags.push(r);if(a&&(s==="script"||s==="style")){let h=[];if(l=x(e,V(e,l,h)),s==="script"){let g=q(e,r,l,h);if(g.context==="module")n.module??=g;else n.instance??=g;return g.end}let c=B(e,r,l,h);return n.css??=c,c.end}let m=a&&s==="svelte:options"?[]:null;if(l=U(e,l,m),e.charCodeAt(l)===p||D(s)){if(e.charCodeAt(l)===p)l++;l=x(e,l)}else{if(l=x(e,l),s==="textarea")return j(e,l);if(s==="script"||s==="style"){let h=`</${s}>`,c=e.indexOf(h,l);return c===-1?e.length:c+h.length}if(m&&e.startsWith(O,l))l=x(e,t(e,l+O.length));else return d.push(s),l}if(m)n.options??={start:r,end:l,attributes:m};return l}function x(e,r){return e.charCodeAt(r)===C?r+1:r}function q(e,r,d,n){let o=Q(e,d),s=o===-1?e.length:o,l=n.some((f)=>f.name==="module"||f.name==="context");return{start:r,end:o===-1?e.length:X(e,o),context:l?"module":"default",attributes:n,content:{start:d,end:s}}}function B(e,r,d,n){let o=Y(e,d),s=o;if(e.startsWith("</style",s)){s+=7,S.lastIndex=s;let l=S.exec(e);if(l)s+=l[0].length}return{start:r,end:s,attributes:n,content:{start:d,end:o}}}function V(e,r,d){let n=r;for(;;){let o=n,s=E(e,n,!0);if(s===o)return n;n=s;let l=!0;if(e.charCodeAt(n)===y){let f=t(e,n+1),a=e.charCodeAt(f),m=-1;if(u(a)){let c=e.indexOf(e[f],f+1);if(c!==-1)m=c+1}if(m===-1){m=f;while(m<e.length&&e.charCodeAt(m)!==C&&!i(e.charCodeAt(m)))m++}let h=u(a)?1:0;l=e.slice(f+h,m-h),n=m}d.push({name:e.slice(o,s),value:l,start:o,end:n}),n=t(e,n)}}function U(e,r,d){let n=r;for(;;){for(;;){if(e.startsWith("/*",n)){let a=e.indexOf("*/",n+2);n=a===-1?e.length:a+2}else if(e.startsWith("//",n)){let a=e.indexOf(`
2
- `,n+2);n=a===-1?e.length:a}else break;n=t(e,n)}let o=n;if(e.charCodeAt(n)===b){n=t(e,A(e,n+1));continue}let s=E(e,n,!0);if(s===o)return n;let l=s,f=!0;if(n=t(e,s),e.charCodeAt(n)===y){let a=t(e,n+1);l=e.startsWith("/>",a)?a+1:P(e,a),f=u(e.charCodeAt(a))?e.slice(a+1,Math.max(a+1,l-1)):e.slice(a,l),n=t(e,l)}d?.push({name:e.slice(o,s),value:f,start:o,end:l})}}function P(e,r){let d=e.charCodeAt(r);if(u(d)){let o=r+1;while(o<e.length){let s=e.charCodeAt(o);if(s===d)return o+1;o=s===b?A(e,o+1):o+1}return e.length}let n=r;while(n<e.length&&!J(e,n))n=e.charCodeAt(n)===b?A(e,n+1):n+1;return n}function j(e,r){let d=r;while(d<e.length){let n=e.charCodeAt(d);if(n===v){if(L.lastIndex=d,L.test(e))return L.lastIndex}d=n===b?A(e,d+1):d+1}return e.length}
3
- export{se,we};
@@ -1,2 +0,0 @@
1
- var f=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y;function w(n){return n.charCodeAt(0)===65279?n.slice(1):n}function s(n){return n>=48&&n<=57}function i(n){if(n===32||n<=13&&n>=9)return!0;if(n<160)return!1;return n===160||n===5760||n>=8192&&n<=8202||n===8232||n===8233||n===8239||n===8287||n===12288||n===65279}function t(n,r){let e=r;while(e<n.length&&i(n.charCodeAt(e)))e++;return e}function H(n){let r=n.indexOf("<");while(r!==-1){let e=n.charCodeAt(r+1);if(e===33||e===115){f.lastIndex=r;let o=f.exec(n);if(o){if(e===115)return o[2]==="ts";r=n.indexOf("<",f.lastIndex);continue}}r=n.indexOf("<",r+1)}return!1}function Q(n,r){let e=n.indexOf("</script",r);while(e!==-1){if(n.charCodeAt(t(n,e+8))===l)return e;e=n.indexOf("</script",e+8)}return-1}function X(n,r){return t(n,r+8)+1}var x=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));function D(n){return x.has(n)||n.charCodeAt(0)===33&&n.toLowerCase()==="!doctype"}function Y(n,r){let e=r;while(e<n.length){let o=n.charCodeAt(e);if(o===47&&n.charCodeAt(e+1)===42){let a=n.indexOf("*/",e+2);e=a===-1?n.length:a+2}else if(o===34||o===39){e++;while(e<n.length){let a=n.charCodeAt(e);if(a===o||a===10)break;e+=a===92?2:1}e++}else if(o===60&&n.startsWith("</style",e))break;else e++}return Math.min(e,n.length)}var p=34,c=39,h=47,b=61,l=62,u=(n)=>n===p||n===c;function E(n,r,e){let o=r;for(;o<n.length;o++){let a=n.charCodeAt(o);if(i(a)||a===h||a===l)break;if(e&&(u(a)||a===b))break}return o}function J(n,r){let e=n.charCodeAt(r);return i(e)||u(e)||e===b||e===60||e===l||e===96||e===h&&n.charCodeAt(r+1)===l}
2
- export{w,s,i,t,H,Q,X,D,Y,u,E,J};