sveast 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/core.js +1 -1
- package/entities.js +1 -1
- package/index.d.ts +25 -0
- package/index.js +1 -1
- package/lexer.d.ts +25 -0
- package/lexer.js +3 -2
- package/module.js +1 -1
- package/package.json +1 -1
- package/parse-imports-exports.js +1 -1
- package/parse-module.js +1 -1
- package/parse-sections.js +1 -1
- package/parse.js +1 -1
- package/runes.js +1 -1
- package/shared-00hyas4z.js +2 -0
- package/shared-4y1phpr0.js +3 -0
- package/{shared-bxg3hhpk.js → shared-5kdpxrm3.js} +3 -3
- package/shared-a454y0yc.js +2 -0
- package/{shared-wentwa9g.js → shared-fcgh2ks8.js} +2 -2
- package/{shared-1qapk0wt.js → shared-ff56bedk.js} +2 -2
- package/{shared-g9knrb0x.js → shared-r6mb2ytj.js} +1 -1
- package/shared-t30czg6b.js +2 -0
- package/{shared-pnv8wmzz.js → shared-tgpdmrqm.js} +1 -1
- package/shared-wkbh341y.js +2 -0
- package/{shared-4gksznp7.js → shared-x7fez4k2.js} +2 -2
- package/{shared-25z9p1fv.js → shared-yxr92tk5.js} +6 -6
- package/typescript.js +1 -1
- package/walk.js +1 -1
- package/shared-96tm9k91.js +0 -2
- package/shared-r8yddmex.js +0 -2
- package/shared-rf0vnv09.js +0 -2
- package/shared-rfa6cx21.js +0 -3
- package/shared-yqw5faw6.js +0 -2
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ ast.fragment.nodes; // [Text, RegularElement]
|
|
|
27
27
|
| [`parseImportsExports`](#parseimportsexportssource-options--moduledeclaration) | A module's `import` and `export` statements, without parsing the rest | `sveast` |
|
|
28
28
|
| [`lexImportsExports`](#leximportsexportssource--lexedstatement) | Their offsets, sources and names, without loading a parser | `sveast/lexer` |
|
|
29
29
|
| [`lexComponent`](#lexcomponentsource--lexedcomponent) | A component's `<script>`s, `<style>` and `<svelte:options>`, with their attributes and offsets, without loading a parser | `sveast/lexer` |
|
|
30
|
+
| [`lexStrings`](#lexstringssource--lexedstring) | A module's string and template literals, with their offsets and values, without loading a parser | `sveast/lexer` |
|
|
30
31
|
| [`createParser`, `createModuleParser`](#smaller-bundles-sveastcore-and-sveastmodule) | The parsers without TypeScript, named HTML entities or the template parser, for a smaller bundle | `sveast/core`, `sveast/module` |
|
|
31
32
|
| [`isValidType`](#isvalidtypetext-options--boolean) | Whether a JSDoc type is safe to copy into a `.d.ts` | `sveast` |
|
|
32
33
|
| [`isRunesMode`](#isrunesmodesource--boolean) | Whether svelte compiles a component in runes mode, mostly without parsing it | `sveast` |
|
|
@@ -229,6 +230,24 @@ async function parseComponent(source: string) {
|
|
|
229
230
|
}
|
|
230
231
|
```
|
|
231
232
|
|
|
233
|
+
### `lexStrings(source) => LexedString[]`
|
|
234
|
+
|
|
235
|
+
From `sveast/lexer`, and also `sveast`. A module's string literals and the text of its template literals, in source order, read without parsing, for a tool that only needs a script's strings, such as one that collects the class names a component's script can produce. With `parse(source, { script: false })` for the markup, it reads a component's scripts in a fraction of the time: on Carbon's 258 components, `parse` with `comments: false` takes 19.5 ms, and `script: false` plus `lexStrings` on each script 9.6 ms, of which `lexStrings` is 1.55 ms, 15% of what `parseModule` takes on the same scripts.
|
|
236
|
+
|
|
237
|
+
Where `parseModule` accepts the module, the strings are its `Literal`s with a string value and its `TemplateElement`s, types, imports and directives included, with the same offsets and values. Comments and regular expressions are skipped, and it never throws. It tells a regular expression from a division by the token before it, as acorn's tokenizer does, but acorn's parser can overrule that guess and `lexStrings` can't: a statement that starts with a regular expression after a line break without a `;`, following `let a`, an `import`, a type alias ending in `}`, or a block after `case …:` or a label, reads as a division, as does `/` after a variable named `of`, and a quote in that regular expression starts a string. It matched `parseModule` on all 21,443 modules and component scripts it accepts from the projects under [Parity and performance](#parity-and-performance), and on all 9,647 of TypeScript's conformance tests that `parseModule` accepts.
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
import { lexStrings } from "sveast/lexer";
|
|
241
|
+
|
|
242
|
+
for (const string of lexStrings(source)) {
|
|
243
|
+
string.kind; // "string", a Literal: start and end include the quotes
|
|
244
|
+
// "template", a TemplateElement: the text between the backtick, `${` or `}` around it
|
|
245
|
+
string.value; // escapes decoded, as Literal's value or TemplateElement's value.cooked
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
`value` is `null` for an escape acorn rejects in a module, such as `"\1"`, or one that leaves a tagged template's `cooked` `null`. A template's line breaks read as `\n` in `value`; its raw text is `source.slice(start, end)`, with `\r\n` and `\r` as `\n`.
|
|
250
|
+
|
|
232
251
|
### Smaller bundles: `sveast/core` and `sveast/module`
|
|
233
252
|
|
|
234
253
|
`createParser(support?)` from `sveast/core` returns `parse`, `parseModule` and `parseImportsExports` without the TypeScript parser and the table of HTML's named character references, which most tools can do without. `createModuleParser(support?)` from `sveast/module` returns `parseModule` and `parseImportsExports` without the template parser either, for tools that read `.js` and `.ts` files but never components, such as a bundler plugin following a module graph. Pass back the parts you need; with them, the parsers are the same as `sveast`'s.
|
package/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-40v3xx3k.js";import"./shared-
|
|
1
|
+
import"./shared-40v3xx3k.js";import"./shared-5kdpxrm3.js";import"./shared-zd01zsyh.js";import{e}from"./shared-yxr92tk5.js";import{me}from"./shared-k5pfyxpa.js";import{D}from"./shared-x7fez4k2.js";import"./shared-4y1phpr0.js";import{g}from"./shared-t30czg6b.js";import{b}from"./shared-a454y0yc.js";import{U,ut}from"./shared-fcgh2ks8.js";function u(o={}){let p=U(o.typescript),s={typescript:p,entityNames:ut(o.entities)??me};return{parse:(t,r)=>D(t,r,s),parseModule:(t,r={})=>g(t,r,p),parseImportsExports:(t,r={})=>b(t,r,p)}}export{e as ParseError,u as createParser};
|
package/entities.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-k5pfyxpa.js";import{x}from"./shared-3yc3kmnb.js";import{
|
|
1
|
+
import"./shared-k5pfyxpa.js";import{x}from"./shared-3yc3kmnb.js";import{ht}from"./shared-fcgh2ks8.js";var p=ht(x);export{p as entities};
|
package/index.d.ts
CHANGED
|
@@ -82,6 +82,18 @@ export interface LexedExport extends LexedStatementBase {
|
|
|
82
82
|
|
|
83
83
|
export type LexedStatement = LexedImport | LexedExport;
|
|
84
84
|
|
|
85
|
+
/** A string literal, or the text of a template literal between two of its delimiters. */
|
|
86
|
+
export interface LexedString {
|
|
87
|
+
/** `"string"` for a string literal, where `parseModule` has a `Literal`; `"template"` for a template's text, where it has a `TemplateElement`. */
|
|
88
|
+
kind: "string" | "template";
|
|
89
|
+
/** The value with escapes decoded, as a `Literal`'s `value` or a `TemplateElement`'s `value.cooked`: a template's line breaks read as `\n`. `null` for an escape that acorn rejects in a module, or that leaves a tagged template's `cooked` `null`. */
|
|
90
|
+
value: string | null;
|
|
91
|
+
/** The offset of the opening quote, or of a template's text, after its backtick or `}`. */
|
|
92
|
+
start: number;
|
|
93
|
+
/** The offset after the closing quote, or of the backtick or `${` after a template's text. */
|
|
94
|
+
end: number;
|
|
95
|
+
}
|
|
96
|
+
|
|
85
97
|
/**
|
|
86
98
|
* A module's top-level `import` statements and `export … from`
|
|
87
99
|
* re-exports, read without a parser: each statement's offsets, its
|
|
@@ -95,6 +107,19 @@ export type LexedStatement = LexedImport | LexedExport;
|
|
|
95
107
|
*/
|
|
96
108
|
export declare function lexImportsExports(source: string): LexedStatement[];
|
|
97
109
|
|
|
110
|
+
/**
|
|
111
|
+
* A module's string literals and the text of its template literals, in
|
|
112
|
+
* source order, read without a parser: the offsets and value of each
|
|
113
|
+
* `Literal` with a string value and each `TemplateElement` that
|
|
114
|
+
* {@link parseModule} returns, for a tool that only needs a script's
|
|
115
|
+
* strings, such as one that looks for class names. Comments and regular
|
|
116
|
+
* expressions are skipped, as `parseModule` skips them. It tells a regular
|
|
117
|
+
* expression from a division by the token before it, as acorn's tokenizer
|
|
118
|
+
* does, and doesn't check syntax, so it never throws. A template's raw
|
|
119
|
+
* text is `source.slice(start, end)`, with `\r\n` and `\r` as `\n`.
|
|
120
|
+
*/
|
|
121
|
+
export declare function lexStrings(source: string): LexedString[];
|
|
122
|
+
|
|
98
123
|
/** An attribute of a top-level `<script>`, `<style>` or `<svelte:options>`. */
|
|
99
124
|
export interface LexedAttribute {
|
|
100
125
|
name: string;
|
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isValidType as t}from"./is-valid-type.js";import{lexComponent as p,lexImportsExports as s}from"./lexer.js";import{parse as
|
|
1
|
+
import{isValidType as t}from"./is-valid-type.js";import{lexComponent as p,lexImportsExports as s,lexStrings as x}from"./lexer.js";import{parse as m}from"./parse.js";import{parseImportsExports as f}from"./parse-imports-exports.js";import{ParseError as a,parseModule as y}from"./parse-module.js";import{parseSections as S}from"./parse-sections.js";import{isRunesMode as c}from"./runes.js";import{createLocator as u,extractIdentifiers as E,isReference as P,markupVisitorKeys as O,SKIP as K,STOP as V,visitorKeys as k,walk as C}from"./walk.js";export{a as ParseError,K as SKIP,V as STOP,u as createLocator,E as extractIdentifiers,P as isReference,c as isRunesMode,t as isValidType,p as lexComponent,s as lexImportsExports,x as lexStrings,O as markupVisitorKeys,m as parse,f as parseImportsExports,y as parseModule,S as parseSections,k as visitorKeys,C as walk};
|
package/lexer.d.ts
CHANGED
|
@@ -65,6 +65,18 @@ export interface LexedExport extends LexedStatementBase {
|
|
|
65
65
|
|
|
66
66
|
export type LexedStatement = LexedImport | LexedExport;
|
|
67
67
|
|
|
68
|
+
/** A string literal, or the text of a template literal between two of its delimiters. */
|
|
69
|
+
export interface LexedString {
|
|
70
|
+
/** `"string"` for a string literal, where `parseModule` has a `Literal`; `"template"` for a template's text, where it has a `TemplateElement`. */
|
|
71
|
+
kind: "string" | "template";
|
|
72
|
+
/** The value with escapes decoded, as a `Literal`'s `value` or a `TemplateElement`'s `value.cooked`: a template's line breaks read as `\n`. `null` for an escape that acorn rejects in a module, or that leaves a tagged template's `cooked` `null`. */
|
|
73
|
+
value: string | null;
|
|
74
|
+
/** The offset of the opening quote, or of a template's text, after its backtick or `}`. */
|
|
75
|
+
start: number;
|
|
76
|
+
/** The offset after the closing quote, or of the backtick or `${` after a template's text. */
|
|
77
|
+
end: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
68
80
|
/**
|
|
69
81
|
* A module's top-level `import` statements and `export … from`
|
|
70
82
|
* re-exports, read without a parser: each statement's offsets, its
|
|
@@ -78,6 +90,19 @@ export type LexedStatement = LexedImport | LexedExport;
|
|
|
78
90
|
*/
|
|
79
91
|
export declare function lexImportsExports(source: string): LexedStatement[];
|
|
80
92
|
|
|
93
|
+
/**
|
|
94
|
+
* A module's string literals and the text of its template literals, in
|
|
95
|
+
* source order, read without a parser: the offsets and value of each
|
|
96
|
+
* `Literal` with a string value and each `TemplateElement` that
|
|
97
|
+
* {@link parseModule} returns, for a tool that only needs a script's
|
|
98
|
+
* strings, such as one that looks for class names. Comments and regular
|
|
99
|
+
* expressions are skipped, as `parseModule` skips them. It tells a regular
|
|
100
|
+
* expression from a division by the token before it, as acorn's tokenizer
|
|
101
|
+
* does, and doesn't check syntax, so it never throws. A template's raw
|
|
102
|
+
* text is `source.slice(start, end)`, with `\r\n` and `\r` as `\n`.
|
|
103
|
+
*/
|
|
104
|
+
export declare function lexStrings(source: string): LexedString[];
|
|
105
|
+
|
|
81
106
|
/** An attribute of a top-level `<script>`, `<style>` or `<svelte:options>`. */
|
|
82
107
|
export interface LexedAttribute {
|
|
83
108
|
name: string;
|
package/lexer.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import{r,W,u,m,_}from"./shared-
|
|
2
|
-
|
|
1
|
+
import{r,W,ye,u,m,_}from"./shared-4y1phpr0.js";import"./shared-40v3xx3k.js";import{H}from"./shared-tgpdmrqm.js";function g(e){let t=new f(e),o=[];return W(e,!1,(n,s)=>{let i=t.statement(s);return o.push(i),i.end}),o}function k(e){let t=new f(e),o=[];return ye(e,(n,s,i)=>{o.push(i?{kind:"template",value:t.cooked(n,s,!0),start:n,end:s}:{kind:"string",value:t.cooked(n+1,s-1,!1),start:n,end:s})}),o}class f{source;pos=0;end=0;escapeEnd=0;constructor(e){this.source=e}statement(e){this.pos=this.end=e+6;let t=this.source.charCodeAt(e)===105?{kind:"import",start:e,end:0,source:null,typeOnly:!1,specifiers:[]}:{kind:"export",start:e,end:0,source:null,typeOnly:!1,specifiers:[]};if(!(t.kind==="import"?this.import(t):this.export(t)))t.source=null,t.specifiers=[];return t.end=this.end,t}import(e){let t=this.string();if(t!==null)return e.source=t,this.finish();if(this.isWord("type")){let i=this.peek(4);if(i===123||i===42||d(i)&&!this.isWordAfter(4,"from"))e.typeOnly=!0,this.advance(4)}let{specifiers:o,typeOnly:n}=e,s=this.at();if(s!==123&&s!==42){let i=this.pos,a=this.name();if(a===null)return!1;if(this.at()===61)return this.importEquals();if(o.push({kind:"default",imported:"default",local:a,typeOnly:n,start:i,end:this.end}),!this.eat(44))return this.from(e);s=this.at()}if(s===42){let i=this.pos;if(this.advance(1),!this.eatWord("as"))return!1;let a=this.name();if(a===null)return!1;return o.push({kind:"namespace",imported:"*",local:a,typeOnly:n,start:i,end:this.end}),this.from(e)}if(!this.eat(123))return!1;while(!this.eat(125)){let i=this.skip(),a=this.typeModifier()||n,l=this.name(),c=l??this.string()?.value;if(c===void 0)return!1;let h=l;if(this.eatWord("as"))h=this.name();if(h===null)return!1;if(o.push({kind:"named",imported:c,local:h,typeOnly:a,start:i,end:this.end}),!this.eat(44)&&this.at()!==125)return!1}return this.from(e)}export(e){if(this.eatWord("import")){if(this.isWord("type")&&d(this.peek(4))&&!this.isWordAfter(4,"from"))e.typeOnly=!0,this.advance(4);return this.name()!==null&&this.at()===61&&this.importEquals()}if(this.isWord("type")){let n=this.peek(4);if(n===123||n===42)e.typeOnly=!0,this.advance(4)}let{specifiers:t,typeOnly:o}=e;if(this.at()===42){let n=this.pos;this.advance(1);let s=null;if(this.eatWord("as")){if(s=this.moduleExportName(),s===null)return!1}return t.push({kind:s===null?"all":"namespace",local:"*",exported:s,typeOnly:o,start:n,end:this.end}),this.from(e)}if(!this.eat(123))return!1;while(!this.eat(125)){let n=this.skip(),s=this.typeModifier()||o,i=this.moduleExportName();if(i===null)return!1;let a=i;if(this.eatWord("as"))a=this.moduleExportName();if(a===null)return!1;if(t.push({kind:"named",local:i,exported:a,typeOnly:s,start:n,end:this.end}),!this.eat(44)&&this.at()!==125)return!1}return this.from(e)}typeModifier(){if(!this.isWord("type"))return!1;let e=this.peek(4);if(e===34||e===39||d(e)&&!this.isWordAfter(4,"as"))return this.advance(4),!0;return!1}importEquals(){if(this.advance(1),this.isWord("require")&&this.peek(7)===40){if(this.advance(7),this.eat(40),this.string()===null||!this.eat(41))return!1}else do if(this.name()===null)return!1;while(this.eat(46));return this.eat(59),!0}from(e){if(!this.eatWord("from"))return!1;return e.source=this.string(),e.source!==null&&this.finish()}finish(){let e=this.isWord("with")?4:0;if(this.isWord("assert")&&!x(this.source,this.end,this.pos))e=6;if(e!==0&&this.peek(e)===123){this.advance(e),this.eat(123);while(!this.eat(125))if(this.string()===null&&this.name()===null&&!this.eat(58)&&!this.eat(44))return!1}return this.eat(59),!0}skip(){return this.pos=m(this.source,this.pos),this.pos}at(){return this.source.charCodeAt(this.skip())}advance(e){this.pos+=e,this.end=this.pos}peek(e){return this.source.charCodeAt(m(this.source,this.pos+e))}isWordAfter(e,t){return _(this.source,m(this.source,this.pos+e),t)}eat(e){if(this.at()!==e)return!1;return this.advance(1),!0}isWord(e){return _(this.source,this.skip(),e)}eatWord(e){if(!this.isWord(e))return!1;return this.advance(e.length),!0}moduleExportName(){return this.name()??this.string()?.value??null}name(){let e=this.source,t=this.skip();if(!r(e.charCodeAt(t))||u(e.charCodeAt(t)))return null;let o="",n=t,s=t;while(s<e.length){let i=e.charCodeAt(s);if(i===92){if(e.charCodeAt(s+1)!==117)return null;let a=this.unicodeEscape(s+2);if(a===null)return null;o+=e.slice(n,s)+a,s=n=this.escapeEnd}else if(r(i))s++;else break}return this.advance(s-t),o+e.slice(n,s)}string(){let e=this.source,t=this.skip(),o=e.charCodeAt(t);if(o!==34&&o!==39)return null;let n="",s=t+1;for(let i=s;i<e.length;){let a=e.charCodeAt(i);if(a===o)return this.advance(i+1-t),{value:n+e.slice(s,i),start:t,end:i+1};if(a===10||a===13)return null;if(a===92){let l=this.escape(i+1);if(l===null)return null;n+=e.slice(s,i)+l,i=s=this.escapeEnd}else i++}return null}cooked(e,t,o){let n=this.source,s="",i=e;for(let a=e;a<t;){let l=n.charCodeAt(a);if(l===92){let c=this.escape(a+1);if(c===null)return null;s+=n.slice(i,a)+c,a=i=this.escapeEnd}else if(l===13&&o)s+=`${n.slice(i,a)}
|
|
2
|
+
`,a+=n.charCodeAt(a+1)===10?2:1,i=a;else a++}return s+n.slice(i,t)}escape(e){let t=this.source.charCodeAt(e);switch(this.escapeEnd=e+1,t){case 110:return`
|
|
3
|
+
`;case 114:return"\r";case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 48:return u(this.source.charCodeAt(e+1))?null:"\x00";case 120:return this.hexEscape(e+1,2);case 117:return this.unicodeEscape(e+1);case 13:if(this.source.charCodeAt(e+1)===10)this.escapeEnd++;return"";case 10:case 8232:case 8233:return"";default:return u(t)||e>=this.source.length?null:String.fromCharCode(t)}}unicodeEscape(e){if(this.source.charCodeAt(e)!==123)return this.hexEscape(e,4);let t=0,o=e+1;for(;this.source.charCodeAt(o)!==125;o++){let n=p(this.source.charCodeAt(o));if(n===-1)return null;if(t=t*16+n,t>1114111)return null}if(o===e+1)return null;return this.escapeEnd=o+1,String.fromCodePoint(t)}hexEscape(e,t){let o=0;for(let n=e;n<e+t;n++){let s=p(this.source.charCodeAt(n));if(s===-1)return null;o=o*16+s}return this.escapeEnd=e+t,String.fromCharCode(o)}}function d(e){return e!==92&&r(e)&&!u(e)}function p(e){if(u(e))return e-48;let t=e|32;return t>=97&&t<=102?t-87:-1}function x(e,t,o){for(let n=t;n<o;n++){let s=e.charCodeAt(n);if(s===10||s===13||s===8232||s===8233)return!0}return!1}export{H as lexComponent,g as lexImportsExports,k as lexStrings};
|
package/module.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-zd01zsyh.js";import"./shared-
|
|
1
|
+
import"./shared-zd01zsyh.js";import"./shared-5kdpxrm3.js";import{e}from"./shared-yxr92tk5.js";import"./shared-4y1phpr0.js";import{g}from"./shared-t30czg6b.js";import{b}from"./shared-a454y0yc.js";import{U}from"./shared-fcgh2ks8.js";function m(t={}){let p=U(t.typescript);return{parseModule:(r,o={})=>g(r,o,p),parseImportsExports:(r,o={})=>b(r,o,p)}}export{e as ParseError,m as createModuleParser};
|
package/package.json
CHANGED
package/parse-imports-exports.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-zd01zsyh.js";import"./shared-
|
|
1
|
+
import"./shared-zd01zsyh.js";import"./shared-5kdpxrm3.js";import"./shared-yxr92tk5.js";import"./shared-4y1phpr0.js";import"./shared-np5jnnrw.js";import{a}from"./shared-00hyas4z.js";import{b}from"./shared-a454y0yc.js";function s(r,t={}){return b(r,t,a)}export{s as parseImportsExports};
|
package/parse-module.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-zd01zsyh.js";import"./shared-
|
|
1
|
+
import"./shared-zd01zsyh.js";import"./shared-5kdpxrm3.js";import{e}from"./shared-yxr92tk5.js";import"./shared-np5jnnrw.js";import{a}from"./shared-00hyas4z.js";import{g}from"./shared-t30czg6b.js";function s(r,o={}){return g(r,o,a)}export{e as ParseError,s as parseModule};
|
package/parse-sections.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ee}from"./shared-
|
|
1
|
+
import{ee}from"./shared-r6mb2ytj.js";import"./shared-tgpdmrqm.js";import"./shared-3yc3kmnb.js";import"./shared-00hyas4z.js";import"./shared-np5jnnrw.js";import"./shared-x7fez4k2.js";import"./shared-k5pfyxpa.js";import"./shared-40v3xx3k.js";import"./shared-4y1phpr0.js";import"./shared-yxr92tk5.js";import"./shared-5kdpxrm3.js";import"./shared-zd01zsyh.js";export{ee as parseSections};
|
package/parse.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z}from"./shared-
|
|
1
|
+
import{Z}from"./shared-wkbh341y.js";import"./shared-3yc3kmnb.js";import"./shared-00hyas4z.js";import"./shared-np5jnnrw.js";import"./shared-x7fez4k2.js";import"./shared-k5pfyxpa.js";import"./shared-40v3xx3k.js";import"./shared-yxr92tk5.js";import"./shared-5kdpxrm3.js";import"./shared-zd01zsyh.js";export{Z as parse};
|
package/runes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s}from"./shared-40v3xx3k.js";import{r,N}from"./shared-
|
|
1
|
+
import{s}from"./shared-40v3xx3k.js";import{r,N}from"./shared-4y1phpr0.js";import"./shared-5kdpxrm3.js";import"./shared-zd01zsyh.js";import"./shared-yxr92tk5.js";import"./shared-k5pfyxpa.js";import"./shared-x7fez4k2.js";import"./shared-np5jnnrw.js";import{Z}from"./shared-wkbh341y.js";import{ee}from"./shared-r6mb2ytj.js";import{w,G,d,O}from"./shared-ff56bedk.js";import{H}from"./shared-tgpdmrqm.js";import"./shared-3yc3kmnb.js";import"./shared-00hyas4z.js";var C=new Set(["$state","$state.raw","$derived","$derived.by","$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"]),S=new Set(["$state","$derived","$props","$bindable","$effect","$inspect","$host"]),b=/(?<![\w$])(?:\$(?:state|derived|props|bindable|effect|inspect|host)(?![\w$])|await(?![\w$]))|\\u/g,D=/^\{\s*(true|false)\s*\}$/;function z(e){let l=H(e),n=l.options?.attributes.find((u)=>u.name==="runes"),i=n&&I(n);if(i!==void 0)return i;let t=e.charCodeAt(0)===65279?e.slice(1):e,a=[l.instance,l.module].flatMap((u)=>u?[u.content]:[]),p=!1,c=!1;b.lastIndex=0;for(let u=b.exec(t);u!==null&&!c;u=b.exec(t)){let h=u.index;p=!0,c=!a.some(({start:E,end:v})=>h>=E&&h<v)}if(!p)return!1;if(n===void 0&&!t.includes("\\u")&&R(t,a))return!0;let o={css:!1,comments:!1},f=c?Z(e,o):ee(e,o);if(f.options?.runes!==void 0)return f.options.runes;return L(f)}function I(e){if(e.value===!0)return!0;let l=D.exec(e.value);return l?l[1]==="true":void 0}var M=new Map([...S].map((e)=>[e,new RegExp(`(?<![\\w$.])${e.slice(1)}(?![\\w$])`)])),F=new Set("abstract accessor as async class const declare enum export extends function get implements import infer interface is keyof let module namespace new override private protected public readonly satisfies set static type typeof unique var".split(" "));function R(e,l){let n=new Map;for(let{start:i,end:t}of l){let a=e.slice(0,t);if(N(a,i,(c,o)=>{if(a.charCodeAt(c)!==36)return!1;let f=a.slice(c,o);if(S.has(f)&&n.get(f)!==!1)n.set(f,T(a,c,o));return!1})!==a.length)return!1}for(let[i,t]of n)if(t&&!M.get(i)?.test(e))return!0;return!1}function T(e,l,n){let i=l-1;while(i>=0&&s(e.charCodeAt(i)))i--;let t=e.charCodeAt(i);if(t===35||t===42||t===46||t===58||t===60||t===64)return!1;if(r(t)){let o=i;while(o>0&&r(e.charCodeAt(o-1)))o--;if(F.has(e.slice(o,i+1)))return!1}let a=y(e,n);while(e.charCodeAt(a)===46){let o=y(e,a+1),f=o;while(r(e.charCodeAt(f)))f++;if(f===o)return!1;a=y(e,f)}if(e.charCodeAt(a)===60){if(a=k(e,a),a===-1)return!1;a=y(e,a)}if(e.charCodeAt(a)!==40)return!1;let p=N(e,a+1);if(e.charCodeAt(p)!==41)return!1;let c=e.charCodeAt(y(e,p+1));return c!==123&&c!==58}function y(e,l){let n=l;while(n<e.length&&s(e.charCodeAt(n)))n++;return n}function k(e,l){let n=0,i=Math.min(e.length,l+2000);for(let t=l;t<i;t++){let a=e.charCodeAt(t);if(a===34||a===39||a===96||a===47)return-1;if(a===60)n++;else if(a===62&&e.charCodeAt(t-1)!==61){if(n--,n===0)return t+1}}return-1}function L(e){let l=e.module?.content,n=e.instance?.content,i=new Map;if(n)A(n,i,!0);let t=new Map;if(l)A(l,t,!1);for(let[c,o]of t)if(!i.has(c))i.set(c,o);let a=[],p=(c)=>{if(!a.includes(c))a.push(c)};if(l)x(l,t,p);if(n&&x(n,i,p))return!0;if(x(e.fragment,i,p))return!0;for(let c of a){let o=c.slice(1);if(!i.has(o))return!0;let f=i.get(o)??null,u=P(f,i);if(!((u===null||o!=="props"&&u==="$props")&&!(c==="$derived"&&f?.type==="ImportDeclaration"&&f.source.value==="svelte/store")))return!0;i.set(c,null)}return!1}function x(e,l,n){let i=[],t=new Map,a=(o)=>S.has(o)&&!l.has(o)&&!i.some((f)=>_(f,t).has(o)),p=0,c=!1;return O(e,{enter(o,f){if(m(o))p++;else if(o.type==="AwaitExpression")c||=p===0;let u;if(o.type==="Identifier"&&f&&!f.type.startsWith("TS")&&G(o,f))u=o.name;else if(o.type==="TransitionDirective"||o.type==="AnimateDirective"||o.type==="UseDirective")u=o.name.split(".")[0];else if(o.type==="StyleDirective"&&o.value===!0)u=o.name;if(u!==void 0&&a(u))n(u);i.push(o)},leave(o){if(i.pop(),m(o))p--}}),c}var g=new Set;function _(e,l){let n=l.get(e);if(n)return n;let i=[];if(m(e)){if(i.push(...e.params),e.type==="FunctionExpression"&&e.id)i.push(e.id)}else if(e.type==="CatchClause"&&e.param)i.push(e.param);else if(e.type==="SnippetBlock")i.push(...e.parameters??[]);else if(e.type==="EachBlock"&&e.context)i.push(e.context);if(i.length===0&&!m(e))return l.set(e,g),g;if(n=new Set(i.flatMap((t)=>w(t)).map((t)=>t.name)),m(e)){let{body:t}=e;O(t,{enter(a){if(a===t)return;if(a.type==="VariableDeclaration")for(let p of a.declarations)for(let c of w(p.id))n?.add(c.name);else if((a.type==="FunctionDeclaration"||a.type==="ClassDeclaration")&&a.id)n?.add(a.id.name);return m(a)?d:void 0}})}return l.set(e,n),n}function m(e){return e.type==="ArrowFunctionExpression"||e.type==="FunctionExpression"||e.type==="FunctionDeclaration"}function A(e,l,n){let i=[];O(e,{enter(t,a){if(m(t)&&t.type!=="FunctionDeclaration")return d;let p=a===e||a?.type==="ExportNamedDeclaration"||a?.type==="ExportDefaultDeclaration";if(t.type==="ImportDeclaration"){for(let c of t.specifiers)l.set(c.local.name,t);return d}if(t.type==="FunctionDeclaration"||t.type==="ClassDeclaration"){if(p&&t.id)l.set(t.id.name,t);return d}if(t.type==="VariableDeclaration"){if(t.kind!=="var"&&!p)return d;for(let c of t.declarations)for(let o of w(c.id))l.set(o.name,p?c.init??null:null);return d}if(n&&a===e&&t.type==="LabeledStatement"&&t.label.name==="$"&&t.body.type==="ExpressionStatement"&&t.body.expression.type==="AssignmentExpression"){for(let c of w(t.body.expression.left))if(!c.name.startsWith("$"))i.push(c)}return}});for(let t of i)if(!l.has(t.name))l.set(t.name,null)}function P(e,l){if(e?.type!=="CallExpression")return null;let n=e.callee,i="";while(n.type==="MemberExpression"){if(n.computed||n.property.type!=="Identifier")return null;i=`.${n.property.name}${i}`,n=n.object}if(n.type==="CallExpression"&&n.callee.type==="Identifier")i=`()${i}`,n=n.callee;if(n.type!=="Identifier"||l.has(n.name))return null;return i=n.name+i,C.has(i)?i:null}export{z as isRunesMode};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var H={await:1,case:1,default:1,delete:1,extends:1,in:1,instanceof:1,new:1,of:1,return:1,throw:1,typeof:1,void:1,yield:1,do:2,else:2,finally:2,try:2,for:4,if:4,while:4,with:4,import:5,export:6};var L=Array(g(128,0)).fill(null);for(let e of Object.entries(H)){let A=g(e[0].charCodeAt(0),e[0].length),t=L[A]??[];t.push(e),L[A]=t}function g(e,A){return e*11+A}function V(e,A,t){let a=e.charCodeAt(A);if(a>=128||t-A>10)return 3;let E=g(a,t-A),n=L[E];if(n===null)return 3;for(let o=0;o<n.length;o++)if(e.startsWith(n[o][0],A))return n[o][1];return 3}var x=/\s/,D=new Uint8Array(128);for(let e of["az","AZ","09","__","$$","\\\\"])for(let A=e.charCodeAt(0);A<=e.charCodeAt(1);A++)D[A]=1;function r(e){return e>=128?!x.test(String.fromCharCode(e)):D[e]===1}function T(e){return e<128?e===32||e>=9&&e<=13:x.test(String.fromCharCode(e))}function W(e,A,t){K(e,v(e,A),A,t,void 0)}function ye(e,A){K(e,e.length-1,!1,void 0,A)}function K(e,A,t,a,E){let n=e.length,o=[],i=e.startsWith("#!")?b(e,2):0,O=0,d=!1,R=!1,s=-1,h=()=>{if(O=0,o.length===0)s=-1};while(i<=A){let c=e.charCodeAt(i);if(c===32||c===10||T(c)){i++;continue}if(c===47){let f=e.charCodeAt(i+1);if(f===47){i=b(e,i+2);continue}if(f===42){let l=e.indexOf("*/",i+2);i=l===-1?n:l+2;continue}}let M=d,y=R;if(d=!1,R=!1,r(c)||c===35){let f=i;i++;while(i<n){let U=e.charCodeAt(i);if(U===92)i+=2;else if(r(U))i++;else break}let l=M?3:V(e,f,i);if(a!==void 0&&o.length===0&&(l===6?t||B(e,i):l===5&&w(e,i)))i=Math.max(i,a(s!==-1&&l===6?s:f,f)),h();else if(l===6)O=2;else if(l===4)R=!0,O=3;else O=l===1||l===2?l:3;continue}switch(i++,c){case 34:case 39:{let f=i-1;i=k(e,i,c),E?.(f,i,!1),O=3;break}case 96:{let f=i;i=C(e,i,o),E?.(f,p(e,i),!0),O=e.charCodeAt(i-1)===123?1:3;break}case 47:{let f=O===3?-1:S(e,i);if(f===-1)O=1;else{i=f;while(i<n&&r(e.charCodeAt(i)))i++;O=3}break}case 40:o.push(y?1:0),O=1;break;case 41:O=o.pop()===1?2:3;break;case 123:o.push(O===1?3:2),O=0;break;case 125:{let f=o.pop();if(f===4){let l=i;i=C(e,i,o),E?.(l,p(e,i),!0),O=e.charCodeAt(i-1)===123?1:3}else if(f===3)O=3;else h();break}case 59:h();break;case 93:O=3;break;case 46:if(u(e.charCodeAt(i))){while(i<n&&r(e.charCodeAt(i)))i++;O=3}else if(e.startsWith("..",i))i+=2,O=1;else d=!0,O=1;break;case 63:if(e.charCodeAt(i)===46&&!u(e.charCodeAt(i+1)))i++,d=!0;O=1;break;case 33:O=O===3&&!T(e.charCodeAt(i-2))?3:1;break;case 43:case 45:if(e.charCodeAt(i)===c&&O===3)i++;else O=1;break;case 61:if(O=e.charCodeAt(i)===62?2:1,O===2)i++;break;case 64:if(o.length===0&&s===-1)s=i-1;O=1;break;default:O=1}}}function N(e,A,t){let a=e.length,E=[],n=A,o=1,i=!1;while(n<a){let O=e.charCodeAt(n);if(O===32||O===10||T(O)){n++;continue}if(O===47){let R=e.charCodeAt(n+1);if(R===47){n=b(e,n+2);continue}if(R===42){let s=e.indexOf("*/",n+2);n=s===-1?a:s+2;continue}}let d=i;if(i=!1,r(O)||O===35){let R=n;n++;while(n<a){let h=e.charCodeAt(n);if(h===92)n+=2;else if(r(h))n++;else break}if(!d&&t?.(R,n))return-1;let s=d?3:V(e,R,n);o=s===1||s===2||s===4?1:3;continue}switch(n++,O){case 34:case 39:n=k(e,n,O),o=3;break;case 96:n=C(e,n,E),o=e.charCodeAt(n-1)===123?1:3;break;case 47:{let R=o===3?-1:S(e,n);if(R===-1)o=1;else{n=R;while(n<a&&r(e.charCodeAt(n)))n++;o=3}break}case 40:E.push(0),o=1;break;case 41:if(E.length===0)return n-1;E.pop(),o=3;break;case 123:E.push(o===1?3:2),o=0;break;case 125:{if(E.length===0)return n-1;let R=E.pop();if(R===4)n=C(e,n,E),o=e.charCodeAt(n-1)===123?1:3;else o=R===3?3:0;break}case 93:o=3;break;case 46:if(u(e.charCodeAt(n))){while(n<a&&r(e.charCodeAt(n)))n++;o=3}else if(e.startsWith("..",n))n+=2,o=1;else i=!0,o=1;break;case 63:if(e.charCodeAt(n)===46&&!u(e.charCodeAt(n+1)))n++,i=!0;o=1;break;case 33:o=o===3&&!T(e.charCodeAt(n-2))?3:1;break;case 43:case 45:if(e.charCodeAt(n)===O&&o===3)n++;else o=1;break;case 61:if(e.charCodeAt(n)===62)n++;o=1;break;default:o=1}}return a}function u(e){return e>=48&&e<=57}function b(e,A){for(let t=A;t<e.length;t++){let a=e.charCodeAt(t);if(a===10||a===13||a===8232||a===8233)return t}return e.length}function k(e,A,t){for(let a=A;a<e.length;a++){let E=e.charCodeAt(a);if(E===t)return a+1;if(E===92)a+=e.startsWith(`\r
|
|
2
|
+
`,a+1)?2:1;else if(E===10||E===13)return a}return e.length}function C(e,A,t){for(let a=A;a<e.length;a++){let E=e.charCodeAt(a);if(E===96)return a+1;if(E===92)a++;else if(E===36&&e.charCodeAt(a+1)===123)return t.push(4),a+2}return e.length}function p(e,A){let t=e.charCodeAt(A-1);if(t===96)return A-1;if(t===123&&e.charCodeAt(A-2)===36)return A-2;return A}function S(e,A){let t=!1;for(let a=A;a<e.length;a++){let E=e.charCodeAt(a);if(E===10||E===13||E===8232||E===8233)return-1;if(E===92)a++;else if(E===91)t=!0;else if(E===93)t=!1;else if(E===47&&!t)return a+1}return-1}function m(e,A){for(let t=A;t<e.length;t++){let a=e.charCodeAt(t);if(T(a))continue;if(a===47){let E=e.charCodeAt(t+1);if(E===47){t=b(e,t+2)-1;continue}if(E===42){let n=e.indexOf("*/",t+2);if(n===-1)return e.length;t=n+1;continue}}return t}return e.length}function _(e,A,t){return e.charCodeAt(A)===t.charCodeAt(0)&&e.startsWith(t,A)&&!r(e.charCodeAt(A+t.length))}function w(e,A){let t=e.charCodeAt(m(e,A));return t!==40&&t!==46}function B(e,A){let t=m(e,A);if(_(e,t,"import"))return!0;if(_(e,t,"type"))t=m(e,t+4);let a=e.charCodeAt(t);if(a===42)return!0;if(a!==123)return!1;for(t++;t<e.length;t++){let E=e.charCodeAt(t);if(E===125)break;if(E===34||E===39)t=k(e,t+1,E)-1;else if(E===47)t=Math.max(t,m(e,t)-1)}return _(e,m(e,t+1),"from")}var P=/import|export/g;function v(e,A){let t=-1;P.lastIndex=0;for(let a=P.exec(e);a!==null;a=P.exec(e)){let E=a.index,n=E+6;if(!r(e.charCodeAt(E-1))&&!r(e.charCodeAt(n))&&(e.charCodeAt(E)===105?w(e,n):A||B(e,n)))t=E}return t}
|
|
3
|
+
export{r,W,ye,N,u,m,_};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var m=Array(2048).fill(void 0);function g(){m.fill(void 0)}function
|
|
1
|
+
var m=Array(2048).fill(void 0);function g(){m.fill(void 0)}function ft(e,n,t,r){let i=r&2047,o=m[i];if(o!==void 0&&o.length===t-n&&e.startsWith(o,n))return o;let b=e.slice(n,t);return m[i]=b,b}var d="",s=[0],l=0,c=0,u;function T(e){g(),d=e,s=[0],l=0,c=0,u=void 0}function h(e){while(l<=e){let n=d.indexOf(`
|
|
2
2
|
`,l);if(n===-1){l=Number.POSITIVE_INFINITY;return}l=n+1,s.push(l)}}function y(e){let n=[0],t=e.indexOf(`
|
|
3
3
|
`);while(t!==-1)n.push(t+1),t=e.indexOf(`
|
|
4
|
-
`,t+1);return n}function x(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 o=r+i+1>>>1;if(e[o]<=n)r=o;else i=o-1}return r}function p(e){return h(e),c=x(s,e,c),{line:c+1,column:e-s[c],character:e}}var a=/\r\n?|\n|\u2028|\u2029/g,w=/[\r\u2028\u2029]/;function
|
|
5
|
-
export{
|
|
4
|
+
`,t+1);return n}function x(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 o=r+i+1>>>1;if(e[o]<=n)r=o;else i=o-1}return r}function p(e){return h(e),c=x(s,e,c),{line:c+1,column:e-s[c],character:e}}var a=/\r\n?|\n|\u2028|\u2029/g,w=/[\r\u2028\u2029]/;function dt(e){if(u===void 0){u=w.test(d)?[]:null,a.lastIndex=0;while(u!==null&&a.exec(d)!==null)u.push(a.lastIndex)}if(u===null)return h(e),x(s,e,c);let n=0,t=u.length;while(n<t){let r=n+t>>>1;if(u[r]<=e)n=r+1;else t=r}return n}function k(e){let{line:n,column:t}=p(e);return{line:n,column:t}}function mt(e){while(s.length<=e+1&&l!==Number.POSITIVE_INFINITY)h(l);if(e>=s.length)return;let n=e+1<s.length?s[e+1]-1:d.length;return d.slice(s[e],n)}function xt(e){let n,t=0;return(r)=>(n??=y(e),t=x(n,r,t),{line:t+1,column:r-n[t]})}function f(e){return typeof e==="object"&&e!==null&&typeof E(e).type==="string"}function E(e){return e}function L(e,n){let t=E(e);for(let r in t){let i=t[r];if(Array.isArray(i)){for(let o=0;o<i.length;o++)if(f(i[o]))i[o]=n(i[o])}else if(f(i))t[r]=n(i)}}function J(e,...n){if(!n.some((t)=>t===e.type))throw Error(`expected ${n.join(" or ")}, got ${e.type}`)}
|
|
5
|
+
export{ft,T,p,dt,k,mt,xt,f,E,L,J};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{T}from"./shared-5kdpxrm3.js";import{pt}from"./shared-yxr92tk5.js";import{W}from"./shared-4y1phpr0.js";function b(t,r,o){T(t);let e={isTypeScript:r.typescript??!1,typescript:o,loc:!1,comments:!1,root:{comments:[]}};return pt(e,t,(s)=>W(t,r.localExports??!0,s))}
|
|
2
|
+
export{b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function
|
|
2
|
-
export{
|
|
1
|
+
function ct(t){return{support:"typescript",parser:t}}function ht(t){return{support:"entities",names:t}}function U(t){return t&&"parser"in t?t.parser:void 0}function ut(t){return t&&"names"in t?t.names:void 0}function z(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}
|
|
2
|
+
export{ct,ht,U,ut,z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f,E}from"./shared-bxg3hhpk.js";function w(t){let e=[];return i(t,e),e}function i(t,e){switch(t.type){case"Identifier":e.push(t);return;case"ObjectPattern":for(let r of t.properties)i(r.type==="RestElement"?r.argument:r.value,e);return;case"ArrayPattern":for(let r of t.elements)if(r!==null)i(r,e);return;case"RestElement":i(t.argument,e);return;case"AssignmentPattern":i(t.left,e);return;case"TSParameterProperty":i(t.parameter,e);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":i(t.expression,e)}}function G(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 R={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"],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"]},n=["attributes","fragment"],mt={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:n,TitleElement:n,SlotElement:n,RegularElement:n,SvelteBody:n,SvelteBoundary:n,SvelteComponent:n,SvelteDocument:n,SvelteElement:n,SvelteFragment:n,SvelteHead:n,SvelteOptions:n,SvelteSelf:n,SvelteWindow:n,IfBlock:["consequent","alternate"],EachBlock:["body","fallback"],AwaitBlock:["pending","then","catch"],KeyBlock:["fragment"],SnippetBlock:["body"]},g=Object.assign(Object.create(null),R),b=[],fe=Symbol("sveast.walk.stop"),d=Symbol("sveast.walk.skip");function O(t,e,r){m(t,null,null,null,e,r===void 0||r===R?A:(a)=>Object.hasOwn(r,a.type)?r[a.type]:void 0)}function m(t,e,r,a,s,l){let p=l(t);if(p===void 0)throw Error(`unknown node type: ${t.type}`);let o=s.enter?.(t,e,r,a);if(o===fe)return!0;if(o!==d){if(o!==t&&f(o))return v(o,e,r,a,s,l);let x=E(t);for(let u=0;u<p.length;u++){let S=p[u],c=x[S];if(Array.isArray(c))for(let y=0;y<c.length;y++){let T=c[y];if(f(T)&&m(T,t,S,y,s,l))return!0}else if(f(c)&&m(c,t,S,null,s,l))return!0}}return s.leave?.(t,e,r,a)===fe}function A(t){let e=t.type;if(e==="Identifier")return t.typeAnnotation===void 0&&t.decorators===void 0?b:R.Identifier;if(e==="Literal")return R.Literal;if(e==="Text")return R.Text;return g[e]}function v(t,e,r,a,s,l){if(e===null||r===null)throw Error("walk can't replace the node it was called with");let p=E(e),o=p[r];if(a===null)p[r]=t;else if(Array.isArray(o))o[a]=t;return m(t,e,r,a,s,l)}
|
|
2
|
-
export{w,G,R,
|
|
1
|
+
import{f,E}from"./shared-5kdpxrm3.js";function w(t){let e=[];return i(t,e),e}function i(t,e){switch(t.type){case"Identifier":e.push(t);return;case"ObjectPattern":for(let r of t.properties)i(r.type==="RestElement"?r.argument:r.value,e);return;case"ArrayPattern":for(let r of t.elements)if(r!==null)i(r,e);return;case"RestElement":i(t.argument,e);return;case"AssignmentPattern":i(t.left,e);return;case"TSParameterProperty":i(t.parameter,e);return;case"TSAsExpression":case"TSNonNullExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":i(t.expression,e)}}function G(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 R={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"],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"]},n=["attributes","fragment"],yt={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:n,TitleElement:n,SlotElement:n,RegularElement:n,SvelteBody:n,SvelteBoundary:n,SvelteComponent:n,SvelteDocument:n,SvelteElement:n,SvelteFragment:n,SvelteHead:n,SvelteOptions:n,SvelteSelf:n,SvelteWindow:n,IfBlock:["consequent","alternate"],EachBlock:["body","fallback"],AwaitBlock:["pending","then","catch"],KeyBlock:["fragment"],SnippetBlock:["body"]},g=Object.assign(Object.create(null),R),b=[],fe=Symbol("sveast.walk.stop"),d=Symbol("sveast.walk.skip");function O(t,e,r){m(t,null,null,null,e,r===void 0||r===R?A:(a)=>Object.hasOwn(r,a.type)?r[a.type]:void 0)}function m(t,e,r,a,s,l){let p=l(t);if(p===void 0)throw Error(`unknown node type: ${t.type}`);let o=s.enter?.(t,e,r,a);if(o===fe)return!0;if(o!==d){if(o!==t&&f(o))return v(o,e,r,a,s,l);let x=E(t);for(let u=0;u<p.length;u++){let S=p[u],c=x[S];if(Array.isArray(c))for(let y=0;y<c.length;y++){let T=c[y];if(f(T)&&m(T,t,S,y,s,l))return!0}else if(f(c)&&m(c,t,S,null,s,l))return!0}}return s.leave?.(t,e,r,a)===fe}function A(t){let e=t.type;if(e==="Identifier")return t.typeAnnotation===void 0&&t.decorators===void 0?b:R.Identifier;if(e==="Literal")return R.Literal;if(e==="Text")return R.Text;return g[e]}function v(t,e,r,a,s,l){if(e===null||r===null)throw Error("walk can't replace the node it was called with");let p=E(e),o=p[r];if(a===null)p[r]=t;else if(Array.isArray(o))o[a]=t;return m(t,e,r,a,s,l)}
|
|
2
|
+
export{w,G,R,yt,fe,d,O};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S}from"./shared-k5pfyxpa.js";import{X,te,ie,re}from"./shared-
|
|
1
|
+
import{S}from"./shared-k5pfyxpa.js";import{X,te,ie,re}from"./shared-x7fez4k2.js";import{de}from"./shared-tgpdmrqm.js";import{x}from"./shared-3yc3kmnb.js";import{a}from"./shared-00hyas4z.js";function u(t,n,c){let p=te(t,n,c);return y(p),ie(p)}function y(t){let{source:n}=t,{tags:c,comments:p}=de(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:S(o,!1,t.entityNames);i.push({type:"Text",start:e,end:r,raw:o,data:d})},s=0,m=0;for(let e of c){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,X(t);while(t.stack.length>1&&t.index<n.length)re(t);s=t.index}let l=i.filter((e)=>e.type==="SvelteOptions");i.length=0,i.push(...l)}var T={typescript:a,entityNames:x};function ee(t,n){return u(t,n,T)}
|
|
2
2
|
export{ee};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{B,s,t,V,C,M,l,v,F}from"./shared-40v3xx3k.js";import{N}from"./shared-
|
|
1
|
+
import{B,s,t,V,C,M,l,v,F}from"./shared-40v3xx3k.js";import{N}from"./shared-4y1phpr0.js";var E="{",G=60,I=62,g=47,_=61,b=123,A=/<(?:script|style|svelte:options)(?![^\s/>])/g,S=/<\/script\s*>/g,O=/\s*>/y,T=/<\/textarea(\s[^>]*)?>/iy,y="</svelte:options";function H(e){let o=(e.charCodeAt(0)===65279?e.slice(1):e).trimEnd(),n={typescript:V(o),instance:null,module:null,css:null,options:null};return W(o,n,null),n}function de(e){let d={tags:[],comments:[]};return W(e,{typescript:!1,instance:null,module:null,css:null,options:null},d),d}function W(e,d,o){let n=R(e),a=[],i=0;while(i<=n){let r=e.charCodeAt(i);if(r===G)i=X(e,i,a,d,o);else if(r===b)i=w(e,i,a);else i++}}function R(e){let d=-1;A.lastIndex=0;for(let o=A.exec(e);o!==null;o=A.exec(e))d=o.index;return d}function L(e,d){return Math.min(N(e,d)+1,e.length)}function w(e,d,o){let n=t(e,d+1),a=e.charCodeAt(n),i=e.charCodeAt(n+1);if(a===35||a===58||a===64||a===g&&i!==g&&i!==42){n++;while(n<e.length){let r=e.charCodeAt(n);if(r<97||r>122)break;n++}if(a===35)o.push(E);else if(a===g){let r=o.lastIndexOf(E);if(r!==-1)o.length=r}}return L(e,n)}function X(e,d,o,n,a){if(e.startsWith("!--",d+1)){let c=e.indexOf("-->",d+4),x=c===-1?e.length:c+3;if(a&&o.length===0)a.comments.push(d,x);return x}if(e.charCodeAt(d+1)===g){let c=d+2,x=e.slice(c,v(e,c,!1)),p=o.lastIndexOf(x);if(p!==-1)o.length=p;return u(e,t(e,c+x.length))}let i=e.slice(d+1,v(e,d+1,!1)),r=t(e,d+1+i.length),m=o[o.length-1];if(m!==void 0&&B(m,i))o.pop();let f=o.length===0;if(a&&f&&(i==="script"||i==="style"||i==="svelte:options"))a.tags.push(d);if(f&&(i==="script"||i==="style")){let c=[];if(r=u(e,Q(e,r,c)),i==="script"){let p=q(e,d,r,c);if(p.context==="module")n.module??=p;else n.instance??=p;return p.end}let x=P(e,d,r,c);return n.css??=x,x.end}let h=f&&i==="svelte:options"?[]:null;if(r=U(e,r,h),e.charCodeAt(r)===g||C(i)){if(e.charCodeAt(r)===g)r++;r=u(e,r)}else{if(r=u(e,r),i==="textarea")return K(e,r);if(i==="script"||i==="style"){let c=`</${i}>`,x=e.indexOf(c,r);return x===-1?e.length:x+c.length}if(h&&e.startsWith(y,r))r=u(e,t(e,r+y.length));else return o.push(i),r}if(h)n.options??={start:d,end:r,attributes:h};return r}function u(e,d){return e.charCodeAt(d)===I?d+1:d}function q(e,d,o,n){S.lastIndex=o;let a=S.exec(e),i=a?a.index:e.length,r=n.some((m)=>m.name==="module"||m.name==="context");return{start:d,end:a?a.index+a[0].length:e.length,context:r?"module":"default",attributes:n,content:{start:o,end:i}}}function P(e,d,o,n){let a=M(e,o),i=a;if(e.startsWith("</style",i)){i+=7,O.lastIndex=i;let r=O.exec(e);if(r)i+=r[0].length}return{start:d,end:i,attributes:n,content:{start:o,end:a}}}function Q(e,d,o){let n=d;for(;;){let a=n,i=v(e,n,!0);if(i===a)return n;n=i;let r=!0;if(e.charCodeAt(n)===_){let m=t(e,n+1),f=e.charCodeAt(m),h=-1;if(l(f)){let x=e.indexOf(e[m],m+1);if(x!==-1)h=x+1}if(h===-1){h=m;while(h<e.length&&e.charCodeAt(h)!==I&&!s(e.charCodeAt(h)))h++}let c=l(f)?1:0;r=e.slice(m+c,h-c),n=h}o.push({name:e.slice(a,i),value:r,start:a,end:n}),n=t(e,n)}}function U(e,d,o){let n=d;for(;;){for(;;){if(e.startsWith("/*",n)){let f=e.indexOf("*/",n+2);n=f===-1?e.length:f+2}else if(e.startsWith("//",n)){let f=e.indexOf(`
|
|
2
2
|
`,n+2);n=f===-1?e.length:f}else break;n=t(e,n)}let a=n;if(e.charCodeAt(n)===b){n=t(e,L(e,n+1));continue}let i=v(e,n,!0);if(i===a)return n;let r=i,m=!0;if(n=t(e,i),e.charCodeAt(n)===_){let f=t(e,n+1);r=e.startsWith("/>",f)?f+1:D(e,f),m=l(e.charCodeAt(f))?e.slice(f+1,Math.max(f+1,r-1)):e.slice(f,r),n=t(e,r)}o?.push({name:e.slice(a,i),value:m,start:a,end:r})}}function D(e,d){let o=e.charCodeAt(d);if(l(o)){let a=d+1;while(a<e.length){let i=e.charCodeAt(a);if(i===o)return a+1;a=i===b?L(e,a+1):a+1}return e.length}let n=d;while(n<e.length&&!F(e,n))n=e.charCodeAt(n)===b?L(e,n+1):n+1;return n}function K(e,d){let o=d;while(o<e.length){let n=e.charCodeAt(o);if(n===G){if(T.lastIndex=o,T.test(e))return T.lastIndex}o=n===b?L(e,o+1):o+1}return e.length}
|
|
3
3
|
export{H,de};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{B,s,t,V,C,M,l,v,F}from"./shared-40v3xx3k.js";import{T,p,k,L,J}from"./shared-bxg3hhpk.js";import{h,y}from"./shared-zd01zsyh.js";import{e,ye,xe,ge,be,Se,ve,Ae,Te,ke,Ee,ne,we,Ce,oe,Ne,_e,Pe,Le,Q,ae,Ie,le,Re,Oe,c,$e,qe,De,Be,Ve,Me,Fe,We,je,pe,Ue,ze,Ke,Ge,He,Xe,Y,Qe,Ye,Je,ce,Ze,et,tt,it,n,rt,st,nt,P,j,A,ot,at}from"./shared-25z9p1fv.js";import{S}from"./shared-k5pfyxpa.js";import{z}from"./shared-wentwa9g.js";var ct=/\r(?!\n)|[\u2028\u2029]/;function K(r,i){let a=r.codePointAt(i);if(a===void 0||!h(a,!0))return i;let o=i+(a<=65535?1:2),u=r.codePointAt(o);while(u!==void 0&&y(u,!0))o+=u<=65535?1:2,u=r.codePointAt(o);return o}class en{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(r,i,a,o={}){if(this.source=r,this.loc=o.loc??!1,this.lfOnly=this.loc&&!ct.test(r),this.isTypeScript=V(r),this.typescript=a.typescript,this.isTypeScript&&!this.typescript)z();this.entityNames=a.entityNames,this.css=o.css??!0,this.script=o.script??!0,this.comments=o.comments??!0,this.root={type:"Root",start:0,end:i,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(r){if(r.length===1)return this.source.charCodeAt(this.index)===r.charCodeAt(0);return this.source.startsWith(r,this.index)}matchRegex(r){return r.lastIndex=this.index,r.exec(this.source)?.[0]??null}eat(r,i=!1){if(this.match(r))return this.index+=r.length,!0;if(i)c(this.index,r);return!1}read(r){let i=this.matchRegex(r);if(i)this.index+=i.length;return i}readUntil(r){if(this.index>=this.source.length)n(this.source.length);let i=this.source.indexOf(r,this.index),a=i===-1?this.source.length:i,o=this.source.slice(this.index,a);return this.index=a,o}allowWhitespace(){this.index=t(this.source,this.index)}requireWhitespace(){if(!s(this.source.charCodeAt(this.index)))$e(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(r,i){return this.loc?{start:p(r),end:p(i)}:void 0}readIdentifierName(){let r=this.index,i=K(this.source,r),a=this.source.slice(r,i);if(this.index=i,P.has(a))rt(r,a);let o={type:"Identifier",name:a,start:r,end:i};if(this.loc)o.loc=this.sourceLocation(r,i);return o}current(){return this.stack[this.stack.length-1]}append(r){this.fragments[this.fragments.length-1].nodes.push(r)}open(r,i){this.append(r),this.stack.push(r),this.fragments.push(i)}setFragment(r){this.fragments[this.fragments.length-1]=r}close(){this.stack.pop(),this.fragments.pop()}}var ut={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function nn(r,i,a,o){return{type:"Literal",start:i,end:a,value:o,raw:r.slice(i,a)}}function fn(r,i){let a=r.charCodeAt(i);if(a===34||a===39){for(let u=i+1;u<r.length;u++){let d=r.charCodeAt(u);if(d===a)return nn(r,i,u+1,r.slice(i+1,u));if(d===92||d===10||d===13)return null}return null}let o=i;for(;o<r.length;o++){let u=r.charCodeAt(o);if(u<48||u>57)break}if(o===i||a===48&&o-i>1)return null;return nn(r,i,o,Number(r.slice(i,o)))}function pt(r,i,a){let o=K(r,i);if(o===i)return fn(r,i);let u=r.slice(i,o);if(u==="true"||u==="false"||u==="null")return nn(r,i,o,u==="null"?null:u==="true");if(P.has(u))return null;let d={type:"Identifier",start:i,end:o,name:u};for(let f=o;;){let g=r.charCodeAt(f);if(g===40){let E=dt(r,f+1,a);if(!E)return null;d={type:"CallExpression",start:i,end:E.end,callee:d,arguments:E.arguments,optional:!1},f=E.end;continue}let m,x;if(g===46){if(x=K(r,f+1),x===f+1)return null;m={type:"Identifier",start:f+1,end:x,name:r.slice(f+1,x)}}else if(g===91){if(m=fn(r,f+1),!m||r.charCodeAt(m.end)!==93)return null;x=m.end+1}else return d;d={type:"MemberExpression",start:i,end:x,object:d,property:m,computed:g===91,optional:!1},f=x}}function dt(r,i,a){let o=[],u=t(r,i);if(r.charCodeAt(u)===41)return{arguments:o,end:u+1};for(;;){let d=ee(r,u,a);if(!d)return null;o.push(d),u=t(r,d.end);let f=r.charCodeAt(u);if(f===41)return{arguments:o,end:u+1};if(f!==44)return null;if(u=t(r,u+1),r.charCodeAt(u)===41)return null}}function rn(r,i,a){let o=r.charCodeAt(i),u=r.charCodeAt(i+1);if(!(o===33&&u!==61)&&!(o===45&&u!==45&&u!==61))return pt(r,i,a);let d=rn(r,t(r,i+1),a);if(!d)return null;return{type:"UnaryExpression",start:i,end:d.end,operator:o===33?"!":"-",prefix:!0,argument:d}}function mn(r,i,a){let o=r.charCodeAt(i),u=r.charCodeAt(i+1);switch(o){case 124:return u===124&&r.charCodeAt(i+2)!==61?"||":null;case 38:return u===38&&r.charCodeAt(i+2)!==61?"&&":null;case 63:return u===63&&r.charCodeAt(i+2)!==61?"??":null;case 61:if(u!==61)return null;return r.charCodeAt(i+2)===61?"===":"==";case 33:if(u!==61)return null;return r.charCodeAt(i+2)===61?"!==":"!=";case 60:case 62:if(a||u===o)return null;if(u===61)return o===60?"<=":">=";return o===60?"<":">";case 43:return u===43||u===61?null:"+";case 45:return u===45||u===61?null:"-";case 42:return u===42||u===61?null:"*";case 47:return u===47||u===42||u===61?null:"/";case 37:return u===61?null:"%";default:return null}}function tn(r,i,a,o){if(hn(r.charCodeAt(i.end)))return i;let u=t(r,i.end),d=mn(r,u,o);if(d===null)return i;let f=ut[d];if(f<=a)return i;let g=d==="||"||d==="&&",m=d==="??",x=rn(r,t(r,u+d.length),o);if(!x)return null;let E=tn(r,x,m?2:f,o);if(!E)return null;let b=g||m?{type:"LogicalExpression",start:i.start,end:E.end,left:i,operator:d,right:E}:{type:"BinaryExpression",start:i.start,end:E.end,left:i,operator:d,right:E};if(g||m){let _=mn(r,t(r,b.end),o);if(m?_==="||"||_==="&&":_==="??")return null}return tn(r,b,a,o)}function ee(r,i,a){let o=rn(r,i,a);if(!o)return null;let u=tn(r,o,-1,a);if(!u||hn(r.charCodeAt(u.end)))return u;let d=t(r,u.end);if(r.charCodeAt(d)!==63)return u;let f=r.charCodeAt(d+1);if(f===46||f===63)return null;let g=ee(r,t(r,d+1),a);if(!g)return null;let m=t(r,g.end);if(r.charCodeAt(m)!==58)return null;let x=ee(r,t(r,m+1),a);if(!x)return null;return{type:"ConditionalExpression",start:u.start,end:x.end,test:u,consequent:g,alternate:x}}function hn(r){return r===125||r===41||r===44||r===58}function ft(r,i){let a=t(r,i);if(a>=r.length)return!1;let o=r.charCodeAt(a);return o===125||o===41}function mt(r,i,a){let o=ee(r,i,a);return o&&ft(r,o.end)?o:null}function N(r){switch(r.loc={start:k(r.start),end:k(r.end)},r.type){case"MemberExpression":N(r.object),N(r.property);break;case"CallExpression":N(r.callee);for(let i of r.arguments)N(i);break;case"UnaryExpression":N(r.argument);break;case"BinaryExpression":case"LogicalExpression":N(r.left),N(r.right);break;case"ConditionalExpression":N(r.test),N(r.consequent),N(r.alternate);break}}function w(r){let i=!r.loc||r.lfOnly?mt(r.source,r.index,r.isTypeScript):null;if(i){if(r.index=i.end,r.loc)N(i);return i}let{node:a,end:o}=A(r,r.source,r.index);return r.index=o,a}var xn=/<\/script\s*>/g,ht=new Set(["server","client","worker","test","default"]);function Sn(r,i,a){let{source:o,index:u}=r;if(u>=o.length)n(o.length);xn.lastIndex=u;let d=xn.exec(o);if(!d)Q(o.length,"script");r.index=d.index+d[0].length;let f=r.script?j(r,o.slice(0,d.index),u):xt(u,d.index);if(f.start=u,f.loc)Object.assign(f.loc.start,k(i)),Object.assign(f.loc.end,k(r.index));else if(r.loc)f.loc={start:k(i),end:k(r.index)};let g="default";for(let m of a){if(ht.has(m.name))Me(m,m.name);if(m.name==="module"){if(m.value!==!0)Be(m,m.name);g="module"}if(m.name==="context"){let x=m.value;if(x===!0||!Array.isArray(x)||x.length!==1||x[0].type!=="Text"||x[0].data!=="module")Ve(m);g="module"}}return{type:"Script",start:i,end:r.index,context:g,content:f,attributes:a}}function xt(r,i){return{type:"Program",start:r,end:i,body:[],sourceType:"module"}}var St=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,gt=/\d+(\.\d+)?%/y,At=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,yt=/\s*>/y,W=-1,Tn=34,Tt=35,Et=36,Ct=38,En=39,bt=40,_t=41,de=42,vt=43,Pt=45,kt=46,Cn=47,on=58,wt=59,Rt=60,gn=61,Nt=62,Bt=91,sn=92,Lt=93,Ot=94,bn=123,ln=124,Dt=125,_n=126,se=[];function vn(r,i,a){let o=r.index;se=[];let u=r.css?Ft(r):Wt(r),d=r.index;return r.eat("</style",!0),r.read(yt),{type:"StyleSheet",start:i,end:r.index,attributes:a,children:u,comments:se,content:{start:o,end:d,styles:r.source.slice(o,d),comment:null}}}function Wt(r){return r.index=M(r.source,r.index),[]}function Ft(r){let i=[];for(;;){if(q(r,!0),r.match("</style")||r.index>=r.source.length)break;i.push(r.match("@")?Pn(r):kn(r))}return i}function Pn(r){let i=r.index;r.eat("@",!0);let a=I(r),o=cn(r,!0),u=null;if(r.match("{"))u=Nn(r);else r.eat(";",!0);return{type:"Atrule",start:i,end:r.index,name:a,prelude:o,block:u}}function kn(r){let i=r.index;return{type:"Rule",prelude:wn(r,!1),block:Nn(r),start:i,end:r.index}}function wn(r,i){let a=[];q(r,!0);let o=r.index;while(r.index<r.source.length){a.push(It(r,i));let u=r.index;if(q(r,!0),r.match(i?")":"{"))return{type:"SelectorList",start:o,end:u,children:a};r.eat(",",!0),q(r,!0)}return n(r.source.length)}function An(r,i){return{type:"RelativeSelector",combinator:r,selectors:[],start:i,end:-1}}function It(r,i){let{source:a,index:o}=r,u=[],d=An(null,r.index);while(r.index<a.length){let f=r.index,g=a.charCodeAt(f),m=d.selectors;if(g===Ct)r.index++,m.push({type:"NestingSelector",name:"&",start:f,end:r.index});else if(g===de)r.index++,m.push(yn(r,f,"*"));else if(g===Tt)r.index++,m.push({type:"IdSelector",name:I(r),start:f,end:r.index});else if(g===kt)r.index++,m.push({type:"ClassSelector",name:I(r),start:f,end:r.index});else if(g===on){let _=a.charCodeAt(f+1)===on;r.index+=_?2:1;let R=I(r),G=null;if(r.eat("("))G=wn(r,!0),r.eat(")",!0);if(_)m.push({type:"PseudoElementSelector",name:R,start:f,end:r.index,...G&&{args:G}});else m.push({type:"PseudoClassSelector",name:R,args:G,start:f,end:r.index})}else if(g===Bt)r.index++,m.push(Mt(r,f));else{let _=i?r.read(St):null,R=!_&&ue(g)?r.read(gt):null;if(_)m.push({type:"Nth",value:_,start:f,end:r.index});else if(R)m.push({type:"Percentage",value:R,start:f,end:r.index});else if(Rn(a,f)===0){let G=I(r);m.push(yn(r,f,G))}}let x=r.index;q(r,!1);let E=r.match(",")||r.match(i?")":"{");if(r.index=x,E)return d.end=x,u.push(d),{type:"ComplexSelector",start:o,end:x,children:u};let b=Gt(r);if(b){if(d.selectors.length>0)d.end=x,u.push(d);if(d=An(b,b.start),r.allowWhitespace(),r.match(",")||r.match(i?")":"{"))we(r.index)}}return n(a.length)}function yn(r,i,a){let o=a,u;if(r.eat("|"))u=o,o=r.eat("*")?"*":I(r);return{type:"TypeSelector",name:o,...u!==void 0&&{namespace:u},start:i,end:r.index}}function Mt(r,i){let a=r.source;r.allowWhitespace();let o=I(r);r.allowWhitespace();let u=null,d=null,f=a.charCodeAt(r.index);if(f===gn)d="=";else if((f===_n||f===Ot||f===Et||f===de||f===ln)&&a.charCodeAt(r.index+1)===gn)d=a.slice(r.index,r.index+2);if(d)r.index+=d.length,r.allowWhitespace(),u=Vt(r);r.allowWhitespace();let g=r.index;while(Ln(a.charCodeAt(r.index)))r.index++;let m=r.index>g?a.slice(g,r.index):null;return r.allowWhitespace(),r.eat("]",!0),{type:"AttributeSelector",start:i,end:r.index,name:o,matcher:d,value:u,flags:m}}function Rn(r,i){let a=r.charCodeAt(i);if(a===vt||a===_n||a===Nt)return 1;if(a===ln&&r.charCodeAt(i+1)===ln)return 2;return 0}function Gt(r){let i=r.index;r.allowWhitespace();let a=r.index,o=Rn(r.source,a);if(o>0){r.index+=o;let u=r.index;return r.allowWhitespace(),{type:"Combinator",name:r.source.slice(a,u),start:a,end:u}}if(r.index!==i)return{type:"Combinator",name:" ",start:i,end:r.index};return null}function Nn(r){let i=r.index;r.eat("{",!0);let a=[];while(r.index<r.source.length){if(q(r,!0),r.match("}"))break;a.push(qt(r))}return r.eat("}",!0),{type:"Block",start:i,end:r.index,children:a}}function qt(r){if(r.match("@"))return Pn(r);let i=r.index;cn(r,!1);let a=r.source.charCodeAt(r.index);return r.index=i,a===bn?kn(r):Ut(r)}function Ut(r){let{source:i,index:a}=r;if(a>=i.length)n(i.length);let o=a;while(o<i.length){let m=i.charCodeAt(o);if(m===on||s(m))break;o++}let u=i.slice(a,o);r.index=o,r.allowWhitespace(),r.eat(":");let d=r.index;r.allowWhitespace();let f=cn(r,!0);if(!f&&!u.startsWith("--"))Ee({start:a,end:d});let g=r.index;if(!r.match("}"))r.eat(";",!0);return{type:"Declaration",start:a,end:g,property:u,value:f}}function cn(r,i){let a=r.source,o=a.length,u="",d=r.index,f=null,g=!1,m=!1,x=W,E=r.index;while(E<o){let b=a.charCodeAt(E);if(g){g=!1,E++;continue}if(b===sn){g=!0,E++;continue}if(b===x)x=W;else if(b===_t)m=!1;else if(x===W&&(b===Tn||b===En))x=b;else if(b===bt){if($t(a,u,d,E))m=!0}else if((b===wt||b===bn||b===Dt)&&!m&&x===W){if(r.index=E,!i)return"";if(u+=a.slice(d,E),f){let _=u.length-u.trimStart().length;for(let R of f)R.position=Math.max(0,(R.position??0)-_)}return u.trim()}else if(b===Cn&&!m&&x===W&&a.charCodeAt(E+1)===de){u+=a.slice(d,E),r.index=E;let _=Bn(r);if(i)_.position=u.length,se.push(_),f??=[],f.push(_);E=r.index,d=E;continue}E++}return r.index=o,n(o)}function $t(r,i,a,o){if(o-a>=3)return r.charCodeAt(o-3)===117&&r.charCodeAt(o-2)===114&&r.charCodeAt(o-1)===108;return(i+r.slice(a,o)).endsWith("url")}function Vt(r){let i=r.source,a=W;if(r.eat('"'))a=Tn;else if(r.eat("'"))a=En;let o=r.index,u=!1,d=o;while(d<i.length){let f=i.charCodeAt(d);if(u)u=!1;else if(f===sn)u=!0;else if(a===W?f===Lt||s(f):f===a)return r.index=a===W?d:d+1,i.slice(o,d).trim();d++}return r.index=d,n(i.length)}function I(r){let{source:i,index:a}=r,o=i.charCodeAt(a);if(ue(o)||o===Pt&&ue(i.charCodeAt(a+1)))ne(a);let u="",d=a,f=a;while(f<i.length){let g=i.charCodeAt(f);if(g===sn){u+=i.slice(d,f),r.index=f;let m=r.matchRegex(At);if(m){let x=String.fromCodePoint(Number.parseInt(m.slice(1),16));u+=x==="\\"?"\\\\":x,f+=m.length}else u+=`\\${i[f+1]}`,f+=2;d=f}else if(g>=160||jt(g))f++;else break}if(u+=i.slice(d,f),r.index=f,u==="")ne(a);return u}function q(r,i){let a=r.source;r.allowWhitespace();for(;;){let o=a.charCodeAt(r.index);if(o===Cn&&a.charCodeAt(r.index+1)===de){let u=Bn(r);if(i)se.push(u)}else if(o===Rt&&r.eat("<!--"))r.readUntil("-->"),r.eat("-->",!0);else break;r.allowWhitespace()}}function Bn(r){let i=r.index;r.eat("/*",!0);let a=r.readUntil("*/");return r.eat("*/",!0),{type:"CSSComment",value:a,start:i,end:r.index}}function ue(r){return r>=48&&r<=57}function Ln(r){return r>=65&&r<=90||r>=97&&r<=122}function jt(r){return Ln(r)||ue(r)||r===95||r===45}var an=/<\/textarea(\s[^>]*)?>/iy,Ht=/^![a-zA-Z]+$/,Xt=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,zt=/^[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,un="\\u200C\\u200D",Zt=new RegExp(`^(?:\\p{Lu}[$${un}\\p{ID_Continue}.]*|\\p{ID_Start}[$${un}\\p{ID_Continue}]*(?:\\.[$${un}\\p{ID_Continue}]+)+)$`,"u"),Kt=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),pn=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]]]),On=[...pn.keys()],Qt=`${On.slice(0,-1).join(", ")} or ${On.at(-1)}`,Yt=62,Dn=123;function fe(r,i){let a=r.index;if(a>=r.source.length)n(r.source.length);let o=v(r.source,a,i);return r.index=o,{name:r.source.slice(a,o),start:a,end:o,loc:r.sourceLocation(a,o)}}var H=(r,i,a,o=a)=>({start:r,end:i,type:"Text",raw:a,data:o});function Jt(r){let i=r.charCodeAt(0);if(i>=97&&i<=122&&!r.includes("."))return!1;return Zt.test(r)}function er(r){let i=!0;for(let a=0;a<r.length&&i;a++){let o=r.charCodeAt(a);i=o>=97&&o<=122||a>0&&o>=48&&o<=57}return i&&r.length>0||Ht.test(r)||Xt.test(r)||zt.test(r)}function Wn(r,i){for(let a=r.length-1;a>=0;a--){let o=i(r[a]);if(o!==void 0)return o}return!1}function nr(r,i,a){let o=pn.get(i);if(o)return o[0];if(a)return"Component";if(i==="title"){if(Wn(r.stack,({type:d})=>{if(d==="SvelteHead")return!0;return d==="RegularElement"||d==="Component"?!1:void 0}))return"TitleElement"}if(i==="slot"){if(!Wn(r.stack,(d)=>d.type==="RegularElement"&&d.attributes.some((f)=>f.type==="Attribute"&&f.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function X(r){let i=r.index++;if(r.eat("!--")){let a=r.readUntil("-->");r.eat("-->",!0),r.append({type:"Comment",start:i,end:r.index,data:a})}else if(r.eat("/"))tr(r,i);else ir(r,i)}function tr(r,i){let{name:a}=fe(r,!1);if(r.allowWhitespace(),r.eat(">",!0),C(a))nt(i);let o=r.current();while(!("name"in o)||o.name!==a){if(o.type!=="RegularElement"){let u=r.lastAutoClosedTag;if(u?.tag===a)Le(i,a,u.reason);Pe(i,a)}o.end=i,r.close(),o=r.current()}if(o.end=r.index,r.close(),r.stack.length<(r.lastAutoClosedTag?.depth??0))r.lastAutoClosedTag=void 0}function rr(r,i,a){return{type:r,start:i,end:-1,name:a}}function ir(r,i){let a=fe(r,!1),{name:o}=a,u=pn.get(o);if(!u&&o.startsWith("svelte:"))Ge(a,Qt);let d=Jt(o);if(!d&&!er(o))tt(a);if(u?.[1]){if(r.metaTags.has(o))Ue(i,o);if(r.current().type!=="Root")Ke(i,o);r.metaTags.add(o)}let f=rr(nr(r,o,d),i,o);if(r.loc)f.name_loc=a.loc;f.attributes=[],f.fragment={type:"Fragment",nodes:[]},r.allowWhitespace();let g=r.current();if(g.type==="RegularElement"&&B(g.name,o))g.end=i,r.close(),r.lastAutoClosedTag={tag:g.name,reason:o,depth:r.stack.length};if((o==="script"||o==="style")&&r.current().type==="Root"){let x=[];f.attributes=x,Gn(r,x,ur),lr(r,f,i,x);return}if(Gn(r,f.attributes,dr),f.type==="SvelteComponent"){let x=Fn(f);if(!x)je(i);if(!In(x.value))We(x.start);f.expression=Mn(x.value)}else if(f.type==="SvelteElement"){let x=Fn(f);if(!x)pe(i);if(x.value===!0)pe(x);f.tag=In(x.value)?Mn(x.value):ar(x.value[0])}if(!r.eat("/")&&!C(o))if(r.eat(">",!0),o==="textarea")f.fragment.nodes=Un(r,(x,E)=>(an.lastIndex=E,an.test(x)),"inside <textarea>"),r.read(an);else if(o==="script"||o==="style")f.fragment.nodes.push(or(r,`</${o}>`));else{r.open(f,f.fragment);return}else r.eat(">",!0);f.end=r.index,r.append(f)}function or(r,i){let a=r.index,o=r.source.indexOf(i,a);r.index=o===-1?r.source.length:o;let u=H(a,r.index,r.source.slice(a,r.index));return r.eat(i,!0),u}function lr(r,i,a,o){r.eat(">",!0);let u=sr(r.root.fragment.nodes,a);if(i.name==="style"){let g=vn(r,a,o);if(g.content.comment=u,r.root.css)Fe(a);r.root.css=g;return}let d=Sn(r,a,o);if(u&&r.comments)d.content.leadingComments=[{type:"Line",value:u.data}];let f=d.context==="module"?"module":"instance";if(r.root[f])De(a);r.root[f]=d}function sr(r,i){let a=r.length-1;if(a<0||r[a].end!==i)return null;for(let o=a;o>=0;o--){let u=r[o];if(u.type==="Comment")return u;if(u.type!=="Text"||u.data.trim())return null}return null}var cr=(r)=>r.type==="Attribute"&&r.name==="this";function Fn(r){let i=r.attributes.find(cr);if(i)r.attributes.splice(r.attributes.indexOf(i),1);return i}function In(r){if(r===!0)return!1;if(!Array.isArray(r))return!0;return r.length===1&&r[0].type==="ExpressionTag"}function Mn(r){return(Array.isArray(r)?r[0]:r).expression}function ar(r){if(r.type!=="Text")return r.expression;return{type:"Literal",value:r.data,raw:`'${r.raw}'`,start:r.start,end:r.end}}function Gn(r,i,a){let o=new Set;for(;;){let u=a(r);if(!u)return;let{type:d}=u;if(d==="Attribute"||d==="BindDirective"||d==="StyleDirective"||d==="ClassDirective"){let f=`${d==="BindDirective"?"Attribute":d}${u.name}`;if(o.has(f))ye(u);if(u.name!=="this")o.add(f)}i.push(u),r.allowWhitespace()}}function dn(r,i,a,o,u){return r.loc?{type:"Attribute",start:a,end:o,name:i.name,name_loc:i.loc,value:u}:{type:"Attribute",start:a,end:o,name:i.name,value:u}}function qn(r){if(l(r.source.charCodeAt(r.index)))c(r.index,"=")}function ur(r){let i=r.index,a=fe(r,!0);if(!a.name)return null;let o=!0;if(r.eat("=")){r.allowWhitespace();let{source:u}=r,d=r.index,f=-1;if(l(u.charCodeAt(d))){let x=u.indexOf(u[d],d+1);if(x!==-1)f=x+1}if(f===-1){f=d;while(f<u.length&&u.charCodeAt(f)!==Yt&&!s(u.charCodeAt(f)))f++;if(f===d)ae(d)}r.index=f;let g=l(u.charCodeAt(d))?1:0,m=u.slice(d+g,f-g);o=[H(f-m.length-g,f-g,m,S(m,!0,r.entityNames))]}return qn(r),dn(r,a,i,r.index,o)}function pr(r){let i=r.index,a=r.match("/*");if(!a&&!r.match("//"))return!1;r.index+=2;let o=r.readUntil(a?"*/":`
|
|
2
|
-
`);if(a)r.eat("*/");let u={type:a?"Block":"Line",start:i,end:r.index,value:o},d=r.sourceLocation(i,r.index);if(d)u.loc=d;if(r.comments)r.root.comments.push(u);return!0}function dr(r){while(pr(r))r.allowWhitespace();let i=r.index;if(r.eat("{"))return fr(r,i);let a=fe(r,!0);if(!a.name)return null;let o=r.index;r.allowWhitespace();let u=!0;if(r.eat("=")){if(r.allowWhitespace(),r.match("/>"))u=[H(r.index,r.index+1,"/")],r.index++;else u=xr(r);o=r.index}else qn(r);let d=a.name.indexOf(":"),f=d>0?Kt.get(a.name.slice(0,d)):void 0;return f?hr(r,f,a,d,i,o,u):dn(r,a,i,o,u)}function fr(r,i){if(r.allowWhitespace(),r.eat("@attach")){r.requireWhitespace();let u=w(r);return r.eatClosingBrace(),{type:"AttachTag",start:i,end:r.index,expression:u}}if(r.eat("...")){let u=w(r);return r.eatClosingBrace(),{type:"SpreadAttribute",start:i,end:r.index,expression:u}}let a=r.readIdentifierName();if(a.name==="")xe(i);r.eatClosingBrace();let o={type:"ExpressionTag",start:a.start,end:a.end,expression:a};return dn(r,a,i,r.index,o)}function mr(r){if(r===!0)return;return Array.isArray(r)?r[0]:r}function hr(r,i,a,o,u,d,f){let[g,...m]=a.name.slice(o+1).split("|");if(g==="")_e({start:u,end:u+o+1},a.name);let x={start:u,end:d,type:i,name:g};if(r.loc)x.name_loc=a.loc;if(i==="StyleDirective")return x.modifiers=m,x.value=f,x;let E=mr(f);if(E&&(Array.isArray(f)&&f.length>1||E.type==="Text"))Ne(E.start);if(x.expression=E?.expression??null,x.modifiers=m,i==="TransitionDirective"){let b=a.name.slice(0,o);x.intro=b!=="out",x.outro=b!=="in"}if((i==="BindDirective"||i==="ClassDirective")&&!x.expression)x.expression={start:u+o+1,end:d,type:"Identifier",name:g};return x}function xr(r){let i=r.source.charCodeAt(r.index),a=l(i);if(a){if(r.index++,r.source.charCodeAt(r.index)===i)return r.index++,[H(r.index-1,r.index-1,"")]}let o;try{o=Un(r,a?(u,d)=>u.charCodeAt(d)===i:F,"in attribute value",a?i:void 0)}catch(u){let d=u instanceof e?u.position?.[0]:void 0;if(u instanceof e&&u.code==="js_parse_error"&&d!==void 0&&r.source.startsWith("/>",d-1))r.index=d,c(d,a?String.fromCharCode(i):"}");throw u}if(a)r.index++;else if(o.length===0)ae(r.index);return a||o.length>1||o[0].type==="Text"?o:o[0]}function Un(r,i,a,o){let{source:u}=r,d=[],f=r.index,g=(m)=>{if(m<=f)return;let x=u.slice(f,m);d.push(H(f,m,x,S(x,!0,r.entityNames)))};while(r.index<u.length){let m=r.index;if(i(u,m))return g(m),d;if(u.charCodeAt(m)!==Dn){if(r.index++,o!==void 0)while(r.index<u.length&&u.charCodeAt(r.index)!==Dn&&u.charCodeAt(r.index)!==o)r.index++;continue}r.index++;let x=u.charCodeAt(r.index);if(x===35||x===64){r.index++;let b=r.index;while(r.index<u.length&&u.charCodeAt(r.index)>=97&&u.charCodeAt(r.index)<=122)r.index++;let _=u.slice(b,r.index);(x===35?ve:it)(m,_,a)}g(m),r.allowWhitespace();let E=w(r);r.eatClosingBrace(),d.push({type:"ExpressionTag",start:m,end:r.index,expression:E}),f=r.index}n(u.length)}var Sr=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),gr=new Map([["type",(r,i)=>{if(i!=="String"&&i!=="Number"&&i!=="Boolean"&&i!=="Array"&&i!=="Object")return!1;return r.type=i,!0}],["reflect",(r,i)=>{if(typeof i!=="boolean")return!1;return r.reflect=i,!0}],["attribute",(r,i)=>{if(typeof i!=="string")return!1;return r.attribute=i,!0}]]),$n="[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}-]",Ar=new RegExp(`^[a-z]${$n}*-${$n}*$`,"u"),yr=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),me=(r)=>(i,a)=>{let o=he(a);if(typeof o!=="boolean")Y(a,"true or false");i[r]=o},Tr=new Map([["runes",me("runes")],["immutable",me("immutable")],["preserveWhitespace",me("preserveWhitespace")],["accessors",me("accessors")],["namespace",(r,i)=>{let a=Sr.get(he(i));if(!a)Y(i,'"html", "mathml" or "svg"');r.namespace=a}],["css",(r,i)=>{if(he(i)!=="injected")Y(i,'"injected"');r.css="injected"}],["tag",(r,i)=>He(i)],["customElement",(r,i)=>{let a=Cr(i);if(a)r.customElement=a}]]);function jn(r){let i=[],a={start:r.start,end:r.end,attributes:i};for(let o of r.attributes){if(o.type!=="Attribute")Xe(o);i.push(o);let u=Tr.get(o.name);if(!u)et(o,o.name);u(a,o)}return a}function he({value:r}){if(r===!0)return!0;let i=Array.isArray(r)?r:[r];if(i.length===0)return!0;if(i.length>1)return null;let[a]=i;if(a.type==="Text")return a.data;return a.expression.type==="Literal"?a.expression.value:null}function Vn(r,i){if(typeof i!=="string")ce(r);if(!i)return;if(!Ar.test(i))ce(r);if(yr.has(i))Ze(r)}function Er(r,i){let a=new Map;for(let o of r.properties){if(o.type!=="Property"||o.computed||o.key.type!=="Identifier")i();if(!a.has(o.key.name))a.set(o.key.name,o.value)}return a}function Cr(r){let i=()=>Qe(r);if(r.value===!0)i();let a=Array.isArray(r.value)?r.value[0]:r.value;if(a.type==="Text"){let E=he(r);return Vn(r,E),{tag:E}}let{expression:o}=a;if(o.type!=="ObjectExpression"){if(o.type==="Literal"&&o.value===null)return;i()}let u=Er(o,i),d={},f=u.get("tag");if(f){let E=f.type==="Literal"?f.value:void 0;Vn(null,E),d.tag=E}let g=u.get("props");if(g){let E=()=>Ye(r);if(g.type!=="ObjectExpression")E();d.props={};for(let b of g.properties){if(b.type!=="Property"||b.computed||b.key.type!=="Identifier"||b.value.type!=="ObjectExpression")E();let _={};d.props[b.key.name]=_;for(let R of b.value.properties){if(R.type!=="Property"||R.computed||R.key.type!=="Identifier"||R.value.type!=="Literal")E();if(!gr.get(R.key.name)?.(_,R.value.value))E()}}}let m=u.get("shadow");if(m)if(m.type==="ObjectExpression")d.shadow=m;else if(m.type==="Literal"&&(m.value==="open"||m.value==="none"))d.shadow=m.value;else Je(r);let x=u.get("extend");if(x)d.extend=x;return d}var br={"{":"}","(":")","[":"]"};function Z(r,i,a=br){let o=Object.values(a),u=[],d=i;while(d<r.length){let f=r[d++];if(f==="'"||f==='"'||f==="`")d=_r(r,d,f);else if(Object.hasOwn(a,f))u.push(f);else if(o.includes(f)){let g=a[u.pop()??""];if(f!==g)c(d-1,g);if(u.length===0)return d}}n(r.length)}function _r(r,i,a){let o=i;while(o<r.length){let u=r[o++];if(u===a)return o;if(u==="\\")o++;else if(a==="`"&&u==="$"&&r[o]==="{")o=Z(r,o)}st(i)}var vr=/\?\s*:/g;function U(r){let i=r.index,a=r.readIdentifierName();if(a.name!==""){let f=Hn(r);return{...a,typeAnnotation:f}}let o=r.source[r.index];if(o!=="{"&&o!=="[")Re(r.index);r.index=Z(r.source,i);let u=ot(r,r.source.slice(0,r.index),i)??Pr(r,i);J(u,"ObjectPattern","ArrayPattern");let d=Hn(r);if(u.typeAnnotation=d,d)u.end=d.end;return u}function Pr(r,i){let{node:a}=A(r,`${r.source.slice(0,r.index)} = 1`,i);return J(a,"AssignmentExpression"),a.left}function Hn(r){let i=r.index;if(r.allowWhitespace(),!r.eat(":")){r.index=i;return}let a="_ as ",o=r.index-a.length,u=r.source.slice(0,o)+a+r.source.slice(r.index).replace(vr,":"),d=A(r,u,o).node;if(d.type==="AssignmentExpression"){let f=d.right.start;while(u[f]!=="=")f-=1;d=A(r,u.slice(0,f),o).node}if(d.type==="SequenceExpression")d=d.expressions[0];return J(d,"TSAsExpression"),r.index=d.end,{type:"TSTypeAnnotation",start:i,end:r.index,typeAnnotation:d.typeAnnotation}}var kr=/\s*}/y,wr={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},O=()=>({type:"Fragment",nodes:[]});function zn(r,i){if(r.eat("if")){r.requireWhitespace();let a=w(r);r.eatClosingBrace();let o=O();r.open({type:"IfBlock",elseif:!1,start:i,end:-1,test:a,consequent:o,alternate:null},o)}else if(r.eat("each"))Nr(r,i);else if(r.eat("await")){r.requireWhitespace();let a=w(r);r.allowWhitespace();let o={type:"AwaitBlock",start:i,end:-1,expression:a,value:null,error:null,pending:null,then:null,catch:null},u=O();if(r.eat("then"))o.value=Xn(r),o.then=u;else if(r.eat("catch"))o.error=Xn(r),o.catch=u;else o.pending=u;r.eat("}",!0),r.open(o,u)}else if(r.eat("key")){r.requireWhitespace();let a=w(r);r.eatClosingBrace();let o=O();r.open({type:"KeyBlock",start:i,end:-1,expression:a,fragment:o},o)}else if(r.eat("snippet"))Br(r,i);else Ie(r.index)}function Xn(r){if(r.matchRegex(kr))return r.allowWhitespace(),null;r.requireWhitespace();let i=U(r);return r.allowWhitespace(),i}function Rr(r){let i={assertion:null},a=r.end,o=(d)=>{if(d.type==="TSAsExpression"&&d.end===r.end)return i.assertion=d,a=d.expression.end,d.expression;return L(d,o),d},u=r;if(r.type==="TSAsExpression")i.assertion=r,u=r.expression,a=u.end;else L(r,o);return u.end=a,{expression:u,assertion:i.assertion}}function Nr(r,i){r.requireWhitespace();let a=r.source,o;while(!o)try{o=w(r)}catch(m){let E=((m instanceof e?m.position:void 0)?.[0]??i)-2;while(E>i&&r.source.slice(E,E+2)!=="as")E-=1;if(E<=i)throw r.source=a,m;r.source=a.slice(0,E)}if(r.source=a,r.allowWhitespace(),!r.match("as")){if(o.type==="SequenceExpression")o=o.expressions[0];let m=Rr(o);if(o=m.expression,m.assertion){let x=m.assertion.typeAnnotation.start-2;while(r.source.slice(x,x+2)!=="as")x-=1;r.index=x}}let u=null,d,f;if(r.eat("as"))r.requireWhitespace(),u=U(r);else r.index=o.end;if(r.allowWhitespace(),r.eat(",")){if(r.allowWhitespace(),d=r.readIdentifierName().name,!d)le(r.index);r.allowWhitespace()}if(r.eat("("))r.allowWhitespace(),f=w(r),r.allowWhitespace(),r.eat(")",!0),r.allowWhitespace();r.eat("}",!0);let g=O();r.open({type:"EachBlock",start:i,end:-1,expression:o,body:g,context:u,index:d,key:f},g)}function Br(r,i){r.requireWhitespace();let a=r.readIdentifierName();if(a.name==="")le(r.index);r.allowWhitespace();let o=r.index,u;if(r.isTypeScript&&r.match("<")){let m=Z(r.source,o,{"<":">"});u=r.source.slice(o+1,m-1),r.index=m}r.allowWhitespace(),r.eat("(",!0);let d=1;while(r.index<r.source.length&&(!r.match(")")||d!==1)){if(r.match("("))d++;if(r.match(")"))d--;r.index+=1}r.eat(")",!0);let{node:f}=A(r,`${r.source.slice(0,r.index)} => {}`,o,!0);r.eatClosingBrace();let g=O();r.open({type:"SnippetBlock",start:i,end:-1,expression:a,typeParams:u,parameters:f.type==="ArrowFunctionExpression"?f.params:void 0,body:g},g)}function Zn(r,i){let a=r.index-1,o=r.current();if(o.type==="IfBlock"){if(!r.eat("else"))c(a,"{:else} or {:else if}");if(r.eat("if"))Se(a);if(r.allowWhitespace(),o.alternate=O(),r.setFragment(o.alternate),r.eat("if")){r.requireWhitespace();let u=w(r);r.eatClosingBrace();let d=O();r.open({start:i,end:-1,type:"IfBlock",elseif:!0,test:u,consequent:d,alternate:null},d)}else r.eatClosingBrace()}else if(o.type==="EachBlock"){if(!r.eat("else"))c(a,"{:else}");r.eatClosingBrace(),o.fallback=O(),r.setFragment(o.fallback)}else if(o.type==="AwaitBlock"){let u;if(r.eat("then"))u="then";else if(r.eat("catch"))u="catch";else c(a,"{:then ...} or {:catch ...}");if(o[u])ge(a,`{:${u}}`);if(!r.eat("}")){r.requireWhitespace();let f=U(r);if(u==="then")o.value=f;else o.error=f;r.eatClosingBrace()}let d=O();o[u]=d,r.setFragment(d)}else be(a)}function Kn(r){let i=r.current(),a=wr[i.type];if(!a)Te(r.index-1);r.eat(a,!0),r.eatClosingBrace();while(i.type==="IfBlock"&&i.elseif)i.end=r.index,r.close(),i=r.current();i.end=r.index,r.close()}var Lr=/\s*}/y;function Or(r){return r.type==="CallExpression"||r.type==="ChainExpression"&&r.expression.type==="CallExpression"}function Qn(r,i){if(r.eat("html")){r.requireWhitespace();let a=w(r);r.eatClosingBrace(),r.append({type:"HtmlTag",start:i,end:r.index,expression:a})}else if(r.eat("debug")){let a=[];if(!r.read(Lr)){let o=w(r),u=o.type==="SequenceExpression"?o.expressions:[o];for(let d of u){if(d.type!=="Identifier")Ce(d.start);a.push(d)}r.eatClosingBrace()}r.append({type:"DebugTag",start:i,end:r.index,identifiers:a})}else if(r.eat("const")){r.requireWhitespace();let a=U(r);r.allowWhitespace(),r.eat("=",!0),r.allowWhitespace();let o=r.index,u=w(r),d=r.index;if(u.type==="SequenceExpression"&&!r.source.slice(o,u.start).includes("("))ke(u);r.eatClosingBrace();let f={type:"VariableDeclarator",id:a,init:u,start:a.start,end:d};r.append({type:"ConstTag",start:i,end:r.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[f],start:i+2,end:r.index-1}})}else if(r.eat("render")){r.requireWhitespace();let a=w(r);if(!Or(a))qe(a);r.eatClosingBrace(),r.append({type:"RenderTag",start:i,end:r.index,expression:a})}else Oe(r.index)}var Dr=/(?:var|interface|enum)\b/y,Wr=/(?:let|const|type)\b/y;function Yn(r){let i=r.index;if(r.index+=1,r.allowWhitespace(),r.eat("#"))zn(r,i);else if(r.eat(":"))Zn(r,i);else if(r.eat("@"))Qn(r,i);else if(r.match("/")&&!r.match("/*")&&!r.match("//"))r.index+=1,Kn(r);else if(!Fr(r,i)){let a=w(r);r.eatClosingBrace(),r.append({type:"ExpressionTag",start:i,end:r.index,expression:a})}}function Fr(r,i){let a=r.index,o=r.matchRegex(Dr);if(o)oe({start:a,end:a+o.length});if(!r.matchRegex(Wr))return!1;let u=r.root.comments.length,d=at(r,r.source,a);if(d.type==="ExpressionStatement")return r.root.comments.length=u,!1;if(d.type!=="VariableDeclaration"||d.kind!=="let"&&d.kind!=="const")oe(d);return r.index=d.end,r.eatClosingBrace(),r.append({type:"DeclarationTag",start:i,end:r.index,declaration:d}),!0}function lt(r){let{source:i,index:a}=r;if(r.nextAngle<a)r.nextAngle=Jn(i,"<",a);if(r.nextBrace<a)r.nextBrace=Jn(i,"{",a);let o=Math.min(r.nextAngle,r.nextBrace);r.index=o;let u=i.slice(a,o);r.append({type:"Text",start:a,end:o,raw:u,data:S(u,!1,r.entityNames)})}function Jn(r,i,a){let o=r.indexOf(i,a);return o===-1?r.length:o}function D(r,i,a){let o=te(r,i,a);while(o.index<o.source.length)re(o);return ie(o)}function te(r,i,a){let o=r.charCodeAt(0)===65279?r.slice(1):r;return T(o),new en(o.trimEnd(),o.length,a,i)}function ie(r){if(r.stack.length>1){let u=r.current();if(u.end=u.start+1,u.type==="RegularElement")Q(u,u.name);Ae(u)}let{nodes:i}=r.root.fragment,a=i.findIndex((u)=>u.type==="SvelteOptions"),o=i[a];if(o?.type==="SvelteOptions"){i.splice(a,1),r.root.options=jn(o);let{nodes:u}=o.fragment;if(u.length>0)ze({start:u[0].start,end:u[u.length-1].end},o.name)}return r.root}function re(r){if(r.match("<"))X(r);else if(r.match("{"))Yn(r);else lt(r)}
|
|
1
|
+
import{B,s,t,V,C,M,l,v,F}from"./shared-40v3xx3k.js";import{T,p,k,L,J}from"./shared-5kdpxrm3.js";import{h,y}from"./shared-zd01zsyh.js";import{e,xe,ge,be,Se,ve,Ae,Te,ke,Ee,we,ne,Ce,Ne,oe,_e,Pe,Le,Ie,Q,ae,Re,le,Oe,$e,c,qe,De,Be,Ve,Me,Fe,We,je,Ue,pe,ze,Ke,Ge,He,Xe,Qe,Y,Ye,Je,Ze,ce,et,tt,it,rt,n,st,nt,ot,P,j,A,at,lt}from"./shared-yxr92tk5.js";import{S}from"./shared-k5pfyxpa.js";import{z}from"./shared-fcgh2ks8.js";var ct=/\r(?!\n)|[\u2028\u2029]/;function K(r,i){let a=r.codePointAt(i);if(a===void 0||!h(a,!0))return i;let o=i+(a<=65535?1:2),u=r.codePointAt(o);while(u!==void 0&&y(u,!0))o+=u<=65535?1:2,u=r.codePointAt(o);return o}class ye{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(r,i,a,o={}){if(this.source=r,this.loc=o.loc??!1,this.lfOnly=this.loc&&!ct.test(r),this.isTypeScript=V(r),this.typescript=a.typescript,this.isTypeScript&&!this.typescript)z();this.entityNames=a.entityNames,this.css=o.css??!0,this.script=o.script??!0,this.comments=o.comments??!0,this.root={type:"Root",start:0,end:i,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(r){if(r.length===1)return this.source.charCodeAt(this.index)===r.charCodeAt(0);return this.source.startsWith(r,this.index)}matchRegex(r){return r.lastIndex=this.index,r.exec(this.source)?.[0]??null}eat(r,i=!1){if(this.match(r))return this.index+=r.length,!0;if(i)c(this.index,r);return!1}read(r){let i=this.matchRegex(r);if(i)this.index+=i.length;return i}readUntil(r){if(this.index>=this.source.length)n(this.source.length);let i=this.source.indexOf(r,this.index),a=i===-1?this.source.length:i,o=this.source.slice(this.index,a);return this.index=a,o}allowWhitespace(){this.index=t(this.source,this.index)}requireWhitespace(){if(!s(this.source.charCodeAt(this.index)))qe(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(r,i){return this.loc?{start:p(r),end:p(i)}:void 0}readIdentifierName(){let r=this.index,i=K(this.source,r),a=this.source.slice(r,i);if(this.index=i,P.has(a))st(r,a);let o={type:"Identifier",name:a,start:r,end:i};if(this.loc)o.loc=this.sourceLocation(r,i);return o}current(){return this.stack[this.stack.length-1]}append(r){this.fragments[this.fragments.length-1].nodes.push(r)}open(r,i){this.append(r),this.stack.push(r),this.fragments.push(i)}setFragment(r){this.fragments[this.fragments.length-1]=r}close(){this.stack.pop(),this.fragments.pop()}}var ut={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function en(r,i,a,o){return{type:"Literal",start:i,end:a,value:o,raw:r.slice(i,a)}}function dn(r,i){let a=r.charCodeAt(i);if(a===34||a===39){for(let u=i+1;u<r.length;u++){let d=r.charCodeAt(u);if(d===a)return en(r,i,u+1,r.slice(i+1,u));if(d===92||d===10||d===13)return null}return null}let o=i;for(;o<r.length;o++){let u=r.charCodeAt(o);if(u<48||u>57)break}if(o===i||a===48&&o-i>1)return null;return en(r,i,o,Number(r.slice(i,o)))}function pt(r,i,a){let o=K(r,i);if(o===i)return dn(r,i);let u=r.slice(i,o);if(u==="true"||u==="false"||u==="null")return en(r,i,o,u==="null"?null:u==="true");if(P.has(u))return null;let d={type:"Identifier",start:i,end:o,name:u};for(let f=o;;){let g=r.charCodeAt(f);if(g===40){let E=dt(r,f+1,a);if(!E)return null;d={type:"CallExpression",start:i,end:E.end,callee:d,arguments:E.arguments,optional:!1},f=E.end;continue}let m,x;if(g===46){if(x=K(r,f+1),x===f+1)return null;m={type:"Identifier",start:f+1,end:x,name:r.slice(f+1,x)}}else if(g===91){if(m=dn(r,f+1),!m||r.charCodeAt(m.end)!==93)return null;x=m.end+1}else return d;d={type:"MemberExpression",start:i,end:x,object:d,property:m,computed:g===91,optional:!1},f=x}}function dt(r,i,a){let o=[],u=t(r,i);if(r.charCodeAt(u)===41)return{arguments:o,end:u+1};for(;;){let d=ee(r,u,a);if(!d)return null;o.push(d),u=t(r,d.end);let f=r.charCodeAt(u);if(f===41)return{arguments:o,end:u+1};if(f!==44)return null;if(u=t(r,u+1),r.charCodeAt(u)===41)return null}}function tn(r,i,a){let o=r.charCodeAt(i),u=r.charCodeAt(i+1);if(!(o===33&&u!==61)&&!(o===45&&u!==45&&u!==61))return pt(r,i,a);let d=tn(r,t(r,i+1),a);if(!d)return null;return{type:"UnaryExpression",start:i,end:d.end,operator:o===33?"!":"-",prefix:!0,argument:d}}function fn(r,i,a){let o=r.charCodeAt(i),u=r.charCodeAt(i+1);switch(o){case 124:return u===124&&r.charCodeAt(i+2)!==61?"||":null;case 38:return u===38&&r.charCodeAt(i+2)!==61?"&&":null;case 63:return u===63&&r.charCodeAt(i+2)!==61?"??":null;case 61:if(u!==61)return null;return r.charCodeAt(i+2)===61?"===":"==";case 33:if(u!==61)return null;return r.charCodeAt(i+2)===61?"!==":"!=";case 60:case 62:if(a||u===o)return null;if(u===61)return o===60?"<=":">=";return o===60?"<":">";case 43:return u===43||u===61?null:"+";case 45:return u===45||u===61?null:"-";case 42:return u===42||u===61?null:"*";case 47:return u===47||u===42||u===61?null:"/";case 37:return u===61?null:"%";default:return null}}function nn(r,i,a,o){if(mn(r.charCodeAt(i.end)))return i;let u=t(r,i.end),d=fn(r,u,o);if(d===null)return i;let f=ut[d];if(f<=a)return i;let g=d==="||"||d==="&&",m=d==="??",x=tn(r,t(r,u+d.length),o);if(!x)return null;let E=nn(r,x,m?2:f,o);if(!E)return null;let b=g||m?{type:"LogicalExpression",start:i.start,end:E.end,left:i,operator:d,right:E}:{type:"BinaryExpression",start:i.start,end:E.end,left:i,operator:d,right:E};if(g||m){let _=fn(r,t(r,b.end),o);if(m?_==="||"||_==="&&":_==="??")return null}return nn(r,b,a,o)}function ee(r,i,a){let o=tn(r,i,a);if(!o)return null;let u=nn(r,o,-1,a);if(!u||mn(r.charCodeAt(u.end)))return u;let d=t(r,u.end);if(r.charCodeAt(d)!==63)return u;let f=r.charCodeAt(d+1);if(f===46||f===63)return null;let g=ee(r,t(r,d+1),a);if(!g)return null;let m=t(r,g.end);if(r.charCodeAt(m)!==58)return null;let x=ee(r,t(r,m+1),a);if(!x)return null;return{type:"ConditionalExpression",start:u.start,end:x.end,test:u,consequent:g,alternate:x}}function mn(r){return r===125||r===41||r===44||r===58}function ft(r,i){let a=t(r,i);if(a>=r.length)return!1;let o=r.charCodeAt(a);return o===125||o===41}function mt(r,i,a){let o=ee(r,i,a);return o&&ft(r,o.end)?o:null}function N(r){switch(r.loc={start:k(r.start),end:k(r.end)},r.type){case"MemberExpression":N(r.object),N(r.property);break;case"CallExpression":N(r.callee);for(let i of r.arguments)N(i);break;case"UnaryExpression":N(r.argument);break;case"BinaryExpression":case"LogicalExpression":N(r.left),N(r.right);break;case"ConditionalExpression":N(r.test),N(r.consequent),N(r.alternate);break}}function w(r){let i=!r.loc||r.lfOnly?mt(r.source,r.index,r.isTypeScript):null;if(i){if(r.index=i.end,r.loc)N(i);return i}let{node:a,end:o}=A(r,r.source,r.index);return r.index=o,a}var hn=/<\/script\s*>/g,ht=new Set(["server","client","worker","test","default"]);function xn(r,i,a){let{source:o,index:u}=r;if(u>=o.length)n(o.length);hn.lastIndex=u;let d=hn.exec(o);if(!d)Q(o.length,"script");r.index=d.index+d[0].length;let f=r.script?j(r,o.slice(0,d.index),u):xt(u,d.index);if(f.start=u,f.loc)Object.assign(f.loc.start,k(i)),Object.assign(f.loc.end,k(r.index));else if(r.loc)f.loc={start:k(i),end:k(r.index)};let g="default";for(let m of a){if(ht.has(m.name))Fe(m,m.name);if(m.name==="module"){if(m.value!==!0)Ve(m,m.name);g="module"}if(m.name==="context"){let x=m.value;if(x===!0||!Array.isArray(x)||x.length!==1||x[0].type!=="Text"||x[0].data!=="module")Me(m);g="module"}}return{type:"Script",start:i,end:r.index,context:g,content:f,attributes:a}}function xt(r,i){return{type:"Program",start:r,end:i,body:[],sourceType:"module"}}var St=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,gt=/\d+(\.\d+)?%/y,At=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,yt=/\s*>/y,W=-1,yn=34,Tt=35,Et=36,Ct=38,Tn=39,bt=40,_t=41,de=42,vt=43,Pt=45,kt=46,En=47,rn=58,wt=59,Rt=60,Sn=61,Nt=62,Bt=91,ln=92,Lt=93,Ot=94,Cn=123,on=124,Dt=125,bn=126,se=[];function _n(r,i,a){let o=r.index;se=[];let u=r.css?Ft(r):Wt(r),d=r.index;return r.eat("</style",!0),r.read(yt),{type:"StyleSheet",start:i,end:r.index,attributes:a,children:u,comments:se,content:{start:o,end:d,styles:r.source.slice(o,d),comment:null}}}function Wt(r){return r.index=M(r.source,r.index),[]}function Ft(r){let i=[];for(;;){if(q(r,!0),r.match("</style")||r.index>=r.source.length)break;i.push(r.match("@")?vn(r):Pn(r))}return i}function vn(r){let i=r.index;r.eat("@",!0);let a=I(r),o=sn(r,!0),u=null;if(r.match("{"))u=Rn(r);else r.eat(";",!0);return{type:"Atrule",start:i,end:r.index,name:a,prelude:o,block:u}}function Pn(r){let i=r.index;return{type:"Rule",prelude:kn(r,!1),block:Rn(r),start:i,end:r.index}}function kn(r,i){let a=[];q(r,!0);let o=r.index;while(r.index<r.source.length){a.push(It(r,i));let u=r.index;if(q(r,!0),r.match(i?")":"{"))return{type:"SelectorList",start:o,end:u,children:a};r.eat(",",!0),q(r,!0)}return n(r.source.length)}function gn(r,i){return{type:"RelativeSelector",combinator:r,selectors:[],start:i,end:-1}}function It(r,i){let{source:a,index:o}=r,u=[],d=gn(null,r.index);while(r.index<a.length){let f=r.index,g=a.charCodeAt(f),m=d.selectors;if(g===Ct)r.index++,m.push({type:"NestingSelector",name:"&",start:f,end:r.index});else if(g===de)r.index++,m.push(An(r,f,"*"));else if(g===Tt)r.index++,m.push({type:"IdSelector",name:I(r),start:f,end:r.index});else if(g===kt)r.index++,m.push({type:"ClassSelector",name:I(r),start:f,end:r.index});else if(g===rn){let _=a.charCodeAt(f+1)===rn;r.index+=_?2:1;let R=I(r),G=null;if(r.eat("("))G=kn(r,!0),r.eat(")",!0);if(_)m.push({type:"PseudoElementSelector",name:R,start:f,end:r.index,...G&&{args:G}});else m.push({type:"PseudoClassSelector",name:R,args:G,start:f,end:r.index})}else if(g===Bt)r.index++,m.push(Mt(r,f));else{let _=i?r.read(St):null,R=!_&&ue(g)?r.read(gt):null;if(_)m.push({type:"Nth",value:_,start:f,end:r.index});else if(R)m.push({type:"Percentage",value:R,start:f,end:r.index});else if(wn(a,f)===0){let G=I(r);m.push(An(r,f,G))}}let x=r.index;q(r,!1);let E=r.match(",")||r.match(i?")":"{");if(r.index=x,E)return d.end=x,u.push(d),{type:"ComplexSelector",start:o,end:x,children:u};let b=Gt(r);if(b){if(d.selectors.length>0)d.end=x,u.push(d);if(d=gn(b,b.start),r.allowWhitespace(),r.match(",")||r.match(i?")":"{"))Ce(r.index)}}return n(a.length)}function An(r,i,a){let o=a,u;if(r.eat("|"))u=o,o=r.eat("*")?"*":I(r);return{type:"TypeSelector",name:o,...u!==void 0&&{namespace:u},start:i,end:r.index}}function Mt(r,i){let a=r.source;r.allowWhitespace();let o=I(r);r.allowWhitespace();let u=null,d=null,f=a.charCodeAt(r.index);if(f===Sn)d="=";else if((f===bn||f===Ot||f===Et||f===de||f===on)&&a.charCodeAt(r.index+1)===Sn)d=a.slice(r.index,r.index+2);if(d)r.index+=d.length,r.allowWhitespace(),u=Vt(r);r.allowWhitespace();let g=r.index;while(Bn(a.charCodeAt(r.index)))r.index++;let m=r.index>g?a.slice(g,r.index):null;return r.allowWhitespace(),r.eat("]",!0),{type:"AttributeSelector",start:i,end:r.index,name:o,matcher:d,value:u,flags:m}}function wn(r,i){let a=r.charCodeAt(i);if(a===vt||a===bn||a===Nt)return 1;if(a===on&&r.charCodeAt(i+1)===on)return 2;return 0}function Gt(r){let i=r.index;r.allowWhitespace();let a=r.index,o=wn(r.source,a);if(o>0){r.index+=o;let u=r.index;return r.allowWhitespace(),{type:"Combinator",name:r.source.slice(a,u),start:a,end:u}}if(r.index!==i)return{type:"Combinator",name:" ",start:i,end:r.index};return null}function Rn(r){let i=r.index;r.eat("{",!0);let a=[];while(r.index<r.source.length){if(q(r,!0),r.match("}"))break;a.push(qt(r))}return r.eat("}",!0),{type:"Block",start:i,end:r.index,children:a}}function qt(r){if(r.match("@"))return vn(r);let i=r.index;sn(r,!1);let a=r.source.charCodeAt(r.index);return r.index=i,a===Cn?Pn(r):Ut(r)}function Ut(r){let{source:i,index:a}=r;if(a>=i.length)n(i.length);let o=a;while(o<i.length){let m=i.charCodeAt(o);if(m===rn||s(m))break;o++}let u=i.slice(a,o);r.index=o,r.allowWhitespace(),r.eat(":");let d=r.index;r.allowWhitespace();let f=sn(r,!0);if(!f&&!u.startsWith("--"))we({start:a,end:d});let g=r.index;if(!r.match("}"))r.eat(";",!0);return{type:"Declaration",start:a,end:g,property:u,value:f}}function sn(r,i){let a=r.source,o=a.length,u="",d=r.index,f=null,g=!1,m=!1,x=W,E=r.index;while(E<o){let b=a.charCodeAt(E);if(g){g=!1,E++;continue}if(b===ln){g=!0,E++;continue}if(b===x)x=W;else if(b===_t)m=!1;else if(x===W&&(b===yn||b===Tn))x=b;else if(b===bt){if($t(a,u,d,E))m=!0}else if((b===wt||b===Cn||b===Dt)&&!m&&x===W){if(r.index=E,!i)return"";if(u+=a.slice(d,E),f){let _=u.length-u.trimStart().length;for(let R of f)R.position=Math.max(0,(R.position??0)-_)}return u.trim()}else if(b===En&&!m&&x===W&&a.charCodeAt(E+1)===de){u+=a.slice(d,E),r.index=E;let _=Nn(r);if(i)_.position=u.length,se.push(_),f??=[],f.push(_);E=r.index,d=E;continue}E++}return r.index=o,n(o)}function $t(r,i,a,o){if(o-a>=3)return r.charCodeAt(o-3)===117&&r.charCodeAt(o-2)===114&&r.charCodeAt(o-1)===108;return(i+r.slice(a,o)).endsWith("url")}function Vt(r){let i=r.source,a=W;if(r.eat('"'))a=yn;else if(r.eat("'"))a=Tn;let o=r.index,u=!1,d=o;while(d<i.length){let f=i.charCodeAt(d);if(u)u=!1;else if(f===ln)u=!0;else if(a===W?f===Lt||s(f):f===a)return r.index=a===W?d:d+1,i.slice(o,d).trim();d++}return r.index=d,n(i.length)}function I(r){let{source:i,index:a}=r,o=i.charCodeAt(a);if(ue(o)||o===Pt&&ue(i.charCodeAt(a+1)))ne(a);let u="",d=a,f=a;while(f<i.length){let g=i.charCodeAt(f);if(g===ln){u+=i.slice(d,f),r.index=f;let m=r.matchRegex(At);if(m){let x=String.fromCodePoint(Number.parseInt(m.slice(1),16));u+=x==="\\"?"\\\\":x,f+=m.length}else u+=`\\${i[f+1]}`,f+=2;d=f}else if(g>=160||jt(g))f++;else break}if(u+=i.slice(d,f),r.index=f,u==="")ne(a);return u}function q(r,i){let a=r.source;r.allowWhitespace();for(;;){let o=a.charCodeAt(r.index);if(o===En&&a.charCodeAt(r.index+1)===de){let u=Nn(r);if(i)se.push(u)}else if(o===Rt&&r.eat("<!--"))r.readUntil("-->"),r.eat("-->",!0);else break;r.allowWhitespace()}}function Nn(r){let i=r.index;r.eat("/*",!0);let a=r.readUntil("*/");return r.eat("*/",!0),{type:"CSSComment",value:a,start:i,end:r.index}}function ue(r){return r>=48&&r<=57}function Bn(r){return r>=65&&r<=90||r>=97&&r<=122}function jt(r){return Bn(r)||ue(r)||r===95||r===45}var cn=/<\/textarea(\s[^>]*)?>/iy,Ht=/^![a-zA-Z]+$/,Xt=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,zt=/^[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,an="\\u200C\\u200D",Zt=new RegExp(`^(?:\\p{Lu}[$${an}\\p{ID_Continue}.]*|\\p{ID_Start}[$${an}\\p{ID_Continue}]*(?:\\.[$${an}\\p{ID_Continue}]+)+)$`,"u"),Kt=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),un=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]]]),Ln=[...un.keys()],Qt=`${Ln.slice(0,-1).join(", ")} or ${Ln.at(-1)}`,Yt=62,On=123;function fe(r,i){let a=r.index;if(a>=r.source.length)n(r.source.length);let o=v(r.source,a,i);return r.index=o,{name:r.source.slice(a,o),start:a,end:o,loc:r.sourceLocation(a,o)}}var H=(r,i,a,o=a)=>({start:r,end:i,type:"Text",raw:a,data:o});function Jt(r){let i=r.charCodeAt(0);if(i>=97&&i<=122&&!r.includes("."))return!1;return Zt.test(r)}function er(r){let i=!0;for(let a=0;a<r.length&&i;a++){let o=r.charCodeAt(a);i=o>=97&&o<=122||a>0&&o>=48&&o<=57}return i&&r.length>0||Ht.test(r)||Xt.test(r)||zt.test(r)}function Dn(r,i){for(let a=r.length-1;a>=0;a--){let o=i(r[a]);if(o!==void 0)return o}return!1}function nr(r,i,a){let o=un.get(i);if(o)return o[0];if(a)return"Component";if(i==="title"){if(Dn(r.stack,({type:d})=>{if(d==="SvelteHead")return!0;return d==="RegularElement"||d==="Component"?!1:void 0}))return"TitleElement"}if(i==="slot"){if(!Dn(r.stack,(d)=>d.type==="RegularElement"&&d.attributes.some((f)=>f.type==="Attribute"&&f.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function X(r){let i=r.index++;if(r.eat("!--")){let a=r.readUntil("-->");r.eat("-->",!0),r.append({type:"Comment",start:i,end:r.index,data:a})}else if(r.eat("/"))tr(r,i);else ir(r,i)}function tr(r,i){let{name:a}=fe(r,!1);if(r.allowWhitespace(),r.eat(">",!0),C(a))ot(i);let o=r.current();while(!("name"in o)||o.name!==a){if(o.type!=="RegularElement"){let u=r.lastAutoClosedTag;if(u?.tag===a)Ie(i,a,u.reason);Le(i,a)}o.end=i,r.close(),o=r.current()}if(o.end=r.index,r.close(),r.stack.length<(r.lastAutoClosedTag?.depth??0))r.lastAutoClosedTag=void 0}function rr(r,i,a){return{type:r,start:i,end:-1,name:a}}function ir(r,i){let a=fe(r,!1),{name:o}=a,u=un.get(o);if(!u&&o.startsWith("svelte:"))He(a,Qt);let d=Jt(o);if(!d&&!er(o))it(a);if(u?.[1]){if(r.metaTags.has(o))ze(i,o);if(r.current().type!=="Root")Ge(i,o);r.metaTags.add(o)}let f=rr(nr(r,o,d),i,o);if(r.loc)f.name_loc=a.loc;f.attributes=[],f.fragment={type:"Fragment",nodes:[]},r.allowWhitespace();let g=r.current();if(g.type==="RegularElement"&&B(g.name,o))g.end=i,r.close(),r.lastAutoClosedTag={tag:g.name,reason:o,depth:r.stack.length};if((o==="script"||o==="style")&&r.current().type==="Root"){let x=[];f.attributes=x,Mn(r,x,ur),lr(r,f,i,x);return}if(Mn(r,f.attributes,dr),f.type==="SvelteComponent"){let x=Wn(f);if(!x)Ue(i);if(!Fn(x.value))je(x.start);f.expression=In(x.value)}else if(f.type==="SvelteElement"){let x=Wn(f);if(!x)pe(i);if(x.value===!0)pe(x);f.tag=Fn(x.value)?In(x.value):ar(x.value[0])}if(!r.eat("/")&&!C(o))if(r.eat(">",!0),o==="textarea")f.fragment.nodes=qn(r,(x,E)=>(cn.lastIndex=E,cn.test(x)),"inside <textarea>"),r.read(cn);else if(o==="script"||o==="style")f.fragment.nodes.push(or(r,`</${o}>`));else{r.open(f,f.fragment);return}else r.eat(">",!0);f.end=r.index,r.append(f)}function or(r,i){let a=r.index,o=r.source.indexOf(i,a);r.index=o===-1?r.source.length:o;let u=H(a,r.index,r.source.slice(a,r.index));return r.eat(i,!0),u}function lr(r,i,a,o){r.eat(">",!0);let u=sr(r.root.fragment.nodes,a);if(i.name==="style"){let g=_n(r,a,o);if(g.content.comment=u,r.root.css)We(a);r.root.css=g;return}let d=xn(r,a,o);if(u&&r.comments)d.content.leadingComments=[{type:"Line",value:u.data}];let f=d.context==="module"?"module":"instance";if(r.root[f])Be(a);r.root[f]=d}function sr(r,i){let a=r.length-1;if(a<0||r[a].end!==i)return null;for(let o=a;o>=0;o--){let u=r[o];if(u.type==="Comment")return u;if(u.type!=="Text"||u.data.trim())return null}return null}var cr=(r)=>r.type==="Attribute"&&r.name==="this";function Wn(r){let i=r.attributes.find(cr);if(i)r.attributes.splice(r.attributes.indexOf(i),1);return i}function Fn(r){if(r===!0)return!1;if(!Array.isArray(r))return!0;return r.length===1&&r[0].type==="ExpressionTag"}function In(r){return(Array.isArray(r)?r[0]:r).expression}function ar(r){if(r.type!=="Text")return r.expression;return{type:"Literal",value:r.data,raw:`'${r.raw}'`,start:r.start,end:r.end}}function Mn(r,i,a){let o=new Set;for(;;){let u=a(r);if(!u)return;let{type:d}=u;if(d==="Attribute"||d==="BindDirective"||d==="StyleDirective"||d==="ClassDirective"){let f=`${d==="BindDirective"?"Attribute":d}${u.name}`;if(o.has(f))xe(u);if(u.name!=="this")o.add(f)}i.push(u),r.allowWhitespace()}}function pn(r,i,a,o,u){return r.loc?{type:"Attribute",start:a,end:o,name:i.name,name_loc:i.loc,value:u}:{type:"Attribute",start:a,end:o,name:i.name,value:u}}function Gn(r){if(l(r.source.charCodeAt(r.index)))c(r.index,"=")}function ur(r){let i=r.index,a=fe(r,!0);if(!a.name)return null;let o=!0;if(r.eat("=")){r.allowWhitespace();let{source:u}=r,d=r.index,f=-1;if(l(u.charCodeAt(d))){let x=u.indexOf(u[d],d+1);if(x!==-1)f=x+1}if(f===-1){f=d;while(f<u.length&&u.charCodeAt(f)!==Yt&&!s(u.charCodeAt(f)))f++;if(f===d)ae(d)}r.index=f;let g=l(u.charCodeAt(d))?1:0,m=u.slice(d+g,f-g);o=[H(f-m.length-g,f-g,m,S(m,!0,r.entityNames))]}return Gn(r),pn(r,a,i,r.index,o)}function pr(r){let i=r.index,a=r.match("/*");if(!a&&!r.match("//"))return!1;r.index+=2;let o=r.readUntil(a?"*/":`
|
|
2
|
+
`);if(a)r.eat("*/");let u={type:a?"Block":"Line",start:i,end:r.index,value:o},d=r.sourceLocation(i,r.index);if(d)u.loc=d;if(r.comments)r.root.comments.push(u);return!0}function dr(r){while(pr(r))r.allowWhitespace();let i=r.index;if(r.eat("{"))return fr(r,i);let a=fe(r,!0);if(!a.name)return null;let o=r.index;r.allowWhitespace();let u=!0;if(r.eat("=")){if(r.allowWhitespace(),r.match("/>"))u=[H(r.index,r.index+1,"/")],r.index++;else u=xr(r);o=r.index}else Gn(r);let d=a.name.indexOf(":"),f=d>0?Kt.get(a.name.slice(0,d)):void 0;return f?hr(r,f,a,d,i,o,u):pn(r,a,i,o,u)}function fr(r,i){if(r.allowWhitespace(),r.eat("@attach")){r.requireWhitespace();let u=w(r);return r.eatClosingBrace(),{type:"AttachTag",start:i,end:r.index,expression:u}}if(r.eat("...")){let u=w(r);return r.eatClosingBrace(),{type:"SpreadAttribute",start:i,end:r.index,expression:u}}let a=r.readIdentifierName();if(a.name==="")ge(i);r.eatClosingBrace();let o={type:"ExpressionTag",start:a.start,end:a.end,expression:a};return pn(r,a,i,r.index,o)}function mr(r){if(r===!0)return;return Array.isArray(r)?r[0]:r}function hr(r,i,a,o,u,d,f){let[g,...m]=a.name.slice(o+1).split("|");if(g==="")Pe({start:u,end:u+o+1},a.name);let x={start:u,end:d,type:i,name:g};if(r.loc)x.name_loc=a.loc;if(i==="StyleDirective")return x.modifiers=m,x.value=f,x;let E=mr(f);if(E&&(Array.isArray(f)&&f.length>1||E.type==="Text"))_e(E.start);if(x.expression=E?.expression??null,x.modifiers=m,i==="TransitionDirective"){let b=a.name.slice(0,o);x.intro=b!=="out",x.outro=b!=="in"}if((i==="BindDirective"||i==="ClassDirective")&&!x.expression)x.expression={start:u+o+1,end:d,type:"Identifier",name:g};return x}function xr(r){let i=r.source.charCodeAt(r.index),a=l(i);if(a){if(r.index++,r.source.charCodeAt(r.index)===i)return r.index++,[H(r.index-1,r.index-1,"")]}let o;try{o=qn(r,a?(u,d)=>u.charCodeAt(d)===i:F,"in attribute value",a?i:void 0)}catch(u){let d=u instanceof e?u.position?.[0]:void 0;if(u instanceof e&&u.code==="js_parse_error"&&d!==void 0&&r.source.startsWith("/>",d-1))r.index=d,c(d,a?String.fromCharCode(i):"}");throw u}if(a)r.index++;else if(o.length===0)ae(r.index);return a||o.length>1||o[0].type==="Text"?o:o[0]}function qn(r,i,a,o){let{source:u}=r,d=[],f=r.index,g=(m)=>{if(m<=f)return;let x=u.slice(f,m);d.push(H(f,m,x,S(x,!0,r.entityNames)))};while(r.index<u.length){let m=r.index;if(i(u,m))return g(m),d;if(u.charCodeAt(m)!==On){if(r.index++,o!==void 0)while(r.index<u.length&&u.charCodeAt(r.index)!==On&&u.charCodeAt(r.index)!==o)r.index++;continue}r.index++;let x=u.charCodeAt(r.index);if(x===35||x===64){r.index++;let b=r.index;while(r.index<u.length&&u.charCodeAt(r.index)>=97&&u.charCodeAt(r.index)<=122)r.index++;let _=u.slice(b,r.index);(x===35?Ae:rt)(m,_,a)}g(m),r.allowWhitespace();let E=w(r);r.eatClosingBrace(),d.push({type:"ExpressionTag",start:m,end:r.index,expression:E}),f=r.index}n(u.length)}var Sr=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),gr=new Map([["type",(r,i)=>{if(i!=="String"&&i!=="Number"&&i!=="Boolean"&&i!=="Array"&&i!=="Object")return!1;return r.type=i,!0}],["reflect",(r,i)=>{if(typeof i!=="boolean")return!1;return r.reflect=i,!0}],["attribute",(r,i)=>{if(typeof i!=="string")return!1;return r.attribute=i,!0}]]),Un="[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}-]",Ar=new RegExp(`^[a-z]${Un}*-${Un}*$`,"u"),yr=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),me=(r)=>(i,a)=>{let o=he(a);if(typeof o!=="boolean")Y(a,"true or false");i[r]=o},Tr=new Map([["runes",me("runes")],["immutable",me("immutable")],["preserveWhitespace",me("preserveWhitespace")],["accessors",me("accessors")],["namespace",(r,i)=>{let a=Sr.get(he(i));if(!a)Y(i,'"html", "mathml" or "svg"');r.namespace=a}],["css",(r,i)=>{if(he(i)!=="injected")Y(i,'"injected"');r.css="injected"}],["tag",(r,i)=>Xe(i)],["customElement",(r,i)=>{let a=Cr(i);if(a)r.customElement=a}]]);function Vn(r){let i=[],a={start:r.start,end:r.end,attributes:i};for(let o of r.attributes){if(o.type!=="Attribute")Qe(o);i.push(o);let u=Tr.get(o.name);if(!u)tt(o,o.name);u(a,o)}return a}function he({value:r}){if(r===!0)return!0;let i=Array.isArray(r)?r:[r];if(i.length===0)return!0;if(i.length>1)return null;let[a]=i;if(a.type==="Text")return a.data;return a.expression.type==="Literal"?a.expression.value:null}function $n(r,i){if(typeof i!=="string")ce(r);if(!i)return;if(!Ar.test(i))ce(r);if(yr.has(i))et(r)}function Er(r,i){let a=new Map;for(let o of r.properties){if(o.type!=="Property"||o.computed||o.key.type!=="Identifier")i();if(!a.has(o.key.name))a.set(o.key.name,o.value)}return a}function Cr(r){let i=()=>Ye(r);if(r.value===!0)i();let a=Array.isArray(r.value)?r.value[0]:r.value;if(a.type==="Text"){let E=he(r);return $n(r,E),{tag:E}}let{expression:o}=a;if(o.type!=="ObjectExpression"){if(o.type==="Literal"&&o.value===null)return;i()}let u=Er(o,i),d={},f=u.get("tag");if(f){let E=f.type==="Literal"?f.value:void 0;$n(null,E),d.tag=E}let g=u.get("props");if(g){let E=()=>Je(r);if(g.type!=="ObjectExpression")E();d.props={};for(let b of g.properties){if(b.type!=="Property"||b.computed||b.key.type!=="Identifier"||b.value.type!=="ObjectExpression")E();let _={};d.props[b.key.name]=_;for(let R of b.value.properties){if(R.type!=="Property"||R.computed||R.key.type!=="Identifier"||R.value.type!=="Literal")E();if(!gr.get(R.key.name)?.(_,R.value.value))E()}}}let m=u.get("shadow");if(m)if(m.type==="ObjectExpression")d.shadow=m;else if(m.type==="Literal"&&(m.value==="open"||m.value==="none"))d.shadow=m.value;else Ze(r);let x=u.get("extend");if(x)d.extend=x;return d}var br={"{":"}","(":")","[":"]"};function Z(r,i,a=br){let o=Object.values(a),u=[],d=i;while(d<r.length){let f=r[d++];if(f==="'"||f==='"'||f==="`")d=_r(r,d,f);else if(Object.hasOwn(a,f))u.push(f);else if(o.includes(f)){let g=a[u.pop()??""];if(f!==g)c(d-1,g);if(u.length===0)return d}}n(r.length)}function _r(r,i,a){let o=i;while(o<r.length){let u=r[o++];if(u===a)return o;if(u==="\\")o++;else if(a==="`"&&u==="$"&&r[o]==="{")o=Z(r,o)}nt(i)}var vr=/\?\s*:/g;function U(r){let i=r.index,a=r.readIdentifierName();if(a.name!==""){let f=jn(r);return{...a,typeAnnotation:f}}let o=r.source[r.index];if(o!=="{"&&o!=="[")Oe(r.index);r.index=Z(r.source,i);let u=at(r,r.source.slice(0,r.index),i)??Pr(r,i);J(u,"ObjectPattern","ArrayPattern");let d=jn(r);if(u.typeAnnotation=d,d)u.end=d.end;return u}function Pr(r,i){let{node:a}=A(r,`${r.source.slice(0,r.index)} = 1`,i);return J(a,"AssignmentExpression"),a.left}function jn(r){let i=r.index;if(r.allowWhitespace(),!r.eat(":")){r.index=i;return}let a="_ as ",o=r.index-a.length,u=r.source.slice(0,o)+a+r.source.slice(r.index).replace(vr,":"),d=A(r,u,o).node;if(d.type==="AssignmentExpression"){let f=d.right.start;while(u[f]!=="=")f-=1;d=A(r,u.slice(0,f),o).node}if(d.type==="SequenceExpression")d=d.expressions[0];return J(d,"TSAsExpression"),r.index=d.end,{type:"TSTypeAnnotation",start:i,end:r.index,typeAnnotation:d.typeAnnotation}}var kr=/\s*}/y,wr={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},O=()=>({type:"Fragment",nodes:[]});function Xn(r,i){if(r.eat("if")){r.requireWhitespace();let a=w(r);r.eatClosingBrace();let o=O();r.open({type:"IfBlock",elseif:!1,start:i,end:-1,test:a,consequent:o,alternate:null},o)}else if(r.eat("each"))Nr(r,i);else if(r.eat("await")){r.requireWhitespace();let a=w(r);r.allowWhitespace();let o={type:"AwaitBlock",start:i,end:-1,expression:a,value:null,error:null,pending:null,then:null,catch:null},u=O();if(r.eat("then"))o.value=Hn(r),o.then=u;else if(r.eat("catch"))o.error=Hn(r),o.catch=u;else o.pending=u;r.eat("}",!0),r.open(o,u)}else if(r.eat("key")){r.requireWhitespace();let a=w(r);r.eatClosingBrace();let o=O();r.open({type:"KeyBlock",start:i,end:-1,expression:a,fragment:o},o)}else if(r.eat("snippet"))Br(r,i);else Re(r.index)}function Hn(r){if(r.matchRegex(kr))return r.allowWhitespace(),null;r.requireWhitespace();let i=U(r);return r.allowWhitespace(),i}function Rr(r){let i={assertion:null},a=r.end,o=(d)=>{if(d.type==="TSAsExpression"&&d.end===r.end)return i.assertion=d,a=d.expression.end,d.expression;return L(d,o),d},u=r;if(r.type==="TSAsExpression")i.assertion=r,u=r.expression,a=u.end;else L(r,o);return u.end=a,{expression:u,assertion:i.assertion}}function Nr(r,i){r.requireWhitespace();let a=r.source,o;while(!o)try{o=w(r)}catch(m){let E=((m instanceof e?m.position:void 0)?.[0]??i)-2;while(E>i&&r.source.slice(E,E+2)!=="as")E-=1;if(E<=i)throw r.source=a,m;r.source=a.slice(0,E)}if(r.source=a,r.allowWhitespace(),!r.match("as")){if(o.type==="SequenceExpression")o=o.expressions[0];let m=Rr(o);if(o=m.expression,m.assertion){let x=m.assertion.typeAnnotation.start-2;while(r.source.slice(x,x+2)!=="as")x-=1;r.index=x}}let u=null,d,f;if(r.eat("as"))r.requireWhitespace(),u=U(r);else r.index=o.end;if(r.allowWhitespace(),r.eat(",")){if(r.allowWhitespace(),d=r.readIdentifierName().name,!d)le(r.index);r.allowWhitespace()}if(r.eat("("))r.allowWhitespace(),f=w(r),r.allowWhitespace(),r.eat(")",!0),r.allowWhitespace();r.eat("}",!0);let g=O();r.open({type:"EachBlock",start:i,end:-1,expression:o,body:g,context:u,index:d,key:f},g)}function Br(r,i){r.requireWhitespace();let a=r.readIdentifierName();if(a.name==="")le(r.index);r.allowWhitespace();let o=r.index,u;if(r.isTypeScript&&r.match("<")){let m=Z(r.source,o,{"<":">"});u=r.source.slice(o+1,m-1),r.index=m}r.allowWhitespace(),r.eat("(",!0);let d=1;while(r.index<r.source.length&&(!r.match(")")||d!==1)){if(r.match("("))d++;if(r.match(")"))d--;r.index+=1}r.eat(")",!0);let{node:f}=A(r,`${r.source.slice(0,r.index)} => {}`,o,!0);r.eatClosingBrace();let g=O();r.open({type:"SnippetBlock",start:i,end:-1,expression:a,typeParams:u,parameters:f.type==="ArrowFunctionExpression"?f.params:void 0,body:g},g)}function zn(r,i){let a=r.index-1,o=r.current();if(o.type==="IfBlock"){if(!r.eat("else"))c(a,"{:else} or {:else if}");if(r.eat("if"))ve(a);if(r.allowWhitespace(),o.alternate=O(),r.setFragment(o.alternate),r.eat("if")){r.requireWhitespace();let u=w(r);r.eatClosingBrace();let d=O();r.open({start:i,end:-1,type:"IfBlock",elseif:!0,test:u,consequent:d,alternate:null},d)}else r.eatClosingBrace()}else if(o.type==="EachBlock"){if(!r.eat("else"))c(a,"{:else}");r.eatClosingBrace(),o.fallback=O(),r.setFragment(o.fallback)}else if(o.type==="AwaitBlock"){let u;if(r.eat("then"))u="then";else if(r.eat("catch"))u="catch";else c(a,"{:then ...} or {:catch ...}");if(o[u])be(a,`{:${u}}`);if(!r.eat("}")){r.requireWhitespace();let f=U(r);if(u==="then")o.value=f;else o.error=f;r.eatClosingBrace()}let d=O();o[u]=d,r.setFragment(d)}else Se(a)}function Zn(r){let i=r.current(),a=wr[i.type];if(!a)ke(r.index-1);r.eat(a,!0),r.eatClosingBrace();while(i.type==="IfBlock"&&i.elseif)i.end=r.index,r.close(),i=r.current();i.end=r.index,r.close()}var Lr=/\s*}/y;function Or(r){return r.type==="CallExpression"||r.type==="ChainExpression"&&r.expression.type==="CallExpression"}function Kn(r,i){if(r.eat("html")){r.requireWhitespace();let a=w(r);r.eatClosingBrace(),r.append({type:"HtmlTag",start:i,end:r.index,expression:a})}else if(r.eat("debug")){let a=[];if(!r.read(Lr)){let o=w(r),u=o.type==="SequenceExpression"?o.expressions:[o];for(let d of u){if(d.type!=="Identifier")Ne(d.start);a.push(d)}r.eatClosingBrace()}r.append({type:"DebugTag",start:i,end:r.index,identifiers:a})}else if(r.eat("const")){r.requireWhitespace();let a=U(r);r.allowWhitespace(),r.eat("=",!0),r.allowWhitespace();let o=r.index,u=w(r),d=r.index;if(u.type==="SequenceExpression"&&!r.source.slice(o,u.start).includes("("))Ee(u);r.eatClosingBrace();let f={type:"VariableDeclarator",id:a,init:u,start:a.start,end:d};r.append({type:"ConstTag",start:i,end:r.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[f],start:i+2,end:r.index-1}})}else if(r.eat("render")){r.requireWhitespace();let a=w(r);if(!Or(a))De(a);r.eatClosingBrace(),r.append({type:"RenderTag",start:i,end:r.index,expression:a})}else $e(r.index)}var Dr=/(?:var|interface|enum)\b/y,Wr=/(?:let|const|type)\b/y;function Qn(r){let i=r.index;if(r.index+=1,r.allowWhitespace(),r.eat("#"))Xn(r,i);else if(r.eat(":"))zn(r,i);else if(r.eat("@"))Kn(r,i);else if(r.match("/")&&!r.match("/*")&&!r.match("//"))r.index+=1,Zn(r);else if(!Fr(r,i)){let a=w(r);r.eatClosingBrace(),r.append({type:"ExpressionTag",start:i,end:r.index,expression:a})}}function Fr(r,i){let a=r.index,o=r.matchRegex(Dr);if(o)oe({start:a,end:a+o.length});if(!r.matchRegex(Wr))return!1;let u=r.root.comments.length,d=lt(r,r.source,a);if(d.type==="ExpressionStatement")return r.root.comments.length=u,!1;if(d.type!=="VariableDeclaration"||d.kind!=="let"&&d.kind!=="const")oe(d);return r.index=d.end,r.eatClosingBrace(),r.append({type:"DeclarationTag",start:i,end:r.index,declaration:d}),!0}function Jn(r){let{source:i,index:a}=r;if(r.nextAngle<a)r.nextAngle=Yn(i,"<",a);if(r.nextBrace<a)r.nextBrace=Yn(i,"{",a);let o=Math.min(r.nextAngle,r.nextBrace);r.index=o;let u=i.slice(a,o);r.append({type:"Text",start:a,end:o,raw:u,data:S(u,!1,r.entityNames)})}function Yn(r,i,a){let o=r.indexOf(i,a);return o===-1?r.length:o}function D(r,i,a){let o=te(r,i,a);while(o.index<o.source.length)re(o);return ie(o)}function te(r,i,a){let o=r.charCodeAt(0)===65279?r.slice(1):r;return T(o),new ye(o.trimEnd(),o.length,a,i)}function ie(r){if(r.stack.length>1){let u=r.current();if(u.end=u.start+1,u.type==="RegularElement")Q(u,u.name);Te(u)}let{nodes:i}=r.root.fragment,a=i.findIndex((u)=>u.type==="SvelteOptions"),o=i[a];if(o?.type==="SvelteOptions"){i.splice(a,1),r.root.options=Vn(o);let{nodes:u}=o.fragment;if(u.length>0)Ke({start:u[0].start,end:u[u.length-1].end},o.name)}return r.root}function re(r){if(r.match("<"))X(r);else if(r.match("{"))Qn(r);else Jn(r)}
|
|
3
3
|
export{X,D,te,ie,re};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{
|
|
2
|
-
https://svelte.dev/e/${r}`);this.code=r,this.reason=s;let l=typeof t==="number"?t:t?.start,m=typeof t==="number"?t:t?.end;if(l!==void 0)this.position=[l,m??l],this.start=p(this.position[0]),this.end=p(this.position[1]),this.frame=re(this.start.line-1,this.end.column)}}var T=(t)=>t.replace(te,(r)=>" ".repeat(r.length));function re(t,r){let s=Math.max(0,t-2),l=[];for(let a=s;a<t+3;a++){let d=
|
|
1
|
+
import{ft,p,dt,mt,f,E,L}from"./shared-5kdpxrm3.js";import{I,K,o}from"./shared-zd01zsyh.js";import{z}from"./shared-fcgh2ks8.js";var te=/^\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 l=typeof t==="number"?t:t?.start,m=typeof t==="number"?t:t?.end;if(l!==void 0)this.position=[l,m??l],this.start=p(this.position[0]),this.end=p(this.position[1]),this.frame=re(this.start.line-1,this.end.column)}}var T=(t)=>t.replace(te,(r)=>" ".repeat(r.length));function re(t,r){let s=Math.max(0,t-2),l=[];for(let a=s;a<t+3;a++){let d=mt(a);if(d===void 0)break;l.push(d)}let m=s+l.length,i=String(m+1).length;return l.map((a,d)=>{let u=String(d+s+1).padStart(i," ");if(s+d!==t)return`${u}: ${T(a)}`;let h=`${" ".repeat(i+2+T(a.slice(0,r)).length)}^`;return`${u}: ${T(a)}
|
|
3
3
|
${h}`}).join(`
|
|
4
|
-
`)}function
|
|
4
|
+
`)}function xe(t){throw new e(t,"attribute_duplicate","Attributes need to be unique")}function ge(t){throw new e(t,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function be(t,r){throw new e(t,"block_duplicate_clause",`${r} cannot appear more than once within a block`)}function Se(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 ve(t){throw new e(t,"block_invalid_elseif","'elseif' should be 'else if'")}function Ae(t,r,s){throw new e(t,"block_invalid_placement",`{#${r} ...} block cannot be ${s}`)}function Te(t){throw new e(t,"block_unclosed","Block was left open")}function ke(t){throw new e(t,"block_unexpected_close","Unexpected block closing tag")}function Ee(t){throw new e(t,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function we(t){throw new e(t,"css_empty_declaration","Declaration cannot be empty")}function ne(t){throw new e(t,"css_expected_identifier","Expected a valid CSS identifier")}function Ce(t){throw new e(t,"css_selector_invalid","Invalid selector")}function Ne(t){throw new e(t,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function oe(t){throw new e(t,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function _e(t){throw new e(t,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function Pe(t,r){throw new e(t,"directive_missing_name",`\`${r}\` name cannot be empty`)}function Le(t,r){throw new e(t,"element_invalid_closing_tag",`\`</${r}>\` attempted to close an element that was not open`)}function Ie(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 Q(t,r){throw new e(t,"element_unclosed",`\`<${r}>\` was left open`)}function ae(t){throw new e(t,"expected_attribute_value","Expected attribute value")}function Re(t){throw new e(t,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function le(t){throw new e(t,"expected_identifier","Expected an identifier")}function Oe(t){throw new e(t,"expected_pattern","Expected identifier or destructure pattern")}function $e(t){throw new e(t,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function c(t,r){throw new e(t,"expected_token",`Expected token ${r}`)}function qe(t){throw new e(t,"expected_whitespace","Expected whitespace")}function B(t,r){throw new e(t,"js_parse_error",`${r}`)}function De(t){throw new e(t,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function Be(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 Ve(t,r){throw new e(t,"script_invalid_attribute_value",`If the \`${r}\` attribute is supplied, it must be a boolean attribute`)}function Me(t){throw new e(t,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function Fe(t,r){throw new e(t,"script_reserved_attribute",`The \`${r}\` attribute is reserved and cannot be used`)}function We(t){throw new e(t,"style_duplicate","A component can have a single top-level `<style>` element")}function je(t){throw new e(t,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function Ue(t){throw new e(t,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function pe(t){throw new e(t,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function ze(t,r){throw new e(t,"svelte_meta_duplicate",`A component can only have one \`<${r}>\` element`)}function Ke(t,r){throw new e(t,"svelte_meta_invalid_content",`<${r}> cannot have children`)}function Ge(t,r){throw new e(t,"svelte_meta_invalid_placement",`\`<${r}>\` tags cannot be inside elements or blocks`)}function He(t,r){throw new e(t,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${r}`)}function Xe(t){throw new e(t,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function Qe(t){throw new e(t,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function Y(t,r){throw new e(t,"svelte_options_invalid_attribute_value",`Value must be ${r}, if specified`)}function Ye(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 Je(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 Ze(t){throw new e(t,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function ce(t){throw new e(t,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function et(t){throw new e(t,"svelte_options_reserved_tagname","Tag name is reserved")}function tt(t,r){throw new e(t,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${r}'`)}function it(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 rt(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 st(t,r){throw new e(t,"unexpected_reserved_word",`'${r}' is a reserved word in JavaScript and cannot be used here`)}function nt(t){throw new e(t,"unterminated_string_constant","Unterminated string constant")}function ot(t){throw new e(t,"void_element_invalid_content","Void elements cannot have children or closing tags")}var w="",F=[],y=0;function V(t,r){w=t,F=r,y=0}function U(){return y}function X(t,r,s,l){y=l}function G(t,r,s,l,m,i){y=l;let a=r;if(t&&a.includes(`
|
|
5
5
|
`)){let u=w.lastIndexOf(`
|
|
6
6
|
`,s-1)+1,h=u,_=w.charCodeAt(h);while(_===32||_===9)_=w.charCodeAt(++h);if(h>u)a=ie(a,w.slice(u,h))}let d={type:t?"Block":"Line",value:a,start:s,end:l};if(m&&i)d.loc={start:m,end:i};F.push(d)}function ie(t,r){let s=t.startsWith(r)?r.length:0,l="",m=t.indexOf(`
|
|
7
7
|
`,s);while(m!==-1){if(l+=t.slice(s,m+1),s=m+1,t.startsWith(r,s))s+=r.length;m=t.indexOf(`
|
|
8
|
-
`,s)}return l+t.slice(s)}function J(t,r,s){let l=0,m=r.length;while(l<m){let i=l+m>>>1;if(r[i].start<s)l=i+1;else m=i}if(l>=r.length)return;if(v=r.slice(l).map(({type:i,value:a,start:d,end:u})=>({type:i,value:a,start:d,end:u})),g=0,O(t,void 0,!1),g<v.length&&(v[g].start>=t.end||t.type==="Program")){t.trailingComments??=[];while(g<v.length)t.trailingComments.push(v[g++])}}var v=[],g=0,se=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function M(t,r){for(let s=t;s<r;s++){let l=w.charCodeAt(s);if(l!==44&&l!==41&&l!==32&&l!==9)return!0}return!1}function O(t,r,s){while(g<v.length&&v[g].start<t.start)t.leadingComments??=[],t.leadingComments.push(v[g++]);if(g>=v.length)return;let l=v[g].start;if(l<t.end||!M(t.end,l)){let m=E(t),i=se.get(t.type),a=i===void 0?void 0:m[i],d=Array.isArray(a)&&a.length===0;for(let u in m){if(g>=v.length)return;if(u==="type")continue;let h=m[u];if(Array.isArray(h)){let _=u===i;for(let x=0;x<h.length;x++){let W=h[x];if(f(W))O(W,t,_?x===h.length-1:d)}}else if(f(h))O(h,t,d)}if(g>=v.length)return}if(r!==void 0&&t.end===r.end)return;if(s)while(g<v.length){if(r&&v[g].start>=r.end)break;t.trailingComments??=[],t.trailingComments.push(v[g++])}else if(t.end<=v[g].start&&!M(t.end,v[g].start))t.trailingComments=[v[g++]]}var P=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 S=!1,k=1,de=2,me=32,fe=256,
|
|
9
|
-
`,a-1)+1,this.curLine=this.options.locations?i.slice(0,this.lineStart).split(_t).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 u=this.context;if(u.length!==1||u[0]!==m)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 x in this.undefinedExports){this.undefinedExports=Object.create(null);break}let h=this.scopeStack,_=h[0];if(h.length!==1||_.flags!==k||_.var.length>0||_.lexical.length>0||_.functions.length>0||_.tsTypes!==void 0||_.tsExportOnly!==void 0||_.tsEnums!==void 0)this.scopeStack=[],this.enterScope(k);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(i,a){let d=super.parseParenAndDistinguishExpression(i,a);if(d.type==="ParenthesizedExpression")S=!0;return d}checkUnreserved(i){if(P.has(i.name))super.checkUnreserved(i)}canInsertSemicolon(){let i=this.type;if(i===s.eof||i===s.braceR)return!0;let a=this.input;for(let d=this.lastTokEnd;d<this.start;d++){let u=a.charCodeAt(d);if(u===10||u===13||u===8232||u===8233)return!0}return!1}checkLocalExport(){}skipSpace(){let i=this.input,a=this.options.locations,d=this.pos,u=i.charCodeAt(d);for(;;)if(u===32||u===9)u=i.charCodeAt(++d);else if(u===10){if(u=i.charCodeAt(++d),a)this.curLine++,this.lineStart=d}else break;if(this.pos=d,u===47||u<33||u>=128)super.skipSpace()}readWord1(){let i=this.input,a=this.pos,d=a,u=i.charCodeAt(d),h=0;while(u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57||u===95||u===36)h=h
|
|
10
|
-
export{e,
|
|
8
|
+
`,s)}return l+t.slice(s)}function J(t,r,s){let l=0,m=r.length;while(l<m){let i=l+m>>>1;if(r[i].start<s)l=i+1;else m=i}if(l>=r.length)return;if(v=r.slice(l).map(({type:i,value:a,start:d,end:u})=>({type:i,value:a,start:d,end:u})),g=0,O(t,void 0,!1),g<v.length&&(v[g].start>=t.end||t.type==="Program")){t.trailingComments??=[];while(g<v.length)t.trailingComments.push(v[g++])}}var v=[],g=0,se=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function M(t,r){for(let s=t;s<r;s++){let l=w.charCodeAt(s);if(l!==44&&l!==41&&l!==32&&l!==9)return!0}return!1}function O(t,r,s){while(g<v.length&&v[g].start<t.start)t.leadingComments??=[],t.leadingComments.push(v[g++]);if(g>=v.length)return;let l=v[g].start;if(l<t.end||!M(t.end,l)){let m=E(t),i=se.get(t.type),a=i===void 0?void 0:m[i],d=Array.isArray(a)&&a.length===0;for(let u in m){if(g>=v.length)return;if(u==="type")continue;let h=m[u];if(Array.isArray(h)){let _=u===i;for(let x=0;x<h.length;x++){let W=h[x];if(f(W))O(W,t,_?x===h.length-1:d)}}else if(f(h))O(h,t,d)}if(g>=v.length)return}if(r!==void 0&&t.end===r.end)return;if(s)while(g<v.length){if(r&&v[g].start>=r.end)break;t.trailingComments??=[],t.trailingComments.push(v[g++])}else if(t.end<=v[g].start&&!M(t.end,v[g].start))t.trailingComments=[v[g++]]}var P=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 S=!1,k=1,de=2,me=32,fe=256,ye=k|de|fe,ct=2,ut=3,ht=4,_t=/\r\n?|\n|\u2028|\u2029/,q=new Map;function N(t){if(!(t instanceof RegExp))return t;let r=q.get(t);if(!r){let s=new Set(t.source.slice(4,-2).split("|"));r={test:(l)=>s.has(l)},q.set(t,r)}return r}var he=I((t)=>class extends t{declareName(r,s,l){let m=!1;if(s===ct){let i=this.currentScope();if(m=o(i.lexical,r)||o(i.functions,r)||o(i.var,r),i.lexical.push(r),this.inModule&&i.flags&k)delete this.undefinedExports[r]}else if(s===ht)this.currentScope().lexical.push(r);else if(s===ut){let i=this.currentScope();m=this.treatFunctionsAsVar?o(i.lexical,r):o(i.lexical,r)||o(i.var,r),i.functions.push(r)}else for(let i=this.scopeStack.length-1;i>=0;--i){let a=this.scopeStack[i];if(o(a.lexical,r)&&!(a.flags&me&&a.lexical[0]===r)||!this.treatFunctionsAsVarInScope(a)&&o(a.functions,r)){m=!0;break}if(a.var.push(r),this.inModule&&a.flags&k)delete this.undefinedExports[r];if(a.flags&ye)break}if(m)this.raiseRecoverable(l,`Identifier '${r}' has already been declared`)}}),ue=I((t)=>{let{keywordTypes:r,tokTypes:s}=t.acorn,l=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]])),m;return class extends t{constructor(i,a,d){super(i,a,d);this.keywords=N(this.keywords),this.reservedWords=N(this.reservedWords),this.reservedWordsStrict=N(this.reservedWordsStrict),this.reservedWordsStrictBind=N(this.reservedWordsStrictBind),m??=this.context[0]}reset(i,a,d){if(super.reset?.(i,a,d),this.input=i,this.containsEsc=!1,this.pos=a,d)this.lineStart=a-d.column,this.curLine=d.line;else this.lineStart=i.lastIndexOf(`
|
|
9
|
+
`,a-1)+1,this.curLine=this.options.locations?i.slice(0,this.lineStart).split(_t).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 u=this.context;if(u.length!==1||u[0]!==m)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 x in this.undefinedExports){this.undefinedExports=Object.create(null);break}let h=this.scopeStack,_=h[0];if(h.length!==1||_.flags!==k||_.var.length>0||_.lexical.length>0||_.functions.length>0||_.tsTypes!==void 0||_.tsExportOnly!==void 0||_.tsEnums!==void 0)this.scopeStack=[],this.enterScope(k);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(i,a){let d=super.parseParenAndDistinguishExpression(i,a);if(d.type==="ParenthesizedExpression")S=!0;return d}checkUnreserved(i){if(P.has(i.name))super.checkUnreserved(i)}canInsertSemicolon(){let i=this.type;if(i===s.eof||i===s.braceR)return!0;let a=this.input;for(let d=this.lastTokEnd;d<this.start;d++){let u=a.charCodeAt(d);if(u===10||u===13||u===8232||u===8233)return!0}return!1}checkLocalExport(){}skipSpace(){let i=this.input,a=this.options.locations,d=this.pos,u=i.charCodeAt(d);for(;;)if(u===32||u===9)u=i.charCodeAt(++d);else if(u===10){if(u=i.charCodeAt(++d),a)this.curLine++,this.lineStart=d}else break;if(this.pos=d,u===47||u<33||u>=128)super.skipSpace()}readWord1(){let i=this.input,a=this.pos,d=a,u=i.charCodeAt(d),h=0;while(u>=97&&u<=122||u>=65&&u<=90||u>=48&&u<=57||u===95||u===36)h=Math.imul(h,31)+u|0,u=i.charCodeAt(++d);if(u>=128||u===92)return super.readWord1();return this.containsEsc=!1,this.pos=d,ft(i,a,d,h)}readWord(){let i=this.readWord1();return this.finishToken(l.get(i)??s.name,i)}}}),H=K(he,ue),vt=/ \(\d+:\d+\)$/;function b(t){return t}function Z(t){return t instanceof SyntaxError&&"pos"in t&&typeof t.pos==="number"}function C(t,r,s,l,m,i=t.root.comments.length){let a=t.root.comments;V(r,a);let d={onComment:t.comments?G:X,sourceType:"module",ecmaVersion:16,locations:t.loc,preserveParens:l};if(t.lfOnly)d.startLocation=p(s);let u=t.isTypeScript?t.typescript:H;if(!u)z();let h;try{h=m(u,d)}catch(_){if(!Z(_))throw _;B(_.pos,_.message.replace(vt,""))}if(a.length>i)J(b(h),a,s);return h}function j(t,r,s=0){return b(C(t,r,0,!1,(l,m)=>{if(s>0&&m.locations)m.startLocation=p(s);let i=new l(m,r,s).parse();return i.start=0,i},0))}function gt(t,r){let{column:s}=p(t);return{line:r?dt(t-s)+1:1,column:s}}var xt={count:0},R,wt=(t)=>t.parseExpression();function bt(t,r,s,l,m){let i=R;if(R=void 0,i?.ParserClass===t&&i.onComment===r.onComment&&i.locations===r.locations&&i.parser.reset)i.parser.reset(s,l,r.startLocation);else i={ParserClass:t,onComment:r.onComment,locations:r.locations,parser:new t(r,s,l)};let a=i.parser;a.nextToken();let d=m(a);return a.input="",R=i,d}function ee(t,r,s,l){return xt.count+=1,S=!1,C(t,r,s,!0,(m,i)=>(i.startLocation??=gt(s,i.locations),bt(m,i,r,s,l)))}function A(t,r,s,l=!1){let m=b(ee(t,r,s,wt)),i=Math.max(m.end,U());return{node:S&&!l?D(m):m,end:i}}function at(t,r,s){let l=t.root.comments.length,m=!0,i=ee(t,r,s,(d)=>{let u={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},h=d.parseMaybeConditional(void 0,u);if(d.type!==H.acorn.tokTypes.eof)return m=!1,h;let _=d.toAssignable(h,!1,u);return d.checkLValPattern(_),_});if(!m){t.root.comments.length=l;return}let a=b(i);return S?D(a):a}function lt(t,r,s){return b(C(t,r,s,!1,(l,m)=>{let i=new l(m,r,s);try{return i.nextToken(),i.parseStatement(null,!0,Object.create(null))}catch(a){if(Z(a)&&a.pos===r.length)n(r.length);throw a}}))}function pt(t,r,s){let l=C(t,r,0,!1,(m,i)=>{let a=new m(i,r,0),d=a.startNode(),u=[],h=Object.create(null);return s((_)=>{a.pos=_,a.context=a.initialContext(),a.exprAllowed=!0,a.nextToken();let x=a.parseStatement(null,!0,h);return u.push(x),x.end}),d.body=u,a.finishNode(d,"Program")});return b(l).body}function D(t){let r=t;while(r.type==="ParenthesizedExpression")r=r.expression;return L(r,D),r}
|
|
10
|
+
export{e,xe,ge,be,Se,ve,Ae,Te,ke,Ee,we,ne,Ce,Ne,oe,_e,Pe,Le,Ie,Q,ae,Re,le,Oe,$e,c,qe,De,Be,Ve,Me,Fe,We,je,Ue,pe,ze,Ke,Ge,He,Xe,Qe,Y,Ye,Je,Ze,ce,et,tt,it,rt,n,st,nt,ot,P,he,ue,j,A,at,lt,pt};
|
package/typescript.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-zd01zsyh.js";import"./shared-
|
|
1
|
+
import"./shared-zd01zsyh.js";import"./shared-5kdpxrm3.js";import"./shared-yxr92tk5.js";import"./shared-np5jnnrw.js";import{a}from"./shared-00hyas4z.js";import{ct}from"./shared-fcgh2ks8.js";var t=ct(a);export{t as typescript};
|
package/walk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w,G,R,
|
|
1
|
+
import{w,G,R,yt,fe,d,O}from"./shared-ff56bedk.js";import{xt}from"./shared-5kdpxrm3.js";export{d as SKIP,fe as STOP,xt as createLocator,w as extractIdentifiers,G as isReference,yt as markupVisitorKeys,R as visitorKeys,O as walk};
|
package/shared-96tm9k91.js
DELETED
package/shared-r8yddmex.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{T}from"./shared-bxg3hhpk.js";import{lt}from"./shared-25z9p1fv.js";import{W}from"./shared-rfa6cx21.js";function b(t,r,o){T(t);let e={isTypeScript:r.typescript??!1,typescript:o,loc:!1,comments:!1,root:{comments:[]}};return lt(e,t,(s)=>W(t,r.localExports??!0,s))}
|
|
2
|
-
export{b};
|
package/shared-rf0vnv09.js
DELETED
package/shared-rfa6cx21.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var B={await:1,case:1,default:1,delete:1,extends:1,in:1,instanceof:1,new:1,of:1,return:1,throw:1,typeof:1,void:1,yield:1,do:2,else:2,finally:2,try:2,for:4,if:4,while:4,with:4,import:5,export:6};var P=Array(L(128,0)).fill(null);for(let t of Object.entries(B)){let E=L(t[0].charCodeAt(0),t[0].length),a=P[E]??[];a.push(t),P[E]=a}function L(t,E){return t*11+E}function p(t,E,a){let i=t.charCodeAt(E);if(i>=128||a-E>10)return 3;let A=L(i,a-E),n=P[A];if(n===null)return 3;for(let e=0;e<n.length;e++)if(t.startsWith(n[e][0],E))return n[e][1];return 3}var U=/\s/,V=new Uint8Array(128);for(let t of["az","AZ","09","__","$$","\\\\"])for(let E=t.charCodeAt(0);E<=t.charCodeAt(1);E++)V[E]=1;function r(t){return t>=128?!U.test(String.fromCharCode(t)):V[t]===1}function h(t){return t<128?t===32||t>=9&&t<=13:U.test(String.fromCharCode(t))}function W(t,E,a){let i=t.length,A=M(t,E),n=[],e=t.startsWith("#!")?d(t,2):0,O=0,R=!1,T=!1,o=-1,c=()=>{if(O=0,n.length===0)o=-1};while(e<=A){let f=t.charCodeAt(e);if(f===32||f===10||h(f)){e++;continue}if(f===47){let l=t.charCodeAt(e+1);if(l===47){e=d(t,e+2);continue}if(l===42){let s=t.indexOf("*/",e+2);e=s===-1?i:s+2;continue}}let S=R,w=T;if(R=!1,T=!1,r(f)||f===35){let l=e;e++;while(e<i){let k=t.charCodeAt(e);if(k===92)e+=2;else if(r(k))e++;else break}let s=S?3:p(t,l,e);if(n.length===0&&(s===6?E||K(t,e):s===5&&D(t,e)))e=Math.max(e,a(o!==-1&&s===6?o:l,l)),c();else if(s===6)O=2;else if(s===4)T=!0,O=3;else O=s===1||s===2?s:3;continue}switch(e++,f){case 34:case 39:e=g(t,e,f),O=3;break;case 96:e=b(t,e,n),O=t.charCodeAt(e-1)===123?1:3;break;case 47:{let l=O===3?-1:x(t,e);if(l===-1)O=1;else{e=l;while(e<i&&r(t.charCodeAt(e)))e++;O=3}break}case 40:n.push(w?1:0),O=1;break;case 41:O=n.pop()===1?2:3;break;case 123:n.push(O===1?3:2),O=0;break;case 125:{let l=n.pop();if(l===4)e=b(t,e,n),O=t.charCodeAt(e-1)===123?1:3;else if(l===3)O=3;else c();break}case 59:c();break;case 93:O=3;break;case 46:if(u(t.charCodeAt(e))){while(e<i&&r(t.charCodeAt(e)))e++;O=3}else if(t.startsWith("..",e))e+=2,O=1;else R=!0,O=1;break;case 63:if(t.charCodeAt(e)===46&&!u(t.charCodeAt(e+1)))e++,R=!0;O=1;break;case 33:O=O===3&&!h(t.charCodeAt(e-2))?3:1;break;case 43:case 45:if(t.charCodeAt(e)===f&&O===3)e++;else O=1;break;case 61:if(O=t.charCodeAt(e)===62?2:1,O===2)e++;break;case 64:if(n.length===0&&o===-1)o=e-1;O=1;break;default:O=1}}}function N(t,E,a){let i=t.length,A=[],n=E,e=1,O=!1;while(n<i){let R=t.charCodeAt(n);if(R===32||R===10||h(R)){n++;continue}if(R===47){let o=t.charCodeAt(n+1);if(o===47){n=d(t,n+2);continue}if(o===42){let c=t.indexOf("*/",n+2);n=c===-1?i:c+2;continue}}let T=O;if(O=!1,r(R)||R===35){let o=n;n++;while(n<i){let f=t.charCodeAt(n);if(f===92)n+=2;else if(r(f))n++;else break}if(!T&&a?.(o,n))return-1;let c=T?3:p(t,o,n);e=c===1||c===2||c===4?1:3;continue}switch(n++,R){case 34:case 39:n=g(t,n,R),e=3;break;case 96:n=b(t,n,A),e=t.charCodeAt(n-1)===123?1:3;break;case 47:{let o=e===3?-1:x(t,n);if(o===-1)e=1;else{n=o;while(n<i&&r(t.charCodeAt(n)))n++;e=3}break}case 40:A.push(0),e=1;break;case 41:if(A.length===0)return n-1;A.pop(),e=3;break;case 123:A.push(e===1?3:2),e=0;break;case 125:{if(A.length===0)return n-1;let o=A.pop();if(o===4)n=b(t,n,A),e=t.charCodeAt(n-1)===123?1:3;else e=o===3?3:0;break}case 93:e=3;break;case 46:if(u(t.charCodeAt(n))){while(n<i&&r(t.charCodeAt(n)))n++;e=3}else if(t.startsWith("..",n))n+=2,e=1;else O=!0,e=1;break;case 63:if(t.charCodeAt(n)===46&&!u(t.charCodeAt(n+1)))n++,O=!0;e=1;break;case 33:e=e===3&&!h(t.charCodeAt(n-2))?3:1;break;case 43:case 45:if(t.charCodeAt(n)===R&&e===3)n++;else e=1;break;case 61:if(t.charCodeAt(n)===62)n++;e=1;break;default:e=1}}return i}function u(t){return t>=48&&t<=57}function d(t,E){for(let a=E;a<t.length;a++){let i=t.charCodeAt(a);if(i===10||i===13||i===8232||i===8233)return a}return t.length}function g(t,E,a){for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===a)return i+1;if(A===92)i+=t.startsWith(`\r
|
|
2
|
-
`,i+1)?2:1;else if(A===10||A===13)return i}return t.length}function b(t,E,a){for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===96)return i+1;if(A===92)i++;else if(A===36&&t.charCodeAt(i+1)===123)return a.push(4),i+2}return t.length}function x(t,E){let a=!1;for(let i=E;i<t.length;i++){let A=t.charCodeAt(i);if(A===10||A===13||A===8232||A===8233)return-1;if(A===92)i++;else if(A===91)a=!0;else if(A===93)a=!1;else if(A===47&&!a)return i+1}return-1}function m(t,E){for(let a=E;a<t.length;a++){let i=t.charCodeAt(a);if(h(i))continue;if(i===47){let A=t.charCodeAt(a+1);if(A===47){a=d(t,a+2)-1;continue}if(A===42){let n=t.indexOf("*/",a+2);if(n===-1)return t.length;a=n+1;continue}}return a}return t.length}function _(t,E,a){return t.charCodeAt(E)===a.charCodeAt(0)&&t.startsWith(a,E)&&!r(t.charCodeAt(E+a.length))}function D(t,E){let a=t.charCodeAt(m(t,E));return a!==40&&a!==46}function K(t,E){let a=m(t,E);if(_(t,a,"import"))return!0;if(_(t,a,"type"))a=m(t,a+4);let i=t.charCodeAt(a);if(i===42)return!0;if(i!==123)return!1;for(a++;a<t.length;a++){let A=t.charCodeAt(a);if(A===125)break;if(A===34||A===39)a=g(t,a+1,A)-1;else if(A===47)a=Math.max(a,m(t,a)-1)}return _(t,m(t,a+1),"from")}var C=/import|export/g;function M(t,E){let a=-1;C.lastIndex=0;for(let i=C.exec(t);i!==null;i=C.exec(t)){let A=i.index,n=A+6;if(!r(t.charCodeAt(A-1))&&!r(t.charCodeAt(n))&&(t.charCodeAt(A)===105?D(t,n):E||K(t,n)))a=A}return a}
|
|
3
|
-
export{r,W,N,u,m,_};
|
package/shared-yqw5faw6.js
DELETED