diff --git a/.claude/agents/docs-reviewer.md b/.claude/agents/docs-reviewer.md
new file mode 100644
index 000000000..af0a856e4
--- /dev/null
+++ b/.claude/agents/docs-reviewer.md
@@ -0,0 +1,28 @@
+---
+name: docs-reviewer
+description: "Lean docs reviewer that dispatches reviews docs for a particular skill."
+model: opus
+color: cyan
+---
+
+You are a direct, critical, expert reviewer for React documentation.
+
+Your role is to use given skills to validate given doc pages for consistency, correctness, and adherence to established patterns.
+
+Complete this process:
+
+## Phase 1: Task Creation
+1. CRITICAL: Read the skill requested.
+2. Understand the skill's requirements.
+3. Create a task list to validate skills requirements.
+
+## Phase 2: Validate
+
+1. Read the docs files given.
+2. Review each file with the task list to verify.
+
+## Phase 3: Respond
+
+You must respond with a checklist of the issues you identified, and line number.
+
+DO NOT respond with passed validations, ONLY respond with the problems.
diff --git a/.claude/settings.json b/.claude/settings.json
new file mode 100644
index 000000000..111403183
--- /dev/null
+++ b/.claude/settings.json
@@ -0,0 +1,32 @@
+{
+ "skills": {
+ "suggest": [
+ {
+ "pattern": "src/content/learn/**/*.md",
+ "skill": "docs-writer-learn"
+ },
+ {
+ "pattern": "src/content/reference/**/*.md",
+ "skill": "docs-writer-reference"
+ }
+ ]
+ },
+ "permissions": {
+ "allow": [
+ "Skill(docs-voice)",
+ "Skill(docs-components)",
+ "Skill(docs-sandpack)",
+ "Skill(docs-rsc-sandpack)",
+ "Skill(docs-writer-learn)",
+ "Skill(docs-writer-reference)",
+ "Bash(yarn lint:*)",
+ "Bash(yarn lint-heading-ids:*)",
+ "Bash(yarn lint:fix:*)",
+ "Bash(yarn tsc:*)",
+ "Bash(yarn check-all:*)",
+ "Bash(yarn fix-headings:*)",
+ "Bash(yarn deadlinks:*)",
+ "Bash(yarn prettier:diff:*)"
+ ]
+ }
+}
diff --git a/.claude/skills/docs-components/SKILL.md b/.claude/skills/docs-components/SKILL.md
new file mode 100644
index 000000000..4b75f27a1
--- /dev/null
+++ b/.claude/skills/docs-components/SKILL.md
@@ -0,0 +1,518 @@
+---
+name: docs-components
+description: Comprehensive MDX component patterns (Note, Pitfall, DeepDive, Recipes, etc.) for all documentation types. Authoritative source for component usage, examples, and heading conventions.
+---
+
+# MDX Component Patterns
+
+## Quick Reference
+
+### Component Decision Tree
+
+| Need | Component |
+|------|-----------|
+| Helpful tip or terminology | `` |
+| Common mistake warning | `` |
+| Advanced technical explanation | `` |
+| Canary-only feature | `` or `` |
+| Server Components only | `` |
+| Deprecated API | `` |
+| Experimental/WIP | `` |
+| Visual diagram | `` |
+| Multiple related examples | `` |
+| Interactive code | `` (see `/docs-sandpack`) |
+| Console error display | `` |
+| End-of-page exercises | `` (Learn pages only) |
+
+### Heading Level Conventions
+
+| Component | Heading Level |
+|-----------|---------------|
+| DeepDive title | `####` (h4) |
+| Titled Pitfall | `#####` (h5) |
+| Titled Note | `####` (h4) |
+| Recipe items | `####` (h4) |
+| Challenge items | `####` (h4) |
+
+### Callout Spacing Rules
+
+Callout components (Note, Pitfall, DeepDive) require a **blank line after the opening tag** before content begins.
+
+**Never place consecutively:**
+- `` followed by `` - Combine into one with titled subsections, or separate with prose
+- `` followed by `` - Combine into one, or separate with prose
+
+**Allowed consecutive patterns:**
+- `` followed by `` - OK for multi-part explorations (see useMemo.md)
+- `` followed by `` - OK when DeepDive explains "why" behind the Pitfall
+
+**Separation content:** Prose paragraphs, code examples (Sandpack), or section headers.
+
+**Why:** Consecutive warnings create a "wall of cautions" that overwhelms readers and causes important warnings to be skimmed.
+
+**Incorrect:**
+```mdx
+
+Don't do X.
+
+
+
+Don't do Y.
+
+```
+
+**Correct - combined:**
+```mdx
+
+
+##### Don't do X {/*pitfall-x*/}
+Explanation.
+
+##### Don't do Y {/*pitfall-y*/}
+Explanation.
+
+
+```
+
+**Correct - separated:**
+```mdx
+
+Don't do X.
+
+
+This leads to another common mistake:
+
+
+Don't do Y.
+
+```
+
+---
+
+## ``
+
+Important clarifications, conventions, or tips. Less severe than Pitfall.
+
+### Simple Note
+
+```mdx
+
+
+The optimization of caching return values is known as [_memoization_](https://en.wikipedia.org/wiki/Memoization).
+
+
+```
+
+### Note with Title
+
+Use `####` (h4) heading with an ID.
+
+```mdx
+
+
+#### There is no directive for Server Components. {/*no-directive*/}
+
+A common misunderstanding is that Server Components are denoted by `"use server"`, but there is no directive for Server Components. The `"use server"` directive is for Server Functions.
+
+
+```
+
+### Version-Specific Note
+
+```mdx
+
+
+Starting in React 19, you can render `` as a provider.
+
+In older versions of React, use ``.
+
+
+```
+
+---
+
+## ``
+
+Common mistakes that cause bugs. Use for errors readers will likely make.
+
+### Simple Pitfall
+
+```mdx
+
+
+We recommend defining components as functions instead of classes. [See how to migrate.](#alternatives)
+
+
+```
+
+### Titled Pitfall
+
+Use `#####` (h5) heading with an ID.
+
+```mdx
+
+
+##### Calling different memoized functions will read from different caches. {/*pitfall-different-caches*/}
+
+To access the same cache, components must call the same memoized function.
+
+
+```
+
+### Pitfall with Wrong/Right Code
+
+```mdx
+
+
+##### `useFormStatus` will not return status information for a `;
+}
+```
+
+Instead call `useFormStatus` from inside a component located inside `
+```
+
+---
+
+## ``
+
+Optional deep technical content. **First child must be `####` heading with ID.**
+
+### Standard DeepDive
+
+```mdx
+
+
+#### Is using an updater always preferred? {/*is-updater-preferred*/}
+
+You might hear a recommendation to always write code like `setAge(a => a + 1)` if the state you're setting is calculated from the previous state. There's no harm in it, but it's also not always necessary.
+
+In most cases, there is no difference between these two approaches. React always makes sure that for intentional user actions, like clicks, the `age` state variable would be updated before the next click.
+
+
+```
+
+### Comparison DeepDive
+
+For comparing related concepts:
+
+```mdx
+
+
+#### When should I use `cache`, `memo`, or `useMemo`? {/*cache-memo-usememo*/}
+
+All mentioned APIs offer memoization but differ in what they memoize, who can access the cache, and when their cache is invalidated.
+
+#### `useMemo` {/*deep-dive-usememo*/}
+
+In general, you should use `useMemo` for caching expensive computations in Client Components across renders.
+
+#### `cache` {/*deep-dive-cache*/}
+
+In general, you should use `cache` in Server Components to memoize work that can be shared across components.
+
+
+```
+
+---
+
+## ``
+
+Multiple related examples showing variations. Each recipe needs ``.
+
+```mdx
+
+
+#### Counter (number) {/*counter-number*/}
+
+In this example, the `count` state variable holds a number.
+
+
+{/* code */}
+
+
+
+
+#### Text field (string) {/*text-field-string*/}
+
+In this example, the `text` state variable holds a string.
+
+
+{/* code */}
+
+
+
+
+
+```
+
+**Common titleText/titleId combinations:**
+- "Basic [hookName] examples" / `examples-basic`
+- "Examples of [concept]" / `examples-[concept]`
+- "The difference between [A] and [B]" / `examples-[topic]`
+
+---
+
+## ``
+
+End-of-page exercises. **Learn pages only.** Each challenge needs problem + solution Sandpack.
+
+```mdx
+
+
+#### Fix the bug {/*fix-the-bug*/}
+
+Problem description...
+
+
+Optional hint text.
+
+
+
+{/* problem code */}
+
+
+
+
+Explanation...
+
+
+{/* solution code */}
+
+
+
+
+
+```
+
+**Guidelines:**
+- Only at end of standard Learn pages
+- No Challenges in chapter intros or tutorials
+- Each challenge has `####` heading with ID
+
+---
+
+## ``
+
+For deprecated APIs. Content should explain what to use instead.
+
+### Page-Level Deprecation
+
+```mdx
+
+
+In React 19, `forwardRef` is no longer necessary. Pass `ref` as a prop instead.
+
+`forwardRef` will be deprecated in a future release. Learn more [here](/blog/2024/04/25/react-19#ref-as-a-prop).
+
+
+```
+
+### Method-Level Deprecation
+
+```mdx
+### `componentWillMount()` {/*componentwillmount*/}
+
+
+
+This API has been renamed from `componentWillMount` to [`UNSAFE_componentWillMount`.](#unsafe_componentwillmount)
+
+Run the [`rename-unsafe-lifecycles` codemod](codemod-link) to automatically update.
+
+
+```
+
+---
+
+## ``
+
+For APIs that only work with React Server Components.
+
+### Basic RSC
+
+```mdx
+
+
+`cache` is only for use with [React Server Components](/reference/rsc/server-components).
+
+
+```
+
+### Extended RSC (for Server Functions)
+
+```mdx
+
+
+Server Functions are for use in [React Server Components](/reference/rsc/server-components).
+
+**Note:** Until September 2024, we referred to all Server Functions as "Server Actions".
+
+
+```
+
+---
+
+## `` and ``
+
+For features only available in Canary releases.
+
+### Canary Wrapper (inline in Intro)
+
+```mdx
+
+
+`` lets you group elements without a wrapper node.
+
+Fragments can also accept refs, enabling interaction with underlying DOM nodes.
+
+
+```
+
+### CanaryBadge in Section Headings
+
+```mdx
+### FragmentInstance {/*fragmentinstance*/}
+```
+
+### CanaryBadge in Props Lists
+
+```mdx
+* **optional** `ref`: A ref object from `useRef` or callback function.
+```
+
+### CanaryBadge in Caveats
+
+```mdx
+* If you want to pass `ref` to a Fragment, you can't use the `<>...>` syntax.
+```
+
+---
+
+## ``
+
+Visual explanations of module dependencies, render trees, or data flow.
+
+```mdx
+
+`'use client'` segments the module dependency tree, marking `InspirationGenerator.js` and all dependencies as client-rendered.
+
+```
+
+**Attributes:**
+- `name`: Diagram identifier (used for image file)
+- `height`: Height in pixels
+- `width`: Width in pixels
+- `alt`: Accessible description of the diagram
+
+---
+
+## `` (Use Sparingly)
+
+Numbered callouts in prose. Pairs with code block annotations.
+
+### Syntax
+
+In code blocks:
+```mdx
+```js [[1, 4, "age"], [2, 4, "setAge"], [3, 4, "42"]]
+import { useState } from 'react';
+
+function MyComponent() {
+ const [age, setAge] = useState(42);
+}
+```
+```
+
+Format: `[[step_number, line_number, "text_to_highlight"], ...]`
+
+In prose:
+```mdx
+1. The current state initially set to the initial value.
+2. The `set` function that lets you change it.
+```
+
+### Guidelines
+
+- Maximum 2-3 different colors per explanation
+- Don't highlight every keyword - only key concepts
+- Use for terms in prose, not entire code blocks
+- Maintain consistent usage within a section
+
+✅ **Good use** - highlighting key concepts:
+```mdx
+React will compare the dependencies with the dependencies you passed...
+```
+
+🚫 **Avoid** - excessive highlighting:
+```mdx
+When an Activity boundary is hidden during its initial render...
+```
+
+---
+
+## ``
+
+Display console output (errors, warnings, logs).
+
+```mdx
+
+Uncaught Error: Too many re-renders.
+
+```
+
+**Levels:** `error`, `warning`, `info`
+
+---
+
+## Component Usage by Page Type
+
+### Reference Pages
+
+For component placement rules specific to Reference pages, invoke `/docs-writer-reference`.
+
+Key placement patterns:
+- `` goes before `` at top of page
+- `` goes after `` for page-level deprecation
+- `` goes after method heading for method-level deprecation
+- `` wrapper goes inline within ``
+- `` appears in headings, props lists, and caveats
+
+### Learn Pages
+
+For Learn page structure and patterns, invoke `/docs-writer-learn`.
+
+Key usage patterns:
+- Challenges only at end of standard Learn pages
+- No Challenges in chapter intros or tutorials
+- DeepDive for optional advanced content
+- CodeStep should be used sparingly
+
+### Blog Pages
+
+For Blog page structure and patterns, invoke `/docs-writer-blog`.
+
+Key usage patterns:
+- Generally avoid deep technical components
+- Note and Pitfall OK for clarifications
+- Prefer inline explanations over DeepDive
+
+---
+
+## Other Available Components
+
+**Version/Status:** ``, ``, ``, ``, ``
+
+**Visuals:** ``, ``, ``, ``, ``
+
+**Console:** ``, ``
+
+**Specialized:** ``, ``, ``, ``, ``, ``, `
)}
+```
+
+### Use Realistic Import Paths
+```js
+// ✅ Correct - descriptive path
+import { fetchData } from './your-data-layer';
+
+// 🚫 Wrong - looks like a real npm package
+import { fetchData } from 'cool-data-lib';
+```
+
+### Console.log Labels
+```js
+// ✅ Correct - labeled for clarity
+console.log('User:', user);
+console.log('Component Stack:', errorInfo.componentStack);
+
+// 🚫 Wrong - unlabeled
+console.log(user);
+```
+
+### Keep Delays Reasonable
+```js
+// ✅ Correct - 1-1.5 seconds
+setTimeout(() => setLoading(false), 1000);
+
+// 🚫 Wrong - too long, feels sluggish
+setTimeout(() => setLoading(false), 3000);
+```
+
+## Updating Line Highlights
+
+When modifying code in examples with line highlights (`{2-4}`), **always update the highlight line numbers** to match the new code. Incorrect line numbers cause rendering crashes.
+
+## File Name Conventions
+
+- Capitalize file names for component files: `Gallery.js` not `gallery.js`
+- After initially explaining files are in `src/`, refer to files by name only: `Gallery.js` not `src/Gallery.js`
+
+## Naming Conventions in Code
+
+**Components:** PascalCase
+- `Profile`, `Avatar`, `TodoList`, `PackingList`
+
+**State variables:** Destructured pattern
+- `const [count, setCount] = useState(0)`
+- Booleans: `[isOnline, setIsOnline]`, `[isPacked, setIsPacked]`
+- Status strings: `'typing'`, `'submitting'`, `'success'`, `'error'`
+
+**Event handlers:**
+- `handleClick`, `handleSubmit`, `handleAddTask`
+
+**Props for callbacks:**
+- `onClick`, `onChange`, `onAddTask`, `onSelect`
+
+**Custom Hooks:**
+- `useOnlineStatus`, `useChatRoom`, `useFormInput`
+
+**Reducer actions:**
+- Past tense: `'added'`, `'changed'`, `'deleted'`
+- Snake_case compounds: `'changed_selection'`, `'sent_message'`
+
+**Updater functions:** Single letter
+- `setCount(n => n + 1)`
+
+### Pedagogical Code Markers
+
+**Wrong vs right code:**
+```js
+// 🔴 Avoid: redundant state and unnecessary Effect
+// ✅ Good: calculated during rendering
+```
+
+**Console.log for lifecycle teaching:**
+```js
+console.log('✅ Connecting...');
+console.log('❌ Disconnected.');
+```
+
+### Server/Client Labeling
+
+```js
+// Server Component
+async function Notes() {
+ const notes = await db.notes.getAll();
+}
+
+// Client Component
+"use client"
+export default function Expandable({children}) {
+ const [expanded, setExpanded] = useState(false);
+}
+```
+
+### Bundle Size Annotations
+
+```js
+import marked from 'marked'; // 35.9K (11.2K gzipped)
+import sanitizeHtml from 'sanitize-html'; // 206K (63.3K gzipped)
+```
+
+---
+
+## Sandpack Example Guidelines
+
+### Package.json Rules
+
+**Include package.json when:**
+- Using external npm packages (immer, remarkable, leaflet, toastify-js, etc.)
+- Demonstrating experimental/canary React features
+- Requiring specific React versions (`react: beta`, `react: 19.0.0-rc-*`)
+
+**Omit package.json when:**
+- Example uses only built-in React features
+- No external dependencies needed
+- Teaching basic hooks, state, or components
+
+**Always mark package.json as hidden:**
+```mdx
+```json package.json hidden
+{
+ "dependencies": {
+ "react": "latest",
+ "react-dom": "latest",
+ "react-scripts": "latest",
+ "immer": "1.7.3"
+ }
+}
+```
+```
+
+**Version conventions:**
+- Use `"latest"` for stable features
+- Use exact versions only when compatibility requires it
+- Include minimal dependencies (just what the example needs)
+
+### Hidden File Patterns
+
+**Always hide these file types:**
+
+| File Type | Reason |
+|-----------|--------|
+| `package.json` | Configuration not the teaching point |
+| `sandbox.config.json` | Sandbox setup is boilerplate |
+| `public/index.html` | HTML structure not the focus |
+| `src/data.js` | When it contains sample/mock data |
+| `src/api.js` | When showing API usage, not implementation |
+| `src/styles.css` | When styling is not the lesson |
+| `src/router.js` | Supporting infrastructure |
+| `src/actions.js` | Server action implementation details |
+
+**Rationale:**
+- Reduces cognitive load
+- Keeps focus on the primary concept
+- Creates cleaner, more focused examples
+
+**Example:**
+```mdx
+```js src/data.js hidden
+export const items = [
+ { id: 1, name: 'Item 1' },
+ { id: 2, name: 'Item 2' },
+];
+```
+```
+
+### Active File Patterns
+
+**Mark as active when:**
+- File contains the primary teaching concept
+- Learner should focus on this code first
+- Component demonstrates the hook/pattern being taught
+
+**Effect of the `active` marker:**
+- Sets initial editor tab focus when Sandpack loads
+- Signals "this is what you should study"
+- Works with hidden files to create focused examples
+
+**Most common active file:** `src/index.js` or `src/App.js`
+
+**Example:**
+```mdx
+```js src/App.js active
+// This file will be focused when example loads
+export default function App() {
+ // ...
+}
+```
+```
+
+### File Structure Guidelines
+
+| Scenario | Structure | Reason |
+|----------|-----------|--------|
+| Basic hook usage | Single file | Simple, focused |
+| Teaching imports | 2-3 files | Shows modularity |
+| Context patterns | 4-5 files | Realistic structure |
+| Complex state | 3+ files | Separation of concerns |
+
+**Single File Examples (70% of cases):**
+- Use for simple concepts
+- 50-200 lines typical
+- Best for: Counter, text inputs, basic hooks
+
+**Multi-File Examples (30% of cases):**
+- Use when teaching modularity/imports
+- Use for context patterns (4-5 files)
+- Use when component is reused
+
+**File Naming:**
+- Main component: `App.js` (capitalized)
+- Component files: `Gallery.js`, `Button.js` (capitalized)
+- Data files: `data.js` (lowercase)
+- Utility files: `utils.js` (lowercase)
+- Context files: `TasksContext.js` (named after what they provide)
+
+### Code Size Limits
+
+- Single file: **<200 lines**
+- Multi-file total: **150-300 lines**
+- Main component: **100-150 lines**
+- Supporting files: **20-40 lines each**
+
+### CSS Guidelines
+
+**Always:**
+- Include minimal CSS for demo interactivity
+- Use semantic class names (`.panel`, `.button-primary`, `.panel-dark`)
+- Support light/dark themes when showing UI concepts
+- Keep CSS visible (never hidden)
+
+**Size Guidelines:**
+- Minimal (5-10 lines): Basic button styling, spacing
+- Medium (15-30 lines): Panel styling, form layouts
+- Complex (40+ lines): Only for layout-focused examples
diff --git a/.claude/skills/docs-voice/SKILL.md b/.claude/skills/docs-voice/SKILL.md
new file mode 100644
index 000000000..124e5f048
--- /dev/null
+++ b/.claude/skills/docs-voice/SKILL.md
@@ -0,0 +1,137 @@
+---
+name: docs-voice
+description: Use when writing any React documentation. Provides voice, tone, and style rules for all doc types.
+---
+
+# React Docs Voice & Style
+
+## Universal Rules
+
+- **Capitalize React terms** when referring to the React concept in headings or as standalone concepts:
+ - Core: Hook, Effect, State, Context, Ref, Component, Fragment
+ - Concurrent: Transition, Action, Suspense
+ - Server: Server Component, Client Component, Server Function, Server Action
+ - Patterns: Error Boundary
+ - Canary: Activity, View Transition, Transition Type
+ - **In prose:** Use lowercase when paired with descriptors: "state variable", "state updates", "event handler". Capitalize when the concept stands alone or in headings: "State is isolated and private"
+ - General usage stays lowercase: "the page transitions", "takes an action"
+- **Product names:** ESLint, TypeScript, JavaScript, Next.js (not lowercase)
+- **Bold** for key concepts: **state variable**, **event handler**
+- **Italics** for new terms being defined: *event handlers*
+- **Inline code** for APIs: `useState`, `startTransition`, ``
+- **Avoid:** "simple", "easy", "just", time estimates
+- Frame differences as "capabilities" not "advantages/disadvantages"
+- Avoid passive voice and jargon
+
+## Tone by Page Type
+
+| Type | Tone | Example |
+|------|------|---------|
+| Learn | Conversational | "Here's what that looks like...", "You might be wondering..." |
+| Reference | Technical | "Call `useState` at the top level...", "This Hook returns..." |
+| Blog | Accurate | Focus on facts, not marketing |
+
+**Note:** Pitfall and DeepDive components can use slightly more conversational phrasing ("You might wonder...", "It might be tempting...") even in Reference pages, since they're explanatory asides.
+
+## Avoiding Jargon
+
+**Pattern:** Explain behavior first, then name it.
+
+✅ "React waits until all code in event handlers runs before processing state updates. This is called *batching*."
+
+❌ "React uses batching to process state updates atomically."
+
+**Terms to avoid or explain:**
+| Jargon | Plain Language |
+|--------|----------------|
+| atomic | all-or-nothing, batched together |
+| idempotent | same inputs, same output |
+| deterministic | predictable, same result every time |
+| memoize | remember the result, skip recalculating |
+| referentially transparent | (avoid - describe the behavior) |
+| invariant | rule that must always be true |
+| reify | (avoid - describe what's being created) |
+
+**Allowed technical terms in Reference pages:**
+- "stale closures" - standard JS/React term, can be used in Caveats
+- "stable identity" - React term for consistent object references across renders
+- "reactive" - React term for values that trigger re-renders when changed
+- These don't need explanation in Reference pages (readers are expected to know them)
+
+**Use established analogies sparingly—once when introducing a concept, not repeatedly:**
+
+| Concept | Analogy |
+|---------|---------|
+| Components/React | Kitchen (components as cooks, React as waiter) |
+| Render phases | Restaurant ordering (trigger/render/commit) |
+| State batching | Waiter collecting full order before going to kitchen |
+| State behavior | Snapshot/photograph in time |
+| State storage | React storing state "on a shelf" |
+| State purpose | Component's memory |
+| Pure functions | Recipes (same ingredients → same dish) |
+| Pure functions | Math formulas (y = 2x) |
+| Props | Adjustable "knobs" |
+| Children prop | "Hole" to be filled by parent |
+| Keys | File names in a folder |
+| Curly braces in JSX | "Window into JavaScript" |
+| Declarative UI | Taxi driver (destination, not turn-by-turn) |
+| Imperative UI | Turn-by-turn navigation |
+| State structure | Database normalization |
+| Refs | "Secret pocket" React doesn't track |
+| Effects/Refs | "Escape hatch" from React |
+| Context | CSS inheritance / "Teleportation" |
+| Custom Hooks | Design system |
+
+## Common Prose Patterns
+
+**Wrong vs Right code:**
+```mdx
+\`\`\`js
+// 🚩 Don't mutate state:
+obj.x = 10;
+\`\`\`
+
+\`\`\`js
+// ✅ Replace with new object:
+setObj({ ...obj, x: 10 });
+\`\`\`
+```
+
+**Table comparisons:**
+```mdx
+| passing a function | calling a function |
+| `onClick={handleClick}` | `onClick={handleClick()}` |
+```
+
+**Linking:**
+```mdx
+[Read about state](/learn/state-a-components-memory)
+[See `useState` reference](/reference/react/useState)
+```
+
+## Code Style
+
+- Prefer JSX over createElement
+- Use const/let, never var
+- Prefer named function declarations for top-level functions
+- Arrow functions for callbacks that need `this` preservation
+
+## Version Documentation
+
+When APIs change between versions:
+
+```mdx
+Starting in React 19, render `` as a provider:
+\`\`\`js
+{children}
+\`\`\`
+
+In older versions:
+\`\`\`js
+{children}
+\`\`\`
+```
+
+Patterns:
+- "Starting in React 19..." for new APIs
+- "In older versions of React..." for legacy patterns
diff --git a/.claude/skills/docs-writer-blog/SKILL.md b/.claude/skills/docs-writer-blog/SKILL.md
new file mode 100644
index 000000000..ef28225f8
--- /dev/null
+++ b/.claude/skills/docs-writer-blog/SKILL.md
@@ -0,0 +1,756 @@
+---
+name: docs-writer-blog
+description: Use when writing or editing files in src/content/blog/. Provides blog post structure and conventions.
+---
+
+# Blog Post Writer
+
+## Persona
+
+**Voice:** Official React team voice
+**Tone:** Accurate, professional, forward-looking
+
+## Voice & Style
+
+For tone, capitalization, jargon, and prose patterns, invoke `/docs-voice`.
+
+---
+
+## Frontmatter Schema
+
+All blog posts use this YAML frontmatter structure:
+
+```yaml
+---
+title: "Title in Quotes"
+author: Author Name(s)
+date: YYYY/MM/DD
+description: One or two sentence summary.
+---
+```
+
+### Field Details
+
+| Field | Format | Example |
+|-------|--------|---------|
+| `title` | Quoted string | `"React v19"`, `"React Conf 2024 Recap"` |
+| `author` | Unquoted, comma + "and" for multiple | `The React Team`, `Dan Abramov and Lauren Tan` |
+| `date` | `YYYY/MM/DD` with forward slashes | `2024/12/05` |
+| `description` | 1-2 sentences, often mirrors intro | Summarizes announcement or content |
+
+### Title Patterns by Post Type
+
+| Type | Pattern | Example |
+|------|---------|---------|
+| Release | `"React vX.Y"` or `"React X.Y"` | `"React v19"` |
+| Upgrade | `"React [VERSION] Upgrade Guide"` | `"How to Upgrade to React 18"` |
+| Labs | `"React Labs: [Topic] – [Month Year]"` | `"React Labs: What We've Been Working On – February 2024"` |
+| Conf | `"React Conf [YEAR] Recap"` | `"React Conf 2024 Recap"` |
+| Feature | `"Introducing [Feature]"` or descriptive | `"Introducing react.dev"` |
+| Security | `"[Severity] Security Vulnerability in [Component]"` | `"Critical Security Vulnerability in React Server Components"` |
+
+---
+
+## Author Byline
+
+Immediately after frontmatter, add a byline:
+
+```markdown
+---
+
+Month DD, YYYY by [Author Name](social-link)
+
+---
+```
+
+### Conventions
+
+- Full date spelled out: `December 05, 2024`
+- Team posts link to `/community/team`: `[The React Team](/community/team)`
+- Individual authors link to Twitter/X or Bluesky
+- Multiple authors: Oxford comma before "and"
+- Followed by horizontal rule `---`
+
+**Examples:**
+
+```markdown
+December 05, 2024 by [The React Team](/community/team)
+
+---
+```
+
+```markdown
+May 3, 2023 by [Dan Abramov](https://bsky.app/profile/danabra.mov), [Sophie Alpert](https://twitter.com/sophiebits), and [Andrew Clark](https://twitter.com/acdlite)
+
+---
+```
+
+---
+
+## Universal Post Structure
+
+All blog posts follow this structure:
+
+1. **Frontmatter** (YAML)
+2. **Author byline** with date
+3. **Horizontal rule** (`---`)
+4. **`` component** (1-3 sentences)
+5. **Horizontal rule** (`---`) (optional)
+6. **Main content sections** (H2 with IDs)
+7. **Closing section** (Changelog, Thanks, etc.)
+
+---
+
+## Post Type Templates
+
+### Major Release Announcement
+
+```markdown
+---
+title: "React vX.Y"
+author: The React Team
+date: YYYY/MM/DD
+description: React X.Y is now available on npm! In this post, we'll give an overview of the new features.
+---
+
+Month DD, YYYY by [The React Team](/community/team)
+
+---
+
+
+
+React vX.Y is now available on npm!
+
+
+
+In our [Upgrade Guide](/blog/YYYY/MM/DD/react-xy-upgrade-guide), we shared step-by-step instructions for upgrading. In this post, we'll give an overview of what's new.
+
+- [What's new in React X.Y](#whats-new)
+- [Improvements](#improvements)
+- [How to upgrade](#how-to-upgrade)
+
+---
+
+## What's new in React X.Y {/*whats-new*/}
+
+### Feature Name {/*feature-name*/}
+
+[Problem this solves. Before/after code examples.]
+
+For more information, see the docs for [`Feature`](/reference/react/Feature).
+
+---
+
+## Improvements in React X.Y {/*improvements*/}
+
+### Improvement Name {/*improvement-name*/}
+
+[Description of improvement.]
+
+---
+
+## How to upgrade {/*how-to-upgrade*/}
+
+See [How to Upgrade to React X.Y](/blog/YYYY/MM/DD/react-xy-upgrade-guide) for step-by-step instructions.
+
+---
+
+## Changelog {/*changelog*/}
+
+### React {/*react*/}
+
+* Add `useNewHook` for [purpose]. ([#12345](https://github.com/facebook/react/pull/12345) by [@contributor](https://github.com/contributor))
+
+---
+
+_Thanks to [Name](url) for reviewing this post._
+```
+
+### Upgrade Guide
+
+```markdown
+---
+title: "React [VERSION] Upgrade Guide"
+author: Author Name
+date: YYYY/MM/DD
+description: Step-by-step instructions for upgrading to React [VERSION].
+---
+
+Month DD, YYYY by [Author Name](social-url)
+
+---
+
+
+
+[Summary of upgrade and what this guide covers.]
+
+
+
+
+
+#### Stepping stone version {/*stepping-stone*/}
+
+[If applicable, describe intermediate upgrade steps.]
+
+
+
+In this post, we will guide you through the steps for upgrading:
+
+- [Installing](#installing)
+- [Codemods](#codemods)
+- [Breaking changes](#breaking-changes)
+- [New deprecations](#new-deprecations)
+
+---
+
+## Installing {/*installing*/}
+
+```bash
+npm install --save-exact react@^X.Y.Z react-dom@^X.Y.Z
+```
+
+## Codemods {/*codemods*/}
+
+
+
+#### Run all React [VERSION] codemods {/*run-all-codemods*/}
+
+```bash
+npx codemod@latest react/[VERSION]/migration-recipe
+```
+
+
+
+## Breaking changes {/*breaking-changes*/}
+
+### Removed: `apiName` {/*removed-api-name*/}
+
+`apiName` was deprecated in [Month YYYY (vX.X.X)](link).
+
+```js
+// Before
+[old code]
+
+// After
+[new code]
+```
+
+
+
+Codemod [description]:
+
+```bash
+npx codemod@latest react/[VERSION]/codemod-name
+```
+
+
+
+## New deprecations {/*new-deprecations*/}
+
+### Deprecated: `apiName` {/*deprecated-api-name*/}
+
+[Explanation and migration path.]
+
+---
+
+Thanks to [Contributor](link) for reviewing this post.
+```
+
+### React Labs Research Update
+
+```markdown
+---
+title: "React Labs: What We've Been Working On – [Month Year]"
+author: Author1, Author2, and Author3
+date: YYYY/MM/DD
+description: In React Labs posts, we write about projects in active research and development.
+---
+
+Month DD, YYYY by [Author1](url), [Author2](url), and [Author3](url)
+
+---
+
+
+
+In React Labs posts, we write about projects in active research and development. We've made significant progress since our [last update](/blog/previous-labs-post), and we'd like to share our progress.
+
+
+
+[Optional: Roadmap disclaimer about timelines]
+
+---
+
+## Feature Name {/*feature-name*/}
+
+
+
+`` is now available in React's Canary channel.
+
+
+
+[Description of feature, motivation, current status.]
+
+### Subsection {/*subsection*/}
+
+[Details, examples, use cases.]
+
+---
+
+## Research Area {/*research-area*/}
+
+[Problem space description. Status communication.]
+
+This research is still early. We'll share more when we're further along.
+
+---
+
+_Thanks to [Reviewer](url) for reviewing this post._
+
+Thanks for reading, and see you in the next update!
+```
+
+### React Conf Recap
+
+```markdown
+---
+title: "React Conf [YEAR] Recap"
+author: Author1 and Author2
+date: YYYY/MM/DD
+description: Last week we hosted React Conf [YEAR]. In this post, we'll summarize the talks and announcements.
+---
+
+Month DD, YYYY by [Author1](url) and [Author2](url)
+
+---
+
+
+
+Last week we hosted React Conf [YEAR] [where we announced [key announcements]].
+
+
+
+---
+
+The entire [day 1](youtube-url) and [day 2](youtube-url) streams are available online.
+
+## Day 1 {/*day-1*/}
+
+_[Watch the full day 1 stream here.](youtube-url)_
+
+[Description of day 1 opening and keynote highlights.]
+
+Watch the full day 1 keynote here:
+
+
+
+## Day 2 {/*day-2*/}
+
+_[Watch the full day 2 stream here.](youtube-url)_
+
+[Day 2 summary.]
+
+
+
+## Q&A {/*q-and-a*/}
+
+* [Q&A Title](youtube-url) hosted by [Host](url)
+
+## And more... {/*and-more*/}
+
+We also heard talks including:
+* [Talk Title](youtube-url) by [Speaker](url)
+
+## Thank you {/*thank-you*/}
+
+Thank you to all the staff, speakers, and participants who made React Conf [YEAR] possible.
+
+See you next time!
+```
+
+### Feature/Tool Announcement
+
+```markdown
+---
+title: "Introducing [Feature Name]"
+author: Author Name
+date: YYYY/MM/DD
+description: Today we are announcing [feature]. In this post, we'll explain [what this post covers].
+---
+
+Month DD, YYYY by [Author Name](url)
+
+---
+
+
+
+Today we are [excited/thrilled] to announce [feature]. [What this means for users.]
+
+
+
+---
+
+## tl;dr {/*tldr*/}
+
+* Key announcement point with [relevant link](/path).
+* What users can do now.
+* Availability or adoption information.
+
+## What is [Feature]? {/*what-is-feature*/}
+
+[Explanation of the feature/tool.]
+
+## Why we built this {/*why-we-built-this*/}
+
+[Motivation, history, problem being solved.]
+
+## Getting started {/*getting-started*/}
+
+To install [feature]:
+
+
+npm install package-name
+
+
+[You can find more documentation here.](/path/to/docs)
+
+## What's next {/*whats-next*/}
+
+[Future plans and next steps.]
+
+## Thank you {/*thank-you*/}
+
+[Acknowledgments to contributors.]
+
+---
+
+Thanks to [Reviewer](url) for reviewing this post.
+```
+
+### Security Announcement
+
+```markdown
+---
+title: "[Severity] Security Vulnerability in [Component]"
+author: The React Team
+date: YYYY/MM/DD
+description: Brief summary of the vulnerability. A fix has been published. We recommend upgrading immediately.
+
+---
+
+Month DD, YYYY by [The React Team](/community/team)
+
+---
+
+
+
+[One or two sentences summarizing the vulnerability.]
+
+We recommend upgrading immediately.
+
+
+
+---
+
+On [date], [researcher] reported a security vulnerability that allows [description].
+
+This vulnerability was disclosed as [CVE-YYYY-NNNNN](https://www.cve.org/CVERecord?id=CVE-YYYY-NNNNN) and is rated CVSS [score].
+
+The vulnerability is present in versions [list] of:
+
+* [package-name](https://www.npmjs.com/package/package-name)
+
+## Immediate Action Required {/*immediate-action-required*/}
+
+A fix was introduced in versions [linked versions]. Upgrade immediately.
+
+### Affected frameworks {/*affected-frameworks*/}
+
+[List of affected frameworks with npm links.]
+
+### Vulnerability overview {/*vulnerability-overview*/}
+
+[Technical explanation of the vulnerability.]
+
+## Update Instructions {/*update-instructions*/}
+
+### Framework Name {/*update-framework-name*/}
+
+```bash
+npm install package@version
+```
+
+## Timeline {/*timeline*/}
+
+* **November 29th**: [Researcher] reported the vulnerability.
+* **December 1st**: Fix was created and validated.
+* **December 3rd**: Fix published and CVE disclosed.
+
+## Attribution {/*attribution*/}
+
+Thank you to [Researcher Name](url) for discovering and reporting this vulnerability.
+```
+
+---
+
+## Heading Conventions
+
+### ID Syntax
+
+All headings require IDs using CSS comment syntax:
+
+```markdown
+## Heading Text {/*heading-id*/}
+```
+
+### ID Rules
+
+- Lowercase
+- Kebab-case (hyphens for spaces)
+- Remove special characters (apostrophes, colons, backticks)
+- Concise but descriptive
+
+### Heading Patterns
+
+| Context | Example |
+|---------|---------|
+| Feature section | `## New Feature: Automatic Batching {/*new-feature-automatic-batching*/}` |
+| New hook | `### New hook: \`useActionState\` {/*new-hook-useactionstate*/}` |
+| API in backticks | `### \`\` {/*activity*/}` |
+| Removed API | `#### Removed: \`propTypes\` {/*removed-proptypes*/}` |
+| tl;dr section | `## tl;dr {/*tldr*/}` |
+
+---
+
+## Component Usage Guide
+
+### Blog-Appropriate Components
+
+| Component | Usage in Blog |
+|-----------|---------------|
+| `` | **Required** - Opening summary after byline |
+| `` | Callouts, caveats, important clarifications |
+| `` | Warnings about common mistakes |
+| `` | Optional technical deep dives (use sparingly) |
+| `` | CLI/installation commands |
+| `` | Console error/warning output |
+| `` | Multi-line console output |
+| `` | Conference video embeds |
+| `` | Visual explanations |
+| `` | Auto-generated table of contents |
+
+### `` Pattern
+
+Always wrap opening paragraph:
+
+```markdown
+
+
+React 19 is now available on npm!
+
+
+```
+
+### `` Patterns
+
+**Simple note:**
+```markdown
+
+
+For React Native users, React 18 ships with the New Architecture.
+
+
+```
+
+**Titled note (H4 inside):**
+```markdown
+
+
+#### React 18.3 has also been published {/*react-18-3*/}
+
+To help with the upgrade, we've published `react@18.3`...
+
+
+```
+
+### `` Pattern
+
+```markdown
+
+npm install react@latest react-dom@latest
+
+```
+
+### `` Pattern
+
+```markdown
+
+```
+
+---
+
+## Link Patterns
+
+### Internal Links
+
+| Type | Pattern | Example |
+|------|---------|---------|
+| Blog post | `/blog/YYYY/MM/DD/slug` | `/blog/2024/12/05/react-19` |
+| API reference | `/reference/react/HookName` | `/reference/react/useState` |
+| Learn section | `/learn/topic-name` | `/learn/react-compiler` |
+| Community | `/community/team` | `/community/team` |
+
+### External Links
+
+| Type | Pattern |
+|------|---------|
+| GitHub PR | `[#12345](https://github.com/facebook/react/pull/12345)` |
+| GitHub user | `[@username](https://github.com/username)` |
+| Twitter/X | `[@username](https://x.com/username)` |
+| Bluesky | `[Name](https://bsky.app/profile/handle)` |
+| CVE | `[CVE-YYYY-NNNNN](https://www.cve.org/CVERecord?id=CVE-YYYY-NNNNN)` |
+| npm package | `[package](https://www.npmjs.com/package/package)` |
+
+### "See docs" Pattern
+
+```markdown
+For more information, see the docs for [`useActionState`](/reference/react/useActionState).
+```
+
+---
+
+## Changelog Format
+
+### Bullet Pattern
+
+```markdown
+* Add `useTransition` for concurrent rendering. ([#10426](https://github.com/facebook/react/pull/10426) by [@acdlite](https://github.com/acdlite))
+* Fix `useReducer` observing incorrect props. ([#22445](https://github.com/facebook/react/pull/22445) by [@josephsavona](https://github.com/josephsavona))
+```
+
+**Structure:** `Verb` + backticked API + description + `([#PR](url) by [@user](url))`
+
+**Verbs:** Add, Fix, Remove, Make, Improve, Allow, Deprecate
+
+### Section Organization
+
+```markdown
+## Changelog {/*changelog*/}
+
+### React {/*react*/}
+
+* [changes]
+
+### React DOM {/*react-dom*/}
+
+* [changes]
+```
+
+---
+
+## Acknowledgments Format
+
+### Post-closing Thanks
+
+```markdown
+---
+
+Thanks to [Name](url), [Name](url), and [Name](url) for reviewing this post.
+```
+
+Or italicized:
+
+```markdown
+_Thanks to [Name](url) for reviewing this post._
+```
+
+### Update Notes
+
+For post-publication updates:
+
+```markdown
+
+
+[Updated content]
+
+-----
+
+_Updated January 26, 2026._
+
+
+```
+
+---
+
+## Tone & Length by Post Type
+
+| Type | Tone | Length | Key Elements |
+|------|------|--------|--------------|
+| Release | Celebratory, informative | Medium-long | Feature overview, upgrade link, changelog |
+| Upgrade | Instructional, precise | Long | Step-by-step, codemods, breaking changes |
+| Labs | Transparent, exploratory | Medium | Status updates, roadmap disclaimers |
+| Conf | Enthusiastic, community-focused | Medium | YouTube embeds, speaker credits |
+| Feature | Excited, explanatory | Medium | tl;dr, "why", getting started |
+| Security | Urgent, factual | Short-medium | Immediate action, timeline, CVE |
+
+---
+
+## Do's and Don'ts
+
+**Do:**
+- Focus on facts over marketing
+- Say "upcoming" explicitly for unreleased features
+- Include FAQ sections for major announcements
+- Credit contributors and link to GitHub
+- Use "we" voice for team posts
+- Link to upgrade guides from release posts
+- Include table of contents for long posts
+- End with acknowledgments
+
+**Don't:**
+- Promise features not yet available
+- Rewrite history (add update notes instead)
+- Break existing URLs
+- Use hyperbolic language ("revolutionary", "game-changing")
+- Skip the `` component
+- Forget heading IDs
+- Use heavy component nesting in blogs
+- Make time estimates or predictions
+
+---
+
+## Updating Old Posts
+
+- Never break existing URLs; add redirects when URLs change
+- Don't rewrite history; add update notes instead:
+ ```markdown
+
+
+ [Updated information]
+
+ -----
+
+ _Updated Month Year._
+
+
+ ```
+
+---
+
+## Critical Rules
+
+1. **Heading IDs required:** `## Title {/*title-id*/}`
+2. **`` required:** Every post starts with `` component
+3. **Byline required:** Date + linked author(s) after frontmatter
+4. **Date format:** Frontmatter uses `YYYY/MM/DD`, byline uses `Month DD, YYYY`
+5. **Link to docs:** New APIs must link to reference documentation
+6. **Security posts:** Always include "We recommend upgrading immediately"
+
+---
+
+## Components Reference
+
+For complete MDX component patterns, invoke `/docs-components`.
+
+Blog posts commonly use: ``, ``, ``, ``, ``, ``, ``, ``.
+
+Prefer inline explanations over heavy component usage.
diff --git a/.claude/skills/docs-writer-learn/SKILL.md b/.claude/skills/docs-writer-learn/SKILL.md
new file mode 100644
index 000000000..57dc9ef74
--- /dev/null
+++ b/.claude/skills/docs-writer-learn/SKILL.md
@@ -0,0 +1,299 @@
+---
+name: docs-writer-learn
+description: Use when writing or editing files in src/content/learn/. Provides Learn page structure and tone.
+---
+
+# Learn Page Writer
+
+## Persona
+
+**Voice:** Patient teacher guiding a friend through concepts
+**Tone:** Conversational, warm, encouraging
+
+## Voice & Style
+
+For tone, capitalization, jargon, and prose patterns, invoke `/docs-voice`.
+
+## Page Structure Variants
+
+### 1. Standard Learn Page (Most Common)
+
+```mdx
+---
+title: Page Title
+---
+
+
+1-3 sentences introducing the concept. Use *italics* for new terms.
+
+
+
+
+* Learning outcome 1
+* Learning outcome 2
+* Learning outcome 3-5
+
+
+
+## Section Name {/*section-id*/}
+
+Content with Sandpack examples, Pitfalls, Notes, DeepDives...
+
+## Another Section {/*another-section*/}
+
+More content...
+
+
+
+* Summary point 1
+* Summary point 2
+* Summary points 3-9
+
+
+
+
+
+#### Challenge title {/*challenge-id*/}
+
+Description...
+
+
+Optional guidance (single paragraph)
+
+
+
+{/* Starting code */}
+
+
+
+Explanation...
+
+
+{/* Fixed code */}
+
+
+
+
+```
+
+### 2. Chapter Introduction Page
+
+For pages that introduce a chapter (like describing-the-ui.md, managing-state.md):
+
+```mdx
+
+
+* [Sub-page title](/learn/sub-page-name) to learn...
+* [Another page](/learn/another-page) to learn...
+
+
+
+## Preview Section {/*section-id*/}
+
+Preview description with mini Sandpack example
+
+
+
+Read **[Page Title](/learn/sub-page-name)** to learn how to...
+
+
+
+## What's next? {/*whats-next*/}
+
+Head over to [First Page](/learn/first-page) to start reading this chapter page by page!
+```
+
+**Important:** Chapter intro pages do NOT include `` or `` sections.
+
+### 3. Tutorial Page
+
+For step-by-step tutorials (like tutorial-tic-tac-toe.md):
+
+```mdx
+
+Brief statement of what will be built
+
+
+
+Alternative learning path offered
+
+
+Table of contents (prose listing of major sections)
+
+## Setup {/*setup*/}
+...
+
+## Main Content {/*main-content*/}
+Progressive code building with ### subsections
+
+No YouWillLearn, Recap, or Challenges
+
+Ends with ordered list of "extra credit" improvements
+```
+
+### 4. Reference-Style Learn Page
+
+For pages with heavy API documentation (like typescript.md):
+
+```mdx
+
+
+* [Link to section](#section-anchor)
+* [Link to another section](#another-section)
+
+
+
+## Sections with ### subsections
+
+## Further learning {/*further-learning*/}
+
+No Recap or Challenges
+```
+
+## Heading ID Conventions
+
+All headings require IDs in `{/*kebab-case*/}` format:
+
+```markdown
+## Section Title {/*section-title*/}
+### Subsection Title {/*subsection-title*/}
+#### DeepDive Title {/*deepdive-title*/}
+```
+
+**ID Generation Rules:**
+- Lowercase everything
+- Replace spaces with hyphens
+- Remove apostrophes, quotes
+- Remove or convert special chars (`:`, `?`, `!`, `.`, parentheses)
+
+**Examples:**
+- "What's React?" → `{/*whats-react*/}`
+- "Step 1: Create the context" → `{/*step-1-create-the-context*/}`
+- "Conditional (ternary) operator (? :)" → `{/*conditional-ternary-operator--*/}`
+
+## Teaching Patterns
+
+### Problem-First Teaching
+
+Show broken/problematic code BEFORE the solution:
+
+1. Present problematic approach with `// 🔴 Avoid:` comment
+2. Explain WHY it's wrong (don't just say it is)
+3. Show the solution with `// ✅ Good:` comment
+4. Invite experimentation
+
+### Progressive Complexity
+
+Build understanding in layers:
+1. Show simplest working version
+2. Identify limitation or repetition
+3. Introduce solution incrementally
+4. Show complete solution
+5. Invite experimentation: "Try changing..."
+
+### Numbered Step Patterns
+
+For multi-step processes:
+
+**As section headings:**
+```markdown
+### Step 1: Action to take {/*step-1-action*/}
+### Step 2: Next action {/*step-2-next-action*/}
+```
+
+**As inline lists:**
+```markdown
+To implement this:
+1. **Declare** `inputRef` with the `useRef` Hook.
+2. **Pass it** as ``.
+3. **Read** the input DOM node from `inputRef.current`.
+```
+
+### Interactive Invitations
+
+After Sandpack examples, encourage experimentation:
+- "Try changing X to Y. See how...?"
+- "Try it in the sandbox above!"
+- "Click each button separately:"
+- "Have a guess!"
+- "Verify that..."
+
+### Decision Questions
+
+Help readers build intuition:
+> "When you're not sure whether some code should be in an Effect or in an event handler, ask yourself *why* this code needs to run."
+
+## Component Placement Order
+
+1. `` - First after frontmatter
+2. `` - After Intro (standard/chapter pages)
+3. Body content with ``, ``, `` placed contextually
+4. `` - Before Challenges (standard pages only)
+5. `` - End of page (standard pages only)
+
+For component structure and syntax, invoke `/docs-components`.
+
+## Code Examples
+
+For Sandpack file structure, naming conventions, code style, and pedagogical markers, invoke `/docs-sandpack`.
+
+## Cross-Referencing
+
+### When to Link
+
+**Link to /learn:**
+- Explaining concepts or mental models
+- Teaching how things work together
+- Tutorials and guides
+- "Why" questions
+
+**Link to /reference:**
+- API details, Hook signatures
+- Parameter lists and return values
+- Rules and restrictions
+- "What exactly" questions
+
+### Link Formats
+
+```markdown
+[concept name](/learn/page-name)
+[`useState`](/reference/react/useState)
+[section link](/learn/page-name#section-id)
+[MDN](https://developer.mozilla.org/...)
+```
+
+## Section Dividers
+
+**Important:** Learn pages typically do NOT use `---` dividers. The heading hierarchy provides sufficient structure. Only consider dividers in exceptional cases like separating main content from meta/contribution sections.
+
+## Do's and Don'ts
+
+**Do:**
+- Use "you" to address the reader
+- Show broken code before fixes
+- Explain behavior before naming concepts
+- Build concepts progressively
+- Include interactive Sandpack examples
+- Use established analogies consistently
+- Place Pitfalls AFTER explaining concepts
+- Invite experimentation with "Try..." phrases
+
+**Don't:**
+- Use "simple", "easy", "just", or time estimates
+- Reference concepts not yet introduced
+- Skip required components for page type
+- Use passive voice without reason
+- Place Pitfalls before teaching the concept
+- Use `---` dividers between sections
+- Create unnecessary abstraction in examples
+- Place consecutive Pitfalls or Notes without separating prose (combine or separate)
+
+## Critical Rules
+
+1. **All headings require IDs:** `## Title {/*title-id*/}`
+2. **Chapter intros use `isChapter={true}` and ``**
+3. **Tutorial pages omit YouWillLearn/Recap/Challenges**
+4. **Problem-first teaching:** Show broken → explain → fix
+5. **No consecutive Pitfalls/Notes:** See `/docs-components` Callout Spacing Rules
+
+For component patterns, invoke `/docs-components`. For Sandpack patterns, invoke `/docs-sandpack`.
diff --git a/.claude/skills/docs-writer-reference/SKILL.md b/.claude/skills/docs-writer-reference/SKILL.md
new file mode 100644
index 000000000..89e087c72
--- /dev/null
+++ b/.claude/skills/docs-writer-reference/SKILL.md
@@ -0,0 +1,885 @@
+---
+name: docs-writer-reference
+description: Reference page structure, templates, and writing patterns for src/content/reference/. For components, see /docs-components. For code examples, see /docs-sandpack.
+---
+
+# Reference Page Writer
+
+## Quick Reference
+
+### Page Type Decision Tree
+
+1. Is it a Hook? Use **Type A (Hook/Function)**
+2. Is it a React component (``)? Use **Type B (Component)**
+3. Is it a compiler configuration option? Use **Type C (Configuration)**
+4. Is it a directive (`'use something'`)? Use **Type D (Directive)**
+5. Is it an ESLint rule? Use **Type E (ESLint Rule)**
+6. Is it listing multiple APIs? Use **Type F (Index/Category)**
+
+### Component Selection
+
+For component selection and patterns, invoke `/docs-components`.
+
+---
+
+## Voice & Style
+
+**Voice:** Authoritative technical reference writer
+**Tone:** Precise, comprehensive, neutral
+
+For tone, capitalization, jargon, and prose patterns, invoke `/docs-voice`.
+
+**Do:**
+- Start with single-line description: "`useState` is a React Hook that lets you..."
+- Include Parameters, Returns, Caveats sections for every API
+- Document edge cases most developers will encounter
+- Use section dividers between major sections
+- Include "See more examples below" links
+- Be assertive, not hedging - "This is designed for..." not "This helps avoid issues with..."
+- State facts, not benefits - "The callback always accesses the latest values" not "This helps avoid stale closures"
+- Use minimal but meaningful names - `onEvent` or `onTick` over `onSomething`
+
+**Don't:**
+- Skip the InlineToc component
+- Omit error cases or caveats
+- Use conversational language
+- Mix teaching with reference (that's Learn's job)
+- Document past bugs or fixed issues
+- Include niche edge cases (e.g., `this` binding, rare class patterns)
+- Add phrases explaining "why you'd want this" - the Usage section examples do that
+- Exception: Pitfall and DeepDive asides can use slightly conversational phrasing
+
+---
+
+## Page Templates
+
+### Type A: Hook/Function
+
+**When to use:** Documenting React hooks and standalone functions (useState, useEffect, memo, lazy, etc.)
+
+```mdx
+---
+title: hookName
+---
+
+
+
+`hookName` is a React Hook that lets you [brief description].
+
+```js
+const result = hookName(arg)
+```
+
+
+
+
+
+---
+
+## Reference {/*reference*/}
+
+### `hookName(arg)` {/*hookname*/}
+
+Call `hookName` at the top level of your component to...
+
+```js
+[signature example with annotations]
+```
+
+[See more examples below.](#usage)
+
+#### Parameters {/*parameters*/}
+* `arg`: Description of the parameter.
+
+#### Returns {/*returns*/}
+Description of return value.
+
+#### Caveats {/*caveats*/}
+* Important caveat about usage.
+
+---
+
+## Usage {/*usage*/}
+
+### Common Use Case {/*common-use-case*/}
+Explanation with Sandpack examples...
+
+---
+
+## Troubleshooting {/*troubleshooting*/}
+
+### Common Problem {/*common-problem*/}
+How to solve it...
+```
+
+---
+
+### Type B: Component
+
+**When to use:** Documenting React components (Suspense, Fragment, Activity, StrictMode)
+
+```mdx
+---
+title:
+---
+
+
+
+`` lets you [primary action].
+
+```js
+
+
+
+```
+
+
+
+
+
+---
+
+## Reference {/*reference*/}
+
+### `` {/*componentname*/}
+
+[Component purpose and behavior]
+
+#### Props {/*props*/}
+
+* `propName`: Description of the prop...
+* **optional** `optionalProp`: Description...
+
+#### Caveats {/*caveats*/}
+
+* [Caveats specific to this component]
+```
+
+**Key differences from Hook pages:**
+- Title uses JSX syntax: ``
+- Uses `#### Props` instead of `#### Parameters`
+- Reference heading uses JSX: `` ### `` ``
+
+---
+
+### Type C: Configuration
+
+**When to use:** Documenting React Compiler configuration options
+
+```mdx
+---
+title: optionName
+---
+
+
+
+The `optionName` option [controls/specifies/determines] [what it does].
+
+
+
+```js
+{
+ optionName: 'value' // Quick example
+}
+```
+
+
+
+---
+
+## Reference {/*reference*/}
+
+### `optionName` {/*optionname*/}
+
+[Description of the option's purpose]
+
+#### Type {/*type*/}
+
+```
+'value1' | 'value2' | 'value3'
+```
+
+#### Default value {/*default-value*/}
+
+`'value1'`
+
+#### Options {/*options*/}
+
+- **`'value1'`** (default): Description
+- **`'value2'`**: Description
+- **`'value3'`**: Description
+
+#### Caveats {/*caveats*/}
+
+* [Usage caveats]
+```
+
+---
+
+### Type D: Directive
+
+**When to use:** Documenting directives like 'use server', 'use client', 'use memo'
+
+```mdx
+---
+title: "'use directive'"
+titleForTitleTag: "'use directive' directive"
+---
+
+
+
+`'use directive'` is for use with [React Server Components](/reference/rsc/server-components).
+
+
+
+
+
+`'use directive'` marks [what it marks] for [purpose].
+
+```js {1}
+function MyComponent() {
+ 'use directive';
+ // ...
+}
+```
+
+
+
+
+
+---
+
+## Reference {/*reference*/}
+
+### `'use directive'` {/*use-directive*/}
+
+Add `'use directive'` at the beginning of [location] to [action].
+
+#### Caveats {/*caveats*/}
+
+* `'use directive'` must be at the very beginning...
+* The directive must be written with single or double quotes, not backticks.
+* [Other placement/syntax caveats]
+```
+
+**Key characteristics:**
+- Title includes quotes: `title: "'use server'"`
+- Uses `titleForTitleTag` for browser tab title
+- `` block appears before ``
+- Caveats focus on placement and syntax requirements
+
+---
+
+### Type E: ESLint Rule
+
+**When to use:** Documenting ESLint plugin rules
+
+```mdx
+---
+title: rule-name
+---
+
+
+Validates that [what the rule checks].
+
+
+## Rule Details {/*rule-details*/}
+
+[Explanation of why this rule exists and React's underlying assumptions]
+
+## Common Violations {/*common-violations*/}
+
+[Description of violation patterns]
+
+### Invalid {/*invalid*/}
+
+Examples of incorrect code for this rule:
+
+```js
+// X Missing dependency
+useEffect(() => {
+ console.log(count);
+}, []); // Missing 'count'
+```
+
+### Valid {/*valid*/}
+
+Examples of correct code for this rule:
+
+```js
+// checkmark All dependencies included
+useEffect(() => {
+ console.log(count);
+}, [count]);
+```
+
+## Troubleshooting {/*troubleshooting*/}
+
+### [Problem description] {/*problem-slug*/}
+
+[Solution]
+
+## Options {/*options*/}
+
+[Configuration options if applicable]
+```
+
+**Key characteristics:**
+- Intro is a single "Validates that..." sentence
+- Uses "Invalid"/"Valid" sections with emoji-prefixed code comments
+- Rule Details explains "why" not just "what"
+
+---
+
+### Type F: Index/Category
+
+**When to use:** Overview pages listing multiple APIs in a category
+
+```mdx
+---
+title: "Built-in React [Type]"
+---
+
+
+
+*Concept* let you [purpose]. Brief scope statement.
+
+
+
+---
+
+## Category Name {/*category-name*/}
+
+*Concept* explanation with [Learn section link](/learn/topic).
+
+To [action], use one of these [Type]:
+
+* [`apiName`](/reference/react/apiName) lets you [action].
+* [`apiName`](/reference/react/apiName) declares [thing].
+
+```js
+function Example() {
+ const value = useHookName(args);
+}
+```
+
+---
+
+## Your own [Type] {/*your-own-type*/}
+
+You can also [define your own](/learn/topic) as JavaScript functions.
+```
+
+**Key characteristics:**
+- Title format: "Built-in React [Type]"
+- Italicized concept definitions
+- Horizontal rules between sections
+- Closes with "Your own [Type]" section
+
+---
+
+## Advanced Patterns
+
+### Multi-Function Documentation
+
+**When to use:** When a hook returns a function that needs its own documentation (useState's setter, useReducer's dispatch)
+
+```md
+### `hookName(args)` {/*hookname*/}
+
+[Main hook documentation]
+
+#### Parameters {/*parameters*/}
+#### Returns {/*returns*/}
+#### Caveats {/*caveats*/}
+
+---
+
+### `set` functions, like `setSomething(nextState)` {/*setstate*/}
+
+The `set` function returned by `hookName` lets you [action].
+
+#### Parameters {/*setstate-parameters*/}
+#### Returns {/*setstate-returns*/}
+#### Caveats {/*setstate-caveats*/}
+```
+
+**Key conventions:**
+- Horizontal rule (`---`) separates main hook from returned function
+- Heading IDs include prefix: `{/*setstate-parameters*/}` vs `{/*parameters*/}`
+- Use generic names: "set functions" not "setCount"
+
+---
+
+### Compound Return Objects
+
+**When to use:** When a function returns an object with multiple properties/methods (createContext)
+
+```md
+### `createContext(defaultValue)` {/*createcontext*/}
+
+[Main function documentation]
+
+#### Returns {/*returns*/}
+
+`createContext` returns a context object.
+
+**The context object itself does not hold any information.** It represents...
+
+* `SomeContext` lets you provide the context value.
+* `SomeContext.Consumer` is an alternative way to read context.
+
+---
+
+### `SomeContext` Provider {/*provider*/}
+
+[Documentation for Provider]
+
+#### Props {/*provider-props*/}
+
+---
+
+### `SomeContext.Consumer` {/*consumer*/}
+
+[Documentation for Consumer]
+
+#### Props {/*consumer-props*/}
+```
+
+---
+
+## Writing Patterns
+
+### Opening Lines by Page Type
+
+| Page Type | Pattern | Example |
+|-----------|---------|---------|
+| Hook | `` `hookName` is a React Hook that lets you [action]. `` | "`useState` is a React Hook that lets you add a state variable to your component." |
+| Component | `` `` lets you [action]. `` | "`` lets you display a fallback until its children have finished loading." |
+| API | `` `apiName` lets you [action]. `` | "`memo` lets you skip re-rendering a component when its props are unchanged." |
+| Configuration | `` The `optionName` option [controls/specifies/determines] [what]. `` | "The `target` option specifies which React version the compiler generates code for." |
+| Directive | `` `'directive'` [marks/opts/prevents] [what] for [purpose]. `` | "`'use server'` marks a function as callable from the client." |
+| ESLint Rule | `` Validates that [condition]. `` | "Validates that dependency arrays for React hooks contain all necessary dependencies." |
+
+---
+
+### Parameter Patterns
+
+**Simple parameter:**
+```md
+* `paramName`: Description of what it does.
+```
+
+**Optional parameter:**
+```md
+* **optional** `paramName`: Description of what it does.
+```
+
+**Parameter with special function behavior:**
+```md
+* `initialState`: The value you want the state to be initially. It can be a value of any type, but there is a special behavior for functions. This argument is ignored after the initial render.
+ * If you pass a function as `initialState`, it will be treated as an _initializer function_. It should be pure, should take no arguments, and should return a value of any type.
+```
+
+**Callback parameter with sub-parameters:**
+```md
+* `subscribe`: A function that takes a single `callback` argument and subscribes it to the store. When the store changes, it should invoke the provided `callback`. The `subscribe` function should return a function that cleans up the subscription.
+```
+
+**Nested options object:**
+```md
+* **optional** `options`: An object with options for this React root.
+ * **optional** `onCaughtError`: Callback called when React catches an error in an Error Boundary.
+ * **optional** `onUncaughtError`: Callback called when an error is thrown and not caught.
+ * **optional** `identifierPrefix`: A string prefix React uses for IDs generated by `useId`.
+```
+
+---
+
+### Return Value Patterns
+
+**Single value return:**
+```md
+`hookName` returns the current value. The value will be the same as `initialValue` during the first render.
+```
+
+**Array return (numbered list):**
+```md
+`useState` returns an array with exactly two values:
+
+1. The current state. During the first render, it will match the `initialState` you have passed.
+2. The [`set` function](#setstate) that lets you update the state to a different value and trigger a re-render.
+```
+
+**Object return (bulleted list):**
+```md
+`createElement` returns a React element object with a few properties:
+
+* `type`: The `type` you have passed.
+* `props`: The `props` you have passed except for `ref` and `key`.
+* `ref`: The `ref` you have passed. If missing, `null`.
+* `key`: The `key` you have passed, coerced to a string. If missing, `null`.
+```
+
+**Promise return:**
+```md
+`prerender` returns a Promise:
+- If rendering is successful, the Promise will resolve to an object containing:
+ - `prelude`: a [Web Stream](MDN-link) of HTML.
+ - `postponed`: a JSON-serializable object for resumption.
+- If rendering fails, the Promise will be rejected.
+```
+
+**Wrapped function return:**
+```md
+`cache` returns a cached version of `fn` with the same type signature. It does not call `fn` in the process.
+
+When calling `cachedFn` with given arguments, it first checks if a cached result exists. If cached, it returns the result. If not, it calls `fn`, stores the result, and returns it.
+```
+
+---
+
+### Caveats Patterns
+
+**Standard Hook caveat (almost always first for Hooks):**
+```md
+* `useXxx` is a Hook, so you can only call it **at the top level of your component** or your own Hooks. You can't call it inside loops or conditions. If you need that, extract a new component and move the state into it.
+```
+
+**Stable identity caveat (for returned functions):**
+```md
+* The `set` function has a stable identity, so you will often see it omitted from Effect dependencies, but including it will not cause the Effect to fire.
+```
+
+**Strict Mode caveat:**
+```md
+* In Strict Mode, React will **call your render function twice** in order to help you find accidental impurities. This is development-only behavior and does not affect production.
+```
+
+**Caveat with code example:**
+```md
+* It's not recommended to _suspend_ a render based on a store value returned by `useSyncExternalStore`. For example, the following is discouraged:
+
+ ```js
+ const selectedProductId = useSyncExternalStore(...);
+ const data = use(fetchItem(selectedProductId)) // X Don't suspend based on store value
+ ```
+```
+
+**Canary caveat:**
+```md
+* If you want to pass `ref` to a Fragment, you can't use the `<>...>` syntax.
+```
+
+---
+
+### Troubleshooting Patterns
+
+**Heading format (first person problem statements):**
+```md
+### I've updated the state, but logging gives me the old value {/*old-value*/}
+
+### My initializer or updater function runs twice {/*runs-twice*/}
+
+### I want to read the latest state from a callback {/*read-latest-state*/}
+```
+
+**Error message format:**
+```md
+### I'm getting an error: "Too many re-renders" {/*too-many-rerenders*/}
+
+### I'm getting an error: "Rendered more hooks than during the previous render" {/*more-hooks*/}
+```
+
+**Lint error format:**
+```md
+### I'm getting a lint error: "[exact error message]" {/*lint-error-slug*/}
+```
+
+**Problem-solution structure:**
+1. State the problem with code showing the issue
+2. Explain why it happens
+3. Provide the solution with corrected code
+4. Link to Learn section for deeper understanding
+
+---
+
+### Code Comment Conventions
+
+For code comment conventions (wrong/right, legacy/recommended, server/client labeling, bundle size annotations), invoke `/docs-sandpack`.
+
+---
+
+### Link Description Patterns
+
+| Pattern | Example |
+|---------|---------|
+| "lets you" + action | "`memo` lets you skip re-rendering when props are unchanged." |
+| "declares" + thing | "`useState` declares a state variable that you can update directly." |
+| "reads" + thing | "`useContext` reads and subscribes to a context." |
+| "connects" + thing | "`useEffect` connects a component to an external system." |
+| "Used with" | "Used with [`useContext`.](/reference/react/useContext)" |
+| "Similar to" | "Similar to [`useTransition`.](/reference/react/useTransition)" |
+
+---
+
+## Component Patterns
+
+For comprehensive MDX component patterns (Note, Pitfall, DeepDive, Recipes, Deprecated, RSC, Canary, Diagram, Code Steps), invoke `/docs-components`.
+
+For Sandpack-specific patterns and code style, invoke `/docs-sandpack`.
+
+### Reference-Specific Component Rules
+
+**Component placement in Reference pages:**
+- `` goes before `` at top of page
+- `` goes after `` for page-level deprecation
+- `` goes after method heading for method-level deprecation
+- `` wrapper goes inline within ``
+- `` appears in headings, props lists, and caveats
+
+**Troubleshooting-specific components:**
+- Use first-person problem headings
+- Cross-reference Pitfall IDs when relevant
+
+**Callout spacing:**
+- Never place consecutive Pitfalls or consecutive Notes
+- Combine related warnings into one with titled subsections, or separate with prose/code
+- Consecutive DeepDives OK for multi-part explorations
+- See `/docs-components` Callout Spacing Rules
+
+---
+
+## Content Principles
+
+### Intro Section
+- **One sentence, ~15 words max** - State what the Hook does, not how it works
+- ✅ "`useEffectEvent` is a React Hook that lets you separate events from Effects."
+- ❌ "`useEffectEvent` is a React Hook that lets you extract non-reactive logic from your Effects into a reusable function called an Effect Event."
+
+### Reference Code Example
+- Show just the API call (5-10 lines), not a full component
+- Move full component examples to Usage section
+
+### Usage Section Structure
+1. **First example: Core mental model** - Show the canonical use case with simplest concrete example
+2. **Subsequent examples: Canonical use cases** - Name the *why* (e.g., "Avoid reconnecting to external systems"), show a concrete *how*
+ - Prefer broad canonical use cases over multiple narrow concrete examples
+ - The section title IS the teaching - "When would I use this?" should be answered by the heading
+
+### What to Include vs. Exclude
+- **Never** document past bugs or fixed issues
+- **Include** edge cases most developers will encounter
+- **Exclude** niche edge cases (e.g., `this` binding, rare class patterns)
+
+### Caveats Section
+- Include rules the linter enforces or that cause immediate errors
+- Include fundamental usage restrictions
+- Exclude implementation details unless they affect usage
+- Exclude repetition of things explained elsewhere
+- Keep each caveat to one sentence when possible
+
+### Troubleshooting Section
+- Error headings only: "I'm getting an error: '[message]'" format
+- Never document past bugs - if it's fixed, it doesn't belong here
+- Focus on errors developers will actually encounter today
+
+### DeepDive Content
+- **Goldilocks principle** - Deep enough for curious developers, short enough to not overwhelm
+- Answer "why is it designed this way?" - not exhaustive technical details
+- Readers who skip it should miss nothing essential for using the API
+- If the explanation is getting long, you're probably explaining too much
+
+---
+
+## Domain-Specific Guidance
+
+### Hooks
+
+**Returned function documentation:**
+- Document setter/dispatch functions as separate `###` sections
+- Use generic names: "set functions" not "setCount"
+- Include stable identity caveat for returned functions
+
+**Dependency array documentation:**
+- List what counts as reactive values
+- Explain when dependencies are ignored
+- Link to removing effect dependencies guide
+
+**Recipes usage:**
+- Group related examples with meaningful titleText
+- Each recipe has brief intro, Sandpack, and ``
+
+---
+
+### Components
+
+**Props documentation:**
+- Use `#### Props` instead of `#### Parameters`
+- Mark optional props with `**optional**` prefix
+- Use `` inline for canary-only props
+
+**JSX syntax in titles/headings:**
+- Frontmatter title: `title: `
+- Reference heading: `` ### `` {/*suspense*/} ``
+
+---
+
+### React-DOM
+
+**Common props linking:**
+```md
+`` supports all [common element props.](/reference/react-dom/components/common#common-props)
+```
+
+**Props categorization:**
+- Controlled vs uncontrolled props grouped separately
+- Form-specific props documented with action patterns
+- MDN links for standard HTML attributes
+
+**Environment-specific notes:**
+```mdx
+
+
+This API is specific to Node.js. Environments with [Web Streams](MDN-link), like Deno and modern edge runtimes, should use [`renderToReadableStream`](/reference/react-dom/server/renderToReadableStream) instead.
+
+
+```
+
+**Progressive enhancement:**
+- Document benefits for users without JavaScript
+- Explain Server Function + form action integration
+- Show hidden form field and `.bind()` patterns
+
+---
+
+### RSC
+
+**RSC banner (before Intro):**
+Always place `` component before `` for Server Component-only APIs.
+
+**Serialization type lists:**
+When documenting Server Function arguments, list supported types:
+```md
+Supported types for Server Function arguments:
+
+* Primitives
+ * [string](MDN-link)
+ * [number](MDN-link)
+* Iterables containing serializable values
+ * [Array](MDN-link)
+ * [Map](MDN-link)
+
+Notably, these are not supported:
+* React elements, or [JSX](/learn/writing-markup-with-jsx)
+* Functions (other than Server Functions)
+```
+
+**Bundle size comparisons:**
+- Show "Not included in bundle" for server-only imports
+- Annotate client bundle sizes with gzip: `// 35.9K (11.2K gzipped)`
+
+---
+
+### Compiler
+
+**Configuration page structure:**
+- Type (union type or interface)
+- Default value
+- Options/Valid values with descriptions
+
+**Directive documentation:**
+- Placement requirements are critical
+- Mode interaction tables showing combinations
+- "Use sparingly" + "Plan for removal" patterns for escape hatches
+
+**Library author guides:**
+- Audience-first intro
+- Benefits/Why section
+- Numbered step-by-step setup
+
+---
+
+### ESLint
+
+**Rule Details section:**
+- Explain "why" not just "what"
+- Focus on React's underlying assumptions
+- Describe consequences of violations
+
+**Invalid/Valid sections:**
+- Standard intro: "Examples of [in]correct code for this rule:"
+- Use X emoji for invalid, checkmark for valid
+- Show inline comments explaining the violation
+
+**Configuration options:**
+- Show shared settings (preferred)
+- Show rule-level options (backward compatibility)
+- Note precedence when both exist
+
+---
+
+## Edge Cases
+
+For deprecated, canary, and version-specific component patterns (placement, syntax, examples), invoke `/docs-components`.
+
+**Quick placement rules:**
+- `` after `` for page-level, after heading for method-level
+- `` wrapper inline in Intro, `` in headings/props/caveats
+- Version notes use `` with "Starting in React 19..." pattern
+
+**Removed APIs on index pages:**
+```md
+## Removed APIs {/*removed-apis*/}
+
+These APIs were removed in React 19:
+
+* [`render`](https://18.react.dev/reference/react-dom/render): use [`createRoot`](/reference/react-dom/client/createRoot) instead.
+```
+
+Link to previous version docs (18.react.dev) for removed API documentation.
+
+---
+
+## Critical Rules
+
+1. **Heading IDs required:** `## Title {/*title-id*/}` (lowercase, hyphens)
+2. **Sandpack main file needs `export default`**
+3. **Active file syntax:** ` ```js src/File.js active `
+4. **Error headings in Troubleshooting:** Use `### I'm getting an error: "[message]" {/*id*/}`
+5. **Section dividers (`---`)** required between headings (see Section Dividers below)
+6. **InlineToc required:** Always include `` after Intro
+7. **Consistent parameter format:** Use `* \`paramName\`: description` with `**optional**` prefix for optional params
+8. **Numbered lists for array returns:** When hooks return arrays, use numbered lists in Returns section
+9. **Generic names for returned functions:** Use "set functions" not "setCount"
+10. **Props vs Parameters:** Use `#### Props` for Components (Type B), `#### Parameters` for Hooks/APIs (Type A)
+11. **RSC placement:** `` component goes before ``, not after
+12. **Canary markers:** Use `` wrapper inline in Intro, `` in headings/props
+13. **Deprecated placement:** `` goes after `` for page-level, after heading for method-level
+14. **Code comment emojis:** Use X for wrong, checkmark for correct in code examples
+15. **No consecutive Pitfalls/Notes:** Combine into one component with titled subsections, or separate with prose/code (see `/docs-components`)
+
+For component heading level conventions (DeepDive, Pitfall, Note, Recipe headings), see `/docs-components`.
+
+### Section Dividers
+
+Use `---` horizontal rules to visually separate major sections:
+
+- **After ``** - Before `## Reference` heading
+- **Between API subsections** - Between different function/hook definitions (e.g., between `useState()` and `set functions`)
+- **Before `## Usage`** - Separates API reference from examples
+- **Before `## Troubleshooting`** - Separates content from troubleshooting
+- **Between EVERY Usage subsections** - When switching to a new major use case
+
+Always have a blank line before and after `---`.
+
+### Section ID Conventions
+
+| Section | ID Format |
+|---------|-----------|
+| Main function | `{/*functionname*/}` |
+| Returned function | `{/*setstate*/}`, `{/*dispatch*/}` |
+| Sub-section of returned function | `{/*setstate-parameters*/}` |
+| Troubleshooting item | `{/*problem-description-slug*/}` |
+| Pitfall | `{/*pitfall-description*/}` |
+| Deep dive | `{/*deep-dive-topic*/}` |
diff --git a/.claude/skills/react-expert/SKILL.md b/.claude/skills/react-expert/SKILL.md
new file mode 100644
index 000000000..5ebcdee37
--- /dev/null
+++ b/.claude/skills/react-expert/SKILL.md
@@ -0,0 +1,335 @@
+---
+name: react-expert
+description: Use when researching React APIs or concepts for documentation. Use when you need authoritative usage examples, caveats, warnings, or errors for a React feature.
+---
+
+# React Expert Research Skill
+
+## Overview
+
+This skill produces exhaustive documentation research on any React API or concept by searching authoritative sources (tests, source code, PRs, issues) rather than relying on LLM training knowledge.
+
+
+**Skepticism Mandate:** You must be skeptical of your own knowledge. Claude is often trained on outdated or incorrect React patterns. Treat source material as the sole authority. If findings contradict your prior understanding, explicitly flag this discrepancy.
+
+**Red Flags - STOP if you catch yourself thinking:**
+- "I know this API does X" → Find source evidence first
+- "Common pattern is Y" → Verify in test files
+- Generating example code → Must have source file reference
+
+
+## Invocation
+
+```
+/react-expert useTransition
+/react-expert suspense boundaries
+/react-expert startTransition
+```
+
+## Sources (Priority Order)
+
+1. **React Repo Tests** - Most authoritative for actual behavior
+2. **React Source Code** - Warnings, errors, implementation details
+3. **Git History** - Commit messages with context
+4. **GitHub PRs & Comments** - Design rationale (via `gh` CLI)
+5. **GitHub Issues** - Confusion/questions (facebook/react + reactjs/react.dev)
+6. **React Working Group** - Design discussions for newer APIs
+7. **Flow Types** - Source of truth for type signatures
+8. **TypeScript Types** - Note discrepancies with Flow
+9. **Current react.dev docs** - Baseline (not trusted as complete)
+
+**No web search** - No Stack Overflow, blog posts, or web searches. GitHub API via `gh` CLI is allowed.
+
+## Workflow
+
+### Step 1: Setup React Repo
+
+First, ensure the React repo is available locally:
+
+```bash
+# Check if React repo exists, clone or update
+if [ -d ".claude/react" ]; then
+ cd .claude/react && git pull origin main
+else
+ git clone --depth=100 https://github.com/facebook/react.git .claude/react
+fi
+```
+
+Get the current commit hash for the research document:
+```bash
+cd .claude/react && git rev-parse --short HEAD
+```
+
+### Step 2: Dispatch 6 Parallel Research Agents
+
+Spawn these agents IN PARALLEL using the Task tool. Each agent receives the skepticism preamble:
+
+> "You are researching React's ``. CRITICAL: Do NOT rely on your prior knowledge about this API. Your training may contain outdated or incorrect patterns. Only report what you find in the source files. If your findings contradict common understanding, explicitly highlight this discrepancy."
+
+| Agent | subagent_type | Focus | Instructions |
+|-------|---------------|-------|--------------|
+| test-explorer | Explore | Test files for usage patterns | Search `.claude/react/packages/*/src/__tests__/` for test files mentioning the topic. Extract actual usage examples WITH file paths and line numbers. |
+| source-explorer | Explore | Warnings/errors in source | Search `.claude/react/packages/*/src/` for console.error, console.warn, and error messages mentioning the topic. Document trigger conditions. |
+| git-historian | Explore | Commit messages | Run `git log --all --grep="" --oneline -50` in `.claude/react`. Read full commit messages for context. |
+| pr-researcher | Explore | PRs introducing/modifying API | Run `gh pr list -R facebook/react --search "" --state all --limit 20`. Read key PR descriptions and comments. |
+| issue-hunter | Explore | Issues showing confusion | Search issues in both `facebook/react` and `reactjs/react.dev` repos. Look for common questions and misunderstandings. |
+| types-inspector | Explore | Flow + TypeScript signatures | Find Flow types in `.claude/react/packages/*/src/*.js` (look for `@flow` annotations). Find TS types in `.claude/react/packages/*/index.d.ts`. Note discrepancies. |
+
+### Step 3: Agent Prompts
+
+Use these exact prompts when spawning agents:
+
+#### test-explorer
+```
+You are researching React's .
+
+CRITICAL: Do NOT rely on your prior knowledge about this API. Your training may contain outdated or incorrect patterns. Only report what you find in the source files.
+
+Your task: Find test files in .claude/react that demonstrate usage.
+
+1. Search for test files: Glob for `**/__tests__/**/**` and `**/__tests__/**/*.js` then grep for
+2. For each relevant test file, extract:
+ - The test description (describe/it blocks)
+ - The actual usage code
+ - Any assertions about behavior
+ - Edge cases being tested
+3. Report findings with exact file paths and line numbers
+
+Format your output as:
+## Test File:
+### Test: ""
+```javascript
+
+```
+**Behavior:**
+```
+
+#### source-explorer
+```
+You are researching React's .
+
+CRITICAL: Do NOT rely on your prior knowledge about this API. Only report what you find in the source files.
+
+Your task: Find warnings, errors, and implementation details for .
+
+1. Search .claude/react/packages/*/src/ for:
+ - console.error mentions of
+ - console.warn mentions of
+ - Error messages mentioning
+ - The main implementation file
+2. For each warning/error, document:
+ - The exact message text
+ - The condition that triggers it
+ - The source file and line number
+
+Format your output as:
+## Warnings & Errors
+| Message | Trigger Condition | Source |
+|---------|------------------|--------|
+| "" | | |
+
+## Implementation Notes
+
+```
+
+#### git-historian
+```
+You are researching React's .
+
+CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in git history.
+
+Your task: Find commit messages that explain design decisions.
+
+1. Run: cd .claude/react && git log --all --grep="" --oneline -50
+2. For significant commits, read full message: git show --stat
+3. Look for:
+ - Initial introduction of the API
+ - Bug fixes (reveal edge cases)
+ - Behavior changes
+ - Deprecation notices
+
+Format your output as:
+## Key Commits
+### -
+**Date:**
+**Context:**
+**Impact:**
+```
+
+#### pr-researcher
+```
+You are researching React's .
+
+CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in PRs.
+
+Your task: Find PRs that introduced or modified .
+
+1. Run: gh pr list -R facebook/react --search "" --state all --limit 20 --json number,title,url
+2. For promising PRs, read details: gh pr view -R facebook/react
+3. Look for:
+ - The original RFC/motivation
+ - Design discussions in comments
+ - Alternative approaches considered
+ - Breaking changes
+
+Format your output as:
+## Key PRs
+### PR #:
+**URL:**
+**Summary:**
+**Design Rationale:**
+**Discussion Highlights:**
+```
+
+#### issue-hunter
+```
+You are researching React's .
+
+CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in issues.
+
+Your task: Find issues that reveal common confusion about .
+
+1. Search facebook/react: gh issue list -R facebook/react --search "" --state all --limit 20 --json number,title,url
+2. Search reactjs/react.dev: gh issue list -R reactjs/react.dev --search "" --state all --limit 20 --json number,title,url
+3. For each issue, identify:
+ - What the user was confused about
+ - What the resolution was
+ - Any gotchas revealed
+
+Format your output as:
+## Common Confusion
+### Issue #:
+**Repo:**
+**Confusion:**
+**Resolution:**
+**Gotcha:**
+```
+
+#### types-inspector
+```
+You are researching React's .
+
+CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in type definitions.
+
+Your task: Find and compare Flow and TypeScript type signatures for .
+
+1. Flow types (source of truth): Search .claude/react/packages/*/src/*.js for @flow annotations related to
+2. TypeScript types: Search .claude/react/packages/*/index.d.ts and @types/react
+3. Compare and note any discrepancies
+
+Format your output as:
+## Flow Types (Source of Truth)
+**File:**
+```flow
+
+```
+
+## TypeScript Types
+**File:**
+```typescript
+
+```
+
+## Discrepancies
+
+```
+
+### Step 4: Synthesize Results
+
+After all agents complete, combine their findings into a single research document.
+
+**DO NOT add information from your own knowledge.** Only include what agents found in sources.
+
+### Step 5: Save Output
+
+Write the final document to `.claude/research/.md`
+
+Replace spaces in topic with hyphens (e.g., "suspense boundaries" → "suspense-boundaries.md")
+
+## Output Document Template
+
+```markdown
+# React Research:
+
+> Generated by /react-expert on YYYY-MM-DD
+> Sources: React repo (commit ), N PRs, M issues
+
+## Summary
+
+[Brief summary based SOLELY on source findings, not prior knowledge]
+
+## API Signature
+
+### Flow Types (Source of Truth)
+
+[From types-inspector agent]
+
+### TypeScript Types
+
+[From types-inspector agent]
+
+### Discrepancies
+
+[Any differences between Flow and TS]
+
+## Usage Examples
+
+### From Tests
+
+[From test-explorer agent - with file:line references]
+
+### From PRs/Issues
+
+[Real-world patterns from discussions]
+
+## Caveats & Gotchas
+
+[Each with source link]
+
+- **** - Source:
+
+## Warnings & Errors
+
+| Message | Trigger Condition | Source File |
+|---------|------------------|-------------|
+[From source-explorer agent]
+
+## Common Confusion
+
+[From issue-hunter agent]
+
+## Design Decisions
+
+[From git-historian and pr-researcher agents]
+
+## Source Links
+
+### Commits
+- :
+
+### Pull Requests
+- PR #: -
+
+### Issues
+- Issue #: -
+```
+
+## Common Mistakes to Avoid
+
+1. **Trusting prior knowledge** - If you "know" something about the API, find the source evidence anyway
+2. **Generating example code** - Every code example must come from an actual source file
+3. **Skipping agents** - All 6 agents must run; each provides unique perspective
+4. **Summarizing without sources** - Every claim needs a file:line or PR/issue reference
+5. **Using web search** - No Stack Overflow, no blog posts, no social media
+
+## Verification Checklist
+
+Before finalizing the research document:
+
+- [ ] React repo is at `.claude/react` with known commit hash
+- [ ] All 6 agents were spawned in parallel
+- [ ] Every code example has a source file reference
+- [ ] Warnings/errors table has source locations
+- [ ] No claims made without source evidence
+- [ ] Discrepancies between Flow/TS types documented
+- [ ] Source links section is complete
diff --git a/.claude/skills/review-docs/SKILL.md b/.claude/skills/review-docs/SKILL.md
new file mode 100644
index 000000000..61a6a0e05
--- /dev/null
+++ b/.claude/skills/review-docs/SKILL.md
@@ -0,0 +1,20 @@
+---
+name: review-docs
+description: Use when reviewing React documentation for structure, components, and style compliance
+---
+CRITICAL: do not load these skills yourself.
+
+Run these tasks in parallel for the given file(s). Each agent checks different aspects—not all apply to every file:
+
+- [ ] Ask docs-reviewer agent to review {files} with docs-writer-learn (only for files in src/content/learn/).
+- [ ] Ask docs-reviewer agent to review {files} with docs-writer-reference (only for files in src/content/reference/).
+- [ ] Ask docs-reviewer agent to review {files} with docs-writer-blog (only for files in src/content/blog/).
+- [ ] Ask docs-reviewer agent to review {files} with docs-voice (all documentation files).
+- [ ] Ask docs-reviewer agent to review {files} with docs-components (all documentation files).
+- [ ] Ask docs-reviewer agent to review {files} with docs-sandpack (files containing Sandpack examples).
+
+If no file is specified, check git status for modified MDX files in `src/content/`.
+
+The docs-reviewer will return a checklist of the issues it found. Respond with the full checklist and line numbers from all agents, and prompt the user to create a plan to fix these issues.
+
+
diff --git a/.claude/skills/write/SKILL.md b/.claude/skills/write/SKILL.md
new file mode 100644
index 000000000..3099b3a0c
--- /dev/null
+++ b/.claude/skills/write/SKILL.md
@@ -0,0 +1,176 @@
+---
+name: write
+description: Use when creating new React documentation pages or updating existing ones. Accepts instructions like "add optimisticKey reference docs", "update ViewTransition with Activity", or "transition learn docs".
+---
+
+# Documentation Writer
+
+Orchestrates research, writing, and review for React documentation.
+
+## Invocation
+
+```
+/write add optimisticKey → creates new reference docs
+/write update ViewTransition Activity → updates ViewTransition docs to cover Activity
+/write transition learn docs → creates new learn docs for transitions
+/write blog post for React 20 → creates a new blog post
+```
+
+## Workflow
+
+```dot
+digraph write_flow {
+ rankdir=TB;
+ "Parse intent" [shape=box];
+ "Research (parallel)" [shape=box];
+ "Synthesize plan" [shape=box];
+ "Write docs" [shape=box];
+ "Review docs" [shape=box];
+ "Issues found?" [shape=diamond];
+ "Done" [shape=doublecircle];
+
+ "Parse intent" -> "Research (parallel)";
+ "Research (parallel)" -> "Synthesize plan";
+ "Synthesize plan" -> "Write docs";
+ "Write docs" -> "Review docs";
+ "Review docs" -> "Issues found?";
+ "Issues found?" -> "Write docs" [label="yes - fix"];
+ "Issues found?" -> "Done" [label="no"];
+}
+```
+
+### Step 1: Parse Intent
+
+Determine from the user's instruction:
+
+| Field | How to determine |
+|-------|------------------|
+| **Action** | "add"/"create"/"new" = new page; "update"/"edit"/"with" = modify existing |
+| **Topic** | The React API or concept (e.g., `optimisticKey`, `ViewTransition`, `transitions`) |
+| **Doc type** | "reference" (default for APIs/hooks/components), "learn" (for concepts/guides), "blog" (for announcements) |
+| **Target file** | For updates: find existing file in `src/content/`. For new: determine path from doc type |
+
+If the intent is ambiguous, ask the user to clarify before proceeding.
+
+### Step 2: Research (Parallel Agents)
+
+Spawn these agents **in parallel**:
+
+#### Agent 1: React Expert Research
+
+Use a Task agent (subagent_type: `general-purpose`) to invoke `/react-expert `. This researches the React source code, tests, PRs, issues, and type signatures.
+
+**Prompt:**
+```
+Invoke the /react-expert skill for . Follow the skill's full workflow:
+setup the React repo, dispatch all 6 research agents in parallel, synthesize
+results, and save to .claude/research/.md. Return the full research document.
+```
+
+#### Agent 2: Existing Docs Audit
+
+Use a Task agent (subagent_type: `Explore`) to find and read existing documentation for the topic.
+
+**Prompt:**
+```
+Find all existing documentation related to in this repo:
+1. Search src/content/ for files mentioning
+2. Read any matching files fully
+3. For updates: identify what sections exist and what's missing
+4. For new pages: identify related pages to understand linking/cross-references
+5. Check src/sidebarLearn.json and src/sidebarReference.json for navigation placement
+
+Return: list of existing files with summaries, navigation structure, and gaps.
+```
+
+#### Agent 3: Use Case Research
+
+Use a Task agent (subagent_type: `general-purpose`) with web search to find common use cases and patterns.
+
+**Prompt:**
+```
+Search the web for common use cases and patterns for React's .
+Focus on:
+1. Real-world usage patterns developers actually need
+2. Common mistakes or confusion points
+3. Migration patterns (if replacing an older API)
+4. Framework integration patterns (Next.js, Remix, etc.)
+
+Return a summary of the top 5-8 use cases with brief code sketches.
+Do NOT search Stack Overflow. Focus on official docs, GitHub discussions,
+and high-quality technical blogs.
+```
+
+### Step 3: Synthesize Writing Plan
+
+After all research agents complete, create a writing plan that includes:
+
+1. **Page type** (from docs-writer-reference decision tree or learn/blog type)
+2. **File path** for the new or updated file
+3. **Outline** with section headings matching the appropriate template
+4. **Content notes** for each section, drawn from research:
+ - API signature and parameters (from react-expert types)
+ - Usage examples (from react-expert tests + use case research)
+ - Caveats and pitfalls (from react-expert warnings/errors/issues)
+ - Cross-references to related pages (from docs audit)
+5. **Navigation changes** needed (sidebar JSON updates)
+
+Present this plan to the user and confirm before proceeding.
+
+### Step 4: Write Documentation
+
+Dispatch a Task agent (subagent_type: `general-purpose`) to write the documentation.
+
+**The agent prompt MUST include:**
+
+1. The full writing plan from Step 3
+2. An instruction to invoke the appropriate skill:
+ - `/docs-writer-reference` for reference pages
+ - `/docs-writer-learn` for learn pages
+ - `/docs-writer-blog` for blog posts
+3. An instruction to invoke `/docs-components` for MDX component patterns
+4. An instruction to invoke `/docs-sandpack` if adding interactive code examples
+5. The research document content (key findings, not the full dump)
+
+**Prompt template:**
+```
+You are writing React documentation. Follow these steps:
+
+1. Invoke /docs-writer- to load the page template and conventions
+2. Invoke /docs-components to load MDX component patterns
+3. Invoke /docs-sandpack if you need interactive code examples
+4. Write the documentation following the plan below
+
+PLAN:
+
+
+RESEARCH FINDINGS:
+
+
+Write the file to:
+Also update if adding a new page.
+```
+
+### Step 5: Review Documentation
+
+Invoke `/review-docs` on the written files. This dispatches parallel review agents checking:
+- Structure compliance (docs-writer-*)
+- Voice and style (docs-voice)
+- Component usage (docs-components)
+- Sandpack patterns (docs-sandpack)
+
+### Step 6: Fix Issues
+
+If the review finds issues:
+1. Present the review checklist to the user
+2. Fix the issues identified
+3. Re-run `/review-docs` on the fixed files
+4. Repeat until clean
+
+## Important Rules
+
+- **Always research before writing.** Never write docs from LLM knowledge alone.
+- **Always confirm the plan** with the user before writing.
+- **Always review** with `/review-docs` after writing.
+- **Match existing patterns.** Read neighboring docs to match style and depth.
+- **Update navigation.** New pages need sidebar entries.
diff --git a/.claude/skills/write/diagrams/write_flow.svg b/.claude/skills/write/diagrams/write_flow.svg
new file mode 100644
index 000000000..49056ef11
--- /dev/null
+++ b/.claude/skills/write/diagrams/write_flow.svg
@@ -0,0 +1,100 @@
+
+
+
+
+
diff --git a/.editorconfig b/.editorconfig
index 87f877b28..1bb2661fd 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -3,3 +3,5 @@ root = true
[*]
charset = utf-8
end_of_line = lf
+insert_final_newline = true
+indent_style = space
diff --git a/.env.production b/.env.production
index e403f96b6..8d10ee6a1 100644
--- a/.env.production
+++ b/.env.production
@@ -1 +1 @@
-NEXT_PUBLIC_GA_TRACKING_ID = 'G-B1E83PJ3RT'
\ No newline at end of file
+NEXT_PUBLIC_GA_TRACKING_ID = 'G-C4MKP7MN1V'
diff --git a/.eslintignore b/.eslintignore
index 4738cb697..d15200cf2 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,3 +1,5 @@
scripts
plugins
next.config.js
+.claude/
+worker-bundle.dist.js
diff --git a/.eslintrc b/.eslintrc
index f617dea26..935fa2f23 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -2,16 +2,37 @@
"root": true,
"extends": "next/core-web-vitals",
"parser": "@typescript-eslint/parser",
- "plugins": ["@typescript-eslint"],
+ "plugins": ["@typescript-eslint", "eslint-plugin-react-compiler", "local-rules"],
"rules": {
"no-unused-vars": "off",
- "@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }],
- "react-hooks/exhaustive-deps": "error"
+ "@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
+ "react-hooks/exhaustive-deps": "error",
+ "react/no-unknown-property": ["error", {"ignore": ["meta"]}],
+ "react-compiler/react-compiler": "error",
+ "local-rules/lint-markdown-code-blocks": "error",
+ "no-trailing-spaces": "error"
},
"env": {
"node": true,
"commonjs": true,
"browser": true,
"es6": true
- }
+ },
+ "overrides": [
+ {
+ "files": ["src/content/**/*.md"],
+ "parser": "./eslint-local-rules/parser",
+ "parserOptions": {
+ "sourceType": "module"
+ },
+ "rules": {
+ "no-unused-vars": "off",
+ "@typescript-eslint/no-unused-vars": "off",
+ "react-hooks/exhaustive-deps": "off",
+ "react/no-unknown-property": "off",
+ "react-compiler/react-compiler": "off",
+ "local-rules/lint-markdown-code-blocks": "error"
+ }
+ }
+ ]
}
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..8a5a53391
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+# https://git-scm.com/docs/gitattributes
+
+# Ensure consistent EOL(LF) for all files that Git considers text files.
+* text=auto eol=lf
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index eb881b609..b7e5c36c1 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1 +1 @@
-* @hg-pyun @taehwanno @simsim0709 @gnujoow @b9words @taggon @MaxKim-J @eomttt @lumirlumir
+* @hg-pyun @gnujoow @eomttt @lumirlumir
diff --git a/.github/ISSUE_TEMPLATE/2-suggestion.yml b/.github/ISSUE_TEMPLATE/2-suggestion.yml
deleted file mode 100644
index ac0b480fe..000000000
--- a/.github/ISSUE_TEMPLATE/2-suggestion.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-name: "💡 Suggestions"
-description: "Suggest a new page, section, or edit for an existing page."
-title: "[Suggestion]: "
-labels: ["type: documentation"]
-body:
- - type: textarea
- attributes:
- label: Summary
- description: |
- A clear and concise summary of what we should add.
- placeholder: |
- Example:
- Add a new page for how to use React with TypeScript.
- validations:
- required: true
- - type: input
- attributes:
- label: Page
- description: |
- What page is this about?
- placeholder: |
- https://react.dev/
- validations:
- required: false
- - type: textarea
- attributes:
- label: Details
- description: |
- Please provide a explanation for what you're suggesting.
- placeholder: |
- Example:
- I think it would be helpful to have a page that explains how to use React with TypeScript. This could include a basic example of a component written in TypeScript, and a link to the TypeScript documentation.
- validations:
- required: true
diff --git a/.github/ISSUE_TEMPLATE/3-framework.yml b/.github/ISSUE_TEMPLATE/3-framework.yml
index a47295e1e..87f03a660 100644
--- a/.github/ISSUE_TEMPLATE/3-framework.yml
+++ b/.github/ISSUE_TEMPLATE/3-framework.yml
@@ -8,11 +8,11 @@ body:
value: |
## Apply to be included as a recommended React framework
- _This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/start-a-new-react-project). If you are not a framework author, please contact the authors before submitting._
+ _This form is for framework authors to apply to be included as a recommended [React framework](https://react.dev/learn/creating-a-react-app). If you are not a framework author, please contact the authors before submitting._
Our goal when recommending a framework is to start developers with a React project that solves common problems like code splitting, data fetching, routing, and HTML generation without any extra work later. We believe this will allow users to get started quickly with React, and scale their app to production.
- While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/start-a-new-react-project#which-features-make-up-the-react-teams-full-stack-architecture-vision).
+ While we understand that many frameworks may want to be featured, this page is not a place to advertise every possible React framework or all frameworks that you can add React to. There are many great frameworks that offer support for React that are not listed in our guides. The frameworks we recommend have invested significantly in the React ecosystem, and collaborated with the React team to be compatible with our [full-stack React architecture vision](https://react.dev/learn/creating-a-react-app#which-features-make-up-the-react-teams-full-stack-architecture-vision).
To be included, frameworks must meet the following criteria:
diff --git a/.github/ISSUE_TEMPLATE/need-translation.md b/.github/ISSUE_TEMPLATE/need-translation.md
new file mode 100644
index 000000000..ea0adf842
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/need-translation.md
@@ -0,0 +1,20 @@
+---
+name: 번역 필요
+about: 번역이 필요한 문서에 대해 이 템플릿을 사용해주세요
+title: '[번역 필요]: '
+labels: 'need translation'
+assignees: ''
+---
+
+## Summary
+
+
+
+## Page
+
+
+
+
+## Details
+
+
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 2cf9d9733..5bbfcb602 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,21 +1,26 @@
-Please see the Contribution Guide for guidelines:
+#
-https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md
+
-If your PR references an existing issue, please add the issue number below
+## 필수 확인 사항
--->
+- [ ] [기여자 행동 강령 규약Code of Conduct](https://github.com/reactjs/ko.react.dev/blob/main/CODE_OF_CONDUCT.md)
+- [ ] [기여 가이드라인Contributing](https://github.com/reactjs/ko.react.dev/blob/main/CONTRIBUTING.md)
+- [ ] [공통 스타일 가이드Universal Style Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md)
+- [ ] [번역을 위한 모범 사례Best Practices for Translation](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md)
+- [ ] [번역 용어 정리Translate Glossary](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md)
+- [ ] [`textlint` 가이드Textlint Guide](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint-guide.md)
+- [ ] [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/)
-## Progress
+## 선택 확인 사항
-- [ ] 번역 초안 작성 (Draft translation)
-- [ ] [공통 스타일 가이드 확인 (Check the common style guide)](https://github.com/reactjs/ko.react.dev/blob/main/wiki/universal-style-guide.md)
-- [ ] [모범 사례 확인 (Check best practices)](https://github.com/reactjs/ko.react.dev/blob/main/wiki/best-practices-for-translation.md)
-- [ ] [용어 확인 (Check the term)](https://github.com/reactjs/ko.react.dev/blob/main/wiki/translate-glossary.md)
-- [ ] [Textlint 가이드 확인 (Check the textlint guide)](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint/what-is-textlint.md)
-- [ ] [맞춤법 검사 (Spelling check)](https://nara-speller.co.kr/speller/)
-- [ ] 리뷰 반영 (Resolve reviews)
+- [ ] 번역 초안 작성Draft Translation
+- [ ] 리뷰 반영Resolve Reviews
diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml
index 8330e30d2..83e7f2e8a 100644
--- a/.github/workflows/analyze.yml
+++ b/.github/workflows/analyze.yml
@@ -7,22 +7,32 @@ on:
- main # change this if your default branch is named differently
workflow_dispatch:
+permissions: {}
+
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up node
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: '20.x'
+ cache: yarn
+ cache-dependency-path: yarn.lock
+
+ - name: Restore cached node_modules
+ uses: actions/cache@v4
+ with:
+ path: '**/node_modules'
+ key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- - name: Install dependencies
- uses: bahmutov/npm-install@v1.7.10
+ - name: Install deps
+ run: yarn install --frozen-lockfile
- name: Restore next build
- uses: actions/cache@v3
+ uses: actions/cache@v4
id: restore-build-cache
env:
cache-name: cache-next-build
@@ -47,7 +57,7 @@ jobs:
name: bundle_analysis.json
- name: Download base branch bundle stats
- uses: dawidd6/action-download-artifact@v4
+ uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
if: success() && github.event.number
with:
workflow: analyze.yml
diff --git a/.github/workflows/analyze_comment.yml b/.github/workflows/analyze_comment.yml
index 5a3047cfc..fcac37738 100644
--- a/.github/workflows/analyze_comment.yml
+++ b/.github/workflows/analyze_comment.yml
@@ -2,10 +2,15 @@ name: Analyze Bundle (Comment)
on:
workflow_run:
- workflows: ["Analyze Bundle"]
+ workflows: ['Analyze Bundle']
types:
- completed
+permissions:
+ contents: read
+ issues: write
+ pull-requests: write
+
jobs:
comment:
runs-on: ubuntu-latest
@@ -14,7 +19,7 @@ jobs:
github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download base branch bundle stats
- uses: dawidd6/action-download-artifact@v2
+ uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
with:
workflow: analyze.yml
run_id: ${{ github.event.workflow_run.id }}
@@ -22,7 +27,7 @@ jobs:
path: analysis_comment.txt
- name: Download PR number
- uses: dawidd6/action-download-artifact@v2
+ uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e
with:
workflow: analyze.yml
run_id: ${{ github.event.workflow_run.id }}
@@ -48,7 +53,7 @@ jobs:
echo "pr-number=$pr_number" >> $GITHUB_OUTPUT
- name: Comment
- uses: marocchino/sticky-pull-request-comment@v2
+ uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
with:
header: next-bundle-analysis
number: ${{ steps.get-comment-body.outputs.pr-number }}
diff --git a/.github/workflows/site_lint.yml b/.github/workflows/site_lint.yml
index 34ca6d7b8..81a04601c 100644
--- a/.github/workflows/site_lint.yml
+++ b/.github/workflows/site_lint.yml
@@ -7,6 +7,8 @@ on:
pull_request:
types: [opened, synchronize, reopened]
+permissions: {}
+
jobs:
lint:
runs-on: ubuntu-latest
@@ -14,14 +16,22 @@ jobs:
name: Lint on node 20.x and ubuntu-latest
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v4
- name: Use Node.js 20.x
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: 20.x
+ cache: yarn
+ cache-dependency-path: yarn.lock
+
+ - name: Restore cached node_modules
+ uses: actions/cache@v4
+ with:
+ path: '**/node_modules'
+ key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- - name: Install deps and build (with cache)
- uses: bahmutov/npm-install@v1.8.32
+ - name: Install deps
+ run: yarn install --frozen-lockfile
- name: Lint codebase
run: yarn ci-check
diff --git a/.github/workflows/textlint_lint.yml b/.github/workflows/textlint_lint.yml
index 8c15e1214..0dcf8610d 100644
--- a/.github/workflows/textlint_lint.yml
+++ b/.github/workflows/textlint_lint.yml
@@ -8,6 +8,7 @@ on:
- 'src/**/*.md'
- 'textlint/**/*.js'
- '.github/workflows/textlint_lint.yml'
+ - 'package.json'
pull_request:
types:
@@ -18,6 +19,7 @@ on:
- 'src/**/*.md'
- 'textlint/**/*.js'
- '.github/workflows/textlint_lint.yml'
+ - 'package.json'
jobs:
Lint:
diff --git a/.gitignore b/.gitignore
index 7bf71dbc5..ff519fa0f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
-/node_modules
+node_modules
/.pnp
.pnp.js
@@ -39,3 +39,15 @@ public/fonts/**/Optimistic_*.woff2
# rss
public/rss.xml
+
+# code editor
+.cursor
+.idea
+*.code-workspace
+
+# claude local settings
+.claude/*.local.*
+.claude/react/
+
+# worktrees
+.worktrees/
diff --git a/.prettierignore b/.prettierignore
index 96f1f96d2..8d85bc21a 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1 +1,2 @@
src/content/**/*.md
+src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
diff --git a/.textlintrc b/.textlintrc
deleted file mode 100644
index 474876784..000000000
--- a/.textlintrc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "filters": {
- "comments": true
- }
-}
diff --git a/.textlintrc.js b/.textlintrc.js
new file mode 100644
index 000000000..fc2a0b9a5
--- /dev/null
+++ b/.textlintrc.js
@@ -0,0 +1,20 @@
+module.exports = {
+ rules: {
+ 'allowed-uris': {
+ disallowed: {
+ /**
+ * Disallow URIs starting with the following strings:
+ * - https://ko.react.dev
+ * - http://ko.react.dev
+ *
+ * For example,
+ * `https://ko.react.dev/reference/rules` can be replaced with `/reference/rules`.
+ */
+ links: [/https?:\/\/ko\.react\.dev/g],
+ },
+ },
+ },
+ filters: {
+ comments: true,
+ },
+};
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 000000000..034db5d67
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,7 @@
+{
+ "recommendations": [
+ "dbaeumer.vscode-eslint",
+ "esbenp.prettier-vscode",
+ "editorconfig.editorconfig"
+ ]
+}
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 000000000..3a081e6d5
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,52 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code when working with this repository.
+
+## Project Overview
+
+This is the React documentation website (react.dev), built with Next.js 15.1.11 and React 19. Documentation is written in MDX format.
+
+## Development Commands
+
+```bash
+yarn build # Production build
+yarn lint # Run ESLint
+yarn lint:fix # Auto-fix lint issues
+yarn tsc # TypeScript type checking
+yarn check-all # Run prettier, lint:fix, tsc, and rss together
+```
+
+## Project Structure
+
+```
+src/
+├── content/ # Documentation content (MDX files)
+│ ├── learn/ # Tutorial/learning content
+│ ├── reference/ # API reference docs
+│ ├── blog/ # Blog posts
+│ └── community/ # Community pages
+├── components/ # React components
+├── pages/ # Next.js pages
+├── hooks/ # Custom React hooks
+├── utils/ # Utility functions
+└── styles/ # CSS/Tailwind styles
+```
+
+## Code Conventions
+
+### TypeScript/React
+- Functional components only
+- Tailwind CSS for styling
+
+### Documentation Style
+
+When editing files in `src/content/`, the appropriate skill will be auto-suggested:
+- `src/content/learn/` - Learn page structure and tone
+- `src/content/reference/` - Reference page structure and tone
+
+For MDX components (DeepDive, Pitfall, Note, etc.), invoke `/docs-components`.
+For Sandpack code examples, invoke `/docs-sandpack`.
+
+See `.claude/docs/react-docs-patterns.md` for comprehensive style guidelines.
+
+Prettier is used for formatting (config in `.prettierrc`).
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index f049d4c53..97c4965b8 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,76 +1,122 @@
-# Code of Conduct
+# 기여자 행동 강령 규약
-## Our Pledge
+## 서약
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to make participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, sex characteristics, gender identity and expression,
-level of experience, education, socio-economic status, nationality, personal
-appearance, race, religion, or sexual identity and orientation.
+우리는 구성원, 기여자 및 리더로서 커뮤니티에 참여하여
+연령, 신체 크기, 눈에 보이거나 보이지 않는 장애, 민족성, 성별, 성 정체성과 표현,
+경력, 학력, 사회 경제적 지위, 국적, 외모, 인종, 카스트 제도, 피부색, 종교
+또는 성적 정체성과 성적 성향에 관계없이 모든 사람을 차별하지 않을 것을 서약한다.
-## Our Standards
+우리는 개방적이고 친근하며 다양하고 포용적이며 건강한 커뮤니티에 기여하는
+방식으로 행동하고 상호작용할 것을 서약한다.
-Examples of behavior that contributes to creating a positive environment
-include:
+## 표준
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
+커뮤니티의 긍정적인 환경을 위해 기여자가 해야 할 행동은 다음과 같다.
-Examples of unacceptable behavior by participants include:
+- 다른 사람들에 대한 친절과 공감 표현
+- 서로 다른 의견 및 관점, 경험에 대한 존중
+- 건설적인 피드백을 제공 및 열린 마음으로 수락
+- 책임을 받아들이고 실수로 인해 영향을 받은 사람들에게 사과하며 경험을 통해 배움
+- 개인뿐만 아닌 전체 커뮤니티를 위한 최선의 방법에 집중
-* The use of sexualized language or imagery and unwelcome sexual attention or
- advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
+하지말아야 할 행동은 다음과 같다.
-## Our Responsibilities
+- 성적인 언어와 이미지 사용, 성적 관심이나 어떤 종류의 접근
+- 소모적인 논쟁, 모욕적 또는 비하하는 댓글과 개인적 또는 정치적인 공격
+- 공개적이거나 개인적인 괴롭힘
+- 동의없는 집주소 또는 이메일 주소 등의 개인 정보의 공개
+- 부적절한 것으로 간주될 수 있는 다른 행위
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
+## 집행 책임
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
+커뮤니티 리더는 허용되는 행동의 기준을 명확히 하고 집행할 책임이 있으며
+부적절하다고 여겨지는 모든 행동, 위협, 공격 또는 피해에 대해 적절하고
+공정한 행동을 취한다.
-## Scope
+프로젝트 유지자는 이 행동 강령을 따르지 않은 댓글, 커밋, 코드, 위키 편집,
+이슈와 그 외 다른 기여를 삭제, 수정 또는 거부할 권리와 책임이 있다. 또한,
+부적당하거나 험악하거나 공격적이거나 해롭다고 생각하는 다른 행동을 한 기여자를
+일시적 또는 영구적으로 퇴장시킬 수 있다.
-This Code of Conduct applies within all project spaces, and it also applies when
-an individual is representing the project or its community in public spaces.
-Examples of representing a project or community include using an official
-project e-mail address, posting via an official social media account, or acting
-as an appointed representative at an online or offline event. Representation of
-a project may be further defined and clarified by project maintainers.
+커뮤니티 리더는 이 행동 강령을 따르지 않는 댓글, 커밋, 코드, 위키 편집,
+이슈와 그 외 다른 기여를 삭제, 수정 또는 거부할 권리와 책임이 있으며,
+적절한 경우 중재적 의사결정에 대한 이유를 전달할 것이다.
-## Enforcement
+## 범위
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at . All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
+이 행동 강령은 개인이 공개 영역에서 커뮤니티를 공식적으로 대표할 때를
+포함하여 모든 커뮤니티 영역에 적용된다.
+커뮤니티 대표의 예로 공식 이메일 주소 사용, 공식 소셜 미디어 계정을 통한 게시,
+온/오프라인 이벤트에서 임명된 대표자의 활동이 있다.
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
+## 집행
-## Attribution
+모욕적이거나 괴롭힘 또는 그 외 하지말아야 할 행동을 발견하면
+을 통해 집행 책임이 있는 커뮤니티 리더에게 보고한다.
+모든 불만사항은 신속하고 공정하게 검토되고 조사될 것이다.
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
+커뮤니티 리더는 사건의 보고자의 사생활과 안전을 존중할 의무가 있다.
-[homepage]: https://www.contributor-covenant.org
+## 집행 지침
+
+커뮤니티 리더는 행동 강령 위반으로 간주되는 행동에 대한 결과를 결정할 때,
+다음의 커뮤니티 영향 지침을 준수한다:
+
+### 1. 정정
+
+**커뮤니티 영향**: 커뮤니티 내 부적절한 언어 사용이나
+비전문적인 행동 또는 불쾌함을 주는 행동.
+
+**결과**: 커뮤니티 리더가 별도로 위반에 대한 명확성과 부적절함에 대한
+이유를 설명하고 서면 경고.
+공개 사과를 요청할 수 있다.
+
+### 2. 경고
+
+**커뮤니티 영향**: 단일 사고 또는 연속된 행동 위반.
+
+**결과**: 지속적인 행동에 대한 결과에 대해 경고.
+특정 기간동안 행동 강령을 시행하는 사람들과의 원치 않는 상호작용을 포함한
+관련된 사람들과의 상호작용 금지. 소셜 미디어와 같은 외부 채널뿐만 아닌
+커뮤니티 공간에서의 상호작용도 금지된다.
+이 조항을 위반하면 일시적 혹은 영구적으로 제재로 이어질 수 있다.
+
+### 3. 일시적인 제재
+
+**커뮤니티 영향**: 지속적으로 부적절한 행동을 포함한
+심각한 커뮤니티 기준 위반.
-For answers to common questions about this code of conduct, see
-https://www.contributor-covenant.org/faq
+**결과**: 특정 기간동안 커뮤니티와의 어떠한 종류의 상호작용이나
+공개적 소통이 일시적 제재.
+이 기간동안 행동 강령을 시행하는 사람들과의 원치 않는 상호작용을 포함한
+관련된 사람들과의 상호작용 금지. 소셜 미디어와 같은 외부 채널뿐만 아닌
+커뮤니티 공간에서의 상호작용도 금지된다.
+이 조항을 위반하면 일시적 혹은 영구적으로 제재로 이어질 수 있다.
+
+### 4. 영구 제재
+
+**커뮤니티 영향**: 지속적인 부적절한 행동, 개인적인 괴롭힘 또는
+개인의 계급에 대한 공격이나 폄하를 포함한 커뮤니티 표준 위반 패턴을 보임.
+
+**결과**: 커뮤니티와의 모든 종류의 공개적 교류를 영구적으로 제재.
+
+## 참고
+
+이 행동 강령은 [기여자 규약][homepage] 의 2.1 버전을 변형하였습니다. 그 내용은
+[https://www.contributor-covenant.org/ko/version/2/1/code-of-conduct.html][v2.1]
+에서 확인할 수 있습니다.
+
+커뮤니티 영향 지침은 [Mozilla's code of conduct enforcement ladder][Mozilla CoC]
+에서 영감을 얻었습니다.
+
+이 행동 강령에 관련한 일반적인 질문에 대한 대답은
+[https://www.contributor-covenant.org/faq][FAQ]를 참고할 수 있습니다.
+번역본은 [https://www.contributor-covenant.org/translations][translations]에서
+볼 수 있습니다.
+
+[homepage]: https://www.contributor-covenant.org
+[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
+[Mozilla CoC]: https://github.com/mozilla/diversity
+[FAQ]: https://www.contributor-covenant.org/faq
+[translations]: https://www.contributor-covenant.org/translations
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4c7e5ec74..96229a467 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,52 +1,50 @@
-# Contributing
+# 기여하기
-Thank you for your interest in contributing to the React Docs!
+React 문서 기여에 관심을 가져주셔서 감사합니다!
-## Code of Conduct
+## 행동 강령
-Facebook has adopted a Code of Conduct that we expect project
-participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct)
-so that you can understand what actions will and will not be tolerated.
+페이스북Facebook은 프로젝트 참가자가 준수해야 하는 행동 강령을 채택했습니다. [전문을 읽어보세요](https://code.facebook.com/codeofconduct). 어떤 행동이 허용되고 허용되지 않는지 확인할 수 있습니다.
-## Technical Writing Tips
+## 기술 문서 작성 팁
-This is a [good summary](https://medium.com/@kvosswinkel/coding-like-a-journalist-ee52360a16bc) for things to keep in mind when writing technical docs.
+기술 문서를 작성할 때 염두에 두어야 할 사항에 대한 [좋은 요약](https://medium.com/@kvosswinkel/coding-like-a-journalist-ee52360a16bc)입니다.
-## Guidelines for Text
+## 글에 대한 가이드라인
-**Different sections intentionally have different styles.**
+**섹션마다 의도적으로 다른 스타일을 사용합니다.**
-The documentation is divided into sections to cater to different learning styles and use cases. When editing an article, try to match the surrounding text in tone and style. When creating a new article, try to match the tone of the other articles in the same section. Learn about the motivation behind each section below.
+이 문서는 다양한 학습 스타일과 사용 사례를 고려하여 분할되어 있습니다. 본문을 수정할 때는 주변 글의 톤Tone과 스타일Style에 맞게 작성하도록 주의하세요. 새로운 글을 작성할 때는 같은 섹션에 있는 다른 글들과 톤을 맞추도록 하세요. 각 섹션의 의도와 동기는 아래에서 확인할 수 있습니다.
-**[Learn React](https://react.dev/learn)** is designed to introduce fundamental concepts in a step-by-step way. Each individual article in Learn React builds on the knowledge from the previous ones, so make sure not to add any "cyclical dependencies" between them. It is important that the reader can start with the first article and work their way to the last Learn React article without ever having to "look ahead" for a definition. This explains some ordering choices (e.g. that state is explained before events, or that "thinking in React" doesn't use refs). Learn React also serves as a reference manual for React concepts, so it is important to be very strict about their definitions and relationships between them.
+**[React 학습하기](https://ko.react.dev/learn)** 섹션은 기초 개념을 단계별로 소개하기 위해 만들어졌습니다. 여기서 제공되는 글들은 이전에 설명된 지식을 바탕으로 하므로, 글 간 앞뒤 개념이 중복되거나 꼬이지 않도록 주의하세요. 독자는 첫 번째 글부터 마지막 글까지 순서대로 읽으며 개념을 익힐 수 있어야 하며, 추가 설명을 위해 미리 앞선 개념들을 살펴보지 않도록 해야 합니다. 이런 이유로 상태State는 이벤트Event보다 먼저 설명되고, 'React로 사고하기' 파트에서 `ref`를 사용하지 않는 등 특정 순서가 정해져 있습니다. 동시에 'React 학습하기'는 React 개념에 대한 참고 자료 역할을 하므로, 개념들에 대한 정의와 상호 관계를 엄격하게 다루어야 합니다.
-**[API Reference](https://react.dev/reference/react)** is organized by APIs rather than concepts. It is intended to be exhaustive. Any corner cases or recommendations that were skipped for brevity in Learn React should be mentioned in the reference documentation for the corresponding APIs.
+**[API 참고서](https://ko.react.dev/reference/react)** 섹션은 개념이 아닌 API별로 정리되어 있으며, 가능한 한 모든 경우를 포함하는 것을 목표로 합니다. 'React 학습하기'에서 간단히 다뤘거나 생략한 예외 사항Edge Cases 혹은 권장 사항Recommendations은 해당 API의 레퍼런스 문서에 추가로 언급해야 합니다.
-**Try to follow your own instructions.**
+**스스로 작성한 지침Instructions을 실천해 보세요.**
-When writing step-by-step instructions (e.g. how to install something), try to forget everything you know about the topic, and actually follow the instructions you wrote, a single step at time. Often you will discover that there is implicit knowledge that you forgot to mention, or that there are missing or out-of-order steps in the instructions. Bonus points for getting *somebody else* to follow the steps and watching what they struggle with. Often it would be something very simple that you have not anticipated.
+예를 들어, 단계별 가이드를 작성한다면, 직접 그 지침을 따라가 보며 누락된 내용이나 순서가 맞지 않는 부분을 찾아보세요. 실제로 지침을 순서대로 진행하다보면, 작성자가 설명하지 않은 배경지식이 있거나, 단계가 뒤섞여 있는 등의 문제를 발견할 수 있습니다. 가능하다면 다른 사람에게 지침을 따라보게 하고, 그들이 어려움을 겪는 부분을 관찰하는 것도 좋은 방법입니다. 사소해 보이지만 예상치 못한 곳에서 문제가 생길 수 있습니다.
-## Guidelines for Code Examples
+## 코드 예시에 대한 가이드라인
-### Syntax
+### 구문Syntax
-#### Prefer JSX to `createElement`.
+#### 가능하면 `createElement` 대신 JSX를 사용하세요
-Ignore this if you're specifically describing `createElement`.
+단, `createElement` 자체를 설명해야 하는 경우는 예외입니다.
-#### Use `const` where possible, otherwise `let`. Don't use `var`.
+#### 가능하면 `const`, 필요한 경우에는 `let`을 사용하고, `var`는 사용하지 마세요
-Ignore this if you're specifically writing about ES5.
+ES5만 다루는 경우라면 이 규칙은 무시하세요.
-#### Don't use ES6 features when equivalent ES5 features have no downsides.
+#### ES5의 기능만으로 간단하게 작성할 수 있는 경우, ES6의 기능을 무조건적으로 사용하지 마세요
-Remember that ES6 is still new to a lot of people. While we use it in many places (`const` / `let`, classes, arrow functions), if the equivalent ES5 code is just as straightforward and readable, consider using it.
+ES6가 아직 낯선 사람도 많습니다. 이미 여러 곳에서 `const` / `let`, 클래스, 화살표 함수 등을 사용하고 있지만, 그에 상응하는 ES5 코드가 간단하고 가독성이 좋다면 ES5를 사용하는 것도 고려하세요.
-In particular, you should prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. However, you *should* use arrow functions where they provide a tangible improvement (such as preserving `this` context inside a component). Consider both sides of the tradeoff when deciding whether to use a new feature.
+특히 최상위 함수에서는 `const myFunction = () => ...`과 같은 화살표 함수 대신에 이름 있는 `function` 선언을 선호합니다. 하지만 컴포넌트 내 `this` 컨텍스트를 유지해야 하는 경우에는 화살표 함수를 사용하세요. 새로운 문법을 사용할 때는 장단점을 모두 따져보고 결정하세요.
-#### Don't use features that aren't standardized yet.
+#### 아직 표준화되지 않은 기능은 사용하지 마세요
-For example, **don't** write this:
+예를 들어, 다음 코드처럼 작성하지 마세요.
```js
class MyComponent extends React.Component {
@@ -57,7 +55,7 @@ class MyComponent extends React.Component {
}
```
-Instead, **do** write this:
+대신, 다음처럼 작성하세요.
```js
class MyComponent extends React.Component {
@@ -72,65 +70,65 @@ class MyComponent extends React.Component {
}
```
-Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text.
+실험적인 제안Experimental Proposal에 대해 설명하는 경우라면 예외로 하되, 코드와 주변 글에서 실험적임Experimental을 명시하세요.
-### Style
+### 스타일
-- Use semicolons.
-- No space between function names and parens (`method() {}` not `method () {}`).
-- When in doubt, use the default style favored by [Prettier](https://prettier.io/playground/).
-- Always capitalize React concepts such as Hooks, Effects, and Transitions.
+- 세미콜론을 사용하세요.
+- 함수 이름과 괄호 사이에는 공백을 넣지 마세요. (`method () {}`가 아닌, `method() {}` 형태.)
+- 고민될 때는 [Prettier](https://prettier.io/playground/)의 기본 스타일을 따르세요.
+- Hooks, Effects, Transitions 같은 React 관련 개념은 항상 대문자로 시작하세요.
-### Highlighting
+### 하이라이팅
-Use `js` as the highlighting language in Markdown code blocks:
+마크다운Markdown의 코드 블록에서는 `js`를 사용하세요:
````
```js
-// code
+// 코드
```
````
-Sometimes you'll see blocks with numbers.
-They tell the website to highlight specific lines.
+간혹 숫자와 함께 사용되는 블록이 있습니다.
+이는 특정 줄을 강조하기 위한 용도입니다.
-You can highlight a single line:
+한 줄을 강조하는 예시.
````
```js {2}
function hello() {
- // this line will get highlighted
+ // 이 줄이 강조됩니다
}
```
````
-A range of lines:
+일정 범위를 강조하는 예시.
````
```js {2-4}
function hello() {
- // these lines
- // will get
- // highlighted
+ // 여기부터
+ // 시작해서
+ // 여기까지 강조됩니다
}
```
````
-Or even multiple ranges:
+여러 범위를 강조하는 예시.
````
```js {2-4,6}
function hello() {
- // these lines
- // will get
- // highlighted
+ // 여기부터
+ // 시작해서
+ // 여기까지 강조됩니다
console.log('hello');
- // also this one
+ // 이 줄도 강조됩니다
console.log('there');
}
```
````
-Be mindful that if you move some code in an example with highlighting, you also need to update the highlighting.
+코드를 이동하거나 순서를 바꿨다면, 강조하는 줄도 같이 수정해야 한다는 점을 잊지 마세요.
-Don't be afraid to often use highlighting! It is very valuable when you need to focus the reader's attention on a particular detail that's easy to miss.
+강조 기능은 독자가 놓치기 쉬운 구체적인 부분에 주의를 환기해주므로 적극적으로 사용하길 권장합니다.
diff --git a/README.md b/README.md
index a43f5c9a4..4cbaabe18 100644
--- a/README.md
+++ b/README.md
@@ -1,73 +1,74 @@
# ko.react.dev
-[](https://discord.gg/YXdTyCh5KF)
+[](https://discord.gg/YXdTyCh5KF)
## 한국어 번역 정보
### 가이드
-번역을 진행할 때에 다음의 가이드를 따라주세요.
+번역 혹은 기여를 진행할 때, 아래 가이드를 따라주세요.
-1. 다음과 같은 [공통 스타일 가이드 확인 (Check the common style guide)](/wiki/universal-style-guide.md)을 따르고 있습니다.
-2. [모범 사례 확인 (Check best practices)](/wiki/best-practices-for-translation.md)을 따라주세요.
-3. 공통된 단어 번역을 위해 [용어 확인 (Check the term)](/wiki/translate-glossary.md)을 참고해주세요.
-4. 끌어오기(Pull Request) 요청 시 테스트를 통과하지 못할 경우 [Textlint 가이드 확인 (Check the textlint guide)](https://github.com/reactjs/ko.react.dev/blob/main/wiki/textlint/what-is-textlint.md)을 참고해주세요.
-5. 마지막으로 [맞춤법 검사 (Spelling check)](https://nara-speller.co.kr/speller/)를 진행해주세요.
+1. [기여 가이드라인Contributing](/CONTRIBUTING.md) 및 [기여자 행동 강령 규약Code of Conduct](/CODE_OF_CONDUCT.md)을 따르고 있습니다.
+1. [공통 스타일 가이드Universal Style Guide](/wiki/universal-style-guide.md)를 확인해주세요.
+1. [번역을 위한 모범 사례Best Practices for Translation](/wiki/best-practices-for-translation.md)를 따라주세요.
+1. 공통된 단어 번역을 위해 [번역 용어 정리Translate Glossary](/wiki/translate-glossary.md)를 참고해주세요.
+1. 끌어오기 요청Pull Request시 테스트를 통과하지 못할 경우, [`textlint` 가이드Textlint Guide](/wiki/textlint-guide.md)를 참고해주세요.
+1. 마지막으로 [맞춤법 검사Spelling Check](https://nara-speller.co.kr/speller/)를 진행해주세요.
-이 저장소는 [ko.react.dev](https://ko.react.dev/)의 소스 코드와 개발 문서를 포함하고 있습니다.
+이 저장소Repository는 [ko.react.dev](https://ko.react.dev/)의 소스 코드와 개발 문서를 포함하고 있습니다.
## 시작하기
### 사전 준비
1. Git
-1. Node: 12.0.0 이상으로 시작하는 모든 12.x 버전
-1. Yarn v1: [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/) 참고
-1. 포크한 개인 저장소
-1. 로컬에 클론(Clone)한 [ko.react.dev repo](https://github.com/reactjs/ko.react.dev) 개인 저장소
+1. Node: v16.8.0 이상의 모든 버전
+1. Yarn v1(`yarn@1.22.22`): [Yarn 설치 안내](https://yarnpkg.com/lang/en/docs/install/) 참고
+1. 포크Fork한 개인 저장소
+1. 로컬에 클론Clone한 [ko.react.dev 저장소](https://github.com/reactjs/ko.react.dev)
### 설치
1. `cd ko.react.dev`를 실행하여 프로젝트 경로로 이동합니다.
-1. `yarn` 을 이용하여 npm 의존성 모듈들을 설치합니다.
+1. `yarn` 명령어를 실행하여 npm 의존성 모듈들을 설치합니다.
### 개발 서버 실행하기
-1. `yarn dev` 명령어를 사용하여 hot-reloading 개발 서버를 시작합니다. (powered by [Next.js](https://nextjs.org))
+1. `yarn dev` 명령어를 사용하여 개발 서버를 시작합니다. (powered by [Next.js](https://nextjs.org).)
1. `open http://localhost:3000` 명령어를 사용하여 선호하는 브라우저로 접속하세요.
## 기여 방법
### 가이드라인
-이 문서는 목적이 다른 여러 섹션으로 나뉘게 됩니다. 문장을 추가할 계획이라면, 적절한 섹션에 대한 [contributing guidelines](/CONTRIBUTING.md)을 숙지하는 것이 도움이 될 것입니다.
+이 문서는 목적이 다른 여러 섹션으로 나뉩니다. 문장을 추가할 계획이라면, 적절한 섹션에 대한 [기여 가이드라인Contributing](/CONTRIBUTING.md)을 숙지하는 것이 도움이 될 것입니다.
-### 브랜치(branch) 만들기
+### 분기Branch 만들기
1. `ko.react.dev` 로컬 저장소에서 `git checkout main`을 실행합니다.
-1. `git pull origin main`를 실행하여 최신 원본 코드를 보장할 수 있습니다.
-1. `git checkout -b the-name-of-my-branch` (`the-name-of-my-branch` 를 적절한 이름으로 교체)를 실행하여 브랜치를 만듭니다.
+1. `git pull origin main`을 실행하여 최신 코드를 가져올 수 있습니다.
+1. `git checkout -b the-name-of-my-branch`를 실행하여 분기Branch를 만듭니다. (이때, `the-name-of-my-branch`를 적절한 이름으로 교체.)
### 수정하기
1. ["개발 서버 실행하기"](#개발-서버-실행하기) 부분을 따릅니다.
1. 파일을 저장하고 브라우저에서 확인합니다.
-1. `src`안에 있는 React 컴포넌트가 수정될 경우 hot-reload가 적용됩니다.
-1. `content`안에 있는 마크다운 파일이 수정될 경우 hot-reload가 적용됩니다.
+1. `src` 안에 있는 React 컴포넌트가 수정될 경우 hot-reload가 적용됩니다.
+1. `content` 안에 있는 마크다운 파일이 수정될 경우 hot-reload가 적용됩니다.
1. 플러그인을 사용하는 경우, `.cache` 디렉토리를 제거한 후 서버를 재시작해야 합니다.
-### 수정사항 체크하기
+### 수정사항 검사하기
-1. 가능하다면, 변경한 부분에 대해서 많이 사용하는 브라우저의 최신 버전에서 시각적으로 제대로 적용되었는지 확인해주세요. (데스크탑과 모바일 모두)
-1. 프로젝트 루트에서 `yarn check-all`을 실행합니다. (이 명령어는 Prettier, ESLint, 그리고 타입 검증을 진행합니다.)
+1. 가능하다면, 변경한 부분에 대해서 많이 사용하는 브라우저의 최신 버전에서 시각적으로 제대로 적용되었는지 확인해주세요. (데스크탑과 모바일 모두.)
+1. 프로젝트 루트에서 `yarn check-all`을 실행합니다. (이 명령어는 Prettier, ESLint, 그리고 타입 유효성 검사를 진행합니다.)
-### Push 하기
+### 푸시Push 하기
-1. `git add -A && git commit -m "My message"` (`My message` 부분을 `Fix header logo on Android` 같은 커밋 메시지로 교체)를 실행하여 변경한 파일들을 commit 해주세요.
+1. `git add -A && git commit -m "My message"`를 실행하여 변경한 파일들을 커밋commit 해주세요. (이때, `My message` 부분을 `Fix header logo on Android` 같은 커밋 메시지로 교체.)
1. `git push my-fork-name the-name-of-my-branch`
-1. [ko.react.dev repo](https://github.com/reactjs/ko.react.dev)에서 최근에 푸시된 브랜치를 볼 수 있습니다.
-1. GitHub 지침을 따라주세요.
-1. 가능하다면 시각적으로 변화된 부분의 스크린샷을 첨부해주세요. PR을 만들고 다른사람들이 수정사항을 볼 수 있게되면 자동으로 빌드할 것입니다.
+1. [ko.react.dev 저장소](https://github.com/reactjs/ko.react.dev)에서 최근에 푸시된 분기Branch를 볼 수 있습니다.
+1. 깃허브GitHub 지침을 따라주세요.
+1. 가능하다면 시각적으로 변화된 부분의 스크린샷을 첨부해주세요. 변경 사항이 깃허브GitHub에 푸시Push되면 미리보기 빌드가 트리거됩니다.
## 문제 해결하기
@@ -77,7 +78,7 @@
`react.dev` 번역에 흥미가 있다면, [translations.react.dev](https://translations.react.dev/)에서 현재 번역이 얼마나 진행되었는지 확인해주세요.
-번역하려는 언어가 아직 진행되지 않았다면, 해당 언어에 대해 새롭게 만들 수 있습니다. [translations.react.dev repo](https://github.com/reactjs/translations.react.dev)를 참고해주세요.
+번역하려는 언어가 아직 진행되지 않았다면, 해당 언어에 대해 새롭게 만들 수 있습니다. [translations.react.dev 저장소](https://github.com/reactjs/translations.react.dev)를 참고해주세요.
## 저작권
diff --git a/colors.js b/colors.js
index 872f33cac..2b282c820 100644
--- a/colors.js
+++ b/colors.js
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/eslint-local-rules/__tests__/fixtures/src/content/basic-error.md b/eslint-local-rules/__tests__/fixtures/src/content/basic-error.md
new file mode 100644
index 000000000..8e7670fdc
--- /dev/null
+++ b/eslint-local-rules/__tests__/fixtures/src/content/basic-error.md
@@ -0,0 +1,8 @@
+```jsx
+import {useState} from 'react';
+function Counter() {
+ const [count, setCount] = useState(0);
+ setCount(count + 1);
+ return
@@ -174,11 +181,11 @@ export function HomeContent() {
사용자 인터페이스 만들기
- React를 사용하면 컴포넌트라고 불리는 조각들을 사용하여 사용자
+ React를 사용하면 컴포넌트라 불리는 조각들을 사용하여 사용자
인터페이스를 만들 수 있습니다. Thumbnail,{' '}
LikeButton, 그리고 Video 같은 컴포넌트를
- 만들 수 있습니다. 그런 다음 전체 화면, 페이지 및 앱에서 이들을
- 결합할 수 있습니다.
+ 만들어 보세요. 그런 다음 전체 화면, 페이지 및 앱에서 이들을 결합할
+ 수 있습니다.
@@ -188,7 +195,7 @@ export function HomeContent() {
혼자서 작업하든, 수천 명의 다른 개발자와 함께 작업하든, React를
사용하는 느낌은 동일합니다. 개인, 팀, 조직에서 작성한 컴포넌트를
- 원활하게 결합할 수 있도록 설계되었습니다.
+ 원활하게 결합할 수 있도록 설계하였습니다.
@@ -200,10 +207,10 @@ export function HomeContent() {
컴포넌트 작성하기
- React 컴포넌트는 JavaScript 함수입니다. 조건부로 내용을 표시하려면{' '}
- if 문을 사용할 수 있습니다. 목록을 표시하려면 배열에{' '}
- map()을 사용할 수 있습니다. React를 배우는 것은
- 프로그래밍을 배우는 것입니다.
+ React 컴포넌트는 자바스크립트 함수입니다. 조건부로 내용을
+ 표시하려면 if 문을 사용할 수 있습니다. 목록을
+ 표시하려면 배열에 map()을 사용할 수 있습니다. React를
+ 배우는 것은 프로그래밍을 배우는 것입니다.
@@ -211,9 +218,9 @@ export function HomeContent() {
- 이 마크업 구문을 JSX 라고 부릅니다. 이것은 React에 의해서 대중화된
- JavaScript 구문의 확장입니다. JSX 마크업을 관련된 렌더링 로직과
- 가까이 두면, React 컴포넌트를 쉽게 만들고 유지하고 삭제할 수
+ 이 마크업 구문을 JSX라 부릅니다. 이것은 React에 의해서 대중화된
+ 자바스크립트 구문의 확장입니다. JSX 마크업을 관련된 렌더링 로직과
+ 가까이 두면, React 컴포넌트를 쉽게 만들고 관리하고 삭제할 수
있습니다.
@@ -238,7 +245,7 @@ export function HomeContent() {
전체 페이지를 React로 빌드할 필요는 없습니다. React를 기존 HTML
- 페이지에 추가하고, 어디에서나 상호작용하는 React 컴포넌트를
+ 페이지에 추가하고, 페이지 어디에서나 상호작용하는 React 컴포넌트를
렌더링할 수 있습니다.
@@ -255,15 +262,16 @@ export function HomeContent() {
- 프레임워크를 통해서
+ 프레임워크를 통해
풀스택으로 만들기
- React는 라이브러리입니다. 컴포넌트를 함께 묶을 수 있지만, 라우팅과
- 데이터를 가져오는 방법을 규정하지는 않습니다. React로 앱을
- 만들려면, Next.js 또는{' '}
- Remix 같은 풀스택 React
- 프레임워크를 추천합니다.
+ React는 라이브러리입니다. 컴포넌트를 조합할 수 있도록 도와주지만,
+ 라우팅이나 데이터를 가져오는 방법을 규정하지는 않습니다. React로
+ 완전한 앱을 만들려면,{' '}
+ Next.js 또는{' '}
+ React Router 같은
+ 풀스택 React 프레임워크를 추천합니다.
@@ -271,16 +279,17 @@ export function HomeContent() {
- React는 아키텍처이기도 합니다. 이를 구현하는 프레임워크를 사용하면
- 서버에서 실행되는 비동기 컴포넌트에서 또는 빌드 도중에 데이터를
- 가져올 수 있습니다. 파일이나 데이터베이스에서 데이터를 읽고, 이를
- 상호작용하는 컴포넌트로 전달할 수 있습니다.
+ React는 아키텍처이기도 합니다. 이를 구현하는 프레임워크는 서버에서
+ 실행되는 비동기 컴포넌트 혹은 빌드 중에 실행되는 비동기
+ 컴포넌트에서 데이터를 가져올 수 있도록 합니다. 파일이나
+ 데이터베이스에서 데이터를 읽고, 이를 상호작용하는 컴포넌트에
+ 전달할 수 있습니다.
+ href="/learn/creating-a-react-app">
프레임워크로 시작하기
@@ -293,7 +302,7 @@ export function HomeContent() {
사람들은 다양한 이유로 웹과 네이티브 앱을 좋아합니다. React는
동일한 기술을 사용하여 웹 앱과 네이티브 앱을 모두 만들 수
- 있습니다. 각 플랫폼에 강점을 활용하여 모든 플랫폼에서 적합한
+ 있습니다. 각 플랫폼의 장점을 활용하여 모든 플랫폼에서 적합한
인터페이스를 구현할 수 있습니다.
@@ -311,12 +320,12 @@ export function HomeContent() {
웹에 충실하기
- 사람들은 웹이 빠르게 로드되길 기대합니다. 서버에서
+ 사람들은 웹 앱이 빠르게 로드되길 기대합니다. 서버에서
React를 사용하면 데이터를 가져오는 동안 HTML을
- 스트리밍하여 JavaScript 코드가 로드되기 전에 남은 내용을
- 점진적으로 채울 수 있습니다. 클라이언트에서 React는 표준
- web API를 사용하여 렌더링 중에도 UI를 반응적으로 유지할
- 수 있습니다.
+ 스트리밍하여 자바스크립트 코드가 로드되기 전에 남은
+ 내용을 점진적으로 채울 수 있습니다. 클라이언트에서
+ React는 표준 웹 API를 사용하여 렌더링 중에도 UI가
+ 반응하도록 유지할 수 있습니다.
@@ -394,21 +403,22 @@ export function HomeContent() {
- 네이티브에서 사용하기
+ 진정한 네이티브에서 사용하기
- 사람들은 네이티브 앱이 플랫폼과 같은 모양처럼
- 느껴지기를 원합니다.{' '}
+ 사람들은 네이티브Native 앱이 해당 플랫폼의
+ 모습과 느낌을 갖기를 기대합니다.{' '}
React Native
와{' '}
Expo
- 를 사용하면 React를 통하여 Android, iOS 등을 위한 앱을
- 빌드할 수 있습니다. UI들이 native이기 때문에 진짜
- native처럼 보입니다. 이것은 web view가 아닙니다. React
- 컴포넌트들은 실제 Android, iOS 플랫폼에서 제공하는
- view를 렌더링합니다.
+ 를 사용하면 React를 통해 Android, iOS 등을 위한 앱을
+ 빌드할 수 있습니다. UI가 진정한 네이티브이기 때문에
+ 네이티브처럼 보이고 느껴집니다. 이것은 웹 뷰
+ Web View가 아닙니다. React 컴포넌트들은
+ 실제 Android, iOS 플랫폼에서 제공하는 뷰
+ View를 렌더링합니다.
@@ -435,15 +445,15 @@ export function HomeContent() {
-
+
새로운 기능에 맞춰
업그레이드 하기
- React는 변화에 신중하게 접근합니다. 모든 React 커밋은 10억 명
- 이상의 사용자가 있는 비즈니스에 크리티컬한 영역에서 테스트
- 됩니다. Meta에서는 10만 개 이상의 React 컴포넌트가 모든
+ React는 변화에 신중하게 접근합니다. 모든 React 커밋은 10억명
+ 이상의 사용자가 있는 비즈니스의 크리티컬한 영역에서 테스트를
+ 진행합니다. Meta에서는 10만 개 이상의 React 컴포넌트가 모든
마이그레이션 전략을 검증합니다.
@@ -495,9 +505,9 @@ export function HomeContent() {
수백만 명이 있는 커뮤니티
- 여러분은 혼자가 아닙니다. 200만 명이 넘는 개발자들이 React
- 문서를 매달 방문합니다. React는 사람들과 팀이 동의할 수 있는
- 것입니다.
+ 여러분은 혼자가 아닙니다. 전세계의 200만 명이 넘는 개발자들이
+ React 문서를 매달 방문합니다. React는 사람들과 팀이 동의할 수
+ 있는 것입니다.
@@ -505,12 +515,12 @@ export function HomeContent() {
- 이것이 바로 React가 라이브러리를 넘어 아키텍처, 심지어
- 에코시스템 그 이상인 이유입니다. React는 커뮤니티입니다.
- 도움을 요청하고, 기회를 찾고, 새로운 친구를 만날 수 있는
- 곳입니다. 개발자와 디자이너, 초보자와 전문가, 연구원과 예술가,
- 교사와 학생을 만날 수 있습니다. 모두의 배경은 다를 수 있지만,
- React를 통해 함께 사용자 인터페이스를 만들 수 있습니다.
+ 이것이 바로 React가 단순한 라이브러리, 아키텍처, 혹은 생태계
+ 그 이상인 이유입니다. React는 바로 커뮤니티입니다. 도움을
+ 요청하고, 기회를 찾고, 새로운 친구를 만날 수 있는 곳입니다.
+ 개발자와 디자이너, 초보자와 전문가, 연구원과 예술가, 교사와
+ 학생을 만날 수 있습니다. 배경은 모두 다를 수 있지만, React를
+ 통해 함께 사용자 인터페이스를 만들 수 있습니다.
@@ -528,7 +538,7 @@ export function HomeContent() {
React 커뮤니티에
- 오신 것을 환영합니다.
+ 오신 것을 환영합니다
+
diff --git a/src/components/Layout/Sidebar/SidebarRouteTree.tsx b/src/components/Layout/Sidebar/SidebarRouteTree.tsx
index 3f058073c..863355bfd 100644
--- a/src/components/Layout/Sidebar/SidebarRouteTree.tsx
+++ b/src/components/Layout/Sidebar/SidebarRouteTree.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -38,6 +45,7 @@ function CollapseWrapper({
// Disable pointer events while animating.
const isExpandedRef = useRef(isExpanded);
if (typeof window !== 'undefined') {
+ // eslint-disable-next-line react-compiler/react-compiler
// eslint-disable-next-line react-hooks/rules-of-hooks
useLayoutEffect(() => {
const wasExpanded = isExpandedRef.current;
@@ -87,7 +95,7 @@ export function SidebarRouteTree({
path,
title,
routes,
- canary,
+ version,
heading,
hasSectionHeader,
sectionHeader,
@@ -121,7 +129,7 @@ export function SidebarRouteTree({
selected={selected}
level={level}
title={title}
- canary={canary}
+ version={version}
isExpanded={isExpanded}
hideArrow={isForceExpanded}
/>
@@ -145,7 +153,7 @@ export function SidebarRouteTree({
selected={selected}
level={level}
title={title}
- canary={canary}
+ version={version}
/>
);
diff --git a/src/components/Layout/Sidebar/index.tsx b/src/components/Layout/Sidebar/index.tsx
index d0e291547..69664e6bc 100644
--- a/src/components/Layout/Sidebar/index.tsx
+++ b/src/components/Layout/Sidebar/index.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/Layout/SidebarNav/SidebarNav.tsx b/src/components/Layout/SidebarNav/SidebarNav.tsx
index 171270960..678d483c1 100644
--- a/src/components/Layout/SidebarNav/SidebarNav.tsx
+++ b/src/components/Layout/SidebarNav/SidebarNav.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -5,7 +12,6 @@
import {Suspense} from 'react';
import * as React from 'react';
import cn from 'classnames';
-import {Feedback} from '../Feedback';
import {SidebarRouteTree} from '../Sidebar/SidebarRouteTree';
import type {RouteItem} from '../getRouteMeta';
@@ -56,9 +62,6 @@ export default function SidebarNav({
-
-
-
diff --git a/src/components/Layout/SidebarNav/index.tsx b/src/components/Layout/SidebarNav/index.tsx
index b268bbd29..f9680d803 100644
--- a/src/components/Layout/SidebarNav/index.tsx
+++ b/src/components/Layout/SidebarNav/index.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/Layout/Toc.tsx b/src/components/Layout/Toc.tsx
index e4e7f6769..8a1b53a09 100644
--- a/src/components/Layout/Toc.tsx
+++ b/src/components/Layout/Toc.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/Layout/TopNav/BrandMenu.tsx b/src/components/Layout/TopNav/BrandMenu.tsx
index 3bd8776f2..218e423ce 100644
--- a/src/components/Layout/TopNav/BrandMenu.tsx
+++ b/src/components/Layout/TopNav/BrandMenu.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
import * as ContextMenu from '@radix-ui/react-context-menu';
import {IconCopy} from 'components/Icon/IconCopy';
import {IconDownload} from 'components/Icon/IconDownload';
diff --git a/src/components/Layout/TopNav/TopNav.tsx b/src/components/Layout/TopNav/TopNav.tsx
index dab8dcb37..ad34057c4 100644
--- a/src/components/Layout/TopNav/TopNav.tsx
+++ b/src/components/Layout/TopNav/TopNav.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -22,7 +29,6 @@ import {IconHamburger} from 'components/Icon/IconHamburger';
import {IconSearch} from 'components/Icon/IconSearch';
import {Search} from 'components/Search';
import {Logo} from '../../Logo';
-import {Feedback} from '../Feedback';
import {SidebarRouteTree} from '../Sidebar';
import type {RouteItem} from '../getRouteMeta';
import {siteConfig} from 'siteConfig';
@@ -266,7 +272,9 @@ export default function TopNav({
-
+
- 레퍼런스
+ API 참고서
커뮤니티
@@ -408,20 +416,20 @@ export default function TopNav({
- Learn
+ 학습하기
- Reference
+ API 참고서
- Community
+ 커뮤니티
- Blog
+ 블로그
-
-
-
)}
diff --git a/src/components/Layout/TopNav/index.tsx b/src/components/Layout/TopNav/index.tsx
index 8472fb126..e76fa5ed0 100644
--- a/src/components/Layout/TopNav/index.tsx
+++ b/src/components/Layout/TopNav/index.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/Layout/getRouteMeta.tsx b/src/components/Layout/getRouteMeta.tsx
index 3564dd738..5a85a3e21 100644
--- a/src/components/Layout/getRouteMeta.tsx
+++ b/src/components/Layout/getRouteMeta.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -19,8 +26,8 @@ export type RouteTag =
export interface RouteItem {
/** Page title (for the sidebar) */
title: string;
- /** Optional canary flag for heading */
- canary?: boolean;
+ /** Optional version flag for heading */
+ version?: 'canary' | 'major';
/** Optional page description for heading */
description?: string;
/* Additional meta info for page tagging */
diff --git a/src/components/Layout/useTocHighlight.tsx b/src/components/Layout/useTocHighlight.tsx
index 544396c68..02385409f 100644
--- a/src/components/Layout/useTocHighlight.tsx
+++ b/src/components/Layout/useTocHighlight.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/Logo.tsx b/src/components/Logo.tsx
index 07e72c992..3ea4ba9ac 100644
--- a/src/components/Logo.tsx
+++ b/src/components/Logo.tsx
@@ -1,8 +1,16 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
+import type {SVGProps} from 'react';
-export function Logo(props: JSX.IntrinsicElements['svg']) {
+export function Logo(props: SVGProps) {
return (
= {};
let content: React.ReactElement[] = [];
Children.forEach(children, (child) => {
- const {props, type} = child;
+ const {props, type} = child as React.ReactElement<{
+ children?: string;
+ id?: string;
+ }>;
switch ((type as any).mdxName) {
case 'Solution': {
challenge.solution = child;
diff --git a/src/components/MDX/Challenges/Navigation.tsx b/src/components/MDX/Challenges/Navigation.tsx
index 736db093c..0511bd05a 100644
--- a/src/components/MDX/Challenges/Navigation.tsx
+++ b/src/components/MDX/Challenges/Navigation.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -108,7 +115,7 @@ export function Navigation({
onClick={handleScrollLeft}
aria-label="Scroll left"
className={cn(
- 'bg-secondary-button dark:bg-secondary-button-dark h-8 px-2 rounded-l border-gray-20 border-r rtl:rotate-180',
+ 'bg-secondary-button dark:bg-secondary-button-dark h-8 px-2 rounded-l rtl:rounded-r rtl:rounded-l-none border-gray-20 border-r rtl:border-l rtl:border-r-0',
{
'text-primary dark:text-primary-dark': canScrollLeft,
'text-gray-30': !canScrollLeft,
@@ -120,7 +127,7 @@ export function Navigation({
onClick={handleScrollRight}
aria-label="Scroll right"
className={cn(
- 'bg-secondary-button dark:bg-secondary-button-dark h-8 px-2 rounded-e rtl:rotate-180',
+ 'bg-secondary-button dark:bg-secondary-button-dark h-8 px-2 rounded-e',
{
'text-primary dark:text-primary-dark': canScrollRight,
'text-gray-30': !canScrollRight,
diff --git a/src/components/MDX/Challenges/index.tsx b/src/components/MDX/Challenges/index.tsx
index 413fd4611..27e3df1ef 100644
--- a/src/components/MDX/Challenges/index.tsx
+++ b/src/components/MDX/Challenges/index.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/CodeBlock/CodeBlock.tsx b/src/components/MDX/CodeBlock/CodeBlock.tsx
index 7eef0abe8..3eeac3945 100644
--- a/src/components/MDX/CodeBlock/CodeBlock.tsx
+++ b/src/components/MDX/CodeBlock/CodeBlock.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -289,7 +296,7 @@ function getSyntaxHighlight(theme: any): HighlightStyle {
function getLineDecorators(
code: string,
- meta: string
+ meta?: string
): Array<{
line: number;
className: string;
@@ -309,7 +316,7 @@ function getLineDecorators(
function getInlineDecorators(
code: string,
- meta: string
+ meta?: string
): Array<{
step: number;
line: number;
@@ -336,6 +343,7 @@ function getInlineDecorators(
line.step === 3,
'bg-green-40 border-green-40 text-green-60 dark:text-green-30':
line.step === 4,
+ // TODO: Some codeblocks use up to 6 steps.
}
),
})
diff --git a/src/components/MDX/CodeBlock/index.tsx b/src/components/MDX/CodeBlock/index.tsx
index 551c1d1b6..d3ed3a065 100644
--- a/src/components/MDX/CodeBlock/index.tsx
+++ b/src/components/MDX/CodeBlock/index.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/CodeDiagram.tsx b/src/components/MDX/CodeDiagram.tsx
index 7a503f068..ba18ae973 100644
--- a/src/components/MDX/CodeDiagram.tsx
+++ b/src/components/MDX/CodeDiagram.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -17,7 +24,14 @@ export function CodeDiagram({children, flip = false}: CodeDiagramProps) {
});
const content = Children.toArray(children).map((child: any) => {
if (child.type?.mdxName === 'pre') {
- return ;
+ return (
+
+ );
} else if (child.type === 'img') {
return null;
} else {
diff --git a/src/components/MDX/ConsoleBlock.tsx b/src/components/MDX/ConsoleBlock.tsx
index 6e704b417..1847abc5c 100644
--- a/src/components/MDX/ConsoleBlock.tsx
+++ b/src/components/MDX/ConsoleBlock.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -38,7 +45,8 @@ export function ConsoleBlock({level = 'error', children}: ConsoleBlockProps) {
if (typeof children === 'string') {
message = children;
} else if (isValidElement(children)) {
- message = children.props.children;
+ message = (children as React.ReactElement<{children?: React.ReactNode}>)
+ .props.children;
}
return (
@@ -113,7 +121,8 @@ export function ConsoleLogLine({children, level}: ConsoleBlockProps) {
if (typeof children === 'string') {
message = children;
} else if (isValidElement(children)) {
- message = children.props.children;
+ message = (children as React.ReactElement<{children?: React.ReactNode}>)
+ .props.children;
} else if (Array.isArray(children)) {
message = children.reduce((result, child) => {
if (typeof child === 'string') {
diff --git a/src/components/MDX/Diagram.tsx b/src/components/MDX/Diagram.tsx
index 7920661da..579c86ebe 100644
--- a/src/components/MDX/Diagram.tsx
+++ b/src/components/MDX/Diagram.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -15,8 +22,8 @@ interface DiagramProps {
function Caption({text}: {text: string}) {
return (
-
-
+
+
{text}
diff --git a/src/components/MDX/DiagramGroup.tsx b/src/components/MDX/DiagramGroup.tsx
index 6c5130a3d..8e3bf46c3 100644
--- a/src/components/MDX/DiagramGroup.tsx
+++ b/src/components/MDX/DiagramGroup.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/ErrorDecoder.tsx b/src/components/MDX/ErrorDecoder.tsx
index 198aa939d..423790198 100644
--- a/src/components/MDX/ErrorDecoder.tsx
+++ b/src/components/MDX/ErrorDecoder.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
import {useEffect, useState} from 'react';
import {useErrorDecoderParams} from '../ErrorDecoderContext';
import cn from 'classnames';
@@ -11,7 +18,7 @@ function replaceArgs(
return msg.replace(/%s/g, function () {
const arg = argList[argIdx++];
// arg can be an empty string: ?args[0]=&args[1]=count
- return arg === undefined || arg === '' ? replacer : arg;
+ return arg === undefined ? replacer : arg;
});
}
@@ -69,7 +76,7 @@ function parseQueryString(search: string): Array {
}
export default function ErrorDecoder() {
- const {errorMessage} = useErrorDecoderParams();
+ const {errorMessage, errorCode} = useErrorDecoderParams();
/** error messages that contain %s require reading location.search */
const hasParams = errorMessage?.includes('%s');
const [message, setMessage] = useState(() =>
@@ -82,23 +89,28 @@ export default function ErrorDecoder() {
if (errorMessage == null || !hasParams) {
return;
}
+ const args = parseQueryString(window.location.search);
+ let message = errorMessage;
+ if (errorCode === '418') {
+ // Hydration errors have a %s for the diff, but we don't add that to the args for security reasons.
+ message = message.replace(/%s$/, '');
+
+ // Before React 19.1, the error message didn't have an arg, and was always HTML.
+ if (args.length === 0) {
+ args.push('HTML');
+ } else if (args.length === 1 && args[0] === '') {
+ args[0] = 'HTML';
+ }
+ }
- setMessage(
- urlify(
- replaceArgs(
- errorMessage,
- parseQueryString(window.location.search),
- '[missing argument]'
- )
- )
- );
+ setMessage(urlify(replaceArgs(message, args, '[missing argument]')));
setIsReady(true);
- }, [hasParams, errorMessage]);
+ }, [errorCode, hasParams, errorMessage]);
return (
{message}
diff --git a/src/components/MDX/ExpandableCallout.tsx b/src/components/MDX/ExpandableCallout.tsx
index d1916da8a..430d68f49 100644
--- a/src/components/MDX/ExpandableCallout.tsx
+++ b/src/components/MDX/ExpandableCallout.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -8,8 +15,18 @@ import {IconNote} from '../Icon/IconNote';
import {IconWarning} from '../Icon/IconWarning';
import {IconPitfall} from '../Icon/IconPitfall';
import {IconCanary} from '../Icon/IconCanary';
+import {IconRocket} from '../Icon/IconRocket';
-type CalloutVariants = 'deprecated' | 'pitfall' | 'note' | 'wip' | 'canary';
+type CalloutVariants =
+ | 'deprecated'
+ | 'pitfall'
+ | 'note'
+ | 'wip'
+ | 'canary'
+ | 'experimental'
+ | 'rc'
+ | 'major'
+ | 'rsc';
interface ExpandableCalloutProps {
children: React.ReactNode;
@@ -18,7 +35,7 @@ interface ExpandableCalloutProps {
const variantMap = {
deprecated: {
- title: '더 이상 사용되지 않습니다',
+ title: '더 이상 사용되지 않습니다!',
Icon: IconWarning,
containerClasses: 'bg-red-5 dark:bg-red-60 dark:bg-opacity-20',
textColor: 'text-red-50 dark:text-red-40',
@@ -34,6 +51,15 @@ const variantMap = {
overlayGradient:
'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
},
+ rc: {
+ title: 'RC',
+ Icon: IconCanary,
+ containerClasses:
+ 'bg-gray-5 dark:bg-gray-60 dark:bg-opacity-20 text-primary dark:text-primary-dark text-lg',
+ textColor: 'text-gray-60 dark:text-gray-30',
+ overlayGradient:
+ 'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
+ },
canary: {
title: 'Canary',
Icon: IconCanary,
@@ -43,6 +69,15 @@ const variantMap = {
overlayGradient:
'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
},
+ experimental: {
+ title: '실험적 기능',
+ Icon: IconCanary,
+ containerClasses:
+ 'bg-green-5 dark:bg-green-60 dark:bg-opacity-20 text-primary dark:text-primary-dark text-lg',
+ textColor: 'text-green-60 dark:text-green-40',
+ overlayGradient:
+ 'linear-gradient(rgba(245, 249, 248, 0), rgba(245, 249, 248, 1)',
+ },
pitfall: {
title: '주의하세요!',
Icon: IconPitfall,
@@ -52,13 +87,29 @@ const variantMap = {
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
},
wip: {
- title: '개발중이에요',
+ title: '개발중이에요!',
Icon: IconNote,
containerClasses: 'bg-yellow-5 dark:bg-yellow-60 dark:bg-opacity-20',
textColor: 'text-yellow-50 dark:text-yellow-40',
overlayGradient:
'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
},
+ major: {
+ title: 'React 19',
+ Icon: IconRocket,
+ containerClasses: 'bg-blue-10 dark:bg-blue-60 dark:bg-opacity-20',
+ textColor: 'text-blue-50 dark:text-blue-40',
+ overlayGradient:
+ 'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
+ },
+ rsc: {
+ title: 'React 서버 컴포넌트',
+ Icon: null,
+ containerClasses: 'bg-blue-10 dark:bg-blue-60 dark:bg-opacity-20',
+ textColor: 'text-blue-50 dark:text-blue-40',
+ overlayGradient:
+ 'linear-gradient(rgba(249, 247, 243, 0), rgba(249, 247, 243, 1)',
+ },
};
function ExpandableCallout({children, type = 'note'}: ExpandableCalloutProps) {
@@ -72,9 +123,11 @@ function ExpandableCallout({children, type = 'note'}: ExpandableCalloutProps) {
variant.containerClasses
)}>
-
+ {variant.Icon && (
+
+ )}
{variant.title}
diff --git a/src/components/MDX/ExpandableExample.tsx b/src/components/MDX/ExpandableExample.tsx
index 29116c1b1..33db159f2 100644
--- a/src/components/MDX/ExpandableExample.tsx
+++ b/src/components/MDX/ExpandableExample.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -71,7 +78,7 @@ function ExpandableExample({children, excerpt, type}: ExpandableExampleProps) {
{isDeepDive && (
<>
- Deep Dive
+ 자세히 살펴보기
>
)}
{isExample && (
diff --git a/src/components/MDX/Heading.tsx b/src/components/MDX/Heading.tsx
index a9f3efc38..5890a3a48 100644
--- a/src/components/MDX/Heading.tsx
+++ b/src/components/MDX/Heading.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/InlineCode.tsx b/src/components/MDX/InlineCode.tsx
index 0e8db0165..17e4683b9 100644
--- a/src/components/MDX/InlineCode.tsx
+++ b/src/components/MDX/InlineCode.tsx
@@ -1,8 +1,16 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
import cn from 'classnames';
+import type {HTMLAttributes} from 'react';
interface InlineCodeProps {
isLink?: boolean;
@@ -11,7 +19,7 @@ interface InlineCodeProps {
function InlineCode({
isLink,
...props
-}: JSX.IntrinsicElements['code'] & InlineCodeProps) {
+}: HTMLAttributes & InlineCodeProps) {
return (
in case of RTL languages to avoid like `()console.log` to be rendered as `console.log()`
diff --git a/src/components/MDX/Intro.tsx b/src/components/MDX/Intro.tsx
index 0522df678..b0bee624d 100644
--- a/src/components/MDX/Intro.tsx
+++ b/src/components/MDX/Intro.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/LanguagesContext.tsx b/src/components/MDX/LanguagesContext.tsx
index 776a11c0d..cd9f88816 100644
--- a/src/components/MDX/LanguagesContext.tsx
+++ b/src/components/MDX/LanguagesContext.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/Link.tsx b/src/components/MDX/Link.tsx
index 7bf041e56..8a47c401f 100644
--- a/src/components/MDX/Link.tsx
+++ b/src/components/MDX/Link.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/MDXComponents.tsx b/src/components/MDX/MDXComponents.tsx
index 29c96a0c7..46a3f8bc8 100644
--- a/src/components/MDX/MDXComponents.tsx
+++ b/src/components/MDX/MDXComponents.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -5,6 +12,7 @@
import {Children, useContext, useMemo} from 'react';
import * as React from 'react';
import cn from 'classnames';
+import type {HTMLAttributes} from 'react';
import CodeBlock from './CodeBlock';
import {CodeDiagram} from './CodeDiagram';
@@ -18,7 +26,7 @@ import BlogCard from './BlogCard';
import Link from './Link';
import {PackageImport} from './PackageImport';
import Recap from './Recap';
-import Sandpack from './Sandpack';
+import {SandpackClient as Sandpack, SandpackRSC} from './Sandpack';
import SandpackWithHTMLOutput from './SandpackWithHTMLOutput';
import Diagram from './Diagram';
import DiagramGroup from './DiagramGroup';
@@ -36,6 +44,7 @@ import {finishedTranslations} from 'utils/finishedTranslations';
import ErrorDecoder from './ErrorDecoder';
import {IconCanary} from '../Icon/IconCanary';
+import {IconExperimental} from 'components/Icon/IconExperimental';
function CodeStep({children, step}: {children: any; step: number}) {
return (
@@ -59,21 +68,21 @@ function CodeStep({children, step}: {children: any; step: number}) {
);
}
-const P = (p: JSX.IntrinsicElements['p']) => (
+const P = (p: HTMLAttributes) => (
);
-const Strong = (strong: JSX.IntrinsicElements['strong']) => (
+const Strong = (strong: HTMLAttributes) => (
);
-const OL = (p: JSX.IntrinsicElements['ol']) => (
+const OL = (p: HTMLAttributes) => (
);
-const LI = (p: JSX.IntrinsicElements['li']) => (
+const LI = (p: HTMLAttributes) => (
);
-const UL = (p: JSX.IntrinsicElements['ul']) => (
+const UL = (p: HTMLAttributes) => (
{sequential ? (
@@ -325,7 +381,7 @@ function IllustrationBlock({
)}
-
+
);
}
@@ -481,13 +537,21 @@ export const MDXComponents = {
Math,
MathI,
Note,
+ RC,
Canary,
+ Experimental,
+ ExperimentalBadge,
CanaryBadge,
+ NextMajor,
+ NextMajorBadge,
+ RSC,
+ RSCBadge,
PackageImport,
ReadBlogPost,
Recap,
Recipes,
Sandpack,
+ SandpackRSC,
SandpackWithHTMLOutput,
TeamMember,
TerminalBlock,
diff --git a/src/components/MDX/PackageImport.tsx b/src/components/MDX/PackageImport.tsx
index 5e2da820e..222353ff5 100644
--- a/src/components/MDX/PackageImport.tsx
+++ b/src/components/MDX/PackageImport.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/Recap.tsx b/src/components/MDX/Recap.tsx
index 9c5b08c8d..98059aa13 100644
--- a/src/components/MDX/Recap.tsx
+++ b/src/components/MDX/Recap.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/Sandpack/ClearButton.tsx b/src/components/MDX/Sandpack/ClearButton.tsx
new file mode 100644
index 000000000..fd21f2fc1
--- /dev/null
+++ b/src/components/MDX/Sandpack/ClearButton.tsx
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+/*
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ */
+
+import * as React from 'react';
+import {IconClose} from '../../Icon/IconClose';
+export interface ClearButtonProps {
+ onClear: () => void;
+}
+
+export function ClearButton({onClear}: ClearButtonProps) {
+ return (
+
+ );
+}
diff --git a/src/components/MDX/Sandpack/Console.tsx b/src/components/MDX/Sandpack/Console.tsx
index b5276fc13..625b1c365 100644
--- a/src/components/MDX/Sandpack/Console.tsx
+++ b/src/components/MDX/Sandpack/Console.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -112,7 +119,7 @@ export const SandpackConsole = ({visible}: {visible: boolean}) => {
setLogs((prev) => {
const newLogs = message.log
.filter((consoleData) => {
- if (!consoleData.method) {
+ if (!consoleData.method || !consoleData.data) {
return false;
}
if (
diff --git a/src/components/MDX/Sandpack/CustomPreset.tsx b/src/components/MDX/Sandpack/CustomPreset.tsx
index 6d7c6d2b7..72368e1f7 100644
--- a/src/components/MDX/Sandpack/CustomPreset.tsx
+++ b/src/components/MDX/Sandpack/CustomPreset.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -19,8 +26,10 @@ import {useSandpackLint} from './useSandpackLint';
export const CustomPreset = memo(function CustomPreset({
providedFiles,
+ showOpenInCodeSandbox = true,
}: {
providedFiles: Array;
+ showOpenInCodeSandbox?: boolean;
}) {
const {lintErrors, lintExtensions} = useSandpackLint();
const {sandpack} = useSandpack();
@@ -28,6 +37,7 @@ export const CustomPreset = memo(function CustomPreset({
const {activeFile} = sandpack;
const lineCountRef = useRef<{[key: string]: number}>({});
if (!lineCountRef.current[activeFile]) {
+ // eslint-disable-next-line react-compiler/react-compiler
lineCountRef.current[activeFile] = code.split('\n').length;
}
const lineCount = lineCountRef.current[activeFile];
@@ -38,6 +48,7 @@ export const CustomPreset = memo(function CustomPreset({
lintErrors={lintErrors}
lintExtensions={lintExtensions}
isExpandable={isExpandable}
+ showOpenInCodeSandbox={showOpenInCodeSandbox}
/>
);
});
@@ -47,11 +58,13 @@ const SandboxShell = memo(function SandboxShell({
lintErrors,
lintExtensions,
isExpandable,
+ showOpenInCodeSandbox,
}: {
providedFiles: Array;
lintErrors: Array;
lintExtensions: Array;
isExpandable: boolean;
+ showOpenInCodeSandbox: boolean;
}) {
const containerRef = useRef(null);
const [isExpanded, setIsExpanded] = useState(false);
@@ -63,7 +76,10 @@ const SandboxShell = memo(function SandboxShell({
style={{
contain: 'content',
}}>
-
+ 다운로드
diff --git a/src/components/MDX/Sandpack/ErrorMessage.tsx b/src/components/MDX/Sandpack/ErrorMessage.tsx
index 7c67ee461..3dbeb113b 100644
--- a/src/components/MDX/Sandpack/ErrorMessage.tsx
+++ b/src/components/MDX/Sandpack/ErrorMessage.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/Sandpack/LoadingOverlay.tsx b/src/components/MDX/Sandpack/LoadingOverlay.tsx
index cd3f38fca..1945f0c6f 100644
--- a/src/components/MDX/Sandpack/LoadingOverlay.tsx
+++ b/src/components/MDX/Sandpack/LoadingOverlay.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
import {useState} from 'react';
import {
@@ -17,7 +24,7 @@ export const LoadingOverlay = ({
clientId: string;
dependenciesLoading: boolean;
forceLoading: boolean;
-} & React.HTMLAttributes): JSX.Element | null => {
+} & React.HTMLAttributes): React.ReactNode | null => {
const loadingOverlayState = useLoadingOverlayState(
clientId,
dependenciesLoading,
@@ -64,6 +71,7 @@ export const LoadingOverlay = ({
transition: `opacity ${FADE_ANIMATION_DURATION}ms ease-out`,
}}>
+ {/* @ts-ignore: the OpenInCodeSandboxButton type from '@codesandbox/sandpack-react/unstyled' is incompatible with JSX in React 19 */}
diff --git a/src/components/MDX/Sandpack/NavigationBar.tsx b/src/components/MDX/Sandpack/NavigationBar.tsx
index f199964e6..732a93f81 100644
--- a/src/components/MDX/Sandpack/NavigationBar.tsx
+++ b/src/components/MDX/Sandpack/NavigationBar.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -17,7 +24,8 @@ import {
useSandpackNavigation,
} from '@codesandbox/sandpack-react/unstyled';
import {OpenInCodeSandboxButton} from './OpenInCodeSandboxButton';
-import {ResetButton} from './ResetButton';
+import {ReloadButton} from './ReloadButton';
+import {ClearButton} from './ClearButton';
import {DownloadButton} from './DownloadButton';
import {IconChevron} from '../../Icon/IconChevron';
import {Listbox} from '@headlessui/react';
@@ -40,7 +48,13 @@ const getFileName = (filePath: string): string => {
return filePath.slice(lastIndexOfSlash + 1);
};
-export function NavigationBar({providedFiles}: {providedFiles: Array}) {
+export function NavigationBar({
+ providedFiles,
+ showOpenInCodeSandbox = true,
+}: {
+ providedFiles: Array;
+ showOpenInCodeSandbox?: boolean;
+}) {
const {sandpack} = useSandpack();
const containerRef = useRef(null);
const tabsRef = useRef(null);
@@ -95,7 +109,7 @@ export function NavigationBar({providedFiles}: {providedFiles: Array}) {
// Note: in a real useEvent, onContainerResize would be omitted.
}, [isMultiFile, onContainerResize]);
- const handleReset = () => {
+ const handleClear = () => {
/**
* resetAllFiles must come first, otherwise
* the previous content will appear for a second
@@ -109,13 +123,19 @@ export function NavigationBar({providedFiles}: {providedFiles: Array}) {
) {
sandpack.resetAllFiles();
}
+ refresh();
+ };
+ const handleReload = () => {
refresh();
};
return (
+ {/* If Prettier reformats this block, the two @ts-ignore directives will no longer be adjacent to the problematic lines, causing TypeScript errors */}
+ {/* prettier-ignore */}
+ {/* @ts-ignore: the Listbox type from '@headlessui/react' is incompatible with JSX in React 19 */}
@@ -129,8 +149,10 @@ export function NavigationBar({providedFiles}: {providedFiles: Array}) {
'w-[fit-content]',
showDropdown ? 'invisible' : ''
)}>
+ {/* @ts-ignore: the FileTabs type from '@codesandbox/sandpack-react/unstyled' is incompatible with JSX in React 19 */}
+ {/* @ts-ignore: the Listbox type from '@headlessui/react' is incompatible with JSX in React 19 */}
{({open}) => (
// If tabs don't fit, display the dropdown instead.
@@ -160,10 +182,10 @@ export function NavigationBar({providedFiles}: {providedFiles: Array}) {
- {isMultiFile && showDropdown && (
-
- {visibleFiles.map((filePath: string) => (
-
+ {/* @ts-ignore: the Listbox type from '@headlessui/react' is incompatible with JSX in React 19 */}
+ {isMultiFile && showDropdown && (
+ {/* @ts-ignore: the Listbox type from '@headlessui/react' is incompatible with JSX in React 19 */}
+ {visibleFiles.map((filePath: string) => (
{({active}) => (
}) {
className="px-3 flex items-center justify-end text-start"
translate="yes">
-
-
+
+
+ {showOpenInCodeSandbox && }
{activeFile.endsWith('.tsx') && (
{
return (
+ title="CodeSandbox에서 편집합니다.">
void;
+}
+
+export function ReloadButton({onReload}: ReloadButtonProps) {
+ return (
+
+ );
+}
diff --git a/src/components/MDX/Sandpack/SandpackRSCRoot.tsx b/src/components/MDX/Sandpack/SandpackRSCRoot.tsx
new file mode 100644
index 000000000..1c9bd0582
--- /dev/null
+++ b/src/components/MDX/Sandpack/SandpackRSCRoot.tsx
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+/*
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ */
+
+import {Children} from 'react';
+import * as React from 'react';
+import {SandpackProvider} from '@codesandbox/sandpack-react/unstyled';
+import {SandpackLogLevel} from '@codesandbox/sandpack-client';
+import {CustomPreset} from './CustomPreset';
+import {createFileMap} from './createFileMap';
+import {CustomTheme} from './Themes';
+import {templateRSC} from './templateRSC';
+import {RscFileBridge} from './sandpack-rsc/RscFileBridge';
+
+type SandpackProps = {
+ children: React.ReactNode;
+ autorun?: boolean;
+};
+
+const sandboxStyle = `
+* {
+ box-sizing: border-box;
+}
+
+body {
+ font-family: sans-serif;
+ margin: 20px;
+ padding: 0;
+}
+
+h1 {
+ margin-top: 0;
+ font-size: 22px;
+}
+
+h2 {
+ margin-top: 0;
+ font-size: 20px;
+}
+
+h3 {
+ margin-top: 0;
+ font-size: 18px;
+}
+
+h4 {
+ margin-top: 0;
+ font-size: 16px;
+}
+
+h5 {
+ margin-top: 0;
+ font-size: 14px;
+}
+
+h6 {
+ margin-top: 0;
+ font-size: 12px;
+}
+
+code {
+ font-size: 1.2em;
+}
+
+ul {
+ padding-inline-start: 20px;
+}
+`.trim();
+
+function SandpackRSCRoot(props: SandpackProps) {
+ const {children, autorun = true} = props;
+ const codeSnippets = Children.toArray(children) as React.ReactElement[];
+ const files = createFileMap(codeSnippets);
+
+ if ('/index.html' in files) {
+ throw new Error(
+ 'You cannot use `index.html` file in sandboxes. ' +
+ 'Only `public/index.html` is respected by Sandpack and CodeSandbox (where forks are created).'
+ );
+ }
+
+ files['/src/styles.css'] = {
+ code: [sandboxStyle, files['/src/styles.css']?.code ?? ''].join('\n\n'),
+ hidden: !files['/src/styles.css']?.visible,
+ };
+
+ return (
+
+
+
+
+
+
+ );
+}
+
+export default SandpackRSCRoot;
diff --git a/src/components/MDX/Sandpack/SandpackRoot.tsx b/src/components/MDX/Sandpack/SandpackRoot.tsx
index a47fa6860..48d8daee5 100644
--- a/src/components/MDX/Sandpack/SandpackRoot.tsx
+++ b/src/components/MDX/Sandpack/SandpackRoot.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -71,6 +78,13 @@ function SandpackRoot(props: SandpackProps) {
const codeSnippets = Children.toArray(children) as React.ReactElement[];
const files = createFileMap(codeSnippets);
+ if ('/index.html' in files) {
+ throw new Error(
+ 'You cannot use `index.html` file in sandboxes. ' +
+ 'Only `public/index.html` is respected by Sandpack and CodeSandbox (where forks are created).'
+ );
+ }
+
files['/src/styles.css'] = {
code: [sandboxStyle, files['/src/styles.css']?.code ?? ''].join('\n\n'),
hidden: !files['/src/styles.css']?.visible,
diff --git a/src/components/MDX/Sandpack/Themes.tsx b/src/components/MDX/Sandpack/Themes.tsx
index 3923470ca..8aa34dc95 100644
--- a/src/components/MDX/Sandpack/Themes.tsx
+++ b/src/components/MDX/Sandpack/Themes.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
diff --git a/src/components/MDX/Sandpack/createFileMap.ts b/src/components/MDX/Sandpack/createFileMap.ts
index 615d34c9a..049face93 100644
--- a/src/components/MDX/Sandpack/createFileMap.ts
+++ b/src/components/MDX/Sandpack/createFileMap.ts
@@ -1,13 +1,81 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
import type {SandpackFile} from '@codesandbox/sandpack-react/unstyled';
+import type {PropsWithChildren, ReactElement, HTMLAttributes} from 'react';
export const AppJSPath = `/src/App.js`;
export const StylesCSSPath = `/src/styles.css`;
export const SUPPORTED_FILES = [AppJSPath, StylesCSSPath];
+/**
+ * Tokenize meta attributes while ignoring brace-wrapped metadata (e.g. {expectedErrors: …}).
+ */
+function splitMeta(meta: string): string[] {
+ const tokens: string[] = [];
+ let current = '';
+ let depth = 0;
+ const trimmed = meta.trim();
+
+ for (let ii = 0; ii < trimmed.length; ii++) {
+ const char = trimmed[ii];
+
+ if (char === '{') {
+ if (depth === 0 && current) {
+ tokens.push(current);
+ current = '';
+ }
+ depth += 1;
+ continue;
+ }
+
+ if (char === '}') {
+ if (depth > 0) {
+ depth -= 1;
+ }
+ if (depth === 0) {
+ current = '';
+ }
+ if (depth < 0) {
+ throw new Error(`Unexpected closing brace in meta: ${meta}`);
+ }
+ continue;
+ }
+
+ if (depth > 0) {
+ continue;
+ }
+
+ if (/\s/.test(char)) {
+ if (current) {
+ tokens.push(current);
+ current = '';
+ }
+ continue;
+ }
+
+ current += char;
+ }
+
+ if (current) {
+ tokens.push(current);
+ }
+
+ if (depth !== 0) {
+ throw new Error(`Unclosed brace in meta: ${meta}`);
+ }
+
+ return tokens;
+}
+
export const createFileMap = (codeSnippets: any) => {
return codeSnippets.reduce(
(result: Record, codeSnippet: React.ReactElement) => {
@@ -17,18 +85,29 @@ export const createFileMap = (codeSnippets: any) => {
) {
return result;
}
- const {props} = codeSnippet.props.children;
+ const {props} = (
+ codeSnippet.props as PropsWithChildren<{
+ children: ReactElement<
+ HTMLAttributes & {meta?: string}
+ >;
+ }>
+ ).children;
let filePath; // path in the folder structure
let fileHidden = false; // if the file is available as a tab
let fileActive = false; // if the file tab is shown by default
if (props.meta) {
- const [name, ...params] = props.meta.split(' ');
- filePath = '/' + name;
- if (params.includes('hidden')) {
+ const tokens = splitMeta(props.meta);
+ const name = tokens.find(
+ (token) => token.includes('/') || token.includes('.')
+ );
+ if (name) {
+ filePath = name.startsWith('/') ? name : `/${name}`;
+ }
+ if (tokens.includes('hidden')) {
fileHidden = true;
}
- if (params.includes('active')) {
+ if (tokens.includes('active')) {
fileActive = true;
}
} else {
@@ -43,6 +122,18 @@ export const createFileMap = (codeSnippets: any) => {
}
}
+ if (!filePath) {
+ if (props.className === 'language-js') {
+ filePath = AppJSPath;
+ } else if (props.className === 'language-css') {
+ filePath = StylesCSSPath;
+ } else {
+ throw new Error(
+ `Code block is missing a filename: ${props.children}`
+ );
+ }
+ }
+
if (result[filePath]) {
throw new Error(
`File ${filePath} was defined multiple times. Each file snippet should have a unique path name`
diff --git a/src/components/MDX/Sandpack/index.tsx b/src/components/MDX/Sandpack/index.tsx
index 6755ba8de..a8b802cec 100644
--- a/src/components/MDX/Sandpack/index.tsx
+++ b/src/components/MDX/Sandpack/index.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*/
@@ -45,7 +52,7 @@ const SandpackGlimmer = ({code}: {code: string}) => (
);
-export default memo(function SandpackWrapper(props: any): any {
+export const SandpackClient = memo(function SandpackWrapper(props: any): any {
const codeSnippet = createFileMap(Children.toArray(props.children));
// To set the active file in the fallback we have to find the active file first.
@@ -68,3 +75,31 @@ export default memo(function SandpackWrapper(props: any): any {
);
});
+
+const SandpackRSCRoot = lazy(() => import('./SandpackRSCRoot'));
+
+export const SandpackRSC = memo(function SandpackRSCWrapper(props: {
+ children: React.ReactNode;
+}): any {
+ const codeSnippet = createFileMap(Children.toArray(props.children));
+
+ // To set the active file in the fallback we have to find the active file first.
+ // If there are no active files we fallback to App.js as default.
+ let activeCodeSnippet = Object.keys(codeSnippet).filter(
+ (fileName) =>
+ codeSnippet[fileName]?.active === true &&
+ codeSnippet[fileName]?.hidden === false
+ );
+ let activeCode;
+ if (!activeCodeSnippet.length) {
+ activeCode = codeSnippet[AppJSPath]?.code ?? '';
+ } else {
+ activeCode = codeSnippet[activeCodeSnippet[0]].code;
+ }
+
+ return (
+ }>
+ {props.children}
+
+ );
+});
diff --git a/src/components/MDX/Sandpack/runESLint.tsx b/src/components/MDX/Sandpack/runESLint.tsx
index 5fea2f110..667b22d7e 100644
--- a/src/components/MDX/Sandpack/runESLint.tsx
+++ b/src/components/MDX/Sandpack/runESLint.tsx
@@ -1,3 +1,10 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
// @ts-nocheck
import {Linter} from 'eslint/lib/linter/linter';
@@ -14,13 +21,6 @@ const getCodeMirrorPosition = (
const linter = new Linter();
-// HACK! Eslint requires 'esquery' using `require`, but there's no commonjs interop.
-// because of this it tries to run `esquery.parse()`, while there's only `esquery.default.parse()`.
-// This hack places the functions in the right place.
-const esquery = require('esquery');
-esquery.parse = esquery.default?.parse;
-esquery.matches = esquery.default?.matches;
-
const reactRules = require('eslint-plugin-react-hooks').rules;
linter.defineRules({
'react-hooks/rules-of-hooks': reactRules['rules-of-hooks'],
diff --git a/src/components/MDX/Sandpack/sandpack-rsc/RscFileBridge.tsx b/src/components/MDX/Sandpack/sandpack-rsc/RscFileBridge.tsx
new file mode 100644
index 000000000..cca545a40
--- /dev/null
+++ b/src/components/MDX/Sandpack/sandpack-rsc/RscFileBridge.tsx
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import {useEffect, useRef} from 'react';
+import {useSandpack} from '@codesandbox/sandpack-react/unstyled';
+
+/**
+ * Bridges file contents from the Sandpack editor to the RSC client entry
+ * running inside the iframe. When the Sandpack bundler finishes compiling,
+ * reads all raw file contents and posts them to the iframe via postMessage.
+ */
+export function RscFileBridge() {
+ const {sandpack, dispatch, listen} = useSandpack();
+ const filesRef = useRef(sandpack.files);
+
+ // TODO: fix this with useEffectEvent
+ // eslint-disable-next-line react-compiler/react-compiler
+ filesRef.current = sandpack.files;
+
+ useEffect(() => {
+ const unsubscribe = listen((msg: any) => {
+ if (msg.type !== 'done') return;
+
+ const files: Record = {};
+ for (const [path, file] of Object.entries(filesRef.current)) {
+ files[path] = file.code;
+ }
+
+ dispatch({type: 'rsc-file-update', files} as any);
+ });
+
+ return unsubscribe;
+ }, [dispatch, listen]);
+
+ return null;
+}
diff --git a/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/__react_refresh_init__.js b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/__react_refresh_init__.js
new file mode 100644
index 000000000..8d0efa9d0
--- /dev/null
+++ b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/__react_refresh_init__.js
@@ -0,0 +1,17 @@
+// Must run before React loads. Creates __REACT_DEVTOOLS_GLOBAL_HOOK__ so
+// React's renderer injects into it, enabling react-refresh to work.
+if (typeof window !== 'undefined' && !window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
+ var nextID = 0;
+ window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = {
+ renderers: new Map(),
+ supportsFiber: true,
+ inject: function (injected) {
+ var id = nextID++;
+ this.renderers.set(id, injected);
+ return id;
+ },
+ onScheduleFiberRoot: function () {},
+ onCommitFiberRoot: function () {},
+ onCommitFiberUnmount: function () {},
+ };
+}
diff --git a/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-client.js b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-client.js
new file mode 100644
index 000000000..ed41755ed
--- /dev/null
+++ b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-client.js
@@ -0,0 +1,381 @@
+// RSC Client Entry Point
+// Runs inside the Sandpack iframe. Orchestrates the RSC pipeline:
+// 1. Creates a Web Worker from pre-bundled server runtime
+// 2. Receives file updates from parent (RscFileBridge) via postMessage
+// 3. Sends all user files to Worker for directive detection + compilation
+// 4. Worker compiles with Sucrase + executes, sends back Flight chunks
+// 5. Renders the Flight stream result with React
+
+// Minimal webpack shim for RSDW compatibility.
+// Works in both browser (window) and worker (self) contexts via globalThis.
+
+import * as React from 'react';
+import * as ReactJSXRuntime from 'react/jsx-runtime';
+import * as ReactJSXDevRuntime from 'react/jsx-dev-runtime';
+import {useState, startTransition, use} from 'react';
+import {jsx} from 'react/jsx-runtime';
+import {createRoot} from 'react-dom/client';
+
+import rscServerForWorker from './rsc-server.js';
+
+import './__webpack_shim__';
+import {
+ createFromReadableStream,
+ encodeReply,
+} from 'react-server-dom-webpack/client.browser';
+
+import {
+ injectIntoGlobalHook,
+ register as refreshRegister,
+ performReactRefresh,
+ isLikelyComponentType,
+} from 'react-refresh/runtime';
+
+// Patch the DevTools hook to capture renderer helpers and track roots.
+// Must run after react-dom evaluates (injects renderer) but before createRoot().
+injectIntoGlobalHook(window);
+
+export function initClient() {
+ // Create Worker from pre-bundled server runtime
+ var blob = new Blob([rscServerForWorker], {type: 'application/javascript'});
+ var workerUrl = URL.createObjectURL(blob);
+ var worker = new Worker(workerUrl);
+
+ // Render tracking
+ var nextStreamId = 0;
+ var chunkControllers = {};
+ var setCurrentPromise;
+ var firstRender = true;
+ var workerReady = false;
+ var pendingFiles = null;
+
+ function Root({initialPromise}) {
+ var _state = useState(initialPromise);
+ setCurrentPromise = _state[1];
+ return use(_state[0]);
+ }
+
+ // Set up React root
+ var initialResolve;
+ var initialPromise = new Promise(function (resolve) {
+ initialResolve = resolve;
+ });
+
+ var rootEl = document.getElementById('root');
+ if (!rootEl) throw new Error('#root element not found');
+ var root = createRoot(rootEl, {
+ onUncaughtError: function (error) {
+ var msg =
+ error && error.digest
+ ? error.digest
+ : error && error.message
+ ? error.message
+ : String(error);
+ console.error(msg);
+ showError(msg);
+ },
+ });
+ startTransition(function () {
+ root.render(jsx(Root, {initialPromise: initialPromise}));
+ });
+
+ // Error overlay — rendered inside the iframe via DOM so it doesn't
+ // interfere with Sandpack's parent-frame message protocol.
+ function showError(message) {
+ var overlay = document.getElementById('rsc-error-overlay');
+ if (!overlay) {
+ overlay = document.createElement('div');
+ overlay.id = 'rsc-error-overlay';
+ overlay.style.cssText =
+ 'background:#fff;border:2px solid #c00;border-radius:8px;padding:16px;margin:20px;font-family:sans-serif;';
+ var heading = document.createElement('h2');
+ heading.style.cssText = 'color:#c00;margin:0 0 8px;font-size:16px;';
+ heading.textContent = 'Server Error';
+ overlay.appendChild(heading);
+ var pre = document.createElement('pre');
+ pre.style.cssText =
+ 'margin:0;white-space:pre-wrap;word-break:break-word;font-size:14px;color:#222;';
+ overlay.appendChild(pre);
+ rootEl.parentNode.insertBefore(overlay, rootEl);
+ }
+ overlay.lastChild.textContent = message;
+ overlay.style.display = '';
+ rootEl.style.display = 'none';
+ }
+
+ function clearError() {
+ var overlay = document.getElementById('rsc-error-overlay');
+ if (overlay) overlay.style.display = 'none';
+ rootEl.style.display = '';
+ }
+
+ // Worker message handler
+ worker.onmessage = function (e) {
+ var msg = e.data;
+ if (msg.type === 'ready') {
+ workerReady = true;
+ if (pendingFiles) {
+ processFiles(pendingFiles);
+ pendingFiles = null;
+ }
+ } else if (msg.type === 'deploy-result') {
+ clearError();
+ // Register compiled client modules in the webpack cache before rendering
+ if (msg.result && msg.result.compiledClients) {
+ registerClientModules(
+ msg.result.compiledClients,
+ msg.result.clientEntries || {}
+ );
+ }
+ triggerRender();
+ } else if (msg.type === 'rsc-chunk') {
+ handleChunk(msg);
+ } else if (msg.type === 'rsc-error') {
+ showError(msg.error);
+ }
+ };
+
+ function callServer(id, args) {
+ return encodeReply(args).then(function (body) {
+ nextStreamId++;
+ var reqId = nextStreamId;
+
+ var stream = new ReadableStream({
+ start: function (controller) {
+ chunkControllers[reqId] = controller;
+ },
+ });
+
+ // FormData is not structured-cloneable for postMessage.
+ // Serialize to an array of entries; the worker reconstructs it.
+ var encodedArgs;
+ if (typeof body === 'string') {
+ encodedArgs = body;
+ } else {
+ var entries = [];
+ body.forEach(function (value, key) {
+ entries.push([key, value]);
+ });
+ encodedArgs = {__formData: entries};
+ }
+
+ worker.postMessage({
+ type: 'callAction',
+ requestId: reqId,
+ actionId: id,
+ encodedArgs: encodedArgs,
+ });
+
+ var response = createFromReadableStream(stream, {
+ callServer: callServer,
+ });
+
+ // Update UI with re-rendered root
+ startTransition(function () {
+ updateUI(
+ Promise.resolve(response).then(function (v) {
+ return v.root;
+ })
+ );
+ });
+
+ // Return action's return value (for useActionState support)
+ return Promise.resolve(response).then(function (v) {
+ return v.returnValue;
+ });
+ });
+ }
+
+ function triggerRender() {
+ // Close any in-flight streams from previous renders
+ Object.keys(chunkControllers).forEach(function (id) {
+ try {
+ chunkControllers[id].close();
+ } catch (e) {}
+ delete chunkControllers[id];
+ });
+
+ nextStreamId++;
+ var reqId = nextStreamId;
+
+ var stream = new ReadableStream({
+ start: function (controller) {
+ chunkControllers[reqId] = controller;
+ },
+ });
+
+ worker.postMessage({type: 'render', requestId: reqId});
+
+ var promise = createFromReadableStream(stream, {
+ callServer: callServer,
+ });
+
+ updateUI(promise);
+ }
+
+ function handleChunk(msg) {
+ var ctrl = chunkControllers[msg.requestId];
+ if (!ctrl) return;
+ if (msg.done) {
+ ctrl.close();
+ delete chunkControllers[msg.requestId];
+ } else {
+ ctrl.enqueue(msg.chunk);
+ }
+ }
+
+ function updateUI(promise) {
+ if (firstRender) {
+ firstRender = false;
+ if (initialResolve) initialResolve(promise);
+ } else {
+ startTransition(function () {
+ if (setCurrentPromise) setCurrentPromise(promise);
+ });
+ }
+ }
+
+ // File update handler — receives raw file contents from RscFileBridge
+ window.addEventListener('message', function (e) {
+ var msg = e.data;
+ if (msg.type !== 'rsc-file-update') return;
+ if (!workerReady) {
+ pendingFiles = msg.files;
+ return;
+ }
+ processFiles(msg.files);
+ });
+
+ function processFiles(files) {
+ console.clear();
+ var userFiles = {};
+ Object.keys(files).forEach(function (filePath) {
+ if (!filePath.match(/\.(js|jsx|ts|tsx)$/)) return;
+ if (filePath.indexOf('node_modules') !== -1) return;
+ if (filePath === '/src/index.js') return;
+ if (filePath === '/src/rsc-client.js') return;
+ if (filePath === '/src/rsc-server.js') return;
+ if (filePath === '/src/__webpack_shim__.js') return;
+ if (filePath === '/src/__react_refresh_init__.js') return;
+ userFiles[filePath] = files[filePath];
+ });
+ worker.postMessage({
+ type: 'deploy',
+ files: userFiles,
+ });
+ }
+
+ // Resolve relative paths (e.g., './Button' from '/src/Counter.js' → '/src/Button')
+ function resolvePath(from, to) {
+ if (!to.startsWith('.')) return to;
+ var parts = from.split('/');
+ parts.pop();
+ var toParts = to.split('/');
+ for (var i = 0; i < toParts.length; i++) {
+ if (toParts[i] === '.') continue;
+ if (toParts[i] === '..') {
+ parts.pop();
+ continue;
+ }
+ parts.push(toParts[i]);
+ }
+ return parts.join('/');
+ }
+
+ // Evaluate compiled client modules and register them in the webpack cache
+ // so RSDW client can resolve them via __webpack_require__.
+ function registerClientModules(compiledClients, clientEntries) {
+ // Clear stale client modules from previous deploys
+ Object.keys(globalThis.__webpack_module_cache__).forEach(function (key) {
+ delete globalThis.__webpack_module_cache__[key];
+ });
+
+ // Store all compiled code for lazy evaluation
+ var allCompiled = compiledClients;
+
+ function evaluateModule(moduleId) {
+ if (globalThis.__webpack_module_cache__[moduleId]) {
+ var cached = globalThis.__webpack_module_cache__[moduleId];
+ return cached.exports !== undefined ? cached.exports : cached;
+ }
+ var code = allCompiled[moduleId];
+ if (!code)
+ throw new Error('Client require: module "' + moduleId + '" not found');
+
+ var mod = {exports: {}};
+ // Register before evaluating to handle circular deps
+ var cacheEntry = {exports: mod.exports};
+ globalThis.__webpack_module_cache__[moduleId] = cacheEntry;
+
+ var clientRequire = function (id) {
+ if (id === 'react') return React;
+ if (id === 'react/jsx-runtime') return ReactJSXRuntime;
+ if (id === 'react/jsx-dev-runtime') return ReactJSXDevRuntime;
+ if (id.endsWith('.css')) return {};
+ var resolvedId = id.startsWith('.') ? resolvePath(moduleId, id) : id;
+ var candidates = [resolvedId];
+ var exts = ['.js', '.jsx', '.ts', '.tsx'];
+ for (var i = 0; i < exts.length; i++) {
+ candidates.push(resolvedId + exts[i]);
+ }
+ for (var j = 0; j < candidates.length; j++) {
+ if (
+ allCompiled[candidates[j]] ||
+ globalThis.__webpack_module_cache__[candidates[j]]
+ ) {
+ return evaluateModule(candidates[j]);
+ }
+ }
+ throw new Error('Client require: module "' + id + '" not found');
+ };
+
+ try {
+ new Function('module', 'exports', 'require', 'React', code)(
+ mod,
+ mod.exports,
+ clientRequire,
+ React
+ );
+ } catch (err) {
+ console.error('Error executing client module ' + moduleId + ':', err);
+ return mod.exports;
+ }
+ // Update the SAME cache entry's exports (don't replace the wrapper)
+ cacheEntry.exports = mod.exports;
+ return mod.exports;
+ }
+
+ // Eagerly evaluate 'use client' entry points; their imports resolve lazily
+ Object.keys(clientEntries).forEach(function (moduleId) {
+ evaluateModule(moduleId);
+ });
+
+ // Register all evaluated components with react-refresh for Fast Refresh.
+ // This creates stable "component families" so React can preserve state
+ // across re-evaluations when component identity changes.
+ Object.keys(globalThis.__webpack_module_cache__).forEach(function (
+ moduleId
+ ) {
+ var moduleExports = globalThis.__webpack_module_cache__[moduleId];
+ var exports =
+ moduleExports.exports !== undefined
+ ? moduleExports.exports
+ : moduleExports;
+ if (exports && typeof exports === 'object') {
+ for (var key in exports) {
+ var exportValue = exports[key];
+ if (isLikelyComponentType(exportValue)) {
+ refreshRegister(exportValue, moduleId + ' %exports% ' + key);
+ }
+ }
+ }
+ if (typeof exports === 'function' && isLikelyComponentType(exports)) {
+ refreshRegister(exports, moduleId + ' %exports% default');
+ }
+ });
+
+ // Tell React about updated component families so it can
+ // preserve state for components whose implementation changed.
+ performReactRefresh();
+ }
+}
diff --git a/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-server.js b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-server.js
new file mode 100644
index 000000000..7570a350c
--- /dev/null
+++ b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/rsc-server.js
@@ -0,0 +1,537 @@
+// Server Worker for RSC Sandboxes
+// Runs inside a Blob URL Web Worker.
+// Pre-bundled by esbuild with React (server build), react-server-dom-webpack/server.browser, and Sucrase.
+
+// IMPORTANT
+// If this file changes, run:
+// yarn prebuild:rsc
+
+var React = require('react');
+var ReactJSXRuntime = require('react/jsx-runtime');
+var RSDWServer = require('react-server-dom-webpack/server.browser');
+var Sucrase = require('sucrase');
+var acorn = require('acorn-loose');
+
+var deployed = null;
+
+// Module map proxy: generates module references on-demand for client components.
+// When server code imports a 'use client' file, it gets a proxy reference
+// that serializes into the Flight stream.
+function createModuleMap() {
+ return new Proxy(
+ {},
+ {
+ get: function (target, key) {
+ if (key in target) return target[key];
+ var parts = String(key).split('#');
+ var moduleId = parts[0];
+ var exportName = parts[1] || 'default';
+ var entry = {
+ id: moduleId,
+ chunks: [moduleId],
+ name: exportName,
+ async: true,
+ };
+ target[key] = entry;
+ return entry;
+ },
+ }
+ );
+}
+
+// Server actions registry
+var serverActionsRegistry = {};
+
+function registerServerReference(impl, moduleId, name) {
+ var ref = RSDWServer.registerServerReference(impl, moduleId, name);
+ var id = moduleId + '#' + name;
+ serverActionsRegistry[id] = impl;
+ return ref;
+}
+
+// Detect 'use client' / 'use server' directives using acorn-loose,
+// matching the same approach as react-server-dom-webpack/node-register.
+function parseDirective(code) {
+ if (code.indexOf('use client') === -1 && code.indexOf('use server') === -1) {
+ return null;
+ }
+ try {
+ var body = acorn.parse(code, {
+ ecmaVersion: '2024',
+ sourceType: 'source',
+ }).body;
+ } catch (x) {
+ return null;
+ }
+ for (var i = 0; i < body.length; i++) {
+ var node = body[i];
+ if (node.type !== 'ExpressionStatement' || !node.directive) break;
+ if (node.directive === 'use client') return 'use client';
+ if (node.directive === 'use server') return 'use server';
+ }
+ return null;
+}
+
+// Transform inline 'use server' functions (inside function bodies) into
+// registered server references. Module-level 'use server' is handled
+// separately by executeModule.
+function transformInlineServerActions(code) {
+ if (code.indexOf('use server') === -1) return code;
+ var ast;
+ try {
+ ast = acorn.parse(code, {ecmaVersion: '2024', sourceType: 'source'});
+ } catch (x) {
+ return code;
+ }
+
+ var edits = [];
+ var counter = 0;
+
+ function visit(node, fnDepth) {
+ if (!node || typeof node !== 'object') return;
+ var isFn =
+ node.type === 'FunctionDeclaration' ||
+ node.type === 'FunctionExpression' ||
+ node.type === 'ArrowFunctionExpression';
+
+ // Only look for 'use server' inside nested functions (fnDepth > 0)
+ if (
+ isFn &&
+ fnDepth > 0 &&
+ node.body &&
+ node.body.type === 'BlockStatement'
+ ) {
+ var body = node.body.body;
+ for (var s = 0; s < body.length; s++) {
+ var stmt = body[s];
+ if (stmt.type !== 'ExpressionStatement') break;
+ if (stmt.directive === 'use server') {
+ edits.push({
+ funcStart: node.start,
+ funcEnd: node.end,
+ dStart: stmt.start,
+ dEnd: stmt.end,
+ name: node.id ? node.id.name : 'action' + counter,
+ isDecl: node.type === 'FunctionDeclaration',
+ });
+ counter++;
+ return; // don't recurse into this function
+ }
+ if (!stmt.directive) break;
+ }
+ }
+
+ var nextDepth = isFn ? fnDepth + 1 : fnDepth;
+ for (var key in node) {
+ if (key === 'start' || key === 'end' || key === 'type') continue;
+ var child = node[key];
+ if (Array.isArray(child)) {
+ for (var i = 0; i < child.length; i++) {
+ if (child[i] && typeof child[i].type === 'string') {
+ visit(child[i], nextDepth);
+ }
+ }
+ } else if (child && typeof child.type === 'string') {
+ visit(child, nextDepth);
+ }
+ }
+ }
+
+ ast.body.forEach(function (stmt) {
+ visit(stmt, 0);
+ });
+ if (edits.length === 0) return code;
+
+ // Apply in reverse order to preserve positions
+ edits.sort(function (a, b) {
+ return b.funcStart - a.funcStart;
+ });
+
+ var result = code;
+ for (var i = 0; i < edits.length; i++) {
+ var e = edits[i];
+ // Remove the 'use server' directive + trailing whitespace
+ var dEnd = e.dEnd;
+ var ch = result.charAt(dEnd);
+ while (
+ dEnd < result.length &&
+ (ch === ' ' || ch === '\n' || ch === '\r' || ch === '\t')
+ ) {
+ dEnd++;
+ ch = result.charAt(dEnd);
+ }
+ result = result.slice(0, e.dStart) + result.slice(dEnd);
+ var removed = dEnd - e.dStart;
+ var adjEnd = e.funcEnd - removed;
+
+ // Wrap function with __rsa (register server action)
+ var funcCode = result.slice(e.funcStart, adjEnd);
+ if (e.isDecl) {
+ // async function foo() { ... } →
+ // var foo = __rsa(async function foo() { ... }, 'foo');
+ result =
+ result.slice(0, e.funcStart) +
+ 'var ' +
+ e.name +
+ ' = __rsa(' +
+ funcCode +
+ ", '" +
+ e.name +
+ "');" +
+ result.slice(adjEnd);
+ } else {
+ // expression/arrow: just wrap in __rsa(...)
+ result =
+ result.slice(0, e.funcStart) +
+ '__rsa(' +
+ funcCode +
+ ", '" +
+ e.name +
+ "')" +
+ result.slice(adjEnd);
+ }
+ }
+
+ return result;
+}
+
+// Resolve relative paths (e.g., './Counter.js' from '/src/App.js' → '/src/Counter.js')
+function resolvePath(from, to) {
+ if (!to.startsWith('.')) return to;
+ var parts = from.split('/');
+ parts.pop(); // remove filename
+ var toParts = to.split('/');
+ for (var i = 0; i < toParts.length; i++) {
+ if (toParts[i] === '.') continue;
+ if (toParts[i] === '..') {
+ parts.pop();
+ continue;
+ }
+ parts.push(toParts[i]);
+ }
+ return parts.join('/');
+}
+
+// Deploy new server code into the Worker
+// Receives raw source files — compiles them with Sucrase before execution.
+function deploy(files) {
+ serverActionsRegistry = {};
+
+ // Build a require function for the server module scope
+ var modules = {
+ react: React,
+ 'react/jsx-runtime': ReactJSXRuntime,
+ };
+
+ // Compile all files first, then execute on-demand via require.
+ // This avoids ordering issues where a file imports another that hasn't been executed yet.
+ var compiled = {};
+ var compileError = null;
+ Object.keys(files).forEach(function (filePath) {
+ if (compileError) return;
+ try {
+ compiled[filePath] = Sucrase.transform(files[filePath], {
+ transforms: ['jsx', 'imports'],
+ jsxRuntime: 'automatic',
+ production: true,
+ }).code;
+ } catch (err) {
+ compileError = filePath + ': ' + (err.message || String(err));
+ }
+ });
+
+ if (compileError) {
+ return {type: 'error', error: compileError};
+ }
+
+ // Resolve a module id relative to a requesting file
+ function resolveModuleId(from, id) {
+ if (modules[id]) return id;
+ if (id.startsWith('.')) {
+ var resolved = resolvePath(from, id);
+ if (modules[resolved] || compiled[resolved]) return resolved;
+ var exts = ['.js', '.jsx', '.ts', '.tsx'];
+ for (var ei = 0; ei < exts.length; ei++) {
+ var withExt = resolved + exts[ei];
+ if (modules[withExt] || compiled[withExt]) return withExt;
+ }
+ }
+ return id;
+ }
+
+ // Execute a module lazily and cache its exports
+ var executing = {};
+ var detectedClientFiles = {};
+
+ function executeModule(filePath) {
+ if (modules[filePath]) return modules[filePath];
+ if (!compiled[filePath]) {
+ throw new Error('Module "' + filePath + '" not found');
+ }
+ if (executing[filePath]) {
+ // Circular dependency — return partially populated exports
+ return executing[filePath].exports;
+ }
+
+ // Replicate node-register's _compile hook:
+ // detect directives BEFORE executing the module.
+ var directive = parseDirective(files[filePath]);
+
+ if (directive === 'use client') {
+ // Don't execute — return a client module proxy (same as node-register)
+ modules[filePath] = RSDWServer.createClientModuleProxy(filePath);
+ detectedClientFiles[filePath] = true;
+ return modules[filePath];
+ }
+
+ var mod = {exports: {}};
+ executing[filePath] = mod;
+
+ var localRequire = function (id) {
+ if (id.endsWith('.css')) return {};
+ var resolved = resolveModuleId(filePath, id);
+ if (modules[resolved]) return modules[resolved];
+ return executeModule(resolved);
+ };
+
+ // Transform inline 'use server' functions before execution
+ var codeToExecute = compiled[filePath];
+ if (directive !== 'use server') {
+ codeToExecute = transformInlineServerActions(codeToExecute);
+ }
+
+ new Function(
+ 'module',
+ 'exports',
+ 'require',
+ 'React',
+ '__rsa',
+ codeToExecute
+ )(mod, mod.exports, localRequire, React, function (fn, name) {
+ return registerServerReference(fn, filePath, name);
+ });
+
+ modules[filePath] = mod.exports;
+
+ if (directive === 'use server') {
+ // Execute normally, then register server references (same as node-register)
+ var exportNames = Object.keys(mod.exports);
+ for (var i = 0; i < exportNames.length; i++) {
+ var name = exportNames[i];
+ if (typeof mod.exports[name] === 'function') {
+ registerServerReference(mod.exports[name], filePath, name);
+ }
+ }
+ }
+
+ delete executing[filePath];
+ return mod.exports;
+ }
+
+ // Execute all files (order no longer matters — require triggers lazy execution)
+ var mainModule = {exports: {}};
+ Object.keys(compiled).forEach(function (filePath) {
+ executeModule(filePath);
+ if (
+ filePath === '/src/App.js' ||
+ filePath === './App.js' ||
+ filePath === './src/App.js'
+ ) {
+ mainModule.exports = modules[filePath];
+ }
+ });
+
+ deployed = {
+ module: mainModule.exports,
+ };
+
+ // Collect only client-reachable compiled code.
+ // Start from 'use client' entries and trace their require() calls.
+ var clientReachable = {};
+ function traceClientDeps(filePath) {
+ if (clientReachable[filePath]) return;
+ clientReachable[filePath] = true;
+ var code = compiled[filePath];
+ if (!code) return;
+ var requireRegex = /require\(["']([^"']+)["']\)/g;
+ var match;
+ while ((match = requireRegex.exec(code)) !== null) {
+ var dep = match[1];
+ if (
+ dep === 'react' ||
+ dep === 'react/jsx-runtime' ||
+ dep === 'react/jsx-dev-runtime' ||
+ dep.endsWith('.css')
+ )
+ continue;
+ var resolved = resolveModuleId(filePath, dep);
+ if (compiled[resolved]) {
+ traceClientDeps(resolved);
+ }
+ }
+ }
+ Object.keys(detectedClientFiles).forEach(function (filePath) {
+ traceClientDeps(filePath);
+ });
+
+ var clientCompiled = {};
+ Object.keys(clientReachable).forEach(function (filePath) {
+ clientCompiled[filePath] = compiled[filePath];
+ });
+
+ return {
+ type: 'deployed',
+ compiledClients: clientCompiled,
+ clientEntries: detectedClientFiles,
+ };
+}
+
+// Render the deployed app to a Flight stream
+function render() {
+ if (!deployed) throw new Error('No code deployed');
+ var App = deployed.module.default || deployed.module;
+ var element = React.createElement(App);
+ return RSDWServer.renderToReadableStream(element, createModuleMap(), {
+ onError: function (err) {
+ console.error('[RSC Server Error]', err);
+ return msg;
+ },
+ });
+}
+
+// Execute a server action and re-render
+function callAction(actionId, encodedArgs) {
+ if (!deployed) throw new Error('No code deployed');
+ var action = serverActionsRegistry[actionId];
+ if (!action) throw new Error('Action "' + actionId + '" not found');
+ // Reconstruct FormData from serialized entries (postMessage can't clone FormData)
+ var decoded = encodedArgs;
+ if (
+ typeof encodedArgs !== 'string' &&
+ encodedArgs &&
+ encodedArgs.__formData
+ ) {
+ decoded = new FormData();
+ for (var i = 0; i < encodedArgs.__formData.length; i++) {
+ decoded.append(
+ encodedArgs.__formData[i][0],
+ encodedArgs.__formData[i][1]
+ );
+ }
+ }
+ return Promise.resolve(RSDWServer.decodeReply(decoded)).then(function (args) {
+ var resultPromise = Promise.resolve(action.apply(null, args));
+ return resultPromise.then(function () {
+ var App = deployed.module.default || deployed.module;
+ return RSDWServer.renderToReadableStream(
+ {root: React.createElement(App), returnValue: resultPromise},
+ createModuleMap(),
+ {
+ onError: function (err) {
+ console.error('[RSC Server Error]', err);
+ return msg;
+ },
+ }
+ );
+ });
+ });
+}
+
+// Stream chunks back to the main thread via postMessage
+function sendStream(requestId, stream) {
+ var reader = stream.getReader();
+ function pump() {
+ return reader.read().then(function (result) {
+ if (result.done) {
+ self.postMessage({type: 'rsc-chunk', requestId: requestId, done: true});
+ return;
+ }
+ self.postMessage(
+ {
+ type: 'rsc-chunk',
+ requestId: requestId,
+ done: false,
+ chunk: result.value,
+ },
+ [result.value.buffer]
+ );
+ return pump();
+ });
+ }
+ pump().catch(function (err) {
+ self.postMessage({
+ type: 'rsc-error',
+ requestId: requestId,
+ error: String(err),
+ });
+ });
+}
+
+// RPC message handler
+self.onmessage = function (e) {
+ var msg = e.data;
+ if (msg.type === 'deploy') {
+ try {
+ var result = deploy(msg.files);
+ if (result && result.type === 'error') {
+ self.postMessage({
+ type: 'rsc-error',
+ error: result.error,
+ });
+ } else if (result) {
+ self.postMessage({
+ type: 'deploy-result',
+ result: result,
+ });
+ }
+ } catch (err) {
+ self.postMessage({
+ type: 'rsc-error',
+ error: String(err),
+ });
+ }
+ } else if (msg.type === 'render') {
+ try {
+ var streamPromise = render();
+ Promise.resolve(streamPromise)
+ .then(function (stream) {
+ sendStream(msg.requestId, stream);
+ })
+ .catch(function (err) {
+ self.postMessage({
+ type: 'rsc-error',
+ requestId: msg.requestId,
+ error: String(err),
+ });
+ });
+ } catch (err) {
+ self.postMessage({
+ type: 'rsc-error',
+ requestId: msg.requestId,
+ error: String(err),
+ });
+ }
+ } else if (msg.type === 'callAction') {
+ try {
+ callAction(msg.actionId, msg.encodedArgs)
+ .then(function (stream) {
+ sendStream(msg.requestId, stream);
+ })
+ .catch(function (err) {
+ self.postMessage({
+ type: 'rsc-error',
+ requestId: msg.requestId,
+ error: String(err),
+ });
+ });
+ } catch (err) {
+ self.postMessage({
+ type: 'rsc-error',
+ requestId: msg.requestId,
+ error: String(err),
+ });
+ }
+ }
+};
+
+self.postMessage({type: 'ready'});
diff --git a/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/webpack-shim.js b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/webpack-shim.js
new file mode 100644
index 000000000..5573bf153
--- /dev/null
+++ b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/webpack-shim.js
@@ -0,0 +1,24 @@
+// Minimal webpack shim for RSDW compatibility.
+// Works in both browser (window) and worker (self) contexts via globalThis.
+
+var moduleCache = {};
+
+globalThis.__webpack_module_cache__ = moduleCache;
+
+globalThis.__webpack_require__ = function (moduleId) {
+ var cached = moduleCache[moduleId];
+ if (cached) return cached.exports !== undefined ? cached.exports : cached;
+ throw new Error('Module "' + moduleId + '" not found in webpack shim cache');
+};
+
+globalThis.__webpack_chunk_load__ = function () {
+ return Promise.resolve();
+};
+
+globalThis.__webpack_require__.u = function (chunkId) {
+ return chunkId;
+};
+
+globalThis.__webpack_get_script_filename__ = function (chunkId) {
+ return chunkId;
+};
diff --git a/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
new file mode 100644
index 000000000..931e548dc
--- /dev/null
+++ b/src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/src/worker-bundle.dist.js
@@ -0,0 +1,234 @@
+// Minimal webpack shim for RSDW compatibility.
+// Works in both browser (window) and worker (self) contexts via globalThis.
+
+var moduleCache = {};
+
+globalThis.__webpack_module_cache__ = moduleCache;
+
+globalThis.__webpack_require__ = function (moduleId) {
+ var cached = moduleCache[moduleId];
+ if (cached) return cached.exports !== undefined ? cached.exports : cached;
+ throw new Error('Module "' + moduleId + '" not found in webpack shim cache');
+};
+
+globalThis.__webpack_chunk_load__ = function () {
+ return Promise.resolve();
+};
+
+globalThis.__webpack_require__.u = function (chunkId) {
+ return chunkId;
+};
+
+globalThis.__webpack_get_script_filename__ = function (chunkId) {
+ return chunkId;
+};
+
+"use strict";(()=>{var Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Gc=Z(ht=>{"use strict";var Zs={H:null,A:null};function Yo(e){var t="https://react.dev/errors/"+e;if(1{"use strict";zc.exports=Gc()});var Yc=Z(Oi=>{"use strict";var Uf=Li(),Hf=Symbol.for("react.transitional.element"),Wf=Symbol.for("react.fragment");if(!Uf.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)throw Error('The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.');function Xc(e,t,s){var i=null;if(s!==void 0&&(i=""+s),t.key!==void 0&&(i=""+t.key),"key"in t){s={};for(var r in t)r!=="key"&&(s[r]=t[r])}else s=t;return t=s.ref,{$$typeof:Hf,type:e,key:i,ref:t!==void 0?t:null,props:s}}Oi.Fragment=Wf;Oi.jsx=Xc;Oi.jsxDEV=void 0;Oi.jsxs=Xc});var Qc=Z((s_,Jc)=>{"use strict";Jc.exports=Yc()});var Zc=Z(jn=>{"use strict";var Gf=Li();function ns(){}var Sn={d:{f:ns,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:ns,C:ns,L:ns,m:ns,X:ns,S:ns,M:ns},p:0,findDOMNode:null};if(!Gf.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)throw Error('The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.');function br(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}jn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Sn;jn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Sn.d.C(e,t))};jn.prefetchDNS=function(e){typeof e=="string"&&Sn.d.D(e)};jn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var s=t.as,i=br(s,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;s==="style"?Sn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:i,integrity:r,fetchPriority:a}):s==="script"&&Sn.d.X(e,{crossOrigin:i,integrity:r,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};jn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var s=br(t.as,t.crossOrigin);Sn.d.M(e,{crossOrigin:s,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Sn.d.M(e)};jn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var s=t.as,i=br(s,t.crossOrigin);Sn.d.L(e,s,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};jn.preloadModule=function(e,t){if(typeof e=="string")if(t){var s=br(t.as,t.crossOrigin);Sn.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:s,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Sn.d.m(e)};jn.version="19.0.0"});var tu=Z((r_,eu)=>{"use strict";eu.exports=Zc()});var e1=Z(En=>{"use strict";var zf=tu(),Xf=Li(),ku=new MessageChannel,vu=[];ku.port1.onmessage=function(){var e=vu.shift();e&&e()};function Bi(e){vu.push(e),ku.port2.postMessage(null)}function Yf(e){setTimeout(function(){throw e})}var Jf=Promise,xu=typeof queueMicrotask=="function"?queueMicrotask:function(e){Jf.resolve(null).then(e).catch(Yf)},on=null,an=0;function Cr(e,t){if(t.byteLength!==0)if(2048=e.length?e:e.slice(0,10)+"...");case"object":return Tn(e)?"[...]":e!==null&&e.$$typeof===sa?"client":(e=Ru(e),e==="Object"?"{...}":e);case"function":return e.$$typeof===sa?"client":(e=e.displayName||e.name)?"function "+e:"function";default:return String(e)}}function Er(e){if(typeof e=="string")return e;switch(e){case fd:return"Suspense";case dd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Su:return Er(e.render);case Iu:return Er(e.type);case $i:var t=e._payload;e=e._init;try{return Er(e(t))}catch{}}return""}var sa=Symbol.for("react.client.reference");function _s(e,t){var s=Ru(e);if(s!=="Object"&&s!=="Array")return s;s=-1;var i=0;if(Tn(e)){for(var r="[",a=0;au.length&&40>r.length+u.length?r+u:r+"..."}r+="]"}else if(e.$$typeof===In)r="<"+Er(e.type)+"/>";else{if(e.$$typeof===sa)return"client";for(r="{",a=Object.keys(e),u=0;uy.length&&40>r.length+y.length?r+y:r+"..."}r+="}"}return t===void 0?r:-1"u")return"$undefined";if(typeof r=="function"){if(r.$$typeof===rs)return hu(e,s,i,r);if(r.$$typeof===Ar)return t=e.writtenServerReferences,i=t.get(r),i!==void 0?e="$h"+i.toString(16):(i=r.$$bound,i=i===null?null:Promise.resolve(i),e=bs(e,{id:r.$$id,bound:i},0),t.set(r,e),e="$h"+e.toString(16)),e;if(e.temporaryReferences!==void 0&&(e=e.temporaryReferences.get(r),e!==void 0))return"$T"+e;throw r.$$typeof===ca?Error("Could not reference an opaque temporary reference. This is likely due to misconfiguring the temporaryReferences options on the server."):/^on[A-Z]/.test(i)?Error("Event handlers cannot be passed to Client Component props."+_s(s,i)+`
+If you need interactivity, consider converting part of this to a Client Component.`):Error('Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it.'+_s(s,i))}if(typeof r=="symbol"){if(t=e.writtenSymbols,a=t.get(r),a!==void 0)return Ct(a);if(a=r.description,Symbol.for(a)!==r)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(r.description+") cannot be found among global symbols.")+_s(s,i));return e.pendingChunks++,i=e.nextChunkId++,s=Ou(e,i,"$S"+a),e.completedImportChunks.push(s),t.set(r,i),Ct(i)}if(typeof r=="bigint")return"$n"+r.toString(10);throw Error("Type "+typeof r+" is not supported in Client Component props."+_s(s,i))}function Kn(e,t){var s=rt;rt=null;try{var i=e.onError,r=i(t)}finally{rt=s}if(r!=null&&typeof r!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof r+'" instead');return r||""}function Ki(e,t){var s=e.onFatalError;s(t),e.destination!==null?(e.status=14,gu(e.destination,t)):(e.status=13,e.fatalError=t),e.cacheController.abort(Error("The render was aborted due to a fatal error.",{cause:t}))}function Rr(e,t,s){s={digest:s},t=t.toString(16)+":E"+Es(s)+`
+`,t=cn(t),e.completedErrorChunks.push(t)}function Du(e,t,s){t=t.toString(16)+":"+s+`
+`,t=cn(t),e.completedRegularChunks.push(t)}function Kt(e,t,s,i,r){r?e.pendingDebugChunks++:e.pendingChunks++,r=new Uint8Array(i.buffer,i.byteOffset,i.byteLength),i=2048e.status&&e.cacheController.abort(Error("This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources.")),e.destination!==null&&(e.status=14,e.destination.close(),e.destination=null))}function ju(e){e.flushScheduled=e.destination!==null,xu(function(){return ra(e)}),Bi(function(){e.status===10&&(e.status=11)})}function ln(e){e.flushScheduled===!1&&e.pingedTasks.length===0&&e.destination!==null&&(e.flushScheduled=!0,Bi(function(){e.flushScheduled=!1,oi(e)}))}function Or(e){e.abortableTasks.size===0&&(e=e.onAllReady,e())}function $u(e,t){if(e.status===13)e.status=14,gu(t,e.fatalError);else if(e.status!==14&&e.destination===null){e.destination=t;try{oi(e)}catch(s){Kn(e,s,null),Ki(e,s)}}}function Ed(e,t){try{t.forEach(function(i){return ri(i,e)});var s=e.onAllReady;s(),oi(e)}catch(i){Kn(e,i,null),Ki(e,i)}}function Ad(e,t,s){try{t.forEach(function(r){return fa(r,e,s)});var i=e.onAllReady;i(),oi(e)}catch(r){Kn(e,r,null),Ki(e,r)}}function ni(e,t){if(!(11s._arraySizeLimit&&e.fork)throw Error("Maximum array nesting exceeded. Large nested arrays can be dangerous. Try adding intermediate objects.")}var Je=null;function Br(e){var t=Je;Je=null;var s=e.reason,i=s[Dr];s=s.id,s=s===-1?void 0:s.toString(16);var r=e.value;e.status="blocked",e.value=null,e.reason=null;try{var a=JSON.parse(r);r={count:0,fork:!1};var u=oa(i,{"":a},"",a,s,r),d=e.value;if(d!==null)for(e.value=null,e.reason=null,a=0;a{"use strict";var Hn;Hn=e1();Wn.renderToReadableStream=Hn.renderToReadableStream;Wn.decodeReply=Hn.decodeReply;Wn.decodeAction=Hn.decodeAction;Wn.decodeFormState=Hn.decodeFormState;Wn.registerServerReference=Hn.registerServerReference;Wn.registerClientReference=Hn.registerClientReference;Wn.createClientModuleProxy=Hn.createClientModuleProxy;Wn.createTemporaryReferenceSet=Hn.createTemporaryReferenceSet});var St=Z(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});var n1;(function(e){e[e.NONE=0]="NONE";let s=1;e[e._abstract=s]="_abstract";let i=s+1;e[e._accessor=i]="_accessor";let r=i+1;e[e._as=r]="_as";let a=r+1;e[e._assert=a]="_assert";let u=a+1;e[e._asserts=u]="_asserts";let d=u+1;e[e._async=d]="_async";let y=d+1;e[e._await=y]="_await";let g=y+1;e[e._checks=g]="_checks";let L=g+1;e[e._constructor=L]="_constructor";let p=L+1;e[e._declare=p]="_declare";let h=p+1;e[e._enum=h]="_enum";let T=h+1;e[e._exports=T]="_exports";let x=T+1;e[e._from=x]="_from";let w=x+1;e[e._get=w]="_get";let S=w+1;e[e._global=S]="_global";let A=S+1;e[e._implements=A]="_implements";let U=A+1;e[e._infer=U]="_infer";let M=U+1;e[e._interface=M]="_interface";let c=M+1;e[e._is=c]="_is";let R=c+1;e[e._keyof=R]="_keyof";let W=R+1;e[e._mixins=W]="_mixins";let Y=W+1;e[e._module=Y]="_module";let ie=Y+1;e[e._namespace=ie]="_namespace";let pe=ie+1;e[e._of=pe]="_of";let ae=pe+1;e[e._opaque=ae]="_opaque";let He=ae+1;e[e._out=He]="_out";let qe=He+1;e[e._override=qe]="_override";let Ft=qe+1;e[e._private=Ft]="_private";let mt=Ft+1;e[e._protected=mt]="_protected";let vt=mt+1;e[e._proto=vt]="_proto";let Et=vt+1;e[e._public=Et]="_public";let st=Et+1;e[e._readonly=st]="_readonly";let it=st+1;e[e._require=it]="_require";let bt=it+1;e[e._satisfies=bt]="_satisfies";let pt=bt+1;e[e._set=pt]="_set";let wt=pt+1;e[e._static=wt]="_static";let jt=wt+1;e[e._symbol=jt]="_symbol";let At=jt+1;e[e._type=At]="_type";let $t=At+1;e[e._unique=$t]="_unique";let mn=$t+1;e[e._using=mn]="_using"})(n1||(ya.ContextualKeyword=n1={}))});var Ce=Z(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});var q;(function(e){e[e.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";let s=16;e[e.IS_KEYWORD=s]="IS_KEYWORD";let i=32;e[e.IS_ASSIGN=i]="IS_ASSIGN";let r=64;e[e.IS_RIGHT_ASSOCIATIVE=r]="IS_RIGHT_ASSOCIATIVE";let a=128;e[e.IS_PREFIX=a]="IS_PREFIX";let u=256;e[e.IS_POSTFIX=u]="IS_POSTFIX";let d=512;e[e.IS_EXPRESSION_START=d]="IS_EXPRESSION_START";let y=512;e[e.num=y]="num";let g=1536;e[e.bigint=g]="bigint";let L=2560;e[e.decimal=L]="decimal";let p=3584;e[e.regexp=p]="regexp";let h=4608;e[e.string=h]="string";let T=5632;e[e.name=T]="name";let x=6144;e[e.eof=x]="eof";let w=7680;e[e.bracketL=w]="bracketL";let S=8192;e[e.bracketR=S]="bracketR";let A=9728;e[e.braceL=A]="braceL";let U=10752;e[e.braceBarL=U]="braceBarL";let M=11264;e[e.braceR=M]="braceR";let c=12288;e[e.braceBarR=c]="braceBarR";let R=13824;e[e.parenL=R]="parenL";let W=14336;e[e.parenR=W]="parenR";let Y=15360;e[e.comma=Y]="comma";let ie=16384;e[e.semi=ie]="semi";let pe=17408;e[e.colon=pe]="colon";let ae=18432;e[e.doubleColon=ae]="doubleColon";let He=19456;e[e.dot=He]="dot";let qe=20480;e[e.question=qe]="question";let Ft=21504;e[e.questionDot=Ft]="questionDot";let mt=22528;e[e.arrow=mt]="arrow";let vt=23552;e[e.template=vt]="template";let Et=24576;e[e.ellipsis=Et]="ellipsis";let st=25600;e[e.backQuote=st]="backQuote";let it=27136;e[e.dollarBraceL=it]="dollarBraceL";let bt=27648;e[e.at=bt]="at";let pt=29184;e[e.hash=pt]="hash";let wt=29728;e[e.eq=wt]="eq";let jt=30752;e[e.assign=jt]="assign";let At=32640;e[e.preIncDec=At]="preIncDec";let $t=33664;e[e.postIncDec=$t]="postIncDec";let mn=34432;e[e.bang=mn]="bang";let V=35456;e[e.tilde=V]="tilde";let G=35841;e[e.pipeline=G]="pipeline";let J=36866;e[e.nullishCoalescing=J]="nullishCoalescing";let re=37890;e[e.logicalOR=re]="logicalOR";let ve=38915;e[e.logicalAND=ve]="logicalAND";let he=39940;e[e.bitwiseOR=he]="bitwiseOR";let Ee=40965;e[e.bitwiseXOR=Ee]="bitwiseXOR";let Ae=41990;e[e.bitwiseAND=Ae]="bitwiseAND";let Le=43015;e[e.equality=Le]="equality";let ze=44040;e[e.lessThan=ze]="lessThan";let We=45064;e[e.greaterThan=We]="greaterThan";let Xe=46088;e[e.relationalOrEqual=Xe]="relationalOrEqual";let lt=47113;e[e.bitShiftL=lt]="bitShiftL";let yt=48137;e[e.bitShiftR=yt]="bitShiftR";let xt=49802;e[e.plus=xt]="plus";let qt=50826;e[e.minus=qt]="minus";let Ze=51723;e[e.modulo=Ze]="modulo";let _n=52235;e[e.star=_n]="star";let Dn=53259;e[e.slash=Dn]="slash";let Zn=54348;e[e.exponent=Zn]="exponent";let Ke=55296;e[e.jsxName=Ke]="jsxName";let Tt=56320;e[e.jsxText=Tt]="jsxText";let Ye=57344;e[e.jsxEmptyText=Ye]="jsxEmptyText";let bn=58880;e[e.jsxTagStart=bn]="jsxTagStart";let yn=59392;e[e.jsxTagEnd=yn]="jsxTagEnd";let te=60928;e[e.typeParameterStart=te]="typeParameterStart";let Cn=61440;e[e.nonNullAssertion=Cn]="nonNullAssertion";let gi=62480;e[e._break=gi]="_break";let _i=63504;e[e._case=_i]="_case";let Mn=64528;e[e._catch=Mn]="_catch";let xs=65552;e[e._continue=xs]="_continue";let Ds=66576;e[e._debugger=Ds]="_debugger";let bi=67600;e[e._default=bi]="_default";let es=68624;e[e._do=es]="_do";let Pt=69648;e[e._else=Pt]="_else";let Nt=70672;e[e._finally=Nt]="_finally";let Ue=71696;e[e._for=Ue]="_for";let wn=73232;e[e._function=wn]="_function";let de=73744;e[e._if=de]="_if";let Ms=74768;e[e._return=Ms]="_return";let gs=75792;e[e._switch=gs]="_switch";let Ci=77456;e[e._throw=Ci]="_throw";let ts=77840;e[e._try=ts]="_try";let nn=78864;e[e._var=nn]="_var";let wi=79888;e[e._let=wi]="_let";let Fn=80912;e[e._const=Fn]="_const";let Bn=81936;e[e._while=Bn]="_while";let Fs=82960;e[e._with=Fs]="_with";let Si=84496;e[e._new=Si]="_new";let Bs=85520;e[e._this=Bs]="_this";let Vs=86544;e[e._super=Vs]="_super";let js=87568;e[e._class=js]="_class";let $s=88080;e[e._extends=$s]="_extends";let qs=89104;e[e._export=qs]="_export";let Ii=90640;e[e._import=Ii]="_import";let Ei=91664;e[e._yield=Ei]="_yield";let Ai=92688;e[e._null=Ai]="_null";let Pi=93712;e[e._true=Pi]="_true";let Ks=94736;e[e._false=Ks]="_false";let Us=95256;e[e._in=Us]="_in";let Hs=96280;e[e._instanceof=Hs]="_instanceof";let Ws=97936;e[e._typeof=Ws]="_typeof";let Gs=98960;e[e._void=Gs]="_void";let mr=99984;e[e._delete=mr]="_delete";let jo=100880;e[e._async=jo]="_async";let $o=101904;e[e._get=$o]="_get";let yr=102928;e[e._set=yr]="_set";let qo=103952;e[e._declare=qo]="_declare";let Ni=104976;e[e._readonly=Ni]="_readonly";let Tr=106e3;e[e._abstract=Tr]="_abstract";let Ko=107024;e[e._static=Ko]="_static";let le=107536;e[e._public=le]="_public";let zs=108560;e[e._private=zs]="_private";let sn=109584;e[e._protected=sn]="_protected";let Uo=110608;e[e._override=Uo]="_override";let Ho=112144;e[e._as=Ho]="_as";let kr=113168;e[e._enum=kr]="_enum";let Wo=114192;e[e._type=Wo]="_type";let Go=115216;e[e._implements=Go]="_implements"})(q||(jr.TokenType=q={}));function Vd(e){switch(e){case q.num:return"num";case q.bigint:return"bigint";case q.decimal:return"decimal";case q.regexp:return"regexp";case q.string:return"string";case q.name:return"name";case q.eof:return"eof";case q.bracketL:return"[";case q.bracketR:return"]";case q.braceL:return"{";case q.braceBarL:return"{|";case q.braceR:return"}";case q.braceBarR:return"|}";case q.parenL:return"(";case q.parenR:return")";case q.comma:return",";case q.semi:return";";case q.colon:return":";case q.doubleColon:return"::";case q.dot:return".";case q.question:return"?";case q.questionDot:return"?.";case q.arrow:return"=>";case q.template:return"template";case q.ellipsis:return"...";case q.backQuote:return"`";case q.dollarBraceL:return"${";case q.at:return"@";case q.hash:return"#";case q.eq:return"=";case q.assign:return"_=";case q.preIncDec:return"++/--";case q.postIncDec:return"++/--";case q.bang:return"!";case q.tilde:return"~";case q.pipeline:return"|>";case q.nullishCoalescing:return"??";case q.logicalOR:return"||";case q.logicalAND:return"&&";case q.bitwiseOR:return"|";case q.bitwiseXOR:return"^";case q.bitwiseAND:return"&";case q.equality:return"==/!=";case q.lessThan:return"<";case q.greaterThan:return">";case q.relationalOrEqual:return"<=/>=";case q.bitShiftL:return"<<";case q.bitShiftR:return">>/>>>";case q.plus:return"+";case q.minus:return"-";case q.modulo:return"%";case q.star:return"*";case q.slash:return"/";case q.exponent:return"**";case q.jsxName:return"jsxName";case q.jsxText:return"jsxText";case q.jsxEmptyText:return"jsxEmptyText";case q.jsxTagStart:return"jsxTagStart";case q.jsxTagEnd:return"jsxTagEnd";case q.typeParameterStart:return"typeParameterStart";case q.nonNullAssertion:return"nonNullAssertion";case q._break:return"break";case q._case:return"case";case q._catch:return"catch";case q._continue:return"continue";case q._debugger:return"debugger";case q._default:return"default";case q._do:return"do";case q._else:return"else";case q._finally:return"finally";case q._for:return"for";case q._function:return"function";case q._if:return"if";case q._return:return"return";case q._switch:return"switch";case q._throw:return"throw";case q._try:return"try";case q._var:return"var";case q._let:return"let";case q._const:return"const";case q._while:return"while";case q._with:return"with";case q._new:return"new";case q._this:return"this";case q._super:return"super";case q._class:return"class";case q._extends:return"extends";case q._export:return"export";case q._import:return"import";case q._yield:return"yield";case q._null:return"null";case q._true:return"true";case q._false:return"false";case q._in:return"in";case q._instanceof:return"instanceof";case q._typeof:return"typeof";case q._void:return"void";case q._delete:return"delete";case q._async:return"async";case q._get:return"get";case q._set:return"set";case q._declare:return"declare";case q._readonly:return"readonly";case q._abstract:return"abstract";case q._static:return"static";case q._public:return"public";case q._private:return"private";case q._protected:return"protected";case q._override:return"override";case q._as:return"as";case q._enum:return"enum";case q._type:return"type";case q._implements:return"implements";default:return""}}jr.formatTokenType=Vd});var qr=Z(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});var jd=St(),$d=Ce(),Ta=class{constructor(t,s,i){this.startTokenIndex=t,this.endTokenIndex=s,this.isFunctionScope=i}};Ui.Scope=Ta;var $r=class{constructor(t,s,i,r,a,u,d,y,g,L,p,h,T){this.potentialArrowAt=t,this.noAnonFunctionType=s,this.inDisallowConditionalTypesContext=i,this.tokensLength=r,this.scopesLength=a,this.pos=u,this.type=d,this.contextualKeyword=y,this.start=g,this.end=L,this.isType=p,this.scopeDepth=h,this.error=T}};Ui.StateSnapshot=$r;var ka=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=$d.TokenType.eof}__init8(){this.contextualKeyword=jd.ContextualKeyword.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new $r(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(t){this.potentialArrowAt=t.potentialArrowAt,this.noAnonFunctionType=t.noAnonFunctionType,this.inDisallowConditionalTypesContext=t.inDisallowConditionalTypesContext,this.tokens.length=t.tokensLength,this.scopes.length=t.scopesLength,this.pos=t.pos,this.type=t.type,this.contextualKeyword=t.contextualKeyword,this.start=t.start,this.end=t.end,this.isType=t.isType,this.scopeDepth=t.scopeDepth,this.error=t.error}};Ui.default=ka});var Yt=Z(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});var as;(function(e){e[e.backSpace=8]="backSpace";let s=10;e[e.lineFeed=s]="lineFeed";let i=9;e[e.tab=i]="tab";let r=13;e[e.carriageReturn=r]="carriageReturn";let a=14;e[e.shiftOut=a]="shiftOut";let u=32;e[e.space=u]="space";let d=33;e[e.exclamationMark=d]="exclamationMark";let y=34;e[e.quotationMark=y]="quotationMark";let g=35;e[e.numberSign=g]="numberSign";let L=36;e[e.dollarSign=L]="dollarSign";let p=37;e[e.percentSign=p]="percentSign";let h=38;e[e.ampersand=h]="ampersand";let T=39;e[e.apostrophe=T]="apostrophe";let x=40;e[e.leftParenthesis=x]="leftParenthesis";let w=41;e[e.rightParenthesis=w]="rightParenthesis";let S=42;e[e.asterisk=S]="asterisk";let A=43;e[e.plusSign=A]="plusSign";let U=44;e[e.comma=U]="comma";let M=45;e[e.dash=M]="dash";let c=46;e[e.dot=c]="dot";let R=47;e[e.slash=R]="slash";let W=48;e[e.digit0=W]="digit0";let Y=49;e[e.digit1=Y]="digit1";let ie=50;e[e.digit2=ie]="digit2";let pe=51;e[e.digit3=pe]="digit3";let ae=52;e[e.digit4=ae]="digit4";let He=53;e[e.digit5=He]="digit5";let qe=54;e[e.digit6=qe]="digit6";let Ft=55;e[e.digit7=Ft]="digit7";let mt=56;e[e.digit8=mt]="digit8";let vt=57;e[e.digit9=vt]="digit9";let Et=58;e[e.colon=Et]="colon";let st=59;e[e.semicolon=st]="semicolon";let it=60;e[e.lessThan=it]="lessThan";let bt=61;e[e.equalsTo=bt]="equalsTo";let pt=62;e[e.greaterThan=pt]="greaterThan";let wt=63;e[e.questionMark=wt]="questionMark";let jt=64;e[e.atSign=jt]="atSign";let At=65;e[e.uppercaseA=At]="uppercaseA";let $t=66;e[e.uppercaseB=$t]="uppercaseB";let mn=67;e[e.uppercaseC=mn]="uppercaseC";let V=68;e[e.uppercaseD=V]="uppercaseD";let G=69;e[e.uppercaseE=G]="uppercaseE";let J=70;e[e.uppercaseF=J]="uppercaseF";let re=71;e[e.uppercaseG=re]="uppercaseG";let ve=72;e[e.uppercaseH=ve]="uppercaseH";let he=73;e[e.uppercaseI=he]="uppercaseI";let Ee=74;e[e.uppercaseJ=Ee]="uppercaseJ";let Ae=75;e[e.uppercaseK=Ae]="uppercaseK";let Le=76;e[e.uppercaseL=Le]="uppercaseL";let ze=77;e[e.uppercaseM=ze]="uppercaseM";let We=78;e[e.uppercaseN=We]="uppercaseN";let Xe=79;e[e.uppercaseO=Xe]="uppercaseO";let lt=80;e[e.uppercaseP=lt]="uppercaseP";let yt=81;e[e.uppercaseQ=yt]="uppercaseQ";let xt=82;e[e.uppercaseR=xt]="uppercaseR";let qt=83;e[e.uppercaseS=qt]="uppercaseS";let Ze=84;e[e.uppercaseT=Ze]="uppercaseT";let _n=85;e[e.uppercaseU=_n]="uppercaseU";let Dn=86;e[e.uppercaseV=Dn]="uppercaseV";let Zn=87;e[e.uppercaseW=Zn]="uppercaseW";let Ke=88;e[e.uppercaseX=Ke]="uppercaseX";let Tt=89;e[e.uppercaseY=Tt]="uppercaseY";let Ye=90;e[e.uppercaseZ=Ye]="uppercaseZ";let bn=91;e[e.leftSquareBracket=bn]="leftSquareBracket";let yn=92;e[e.backslash=yn]="backslash";let te=93;e[e.rightSquareBracket=te]="rightSquareBracket";let Cn=94;e[e.caret=Cn]="caret";let gi=95;e[e.underscore=gi]="underscore";let _i=96;e[e.graveAccent=_i]="graveAccent";let Mn=97;e[e.lowercaseA=Mn]="lowercaseA";let xs=98;e[e.lowercaseB=xs]="lowercaseB";let Ds=99;e[e.lowercaseC=Ds]="lowercaseC";let bi=100;e[e.lowercaseD=bi]="lowercaseD";let es=101;e[e.lowercaseE=es]="lowercaseE";let Pt=102;e[e.lowercaseF=Pt]="lowercaseF";let Nt=103;e[e.lowercaseG=Nt]="lowercaseG";let Ue=104;e[e.lowercaseH=Ue]="lowercaseH";let wn=105;e[e.lowercaseI=wn]="lowercaseI";let de=106;e[e.lowercaseJ=de]="lowercaseJ";let Ms=107;e[e.lowercaseK=Ms]="lowercaseK";let gs=108;e[e.lowercaseL=gs]="lowercaseL";let Ci=109;e[e.lowercaseM=Ci]="lowercaseM";let ts=110;e[e.lowercaseN=ts]="lowercaseN";let nn=111;e[e.lowercaseO=nn]="lowercaseO";let wi=112;e[e.lowercaseP=wi]="lowercaseP";let Fn=113;e[e.lowercaseQ=Fn]="lowercaseQ";let Bn=114;e[e.lowercaseR=Bn]="lowercaseR";let Fs=115;e[e.lowercaseS=Fs]="lowercaseS";let Si=116;e[e.lowercaseT=Si]="lowercaseT";let Bs=117;e[e.lowercaseU=Bs]="lowercaseU";let Vs=118;e[e.lowercaseV=Vs]="lowercaseV";let js=119;e[e.lowercaseW=js]="lowercaseW";let $s=120;e[e.lowercaseX=$s]="lowercaseX";let qs=121;e[e.lowercaseY=qs]="lowercaseY";let Ii=122;e[e.lowercaseZ=Ii]="lowercaseZ";let Ei=123;e[e.leftCurlyBrace=Ei]="leftCurlyBrace";let Ai=124;e[e.verticalBar=Ai]="verticalBar";let Pi=125;e[e.rightCurlyBrace=Pi]="rightCurlyBrace";let Ks=126;e[e.tilde=Ks]="tilde";let Us=160;e[e.nonBreakingSpace=Us]="nonBreakingSpace";let Hs=5760;e[e.oghamSpaceMark=Hs]="oghamSpaceMark";let Ws=8232;e[e.lineSeparator=Ws]="lineSeparator";let Gs=8233;e[e.paragraphSeparator=Gs]="paragraphSeparator"})(as||(Kr.charCodes=as={}));function qd(e){return e>=as.digit0&&e<=as.digit9||e>=as.lowercaseA&&e<=as.lowercaseF||e>=as.uppercaseA&&e<=as.uppercaseF}Kr.isDigit=qd});var Jt=Z(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});function Kd(e){return e&&e.__esModule?e:{default:e}}var Ud=qr(),Hd=Kd(Ud),Wd=Yt();ft.isJSXEnabled;ft.isTypeScriptEnabled;ft.isFlowEnabled;ft.state;ft.input;ft.nextContextId;function Gd(){return ft.nextContextId++}ft.getNextContextId=Gd;function zd(e){if("pos"in e){let t=s1(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}ft.augmentError=zd;var Ur=class{constructor(t,s){this.line=t,this.column=s}};ft.Loc=Ur;function s1(e){let t=1,s=1;for(let i=0;i{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});var ls=gt(),As=Ce(),Hr=Yt(),Qt=Jt();function Yd(e){return Qt.state.contextualKeyword===e}Zt.isContextual=Yd;function Jd(e){let t=ls.lookaheadTypeAndKeyword.call(void 0);return t.type===As.TokenType.name&&t.contextualKeyword===e}Zt.isLookaheadContextual=Jd;function i1(e){return Qt.state.contextualKeyword===e&&ls.eat.call(void 0,As.TokenType.name)}Zt.eatContextual=i1;function Qd(e){i1(e)||Wr()}Zt.expectContextual=Qd;function r1(){return ls.match.call(void 0,As.TokenType.eof)||ls.match.call(void 0,As.TokenType.braceR)||o1()}Zt.canInsertSemicolon=r1;function o1(){let e=Qt.state.tokens[Qt.state.tokens.length-1],t=e?e.end:0;for(let s=t;s{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});var va=Yt(),nm=[9,11,12,va.charCodes.space,va.charCodes.nonBreakingSpace,va.charCodes.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];Ps.WHITESPACE_CHARS=nm;var sm=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;Ps.skipWhiteSpace=sm;var im=new Uint8Array(65536);Ps.IS_WHITESPACE=im;for(let e of Ps.WHITESPACE_CHARS)Ps.IS_WHITESPACE[e]=1});var ai=Z(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var l1=Yt(),rm=xa();function om(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}var am=new Uint8Array(65536);kn.IS_IDENTIFIER_CHAR=am;for(let e=0;e<128;e++)kn.IS_IDENTIFIER_CHAR[e]=om(e)?1:0;for(let e=128;e<65536;e++)kn.IS_IDENTIFIER_CHAR[e]=1;for(let e of rm.WHITESPACE_CHARS)kn.IS_IDENTIFIER_CHAR[e]=0;kn.IS_IDENTIFIER_CHAR[8232]=0;kn.IS_IDENTIFIER_CHAR[8233]=0;var lm=kn.IS_IDENTIFIER_CHAR.slice();kn.IS_IDENTIFIER_START=lm;for(let e=l1.charCodes.digit0;e<=l1.charCodes.digit9;e++)kn.IS_IDENTIFIER_START[e]=0});var c1=Z(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});var ge=St(),we=Ce(),cm=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1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gt(),p1=c1(),h1=Ce();function um(){let e=0,t=0,s=vn.state.pos;for(;sus.charCodes.lowercaseZ));){let r=p1.READ_WORD_TREE[e+(t-us.charCodes.lowercaseA)+1];if(r===-1)break;e=r,s++}let i=p1.READ_WORD_TREE[e];if(i>-1&&!u1.IS_IDENTIFIER_CHAR[t]){vn.state.pos=s,i&1?_a.finishToken.call(void 0,i>>>1):_a.finishToken.call(void 0,h1.TokenType.name,i>>>1);return}for(;s{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});function pm(e){return e&&e.__esModule?e:{default:e}}var b=Jt(),li=cs(),F=Yt(),m1=ai(),wa=xa(),hm=St(),fm=f1(),dm=pm(fm),ne=Ce(),ot;(function(e){e[e.Access=0]="Access";let s=1;e[e.ExportAccess=s]="ExportAccess";let i=s+1;e[e.TopLevelDeclaration=i]="TopLevelDeclaration";let r=i+1;e[e.FunctionScopedDeclaration=r]="FunctionScopedDeclaration";let a=r+1;e[e.BlockScopedDeclaration=a]="BlockScopedDeclaration";let u=a+1;e[e.ObjectShorthandTopLevelDeclaration=u]="ObjectShorthandTopLevelDeclaration";let d=u+1;e[e.ObjectShorthandFunctionScopedDeclaration=d]="ObjectShorthandFunctionScopedDeclaration";let y=d+1;e[e.ObjectShorthandBlockScopedDeclaration=y]="ObjectShorthandBlockScopedDeclaration";let g=y+1;e[e.ObjectShorthand=g]="ObjectShorthand";let L=g+1;e[e.ImportDeclaration=L]="ImportDeclaration";let p=L+1;e[e.ObjectKey=p]="ObjectKey";let h=p+1;e[e.ImportAccess=h]="ImportAccess"})(ot||(Be.IdentifierRole=ot={}));var d1;(function(e){e[e.NoChildren=0]="NoChildren";let s=1;e[e.OneChild=s]="OneChild";let i=s+1;e[e.StaticChildren=i]="StaticChildren";let r=i+1;e[e.KeyAfterPropSpread=r]="KeyAfterPropSpread"})(d1||(Be.JSXRole=d1={}));function mm(e){let t=e.identifierRole;return t===ot.TopLevelDeclaration||t===ot.FunctionScopedDeclaration||t===ot.BlockScopedDeclaration||t===ot.ObjectShorthandTopLevelDeclaration||t===ot.ObjectShorthandFunctionScopedDeclaration||t===ot.ObjectShorthandBlockScopedDeclaration}Be.isDeclaration=mm;function ym(e){let t=e.identifierRole;return t===ot.FunctionScopedDeclaration||t===ot.BlockScopedDeclaration||t===ot.ObjectShorthandFunctionScopedDeclaration||t===ot.ObjectShorthandBlockScopedDeclaration}Be.isNonTopLevelDeclaration=ym;function Tm(e){let t=e.identifierRole;return t===ot.TopLevelDeclaration||t===ot.ObjectShorthandTopLevelDeclaration||t===ot.ImportDeclaration}Be.isTopLevelDeclaration=Tm;function km(e){let t=e.identifierRole;return t===ot.TopLevelDeclaration||t===ot.BlockScopedDeclaration||t===ot.ObjectShorthandTopLevelDeclaration||t===ot.ObjectShorthandBlockScopedDeclaration}Be.isBlockScopedDeclaration=km;function vm(e){let t=e.identifierRole;return t===ot.FunctionScopedDeclaration||t===ot.ObjectShorthandFunctionScopedDeclaration}Be.isFunctionScopedDeclaration=vm;function xm(e){return e.identifierRole===ot.ObjectShorthandTopLevelDeclaration||e.identifierRole===ot.ObjectShorthandBlockScopedDeclaration||e.identifierRole===ot.ObjectShorthandFunctionScopedDeclaration}Be.isObjectShorthandDeclaration=xm;var Hi=class{constructor(){this.type=b.state.type,this.contextualKeyword=b.state.contextualKeyword,this.start=b.state.start,this.end=b.state.end,this.scopeDepth=b.state.scopeDepth,this.isType=b.state.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};Be.Token=Hi;function zr(){b.state.tokens.push(new Hi),v1()}Be.next=zr;function gm(){b.state.tokens.push(new Hi),b.state.start=b.state.pos,Um()}Be.nextTemplateToken=gm;function _m(){b.state.type===ne.TokenType.assign&&--b.state.pos,$m()}Be.retokenizeSlashAsRegex=_m;function bm(e){for(let s=b.state.tokens.length-e;s=b.input.length){let e=b.state.tokens;e.length>=2&&e[e.length-1].start>=b.input.length&&e[e.length-2].start>=b.input.length&&li.unexpected.call(void 0,"Unexpectedly reached the end of input."),Ve(ne.TokenType.eof);return}Am(b.input.charCodeAt(b.state.pos))}Be.nextToken=v1;function Am(e){m1.IS_IDENTIFIER_START[e]||e===F.charCodes.backslash||e===F.charCodes.atSign&&b.input.charCodeAt(b.state.pos+1)===F.charCodes.atSign?dm.default.call(void 0):b1(e)}function Pm(){for(;b.input.charCodeAt(b.state.pos)!==F.charCodes.asterisk||b.input.charCodeAt(b.state.pos+1)!==F.charCodes.slash;)if(b.state.pos++,b.state.pos>b.input.length){li.unexpected.call(void 0,"Unterminated comment",b.state.pos-2);return}b.state.pos+=2}function x1(e){let t=b.input.charCodeAt(b.state.pos+=e);if(b.state.pos=F.charCodes.digit0&&e<=F.charCodes.digit9){C1(!0);return}e===F.charCodes.dot&&b.input.charCodeAt(b.state.pos+2)===F.charCodes.dot?(b.state.pos+=3,Ve(ne.TokenType.ellipsis)):(++b.state.pos,Ve(ne.TokenType.dot))}function Rm(){b.input.charCodeAt(b.state.pos+1)===F.charCodes.equalsTo?Fe(ne.TokenType.assign,2):Fe(ne.TokenType.slash,1)}function Lm(e){let t=e===F.charCodes.asterisk?ne.TokenType.star:ne.TokenType.modulo,s=1,i=b.input.charCodeAt(b.state.pos+1);e===F.charCodes.asterisk&&i===F.charCodes.asterisk&&(s++,i=b.input.charCodeAt(b.state.pos+2),t=ne.TokenType.exponent),i===F.charCodes.equalsTo&&b.input.charCodeAt(b.state.pos+2)!==F.charCodes.greaterThan&&(s++,t=ne.TokenType.assign),Fe(t,s)}function Om(e){let t=b.input.charCodeAt(b.state.pos+1);if(t===e){b.input.charCodeAt(b.state.pos+2)===F.charCodes.equalsTo?Fe(ne.TokenType.assign,3):Fe(e===F.charCodes.verticalBar?ne.TokenType.logicalOR:ne.TokenType.logicalAND,2);return}if(e===F.charCodes.verticalBar){if(t===F.charCodes.greaterThan){Fe(ne.TokenType.pipeline,2);return}else if(t===F.charCodes.rightCurlyBrace&&b.isFlowEnabled){Fe(ne.TokenType.braceBarR,2);return}}if(t===F.charCodes.equalsTo){Fe(ne.TokenType.assign,2);return}Fe(e===F.charCodes.verticalBar?ne.TokenType.bitwiseOR:ne.TokenType.bitwiseAND,1)}function Dm(){b.input.charCodeAt(b.state.pos+1)===F.charCodes.equalsTo?Fe(ne.TokenType.assign,2):Fe(ne.TokenType.bitwiseXOR,1)}function Mm(e){let t=b.input.charCodeAt(b.state.pos+1);if(t===e){Fe(ne.TokenType.preIncDec,2);return}t===F.charCodes.equalsTo?Fe(ne.TokenType.assign,2):e===F.charCodes.plusSign?Fe(ne.TokenType.plus,1):Fe(ne.TokenType.minus,1)}function Fm(){let e=b.input.charCodeAt(b.state.pos+1);if(e===F.charCodes.lessThan){if(b.input.charCodeAt(b.state.pos+2)===F.charCodes.equalsTo){Fe(ne.TokenType.assign,3);return}b.state.isType?Fe(ne.TokenType.lessThan,1):Fe(ne.TokenType.bitShiftL,2);return}e===F.charCodes.equalsTo?Fe(ne.TokenType.relationalOrEqual,2):Fe(ne.TokenType.lessThan,1)}function _1(){if(b.state.isType){Fe(ne.TokenType.greaterThan,1);return}let e=b.input.charCodeAt(b.state.pos+1);if(e===F.charCodes.greaterThan){let t=b.input.charCodeAt(b.state.pos+2)===F.charCodes.greaterThan?3:2;if(b.input.charCodeAt(b.state.pos+t)===F.charCodes.equalsTo){Fe(ne.TokenType.assign,t+1);return}Fe(ne.TokenType.bitShiftR,t);return}e===F.charCodes.equalsTo?Fe(ne.TokenType.relationalOrEqual,2):Fe(ne.TokenType.greaterThan,1)}function Bm(){b.state.type===ne.TokenType.greaterThan&&(b.state.pos-=1,_1())}Be.rescan_gt=Bm;function Vm(e){let t=b.input.charCodeAt(b.state.pos+1);if(t===F.charCodes.equalsTo){Fe(ne.TokenType.equality,b.input.charCodeAt(b.state.pos+2)===F.charCodes.equalsTo?3:2);return}if(e===F.charCodes.equalsTo&&t===F.charCodes.greaterThan){b.state.pos+=2,Ve(ne.TokenType.arrow);return}Fe(e===F.charCodes.equalsTo?ne.TokenType.eq:ne.TokenType.bang,1)}function jm(){let e=b.input.charCodeAt(b.state.pos+1),t=b.input.charCodeAt(b.state.pos+2);e===F.charCodes.questionMark&&!(b.isFlowEnabled&&b.state.isType)?t===F.charCodes.equalsTo?Fe(ne.TokenType.assign,3):Fe(ne.TokenType.nullishCoalescing,2):e===F.charCodes.dot&&!(t>=F.charCodes.digit0&&t<=F.charCodes.digit9)?(b.state.pos+=2,Ve(ne.TokenType.questionDot)):(++b.state.pos,Ve(ne.TokenType.question))}function b1(e){switch(e){case F.charCodes.numberSign:++b.state.pos,Ve(ne.TokenType.hash);return;case F.charCodes.dot:Nm();return;case F.charCodes.leftParenthesis:++b.state.pos,Ve(ne.TokenType.parenL);return;case F.charCodes.rightParenthesis:++b.state.pos,Ve(ne.TokenType.parenR);return;case F.charCodes.semicolon:++b.state.pos,Ve(ne.TokenType.semi);return;case F.charCodes.comma:++b.state.pos,Ve(ne.TokenType.comma);return;case F.charCodes.leftSquareBracket:++b.state.pos,Ve(ne.TokenType.bracketL);return;case F.charCodes.rightSquareBracket:++b.state.pos,Ve(ne.TokenType.bracketR);return;case F.charCodes.leftCurlyBrace:b.isFlowEnabled&&b.input.charCodeAt(b.state.pos+1)===F.charCodes.verticalBar?Fe(ne.TokenType.braceBarL,2):(++b.state.pos,Ve(ne.TokenType.braceL));return;case F.charCodes.rightCurlyBrace:++b.state.pos,Ve(ne.TokenType.braceR);return;case F.charCodes.colon:b.input.charCodeAt(b.state.pos+1)===F.charCodes.colon?Fe(ne.TokenType.doubleColon,2):(++b.state.pos,Ve(ne.TokenType.colon));return;case F.charCodes.questionMark:jm();return;case F.charCodes.atSign:++b.state.pos,Ve(ne.TokenType.at);return;case F.charCodes.graveAccent:++b.state.pos,Ve(ne.TokenType.backQuote);return;case F.charCodes.digit0:{let t=b.input.charCodeAt(b.state.pos+1);if(t===F.charCodes.lowercaseX||t===F.charCodes.uppercaseX||t===F.charCodes.lowercaseO||t===F.charCodes.uppercaseO||t===F.charCodes.lowercaseB||t===F.charCodes.uppercaseB){qm();return}}case F.charCodes.digit1:case F.charCodes.digit2:case F.charCodes.digit3:case F.charCodes.digit4:case F.charCodes.digit5:case F.charCodes.digit6:case F.charCodes.digit7:case F.charCodes.digit8:case F.charCodes.digit9:C1(!1);return;case F.charCodes.quotationMark:case F.charCodes.apostrophe:Km(e);return;case F.charCodes.slash:Rm();return;case F.charCodes.percentSign:case F.charCodes.asterisk:Lm(e);return;case F.charCodes.verticalBar:case F.charCodes.ampersand:Om(e);return;case F.charCodes.caret:Dm();return;case F.charCodes.plusSign:case F.charCodes.dash:Mm(e);return;case F.charCodes.lessThan:Fm();return;case F.charCodes.greaterThan:_1();return;case F.charCodes.equalsTo:case F.charCodes.exclamationMark:Vm(e);return;case F.charCodes.tilde:Fe(ne.TokenType.tilde,1);return;default:break}li.unexpected.call(void 0,`Unexpected character '${String.fromCharCode(e)}'`,b.state.pos)}Be.getTokenFromCode=b1;function Fe(e,t){b.state.pos+=t,Ve(e)}function $m(){let e=b.state.pos,t=!1,s=!1;for(;;){if(b.state.pos>=b.input.length){li.unexpected.call(void 0,"Unterminated regular expression",e);return}let i=b.input.charCodeAt(b.state.pos);if(t)t=!1;else{if(i===F.charCodes.leftSquareBracket)s=!0;else if(i===F.charCodes.rightSquareBracket&&s)s=!1;else if(i===F.charCodes.slash&&!s)break;t=i===F.charCodes.backslash}++b.state.pos}++b.state.pos,w1(),Ve(ne.TokenType.regexp)}function Ca(){for(;;){let e=b.input.charCodeAt(b.state.pos);if(e>=F.charCodes.digit0&&e<=F.charCodes.digit9||e===F.charCodes.underscore)b.state.pos++;else break}}function qm(){for(b.state.pos+=2;;){let t=b.input.charCodeAt(b.state.pos);if(t>=F.charCodes.digit0&&t<=F.charCodes.digit9||t>=F.charCodes.lowercaseA&&t<=F.charCodes.lowercaseF||t>=F.charCodes.uppercaseA&&t<=F.charCodes.uppercaseF||t===F.charCodes.underscore)b.state.pos++;else break}b.input.charCodeAt(b.state.pos)===F.charCodes.lowercaseN?(++b.state.pos,Ve(ne.TokenType.bigint)):Ve(ne.TokenType.num)}function C1(e){let t=!1,s=!1;e||Ca();let i=b.input.charCodeAt(b.state.pos);if(i===F.charCodes.dot&&(++b.state.pos,Ca(),i=b.input.charCodeAt(b.state.pos)),(i===F.charCodes.uppercaseE||i===F.charCodes.lowercaseE)&&(i=b.input.charCodeAt(++b.state.pos),(i===F.charCodes.plusSign||i===F.charCodes.dash)&&++b.state.pos,Ca(),i=b.input.charCodeAt(b.state.pos)),i===F.charCodes.lowercaseN?(++b.state.pos,t=!0):i===F.charCodes.lowercaseM&&(++b.state.pos,s=!0),t){Ve(ne.TokenType.bigint);return}if(s){Ve(ne.TokenType.decimal);return}Ve(ne.TokenType.num)}function Km(e){for(b.state.pos++;;){if(b.state.pos>=b.input.length){li.unexpected.call(void 0,"Unterminated string constant");return}let t=b.input.charCodeAt(b.state.pos);if(t===F.charCodes.backslash)b.state.pos++;else if(t===e)break;b.state.pos++}b.state.pos++,Ve(ne.TokenType.string)}function Um(){for(;;){if(b.state.pos>=b.input.length){li.unexpected.call(void 0,"Unterminated template");return}let e=b.input.charCodeAt(b.state.pos);if(e===F.charCodes.graveAccent||e===F.charCodes.dollarSign&&b.input.charCodeAt(b.state.pos+1)===F.charCodes.leftCurlyBrace){if(b.state.pos===b.state.start&&Sa(ne.TokenType.template))if(e===F.charCodes.dollarSign){b.state.pos+=2,Ve(ne.TokenType.dollarBraceL);return}else{++b.state.pos,Ve(ne.TokenType.backQuote);return}Ve(ne.TokenType.template);return}e===F.charCodes.backslash&&b.state.pos++,b.state.pos++}}function w1(){for(;b.state.pos{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});var S1=Ce();function Hm(e,t=e.currentIndex()){let s=t+1;if(Xr(e,s)){let i=e.identifierNameAtIndex(t);return{isType:!1,leftName:i,rightName:i,endIndex:s}}if(s++,Xr(e,s))return{isType:!0,leftName:null,rightName:null,endIndex:s};if(s++,Xr(e,s))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:s};if(s++,Xr(e,s))return{isType:!0,leftName:null,rightName:null,endIndex:s};throw new Error(`Unexpected import/export specifier at ${t}`)}Ia.default=Hm;function Xr(e,t){let s=e.tokens[t];return s.type===S1.TokenType.braceR||s.type===S1.TokenType.comma}});var I1=Z(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.default=new Map([["quot",'"'],["amp","&"],["apos","'"],["lt","<"],["gt",">"],["nbsp","\xA0"],["iexcl","\xA1"],["cent","\xA2"],["pound","\xA3"],["curren","\xA4"],["yen","\xA5"],["brvbar","\xA6"],["sect","\xA7"],["uml","\xA8"],["copy","\xA9"],["ordf","\xAA"],["laquo","\xAB"],["not","\xAC"],["shy","\xAD"],["reg","\xAE"],["macr","\xAF"],["deg","\xB0"],["plusmn","\xB1"],["sup2","\xB2"],["sup3","\xB3"],["acute","\xB4"],["micro","\xB5"],["para","\xB6"],["middot","\xB7"],["cedil","\xB8"],["sup1","\xB9"],["ordm","\xBA"],["raquo","\xBB"],["frac14","\xBC"],["frac12","\xBD"],["frac34","\xBE"],["iquest","\xBF"],["Agrave","\xC0"],["Aacute","\xC1"],["Acirc","\xC2"],["Atilde","\xC3"],["Auml","\xC4"],["Aring","\xC5"],["AElig","\xC6"],["Ccedil","\xC7"],["Egrave","\xC8"],["Eacute","\xC9"],["Ecirc","\xCA"],["Euml","\xCB"],["Igrave","\xCC"],["Iacute","\xCD"],["Icirc","\xCE"],["Iuml","\xCF"],["ETH","\xD0"],["Ntilde","\xD1"],["Ograve","\xD2"],["Oacute","\xD3"],["Ocirc","\xD4"],["Otilde","\xD5"],["Ouml","\xD6"],["times","\xD7"],["Oslash","\xD8"],["Ugrave","\xD9"],["Uacute","\xDA"],["Ucirc","\xDB"],["Uuml","\xDC"],["Yacute","\xDD"],["THORN","\xDE"],["szlig","\xDF"],["agrave","\xE0"],["aacute","\xE1"],["acirc","\xE2"],["atilde","\xE3"],["auml","\xE4"],["aring","\xE5"],["aelig","\xE6"],["ccedil","\xE7"],["egrave","\xE8"],["eacute","\xE9"],["ecirc","\xEA"],["euml","\xEB"],["igrave","\xEC"],["iacute","\xED"],["icirc","\xEE"],["iuml","\xEF"],["eth","\xF0"],["ntilde","\xF1"],["ograve","\xF2"],["oacute","\xF3"],["ocirc","\xF4"],["otilde","\xF5"],["ouml","\xF6"],["divide","\xF7"],["oslash","\xF8"],["ugrave","\xF9"],["uacute","\xFA"],["ucirc","\xFB"],["uuml","\xFC"],["yacute","\xFD"],["thorn","\xFE"],["yuml","\xFF"],["OElig","\u0152"],["oelig","\u0153"],["Scaron","\u0160"],["scaron","\u0161"],["Yuml","\u0178"],["fnof","\u0192"],["circ","\u02C6"],["tilde","\u02DC"],["Alpha","\u0391"],["Beta","\u0392"],["Gamma","\u0393"],["Delta","\u0394"],["Epsilon","\u0395"],["Zeta","\u0396"],["Eta","\u0397"],["Theta","\u0398"],["Iota","\u0399"],["Kappa","\u039A"],["Lambda","\u039B"],["Mu","\u039C"],["Nu","\u039D"],["Xi","\u039E"],["Omicron","\u039F"],["Pi","\u03A0"],["Rho","\u03A1"],["Sigma","\u03A3"],["Tau","\u03A4"],["Upsilon","\u03A5"],["Phi","\u03A6"],["Chi","\u03A7"],["Psi","\u03A8"],["Omega","\u03A9"],["alpha","\u03B1"],["beta","\u03B2"],["gamma","\u03B3"],["delta","\u03B4"],["epsilon","\u03B5"],["zeta","\u03B6"],["eta","\u03B7"],["theta","\u03B8"],["iota","\u03B9"],["kappa","\u03BA"],["lambda","\u03BB"],["mu","\u03BC"],["nu","\u03BD"],["xi","\u03BE"],["omicron","\u03BF"],["pi","\u03C0"],["rho","\u03C1"],["sigmaf","\u03C2"],["sigma","\u03C3"],["tau","\u03C4"],["upsilon","\u03C5"],["phi","\u03C6"],["chi","\u03C7"],["psi","\u03C8"],["omega","\u03C9"],["thetasym","\u03D1"],["upsih","\u03D2"],["piv","\u03D6"],["ensp","\u2002"],["emsp","\u2003"],["thinsp","\u2009"],["zwnj","\u200C"],["zwj","\u200D"],["lrm","\u200E"],["rlm","\u200F"],["ndash","\u2013"],["mdash","\u2014"],["lsquo","\u2018"],["rsquo","\u2019"],["sbquo","\u201A"],["ldquo","\u201C"],["rdquo","\u201D"],["bdquo","\u201E"],["dagger","\u2020"],["Dagger","\u2021"],["bull","\u2022"],["hellip","\u2026"],["permil","\u2030"],["prime","\u2032"],["Prime","\u2033"],["lsaquo","\u2039"],["rsaquo","\u203A"],["oline","\u203E"],["frasl","\u2044"],["euro","\u20AC"],["image","\u2111"],["weierp","\u2118"],["real","\u211C"],["trade","\u2122"],["alefsym","\u2135"],["larr","\u2190"],["uarr","\u2191"],["rarr","\u2192"],["darr","\u2193"],["harr","\u2194"],["crarr","\u21B5"],["lArr","\u21D0"],["uArr","\u21D1"],["rArr","\u21D2"],["dArr","\u21D3"],["hArr","\u21D4"],["forall","\u2200"],["part","\u2202"],["exist","\u2203"],["empty","\u2205"],["nabla","\u2207"],["isin","\u2208"],["notin","\u2209"],["ni","\u220B"],["prod","\u220F"],["sum","\u2211"],["minus","\u2212"],["lowast","\u2217"],["radic","\u221A"],["prop","\u221D"],["infin","\u221E"],["ang","\u2220"],["and","\u2227"],["or","\u2228"],["cap","\u2229"],["cup","\u222A"],["int","\u222B"],["there4","\u2234"],["sim","\u223C"],["cong","\u2245"],["asymp","\u2248"],["ne","\u2260"],["equiv","\u2261"],["le","\u2264"],["ge","\u2265"],["sub","\u2282"],["sup","\u2283"],["nsub","\u2284"],["sube","\u2286"],["supe","\u2287"],["oplus","\u2295"],["otimes","\u2297"],["perp","\u22A5"],["sdot","\u22C5"],["lceil","\u2308"],["rceil","\u2309"],["lfloor","\u230A"],["rfloor","\u230B"],["lang","\u2329"],["rang","\u232A"],["loz","\u25CA"],["spades","\u2660"],["clubs","\u2663"],["hearts","\u2665"],["diams","\u2666"]])});var Pa=Z(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});function Wm(e){let[t,s]=E1(e.jsxPragma||"React.createElement"),[i,r]=E1(e.jsxFragmentPragma||"React.Fragment");return{base:t,suffix:s,fragmentBase:i,fragmentSuffix:r}}Aa.default=Wm;function E1(e){let t=e.indexOf(".");return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}});var un=Z(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});var Na=class{getPrefixCode(){return""}getHoistedCode(){return""}getSuffixCode(){return""}};Ra.default=Na});var Da=Z(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});function Oa(e){return e&&e.__esModule?e:{default:e}}var Gm=I1(),zm=Oa(Gm),Yr=gt(),Re=Ce(),An=Yt(),Xm=Pa(),Ym=Oa(Xm),Jm=un(),Qm=Oa(Jm),La=class e extends Qm.default{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,s,i,r,a){super(),this.rootTransformer=t,this.tokens=s,this.importProcessor=i,this.nameManager=r,this.options=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Ym.default.call(void 0,a),this.isAutomaticRuntime=a.jsxRuntime==="automatic",this.jsxImportSource=a.jsxImportSource||"react"}process(){return this.tokens.matches1(Re.TokenType.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let t="";if(this.filenameVarName&&(t+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||"")};`),this.isAutomaticRuntime)if(this.importProcessor)for(let[s,i]of Object.entries(this.cjsAutomaticModuleNameResolutions))t+=`var ${i} = require("${s}");`;else{let{createElement:s,...i}=this.esmAutomaticImportNameResolutions;s&&(t+=`import {createElement as ${s}} from "${this.jsxImportSource}";`);let r=Object.entries(i).map(([a,u])=>`${a} as ${u}`).join(", ");if(r){let a=this.jsxImportSource+(this.options.production?"/jsx-runtime":"/jsx-dev-runtime");t+=`import {${r}} from "${a}";`}}return t}processJSXTag(){let{jsxRole:t,start:s}=this.tokens.currentToken(),i=this.options.production?null:this.getElementLocationCode(s);this.isAutomaticRuntime&&t!==Yr.JSXRole.KeyAfterPropSpread?this.transformTagToJSXFunc(i,t):this.transformTagToCreateElement(i)}getElementLocationCode(t){return`lineNumber: ${this.getLineNumberForIndex(t)}`}getLineNumberForIndex(t){let s=this.tokens.code;for(;this.lastIndex or > at the end of the tag.");r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(", void 0"),this.tokens.appendCode(`, ${i}, ${this.getDevSource(t)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(Re.TokenType.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}transformTagToCreateElement(t){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(Re.TokenType.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(t),!this.tokens.matches2(Re.TokenType.slash,Re.TokenType.jsxTagEnd))if(this.tokens.matches1(Re.TokenType.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw new Error("Expected either /> or > at the end of the tag.");for(this.tokens.removeInitialToken();!this.tokens.matches1(Re.TokenType.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(")")}getJSXFuncInvocationCode(t){return this.options.production?t?this.claimAutoImportedFuncInvocation("jsxs","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsx","/jsx-runtime"):this.claimAutoImportedFuncInvocation("jsxDEV","/jsx-dev-runtime")}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation("createElement","");{let{jsxPragmaInfo:t}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.base)||t.base}${t.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName("Fragment",this.options.production?"/jsx-runtime":"/jsx-dev-runtime");{let{jsxPragmaInfo:t}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(t.fragmentBase)||t.fragmentBase)+t.fragmentSuffix}}claimAutoImportedFuncInvocation(t,s){let i=this.claimAutoImportedName(t,s);return this.importProcessor?`${i}.call(void 0, `:`${i}(`}claimAutoImportedName(t,s){if(this.importProcessor){let i=this.jsxImportSource+s;return this.cjsAutomaticModuleNameResolutions[i]||(this.cjsAutomaticModuleNameResolutions[i]=this.importProcessor.getFreeIdentifierForPath(i)),`${this.cjsAutomaticModuleNameResolutions[i]}.${t}`}else return this.esmAutomaticImportNameResolutions[t]||(this.esmAutomaticImportNameResolutions[t]=this.nameManager.claimFreeName(`_${t}`)),this.esmAutomaticImportNameResolutions[t]}processTagIntro(){let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType||!this.tokens.matches2AtIndex(t-1,Re.TokenType.jsxName,Re.TokenType.jsxName)&&!this.tokens.matches2AtIndex(t-1,Re.TokenType.greaterThan,Re.TokenType.jsxName)&&!this.tokens.matches1AtIndex(t,Re.TokenType.braceL)&&!this.tokens.matches1AtIndex(t,Re.TokenType.jsxTagEnd)&&!this.tokens.matches2AtIndex(t,Re.TokenType.slash,Re.TokenType.jsxTagEnd);)t++;if(t===this.tokens.currentIndex()+1){let s=this.tokens.identifierName();P1(s)&&this.tokens.replaceToken(`'${s}'`)}for(;this.tokens.currentIndex()=An.charCodes.lowercaseA&&t<=An.charCodes.lowercaseZ}Jr.startsWithLowerCase=P1;function Zm(e){let t="",s="",i=!1,r=!1;for(let a=0;a=An.charCodes.digit0&&e<=An.charCodes.digit9}function ny(e){return e>=An.charCodes.digit0&&e<=An.charCodes.digit9||e>=An.charCodes.lowercaseA&&e<=An.charCodes.lowercaseF||e>=An.charCodes.uppercaseA&&e<=An.charCodes.uppercaseF}});var Fa=Z(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});function sy(e){return e&&e.__esModule?e:{default:e}}var Qr=gt(),ci=Ce(),iy=Da(),ry=Pa(),oy=sy(ry);function ay(e,t){let s=oy.default.call(void 0,t),i=new Set;for(let r=0;r{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});function ly(e){return e&&e.__esModule?e:{default:e}}var cy=gt(),Zr=St(),me=Ce(),uy=Wi(),py=ly(uy),hy=Fa(),Ba=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,s,i,r,a,u){this.nameManager=t,this.tokens=s,this.enableLegacyTypeScriptModuleInterop=i,this.options=r,this.isTypeScriptTransformEnabled=a,this.helperManager=u,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let t=0;t0||s.namedExports.length>0)continue;[...s.defaultNames,...s.wildcardNames,...s.namedImports.map(({localName:r})=>r)].every(r=>this.isTypeName(r))&&this.importsToReplace.set(t,"")}}isTypeName(t){return this.isTypeScriptTransformEnabled&&!this.nonTypeIdentifiers.has(t)}generateImportReplacements(){for(let[t,s]of this.importInfoByPath.entries()){let{defaultNames:i,wildcardNames:r,namedImports:a,namedExports:u,exportStarNames:d,hasStarExport:y}=s;if(i.length===0&&r.length===0&&a.length===0&&u.length===0&&d.length===0&&!y){this.importsToReplace.set(t,`require('${t}');`);continue}let g=this.getFreeIdentifierForPath(t),L;this.enableLegacyTypeScriptModuleInterop?L=g:L=r.length>0?r[0]:this.getFreeIdentifierForPath(t);let p=`var ${g} = require('${t}');`;if(r.length>0)for(let h of r){let T=this.enableLegacyTypeScriptModuleInterop?g:`${this.helperManager.getHelperName("interopRequireWildcard")}(${g})`;p+=` var ${h} = ${T};`}else d.length>0&&L!==g?p+=` var ${L} = ${this.helperManager.getHelperName("interopRequireWildcard")}(${g});`:i.length>0&&L!==g&&(p+=` var ${L} = ${this.helperManager.getHelperName("interopRequireDefault")}(${g});`);for(let{importedName:h,localName:T}of u)p+=` ${this.helperManager.getHelperName("createNamedExportFrom")}(${g}, '${T}', '${h}');`;for(let h of d)p+=` exports.${h} = ${L};`;y&&(p+=` ${this.helperManager.getHelperName("createStarExport")}(${g});`),this.importsToReplace.set(t,p);for(let h of i)this.identifierReplacements.set(h,`${L}.default`);for(let{importedName:h,localName:T}of a)this.identifierReplacements.set(T,`${g}.${h}`)}}getFreeIdentifierForPath(t){let s=t.split("/"),r=s[s.length-1].replace(/\W/g,"");return this.nameManager.claimFreeName(`_${r}`)}preprocessImportAtIndex(t){let s=[],i=[],r=[];if(t++,(this.tokens.matchesContextualAtIndex(t,Zr.ContextualKeyword._type)||this.tokens.matches1AtIndex(t,me.TokenType._typeof))&&!this.tokens.matches1AtIndex(t+1,me.TokenType.comma)&&!this.tokens.matchesContextualAtIndex(t+1,Zr.ContextualKeyword._from)||this.tokens.matches1AtIndex(t,me.TokenType.parenL))return;if(this.tokens.matches1AtIndex(t,me.TokenType.name)&&(s.push(this.tokens.identifierNameAtIndex(t)),t++,this.tokens.matches1AtIndex(t,me.TokenType.comma)&&t++),this.tokens.matches1AtIndex(t,me.TokenType.star)&&(t+=2,i.push(this.tokens.identifierNameAtIndex(t)),t++),this.tokens.matches1AtIndex(t,me.TokenType.braceL)){let d=this.getNamedImports(t+1);t=d.newIndex;for(let y of d.namedImports)y.importedName==="default"?s.push(y.localName):r.push(y)}if(this.tokens.matchesContextualAtIndex(t,Zr.ContextualKeyword._from)&&t++,!this.tokens.matches1AtIndex(t,me.TokenType.string))throw new Error("Expected string token at the end of import statement.");let a=this.tokens.stringValueAtIndex(t),u=this.getImportInfo(a);u.defaultNames.push(...s),u.wildcardNames.push(...i),u.namedImports.push(...r),s.length===0&&i.length===0&&r.length===0&&(u.hasBareImport=!0)}preprocessExportAtIndex(t){if(this.tokens.matches2AtIndex(t,me.TokenType._export,me.TokenType._var)||this.tokens.matches2AtIndex(t,me.TokenType._export,me.TokenType._let)||this.tokens.matches2AtIndex(t,me.TokenType._export,me.TokenType._const))this.preprocessVarExportAtIndex(t);else if(this.tokens.matches2AtIndex(t,me.TokenType._export,me.TokenType._function)||this.tokens.matches2AtIndex(t,me.TokenType._export,me.TokenType._class)){let s=this.tokens.identifierNameAtIndex(t+2);this.addExportBinding(s,s)}else if(this.tokens.matches3AtIndex(t,me.TokenType._export,me.TokenType.name,me.TokenType._function)){let s=this.tokens.identifierNameAtIndex(t+3);this.addExportBinding(s,s)}else this.tokens.matches2AtIndex(t,me.TokenType._export,me.TokenType.braceL)?this.preprocessNamedExportAtIndex(t):this.tokens.matches2AtIndex(t,me.TokenType._export,me.TokenType.star)&&this.preprocessExportStarAtIndex(t)}preprocessVarExportAtIndex(t){let s=0;for(let i=t+2;;i++)if(this.tokens.matches1AtIndex(i,me.TokenType.braceL)||this.tokens.matches1AtIndex(i,me.TokenType.dollarBraceL)||this.tokens.matches1AtIndex(i,me.TokenType.bracketL))s++;else if(this.tokens.matches1AtIndex(i,me.TokenType.braceR)||this.tokens.matches1AtIndex(i,me.TokenType.bracketR))s--;else{if(s===0&&!this.tokens.matches1AtIndex(i,me.TokenType.name))break;if(this.tokens.matches1AtIndex(1,me.TokenType.eq)){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected = token with an end index.");i=r-1}else{let r=this.tokens.tokens[i];if(cy.isDeclaration.call(void 0,r)){let a=this.tokens.identifierNameAtIndex(i);this.identifierReplacements.set(a,`exports.${a}`)}}}}preprocessNamedExportAtIndex(t){t+=2;let{newIndex:s,namedImports:i}=this.getNamedImports(t);if(t=s,this.tokens.matchesContextualAtIndex(t,Zr.ContextualKeyword._from))t++;else{for(let{importedName:u,localName:d}of i)this.addExportBinding(u,d);return}if(!this.tokens.matches1AtIndex(t,me.TokenType.string))throw new Error("Expected string token at the end of import statement.");let r=this.tokens.stringValueAtIndex(t);this.getImportInfo(r).namedExports.push(...i)}preprocessExportStarAtIndex(t){let s=null;if(this.tokens.matches3AtIndex(t,me.TokenType._export,me.TokenType.star,me.TokenType._as)?(t+=3,s=this.tokens.identifierNameAtIndex(t),t+=2):t+=3,!this.tokens.matches1AtIndex(t,me.TokenType.string))throw new Error("Expected string token at the end of star export statement.");let i=this.tokens.stringValueAtIndex(t),r=this.getImportInfo(i);s!==null?r.exportStarNames.push(s):r.hasStarExport=!0}getNamedImports(t){let s=[];for(;;){if(this.tokens.matches1AtIndex(t,me.TokenType.braceR)){t++;break}let i=py.default.call(void 0,this.tokens,t);if(t=i.endIndex,i.isType||s.push({importedName:i.leftName,localName:i.rightName}),this.tokens.matches2AtIndex(t,me.TokenType.comma,me.TokenType.braceR)){t+=2;break}else if(this.tokens.matches1AtIndex(t,me.TokenType.braceR)){t++;break}else if(this.tokens.matches1AtIndex(t,me.TokenType.comma))t++;else throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[t])}`)}return{newIndex:t,namedImports:s}}getImportInfo(t){let s=this.importInfoByPath.get(t);if(s)return s;let i={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(t,i),i}addExportBinding(t,s){this.exportBindingsByLocalName.has(t)||this.exportBindingsByLocalName.set(t,[]),this.exportBindingsByLocalName.get(t).push(s)}claimImportCode(t){let s=this.importsToReplace.get(t);return this.importsToReplace.set(t,""),s||""}getIdentifierReplacement(t){return this.identifierReplacements.get(t)||null}resolveExportBinding(t){let s=this.exportBindingsByLocalName.get(t);return!s||s.length===0?null:s.map(i=>`exports.${i}`).join(" = ")}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}};Va.default=Ba});var O1=Z((eo,L1)=>{(function(e,t){typeof eo=="object"&&typeof L1<"u"?t(eo):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.setArray={}))})(eo,function(e){"use strict";e.get=void 0,e.put=void 0,e.pop=void 0;class t{constructor(){this._indexes={__proto__:null},this.array=[]}}e.get=(s,i)=>s._indexes[i],e.put=(s,i)=>{let r=e.get(s,i);if(r!==void 0)return r;let{array:a,_indexes:u}=s;return u[i]=a.push(i)-1},e.pop=s=>{let{array:i,_indexes:r}=s;if(i.length===0)return;let a=i.pop();r[a]=void 0},e.SetArray=t,Object.defineProperty(e,"__esModule",{value:!0})})});var ja=Z((to,D1)=>{(function(e,t){typeof to=="object"&&typeof D1<"u"?t(to):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.sourcemapCodec={}))})(to,function(e){"use strict";let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(64),a=new Uint8Array(128);for(let w=0;w>>=1,W&&(M=-2147483648|-M),A[U]+=M,S}function L(w,S,A){return S>=A?!1:w.charCodeAt(S)!==44}function p(w){w.sort(h)}function h(w,S){return w[0]-S[0]}function T(w){let S=new Int32Array(5),A=1024*16,U=A-36,M=new Uint8Array(A),c=M.subarray(0,U),R=0,W="";for(let Y=0;Y0&&(R===A&&(W+=u.decode(M),R=0),M[R++]=59),ie.length!==0){S[0]=0;for(let pe=0;peU&&(W+=u.decode(c),M.copyWithin(0,U,R),R-=U),pe>0&&(M[R++]=44),R=x(M,R,S,ae,0),ae.length!==1&&(R=x(M,R,S,ae,1),R=x(M,R,S,ae,2),R=x(M,R,S,ae,3),ae.length!==4&&(R=x(M,R,S,ae,4)))}}}return W+u.decode(M.subarray(0,R))}function x(w,S,A,U,M){let c=U[M],R=c-A[M];A[M]=c,R=R<0?-R<<1|1:R<<1;do{let W=R&31;R>>>=5,R>0&&(W|=32),w[S++]=r[W]}while(R>0);return S}e.decode=d,e.encode=T,Object.defineProperty(e,"__esModule",{value:!0})})});var M1=Z(($a,qa)=>{(function(e,t){typeof $a=="object"&&typeof qa<"u"?qa.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.resolveURI=t())})($a,function(){"use strict";let e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,s=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var i;(function(A){A[A.Empty=1]="Empty",A[A.Hash=2]="Hash",A[A.Query=3]="Query",A[A.RelativePath=4]="RelativePath",A[A.AbsolutePath=5]="AbsolutePath",A[A.SchemeRelative=6]="SchemeRelative",A[A.Absolute=7]="Absolute"})(i||(i={}));function r(A){return e.test(A)}function a(A){return A.startsWith("//")}function u(A){return A.startsWith("/")}function d(A){return A.startsWith("file:")}function y(A){return/^[.?#]/.test(A)}function g(A){let U=t.exec(A);return p(U[1],U[2]||"",U[3],U[4]||"",U[5]||"/",U[6]||"",U[7]||"")}function L(A){let U=s.exec(A),M=U[2];return p("file:","",U[1]||"","",u(M)?M:"/"+M,U[3]||"",U[4]||"")}function p(A,U,M,c,R,W,Y){return{scheme:A,user:U,host:M,port:c,path:R,query:W,hash:Y,type:i.Absolute}}function h(A){if(a(A)){let M=g("http:"+A);return M.scheme="",M.type=i.SchemeRelative,M}if(u(A)){let M=g("http://foo.com"+A);return M.scheme="",M.host="",M.type=i.AbsolutePath,M}if(d(A))return L(A);if(r(A))return g(A);let U=g("http://foo.com/"+A);return U.scheme="",U.host="",U.type=A?A.startsWith("?")?i.Query:A.startsWith("#")?i.Hash:i.RelativePath:i.Empty,U}function T(A){if(A.endsWith("/.."))return A;let U=A.lastIndexOf("/");return A.slice(0,U+1)}function x(A,U){w(U,U.type),A.path==="/"?A.path=U.path:A.path=T(U.path)+A.path}function w(A,U){let M=U<=i.RelativePath,c=A.path.split("/"),R=1,W=0,Y=!1;for(let pe=1;pec&&(c=Y)}w(M,c);let R=M.query+M.hash;switch(c){case i.Hash:case i.Query:return R;case i.RelativePath:{let W=M.path.slice(1);return W?y(U||A)&&!y(W)?"./"+W+R:W+R:R||"."}case i.AbsolutePath:return M.path+R;default:return M.scheme+"//"+M.user+M.host+M.port+M.path+R}}return S})});var B1=Z((no,F1)=>{(function(e,t){typeof no=="object"&&typeof F1<"u"?t(no,ja(),M1()):typeof define=="function"&&define.amd?define(["exports","@jridgewell/sourcemap-codec","@jridgewell/resolve-uri"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.traceMapping={},e.sourcemapCodec,e.resolveURI))})(no,function(e,t,s){"use strict";function i(V){return V&&typeof V=="object"&&"default"in V?V:{default:V}}var r=i(s);function a(V,G){return G&&!G.endsWith("/")&&(G+="/"),r.default(V,G)}function u(V){if(!V)return"";let G=V.lastIndexOf("/");return V.slice(0,G+1)}let d=0,y=1,g=2,L=3,p=4,h=1,T=2;function x(V,G){let J=w(V,0);if(J===V.length)return V;G||(V=V.slice());for(let re=J;re>1),he=V[ve][d]-G;if(he===0)return M=!0,ve;he<0?J=ve+1:re=ve-1}return M=!1,J-1}function R(V,G,J){for(let re=J+1;re=0&&V[re][d]===G;J=re--);return J}function Y(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function ie(V,G,J,re){let{lastKey:ve,lastNeedle:he,lastIndex:Ee}=J,Ae=0,Le=V.length-1;if(re===ve){if(G===he)return M=Ee!==-1&&V[Ee][d]===G,Ee;G>=he?Ae=Ee===-1?0:Ee:Le=Ee}return J.lastKey=re,J.lastNeedle=G,J.lastIndex=c(V,G,Ae,Le)}function pe(V,G){let J=G.map(He);for(let re=0;reG;re--)V[re]=V[re-1];V[G]=J}function He(){return{__proto__:null}}let qe=function(V,G){let J=typeof V=="string"?JSON.parse(V):V;if(!("sections"in J))return new wt(J,G);let re=[],ve=[],he=[],Ee=[];Ft(J,G,re,ve,he,Ee,0,0,1/0,1/0);let Ae={version:3,file:J.file,names:Ee,sources:ve,sourcesContent:he,mappings:re};return e.presortedDecodedMap(Ae)};function Ft(V,G,J,re,ve,he,Ee,Ae,Le,ze){let{sections:We}=V;for(let Xe=0;XeLe)return;let Dn=Et(J,_n),Zn=Ze===0?Ae:0,Ke=yt[Ze];for(let Tt=0;Tt=ze)return;if(Ye.length===1){Dn.push([bn]);continue}let yn=Xe+Ye[y],te=Ye[g],Cn=Ye[L];Dn.push(Ye.length===4?[bn,yn,te,Cn]:[bn,yn,te,Cn,lt+Ye[p]])}}}function vt(V,G){for(let J=0;Ja(yt||"",Xe));let{mappings:lt}=ve;typeof lt=="string"?(this._encoded=lt,this._decoded=void 0):(this._encoded=void 0,this._decoded=x(lt,re)),this._decodedMemo=Y(),this._bySources=void 0,this._bySourceMemos=void 0}}e.encodedMappings=V=>{var G;return(G=V._encoded)!==null&&G!==void 0?G:V._encoded=t.encode(V._decoded)},e.decodedMappings=V=>V._decoded||(V._decoded=t.decode(V._encoded)),e.traceSegment=(V,G,J)=>{let re=e.decodedMappings(V);return G>=re.length?null:mn(re[G],V._decodedMemo,G,J,pt)},e.originalPositionFor=(V,{line:G,column:J,bias:re})=>{if(G--,G<0)throw new Error(st);if(J<0)throw new Error(it);let ve=e.decodedMappings(V);if(G>=ve.length)return At(null,null,null,null);let he=mn(ve[G],V._decodedMemo,G,J,re||pt);if(he==null||he.length==1)return At(null,null,null,null);let{names:Ee,resolvedSources:Ae}=V;return At(Ae[he[y]],he[g]+1,he[L],he.length===5?Ee[he[p]]:null)},e.generatedPositionFor=(V,{source:G,line:J,column:re,bias:ve})=>{if(J--,J<0)throw new Error(st);if(re<0)throw new Error(it);let{sources:he,resolvedSources:Ee}=V,Ae=he.indexOf(G);if(Ae===-1&&(Ae=Ee.indexOf(G)),Ae===-1)return $t(null,null);let Le=V._bySources||(V._bySources=pe(e.decodedMappings(V),V._bySourceMemos=he.map(Y))),ze=V._bySourceMemos,We=Le[Ae][J];if(We==null)return $t(null,null);let Xe=mn(We,ze[Ae],J,re,ve||pt);return Xe==null?$t(null,null):$t(Xe[h]+1,Xe[T])},e.eachMapping=(V,G)=>{let J=e.decodedMappings(V),{names:re,resolvedSources:ve}=V;for(let he=0;he{let{sources:J,resolvedSources:re,sourcesContent:ve}=V;if(ve==null)return null;let he=J.indexOf(G);return he===-1&&(he=re.indexOf(G)),he===-1?null:ve[he]},e.presortedDecodedMap=(V,G)=>{let J=new wt(jt(V,[]),G);return J._decoded=V.mappings,J},e.decodedMap=V=>jt(V,e.decodedMappings(V)),e.encodedMap=V=>jt(V,e.encodedMappings(V));function jt(V,G){return{version:V.version,file:V.file,names:V.names,sourceRoot:V.sourceRoot,sources:V.sources,sourcesContent:V.sourcesContent,mappings:G}}function At(V,G,J,re){return{source:V,line:G,column:J,name:re}}function $t(V,G){return{line:V,column:G}}function mn(V,G,J,re,ve){let he=ie(V,re,G,J);return M?he=(ve===bt?R:W)(V,re,he):ve===bt&&he++,he===-1||he===V.length?null:V[he]}e.AnyMap=qe,e.GREATEST_LOWER_BOUND=pt,e.LEAST_UPPER_BOUND=bt,e.TraceMap=wt,Object.defineProperty(e,"__esModule",{value:!0})})});var j1=Z((so,V1)=>{(function(e,t){typeof so=="object"&&typeof V1<"u"?t(so,O1(),ja(),B1()):typeof define=="function"&&define.amd?define(["exports","@jridgewell/set-array","@jridgewell/sourcemap-codec","@jridgewell/trace-mapping"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.genMapping={},e.setArray,e.sourcemapCodec,e.traceMapping))})(so,function(e,t,s,i){"use strict";e.addSegment=void 0,e.addMapping=void 0,e.maybeAddSegment=void 0,e.maybeAddMapping=void 0,e.setSourceContent=void 0,e.toDecodedMap=void 0,e.toEncodedMap=void 0,e.fromMap=void 0,e.allMappings=void 0;let L;class p{constructor({file:R,sourceRoot:W}={}){this._names=new t.SetArray,this._sources=new t.SetArray,this._sourcesContent=[],this._mappings=[],this.file=R,this.sourceRoot=W}}e.addSegment=(c,R,W,Y,ie,pe,ae,He)=>L(!1,c,R,W,Y,ie,pe,ae,He),e.maybeAddSegment=(c,R,W,Y,ie,pe,ae,He)=>L(!0,c,R,W,Y,ie,pe,ae,He),e.addMapping=(c,R)=>M(!1,c,R),e.maybeAddMapping=(c,R)=>M(!0,c,R),e.setSourceContent=(c,R,W)=>{let{_sources:Y,_sourcesContent:ie}=c;ie[t.put(Y,R)]=W},e.toDecodedMap=c=>{let{file:R,sourceRoot:W,_mappings:Y,_sources:ie,_sourcesContent:pe,_names:ae}=c;return w(Y),{version:3,file:R||void 0,names:ae.array,sourceRoot:W||void 0,sources:ie.array,sourcesContent:pe,mappings:Y}},e.toEncodedMap=c=>{let R=e.toDecodedMap(c);return Object.assign(Object.assign({},R),{mappings:s.encode(R.mappings)})},e.allMappings=c=>{let R=[],{_mappings:W,_sources:Y,_names:ie}=c;for(let pe=0;pe{let R=new i.TraceMap(c),W=new p({file:R.file,sourceRoot:R.sourceRoot});return S(W._names,R.names),S(W._sources,R.sources),W._sourcesContent=R.sourcesContent||R.sources.map(()=>null),W._mappings=i.decodedMappings(R),W},L=(c,R,W,Y,ie,pe,ae,He,qe)=>{let{_mappings:Ft,_sources:mt,_sourcesContent:vt,_names:Et}=R,st=h(Ft,W),it=T(st,Y);if(!ie)return c&&A(st,it)?void 0:x(st,it,[Y]);let bt=t.put(mt,ie),pt=He?t.put(Et,He):-1;if(bt===vt.length&&(vt[bt]=qe??null),!(c&&U(st,it,bt,pe,ae,pt)))return x(st,it,He?[Y,bt,pe,ae,pt]:[Y,bt,pe,ae])};function h(c,R){for(let W=c.length;W<=R;W++)c[W]=[];return c[R]}function T(c,R){let W=c.length;for(let Y=W-1;Y>=0;W=Y--){let ie=c[Y];if(R>=ie[0])break}return W}function x(c,R,W){for(let Y=c.length;Y>R;Y--)c[Y]=c[Y-1];c[R]=W}function w(c){let{length:R}=c,W=R;for(let Y=W-1;Y>=0&&!(c[Y].length>0);W=Y,Y--);W{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});var Gi=j1(),$1=Yt();function fy({code:e,mappings:t},s,i,r,a){let u=dy(r,a),d=new Gi.GenMapping({file:i.compiledFilename}),y=0,g=t[0];for(;g===void 0&&y{"use strict";Object.defineProperty(Ha,"__esModule",{value:!0});var my={require:`
+ import {createRequire as CREATE_REQUIRE_NAME} from "module";
+ const require = CREATE_REQUIRE_NAME(import.meta.url);
+ `,interopRequireWildcard:`
+ function interopRequireWildcard(obj) {
+ if (obj && obj.__esModule) {
+ return obj;
+ } else {
+ var newObj = {};
+ if (obj != null) {
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ newObj[key] = obj[key];
+ }
+ }
+ }
+ newObj.default = obj;
+ return newObj;
+ }
+ }
+ `,interopRequireDefault:`
+ function interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : { default: obj };
+ }
+ `,createNamedExportFrom:`
+ function createNamedExportFrom(obj, localName, importedName) {
+ Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});
+ }
+ `,createStarExport:`
+ function createStarExport(obj) {
+ Object.keys(obj)
+ .filter((key) => key !== "default" && key !== "__esModule")
+ .forEach((key) => {
+ if (exports.hasOwnProperty(key)) {
+ return;
+ }
+ Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});
+ });
+ }
+ `,nullishCoalesce:`
+ function nullishCoalesce(lhs, rhsFn) {
+ if (lhs != null) {
+ return lhs;
+ } else {
+ return rhsFn();
+ }
+ }
+ `,asyncNullishCoalesce:`
+ async function asyncNullishCoalesce(lhs, rhsFn) {
+ if (lhs != null) {
+ return lhs;
+ } else {
+ return await rhsFn();
+ }
+ }
+ `,optionalChain:`
+ function optionalChain(ops) {
+ let lastAccessLHS = undefined;
+ let value = ops[0];
+ let i = 1;
+ while (i < ops.length) {
+ const op = ops[i];
+ const fn = ops[i + 1];
+ i += 2;
+ if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
+ return undefined;
+ }
+ if (op === 'access' || op === 'optionalAccess') {
+ lastAccessLHS = value;
+ value = fn(value);
+ } else if (op === 'call' || op === 'optionalCall') {
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
+ lastAccessLHS = undefined;
+ }
+ }
+ return value;
+ }
+ `,asyncOptionalChain:`
+ async function asyncOptionalChain(ops) {
+ let lastAccessLHS = undefined;
+ let value = ops[0];
+ let i = 1;
+ while (i < ops.length) {
+ const op = ops[i];
+ const fn = ops[i + 1];
+ i += 2;
+ if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
+ return undefined;
+ }
+ if (op === 'access' || op === 'optionalAccess') {
+ lastAccessLHS = value;
+ value = await fn(value);
+ } else if (op === 'call' || op === 'optionalCall') {
+ value = await fn((...args) => value.call(lastAccessLHS, ...args));
+ lastAccessLHS = undefined;
+ }
+ }
+ return value;
+ }
+ `,optionalChainDelete:`
+ function optionalChainDelete(ops) {
+ const result = OPTIONAL_CHAIN_NAME(ops);
+ return result == null ? true : result;
+ }
+ `,asyncOptionalChainDelete:`
+ async function asyncOptionalChainDelete(ops) {
+ const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);
+ return result == null ? true : result;
+ }
+ `},Ua=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(t){let s=this.helperNames[t];return s||(s=this.nameManager.claimFreeName(`_${t}`),this.helperNames[t]=s,s)}emitHelpers(){let t="";this.helperNames.optionalChainDelete&&this.getHelperName("optionalChain"),this.helperNames.asyncOptionalChainDelete&&this.getHelperName("asyncOptionalChain");for(let[s,i]of Object.entries(my)){let r=this.helperNames[s],a=i;s==="optionalChainDelete"?a=a.replace("OPTIONAL_CHAIN_NAME",this.helperNames.optionalChain):s==="asyncOptionalChainDelete"?a=a.replace("ASYNC_OPTIONAL_CHAIN_NAME",this.helperNames.asyncOptionalChain):s==="require"&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName("_createRequire")),a=a.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(t+=" ",t+=a.replace(s,r).replace(/\s+/g," ").trim())}return t}};Ha.HelperManager=Ua});var W1=Z(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var Wa=gt(),io=Ce();function yy(e,t,s){H1(e,s)&&Ty(e,t,s)}ro.default=yy;function H1(e,t){for(let s of e.tokens)if(s.type===io.TokenType.name&&Wa.isNonTopLevelDeclaration.call(void 0,s)&&t.has(e.identifierNameForToken(s)))return!0;return!1}ro.hasShadowedGlobals=H1;function Ty(e,t,s){let i=[],r=t.length-1;for(let a=e.tokens.length-1;;a--){for(;i.length>0&&i[i.length-1].startTokenIndex===a+1;)i.pop();for(;r>=0&&t[r].endTokenIndex===a+1;)i.push(t[r]),r--;if(a<0)break;let u=e.tokens[a],d=e.identifierNameForToken(u);if(i.length>1&&u.type===io.TokenType.name&&s.has(d)){if(Wa.isBlockScopedDeclaration.call(void 0,u))U1(i[i.length-1],e,d);else if(Wa.isFunctionScopedDeclaration.call(void 0,u)){let y=i.length-1;for(;y>0&&!i[y].isFunctionScope;)y--;if(y<0)throw new Error("Did not find parent function scope.");U1(i[y],e,d)}}}if(i.length>0)throw new Error("Expected empty scope stack after processing file.")}function U1(e,t,s){for(let i=e.startTokenIndex;i{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});var ky=Ce();function vy(e,t){let s=[];for(let i of t)i.type===ky.TokenType.name&&s.push(e.slice(i.start,i.end));return s}Ga.default=vy});var z1=Z(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});function xy(e){return e&&e.__esModule?e:{default:e}}var gy=G1(),_y=xy(gy),za=class e{__init(){this.usedNames=new Set}constructor(t,s){e.prototype.__init.call(this),this.usedNames=new Set(_y.default.call(void 0,t,s))}claimFreeName(t){let s=this.findFreeName(t);return this.usedNames.add(s),s}findFreeName(t){if(!this.usedNames.has(t))return t;let s=2;for(;this.usedNames.has(t+String(s));)s++;return t+String(s)}};Xa.default=za});var oo=Z(Pn=>{"use strict";var by=Pn&&Pn.__extends||function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var a in r)r.hasOwnProperty(a)&&(i[a]=r[a])},e(t,s)};return function(t,s){e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}}();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.DetailContext=Pn.NoopContext=Pn.VError=void 0;var X1=function(e){by(t,e);function t(s,i){var r=e.call(this,i)||this;return r.path=s,Object.setPrototypeOf(r,t.prototype),r}return t}(Error);Pn.VError=X1;var Cy=function(){function e(){}return e.prototype.fail=function(t,s,i){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(t){},e}();Pn.NoopContext=Cy;var Y1=function(){function e(){this._propNames=[""],this._messages=[null],this._score=0}return e.prototype.fail=function(t,s,i){return this._propNames.push(t),this._messages.push(s),this._score+=i,!1},e.prototype.unionResolver=function(){return new wy},e.prototype.resolveUnion=function(t){for(var s,i,r=t,a=null,u=0,d=r.contexts;u=a._score)&&(a=y)}a&&a._score>0&&((s=this._propNames).push.apply(s,a._propNames),(i=this._messages).push.apply(i,a._messages))},e.prototype.getError=function(t){for(var s=[],i=this._propNames.length-1;i>=0;i--){var r=this._propNames[i];t+=typeof r=="number"?"["+r+"]":r?"."+r:"";var a=this._messages[i];a&&s.push(t+" "+a)}return new X1(t,s.join("; "))},e.prototype.getErrorDetail=function(t){for(var s=[],i=this._propNames.length-1;i>=0;i--){var r=this._propNames[i];t+=typeof r=="number"?"["+r+"]":r?"."+r:"";var a=this._messages[i];a&&s.push({path:t,message:a})}for(var u=null,i=s.length-1;i>=0;i--)u&&(s[i].nested=[u]),u=s[i];return u},e}();Pn.DetailContext=Y1;var wy=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var t=new Y1;return this.contexts.push(t),t},e}()});var sl=Z(ce=>{"use strict";var en=ce&&ce.__extends||function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var a in r)r.hasOwnProperty(a)&&(i[a]=r[a])},e(t,s)};return function(t,s){e(t,s);function i(){this.constructor=t}t.prototype=s===null?Object.create(s):(i.prototype=s.prototype,new i)}}();Object.defineProperty(ce,"__esModule",{value:!0});ce.basicTypes=ce.BasicType=ce.TParamList=ce.TParam=ce.param=ce.TFunc=ce.func=ce.TProp=ce.TOptional=ce.opt=ce.TIface=ce.iface=ce.TEnumLiteral=ce.enumlit=ce.TEnumType=ce.enumtype=ce.TIntersection=ce.intersection=ce.TUnion=ce.union=ce.TTuple=ce.tuple=ce.TArray=ce.array=ce.TLiteral=ce.lit=ce.TName=ce.name=ce.TType=void 0;var Z1=oo(),Ht=function(){function e(){}return e}();ce.TType=Ht;function ps(e){return typeof e=="string"?ep(e):e}function Qa(e,t){var s=e[t];if(!s)throw new Error("Unknown type "+t);return s}function ep(e){return new Za(e)}ce.name=ep;var Za=function(e){en(t,e);function t(s){var i=e.call(this)||this;return i.name=s,i._failMsg="is not a "+s,i}return t.prototype.getChecker=function(s,i,r){var a=this,u=Qa(s,this.name),d=u.getChecker(s,i,r);return u instanceof Ot||u instanceof t?d:function(y,g){return d(y,g)?!0:g.fail(null,a._failMsg,0)}},t}(Ht);ce.TName=Za;function Sy(e){return new el(e)}ce.lit=Sy;var el=function(e){en(t,e);function t(s){var i=e.call(this)||this;return i.value=s,i.name=JSON.stringify(s),i._failMsg="is not "+i.name,i}return t.prototype.getChecker=function(s,i){var r=this;return function(a,u){return a===r.value?!0:u.fail(null,r._failMsg,-1)}},t}(Ht);ce.TLiteral=el;function Iy(e){return new tp(ps(e))}ce.array=Iy;var tp=function(e){en(t,e);function t(s){var i=e.call(this)||this;return i.ttype=s,i}return t.prototype.getChecker=function(s,i){var r=this.ttype.getChecker(s,i);return function(a,u){if(!Array.isArray(a))return u.fail(null,"is not an array",0);for(var d=0;d0&&r.push(a+" more"),i._failMsg="is none of "+r.join(", ")):i._failMsg="is none of "+a+" types",i}return t.prototype.getChecker=function(s,i){var r=this,a=this.ttypes.map(function(u){return u.getChecker(s,i)});return function(u,d){for(var y=d.unionResolver(),g=0;g{"use strict";var $y=Se&&Se.__spreadArrays||function(){for(var e=0,t=0,s=arguments.length;t{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});function Uy(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t.default=e,t}var Hy=il(),et=Uy(Hy),Wy=et.union(et.lit("jsx"),et.lit("typescript"),et.lit("flow"),et.lit("imports"),et.lit("react-hot-loader"),et.lit("jest"));Gn.Transform=Wy;var Gy=et.iface([],{compiledFilename:"string"});Gn.SourceMapOptions=Gy;var zy=et.iface([],{transforms:et.array("Transform"),disableESTransforms:et.opt("boolean"),jsxRuntime:et.opt(et.union(et.lit("classic"),et.lit("automatic"),et.lit("preserve"))),production:et.opt("boolean"),jsxImportSource:et.opt("string"),jsxPragma:et.opt("string"),jsxFragmentPragma:et.opt("string"),preserveDynamicImport:et.opt("boolean"),injectCreateRequireForImportRequire:et.opt("boolean"),enableLegacyTypeScriptModuleInterop:et.opt("boolean"),enableLegacyBabel5ModuleInterop:et.opt("boolean"),sourceMapOptions:et.opt("SourceMapOptions"),filePath:et.opt("string")});Gn.Options=zy;var Xy={Transform:Gn.Transform,SourceMapOptions:Gn.SourceMapOptions,Options:Gn.Options};Gn.default=Xy});var hp=Z(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});function Yy(e){return e&&e.__esModule?e:{default:e}}var Jy=il(),Qy=pp(),Zy=Yy(Qy),{Options:eT}=Jy.createCheckers.call(void 0,Zy.default);function tT(e){eT.strictCheck(e)}rl.validateOptions=tT});var lo=Z(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});var nT=Ji(),fp=pi(),Dt=gt(),Xi=St(),pn=Ce(),_t=Jt(),Yi=Ns(),ol=cs();function sT(){Dt.next.call(void 0),Yi.parseMaybeAssign.call(void 0,!1)}Nn.parseSpread=sT;function dp(e){Dt.next.call(void 0),ll(e)}Nn.parseRest=dp;function mp(e){Yi.parseIdentifier.call(void 0),yp(e)}Nn.parseBindingIdentifier=mp;function iT(){Yi.parseIdentifier.call(void 0),_t.state.tokens[_t.state.tokens.length-1].identifierRole=Dt.IdentifierRole.ImportDeclaration}Nn.parseImportedIdentifier=iT;function yp(e){let t;_t.state.scopeDepth===0?t=Dt.IdentifierRole.TopLevelDeclaration:e?t=Dt.IdentifierRole.BlockScopedDeclaration:t=Dt.IdentifierRole.FunctionScopedDeclaration,_t.state.tokens[_t.state.tokens.length-1].identifierRole=t}Nn.markPriorBindingIdentifier=yp;function ll(e){switch(_t.state.type){case pn.TokenType._this:{let t=Dt.pushTypeContext.call(void 0,0);Dt.next.call(void 0),Dt.popTypeContext.call(void 0,t);return}case pn.TokenType._yield:case pn.TokenType.name:{_t.state.type=pn.TokenType.name,mp(e);return}case pn.TokenType.bracketL:{Dt.next.call(void 0),Tp(pn.TokenType.bracketR,e,!0);return}case pn.TokenType.braceL:Yi.parseObj.call(void 0,!0,e);return;default:ol.unexpected.call(void 0)}}Nn.parseBindingAtom=ll;function Tp(e,t,s=!1,i=!1,r=0){let a=!0,u=!1,d=_t.state.tokens.length;for(;!Dt.eat.call(void 0,e)&&!_t.state.error;)if(a?a=!1:(ol.expect.call(void 0,pn.TokenType.comma),_t.state.tokens[_t.state.tokens.length-1].contextId=r,!u&&_t.state.tokens[d].isType&&(_t.state.tokens[_t.state.tokens.length-1].isType=!0,u=!0)),!(s&&Dt.match.call(void 0,pn.TokenType.comma))){if(Dt.eat.call(void 0,e))break;if(Dt.match.call(void 0,pn.TokenType.ellipsis)){dp(t),kp(),Dt.eat.call(void 0,pn.TokenType.comma),ol.expect.call(void 0,e);break}else rT(i,t)}}Nn.parseBindingList=Tp;function rT(e,t){e&&fp.tsParseModifiers.call(void 0,[Xi.ContextualKeyword._public,Xi.ContextualKeyword._protected,Xi.ContextualKeyword._private,Xi.ContextualKeyword._readonly,Xi.ContextualKeyword._override]),al(t),kp(),al(t,!0)}function kp(){_t.isFlowEnabled?nT.flowParseAssignableListItemTypes.call(void 0):_t.isTypeScriptEnabled&&fp.tsParseAssignableListItemTypes.call(void 0)}function al(e,t=!1){if(t||ll(e),!Dt.eat.call(void 0,pn.TokenType.eq))return;let s=_t.state.tokens.length-1;Yi.parseMaybeAssign.call(void 0),_t.state.tokens[s].rhsEndIndex=_t.state.tokens.length}Nn.parseMaybeDefault=al});var pi=Z(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});var v=gt(),oe=St(),k=Ce(),I=Jt(),_e=Ns(),fi=lo(),Rn=nr(),H=cs(),oT=vl();function ul(){return v.match.call(void 0,k.TokenType.name)}function aT(){return v.match.call(void 0,k.TokenType.name)||!!(I.state.type&k.TokenType.IS_KEYWORD)||v.match.call(void 0,k.TokenType.string)||v.match.call(void 0,k.TokenType.num)||v.match.call(void 0,k.TokenType.bigint)||v.match.call(void 0,k.TokenType.decimal)}function bp(){let e=I.state.snapshot();return v.next.call(void 0),(v.match.call(void 0,k.TokenType.bracketL)||v.match.call(void 0,k.TokenType.braceL)||v.match.call(void 0,k.TokenType.star)||v.match.call(void 0,k.TokenType.ellipsis)||v.match.call(void 0,k.TokenType.hash)||aT())&&!H.hasPrecedingLineBreak.call(void 0)?!0:(I.state.restoreFromSnapshot(e),!1)}function Cp(e){for(;dl(e)!==null;);}Oe.tsParseModifiers=Cp;function dl(e){if(!v.match.call(void 0,k.TokenType.name))return null;let t=I.state.contextualKeyword;if(e.indexOf(t)!==-1&&bp()){switch(t){case oe.ContextualKeyword._readonly:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._readonly;break;case oe.ContextualKeyword._abstract:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._abstract;break;case oe.ContextualKeyword._static:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._static;break;case oe.ContextualKeyword._public:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._public;break;case oe.ContextualKeyword._private:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._private;break;case oe.ContextualKeyword._protected:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._protected;break;case oe.ContextualKeyword._override:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._override;break;case oe.ContextualKeyword._declare:I.state.tokens[I.state.tokens.length-1].type=k.TokenType._declare;break;default:break}return t}return null}Oe.tsParseModifier=dl;function Zi(){for(_e.parseIdentifier.call(void 0);v.eat.call(void 0,k.TokenType.dot);)_e.parseIdentifier.call(void 0)}function lT(){Zi(),!H.hasPrecedingLineBreak.call(void 0)&&v.match.call(void 0,k.TokenType.lessThan)&&mi()}function cT(){v.next.call(void 0),tr()}function uT(){v.next.call(void 0)}function pT(){H.expect.call(void 0,k.TokenType._typeof),v.match.call(void 0,k.TokenType._import)?wp():Zi(),!H.hasPrecedingLineBreak.call(void 0)&&v.match.call(void 0,k.TokenType.lessThan)&&mi()}function wp(){H.expect.call(void 0,k.TokenType._import),H.expect.call(void 0,k.TokenType.parenL),H.expect.call(void 0,k.TokenType.string),H.expect.call(void 0,k.TokenType.parenR),v.eat.call(void 0,k.TokenType.dot)&&Zi(),v.match.call(void 0,k.TokenType.lessThan)&&mi()}function hT(){v.eat.call(void 0,k.TokenType._const);let e=v.eat.call(void 0,k.TokenType._in),t=H.eatContextual.call(void 0,oe.ContextualKeyword._out);v.eat.call(void 0,k.TokenType._const),(e||t)&&!v.match.call(void 0,k.TokenType.name)?I.state.tokens[I.state.tokens.length-1].type=k.TokenType.name:_e.parseIdentifier.call(void 0),v.eat.call(void 0,k.TokenType._extends)&&at(),v.eat.call(void 0,k.TokenType.eq)&&at()}function di(){v.match.call(void 0,k.TokenType.lessThan)&&uo()}Oe.tsTryParseTypeParameters=di;function uo(){let e=v.pushTypeContext.call(void 0,0);for(v.match.call(void 0,k.TokenType.lessThan)||v.match.call(void 0,k.TokenType.typeParameterStart)?v.next.call(void 0):H.unexpected.call(void 0);!v.eat.call(void 0,k.TokenType.greaterThan)&&!I.state.error;)hT(),v.eat.call(void 0,k.TokenType.comma);v.popTypeContext.call(void 0,e)}function ml(e){let t=e===k.TokenType.arrow;di(),H.expect.call(void 0,k.TokenType.parenL),I.state.scopeDepth++,fT(!1),I.state.scopeDepth--,(t||v.match.call(void 0,e))&&Qi(e)}function fT(e){fi.parseBindingList.call(void 0,k.TokenType.parenR,e)}function co(){v.eat.call(void 0,k.TokenType.comma)||H.semicolon.call(void 0)}function vp(){ml(k.TokenType.colon),co()}function dT(){let e=I.state.snapshot();v.next.call(void 0);let t=v.eat.call(void 0,k.TokenType.name)&&v.match.call(void 0,k.TokenType.colon);return I.state.restoreFromSnapshot(e),t}function Sp(){if(!(v.match.call(void 0,k.TokenType.bracketL)&&dT()))return!1;let e=v.pushTypeContext.call(void 0,0);return H.expect.call(void 0,k.TokenType.bracketL),_e.parseIdentifier.call(void 0),tr(),H.expect.call(void 0,k.TokenType.bracketR),er(),co(),v.popTypeContext.call(void 0,e),!0}function xp(e){v.eat.call(void 0,k.TokenType.question),!e&&(v.match.call(void 0,k.TokenType.parenL)||v.match.call(void 0,k.TokenType.lessThan))?(ml(k.TokenType.colon),co()):(er(),co())}function mT(){if(v.match.call(void 0,k.TokenType.parenL)||v.match.call(void 0,k.TokenType.lessThan)){vp();return}if(v.match.call(void 0,k.TokenType._new)){v.next.call(void 0),v.match.call(void 0,k.TokenType.parenL)||v.match.call(void 0,k.TokenType.lessThan)?vp():xp(!1);return}let e=!!dl([oe.ContextualKeyword._readonly]);Sp()||((H.isContextual.call(void 0,oe.ContextualKeyword._get)||H.isContextual.call(void 0,oe.ContextualKeyword._set))&&bp(),_e.parsePropertyName.call(void 0,-1),xp(e))}function yT(){Ip()}function Ip(){for(H.expect.call(void 0,k.TokenType.braceL);!v.eat.call(void 0,k.TokenType.braceR)&&!I.state.error;)mT()}function TT(){let e=I.state.snapshot(),t=kT();return I.state.restoreFromSnapshot(e),t}function kT(){return v.next.call(void 0),v.eat.call(void 0,k.TokenType.plus)||v.eat.call(void 0,k.TokenType.minus)?H.isContextual.call(void 0,oe.ContextualKeyword._readonly):(H.isContextual.call(void 0,oe.ContextualKeyword._readonly)&&v.next.call(void 0),!v.match.call(void 0,k.TokenType.bracketL)||(v.next.call(void 0),!ul())?!1:(v.next.call(void 0),v.match.call(void 0,k.TokenType._in)))}function vT(){_e.parseIdentifier.call(void 0),H.expect.call(void 0,k.TokenType._in),at()}function xT(){H.expect.call(void 0,k.TokenType.braceL),v.match.call(void 0,k.TokenType.plus)||v.match.call(void 0,k.TokenType.minus)?(v.next.call(void 0),H.expectContextual.call(void 0,oe.ContextualKeyword._readonly)):H.eatContextual.call(void 0,oe.ContextualKeyword._readonly),H.expect.call(void 0,k.TokenType.bracketL),vT(),H.eatContextual.call(void 0,oe.ContextualKeyword._as)&&at(),H.expect.call(void 0,k.TokenType.bracketR),v.match.call(void 0,k.TokenType.plus)||v.match.call(void 0,k.TokenType.minus)?(v.next.call(void 0),H.expect.call(void 0,k.TokenType.question)):v.eat.call(void 0,k.TokenType.question),OT(),H.semicolon.call(void 0),H.expect.call(void 0,k.TokenType.braceR)}function gT(){for(H.expect.call(void 0,k.TokenType.bracketL);!v.eat.call(void 0,k.TokenType.bracketR)&&!I.state.error;)_T(),v.eat.call(void 0,k.TokenType.comma)}function _T(){v.eat.call(void 0,k.TokenType.ellipsis)?at():(at(),v.eat.call(void 0,k.TokenType.question)),v.eat.call(void 0,k.TokenType.colon)&&at()}function bT(){H.expect.call(void 0,k.TokenType.parenL),at(),H.expect.call(void 0,k.TokenType.parenR)}function CT(){for(v.nextTemplateToken.call(void 0),v.nextTemplateToken.call(void 0);!v.match.call(void 0,k.TokenType.backQuote)&&!I.state.error;)H.expect.call(void 0,k.TokenType.dollarBraceL),at(),v.nextTemplateToken.call(void 0),v.nextTemplateToken.call(void 0);v.next.call(void 0)}var hs;(function(e){e[e.TSFunctionType=0]="TSFunctionType";let s=1;e[e.TSConstructorType=s]="TSConstructorType";let i=s+1;e[e.TSAbstractConstructorType=i]="TSAbstractConstructorType"})(hs||(hs={}));function cl(e){e===hs.TSAbstractConstructorType&&H.expectContextual.call(void 0,oe.ContextualKeyword._abstract),(e===hs.TSConstructorType||e===hs.TSAbstractConstructorType)&&H.expect.call(void 0,k.TokenType._new);let t=I.state.inDisallowConditionalTypesContext;I.state.inDisallowConditionalTypesContext=!1,ml(k.TokenType.arrow),I.state.inDisallowConditionalTypesContext=t}function wT(){switch(I.state.type){case k.TokenType.name:lT();return;case k.TokenType._void:case k.TokenType._null:v.next.call(void 0);return;case k.TokenType.string:case k.TokenType.num:case k.TokenType.bigint:case k.TokenType.decimal:case k.TokenType._true:case k.TokenType._false:_e.parseLiteral.call(void 0);return;case k.TokenType.minus:v.next.call(void 0),_e.parseLiteral.call(void 0);return;case k.TokenType._this:{uT(),H.isContextual.call(void 0,oe.ContextualKeyword._is)&&!H.hasPrecedingLineBreak.call(void 0)&&cT();return}case k.TokenType._typeof:pT();return;case k.TokenType._import:wp();return;case k.TokenType.braceL:TT()?xT():yT();return;case k.TokenType.bracketL:gT();return;case k.TokenType.parenL:bT();return;case k.TokenType.backQuote:CT();return;default:if(I.state.type&k.TokenType.IS_KEYWORD){v.next.call(void 0),I.state.tokens[I.state.tokens.length-1].type=k.TokenType.name;return}break}H.unexpected.call(void 0)}function ST(){for(wT();!H.hasPrecedingLineBreak.call(void 0)&&v.eat.call(void 0,k.TokenType.bracketL);)v.eat.call(void 0,k.TokenType.bracketR)||(at(),H.expect.call(void 0,k.TokenType.bracketR))}function IT(){if(H.expectContextual.call(void 0,oe.ContextualKeyword._infer),_e.parseIdentifier.call(void 0),v.match.call(void 0,k.TokenType._extends)){let e=I.state.snapshot();H.expect.call(void 0,k.TokenType._extends);let t=I.state.inDisallowConditionalTypesContext;I.state.inDisallowConditionalTypesContext=!0,at(),I.state.inDisallowConditionalTypesContext=t,(I.state.error||!I.state.inDisallowConditionalTypesContext&&v.match.call(void 0,k.TokenType.question))&&I.state.restoreFromSnapshot(e)}}function pl(){if(H.isContextual.call(void 0,oe.ContextualKeyword._keyof)||H.isContextual.call(void 0,oe.ContextualKeyword._unique)||H.isContextual.call(void 0,oe.ContextualKeyword._readonly))v.next.call(void 0),pl();else if(H.isContextual.call(void 0,oe.ContextualKeyword._infer))IT();else{let e=I.state.inDisallowConditionalTypesContext;I.state.inDisallowConditionalTypesContext=!1,ST(),I.state.inDisallowConditionalTypesContext=e}}function gp(){if(v.eat.call(void 0,k.TokenType.bitwiseAND),pl(),v.match.call(void 0,k.TokenType.bitwiseAND))for(;v.eat.call(void 0,k.TokenType.bitwiseAND);)pl()}function ET(){if(v.eat.call(void 0,k.TokenType.bitwiseOR),gp(),v.match.call(void 0,k.TokenType.bitwiseOR))for(;v.eat.call(void 0,k.TokenType.bitwiseOR);)gp()}function AT(){return v.match.call(void 0,k.TokenType.lessThan)?!0:v.match.call(void 0,k.TokenType.parenL)&&NT()}function PT(){if(v.match.call(void 0,k.TokenType.name)||v.match.call(void 0,k.TokenType._this))return v.next.call(void 0),!0;if(v.match.call(void 0,k.TokenType.braceL)||v.match.call(void 0,k.TokenType.bracketL)){let e=1;for(v.next.call(void 0);e>0&&!I.state.error;)v.match.call(void 0,k.TokenType.braceL)||v.match.call(void 0,k.TokenType.bracketL)?e++:(v.match.call(void 0,k.TokenType.braceR)||v.match.call(void 0,k.TokenType.bracketR))&&e--,v.next.call(void 0);return!0}return!1}function NT(){let e=I.state.snapshot(),t=RT();return I.state.restoreFromSnapshot(e),t}function RT(){return v.next.call(void 0),!!(v.match.call(void 0,k.TokenType.parenR)||v.match.call(void 0,k.TokenType.ellipsis)||PT()&&(v.match.call(void 0,k.TokenType.colon)||v.match.call(void 0,k.TokenType.comma)||v.match.call(void 0,k.TokenType.question)||v.match.call(void 0,k.TokenType.eq)||v.match.call(void 0,k.TokenType.parenR)&&(v.next.call(void 0),v.match.call(void 0,k.TokenType.arrow))))}function Qi(e){let t=v.pushTypeContext.call(void 0,0);H.expect.call(void 0,e),DT()||at(),v.popTypeContext.call(void 0,t)}function LT(){v.match.call(void 0,k.TokenType.colon)&&Qi(k.TokenType.colon)}function er(){v.match.call(void 0,k.TokenType.colon)&&tr()}Oe.tsTryParseTypeAnnotation=er;function OT(){v.eat.call(void 0,k.TokenType.colon)&&at()}function DT(){let e=I.state.snapshot();return H.isContextual.call(void 0,oe.ContextualKeyword._asserts)?(v.next.call(void 0),H.eatContextual.call(void 0,oe.ContextualKeyword._is)?(at(),!0):ul()||v.match.call(void 0,k.TokenType._this)?(v.next.call(void 0),H.eatContextual.call(void 0,oe.ContextualKeyword._is)&&at(),!0):(I.state.restoreFromSnapshot(e),!1)):ul()||v.match.call(void 0,k.TokenType._this)?(v.next.call(void 0),H.isContextual.call(void 0,oe.ContextualKeyword._is)&&!H.hasPrecedingLineBreak.call(void 0)?(v.next.call(void 0),at(),!0):(I.state.restoreFromSnapshot(e),!1)):!1}function tr(){let e=v.pushTypeContext.call(void 0,0);H.expect.call(void 0,k.TokenType.colon),at(),v.popTypeContext.call(void 0,e)}Oe.tsParseTypeAnnotation=tr;function at(){if(hl(),I.state.inDisallowConditionalTypesContext||H.hasPrecedingLineBreak.call(void 0)||!v.eat.call(void 0,k.TokenType._extends))return;let e=I.state.inDisallowConditionalTypesContext;I.state.inDisallowConditionalTypesContext=!0,hl(),I.state.inDisallowConditionalTypesContext=e,H.expect.call(void 0,k.TokenType.question),at(),H.expect.call(void 0,k.TokenType.colon),at()}Oe.tsParseType=at;function MT(){return H.isContextual.call(void 0,oe.ContextualKeyword._abstract)&&v.lookaheadType.call(void 0)===k.TokenType._new}function hl(){if(AT()){cl(hs.TSFunctionType);return}if(v.match.call(void 0,k.TokenType._new)){cl(hs.TSConstructorType);return}else if(MT()){cl(hs.TSAbstractConstructorType);return}ET()}Oe.tsParseNonConditionalType=hl;function FT(){let e=v.pushTypeContext.call(void 0,1);at(),H.expect.call(void 0,k.TokenType.greaterThan),v.popTypeContext.call(void 0,e),_e.parseMaybeUnary.call(void 0)}Oe.tsParseTypeAssertion=FT;function BT(){if(v.eat.call(void 0,k.TokenType.jsxTagStart)){I.state.tokens[I.state.tokens.length-1].type=k.TokenType.typeParameterStart;let e=v.pushTypeContext.call(void 0,1);for(;!v.match.call(void 0,k.TokenType.greaterThan)&&!I.state.error;)at(),v.eat.call(void 0,k.TokenType.comma);oT.nextJSXTagToken.call(void 0),v.popTypeContext.call(void 0,e)}}Oe.tsTryParseJSXTypeArgument=BT;function Ep(){for(;!v.match.call(void 0,k.TokenType.braceL)&&!I.state.error;)VT(),v.eat.call(void 0,k.TokenType.comma)}function VT(){Zi(),v.match.call(void 0,k.TokenType.lessThan)&&mi()}function jT(){fi.parseBindingIdentifier.call(void 0,!1),di(),v.eat.call(void 0,k.TokenType._extends)&&Ep(),Ip()}function $T(){fi.parseBindingIdentifier.call(void 0,!1),di(),H.expect.call(void 0,k.TokenType.eq),at(),H.semicolon.call(void 0)}function qT(){if(v.match.call(void 0,k.TokenType.string)?_e.parseLiteral.call(void 0):_e.parseIdentifier.call(void 0),v.eat.call(void 0,k.TokenType.eq)){let e=I.state.tokens.length-1;_e.parseMaybeAssign.call(void 0),I.state.tokens[e].rhsEndIndex=I.state.tokens.length}}function yl(){for(fi.parseBindingIdentifier.call(void 0,!1),H.expect.call(void 0,k.TokenType.braceL);!v.eat.call(void 0,k.TokenType.braceR)&&!I.state.error;)qT(),v.eat.call(void 0,k.TokenType.comma)}function Tl(){H.expect.call(void 0,k.TokenType.braceL),Rn.parseBlockBody.call(void 0,k.TokenType.braceR)}function fl(){fi.parseBindingIdentifier.call(void 0,!1),v.eat.call(void 0,k.TokenType.dot)?fl():Tl()}function Ap(){H.isContextual.call(void 0,oe.ContextualKeyword._global)?_e.parseIdentifier.call(void 0):v.match.call(void 0,k.TokenType.string)?_e.parseExprAtom.call(void 0):H.unexpected.call(void 0),v.match.call(void 0,k.TokenType.braceL)?Tl():H.semicolon.call(void 0)}function Pp(){fi.parseImportedIdentifier.call(void 0),H.expect.call(void 0,k.TokenType.eq),UT(),H.semicolon.call(void 0)}Oe.tsParseImportEqualsDeclaration=Pp;function KT(){return H.isContextual.call(void 0,oe.ContextualKeyword._require)&&v.lookaheadType.call(void 0)===k.TokenType.parenL}function UT(){KT()?HT():Zi()}function HT(){H.expectContextual.call(void 0,oe.ContextualKeyword._require),H.expect.call(void 0,k.TokenType.parenL),v.match.call(void 0,k.TokenType.string)||H.unexpected.call(void 0),_e.parseLiteral.call(void 0),H.expect.call(void 0,k.TokenType.parenR)}function WT(){if(H.isLineTerminator.call(void 0))return!1;switch(I.state.type){case k.TokenType._function:{let e=v.pushTypeContext.call(void 0,1);v.next.call(void 0);let t=I.state.start;return Rn.parseFunction.call(void 0,t,!0),v.popTypeContext.call(void 0,e),!0}case k.TokenType._class:{let e=v.pushTypeContext.call(void 0,1);return Rn.parseClass.call(void 0,!0,!1),v.popTypeContext.call(void 0,e),!0}case k.TokenType._const:if(v.match.call(void 0,k.TokenType._const)&&H.isLookaheadContextual.call(void 0,oe.ContextualKeyword._enum)){let e=v.pushTypeContext.call(void 0,1);return H.expect.call(void 0,k.TokenType._const),H.expectContextual.call(void 0,oe.ContextualKeyword._enum),I.state.tokens[I.state.tokens.length-1].type=k.TokenType._enum,yl(),v.popTypeContext.call(void 0,e),!0}case k.TokenType._var:case k.TokenType._let:{let e=v.pushTypeContext.call(void 0,1);return Rn.parseVarStatement.call(void 0,I.state.type!==k.TokenType._var),v.popTypeContext.call(void 0,e),!0}case k.TokenType.name:{let e=v.pushTypeContext.call(void 0,1),t=I.state.contextualKeyword,s=!1;return t===oe.ContextualKeyword._global?(Ap(),s=!0):s=po(t,!0),v.popTypeContext.call(void 0,e),s}default:return!1}}function _p(){return po(I.state.contextualKeyword,!0)}function GT(e){switch(e){case oe.ContextualKeyword._declare:{let t=I.state.tokens.length-1;if(WT())return I.state.tokens[t].type=k.TokenType._declare,!0;break}case oe.ContextualKeyword._global:if(v.match.call(void 0,k.TokenType.braceL))return Tl(),!0;break;default:return po(e,!1)}return!1}function po(e,t){switch(e){case oe.ContextualKeyword._abstract:if(hi(t)&&v.match.call(void 0,k.TokenType._class))return I.state.tokens[I.state.tokens.length-1].type=k.TokenType._abstract,Rn.parseClass.call(void 0,!0,!1),!0;break;case oe.ContextualKeyword._enum:if(hi(t)&&v.match.call(void 0,k.TokenType.name))return I.state.tokens[I.state.tokens.length-1].type=k.TokenType._enum,yl(),!0;break;case oe.ContextualKeyword._interface:if(hi(t)&&v.match.call(void 0,k.TokenType.name)){let s=v.pushTypeContext.call(void 0,t?2:1);return jT(),v.popTypeContext.call(void 0,s),!0}break;case oe.ContextualKeyword._module:if(hi(t)){if(v.match.call(void 0,k.TokenType.string)){let s=v.pushTypeContext.call(void 0,t?2:1);return Ap(),v.popTypeContext.call(void 0,s),!0}else if(v.match.call(void 0,k.TokenType.name)){let s=v.pushTypeContext.call(void 0,t?2:1);return fl(),v.popTypeContext.call(void 0,s),!0}}break;case oe.ContextualKeyword._namespace:if(hi(t)&&v.match.call(void 0,k.TokenType.name)){let s=v.pushTypeContext.call(void 0,t?2:1);return fl(),v.popTypeContext.call(void 0,s),!0}break;case oe.ContextualKeyword._type:if(hi(t)&&v.match.call(void 0,k.TokenType.name)){let s=v.pushTypeContext.call(void 0,t?2:1);return $T(),v.popTypeContext.call(void 0,s),!0}break;default:break}return!1}function hi(e){return e?(v.next.call(void 0),!0):!H.isLineTerminator.call(void 0)}function zT(){let e=I.state.snapshot();return uo(),Rn.parseFunctionParams.call(void 0),LT(),H.expect.call(void 0,k.TokenType.arrow),I.state.error?(I.state.restoreFromSnapshot(e),!1):(_e.parseFunctionBody.call(void 0,!0),!0)}function kl(){I.state.type===k.TokenType.bitShiftL&&(I.state.pos-=1,v.finishToken.call(void 0,k.TokenType.lessThan)),mi()}function mi(){let e=v.pushTypeContext.call(void 0,0);for(H.expect.call(void 0,k.TokenType.lessThan);!v.eat.call(void 0,k.TokenType.greaterThan)&&!I.state.error;)at(),v.eat.call(void 0,k.TokenType.comma);v.popTypeContext.call(void 0,e)}function XT(){if(v.match.call(void 0,k.TokenType.name))switch(I.state.contextualKeyword){case oe.ContextualKeyword._abstract:case oe.ContextualKeyword._declare:case oe.ContextualKeyword._enum:case oe.ContextualKeyword._interface:case oe.ContextualKeyword._module:case oe.ContextualKeyword._namespace:case oe.ContextualKeyword._type:return!0;default:break}return!1}Oe.tsIsDeclarationStart=XT;function YT(e,t){if(v.match.call(void 0,k.TokenType.colon)&&Qi(k.TokenType.colon),!v.match.call(void 0,k.TokenType.braceL)&&H.isLineTerminator.call(void 0)){let s=I.state.tokens.length-1;for(;s>=0&&(I.state.tokens[s].start>=e||I.state.tokens[s].type===k.TokenType._default||I.state.tokens[s].type===k.TokenType._export);)I.state.tokens[s].isType=!0,s--;return}_e.parseFunctionBody.call(void 0,!1,t)}Oe.tsParseFunctionBodyAndFinish=YT;function JT(e,t,s){if(!H.hasPrecedingLineBreak.call(void 0)&&v.eat.call(void 0,k.TokenType.bang)){I.state.tokens[I.state.tokens.length-1].type=k.TokenType.nonNullAssertion;return}if(v.match.call(void 0,k.TokenType.lessThan)||v.match.call(void 0,k.TokenType.bitShiftL)){let i=I.state.snapshot();if(!t&&_e.atPossibleAsync.call(void 0)&&zT())return;if(kl(),!t&&v.eat.call(void 0,k.TokenType.parenL)?(I.state.tokens[I.state.tokens.length-1].subscriptStartIndex=e,_e.parseCallExpressionArguments.call(void 0)):v.match.call(void 0,k.TokenType.backQuote)?_e.parseTemplate.call(void 0):(I.state.type===k.TokenType.greaterThan||I.state.type!==k.TokenType.parenL&&I.state.type&k.TokenType.IS_EXPRESSION_START&&!H.hasPrecedingLineBreak.call(void 0))&&H.unexpected.call(void 0),I.state.error)I.state.restoreFromSnapshot(i);else return}else!t&&v.match.call(void 0,k.TokenType.questionDot)&&v.lookaheadType.call(void 0)===k.TokenType.lessThan&&(v.next.call(void 0),I.state.tokens[e].isOptionalChainStart=!0,I.state.tokens[I.state.tokens.length-1].subscriptStartIndex=e,mi(),H.expect.call(void 0,k.TokenType.parenL),_e.parseCallExpressionArguments.call(void 0));_e.baseParseSubscript.call(void 0,e,t,s)}Oe.tsParseSubscript=JT;function QT(){if(v.eat.call(void 0,k.TokenType._import))return H.isContextual.call(void 0,oe.ContextualKeyword._type)&&v.lookaheadType.call(void 0)!==k.TokenType.eq&&H.expectContextual.call(void 0,oe.ContextualKeyword._type),Pp(),!0;if(v.eat.call(void 0,k.TokenType.eq))return _e.parseExpression.call(void 0),H.semicolon.call(void 0),!0;if(H.eatContextual.call(void 0,oe.ContextualKeyword._as))return H.expectContextual.call(void 0,oe.ContextualKeyword._namespace),_e.parseIdentifier.call(void 0),H.semicolon.call(void 0),!0;if(H.isContextual.call(void 0,oe.ContextualKeyword._type)){let e=v.lookaheadType.call(void 0);(e===k.TokenType.braceL||e===k.TokenType.star)&&v.next.call(void 0)}return!1}Oe.tsTryParseExport=QT;function ZT(){if(_e.parseIdentifier.call(void 0),v.match.call(void 0,k.TokenType.comma)||v.match.call(void 0,k.TokenType.braceR)){I.state.tokens[I.state.tokens.length-1].identifierRole=v.IdentifierRole.ImportDeclaration;return}if(_e.parseIdentifier.call(void 0),v.match.call(void 0,k.TokenType.comma)||v.match.call(void 0,k.TokenType.braceR)){I.state.tokens[I.state.tokens.length-1].identifierRole=v.IdentifierRole.ImportDeclaration,I.state.tokens[I.state.tokens.length-2].isType=!0,I.state.tokens[I.state.tokens.length-1].isType=!0;return}if(_e.parseIdentifier.call(void 0),v.match.call(void 0,k.TokenType.comma)||v.match.call(void 0,k.TokenType.braceR)){I.state.tokens[I.state.tokens.length-3].identifierRole=v.IdentifierRole.ImportAccess,I.state.tokens[I.state.tokens.length-1].identifierRole=v.IdentifierRole.ImportDeclaration;return}_e.parseIdentifier.call(void 0),I.state.tokens[I.state.tokens.length-3].identifierRole=v.IdentifierRole.ImportAccess,I.state.tokens[I.state.tokens.length-1].identifierRole=v.IdentifierRole.ImportDeclaration,I.state.tokens[I.state.tokens.length-4].isType=!0,I.state.tokens[I.state.tokens.length-3].isType=!0,I.state.tokens[I.state.tokens.length-2].isType=!0,I.state.tokens[I.state.tokens.length-1].isType=!0}Oe.tsParseImportSpecifier=ZT;function ek(){if(_e.parseIdentifier.call(void 0),v.match.call(void 0,k.TokenType.comma)||v.match.call(void 0,k.TokenType.braceR)){I.state.tokens[I.state.tokens.length-1].identifierRole=v.IdentifierRole.ExportAccess;return}if(_e.parseIdentifier.call(void 0),v.match.call(void 0,k.TokenType.comma)||v.match.call(void 0,k.TokenType.braceR)){I.state.tokens[I.state.tokens.length-1].identifierRole=v.IdentifierRole.ExportAccess,I.state.tokens[I.state.tokens.length-2].isType=!0,I.state.tokens[I.state.tokens.length-1].isType=!0;return}if(_e.parseIdentifier.call(void 0),v.match.call(void 0,k.TokenType.comma)||v.match.call(void 0,k.TokenType.braceR)){I.state.tokens[I.state.tokens.length-3].identifierRole=v.IdentifierRole.ExportAccess;return}_e.parseIdentifier.call(void 0),I.state.tokens[I.state.tokens.length-3].identifierRole=v.IdentifierRole.ExportAccess,I.state.tokens[I.state.tokens.length-4].isType=!0,I.state.tokens[I.state.tokens.length-3].isType=!0,I.state.tokens[I.state.tokens.length-2].isType=!0,I.state.tokens[I.state.tokens.length-1].isType=!0}Oe.tsParseExportSpecifier=ek;function tk(){if(H.isContextual.call(void 0,oe.ContextualKeyword._abstract)&&v.lookaheadType.call(void 0)===k.TokenType._class)return I.state.type=k.TokenType._abstract,v.next.call(void 0),Rn.parseClass.call(void 0,!0,!0),!0;if(H.isContextual.call(void 0,oe.ContextualKeyword._interface)){let e=v.pushTypeContext.call(void 0,2);return po(oe.ContextualKeyword._interface,!0),v.popTypeContext.call(void 0,e),!0}return!1}Oe.tsTryParseExportDefaultExpression=tk;function nk(){if(I.state.type===k.TokenType._const){let e=v.lookaheadTypeAndKeyword.call(void 0);if(e.type===k.TokenType.name&&e.contextualKeyword===oe.ContextualKeyword._enum)return H.expect.call(void 0,k.TokenType._const),H.expectContextual.call(void 0,oe.ContextualKeyword._enum),I.state.tokens[I.state.tokens.length-1].type=k.TokenType._enum,yl(),!0}return!1}Oe.tsTryParseStatementContent=nk;function sk(e){let t=I.state.tokens.length;Cp([oe.ContextualKeyword._abstract,oe.ContextualKeyword._readonly,oe.ContextualKeyword._declare,oe.ContextualKeyword._static,oe.ContextualKeyword._override]);let s=I.state.tokens.length;if(Sp()){let r=e?t-1:t;for(let a=r;a{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});var Ie=gt(),Me=Ce(),fe=Jt(),ho=Ns(),fs=cs(),ct=Yt(),Lp=ai(),mk=pi();function yk(){let e=!1,t=!1;for(;;){if(fe.state.pos>=fe.input.length){fs.unexpected.call(void 0,"Unterminated JSX contents");return}let s=fe.input.charCodeAt(fe.state.pos);if(s===ct.charCodes.lessThan||s===ct.charCodes.leftCurlyBrace){if(fe.state.pos===fe.state.start){if(s===ct.charCodes.lessThan){fe.state.pos++,Ie.finishToken.call(void 0,Me.TokenType.jsxTagStart);return}Ie.getTokenFromCode.call(void 0,s);return}e&&!t?Ie.finishToken.call(void 0,Me.TokenType.jsxEmptyText):Ie.finishToken.call(void 0,Me.TokenType.jsxText);return}s===ct.charCodes.lineFeed?e=!0:s!==ct.charCodes.space&&s!==ct.charCodes.carriageReturn&&s!==ct.charCodes.tab&&(t=!0),fe.state.pos++}}function Tk(e){for(fe.state.pos++;;){if(fe.state.pos>=fe.input.length){fs.unexpected.call(void 0,"Unterminated string constant");return}if(fe.input.charCodeAt(fe.state.pos)===e){fe.state.pos++;break}fe.state.pos++}Ie.finishToken.call(void 0,Me.TokenType.string)}function kk(){let e;do{if(fe.state.pos>fe.input.length){fs.unexpected.call(void 0,"Unexpectedly reached the end of input.");return}e=fe.input.charCodeAt(++fe.state.pos)}while(Lp.IS_IDENTIFIER_CHAR[e]||e===ct.charCodes.dash);Ie.finishToken.call(void 0,Me.TokenType.jsxName)}function xl(){hn()}function Op(e){if(xl(),!Ie.eat.call(void 0,Me.TokenType.colon)){fe.state.tokens[fe.state.tokens.length-1].identifierRole=e;return}xl()}function Dp(){let e=fe.state.tokens.length;Op(Ie.IdentifierRole.Access);let t=!1;for(;Ie.match.call(void 0,Me.TokenType.dot);)t=!0,hn(),xl();if(!t){let s=fe.state.tokens[e],i=fe.input.charCodeAt(s.start);i>=ct.charCodes.lowercaseA&&i<=ct.charCodes.lowercaseZ&&(s.identifierRole=null)}}function vk(){switch(fe.state.type){case Me.TokenType.braceL:Ie.next.call(void 0),ho.parseExpression.call(void 0),hn();return;case Me.TokenType.jsxTagStart:Fp(),hn();return;case Me.TokenType.string:hn();return;default:fs.unexpected.call(void 0,"JSX value should be either an expression or a quoted JSX text")}}function xk(){fs.expect.call(void 0,Me.TokenType.ellipsis),ho.parseExpression.call(void 0)}function gk(e){if(Ie.match.call(void 0,Me.TokenType.jsxTagEnd))return!1;Dp(),fe.isTypeScriptEnabled&&mk.tsTryParseJSXTypeArgument.call(void 0);let t=!1;for(;!Ie.match.call(void 0,Me.TokenType.slash)&&!Ie.match.call(void 0,Me.TokenType.jsxTagEnd)&&!fe.state.error;){if(Ie.eat.call(void 0,Me.TokenType.braceL)){t=!0,fs.expect.call(void 0,Me.TokenType.ellipsis),ho.parseMaybeAssign.call(void 0),hn();continue}t&&fe.state.end-fe.state.start===3&&fe.input.charCodeAt(fe.state.start)===ct.charCodes.lowercaseK&&fe.input.charCodeAt(fe.state.start+1)===ct.charCodes.lowercaseE&&fe.input.charCodeAt(fe.state.start+2)===ct.charCodes.lowercaseY&&(fe.state.tokens[e].jsxRole=Ie.JSXRole.KeyAfterPropSpread),Op(Ie.IdentifierRole.ObjectKey),Ie.match.call(void 0,Me.TokenType.eq)&&(hn(),vk())}let s=Ie.match.call(void 0,Me.TokenType.slash);return s&&hn(),s}function _k(){Ie.match.call(void 0,Me.TokenType.jsxTagEnd)||Dp()}function Mp(){let e=fe.state.tokens.length-1;fe.state.tokens[e].jsxRole=Ie.JSXRole.NoChildren;let t=0;if(!gk(e))for(yi();;)switch(fe.state.type){case Me.TokenType.jsxTagStart:if(hn(),Ie.match.call(void 0,Me.TokenType.slash)){hn(),_k(),fe.state.tokens[e].jsxRole!==Ie.JSXRole.KeyAfterPropSpread&&(t===1?fe.state.tokens[e].jsxRole=Ie.JSXRole.OneChild:t>1&&(fe.state.tokens[e].jsxRole=Ie.JSXRole.StaticChildren));return}t++,Mp(),yi();break;case Me.TokenType.jsxText:t++,yi();break;case Me.TokenType.jsxEmptyText:yi();break;case Me.TokenType.braceL:Ie.next.call(void 0),Ie.match.call(void 0,Me.TokenType.ellipsis)?(xk(),yi(),t+=2):(Ie.match.call(void 0,Me.TokenType.braceR)||(t++,ho.parseExpression.call(void 0)),yi());break;default:fs.unexpected.call(void 0);return}}function Fp(){hn(),Mp()}fo.jsxParseElement=Fp;function hn(){fe.state.tokens.push(new Ie.Token),Ie.skipSpace.call(void 0),fe.state.start=fe.state.pos;let e=fe.input.charCodeAt(fe.state.pos);if(Lp.IS_IDENTIFIER_START[e])kk();else if(e===ct.charCodes.quotationMark||e===ct.charCodes.apostrophe)Tk(e);else switch(++fe.state.pos,e){case ct.charCodes.greaterThan:Ie.finishToken.call(void 0,Me.TokenType.jsxTagEnd);break;case ct.charCodes.lessThan:Ie.finishToken.call(void 0,Me.TokenType.jsxTagStart);break;case ct.charCodes.slash:Ie.finishToken.call(void 0,Me.TokenType.slash);break;case ct.charCodes.equalsTo:Ie.finishToken.call(void 0,Me.TokenType.eq);break;case ct.charCodes.leftCurlyBrace:Ie.finishToken.call(void 0,Me.TokenType.braceL);break;case ct.charCodes.dot:Ie.finishToken.call(void 0,Me.TokenType.dot);break;case ct.charCodes.colon:Ie.finishToken.call(void 0,Me.TokenType.colon);break;default:fs.unexpected.call(void 0)}}fo.nextJSXTagToken=hn;function yi(){fe.state.tokens.push(new Ie.Token),fe.state.start=fe.state.pos,yk()}});var Vp=Z(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var mo=gt(),Ti=Ce(),Bp=Jt(),bk=Ns(),Ck=Ji(),wk=pi();function Sk(e){if(mo.match.call(void 0,Ti.TokenType.question)){let t=mo.lookaheadType.call(void 0);if(t===Ti.TokenType.colon||t===Ti.TokenType.comma||t===Ti.TokenType.parenR)return}bk.baseParseConditional.call(void 0,e)}yo.typedParseConditional=Sk;function Ik(){mo.eatTypeToken.call(void 0,Ti.TokenType.question),mo.match.call(void 0,Ti.TokenType.colon)&&(Bp.isTypeScriptEnabled?wk.tsParseTypeAnnotation.call(void 0):Bp.isFlowEnabled&&Ck.flowParseTypeAnnotation.call(void 0))}yo.typedParseParenItem=Ik});var Ns=Z(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});var Yn=Ji(),Ek=vl(),jp=Vp(),ms=pi(),K=gt(),zn=St(),$p=qr(),B=Ce(),qp=Yt(),Ak=ai(),j=Jt(),ds=lo(),xn=nr(),Pe=cs(),vo=class{constructor(t){this.stop=t}};nt.StopState=vo;function sr(e=!1){if(fn(e),K.match.call(void 0,B.TokenType.comma))for(;K.eat.call(void 0,B.TokenType.comma);)fn(e)}nt.parseExpression=sr;function fn(e=!1,t=!1){return j.isTypeScriptEnabled?ms.tsParseMaybeAssign.call(void 0,e,t):j.isFlowEnabled?Yn.flowParseMaybeAssign.call(void 0,e,t):Kp(e,t)}nt.parseMaybeAssign=fn;function Kp(e,t){if(K.match.call(void 0,B.TokenType._yield))return Wk(),!1;(K.match.call(void 0,B.TokenType.parenL)||K.match.call(void 0,B.TokenType.name)||K.match.call(void 0,B.TokenType._yield))&&(j.state.potentialArrowAt=j.state.start);let s=Pk(e);return t&&wl(),j.state.type&B.TokenType.IS_ASSIGN?(K.next.call(void 0),fn(e),!1):s}nt.baseParseMaybeAssign=Kp;function Pk(e){return Rk(e)?!0:(Nk(e),!1)}function Nk(e){j.isTypeScriptEnabled||j.isFlowEnabled?jp.typedParseConditional.call(void 0,e):Up(e)}function Up(e){K.eat.call(void 0,B.TokenType.question)&&(fn(),Pe.expect.call(void 0,B.TokenType.colon),fn(e))}nt.baseParseConditional=Up;function Rk(e){let t=j.state.tokens.length;return rr()?!0:(To(t,-1,e),!1)}function To(e,t,s){if(j.isTypeScriptEnabled&&(B.TokenType._in&B.TokenType.PRECEDENCE_MASK)>t&&!Pe.hasPrecedingLineBreak.call(void 0)&&(Pe.eatContextual.call(void 0,zn.ContextualKeyword._as)||Pe.eatContextual.call(void 0,zn.ContextualKeyword._satisfies))){let r=K.pushTypeContext.call(void 0,1);ms.tsParseType.call(void 0),K.popTypeContext.call(void 0,r),K.rescan_gt.call(void 0),To(e,t,s);return}let i=j.state.type&B.TokenType.PRECEDENCE_MASK;if(i>0&&(!s||!K.match.call(void 0,B.TokenType._in))&&i>t){let r=j.state.type;K.next.call(void 0),r===B.TokenType.nullishCoalescing&&(j.state.tokens[j.state.tokens.length-1].nullishStartIndex=e);let a=j.state.tokens.length;rr(),To(a,r&B.TokenType.IS_RIGHT_ASSOCIATIVE?i-1:i,s),r===B.TokenType.nullishCoalescing&&(j.state.tokens[e].numNullishCoalesceStarts++,j.state.tokens[j.state.tokens.length-1].numNullishCoalesceEnds++),To(e,t,s)}}function rr(){if(j.isTypeScriptEnabled&&!j.isJSXEnabled&&K.eat.call(void 0,B.TokenType.lessThan))return ms.tsParseTypeAssertion.call(void 0),!1;if(Pe.isContextual.call(void 0,zn.ContextualKeyword._module)&&K.lookaheadCharCode.call(void 0)===qp.charCodes.leftCurlyBrace&&!Pe.hasFollowingLineBreak.call(void 0))return Gk(),!1;if(j.state.type&B.TokenType.IS_PREFIX)return K.next.call(void 0),rr(),!1;if(Hp())return!0;for(;j.state.type&B.TokenType.IS_POSTFIX&&!Pe.canInsertSemicolon.call(void 0);)j.state.type===B.TokenType.preIncDec&&(j.state.type=B.TokenType.postIncDec),K.next.call(void 0);return!1}nt.parseMaybeUnary=rr;function Hp(){let e=j.state.tokens.length;return _o()?!0:(bl(e),j.state.tokens.length>e&&j.state.tokens[e].isOptionalChainStart&&(j.state.tokens[j.state.tokens.length-1].isOptionalChainEnd=!0),!1)}nt.parseExprSubscripts=Hp;function bl(e,t=!1){j.isFlowEnabled?Yn.flowParseSubscripts.call(void 0,e,t):Wp(e,t)}function Wp(e,t=!1){let s=new vo(!1);do Lk(e,t,s);while(!s.stop&&!j.state.error)}nt.baseParseSubscripts=Wp;function Lk(e,t,s){j.isTypeScriptEnabled?ms.tsParseSubscript.call(void 0,e,t,s):j.isFlowEnabled?Yn.flowParseSubscript.call(void 0,e,t,s):Gp(e,t,s)}function Gp(e,t,s){if(!t&&K.eat.call(void 0,B.TokenType.doubleColon))Cl(),s.stop=!0,bl(e,t);else if(K.match.call(void 0,B.TokenType.questionDot)){if(j.state.tokens[e].isOptionalChainStart=!0,t&&K.lookaheadType.call(void 0)===B.TokenType.parenL){s.stop=!0;return}K.next.call(void 0),j.state.tokens[j.state.tokens.length-1].subscriptStartIndex=e,K.eat.call(void 0,B.TokenType.bracketL)?(sr(),Pe.expect.call(void 0,B.TokenType.bracketR)):K.eat.call(void 0,B.TokenType.parenL)?ko():xo()}else if(K.eat.call(void 0,B.TokenType.dot))j.state.tokens[j.state.tokens.length-1].subscriptStartIndex=e,xo();else if(K.eat.call(void 0,B.TokenType.bracketL))j.state.tokens[j.state.tokens.length-1].subscriptStartIndex=e,sr(),Pe.expect.call(void 0,B.TokenType.bracketR);else if(!t&&K.match.call(void 0,B.TokenType.parenL))if(zp()){let i=j.state.snapshot(),r=j.state.tokens.length;K.next.call(void 0),j.state.tokens[j.state.tokens.length-1].subscriptStartIndex=e;let a=j.getNextContextId.call(void 0);j.state.tokens[j.state.tokens.length-1].contextId=a,ko(),j.state.tokens[j.state.tokens.length-1].contextId=a,Ok()&&(j.state.restoreFromSnapshot(i),s.stop=!0,j.state.scopeDepth++,xn.parseFunctionParams.call(void 0),Dk(r))}else{K.next.call(void 0),j.state.tokens[j.state.tokens.length-1].subscriptStartIndex=e;let i=j.getNextContextId.call(void 0);j.state.tokens[j.state.tokens.length-1].contextId=i,ko(),j.state.tokens[j.state.tokens.length-1].contextId=i}else K.match.call(void 0,B.TokenType.backQuote)?Sl():s.stop=!0}nt.baseParseSubscript=Gp;function zp(){return j.state.tokens[j.state.tokens.length-1].contextualKeyword===zn.ContextualKeyword._async&&!Pe.canInsertSemicolon.call(void 0)}nt.atPossibleAsync=zp;function ko(){let e=!0;for(;!K.eat.call(void 0,B.TokenType.parenR)&&!j.state.error;){if(e)e=!1;else if(Pe.expect.call(void 0,B.TokenType.comma),K.eat.call(void 0,B.TokenType.parenR))break;eh(!1)}}nt.parseCallExpressionArguments=ko;function Ok(){return K.match.call(void 0,B.TokenType.colon)||K.match.call(void 0,B.TokenType.arrow)}function Dk(e){j.isTypeScriptEnabled?ms.tsStartParseAsyncArrowFromCallExpression.call(void 0):j.isFlowEnabled&&Yn.flowStartParseAsyncArrowFromCallExpression.call(void 0),Pe.expect.call(void 0,B.TokenType.arrow),ir(e)}function Cl(){let e=j.state.tokens.length;_o(),bl(e,!0)}function _o(){if(K.eat.call(void 0,B.TokenType.modulo))return Xn(),!1;if(K.match.call(void 0,B.TokenType.jsxText)||K.match.call(void 0,B.TokenType.jsxEmptyText))return Xp(),!1;if(K.match.call(void 0,B.TokenType.lessThan)&&j.isJSXEnabled)return j.state.type=B.TokenType.jsxTagStart,Ek.jsxParseElement.call(void 0),K.next.call(void 0),!1;let e=j.state.potentialArrowAt===j.state.start;switch(j.state.type){case B.TokenType.slash:case B.TokenType.assign:K.retokenizeSlashAsRegex.call(void 0);case B.TokenType._super:case B.TokenType._this:case B.TokenType.regexp:case B.TokenType.num:case B.TokenType.bigint:case B.TokenType.decimal:case B.TokenType.string:case B.TokenType._null:case B.TokenType._true:case B.TokenType._false:return K.next.call(void 0),!1;case B.TokenType._import:return K.next.call(void 0),K.match.call(void 0,B.TokenType.dot)&&(j.state.tokens[j.state.tokens.length-1].type=B.TokenType.name,K.next.call(void 0),Xn()),!1;case B.TokenType.name:{let t=j.state.tokens.length,s=j.state.start,i=j.state.contextualKeyword;return Xn(),i===zn.ContextualKeyword._await?(Hk(),!1):i===zn.ContextualKeyword._async&&K.match.call(void 0,B.TokenType._function)&&!Pe.canInsertSemicolon.call(void 0)?(K.next.call(void 0),xn.parseFunction.call(void 0,s,!1),!1):e&&i===zn.ContextualKeyword._async&&!Pe.canInsertSemicolon.call(void 0)&&K.match.call(void 0,B.TokenType.name)?(j.state.scopeDepth++,ds.parseBindingIdentifier.call(void 0,!1),Pe.expect.call(void 0,B.TokenType.arrow),ir(t),!0):K.match.call(void 0,B.TokenType._do)&&!Pe.canInsertSemicolon.call(void 0)?(K.next.call(void 0),xn.parseBlock.call(void 0),!1):e&&!Pe.canInsertSemicolon.call(void 0)&&K.match.call(void 0,B.TokenType.arrow)?(j.state.scopeDepth++,ds.markPriorBindingIdentifier.call(void 0,!1),Pe.expect.call(void 0,B.TokenType.arrow),ir(t),!0):(j.state.tokens[j.state.tokens.length-1].identifierRole=K.IdentifierRole.Access,!1)}case B.TokenType._do:return K.next.call(void 0),xn.parseBlock.call(void 0),!1;case B.TokenType.parenL:return Yp(e);case B.TokenType.bracketL:return K.next.call(void 0),Zp(B.TokenType.bracketR,!0),!1;case B.TokenType.braceL:return Jp(!1,!1),!1;case B.TokenType._function:return Mk(),!1;case B.TokenType.at:xn.parseDecorators.call(void 0);case B.TokenType._class:return xn.parseClass.call(void 0,!1),!1;case B.TokenType._new:return Vk(),!1;case B.TokenType.backQuote:return Sl(),!1;case B.TokenType.doubleColon:return K.next.call(void 0),Cl(),!1;case B.TokenType.hash:{let t=K.lookaheadCharCode.call(void 0);return Ak.IS_IDENTIFIER_START[t]||t===qp.charCodes.backslash?xo():K.next.call(void 0),!1}default:return Pe.unexpected.call(void 0),!1}}nt.parseExprAtom=_o;function xo(){K.eat.call(void 0,B.TokenType.hash),Xn()}function Mk(){let e=j.state.start;Xn(),K.eat.call(void 0,B.TokenType.dot)&&Xn(),xn.parseFunction.call(void 0,e,!1)}function Xp(){K.next.call(void 0)}nt.parseLiteral=Xp;function Fk(){Pe.expect.call(void 0,B.TokenType.parenL),sr(),Pe.expect.call(void 0,B.TokenType.parenR)}nt.parseParenExpression=Fk;function Yp(e){let t=j.state.snapshot(),s=j.state.tokens.length;Pe.expect.call(void 0,B.TokenType.parenL);let i=!0;for(;!K.match.call(void 0,B.TokenType.parenR)&&!j.state.error;){if(i)i=!1;else if(Pe.expect.call(void 0,B.TokenType.comma),K.match.call(void 0,B.TokenType.parenR))break;if(K.match.call(void 0,B.TokenType.ellipsis)){ds.parseRest.call(void 0,!1),wl();break}else fn(!1,!0)}return Pe.expect.call(void 0,B.TokenType.parenR),e&&Bk()&&gl()?(j.state.restoreFromSnapshot(t),j.state.scopeDepth++,xn.parseFunctionParams.call(void 0),gl(),ir(s),j.state.error?(j.state.restoreFromSnapshot(t),Yp(!1),!1):!0):!1}function Bk(){return K.match.call(void 0,B.TokenType.colon)||!Pe.canInsertSemicolon.call(void 0)}function gl(){return j.isTypeScriptEnabled?ms.tsParseArrow.call(void 0):j.isFlowEnabled?Yn.flowParseArrow.call(void 0):K.eat.call(void 0,B.TokenType.arrow)}nt.parseArrow=gl;function wl(){(j.isTypeScriptEnabled||j.isFlowEnabled)&&jp.typedParseParenItem.call(void 0)}function Vk(){if(Pe.expect.call(void 0,B.TokenType._new),K.eat.call(void 0,B.TokenType.dot)){Xn();return}jk(),j.isFlowEnabled&&Yn.flowStartParseNewArguments.call(void 0),K.eat.call(void 0,B.TokenType.parenL)&&Zp(B.TokenType.parenR)}function jk(){Cl(),K.eat.call(void 0,B.TokenType.questionDot)}function Sl(){for(K.nextTemplateToken.call(void 0),K.nextTemplateToken.call(void 0);!K.match.call(void 0,B.TokenType.backQuote)&&!j.state.error;)Pe.expect.call(void 0,B.TokenType.dollarBraceL),sr(),K.nextTemplateToken.call(void 0),K.nextTemplateToken.call(void 0);K.next.call(void 0)}nt.parseTemplate=Sl;function Jp(e,t){let s=j.getNextContextId.call(void 0),i=!0;for(K.next.call(void 0),j.state.tokens[j.state.tokens.length-1].contextId=s;!K.eat.call(void 0,B.TokenType.braceR)&&!j.state.error;){if(i)i=!1;else if(Pe.expect.call(void 0,B.TokenType.comma),K.eat.call(void 0,B.TokenType.braceR))break;let r=!1;if(K.match.call(void 0,B.TokenType.ellipsis)){let a=j.state.tokens.length;if(ds.parseSpread.call(void 0),e&&(j.state.tokens.length===a+2&&ds.markPriorBindingIdentifier.call(void 0,t),K.eat.call(void 0,B.TokenType.braceR)))break;continue}e||(r=K.eat.call(void 0,B.TokenType.star)),!e&&Pe.isContextual.call(void 0,zn.ContextualKeyword._async)?(r&&Pe.unexpected.call(void 0),Xn(),K.match.call(void 0,B.TokenType.colon)||K.match.call(void 0,B.TokenType.parenL)||K.match.call(void 0,B.TokenType.braceR)||K.match.call(void 0,B.TokenType.eq)||K.match.call(void 0,B.TokenType.comma)||(K.match.call(void 0,B.TokenType.star)&&(K.next.call(void 0),r=!0),go(s))):go(s),Uk(e,t,s)}j.state.tokens[j.state.tokens.length-1].contextId=s}nt.parseObj=Jp;function $k(e){return!e&&(K.match.call(void 0,B.TokenType.string)||K.match.call(void 0,B.TokenType.num)||K.match.call(void 0,B.TokenType.bracketL)||K.match.call(void 0,B.TokenType.name)||!!(j.state.type&B.TokenType.IS_KEYWORD))}function qk(e,t){let s=j.state.start;return K.match.call(void 0,B.TokenType.parenL)?(e&&Pe.unexpected.call(void 0),_l(s,!1),!0):$k(e)?(go(t),_l(s,!1),!0):!1}function Kk(e,t){if(K.eat.call(void 0,B.TokenType.colon)){e?ds.parseMaybeDefault.call(void 0,t):fn(!1);return}let s;e?j.state.scopeDepth===0?s=K.IdentifierRole.ObjectShorthandTopLevelDeclaration:t?s=K.IdentifierRole.ObjectShorthandBlockScopedDeclaration:s=K.IdentifierRole.ObjectShorthandFunctionScopedDeclaration:s=K.IdentifierRole.ObjectShorthand,j.state.tokens[j.state.tokens.length-1].identifierRole=s,ds.parseMaybeDefault.call(void 0,t,!0)}function Uk(e,t,s){j.isTypeScriptEnabled?ms.tsStartParseObjPropValue.call(void 0):j.isFlowEnabled&&Yn.flowStartParseObjPropValue.call(void 0),qk(e,s)||Kk(e,t)}function go(e){j.isFlowEnabled&&Yn.flowParseVariance.call(void 0),K.eat.call(void 0,B.TokenType.bracketL)?(j.state.tokens[j.state.tokens.length-1].contextId=e,fn(),Pe.expect.call(void 0,B.TokenType.bracketR),j.state.tokens[j.state.tokens.length-1].contextId=e):(K.match.call(void 0,B.TokenType.num)||K.match.call(void 0,B.TokenType.string)||K.match.call(void 0,B.TokenType.bigint)||K.match.call(void 0,B.TokenType.decimal)?_o():xo(),j.state.tokens[j.state.tokens.length-1].identifierRole=K.IdentifierRole.ObjectKey,j.state.tokens[j.state.tokens.length-1].contextId=e)}nt.parsePropertyName=go;function _l(e,t){let s=j.getNextContextId.call(void 0);j.state.scopeDepth++;let i=j.state.tokens.length,r=t;xn.parseFunctionParams.call(void 0,r,s),Qp(e,s);let a=j.state.tokens.length;j.state.scopes.push(new $p.Scope(i,a,!0)),j.state.scopeDepth--}nt.parseMethod=_l;function ir(e){Il(!0);let t=j.state.tokens.length;j.state.scopes.push(new $p.Scope(e,t,!0)),j.state.scopeDepth--}nt.parseArrowExpression=ir;function Qp(e,t=0){j.isTypeScriptEnabled?ms.tsParseFunctionBodyAndFinish.call(void 0,e,t):j.isFlowEnabled?Yn.flowParseFunctionBodyAndFinish.call(void 0,t):Il(!1,t)}nt.parseFunctionBodyAndFinish=Qp;function Il(e,t=0){e&&!K.match.call(void 0,B.TokenType.braceL)?fn():xn.parseBlock.call(void 0,!0,t)}nt.parseFunctionBody=Il;function Zp(e,t=!1){let s=!0;for(;!K.eat.call(void 0,e)&&!j.state.error;){if(s)s=!1;else if(Pe.expect.call(void 0,B.TokenType.comma),K.eat.call(void 0,e))break;eh(t)}}function eh(e){e&&K.match.call(void 0,B.TokenType.comma)||(K.match.call(void 0,B.TokenType.ellipsis)?(ds.parseSpread.call(void 0),wl()):K.match.call(void 0,B.TokenType.question)?K.next.call(void 0):fn(!1,!0))}function Xn(){K.next.call(void 0),j.state.tokens[j.state.tokens.length-1].type=B.TokenType.name}nt.parseIdentifier=Xn;function Hk(){rr()}function Wk(){K.next.call(void 0),!K.match.call(void 0,B.TokenType.semi)&&!Pe.canInsertSemicolon.call(void 0)&&(K.eat.call(void 0,B.TokenType.star),fn())}function Gk(){Pe.expectContextual.call(void 0,zn.ContextualKeyword._module),Pe.expect.call(void 0,B.TokenType.braceL),xn.parseBlockBody.call(void 0,B.TokenType.braceR)}});var Ji=Z(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});var C=gt(),ye=St(),_=Ce(),ue=Jt(),je=Ns(),ys=nr(),z=cs();function zk(e){return(e.type===_.TokenType.name||!!(e.type&_.TokenType.IS_KEYWORD))&&e.contextualKeyword!==ye.ContextualKeyword._from}function Ln(e){let t=C.pushTypeContext.call(void 0,0);z.expect.call(void 0,e||_.TokenType.colon),Wt(),C.popTypeContext.call(void 0,t)}function th(){z.expect.call(void 0,_.TokenType.modulo),z.expectContextual.call(void 0,ye.ContextualKeyword._checks),C.eat.call(void 0,_.TokenType.parenL)&&(je.parseExpression.call(void 0),z.expect.call(void 0,_.TokenType.parenR))}function Pl(){let e=C.pushTypeContext.call(void 0,0);z.expect.call(void 0,_.TokenType.colon),C.match.call(void 0,_.TokenType.modulo)?th():(Wt(),C.match.call(void 0,_.TokenType.modulo)&&th()),C.popTypeContext.call(void 0,e)}function Xk(){C.next.call(void 0),Nl(!0)}function Yk(){C.next.call(void 0),je.parseIdentifier.call(void 0),C.match.call(void 0,_.TokenType.lessThan)&&On(),z.expect.call(void 0,_.TokenType.parenL),Al(),z.expect.call(void 0,_.TokenType.parenR),Pl(),z.semicolon.call(void 0)}function El(){C.match.call(void 0,_.TokenType._class)?Xk():C.match.call(void 0,_.TokenType._function)?Yk():C.match.call(void 0,_.TokenType._var)?Jk():z.eatContextual.call(void 0,ye.ContextualKeyword._module)?C.eat.call(void 0,_.TokenType.dot)?e0():Qk():z.isContextual.call(void 0,ye.ContextualKeyword._type)?t0():z.isContextual.call(void 0,ye.ContextualKeyword._opaque)?n0():z.isContextual.call(void 0,ye.ContextualKeyword._interface)?s0():C.match.call(void 0,_.TokenType._export)?Zk():z.unexpected.call(void 0)}function Jk(){C.next.call(void 0),ah(),z.semicolon.call(void 0)}function Qk(){for(C.match.call(void 0,_.TokenType.string)?je.parseExprAtom.call(void 0):je.parseIdentifier.call(void 0),z.expect.call(void 0,_.TokenType.braceL);!C.match.call(void 0,_.TokenType.braceR)&&!ue.state.error;)C.match.call(void 0,_.TokenType._import)?(C.next.call(void 0),ys.parseImport.call(void 0)):z.unexpected.call(void 0);z.expect.call(void 0,_.TokenType.braceR)}function Zk(){z.expect.call(void 0,_.TokenType._export),C.eat.call(void 0,_.TokenType._default)?C.match.call(void 0,_.TokenType._function)||C.match.call(void 0,_.TokenType._class)?El():(Wt(),z.semicolon.call(void 0)):C.match.call(void 0,_.TokenType._var)||C.match.call(void 0,_.TokenType._function)||C.match.call(void 0,_.TokenType._class)||z.isContextual.call(void 0,ye.ContextualKeyword._opaque)?El():C.match.call(void 0,_.TokenType.star)||C.match.call(void 0,_.TokenType.braceL)||z.isContextual.call(void 0,ye.ContextualKeyword._interface)||z.isContextual.call(void 0,ye.ContextualKeyword._type)||z.isContextual.call(void 0,ye.ContextualKeyword._opaque)?ys.parseExport.call(void 0):z.unexpected.call(void 0)}function e0(){z.expectContextual.call(void 0,ye.ContextualKeyword._exports),ki(),z.semicolon.call(void 0)}function t0(){C.next.call(void 0),Ll()}function n0(){C.next.call(void 0),Ol(!0)}function s0(){C.next.call(void 0),Nl()}function Nl(e=!1){if(So(),C.match.call(void 0,_.TokenType.lessThan)&&On(),C.eat.call(void 0,_.TokenType._extends))do bo();while(!e&&C.eat.call(void 0,_.TokenType.comma));if(z.isContextual.call(void 0,ye.ContextualKeyword._mixins)){C.next.call(void 0);do bo();while(C.eat.call(void 0,_.TokenType.comma))}if(z.isContextual.call(void 0,ye.ContextualKeyword._implements)){C.next.call(void 0);do bo();while(C.eat.call(void 0,_.TokenType.comma))}Co(e,!1,e)}function bo(){ih(!1),C.match.call(void 0,_.TokenType.lessThan)&&Rs()}function Rl(){Nl()}function So(){je.parseIdentifier.call(void 0)}function Ll(){So(),C.match.call(void 0,_.TokenType.lessThan)&&On(),Ln(_.TokenType.eq),z.semicolon.call(void 0)}function Ol(e){z.expectContextual.call(void 0,ye.ContextualKeyword._type),So(),C.match.call(void 0,_.TokenType.lessThan)&&On(),C.match.call(void 0,_.TokenType.colon)&&Ln(_.TokenType.colon),e||Ln(_.TokenType.eq),z.semicolon.call(void 0)}function i0(){Fl(),ah(),C.eat.call(void 0,_.TokenType.eq)&&Wt()}function On(){let e=C.pushTypeContext.call(void 0,0);C.match.call(void 0,_.TokenType.lessThan)||C.match.call(void 0,_.TokenType.typeParameterStart)?C.next.call(void 0):z.unexpected.call(void 0);do i0(),C.match.call(void 0,_.TokenType.greaterThan)||z.expect.call(void 0,_.TokenType.comma);while(!C.match.call(void 0,_.TokenType.greaterThan)&&!ue.state.error);z.expect.call(void 0,_.TokenType.greaterThan),C.popTypeContext.call(void 0,e)}Qe.flowParseTypeParameterDeclaration=On;function Rs(){let e=C.pushTypeContext.call(void 0,0);for(z.expect.call(void 0,_.TokenType.lessThan);!C.match.call(void 0,_.TokenType.greaterThan)&&!ue.state.error;)Wt(),C.match.call(void 0,_.TokenType.greaterThan)||z.expect.call(void 0,_.TokenType.comma);z.expect.call(void 0,_.TokenType.greaterThan),C.popTypeContext.call(void 0,e)}function r0(){if(z.expectContextual.call(void 0,ye.ContextualKeyword._interface),C.eat.call(void 0,_.TokenType._extends))do bo();while(C.eat.call(void 0,_.TokenType.comma));Co(!1,!1,!1)}function Dl(){C.match.call(void 0,_.TokenType.num)||C.match.call(void 0,_.TokenType.string)?je.parseExprAtom.call(void 0):je.parseIdentifier.call(void 0)}function o0(){C.lookaheadType.call(void 0)===_.TokenType.colon?(Dl(),Ln()):Wt(),z.expect.call(void 0,_.TokenType.bracketR),Ln()}function a0(){Dl(),z.expect.call(void 0,_.TokenType.bracketR),z.expect.call(void 0,_.TokenType.bracketR),C.match.call(void 0,_.TokenType.lessThan)||C.match.call(void 0,_.TokenType.parenL)?Ml():(C.eat.call(void 0,_.TokenType.question),Ln())}function Ml(){for(C.match.call(void 0,_.TokenType.lessThan)&&On(),z.expect.call(void 0,_.TokenType.parenL);!C.match.call(void 0,_.TokenType.parenR)&&!C.match.call(void 0,_.TokenType.ellipsis)&&!ue.state.error;)wo(),C.match.call(void 0,_.TokenType.parenR)||z.expect.call(void 0,_.TokenType.comma);C.eat.call(void 0,_.TokenType.ellipsis)&&wo(),z.expect.call(void 0,_.TokenType.parenR),Ln()}function l0(){Ml()}function Co(e,t,s){let i;for(t&&C.match.call(void 0,_.TokenType.braceBarL)?(z.expect.call(void 0,_.TokenType.braceBarL),i=_.TokenType.braceBarR):(z.expect.call(void 0,_.TokenType.braceL),i=_.TokenType.braceR);!C.match.call(void 0,i)&&!ue.state.error;){if(s&&z.isContextual.call(void 0,ye.ContextualKeyword._proto)){let r=C.lookaheadType.call(void 0);r!==_.TokenType.colon&&r!==_.TokenType.question&&(C.next.call(void 0),e=!1)}if(e&&z.isContextual.call(void 0,ye.ContextualKeyword._static)){let r=C.lookaheadType.call(void 0);r!==_.TokenType.colon&&r!==_.TokenType.question&&C.next.call(void 0)}if(Fl(),C.eat.call(void 0,_.TokenType.bracketL))C.eat.call(void 0,_.TokenType.bracketL)?a0():o0();else if(C.match.call(void 0,_.TokenType.parenL)||C.match.call(void 0,_.TokenType.lessThan))l0();else{if(z.isContextual.call(void 0,ye.ContextualKeyword._get)||z.isContextual.call(void 0,ye.ContextualKeyword._set)){let r=C.lookaheadType.call(void 0);(r===_.TokenType.name||r===_.TokenType.string||r===_.TokenType.num)&&C.next.call(void 0)}c0()}u0()}z.expect.call(void 0,i)}function c0(){if(C.match.call(void 0,_.TokenType.ellipsis)){if(z.expect.call(void 0,_.TokenType.ellipsis),C.eat.call(void 0,_.TokenType.comma)||C.eat.call(void 0,_.TokenType.semi),C.match.call(void 0,_.TokenType.braceR))return;Wt()}else Dl(),C.match.call(void 0,_.TokenType.lessThan)||C.match.call(void 0,_.TokenType.parenL)?Ml():(C.eat.call(void 0,_.TokenType.question),Ln())}function u0(){!C.eat.call(void 0,_.TokenType.semi)&&!C.eat.call(void 0,_.TokenType.comma)&&!C.match.call(void 0,_.TokenType.braceR)&&!C.match.call(void 0,_.TokenType.braceBarR)&&z.unexpected.call(void 0)}function ih(e){for(e||je.parseIdentifier.call(void 0);C.eat.call(void 0,_.TokenType.dot);)je.parseIdentifier.call(void 0)}function p0(){ih(!0),C.match.call(void 0,_.TokenType.lessThan)&&Rs()}function h0(){z.expect.call(void 0,_.TokenType._typeof),rh()}function f0(){for(z.expect.call(void 0,_.TokenType.bracketL);ue.state.pos{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});var q0=Ul(),Mt=Ji(),dt=pi(),$=gt(),ke=St(),Ts=qr(),D=Ce(),ch=Yt(),P=Jt(),De=Ns(),ks=lo(),ee=cs();function K0(){if(ql(D.TokenType.eof),P.state.scopes.push(new Ts.Scope(0,P.state.tokens.length,!0)),P.state.scopeDepth!==0)throw new Error(`Invalid scope depth at end of file: ${P.state.scopeDepth}`);return new q0.File(P.state.tokens,P.state.scopes)}kt.parseTopLevel=K0;function gn(e){P.isFlowEnabled&&Mt.flowTryParseStatement.call(void 0)||($.match.call(void 0,D.TokenType.at)&&$l(),U0(e))}kt.parseStatement=gn;function U0(e){if(P.isTypeScriptEnabled&&dt.tsTryParseStatementContent.call(void 0))return;let t=P.state.type;switch(t){case D.TokenType._break:case D.TokenType._continue:W0();return;case D.TokenType._debugger:G0();return;case D.TokenType._do:z0();return;case D.TokenType._for:X0();return;case D.TokenType._function:if($.lookaheadType.call(void 0)===D.TokenType.dot)break;e||ee.unexpected.call(void 0),Q0();return;case D.TokenType._class:e||ee.unexpected.call(void 0),Io(!0);return;case D.TokenType._if:Z0();return;case D.TokenType._return:ev();return;case D.TokenType._switch:tv();return;case D.TokenType._throw:nv();return;case D.TokenType._try:iv();return;case D.TokenType._let:case D.TokenType._const:e||ee.unexpected.call(void 0);case D.TokenType._var:Vl(t!==D.TokenType._var);return;case D.TokenType._while:rv();return;case D.TokenType.braceL:xi();return;case D.TokenType.semi:ov();return;case D.TokenType._export:case D.TokenType._import:{let r=$.lookaheadType.call(void 0);if(r===D.TokenType.parenL||r===D.TokenType.dot)break;$.next.call(void 0),t===D.TokenType._import?gh():kh();return}case D.TokenType.name:if(P.state.contextualKeyword===ke.ContextualKeyword._async){let r=P.state.start,a=P.state.snapshot();if($.next.call(void 0),$.match.call(void 0,D.TokenType._function)&&!ee.canInsertSemicolon.call(void 0)){ee.expect.call(void 0,D.TokenType._function),lr(r,!0);return}else P.state.restoreFromSnapshot(a)}else if(P.state.contextualKeyword===ke.ContextualKeyword._using&&!ee.hasFollowingLineBreak.call(void 0)&&$.lookaheadType.call(void 0)===D.TokenType.name){Vl(!0);return}default:break}let s=P.state.tokens.length;De.parseExpression.call(void 0);let i=null;if(P.state.tokens.length===s+1){let r=P.state.tokens[P.state.tokens.length-1];r.type===D.TokenType.name&&(i=r.contextualKeyword)}if(i==null){ee.semicolon.call(void 0);return}$.eat.call(void 0,D.TokenType.colon)?av():lv(i)}function $l(){for(;$.match.call(void 0,D.TokenType.at);)hh()}kt.parseDecorators=$l;function hh(){if($.next.call(void 0),$.eat.call(void 0,D.TokenType.parenL))De.parseExpression.call(void 0),ee.expect.call(void 0,D.TokenType.parenR);else{for(De.parseIdentifier.call(void 0);$.eat.call(void 0,D.TokenType.dot);)De.parseIdentifier.call(void 0);H0()}}function H0(){P.isTypeScriptEnabled?dt.tsParseMaybeDecoratorArguments.call(void 0):fh()}function fh(){$.eat.call(void 0,D.TokenType.parenL)&&De.parseCallExpressionArguments.call(void 0)}kt.baseParseMaybeDecoratorArguments=fh;function W0(){$.next.call(void 0),ee.isLineTerminator.call(void 0)||(De.parseIdentifier.call(void 0),ee.semicolon.call(void 0))}function G0(){$.next.call(void 0),ee.semicolon.call(void 0)}function z0(){$.next.call(void 0),gn(!1),ee.expect.call(void 0,D.TokenType._while),De.parseParenExpression.call(void 0),$.eat.call(void 0,D.TokenType.semi)}function X0(){P.state.scopeDepth++;let e=P.state.tokens.length;J0();let t=P.state.tokens.length;P.state.scopes.push(new Ts.Scope(e,t,!1)),P.state.scopeDepth--}function Y0(){return!(!ee.isContextual.call(void 0,ke.ContextualKeyword._using)||ee.isLookaheadContextual.call(void 0,ke.ContextualKeyword._of))}function J0(){$.next.call(void 0);let e=!1;if(ee.isContextual.call(void 0,ke.ContextualKeyword._await)&&(e=!0,$.next.call(void 0)),ee.expect.call(void 0,D.TokenType.parenL),$.match.call(void 0,D.TokenType.semi)){e&&ee.unexpected.call(void 0),Bl();return}if($.match.call(void 0,D.TokenType._var)||$.match.call(void 0,D.TokenType._let)||$.match.call(void 0,D.TokenType._const)||Y0()){if($.next.call(void 0),dh(!0,P.state.type!==D.TokenType._var),$.match.call(void 0,D.TokenType._in)||ee.isContextual.call(void 0,ke.ContextualKeyword._of)){uh(e);return}Bl();return}if(De.parseExpression.call(void 0,!0),$.match.call(void 0,D.TokenType._in)||ee.isContextual.call(void 0,ke.ContextualKeyword._of)){uh(e);return}e&&ee.unexpected.call(void 0),Bl()}function Q0(){let e=P.state.start;$.next.call(void 0),lr(e,!0)}function Z0(){$.next.call(void 0),De.parseParenExpression.call(void 0),gn(!1),$.eat.call(void 0,D.TokenType._else)&&gn(!1)}function ev(){$.next.call(void 0),ee.isLineTerminator.call(void 0)||(De.parseExpression.call(void 0),ee.semicolon.call(void 0))}function tv(){$.next.call(void 0),De.parseParenExpression.call(void 0),P.state.scopeDepth++;let e=P.state.tokens.length;for(ee.expect.call(void 0,D.TokenType.braceL);!$.match.call(void 0,D.TokenType.braceR)&&!P.state.error;)if($.match.call(void 0,D.TokenType._case)||$.match.call(void 0,D.TokenType._default)){let s=$.match.call(void 0,D.TokenType._case);$.next.call(void 0),s&&De.parseExpression.call(void 0),ee.expect.call(void 0,D.TokenType.colon)}else gn(!0);$.next.call(void 0);let t=P.state.tokens.length;P.state.scopes.push(new Ts.Scope(e,t,!1)),P.state.scopeDepth--}function nv(){$.next.call(void 0),De.parseExpression.call(void 0),ee.semicolon.call(void 0)}function sv(){ks.parseBindingAtom.call(void 0,!0),P.isTypeScriptEnabled&&dt.tsTryParseTypeAnnotation.call(void 0)}function iv(){if($.next.call(void 0),xi(),$.match.call(void 0,D.TokenType._catch)){$.next.call(void 0);let e=null;if($.match.call(void 0,D.TokenType.parenL)&&(P.state.scopeDepth++,e=P.state.tokens.length,ee.expect.call(void 0,D.TokenType.parenL),sv(),ee.expect.call(void 0,D.TokenType.parenR)),xi(),e!=null){let t=P.state.tokens.length;P.state.scopes.push(new Ts.Scope(e,t,!1)),P.state.scopeDepth--}}$.eat.call(void 0,D.TokenType._finally)&&xi()}function Vl(e){$.next.call(void 0),dh(!1,e),ee.semicolon.call(void 0)}kt.parseVarStatement=Vl;function rv(){$.next.call(void 0),De.parseParenExpression.call(void 0),gn(!1)}function ov(){$.next.call(void 0)}function av(){gn(!0)}function lv(e){P.isTypeScriptEnabled?dt.tsParseIdentifierStatement.call(void 0,e):P.isFlowEnabled?Mt.flowParseIdentifierStatement.call(void 0,e):ee.semicolon.call(void 0)}function xi(e=!1,t=0){let s=P.state.tokens.length;P.state.scopeDepth++,ee.expect.call(void 0,D.TokenType.braceL),t&&(P.state.tokens[P.state.tokens.length-1].contextId=t),ql(D.TokenType.braceR),t&&(P.state.tokens[P.state.tokens.length-1].contextId=t);let i=P.state.tokens.length;P.state.scopes.push(new Ts.Scope(s,i,e)),P.state.scopeDepth--}kt.parseBlock=xi;function ql(e){for(;!$.eat.call(void 0,e)&&!P.state.error;)gn(!0)}kt.parseBlockBody=ql;function Bl(){ee.expect.call(void 0,D.TokenType.semi),$.match.call(void 0,D.TokenType.semi)||De.parseExpression.call(void 0),ee.expect.call(void 0,D.TokenType.semi),$.match.call(void 0,D.TokenType.parenR)||De.parseExpression.call(void 0),ee.expect.call(void 0,D.TokenType.parenR),gn(!1)}function uh(e){e?ee.eatContextual.call(void 0,ke.ContextualKeyword._of):$.next.call(void 0),De.parseExpression.call(void 0),ee.expect.call(void 0,D.TokenType.parenR),gn(!1)}function dh(e,t){for(;;){if(cv(t),$.eat.call(void 0,D.TokenType.eq)){let s=P.state.tokens.length-1;De.parseMaybeAssign.call(void 0,e),P.state.tokens[s].rhsEndIndex=P.state.tokens.length}if(!$.eat.call(void 0,D.TokenType.comma))break}}function cv(e){ks.parseBindingAtom.call(void 0,e),P.isTypeScriptEnabled?dt.tsAfterParseVarHead.call(void 0):P.isFlowEnabled&&Mt.flowAfterParseVarHead.call(void 0)}function lr(e,t,s=!1){$.match.call(void 0,D.TokenType.star)&&$.next.call(void 0),t&&!s&&!$.match.call(void 0,D.TokenType.name)&&!$.match.call(void 0,D.TokenType._yield)&&ee.unexpected.call(void 0);let i=null;$.match.call(void 0,D.TokenType.name)&&(t||(i=P.state.tokens.length,P.state.scopeDepth++),ks.parseBindingIdentifier.call(void 0,!1));let r=P.state.tokens.length;P.state.scopeDepth++,mh(),De.parseFunctionBodyAndFinish.call(void 0,e);let a=P.state.tokens.length;P.state.scopes.push(new Ts.Scope(r,a,!0)),P.state.scopeDepth--,i!==null&&(P.state.scopes.push(new Ts.Scope(i,a,!0)),P.state.scopeDepth--)}kt.parseFunction=lr;function mh(e=!1,t=0){P.isTypeScriptEnabled?dt.tsStartParseFunctionParams.call(void 0):P.isFlowEnabled&&Mt.flowStartParseFunctionParams.call(void 0),ee.expect.call(void 0,D.TokenType.parenL),t&&(P.state.tokens[P.state.tokens.length-1].contextId=t),ks.parseBindingList.call(void 0,D.TokenType.parenR,!1,!1,e,t),t&&(P.state.tokens[P.state.tokens.length-1].contextId=t)}kt.parseFunctionParams=mh;function Io(e,t=!1){let s=P.getNextContextId.call(void 0);$.next.call(void 0),P.state.tokens[P.state.tokens.length-1].contextId=s,P.state.tokens[P.state.tokens.length-1].isExpression=!e;let i=null;e||(i=P.state.tokens.length,P.state.scopeDepth++),fv(e,t),dv();let r=P.state.tokens.length;if(uv(s),!P.state.error&&(P.state.tokens[r].contextId=s,P.state.tokens[P.state.tokens.length-1].contextId=s,i!==null)){let a=P.state.tokens.length;P.state.scopes.push(new Ts.Scope(i,a,!1)),P.state.scopeDepth--}}kt.parseClass=Io;function yh(){return $.match.call(void 0,D.TokenType.eq)||$.match.call(void 0,D.TokenType.semi)||$.match.call(void 0,D.TokenType.braceR)||$.match.call(void 0,D.TokenType.bang)||$.match.call(void 0,D.TokenType.colon)}function Th(){return $.match.call(void 0,D.TokenType.parenL)||$.match.call(void 0,D.TokenType.lessThan)}function uv(e){for(ee.expect.call(void 0,D.TokenType.braceL);!$.eat.call(void 0,D.TokenType.braceR)&&!P.state.error;){if($.eat.call(void 0,D.TokenType.semi))continue;if($.match.call(void 0,D.TokenType.at)){hh();continue}let t=P.state.start;pv(t,e)}}function pv(e,t){P.isTypeScriptEnabled&&dt.tsParseModifiers.call(void 0,[ke.ContextualKeyword._declare,ke.ContextualKeyword._public,ke.ContextualKeyword._protected,ke.ContextualKeyword._private,ke.ContextualKeyword._override]);let s=!1;if($.match.call(void 0,D.TokenType.name)&&P.state.contextualKeyword===ke.ContextualKeyword._static){if(De.parseIdentifier.call(void 0),Th()){or(e,!1);return}else if(yh()){ar();return}if(P.state.tokens[P.state.tokens.length-1].type=D.TokenType._static,s=!0,$.match.call(void 0,D.TokenType.braceL)){P.state.tokens[P.state.tokens.length-1].contextId=t,xi();return}}hv(e,s,t)}function hv(e,t,s){if(P.isTypeScriptEnabled&&dt.tsTryParseClassMemberWithIsStatic.call(void 0,t))return;if($.eat.call(void 0,D.TokenType.star)){vi(s),or(e,!1);return}vi(s);let i=!1,r=P.state.tokens[P.state.tokens.length-1];r.contextualKeyword===ke.ContextualKeyword._constructor&&(i=!0),jl(),Th()?or(e,i):yh()?ar():r.contextualKeyword===ke.ContextualKeyword._async&&!ee.isLineTerminator.call(void 0)?(P.state.tokens[P.state.tokens.length-1].type=D.TokenType._async,$.match.call(void 0,D.TokenType.star)&&$.next.call(void 0),vi(s),jl(),or(e,!1)):(r.contextualKeyword===ke.ContextualKeyword._get||r.contextualKeyword===ke.ContextualKeyword._set)&&!(ee.isLineTerminator.call(void 0)&&$.match.call(void 0,D.TokenType.star))?(r.contextualKeyword===ke.ContextualKeyword._get?P.state.tokens[P.state.tokens.length-1].type=D.TokenType._get:P.state.tokens[P.state.tokens.length-1].type=D.TokenType._set,vi(s),or(e,!1)):r.contextualKeyword===ke.ContextualKeyword._accessor&&!ee.isLineTerminator.call(void 0)?(vi(s),ar()):ee.isLineTerminator.call(void 0)?ar():ee.unexpected.call(void 0)}function or(e,t){P.isTypeScriptEnabled?dt.tsTryParseTypeParameters.call(void 0):P.isFlowEnabled&&$.match.call(void 0,D.TokenType.lessThan)&&Mt.flowParseTypeParameterDeclaration.call(void 0),De.parseMethod.call(void 0,e,t)}function vi(e){De.parsePropertyName.call(void 0,e)}kt.parseClassPropertyName=vi;function jl(){if(P.isTypeScriptEnabled){let e=$.pushTypeContext.call(void 0,0);$.eat.call(void 0,D.TokenType.question),$.popTypeContext.call(void 0,e)}}kt.parsePostMemberNameModifiers=jl;function ar(){if(P.isTypeScriptEnabled?($.eatTypeToken.call(void 0,D.TokenType.bang),dt.tsTryParseTypeAnnotation.call(void 0)):P.isFlowEnabled&&$.match.call(void 0,D.TokenType.colon)&&Mt.flowParseTypeAnnotation.call(void 0),$.match.call(void 0,D.TokenType.eq)){let e=P.state.tokens.length;$.next.call(void 0),De.parseMaybeAssign.call(void 0),P.state.tokens[e].rhsEndIndex=P.state.tokens.length}ee.semicolon.call(void 0)}kt.parseClassProperty=ar;function fv(e,t=!1){P.isTypeScriptEnabled&&(!e||t)&&ee.isContextual.call(void 0,ke.ContextualKeyword._implements)||($.match.call(void 0,D.TokenType.name)&&ks.parseBindingIdentifier.call(void 0,!0),P.isTypeScriptEnabled?dt.tsTryParseTypeParameters.call(void 0):P.isFlowEnabled&&$.match.call(void 0,D.TokenType.lessThan)&&Mt.flowParseTypeParameterDeclaration.call(void 0))}function dv(){let e=!1;$.eat.call(void 0,D.TokenType._extends)?(De.parseExprSubscripts.call(void 0),e=!0):e=!1,P.isTypeScriptEnabled?dt.tsAfterParseClassSuper.call(void 0,e):P.isFlowEnabled&&Mt.flowAfterParseClassSuper.call(void 0,e)}function kh(){let e=P.state.tokens.length-1;P.isTypeScriptEnabled&&dt.tsTryParseExport.call(void 0)||(kv()?vv():Tv()?(De.parseIdentifier.call(void 0),$.match.call(void 0,D.TokenType.comma)&&$.lookaheadType.call(void 0)===D.TokenType.star?(ee.expect.call(void 0,D.TokenType.comma),ee.expect.call(void 0,D.TokenType.star),ee.expectContextual.call(void 0,ke.ContextualKeyword._as),De.parseIdentifier.call(void 0)):vh(),cr()):$.eat.call(void 0,D.TokenType._default)?mv():gv()?yv():(Kl(),cr()),P.state.tokens[e].rhsEndIndex=P.state.tokens.length)}kt.parseExport=kh;function mv(){if(P.isTypeScriptEnabled&&dt.tsTryParseExportDefaultExpression.call(void 0)||P.isFlowEnabled&&Mt.flowTryParseExportDefaultExpression.call(void 0))return;let e=P.state.start;$.eat.call(void 0,D.TokenType._function)?lr(e,!0,!0):ee.isContextual.call(void 0,ke.ContextualKeyword._async)&&$.lookaheadType.call(void 0)===D.TokenType._function?(ee.eatContextual.call(void 0,ke.ContextualKeyword._async),$.eat.call(void 0,D.TokenType._function),lr(e,!0,!0)):$.match.call(void 0,D.TokenType._class)?Io(!0,!0):$.match.call(void 0,D.TokenType.at)?($l(),Io(!0,!0)):(De.parseMaybeAssign.call(void 0),ee.semicolon.call(void 0))}function yv(){P.isTypeScriptEnabled?dt.tsParseExportDeclaration.call(void 0):P.isFlowEnabled?Mt.flowParseExportDeclaration.call(void 0):gn(!0)}function Tv(){if(P.isTypeScriptEnabled&&dt.tsIsDeclarationStart.call(void 0))return!1;if(P.isFlowEnabled&&Mt.flowShouldDisallowExportDefaultSpecifier.call(void 0))return!1;if($.match.call(void 0,D.TokenType.name))return P.state.contextualKeyword!==ke.ContextualKeyword._async;if(!$.match.call(void 0,D.TokenType._default))return!1;let e=$.nextTokenStart.call(void 0),t=$.lookaheadTypeAndKeyword.call(void 0),s=t.type===D.TokenType.name&&t.contextualKeyword===ke.ContextualKeyword._from;if(t.type===D.TokenType.comma)return!0;if(s){let i=P.input.charCodeAt($.nextTokenStartSince.call(void 0,e+4));return i===ch.charCodes.quotationMark||i===ch.charCodes.apostrophe}return!1}function vh(){$.eat.call(void 0,D.TokenType.comma)&&Kl()}function cr(){ee.eatContextual.call(void 0,ke.ContextualKeyword._from)&&(De.parseExprAtom.call(void 0),_h()),ee.semicolon.call(void 0)}kt.parseExportFrom=cr;function kv(){return P.isFlowEnabled?Mt.flowShouldParseExportStar.call(void 0):$.match.call(void 0,D.TokenType.star)}function vv(){P.isFlowEnabled?Mt.flowParseExportStar.call(void 0):xh()}function xh(){ee.expect.call(void 0,D.TokenType.star),ee.isContextual.call(void 0,ke.ContextualKeyword._as)?xv():cr()}kt.baseParseExportStar=xh;function xv(){$.next.call(void 0),P.state.tokens[P.state.tokens.length-1].type=D.TokenType._as,De.parseIdentifier.call(void 0),vh(),cr()}function gv(){return P.isTypeScriptEnabled&&dt.tsIsDeclarationStart.call(void 0)||P.isFlowEnabled&&Mt.flowShouldParseExportDeclaration.call(void 0)||P.state.type===D.TokenType._var||P.state.type===D.TokenType._const||P.state.type===D.TokenType._let||P.state.type===D.TokenType._function||P.state.type===D.TokenType._class||ee.isContextual.call(void 0,ke.ContextualKeyword._async)||$.match.call(void 0,D.TokenType.at)}function Kl(){let e=!0;for(ee.expect.call(void 0,D.TokenType.braceL);!$.eat.call(void 0,D.TokenType.braceR)&&!P.state.error;){if(e)e=!1;else if(ee.expect.call(void 0,D.TokenType.comma),$.eat.call(void 0,D.TokenType.braceR))break;_v()}}kt.parseExportSpecifiers=Kl;function _v(){if(P.isTypeScriptEnabled){dt.tsParseExportSpecifier.call(void 0);return}De.parseIdentifier.call(void 0),P.state.tokens[P.state.tokens.length-1].identifierRole=$.IdentifierRole.ExportAccess,ee.eatContextual.call(void 0,ke.ContextualKeyword._as)&&De.parseIdentifier.call(void 0)}function bv(){let e=P.state.snapshot();return ee.expectContextual.call(void 0,ke.ContextualKeyword._module),ee.eatContextual.call(void 0,ke.ContextualKeyword._from)?ee.isContextual.call(void 0,ke.ContextualKeyword._from)?(P.state.restoreFromSnapshot(e),!0):(P.state.restoreFromSnapshot(e),!1):$.match.call(void 0,D.TokenType.comma)?(P.state.restoreFromSnapshot(e),!1):(P.state.restoreFromSnapshot(e),!0)}function Cv(){ee.isContextual.call(void 0,ke.ContextualKeyword._module)&&bv()&&$.next.call(void 0)}function gh(){if(P.isTypeScriptEnabled&&$.match.call(void 0,D.TokenType.name)&&$.lookaheadType.call(void 0)===D.TokenType.eq){dt.tsParseImportEqualsDeclaration.call(void 0);return}if(P.isTypeScriptEnabled&&ee.isContextual.call(void 0,ke.ContextualKeyword._type)){let e=$.lookaheadTypeAndKeyword.call(void 0);if(e.type===D.TokenType.name&&e.contextualKeyword!==ke.ContextualKeyword._from){if(ee.expectContextual.call(void 0,ke.ContextualKeyword._type),$.lookaheadType.call(void 0)===D.TokenType.eq){dt.tsParseImportEqualsDeclaration.call(void 0);return}}else(e.type===D.TokenType.star||e.type===D.TokenType.braceL)&&ee.expectContextual.call(void 0,ke.ContextualKeyword._type)}$.match.call(void 0,D.TokenType.string)||(Cv(),Sv(),ee.expectContextual.call(void 0,ke.ContextualKeyword._from)),De.parseExprAtom.call(void 0),_h(),ee.semicolon.call(void 0)}kt.parseImport=gh;function wv(){return $.match.call(void 0,D.TokenType.name)}function ph(){ks.parseImportedIdentifier.call(void 0)}function Sv(){P.isFlowEnabled&&Mt.flowStartParseImportSpecifiers.call(void 0);let e=!0;if(!(wv()&&(ph(),!$.eat.call(void 0,D.TokenType.comma)))){if($.match.call(void 0,D.TokenType.star)){$.next.call(void 0),ee.expectContextual.call(void 0,ke.ContextualKeyword._as),ph();return}for(ee.expect.call(void 0,D.TokenType.braceL);!$.eat.call(void 0,D.TokenType.braceR)&&!P.state.error;){if(e)e=!1;else if($.eat.call(void 0,D.TokenType.colon)&&ee.unexpected.call(void 0,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),ee.expect.call(void 0,D.TokenType.comma),$.eat.call(void 0,D.TokenType.braceR))break;Iv()}}}function Iv(){if(P.isTypeScriptEnabled){dt.tsParseImportSpecifier.call(void 0);return}if(P.isFlowEnabled){Mt.flowParseImportSpecifier.call(void 0);return}ks.parseImportedIdentifier.call(void 0),ee.isContextual.call(void 0,ke.ContextualKeyword._as)&&(P.state.tokens[P.state.tokens.length-1].identifierRole=$.IdentifierRole.ImportAccess,$.next.call(void 0),ks.parseImportedIdentifier.call(void 0))}function _h(){ee.isContextual.call(void 0,ke.ContextualKeyword._assert)&&!ee.hasPrecedingLineBreak.call(void 0)&&($.next.call(void 0),De.parseObj.call(void 0,!1,!1))}});var wh=Z(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var bh=gt(),Ch=Yt(),Hl=Jt(),Ev=nr();function Av(){return Hl.state.pos===0&&Hl.input.charCodeAt(0)===Ch.charCodes.numberSign&&Hl.input.charCodeAt(1)===Ch.charCodes.exclamationMark&&bh.skipLineComment.call(void 0,2),bh.nextToken.call(void 0),Ev.parseTopLevel.call(void 0)}Wl.parseFile=Av});var Ul=Z(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var Eo=Jt(),Pv=wh(),Gl=class{constructor(t,s){this.tokens=t,this.scopes=s}};Ao.File=Gl;function Nv(e,t,s,i){if(i&&s)throw new Error("Cannot combine flow and typescript plugins.");Eo.initParser.call(void 0,e,t,s,i);let r=Pv.parseFile.call(void 0);if(Eo.state.error)throw Eo.augmentError.call(void 0,Eo.state.error);return r}Ao.parse=Nv});var Sh=Z(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Rv=St();function Lv(e){let t=e.currentIndex(),s=0,i=e.currentToken();do{let r=e.tokens[t];if(r.isOptionalChainStart&&s++,r.isOptionalChainEnd&&s--,s+=r.numNullishCoalesceStarts,s-=r.numNullishCoalesceEnds,r.contextualKeyword===Rv.ContextualKeyword._await&&r.identifierRole==null&&r.scopeDepth===i.scopeDepth)return!0;t+=1}while(s>0&&t{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});function Ov(e){return e&&e.__esModule?e:{default:e}}var Po=Ce(),Dv=Sh(),Mv=Ov(Dv),Xl=class e{__init(){this.resultCode=""}__init2(){this.resultMappings=new Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,s,i,r,a){this.code=t,this.tokens=s,this.isFlowEnabled=i,this.disableESTransforms=r,this.helperManager=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(t){this.resultCode=t.resultCode,this.tokenIndex=t.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(t){let s=this.resultCode.slice(t.resultCode.length);return this.resultCode=t.resultCode,s}reset(){this.resultCode="",this.resultMappings=new Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(t,s){return this.matches1AtIndex(t,Po.TokenType.name)&&this.tokens[t].contextualKeyword===s}identifierNameAtIndex(t){return this.identifierNameForToken(this.tokens[t])}identifierNameAtRelativeIndex(t){return this.identifierNameForToken(this.tokenAtRelativeIndex(t))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(t){return this.code.slice(t.start,t.end)}rawCodeForToken(t){return this.code.slice(t.start,t.end)}stringValueAtIndex(t){return this.stringValueForToken(this.tokens[t])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(t){return this.code.slice(t.start+1,t.end-1)}matches1AtIndex(t,s){return this.tokens[t].type===s}matches2AtIndex(t,s,i){return this.tokens[t].type===s&&this.tokens[t+1].type===i}matches3AtIndex(t,s,i,r){return this.tokens[t].type===s&&this.tokens[t+1].type===i&&this.tokens[t+2].type===r}matches1(t){return this.tokens[this.tokenIndex].type===t}matches2(t,s){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===s}matches3(t,s,i){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===s&&this.tokens[this.tokenIndex+2].type===i}matches4(t,s,i,r){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===s&&this.tokens[this.tokenIndex+2].type===i&&this.tokens[this.tokenIndex+3].type===r}matches5(t,s,i,r,a){return this.tokens[this.tokenIndex].type===t&&this.tokens[this.tokenIndex+1].type===s&&this.tokens[this.tokenIndex+2].type===i&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===a}matchesContextual(t){return this.matchesContextualAtIndex(this.tokenIndex,t)}matchesContextIdAndLabel(t,s){return this.matches1(t)&&this.currentToken().contextId===s}previousWhitespaceAndComments(){let t=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex0&&this.tokenAtRelativeIndex(-1).type===Po.TokenType._delete?t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChainDelete"):this.resultCode+=this.helperManager.getHelperName("optionalChainDelete"):t.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName("asyncOptionalChain"):this.resultCode+=this.helperManager.getHelperName("optionalChain"),this.resultCode+="([")}}appendTokenSuffix(){let t=this.currentToken();if(t.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+="])"),t.numNullishCoalesceEnds&&!this.disableESTransforms)for(let s=0;s{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var Eh=St(),Ne=Ce();function Fv(e,t,s,i){let r=t.snapshot(),a=Bv(t),u=[],d=[],y=[],g=null,L=[],p=[],h=t.currentToken().contextId;if(h==null)throw new Error("Expected non-null class context ID on class open-brace.");for(t.nextToken();!t.matchesContextIdAndLabel(Ne.TokenType.braceR,h);)if(t.matchesContextual(Eh.ContextualKeyword._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:u,constructorInsertPos:g}=Ah(t));else if(t.matches1(Ne.TokenType.semi))i||p.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let T=t.currentIndex(),x=!1,w=!1,S=!1;for(;No(t.currentToken());)t.matches1(Ne.TokenType._static)&&(x=!0),t.matches1(Ne.TokenType.hash)&&(w=!0),(t.matches1(Ne.TokenType._declare)||t.matches1(Ne.TokenType._abstract))&&(S=!0),t.nextToken();if(x&&t.matches1(Ne.TokenType.braceL)){Jl(t,h);continue}if(w){Jl(t,h);continue}if(t.matchesContextual(Eh.ContextualKeyword._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:u,constructorInsertPos:g}=Ah(t));continue}let A=t.currentIndex();if(Vv(t),t.matches1(Ne.TokenType.lessThan)||t.matches1(Ne.TokenType.parenL)){Jl(t,h);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(Ne.TokenType.eq)){let U=t.currentIndex(),M=t.currentToken().rhsEndIndex;if(M==null)throw new Error("Expected rhsEndIndex on class field assignment.");for(t.nextToken();t.currentIndex(){"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var Nh=Ce();function jv(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(Nh.TokenType.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(Nh.TokenType.dot);)e.removeToken(),e.removeToken()}Zl.default=jv});var tc=Z(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var $v=gt(),qv=Ce(),Kv={typeDeclarations:new Set,valueDeclarations:new Set};Ro.EMPTY_DECLARATION_INFO=Kv;function Uv(e){let t=new Set,s=new Set;for(let i=0;i{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var Hv=St(),Rh=Ce();function Wv(e){e.matches2(Rh.TokenType.name,Rh.TokenType.braceL)&&e.matchesContextual(Hv.ContextualKeyword._assert)&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}nc.removeMaybeImportAssertion=Wv});var rc=Z(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var Lh=Ce();function Gv(e,t,s){if(!e)return!1;let i=t.currentToken();if(i.rhsEndIndex==null)throw new Error("Expected non-null rhsEndIndex on export token.");let r=i.rhsEndIndex-t.currentIndex();if(r!==3&&!(r===4&&t.matches1AtIndex(i.rhsEndIndex-1,Lh.TokenType.semi)))return!1;let a=t.tokenAtRelativeIndex(2);if(a.type!==Lh.TokenType.name)return!1;let u=t.identifierNameForToken(a);return s.typeDeclarations.has(u)&&!s.valueDeclarations.has(u)}ic.default=Gv});var Dh=Z(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});function ur(e){return e&&e.__esModule?e:{default:e}}var Lo=gt(),Ls=St(),N=Ce(),zv=ec(),Xv=ur(zv),Oh=tc(),Yv=ur(Oh),Jv=Wi(),Qv=ur(Jv),Oo=sc(),Zv=rc(),ex=ur(Zv),tx=un(),nx=ur(tx),oc=class e extends nx.default{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,s,i,r,a,u,d,y,g,L){super(),this.rootTransformer=t,this.tokens=s,this.importProcessor=i,this.nameManager=r,this.helperManager=a,this.reactHotLoaderTransformer=u,this.enableLegacyBabel5ModuleInterop=d,this.enableLegacyTypeScriptModuleInterop=y,this.isTypeScriptTransformEnabled=g,this.preserveDynamicImport=L,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=g?Yv.default.call(void 0,s):Oh.EMPTY_DECLARATION_INFO}getPrefixCode(){let t="";return this.hadExport&&(t+='Object.defineProperty(exports, "__esModule", {value: true});'),t}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`
+module.exports = exports.default;
+`:""}process(){return this.tokens.matches3(N.TokenType._import,N.TokenType.name,N.TokenType.eq)?this.processImportEquals():this.tokens.matches1(N.TokenType._import)?(this.processImport(),!0):this.tokens.matches2(N.TokenType._export,N.TokenType.eq)?(this.tokens.replaceToken("module.exports"),!0):this.tokens.matches1(N.TokenType._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(N.TokenType.name,N.TokenType.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(N.TokenType.name)||this.tokens.matches1(N.TokenType.jsxName)?this.processIdentifier():this.tokens.matches1(N.TokenType.eq)?this.processAssignment():this.tokens.matches1(N.TokenType.assign)?this.processComplexAssignment():this.tokens.matches1(N.TokenType.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.isTypeName(t)?Xv.default.call(void 0,this.tokens):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(N.TokenType._import,N.TokenType.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let s=this.enableLegacyTypeScriptModuleInterop?"":`${this.helperManager.getHelperName("interopRequireWildcard")}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${s}require`);let i=this.tokens.currentToken().contextId;if(i==null)throw new Error("Expected context ID on dynamic import invocation.");for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(N.TokenType.parenR,i);)this.rootTransformer.processToken();this.tokens.replaceToken(s?")))":"))");return}if(this.removeImportAndDetectIfType())this.tokens.removeToken();else{let s=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(s)),this.tokens.appendCode(this.importProcessor.claimImportCode(s))}Oo.removeMaybeImportAssertion.call(void 0,this.tokens),this.tokens.matches1(N.TokenType.semi)&&this.tokens.removeToken()}removeImportAndDetectIfType(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(Ls.ContextualKeyword._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,N.TokenType.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Ls.ContextualKeyword._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(N.TokenType.name)||this.tokens.matches1(N.TokenType.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(N.TokenType.string))return!1;let t=!1;for(;!this.tokens.matches1(N.TokenType.string);)(!t&&this.tokens.matches1(N.TokenType.braceL)||this.tokens.matches1(N.TokenType.comma))&&(this.tokens.removeToken(),(this.tokens.matches2(N.TokenType.name,N.TokenType.comma)||this.tokens.matches2(N.TokenType.name,N.TokenType.braceR)||this.tokens.matches4(N.TokenType.name,N.TokenType.name,N.TokenType.name,N.TokenType.comma)||this.tokens.matches4(N.TokenType.name,N.TokenType.name,N.TokenType.name,N.TokenType.braceR))&&(t=!0)),this.tokens.removeToken();return!t}removeRemainingImport(){for(;!this.tokens.matches1(N.TokenType.string);)this.tokens.removeToken()}processIdentifier(){let t=this.tokens.currentToken();if(t.shadowsGlobal)return!1;if(t.identifierRole===Lo.IdentifierRole.ObjectShorthand)return this.processObjectShorthand();if(t.identifierRole!==Lo.IdentifierRole.Access)return!1;let s=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(t));if(!s)return!1;let i=this.tokens.currentIndex()+1;for(;i=2&&this.tokens.matches1AtIndex(t-2,N.TokenType.dot)||t>=2&&[N.TokenType._var,N.TokenType._let,N.TokenType._const].includes(this.tokens.tokens[t-2].type))return!1;let i=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(s));return i?(this.tokens.copyToken(),this.tokens.appendCode(` ${i} =`),!0):!1}processComplexAssignment(){let t=this.tokens.currentIndex(),s=this.tokens.tokens[t-1];if(s.type!==N.TokenType.name||s.shadowsGlobal||t>=2&&this.tokens.matches1AtIndex(t-2,N.TokenType.dot))return!1;let i=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(s));return i?(this.tokens.appendCode(` = ${i}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let t=this.tokens.currentIndex(),s=this.tokens.tokens[t+1];if(s.type!==N.TokenType.name||s.shadowsGlobal||t+2=1&&this.tokens.matches1AtIndex(t-1,N.TokenType.dot))return!1;let r=this.tokens.identifierNameForToken(s),a=this.importProcessor.resolveExportBinding(r);if(!a)return!1;let u=this.tokens.rawCodeForToken(i),d=this.importProcessor.getIdentifierReplacement(r)||r;if(u==="++")this.tokens.replaceToken(`(${d} = ${a} = ${d} + 1, ${d} - 1)`);else if(u==="--")this.tokens.replaceToken(`(${d} = ${a} = ${d} - 1, ${d} + 1)`);else throw new Error(`Unexpected operator: ${u}`);return this.tokens.removeToken(),!0}processExportDefault(){if(this.tokens.matches4(N.TokenType._export,N.TokenType._default,N.TokenType._function,N.TokenType.name)||this.tokens.matches5(N.TokenType._export,N.TokenType._default,N.TokenType.name,N.TokenType._function,N.TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Ls.ContextualKeyword._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let t=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${t};`)}else if(this.tokens.matches4(N.TokenType._export,N.TokenType._default,N.TokenType._class,N.TokenType.name)||this.tokens.matches5(N.TokenType._export,N.TokenType._default,N.TokenType._abstract,N.TokenType._class,N.TokenType.name)||this.tokens.matches3(N.TokenType._export,N.TokenType._default,N.TokenType.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(N.TokenType._abstract)&&this.tokens.removeToken();let t=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${t};`)}else if(ex.default.call(void 0,this.isTypeScriptTransformEnabled,this.tokens,this.declarationInfo))this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let t=this.nameManager.claimFreeName("_default");this.tokens.replaceToken(`let ${t}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${t} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(t)}else this.tokens.replaceToken("exports."),this.tokens.copyToken(),this.tokens.appendCode(" =")}copyDecorators(){for(;this.tokens.matches1(N.TokenType.at);)if(this.tokens.copyToken(),this.tokens.matches1(N.TokenType.parenL))this.tokens.copyExpectedToken(N.TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(N.TokenType.parenR);else{for(this.tokens.copyExpectedToken(N.TokenType.name);this.tokens.matches1(N.TokenType.dot);)this.tokens.copyExpectedToken(N.TokenType.dot),this.tokens.copyExpectedToken(N.TokenType.name);this.tokens.matches1(N.TokenType.parenL)&&(this.tokens.copyExpectedToken(N.TokenType.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(N.TokenType.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let t=this.tokens.currentIndex();if(t++,t++,!this.tokens.matches1AtIndex(t,N.TokenType.name))return!1;for(t++;t{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});function pr(e){return e&&e.__esModule?e:{default:e}}var Jn=St(),se=Ce(),sx=ec(),ix=pr(sx),Bh=tc(),rx=pr(Bh),ox=Wi(),Mh=pr(ox),ax=Fa(),Fh=sc(),lx=rc(),cx=pr(lx),ux=un(),px=pr(ux),lc=class extends px.default{constructor(t,s,i,r,a,u){super(),this.tokens=t,this.nameManager=s,this.helperManager=i,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=a,this.nonTypeIdentifiers=a?ax.getNonTypeIdentifiers.call(void 0,t,u):new Set,this.declarationInfo=a?rx.default.call(void 0,t):Bh.EMPTY_DECLARATION_INFO,this.injectCreateRequireForImportRequire=!!u.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(se.TokenType._import,se.TokenType.name,se.TokenType.eq))return this.processImportEquals();if(this.tokens.matches4(se.TokenType._import,se.TokenType.name,se.TokenType.name,se.TokenType.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Jn.ContextualKeyword._type)){this.tokens.removeInitialToken();for(let t=0;t<7;t++)this.tokens.removeToken();return!0}if(this.tokens.matches2(se.TokenType._export,se.TokenType.eq))return this.tokens.replaceToken("module.exports"),!0;if(this.tokens.matches5(se.TokenType._export,se.TokenType._import,se.TokenType.name,se.TokenType.name,se.TokenType.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Jn.ContextualKeyword._type)){this.tokens.removeInitialToken();for(let t=0;t<8;t++)this.tokens.removeToken();return!0}if(this.tokens.matches1(se.TokenType._import))return this.processImport();if(this.tokens.matches2(se.TokenType._export,se.TokenType._default))return this.processExportDefault();if(this.tokens.matches2(se.TokenType._export,se.TokenType.braceL))return this.processNamedExports();if(this.tokens.matches2(se.TokenType._export,se.TokenType.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Jn.ContextualKeyword._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(se.TokenType.braceL)){for(;!this.tokens.matches1(se.TokenType.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(se.TokenType._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(Jn.ContextualKeyword._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,se.TokenType.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),Fh.removeMaybeImportAssertion.call(void 0,this.tokens)),!0}return!1}processImportEquals(){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.isTypeName(t)?ix.default.call(void 0,this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken("const"),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName("require"))):this.tokens.replaceToken("const"),!0}processImport(){if(this.tokens.matches2(se.TokenType._import,se.TokenType.parenL))return!1;let t=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(t);!this.tokens.matches1(se.TokenType.string);)this.tokens.removeToken();this.tokens.removeToken(),Fh.removeMaybeImportAssertion.call(void 0,this.tokens),this.tokens.matches1(se.TokenType.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(se.TokenType._import),this.tokens.matchesContextual(Jn.ContextualKeyword._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,se.TokenType.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,Jn.ContextualKeyword._from))return!0;if(this.tokens.matches1(se.TokenType.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(Jn.ContextualKeyword._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,Jn.ContextualKeyword._from)&&this.tokens.copyToken();let t=!1,s=!1;if(this.tokens.matches1(se.TokenType.name)&&(this.isTypeName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(se.TokenType.comma)&&this.tokens.removeToken()):(t=!0,this.tokens.copyToken(),this.tokens.matches1(se.TokenType.comma)&&(s=!0,this.tokens.removeToken()))),this.tokens.matches1(se.TokenType.star))this.isTypeName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(s&&this.tokens.appendCode(","),t=!0,this.tokens.copyExpectedToken(se.TokenType.star),this.tokens.copyExpectedToken(se.TokenType.name),this.tokens.copyExpectedToken(se.TokenType.name));else if(this.tokens.matches1(se.TokenType.braceL)){for(s&&this.tokens.appendCode(","),this.tokens.copyToken();!this.tokens.matches1(se.TokenType.braceR);){let i=Mh.default.call(void 0,this.tokens);if(i.isType||this.isTypeName(i.rightName)){for(;this.tokens.currentIndex(){"use strict";Object.defineProperty(pc,"__esModule",{value:!0});function hx(e){return e&&e.__esModule?e:{default:e}}var jh=St(),tn=Ce(),fx=un(),dx=hx(fx),uc=class extends dx.default{constructor(t,s,i){super(),this.rootTransformer=t,this.tokens=s,this.isImportsTransformEnabled=i}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(tn.TokenType._enum)?(this.processEnum(),!0):this.tokens.matches2(tn.TokenType._export,tn.TokenType._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(tn.TokenType._export,tn.TokenType._default,tn.TokenType._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${t} = ${t};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let t=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${t};`):this.tokens.appendCode(` export default ${t};`)}processEnum(){this.tokens.replaceToken("const"),this.tokens.copyExpectedToken(tn.TokenType.name);let t=!1;this.tokens.matchesContextual(jh.ContextualKeyword._of)&&(this.tokens.removeToken(),t=this.tokens.matchesContextual(jh.ContextualKeyword._symbol),this.tokens.removeToken());let s=this.tokens.matches3(tn.TokenType.braceL,tn.TokenType.name,tn.TokenType.eq);this.tokens.appendCode(' = require("flow-enums-runtime")');let i=!t&&!s;for(this.tokens.replaceTokenTrimmingLeftWhitespace(i?".Mirrored([":"({");!this.tokens.matches1(tn.TokenType.braceR);){if(this.tokens.matches1(tn.TokenType.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(t,s),this.tokens.matches1(tn.TokenType.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(i?"]);":"});")}processEnumElement(t,s){if(t){let i=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${i}")`)}else s?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(":"),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}};pc.default=uc});var qh=Z(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});function mx(e){return e&&e.__esModule?e:{default:e}}function yx(e){let t,s=e[0],i=1;for(;is.call(t,...u)),t=void 0)}return s}var Qn=Ce(),Tx=un(),kx=mx(Tx),Do="jest",vx=["mock","unmock","enableAutomock","disableAutomock"],hc=class e extends kx.default{__init(){this.hoistedFunctionNames=[]}constructor(t,s,i,r){super(),this.rootTransformer=t,this.tokens=s,this.nameManager=i,this.importProcessor=r,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(Qn.TokenType.name,Qn.TokenType.dot,Qn.TokenType.name,Qn.TokenType.parenL)&&this.tokens.identifierName()===Do?yx([this,"access",t=>t.importProcessor,"optionalAccess",t=>t.getGlobalNames,"call",t=>t(),"optionalAccess",t=>t.has,"call",t=>t(Do)])?!1:this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(t=>`${t}();`).join(""):""}extractHoistedCalls(){this.tokens.removeToken();let t=!1;for(;this.tokens.matches3(Qn.TokenType.dot,Qn.TokenType.name,Qn.TokenType.parenL);){let s=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(vx.includes(s)){let r=this.nameManager.claimFreeName("__jestHoist");this.hoistedFunctionNames.push(r),this.tokens.replaceToken(`function ${r}(){${Do}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Qn.TokenType.parenR),this.tokens.appendCode(";}"),t=!1}else t?this.tokens.copyToken():this.tokens.replaceToken(`${Do}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(Qn.TokenType.parenR),t=!0}return!0}};fc.default=hc});var Kh=Z(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});function xx(e){return e&&e.__esModule?e:{default:e}}var gx=Ce(),_x=un(),bx=xx(_x),dc=class extends bx.default{constructor(t){super(),this.tokens=t}process(){if(this.tokens.matches1(gx.TokenType.num)){let t=this.tokens.currentTokenCode();if(t.includes("_"))return this.tokens.replaceToken(t.replace(/_/g,"")),!0}return!1}};mc.default=dc});var Hh=Z(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});function Cx(e){return e&&e.__esModule?e:{default:e}}var Uh=Ce(),wx=un(),Sx=Cx(wx),yc=class extends Sx.default{constructor(t,s){super(),this.tokens=t,this.nameManager=s}process(){return this.tokens.matches2(Uh.TokenType._catch,Uh.TokenType.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName("e")})`),!0):!1}};Tc.default=yc});var Wh=Z(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});function Ix(e){return e&&e.__esModule?e:{default:e}}var Vt=Ce(),Ex=un(),Ax=Ix(Ex),kc=class extends Ax.default{constructor(t,s){super(),this.tokens=t,this.nameManager=s}process(){if(this.tokens.matches1(Vt.TokenType.nullishCoalescing)){let i=this.tokens.currentToken();return this.tokens.tokens[i.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(", async () => ("):this.tokens.replaceTokenTrimmingLeftWhitespace(", () => ("),!0}if(this.tokens.matches1(Vt.TokenType._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let s=this.tokens.currentToken().subscriptStartIndex;if(s!=null&&this.tokens.tokens[s].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==Vt.TokenType._super){let i=this.nameManager.claimFreeName("_"),r;if(s>0&&this.tokens.matches1AtIndex(s-1,Vt.TokenType._delete)&&this.isLastSubscriptInChain()?r=`${i} => delete ${i}`:r=`${i} => ${i}`,this.tokens.tokens[s].isAsyncOperation&&(r=`async ${r}`),this.tokens.matches2(Vt.TokenType.questionDot,Vt.TokenType.parenL)||this.tokens.matches2(Vt.TokenType.questionDot,Vt.TokenType.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalCall', ${r}`);else if(this.tokens.matches2(Vt.TokenType.questionDot,Vt.TokenType.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${r}`);else if(this.tokens.matches1(Vt.TokenType.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'optionalAccess', ${r}.`);else if(this.tokens.matches1(Vt.TokenType.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${r}.`);else if(this.tokens.matches1(Vt.TokenType.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'access', ${r}[`);else if(this.tokens.matches1(Vt.TokenType.parenL))this.justSkippedSuper()&&this.tokens.appendCode(".bind(this)"),this.tokens.replaceTokenTrimmingLeftWhitespace(`, 'call', ${r}(`);else throw new Error("Unexpected subscript operator in optional chain.");return!0}return!1}isLastSubscriptInChain(){let t=0;for(let s=this.tokens.currentIndex()+1;;s++){if(s>=this.tokens.tokens.length)throw new Error("Reached the end of the code while finding the end of the access chain.");if(this.tokens.tokens[s].isOptionalChainStart?t++:this.tokens.tokens[s].isOptionalChainEnd&&t--,t<0)return!0;if(t===0&&this.tokens.tokens[s].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let t=0,s=this.tokens.currentIndex()-1;for(;;){if(s<0)throw new Error("Reached the start of the code while finding the start of the access chain.");if(this.tokens.tokens[s].isOptionalChainStart?t--:this.tokens.tokens[s].isOptionalChainEnd&&t++,t<0)return!1;if(t===0&&this.tokens.tokens[s].subscriptStartIndex!=null)return this.tokens.tokens[s-1].type===Vt.TokenType._super;s--}}};vc.default=kc});var zh=Z(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});function Px(e){return e&&e.__esModule?e:{default:e}}var Gh=gt(),It=Ce(),Nx=un(),Rx=Px(Nx),xc=class extends Rx.default{constructor(t,s,i,r){super(),this.rootTransformer=t,this.tokens=s,this.importProcessor=i,this.options=r}process(){let t=this.tokens.currentIndex();if(this.tokens.identifierName()==="createReactClass"){let s=this.importProcessor&&this.importProcessor.getIdentifierReplacement("createReactClass");return s?this.tokens.replaceToken(`(0, ${s})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(t),!0}if(this.tokens.matches3(It.TokenType.name,It.TokenType.dot,It.TokenType.name)&&this.tokens.identifierName()==="React"&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)==="createClass"){let s=this.importProcessor&&this.importProcessor.getIdentifierReplacement("React")||"React";return s?(this.tokens.replaceToken(s),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(t),!0}return!1}tryProcessCreateClassCall(t){let s=this.findDisplayName(t);s&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(It.TokenType.parenL),this.tokens.copyExpectedToken(It.TokenType.braceL),this.tokens.appendCode(`displayName: '${s}',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(It.TokenType.braceR),this.tokens.copyExpectedToken(It.TokenType.parenR))}findDisplayName(t){return t<2?null:this.tokens.matches2AtIndex(t-2,It.TokenType.name,It.TokenType.eq)?this.tokens.identifierNameAtIndex(t-2):t>=2&&this.tokens.tokens[t-2].identifierRole===Gh.IdentifierRole.ObjectKey?this.tokens.identifierNameAtIndex(t-2):this.tokens.matches2AtIndex(t-2,It.TokenType._export,It.TokenType._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let s=(this.options.filePath||"unknown").split("/"),i=s[s.length-1],r=i.lastIndexOf("."),a=r===-1?i:i.slice(0,r);return a==="index"&&s[s.length-2]?s[s.length-2]:a}classNeedsDisplayName(){let t=this.tokens.currentIndex();if(!this.tokens.matches2(It.TokenType.parenL,It.TokenType.braceL))return!1;let s=t+1,i=this.tokens.tokens[s].contextId;if(i==null)throw new Error("Expected non-null context ID on object open-brace.");for(;t{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});function Lx(e){return e&&e.__esModule?e:{default:e}}var Xh=gt(),Ox=un(),Dx=Lx(Ox),_c=class e extends Dx.default{__init(){this.extractedDefaultExportName=null}constructor(t,s){super(),this.tokens=t,this.filePath=s,e.prototype.__init.call(this)}setExtractedDefaultExportName(t){this.extractedDefaultExportName=t}getPrefixCode(){return`
+ (function () {
+ var enterModule = require('react-hot-loader').enterModule;
+ enterModule && enterModule(module);
+ })();`.replace(/\s+/g," ").trim()}getSuffixCode(){let t=new Set;for(let i of this.tokens.tokens)!i.isType&&Xh.isTopLevelDeclaration.call(void 0,i)&&i.identifierRole!==Xh.IdentifierRole.ImportDeclaration&&t.add(this.tokens.identifierNameForToken(i));let s=Array.from(t).map(i=>({variableName:i,uniqueLocalName:i}));return this.extractedDefaultExportName&&s.push({variableName:this.extractedDefaultExportName,uniqueLocalName:"default"}),`
+;(function () {
+ var reactHotLoader = require('react-hot-loader').default;
+ var leaveModule = require('react-hot-loader').leaveModule;
+ if (!reactHotLoader) {
+ return;
+ }
+${s.map(({variableName:i,uniqueLocalName:r})=>` reactHotLoader.register(${i}, "${r}", ${JSON.stringify(this.filePath||"")});`).join(`
+`)}
+ leaveModule(module);
+})();`}process(){return!1}};bc.default=_c});var Qh=Z(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});var Jh=ai(),Mx=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","implements","interface","let","package","private","protected","public","static","await","false","null","true"]);function Fx(e){if(e.length===0||!Jh.IS_IDENTIFIER_START[e.charCodeAt(0)])return!1;for(let t=1;t{"use strict";Object.defineProperty(Sc,"__esModule",{value:!0});function ef(e){return e&&e.__esModule?e:{default:e}}var $e=Ce(),Bx=Qh(),Zh=ef(Bx),Vx=un(),jx=ef(Vx),wc=class extends jx.default{constructor(t,s,i){super(),this.rootTransformer=t,this.tokens=s,this.isImportsTransformEnabled=i}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1($e.TokenType._public)||this.tokens.matches1($e.TokenType._protected)||this.tokens.matches1($e.TokenType._private)||this.tokens.matches1($e.TokenType._abstract)||this.tokens.matches1($e.TokenType._readonly)||this.tokens.matches1($e.TokenType._override)||this.tokens.matches1($e.TokenType.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1($e.TokenType._enum)||this.tokens.matches2($e.TokenType._const,$e.TokenType._enum)?(this.processEnum(),!0):this.tokens.matches2($e.TokenType._export,$e.TokenType._enum)||this.tokens.matches3($e.TokenType._export,$e.TokenType._const,$e.TokenType._enum)?(this.processEnum(!0),!0):!1}processEnum(t=!1){for(this.tokens.removeInitialToken();this.tokens.matches1($e.TokenType._const)||this.tokens.matches1($e.TokenType._enum);)this.tokens.removeToken();let s=this.tokens.identifierName();this.tokens.removeToken(),t&&!this.isImportsTransformEnabled&&this.tokens.appendCode("export "),this.tokens.appendCode(`var ${s}; (function (${s})`),this.tokens.copyExpectedToken($e.TokenType.braceL),this.processEnumBody(s),this.tokens.copyExpectedToken($e.TokenType.braceR),t&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${s} || (exports.${s} = ${s} = {}));`):this.tokens.appendCode(`)(${s} || (${s} = {}));`)}processEnumBody(t){let s=null;for(;!this.tokens.matches1($e.TokenType.braceR);){let{nameStringCode:i,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3($e.TokenType.eq,$e.TokenType.string,$e.TokenType.comma)||this.tokens.matches3($e.TokenType.eq,$e.TokenType.string,$e.TokenType.braceR)?this.processStringLiteralEnumMember(t,i,r):this.tokens.matches1($e.TokenType.eq)?this.processExplicitValueEnumMember(t,i,r):this.processImplicitValueEnumMember(t,i,r,s),this.tokens.matches1($e.TokenType.comma)&&this.tokens.removeToken(),r!=null?s=r:s=`${t}[${i}]`}}extractEnumKeyInfo(t){if(t.type===$e.TokenType.name){let s=this.tokens.identifierNameForToken(t);return{nameStringCode:`"${s}"`,variableName:Zh.default.call(void 0,s)?s:null}}else if(t.type===$e.TokenType.string){let s=this.tokens.stringValueForToken(t);return{nameStringCode:this.tokens.code.slice(t.start,t.end),variableName:Zh.default.call(void 0,s)?s:null}}else throw new Error("Expected name or string at beginning of enum element.")}processStringLiteralEnumMember(t,s,i){i!=null?(this.tokens.appendCode(`const ${i}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${t}[${s}] = ${i};`)):(this.tokens.appendCode(`${t}[${s}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(";"))}processExplicitValueEnumMember(t,s,i){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw new Error("Expected rhsEndIndex on enum assign.");if(i!=null){for(this.tokens.appendCode(`const ${i}`),this.tokens.copyToken();this.tokens.currentIndex()