diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..c6c8b3621 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..ba38e6271 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms +custom: https://docs.openwebgal.com/sponsor/ +patreon: WebGAL diff --git a/.github/workflows/deploy-demo-page.yml b/.github/workflows/deploy-demo-page.yml new file mode 100644 index 000000000..3b7162205 --- /dev/null +++ b/.github/workflows/deploy-demo-page.yml @@ -0,0 +1,39 @@ +name: Deploy WebGAL Demo Page + +on: + push: + branches: + - main + +# 任务 +jobs: + build-webgal-static-webpage : + # 服务器环境:最新版 Ubuntu + runs-on: ubuntu-latest + steps: + # 拉取代码 + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'yarn' + + # 安装依赖 + - name: Install + run: npm install yarn -g && yarn install + + # 生成静态文件 + - name: Build + run: yarn build && cd ./packages/webgal && touch dist/.nojekyll + + # 部署到 GitHub Pages + - name: Deploy + uses: JamesIves/github-pages-deploy-action@releases/v4 + with: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # 也就是我们刚才生成的 secret + BRANCH: live-demo-page + FOLDER: packages/webgal/dist diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 000000000..f87b8a35d --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,32 @@ +name: Build Check + +on: + pull_request: + types: + - opened + - synchronize + +# 任务 +jobs: + build-webgal-static-webpage : + # 服务器环境:最新版 Ubuntu + runs-on: ubuntu-latest + steps: + # 拉取代码 + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Setup Node.js environment + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'yarn' + + # 安装依赖 + - name: Install + run: npm install yarn -g && yarn install + + # 生成静态文件 + - name: Build + run: yarn build && cd ./packages/webgal && touch dist/.nojekyll diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..c2fef307b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release WebGAL + +on: + push: + tags: + - '*.*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: WebGAL ${{ github.ref }} + body_path: releasenote.md + draft: true + prerelease: false diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..061329161 --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.eslintcache +stats.html +packages/webgal/public/game.old +packages/parser/build +packages/parser_legacy/build +packages/webgal/src/Core/util/pixiPerformManager/initRegister.ts diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 73f69e095..000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/WebGAL.iml b/.idea/WebGAL.iml deleted file mode 100644 index 0c8867d7e..000000000 --- a/.idea/WebGAL.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index aacebe776..000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7f4..000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 5b951c88e..e833c364d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,75 @@ +![WebGAL Slogan](https://github.com/OpenWebGAL/WebGAL/assets/30483415/ede38a39-d054-4fee-a3e9-fc5e764f358d) + +### **[English Version](/README_EN.md)** | **[日本語版](/README_JP.md)** | **[한국어](/README_KO.md)** | **[Français](/README_FR.md)** + +**[Help us with translation | 协助翻译 | 翻訳のお手伝い | 번역을 도와주세요](https://github.com/MakinoharaShoko/WebGAL/tree/dev/packages/webgal/src/translations)** + +**[Join Discord Server | 加入 Discord 讨论 | Discordのディスカッションに参加する](https://discord.gg/kPrQkJttJy)** + +WebGAL - Galgame Editing. Redefined | Product Hunt + # WebGAL - Create your galgame on web quickly and easily. + +**界面美观、功能强大、易于开发的全新网页端视觉小说引擎** + +# WebGAL 提供可视化编辑器 + +**创作视觉小说,何须会编程?欢迎体验 [WebGAL 图形化编辑器](https://github.com/MakinoharaShoko/WebGAL_Terre/)** + +## 在线体验 + +#### WebGAL 示例游戏,一般会演示最新开发的功能 + +https://demo.openwebgal.com + +#### 完整的游戏 + +[铃色☆记忆](http://hoshinasuzu.cn/) by 星奈组 [备用链接](http://hoshinasuzu.cc/) + +[Elf of Era Idols Project](https://store.steampowered.com/app/2414730/Elf_of_Era_Idols_Project/) (通过 Steam 获取) + +## 使用 WebGAL 制作游戏 + +[WebGAL 开发文档](https://docs.openwebgal.com/) + +[下载 WebGAL 图形化编辑器](https://github.com/MakinoharaShoko/WebGAL_Terre/releases) + +你也可以使用源代码或 [WebGAL 调试工具](https://github.com/MakinoharaShoko/WebGAL/releases) 制作游戏,并使用 [WebGAL Script VS Code 插件](https://marketplace.visualstudio.com/items?itemName=c6h5-no2.webgal-script-basics) 来启用语法高亮 + +## WebGAL 优势与特色 + +一次编写,处处运行,无需网页开发基础,3 分钟即可学会所有的语法,只要你有灵感,就可以立刻开始开始创作你自己的视觉小说! + +### 界面美观 + +美观优雅的图形用户界面与交互效果,一切都是为了更好的用户体验。 + +### 功能强大 + +不仅支持主流视觉小说引擎所具有的几乎全部功能,你还可以使用 Pixi.js 为你的游戏添加自定义效果。 + +### 易于开发 + +无论是使用 WebGAL 脚本还是使用可视化编辑器进行开发,一切都是那么简单自然。 + +### 参与 WebGAL 的开发工作 + +**想要参与引擎开发的开发者请阅读 [此项目的参与指南](https://docs.openwebgal.com/developers/)** + +### 赞助 + +WebGAL 是一款开源软件,因此你可以免费在 MPL-2.0 开源协议的范畴下使用本软件,并可用于商业使用。 + +但即便如此,你的赞助也可以给予开发者前进的动力,让这个项目变得更好。 + +[赞助本项目](https://docs.openwebgal.com/sponsor/) + +# Sponsors + + +Sponsor + + +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/MakinoharaShoko/WebGAL.svg)](https://starchart.cc/MakinoharaShoko/WebGAL) diff --git a/README_EN.md b/README_EN.md new file mode 100644 index 000000000..7de3132ed --- /dev/null +++ b/README_EN.md @@ -0,0 +1,73 @@ +![WebGAL Slogan](https://github.com/OpenWebGAL/WebGAL/assets/30483415/ede38a39-d054-4fee-a3e9-fc5e764f358d) + +**[中文版本](/README.md)** + +**[Help us with translation | 协助翻译 | 翻訳のお手伝い ](https://github.com/MakinoharaShoko/WebGAL/tree/dev/packages/webgal/src/translations)** + +**[Join Discord Server](https://discord.gg/kPrQkJttJy)** + +WebGAL - Galgame Editing. Redefined | Product Hunt + +# WebGAL + +**A visually appealing, feature-rich, and easy-to-develop new web-based visual novel engine** + +# WebGAL Provides Visual Editor + +**Who needs to code to create visual novels? Welcome to experience [WebGAL Visual Editor](https://github.com/MakinoharaShoko/WebGAL_Terre/)** + +Demo video: https://www.bilibili.com/video/BV1jS4y1i7Wz/ + +## Online Experience + +A short example: + +https://demo.openwebgal.com + +A complete game: + +[铃色☆记忆](http://hoshinasuzu.cn/) by Hoshinasuzu [备用链接](http://hoshinasuzu.cc/) + +### Creating Games with WebGAL + +[WebGAL Development Documentation](https://docs.openwebgal.com/en) + +[Download WebGAL Graphical Editor](https://github.com/MakinoharaShoko/WebGAL_Terre/releases) + +## WebGAL Advantages and Features + +Write once, run everywhere, no web development background needed, learn all syntax in 3 minutes, start creating your own visual novel as soon as inspiration strikes! + +### Visually Appealing Interface + +Beautiful and elegant graphical user interface and interaction effects, all for a better user experience. + +### Feature-Rich + +Supports almost all features of mainstream visual novel engines, plus you can use Pixi.js to add custom effects to your game. + +### Easy to Develop + +Whether using WebGAL scripts or the visual editor for development, everything is simple and natural. + +### Participate in WebGAL Development + +**Developers who want to participate in engine development, please read [the participation guide for this project](https://docs.openwebgal.com/en/developers/)** + +### Sponsorship + +WebGAL is an open-source software, so you can use this software for free under the scope of the MPL-2.0 open-source license, and it is available for commercial use. + +Even so, your sponsorship can provide motivation for the developers to move forward and make this project even better. + +[Sponsor this project](https://docs.openwebgal.com/en/sponsor/) + +# Sponsors + + +Sponsor + + +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/MakinoharaShoko/WebGAL.svg)](https://starchart.cc/MakinoharaShoko/WebGAL) diff --git a/README_FR.md b/README_FR.md new file mode 100644 index 000000000..7f741b390 --- /dev/null +++ b/README_FR.md @@ -0,0 +1,74 @@ +![WebGAL Slogan](https://github.com/OpenWebGAL/WebGAL/assets/30483415/ede38a39-d054-4fee-a3e9-fc5e764f358d) + +**[中文版本](/README.md)** +**[English](/README_EN.md)** + +**[Aidez-nous avec la traduction | 协助翻译 | 翻訳のお手伝い](https://github.com/MakinoharaShoko/WebGAL/tree/dev/packages/webgal/src/translations)** + +**[Rejoindre le serveur Discord](https://discord.gg/kPrQkJttJy)** + +WebGAL - Galgame Editing. Redefined | Product Hunt + +# WebGAL + +**Un moteur de visual novel basé sur le web, attrayant visuellement, riche en fonctionnalités et facile à développer** + +# WebGAL propose un éditeur visuel + +**Qui a besoin de savoir coder pour créer un visual novel ? Découvrez [l'éditeur graphique WebGAL](https://github.com/MakinoharaShoko/WebGAL_Terre/)** + +Vidéo de démonstration : https://www.bilibili.com/video/BV1jS4y1i7Wz/ + +## Expérience en ligne + +Un exemple court : + +https://demo.openwebgal.com + +Un jeu complet : + +[铃色☆记忆](http://hoshinasuzu.cn/) de Hoshinasuzu [Lien de secours](http://hoshinasuzu.cc/) + +### Créer des jeux avec WebGAL + +[Documentation de développement WebGAL](https://docs.openwebgal.com/) + +[Télécharger l'éditeur graphique WebGAL](https://github.com/MakinoharaShoko/WebGAL_Terre/releases) + +## Avantages et fonctionnalités de WebGAL + +Écrivez une fois, exécutez partout, aucune expérience en développement web requise, apprenez toutes les syntaxes en 3 minutes, commencez à créer votre propre visual novel dès que l'inspiration vous frappe ! + +### Interface visuellement attrayante + +Interface utilisateur graphique belle et élégante avec des effets d'interaction, le tout pour une meilleure expérience utilisateur. + +### Riche en fonctionnalités + +Prend en charge presque toutes les fonctionnalités des moteurs de visual novel populaires, et vous pouvez utiliser Pixi.js pour ajouter des effets personnalisés à votre jeu. + +### Facile à développer + +Que vous utilisiez les scripts WebGAL ou l'éditeur visuel pour le développement, tout est simple et naturel. + +### Participer au développement de WebGAL + +**Les développeurs souhaitant participer au développement du moteur, veuillez lire [le guide de participation pour ce projet](https://docs.openwebgal.com/developers/)** + +### Soutenir + +WebGAL est un logiciel open-source, vous pouvez donc utiliser ce logiciel gratuitement dans le cadre de la licence open-source MPL-2.0, et il est disponible pour une utilisation commerciale. + +Cependant, votre soutien peut motiver les développeurs à avancer et à rendre ce projet encore meilleur. + +[Soutenir ce projet](https://docs.openwebgal.com/sponsor/) + +# Sponsors + + +Sponsor + + +## Pour les amateurs de Stargazers (Historique GitHub stars) + +[![Stargazers au fil du temps](https://starchart.cc/MakinoharaShoko/WebGAL.svg)](https://starchart.cc/MakinoharaShoko/WebGAL) diff --git a/README_JP.md b/README_JP.md new file mode 100644 index 000000000..414146719 --- /dev/null +++ b/README_JP.md @@ -0,0 +1,66 @@ +![WebGAL Slogan](https://github.com/OpenWebGAL/WebGAL/assets/30483415/ede38a39-d054-4fee-a3e9-fc5e764f358d) + +**[中文版本](/README.md)** + +**[Help us with translation | 协助翻译 | 翻訳のお手伝い ](https://github.com/MakinoharaShoko/WebGAL/tree/dev/packages/webgal/src/translations)** + +**[Join Discord Server](https://discord.gg/kPrQkJttJy)** + +WebGAL - Galgame Editing. Redefined | Product Hunt + +# WebGALとは + +**WebGALは、Webベースのビジュアルノベルエンジンです。魅力的な機能が豊富で、ビジュアルノベルゲームの開発が簡単にできます。** + +# WebGAL はビジュアルエディターを提供します + +**ビジュアルノベルを作るのにプログラミングは必要ですか? [WebGAL グラフィカルエディター](https://github.com/MakinoharaShoko/WebGAL_Terre/) を体験してください** + +デモビデオ: https://youtu.be/S7xxVe9MGXk + +## ゲーム紹介 + +デモゲーム(一部AI画像を使用しています): + +https://webgal-jp-demo.onrender.com/ + +現在公開されているゲーム(中国語): + +[ベルカラー☆メモリー](http://hoshinasuzu.cn/suzu.html) by Hoshinasuzu [代替リンク](http://hoshinasuzu.cc/) + +### WebGALでゲームを作成 + +[WebGAL 開発ドキュメント](https://docs.openwebgal.com/ja) +※日本語の開発ドキュメントは準備中です + +[WebGAL Webエディターのダウンロードはこちら](https://github.com/MakinoharaShoko/WebGAL_Terre/releases) + +## WebGALの魅力と機能 + +WebGALは、プログラミング知識が不要で、簡単にビジュアルノベルゲームを作ることができます。 +
作成したゲームをウェブサイトに公開すると、プレイヤーは、パソコンやスマホからいつでもどこでもゲームをプレイすることができます。 +
ウェブサイトだけではなく、Windowsで実行できるファイルとして出力することも可能です。 + +主流のビジュアルノベルエンジンのほぼすべての機能をサポートしており、アニメーションや特殊効果を使用して、ゲームのエフェクトをカスタマイズすることも可能です。 + +### WebGALのエンジン開発に参加(オープンソースプロジェクトに参加) + +**エンジン開発に参加したい開発者は、[このプロジェクトの参加ガイド](https://docs.openwebgal.com/ja/developers/)をお読みください** +
上記のDiscordに参加すると多くの情報を得ることができます。 + +### スポンサーシップ + +WebGAL はオープンソース ソフトウェアであるため、MPL-2.0 オープンソース ライセンスの範囲内で無料で使用でき、商用利用も可能です。 +
スポンサーシップは、開発者が前進し、このプロジェクトをさらに改善する動機となることができます。 + +[このプロジェクトのスポンサー](https://docs.openwebgal.com/ja/sponsor/) + +# Sponsors + + +Sponsor + + +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/MakinoharaShoko/WebGAL.svg)](https://starchart.cc/MakinoharaShoko/WebGAL) diff --git a/README_KO.md b/README_KO.md new file mode 100644 index 000000000..5b5c06921 --- /dev/null +++ b/README_KO.md @@ -0,0 +1,73 @@ +![WebGAL Slogan](https://github.com/OpenWebGAL/WebGAL/assets/30483415/ede38a39-d054-4fee-a3e9-fc5e764f358d) + +**[中文版本](/README.md)** + +**[번역을 도와주세요 | 翻译协助 | 翻訳のお手伝い ](https://github.com/MakinoharaShoko/WebGAL/tree/dev/packages/webgal/src/translations)** + +**[Discord 서버 참가하기](https://discord.gg/kPrQkJttJy)** + +WebGAL - Galgame Editing. Redefined | Product Hunt + +# WebGAL + +**시각적으로 매력적이며, 기능이 풍부하고, 쉽게 개발할 수 있는 새로운 웹 기반 비주얼 노벨 엔진** + +# WebGAL 시각화 에디터 제공 + +**비주얼 노벨 제작, 꼭 프로그래밍을 알아야 할까요? [WebGAL 그래픽 에디터](https://github.com/MakinoharaShoko/WebGAL_Terre/)를 체험해 보세요!** + +데모 비디오: https://www.bilibili.com/video/BV1jS4y1i7Wz/ + +## 온라인 체험 + +짧은 예시: + +https://demo.openwebgal.com + +완성된 게임: + +[铃色☆记忆](http://hoshinasuzu.cn/) by Hoshinasuzu [백업 링크](http://hoshinasuzu.cc/) + +### WebGAL로 게임 만들기 + +[WebGAL 개발 문서](https://docs.openwebgal.com/) + +[WebGAL 그래픽 에디터 다운로드](https://github.com/MakinoharaShoko/WebGAL_Terre/releases) + +## WebGAL의 장점 및 특징 + +한 번 작성하면 어디서든 실행할 수 있으며, 웹 개발 배경이 필요 없으며, 모든 구문을 3분 만에 배울 수 있고, 영감이 떠오르자마자 자신만의 비주얼 노벨을 만들기 시작할 수 있습니다! + +### 시각적으로 매력적인 인터페이스 + +아름답고 우아한 그래픽 사용자 인터페이스와 상호작용 효과, 모두가 더 나은 사용자 경험을 위한 것입니다. + +### 특징이 풍부함 + +주요 비주얼 노벨 엔진의 거의 모든 기능을 지원하며, 게임에 사용자 정의 효과를 추가하기 위해 Pixi.js를 사용할 수 있습니다. + +### 개발하기 쉬움 + +WebGAL 스크립트를 사용하든 비주얼 에디터를 사용하든 개발은 모두 간단하고 자연스럽습니다. + +### WebGAL 개발에 참여하기 + +**엔진 개발에 참여하고 싶은 개발자는 [이 프로젝트에 참여하기 위한 안내서](https://docs.openwebgal.com/developers/)를 읽어주세요.** + +### 후원 + +WebGAL은 오픈소스 소프트웨어이므로 MPL-2.0 오픈소스 라이센스의 범위 내에서 이 소프트웨어를 무료로 사용할 수 있으며, 상업적으로 사용할 수 있습니다. + +그럼에도 불구하고, 귀하의 후원은 개발자들에게 동기를 부여하고 이 프로젝트를 더욱 발전시키는 데 도움이 될 수 있습니다. + +[이 프로젝트 후원하기](https://docs.openwebgal.com/sponsor/) + +# 후원자 + + +Sponsor + + +## 시간에 따른 사용자 수 + +[![시간에 따른 사용자 수](https://starchart.cc/MakinoharaShoko/WebGAL.svg)](https://starchart.cc/MakinoharaShoko/WebGAL) diff --git "a/dev-docs/ko/\352\265\254\353\254\270 \353\266\204\354\204\235\354\235\230 \354\230\210.md" "b/dev-docs/ko/\352\265\254\353\254\270 \353\266\204\354\204\235\354\235\230 \354\230\210.md" new file mode 100644 index 000000000..7cfa78603 --- /dev/null +++ "b/dev-docs/ko/\352\265\254\353\254\270 \353\266\204\354\204\235\354\235\230 \354\230\210.md" @@ -0,0 +1,26 @@ +``` +WebGAL:이것은 테스트 문장입니다. -v1.ogg ; +해석 결과=> { + command: commandType.say, //문장 유형 + content: '이것은 테스트 문장입니다.', //문장 내용 + args: [ + { + key: 'vocal', //매개변수 키는 음성 + value: './vocal/v1.ogg' //매개변수 값은 음성 파일 경로( assetSetter에 의해 파싱됨) + }, + { + key: 'speaker', //매개변수 키는 화자 + value: 'WebGAL' //매개변수 값은 화자의 이름 + } + ], //매개변수 목록 + sentenceAssets: [ + { + name: 'v1.ogg', //자원 이름 + type: assetType.audio, //자원 유형 + url: './vocal/v1.ogg', //자원 url + lineNumber: 1, //리소스 문장의 행 번호를 트리거 + } + ], // 문장에 포함된 리소스 목록 + subScene: '' //문장에 포함된 하위 장면 +} +``` diff --git "a/dev-docs/ko/\354\225\240\353\213\210\353\251\224\354\235\264\354\205\230 \353\260\217 \353\263\200\355\231\230 \354\213\234\354\212\244\355\205\234 \354\204\244\352\263\204.md" "b/dev-docs/ko/\354\225\240\353\213\210\353\251\224\354\235\264\354\205\230 \353\260\217 \353\263\200\355\231\230 \354\213\234\354\212\244\355\205\234 \354\204\244\352\263\204.md" new file mode 100644 index 000000000..19c32e1ee --- /dev/null +++ "b/dev-docs/ko/\354\225\240\353\213\210\353\251\224\354\235\264\354\205\230 \353\260\217 \353\263\200\355\231\230 \354\213\234\354\212\244\355\205\234 \354\204\244\352\263\204.md" @@ -0,0 +1,21 @@ +## 애니메이션 시스템 설계 + +WebGAL의 새 버전에서 `애니메이션`은 `PIXI.Ticker` 콜백 함수가 될 것입니다. 반면 `변형`은 특별한 애니메이션으로, 실행 시간이 0ms (애니메이션의 첫 프레임에서 스테이지 객체를 최종 상태로 설정)입니다. + +게다가, 모든 스테이지 상태가 애니메이션 관련 퍼포먼스를 포함하지 않기 때문에 애니메이션이 끝난 후에도 스테이지 객체가 애니메이션 종료 후 설정된 위치(또는 적용된 효과)를 유지하도록 "내부 변형"이 필요합니다. + +"내부 변형"은 지정된 key의 스테이지 객체에 적용할 효과의 연속된 기록입니다. "내부 변형"은 일반적으로 스테이지 객체의 애니메이션이 끝난 후 또는 스테이지 객체가 변경될 때 호출됩니다. + +"내부 변형"이 스테이지 객체의 애니메이션 정상 작동에 영향을 주지 않도록 하기 위해, WebGAL 스테이지 컨트롤러는 애니메이션 중인 스테이지 객체의 key를 기록할 수 있습니다. 이러한 key는 잠금되어 변형을 적용할 수 없습니다. 애니메이션이 끝날 때까지 잠금이 해제되지 않습니다. + +모든 애니메이션이 끝난 후, 애니메이션 실행 프로그램은 작동하는 스테이지 객체의 "최종 상태"를 해당 key의 스테이지 객체의 "내부 변형" 기록으로 업데이트합니다. + +## 다른 유형의 애니메이션 + +WebGAL에서 스테이지 객체에 적용할 수 있는 애니메이션은 즉시 애니메이션과 종료 애니메이션으로 나눌 수 있습니다. + +즉시 애니메이션은 스크립트가 호출되는 즉시 트리거됩니다. 애니메이션이 설정되지 않은 경우 스테이지 객체는 페이드인이라는 기본값을 가지므로, 사용자 정의 페이드인 애니메이션을 원한다면 캐릭터/배경을 바꾼 후 즉시 사용자 정의 애니메이션을 실행하면 됩니다. + +반면에 종료 애니메이션은 캐릭터/배경이 제거될 때 적용됩니다. 기본적으로 페이드아웃이 적용되는데, 종료 애니메이션을 적용하려면 `-off` 접미사를 가진 종료 스테이지 객체에 즉시 애니메이션을 설정하는 것이 좋습니다. + +따라서, 입장이나 퇴장 애니메이션은 setFigure 또는 setBg가 호출된 후에 적용해야 합니다. 이 명령어가 캐릭터를 추가하거나 삭제하기 위해 사용되는 경우에도 마찬가지입니다. diff --git "a/dev-docs/ko/\354\235\270\355\204\260\355\216\230\354\235\264\354\212\244 \352\263\204\354\270\265 \352\265\254\354\241\260.md" "b/dev-docs/ko/\354\235\270\355\204\260\355\216\230\354\235\264\354\212\244 \352\263\204\354\270\265 \352\265\254\354\241\260.md" new file mode 100644 index 000000000..ee9b71405 --- /dev/null +++ "b/dev-docs/ko/\354\235\270\355\204\260\355\216\230\354\235\264\354\212\244 \352\263\204\354\270\265 \352\265\254\354\241\260.md" @@ -0,0 +1,26 @@ +# 인터페이스 계층 구조(초안) + +``` +z-index: 컴포넌트 + 0: 예비 + 1: 스테이지 배경 + 2: 예비 + 3: pixi 퍼포먼스 + 4: 캐릭터 일러스트 + 5: pixi 퍼포먼스의 또 다른 선택적 계층 + 6: 텍스트 박스 + 7: 예비 + 8: 선택 및 트리거 스테이지 상호작용 + 9: 텍스트 박스 아래의 control Panel +10: control Panel에서 트리거되는 UI (예: 빠른 저장/불러오기) +11: 비디오 및 전체 화면 퍼포먼스 +12: 전체 화면 클릭 +13: Title 계층, 전체 화면 클릭의 퍼포먼스 계층을 덮는다 +14: Title 계층에서 트리거되는 UI +15: 예비 +16: Menu 계층 +17: Menu 계층에서 트리거되는 UI +18: 예비 +19: 게임 엔진 진입 애니메이션 +20: 전역 대화 상자 +``` diff --git "a/dev-docs/ko/\355\215\274\355\217\254\353\250\274\354\212\244 \355\230\270\354\266\234 \354\247\200\354\271\250.md" "b/dev-docs/ko/\355\215\274\355\217\254\353\250\274\354\212\244 \355\230\270\354\266\234 \354\247\200\354\271\250.md" new file mode 100644 index 000000000..1621d2f84 --- /dev/null +++ "b/dev-docs/ko/\355\215\274\355\217\254\353\250\274\354\212\244 \355\230\270\354\266\234 \354\247\200\354\271\250.md" @@ -0,0 +1,31 @@ +## 퍼포먼스 호출 지침 + +첫 번째 단계, 문장 호출기 `runScript.ts`는 문장 유형에 따라 문장을 실행하며, 문장은 IPerform 객체를 반환하고 현재 문장의 퍼포먼스를 장면 상태에 기록합니다. + +두 번째 단계, 문장 호출기 `runScript.ts`는 객체를 종료하고 언로드하기 위한 자동 타이머를 설정합니다. + +```typescript +export interface IPerform { + performName: string, // 퍼포먼스 이름, 이후에 수동으로 퍼포먼스를 제거하기 위해 사용, 표시가 없다면 이는 지속 퍼포먼스가 아니며 랜덤 문자열을 부여받습니다. + duration: number, // 지속 시간, 단위는 ms, 지속 시간 후에 이 퍼포먼스를 "이미 끝난" 상태로 강제 설정합니다. + isOver: boolean, // 퍼포먼스가 이미 끝났는지 여부 + isHoldOn: boolean, // 퍼포먼스가 유지 타입의 퍼포먼스인지 여부 + stopFunction: Function, // 퍼포먼스를 언로드하는 함수, 이 함수는 반드시 퍼포먼스를 언로드할 필요는 없지만, 퍼포먼스가 끝날 때 기본적으로 호출됩니다. + blockingNext: Function // 퍼포먼스가 게임 프로세스를 차단하는지 여부 (함수, boolean 타입의 결과를 반환, 차단할지 여부를 판단) + blockingAuto: Function // 퍼포먼스가 자동 모드를 차단하는지 여부 (함수, boolean 타입의 결과를 반환, 차단할지 여부를 판단) +} +``` + +세 번째 단계, 퍼포먼스 시간이 도달하면 퍼포먼스를 언로드합니다(문장 호출기는 지정된 시간에 자동으로 언로드됩니다), 퍼포먼스 목록에 퍼포먼스가 없을 때까지(유지 퍼포먼스는 언로드되지 않습니다) + +**참고: `isOver`가 `true`인 경우 auto와 next를 차단하지 않으며, 이때는 `blockingNext`와 `blockingAuto`를 확인하지 않습니다** + +퍼포먼스 중에 auto 호출이 발생할 때: auto 함수는 퍼포먼스 목록을 확인하고, auto를 차단하지 않는 퍼포먼스만 존재하면 auto를 호출합니다. + +퍼포먼스 중에 next 호출이 발생할 때: next 함수는 모든 중단 가능한 퍼포먼스를 종료하고 퍼포먼스를 언로드합니다. 모든 비 `HoldOn` 타이머를 언로드합니다. next를 차단하는 퍼포먼스가 있으면 next는 반응하지 않습니다. + +자동 재생(auto) 모드에서 next가 트리거 될 때(사용자가 마우스를 클릭) + +1. next를 차단하는 퍼포먼스가 있는지 확인하고, 그렇지 않으면 응답하지 않습니다 + +2. 차단되지 않았다면, 모든 퍼포먼스를 중단하고 auto를 중단합니다 diff --git "a/dev-docs/\345\212\250\347\224\273\344\270\216\345\217\230\346\215\242\347\263\273\347\273\237\350\256\276\350\256\241.md" "b/dev-docs/\345\212\250\347\224\273\344\270\216\345\217\230\346\215\242\347\263\273\347\273\237\350\256\276\350\256\241.md" new file mode 100644 index 000000000..7f7dda914 --- /dev/null +++ "b/dev-docs/\345\212\250\347\224\273\344\270\216\345\217\230\346\215\242\347\263\273\347\273\237\350\256\276\350\256\241.md" @@ -0,0 +1,21 @@ +## 动画系统设计 + +在 WebGAL 新版本中,`动画`将会是一个 `PIXI.Ticker` 回调函数。而`变换`则是一个特殊的动画,只不过执行时间是0ms(在动画的第一帧就将舞台对象设置为终态状态)。 + +除此以外,因为并不是每一个舞台状态都包含动画相关的演出,所以为了在动画结束后也要保持舞台对象处于动画结束后被设置的位置(或应用的效果),还会有一个“内部变换”。 + +“内部变换”是一连串对指定 key 的舞台对象要应用的效果的记录。“内部变换”调用的时机一般是任何舞台对象动画结束后或舞台对象发生改变时。 + +为了防止“内部变换”影响舞台对象上动画的正常运行,WebGAL 舞台控制器有一个记录,可以记录下正在进行动画的舞台对象的 key,这些key会被锁定,无法应用变换。直到动画结束后,才会被解锁。 + +在任何动画结束后,动画执行程序都会将其作用的舞台对象的“终态”更新到对应的 key 的舞台对象的“内部变换”记录上。 + +## 不同类型的动画 + +在 WebGAL 中,可以作用在舞台对象上的动画,可以分为即时动画和退出动画。 + +即时动画会在脚本被调用的时候被立即触发。由于在没有任何动画被设置的情况下,舞台对象会预设一个渐入,所以如果想要自定义渐入动画,只需要在切换立绘/背景后立刻执行一个自定义的即时动画就可以了。 + +而退出动画将会在立绘/背景被移除时作用。默认的退出动画是一个渐出。如果想要应用一个退出动画,一个比较好的方式是在立绘退出时(在切换或关闭立绘时)为带有后缀 `-off` 的退出舞台对象设置一个即时动画。 + +所以,无论是进入还是退出动画,都应在 setFigure 或 setBg 后应用,无论这个命令是为了添加还是删除一个立绘。 diff --git "a/dev-docs/\346\274\224\345\207\272\350\260\203\347\224\250\350\257\264\346\230\216.md" "b/dev-docs/\346\274\224\345\207\272\350\260\203\347\224\250\350\257\264\346\230\216.md" new file mode 100644 index 000000000..9c9f8f0d9 --- /dev/null +++ "b/dev-docs/\346\274\224\345\207\272\350\260\203\347\224\250\350\257\264\346\230\216.md" @@ -0,0 +1,31 @@ +## 演出调用说明 + +第一步,语句调用器 `runScript.ts` 根据语句类型执行一个语句,语句会返回一个IPerform对象,并将当前语句的演出写入到场景状态。 + +第二步,语句调用器 `runScript.ts` 会设定一个自动的计时器,用于结束并卸载对象。 + +```typescript +export interface IPerform { + performName: string,// 演出名称,用于在后面手动清除演出,如果没有标识,则代表不是保持演出,给予一个随机字符串 + duration: number, // 持续时间,单位为ms,持续时间到后强制设置该演出为“已经结束”状态 + isOver: boolean, //演出是否已经结束 + isHoldOn: boolean, //演出是不是一个保持类型的演出 + stopFunction: Function, // 卸载演出的函数,这个函数不一定要真的卸载演出,只是在演出结束时会默认调用。 + blockingNext: Function // 演出是否阻塞游戏流程继续(一个函数,返回 boolean类型的结果,判断要不要阻塞) + blockingAuto: Function //演出是否阻塞自动模式(一个函数,返回 boolean类型的结果,判断要不要阻塞) +} +``` + +第三步,在演出时间抵达时,卸载演出(语句调用器会在指定时间自动卸载),直到演出列表里没有演出(保持演出则不会卸载) + +**注意:`isOver` 为 `true` 时,不会阻塞auto和next,这时候不检查 `blockingNext` 与 `blockingAuto`** + +当在演出时发生auto调用: auto函数会检查演出列表,如果只存在不阻塞auto的演出,就调用auto。 + +当在演出时发生next调用: next函数会结束所有可打断演出,卸载演出。 卸载所有非 `HoldOn` 计时器 如果存在阻塞next的演出,next不会响应。 + +当在自动播放(auto)模式下触发next(用户点击鼠标) + +1.检查是否存在阻塞next的演出,否则不响应 + +2.如果没有被阻塞,那么就停止所有演出,并停止auto diff --git "a/dev-docs/\347\225\214\351\235\242\345\261\202\347\272\247\345\210\222\345\210\206.md" "b/dev-docs/\347\225\214\351\235\242\345\261\202\347\272\247\345\210\222\345\210\206.md" new file mode 100644 index 000000000..8fd7d8cf6 --- /dev/null +++ "b/dev-docs/\347\225\214\351\235\242\345\261\202\347\272\247\345\210\222\345\210\206.md" @@ -0,0 +1,26 @@ +# 界面层级划分(草案) + +``` +z-index:组件 + 0:备用 + 1:舞台背景 + 2:备用 + 3:pixi 演出 + 4:人物立绘 + 5:pixi 演出的另一个可选层 + 6:文本框 + 7:备用 + 8:选项与触发的舞台交互 + 9:文本框下面的control Panel +10:control Panel 触发的UI(比如快速存读档) +11:视频与全屏演出 +12:全屏点击 +13:Title 层,覆盖全屏点击的演出层 +14:Title 层触发的UI +15:备用 +16:Menu层 +17:Menu层触发的UI +18:备用 +19:游戏引擎进入动画 +20:全局对话框 +``` diff --git "a/dev-docs/\350\257\255\345\217\245\350\247\243\346\236\220\347\244\272\344\276\213.md" "b/dev-docs/\350\257\255\345\217\245\350\247\243\346\236\220\347\244\272\344\276\213.md" new file mode 100644 index 000000000..20be5689c --- /dev/null +++ "b/dev-docs/\350\257\255\345\217\245\350\247\243\346\236\220\347\244\272\344\276\213.md" @@ -0,0 +1,26 @@ +``` +WebGAL:这是一条测试语句。 -v1.ogg ; +解析为=> { + command: commandType.say, //语句类型 + content: '这是一条测试语句。', //语句内容 + args: [ + { + key: 'vocal', //参数键是语音 + value: './vocal/v1.ogg' //参数值是语音文件路径(由assetSetter 解析) + }, + { + key: 'speaker', //参数键是说话人 + value: 'WebGAL' //参数值是说话人名称 + } + ], //参数列表 + sentenceAssets: [ + { + name: 'v1.ogg', //资源名称 + type: assetType.audio, //资源类型 + url: './vocal/v1.ogg', //资源url + lineNumber: 1, //触发资源语句的行号 + } + ], // 语句携带的资源列表 + subScene: '' // 语句包含子场景 +} +``` \ No newline at end of file diff --git a/game/scene/start.sce b/game/scene/start.sce deleted file mode 100644 index 8164c2a96..000000000 --- a/game/scene/start.sce +++ /dev/null @@ -1,2 +0,0 @@ -A:真是安静啊 -A:街上什么人也没有 \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 917800619..000000000 --- a/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - INDEX - - - - - - - -
-
-
-
-
- - - \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..9afd3456d --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "@webgal/base", + "version": "4.5", + "description": "A brand new web Visual Novel engine.", + "repository": "https://github.com/MakinoharaShoko/WebGAL.git", + "author": "Mahiru ", + "scripts": { + "build": "yarn parser:build && yarn webgal:build", + "build-ci": "yarn parser:build-ci && yarn webgal:build", + "dev": "yarn parser:build && yarn webgal:dev", + "webgal:dev": "cd packages/webgal && yarn dev", + "webgal:build": "cd packages/webgal && yarn build", + "parser:test": "cd packages/parser && yarn test", + "parser:test-coverage": "cd packages/parser && yarn coverage", + "parser:build": "cd packages/parser && yarn build", + "parser:build-ci": "cd packages/parser && yarn build-ci" + }, + "license": "MPL-2.0", + "workspaces": { + "packages": [ + "packages/*" + ] + }, + "private": true +} diff --git a/packages/parser/.babelrc b/packages/parser/.babelrc new file mode 100644 index 000000000..cc4476abb --- /dev/null +++ b/packages/parser/.babelrc @@ -0,0 +1,14 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "useBuiltIns": "entry", + "corejs": "3.6.4", + "modules": false + }, + "@babel/preset-typescript" + ] + ], + "exclude": "node_modules/**" +} diff --git a/packages/parser/.gitignore b/packages/parser/.gitignore new file mode 100644 index 000000000..549164b2f --- /dev/null +++ b/packages/parser/.gitignore @@ -0,0 +1,4 @@ +coverage +node_modules +.idea +.vscode diff --git a/packages/parser/.npmignore b/packages/parser/.npmignore new file mode 100644 index 000000000..7bcd9b489 --- /dev/null +++ b/packages/parser/.npmignore @@ -0,0 +1,6 @@ +coverage +test +.babelrc +rollup.config.js +tsconfig.json +tsconfig.node.json diff --git a/packages/parser/.prettierrc b/packages/parser/.prettierrc new file mode 100644 index 000000000..33f6d8eaf --- /dev/null +++ b/packages/parser/.prettierrc @@ -0,0 +1,19 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": true, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "trailingComma": "all", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "always", + "requirePragma": false, + "insertPragma": false, + "proseWrap": "preserve", + "htmlWhitespaceSensitivity": "css", + "endOfLine": "lf", + "embeddedLanguageFormatting": "auto" +} diff --git a/packages/parser/LICENSE b/packages/parser/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/packages/parser/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/packages/parser/README.md b/packages/parser/README.md new file mode 100644 index 000000000..f6348d365 --- /dev/null +++ b/packages/parser/README.md @@ -0,0 +1,29 @@ +# WebGAL Parser: The Next Generation + +## Development + +### Run all tests + +```sh +yarn test +``` + +### Run a specific test + +```sh +yarn test -t TEST_NAME +``` + +### Trace the parsing process + +Since this print a verbose test tree, we typically use for a specific test: + +```sh +yarn test-trace -t TEST_NAME +``` + +Or, if all tests are needed: + +```sh +yarn test-trace +``` diff --git a/packages/parser/package.json b/packages/parser/package.json new file mode 100644 index 000000000..a2f098eb1 --- /dev/null +++ b/packages/parser/package.json @@ -0,0 +1,51 @@ +{ + "name": "webgal-parser", + "version": "4.5.10-beta.2", + "description": "WebGAL script parser", + "scripts": { + "test": "yarn parser && vitest", + "test-trace": "yarn parser --trace && vitest", + "coverage": "vitest run --coverage", + "build": "rimraf -rf ./build && rollup --config", + "build-ci": "yarn parser && rollup --config", + "debug": "tsx test/debug.ts", + "dev": "tsx src/index.ts", + "parser": "npx peggy -o src/parser.js --format es src/parser.pegjs -m" + }, + "types": "./build/types/index.d.ts", + "module": "./build/es/index.js", + "main": "./build/cjs/index.js", + "author": "tinyAdapter ", + "license": "MPL-2.0", + "dependencies": { + "lodash": "^4.17.21", + "tsx": "^3.12.7" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^23.0.2", + "@rollup/plugin-json": "^5.0.1", + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-typescript": "^9.0.2", + "@types/lodash": "^4.14.189", + "@types/node": "^18.14.0", + "@typescript-eslint/eslint-plugin": "^5.18.0", + "@typescript-eslint/parser": "^5.18.0", + "@vitest/coverage-c8": "^0.28.5", + "eslint": "^8.13.0", + "eslint-config-alloy": "^4.5.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-react": "^7.29.4", + "lint-staged": "^12.3.7", + "prettier": "^2.6.2", + "rollup": "^3.3.0", + "rollup-plugin-babel": "^4.4.0", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-typescript2": "^0.34.1", + "ts-node": "^10.9.1", + "tslib": "^2.4.1", + "typescript": "^4.9.3", + "vitest": "^0.28.5" + }, + "type": "module" +} diff --git a/packages/parser/rollup.config.js b/packages/parser/rollup.config.js new file mode 100644 index 000000000..787b18bc7 --- /dev/null +++ b/packages/parser/rollup.config.js @@ -0,0 +1,69 @@ +import typescript from "rollup-plugin-typescript2"; +import resolve from "@rollup/plugin-node-resolve"; +import commonjs from "@rollup/plugin-commonjs"; + +const mode = process.env.MODE ?? 'prod'; +const isProd = mode === "prod"; + +export default [ + { + input: `./src/index.ts`, + output: + { + file: "./build/es/index.js", + format: "es", + sourcemap: !isProd + }, + plugins: [ + resolve(), commonjs(), typescript({ + useTsconfigDeclarationDir: true, + tsconfigOverride: { + compilerOptions: { + sourceMap: !isProd, + declarationDir: "build/es" + }, include: ["src"] + } + })] + }, { + input: `./src/index.ts`, + output: [ + { + file: "./build/cjs/index.cjs", + exports: "named", + format: "cjs", + sourcemap: !isProd + }, + ], + plugins: [ + resolve(), commonjs(), typescript({ + useTsconfigDeclarationDir: true, + tsconfigOverride: { + compilerOptions: { + sourceMap: !isProd, + declarationDir: "build/cjs" + }, include: ["src"] + } + })], + }, + { + input: `./src/index.ts`, + output: [ + { + file: "./build/umd/index.global.js", + name: 'webgalParser', + format: 'iife', + sourcemap: !isProd + }, + ], + plugins: [ + resolve(), commonjs(), typescript({ + useTsconfigDeclarationDir: true, + tsconfigOverride: { + compilerOptions: { + sourceMap: !isProd, + declarationDir: "build/types" + }, include: ["src"] + } + })], + } +]; diff --git a/packages/parser/src/config/scriptConfig.ts b/packages/parser/src/config/scriptConfig.ts new file mode 100644 index 000000000..c8463fd7b --- /dev/null +++ b/packages/parser/src/config/scriptConfig.ts @@ -0,0 +1,50 @@ +import {commandType} from '../interface/sceneInterface'; + +export const SCRIPT_CONFIG = [ + { scriptString: 'intro', scriptType: commandType.intro }, + { scriptString: 'changeBg', scriptType: commandType.changeBg }, + { scriptString: 'changeFigure', scriptType: commandType.changeFigure }, + { scriptString: 'miniAvatar', scriptType: commandType.miniAvatar }, + { scriptString: 'changeScene', scriptType: commandType.changeScene }, + { scriptString: 'choose', scriptType: commandType.choose }, + { scriptString: 'end', scriptType: commandType.end }, + { scriptString: 'bgm', scriptType: commandType.bgm }, + { scriptString: 'playVideo', scriptType: commandType.video }, + { + scriptString: 'setComplexAnimation', + scriptType: commandType.setComplexAnimation, + }, + { scriptString: 'setFilter', scriptType: commandType.setFilter }, + { scriptString: 'pixiInit', scriptType: commandType.pixiInit }, + { scriptString: 'pixiPerform', scriptType: commandType.pixi }, + { scriptString: 'label', scriptType: commandType.label }, + { scriptString: 'jumpLabel', scriptType: commandType.jumpLabel }, + { scriptString: 'setVar', scriptType: commandType.setVar }, + { scriptString: 'callScene', scriptType: commandType.callScene }, + { scriptString: 'showVars', scriptType: commandType.showVars }, + { scriptString: 'unlockCg', scriptType: commandType.unlockCg }, + { scriptString: 'unlockBgm', scriptType: commandType.unlockBgm }, + { scriptString: 'say', scriptType: commandType.say }, + { scriptString: 'filmMode', scriptType: commandType.filmMode }, + { scriptString: 'callScene', scriptType: commandType.callScene }, + { scriptString: 'setTextbox', scriptType: commandType.setTextbox }, + { scriptString: 'setAnimation', scriptType: commandType.setAnimation }, + { scriptString: 'playEffect', scriptType: commandType.playEffect }, + { scriptString: 'applyStyle', scriptType: commandType.applyStyle }, +]; +export const ADD_NEXT_ARG_LIST = [ + commandType.bgm, + commandType.pixi, + commandType.pixiInit, + commandType.label, + commandType.if, + commandType.miniAvatar, + commandType.setVar, + commandType.unlockBgm, + commandType.unlockCg, + commandType.filmMode, + commandType.playEffect, +]; + +export type ConfigMap = Map; +export type ConfigItem = { scriptString: string; scriptType: commandType }; diff --git a/packages/parser/src/configParser/configParser.ts b/packages/parser/src/configParser/configParser.ts new file mode 100644 index 000000000..cca9e66ec --- /dev/null +++ b/packages/parser/src/configParser/configParser.ts @@ -0,0 +1,72 @@ +import { argsParser } from '../scriptParser/argsParser'; + +interface IOptionItem { + key: string; + value: string | number | boolean; +} +interface IConfigItem { + command: string; + args: string[]; + options: IOptionItem[]; +} + +export type WebgalConfig = IConfigItem[]; + +function configLineParser(inputLine: string): IConfigItem { + const options: Array = []; + let command: string; + + let newSentenceRaw = inputLine.split(';')[0]; + if (newSentenceRaw === '') { + // 注释提前返回 + return { + command: '', + args: [], + options: [], + }; + } + // 截取命令 + const getCommandResult = /\s*:\s*/.exec(newSentenceRaw); + + // 没有command + if (getCommandResult === null) { + command = ''; + } else { + command = newSentenceRaw.substring(0, getCommandResult.index); + // 划分命令区域和content区域 + newSentenceRaw = newSentenceRaw.substring( + getCommandResult.index + 1, + newSentenceRaw.length, + ); + } + // 截取 Options 区域 + const getOptionsResult = / -/.exec(newSentenceRaw); + // 获取到参数 + if (getOptionsResult) { + const optionsRaw = newSentenceRaw.substring( + getOptionsResult.index, + newSentenceRaw.length, + ); + newSentenceRaw = newSentenceRaw.substring(0, getOptionsResult.index); + for (const e of argsParser(optionsRaw, (name, _) => { + return name; + })) { + options.push(e); + } + } + return { + command, + args: newSentenceRaw + .split('|') + .map((e) => e.trim()) + .filter((e) => e !== ''), + options, + }; +} + +export function configParser(configText: string): WebgalConfig { + const configLines = configText.replaceAll(`\r`, '').split('\n'); + return configLines + .map((e) => configLineParser(e)) + .filter((e) => e.command !== ''); +} diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts new file mode 100644 index 000000000..449286448 --- /dev/null +++ b/packages/parser/src/index.ts @@ -0,0 +1,163 @@ +import * as p from './parser'; +import { configParser, WebgalConfig } from './configParser/configParser'; +import { commandType, IAsset } from "./interface/sceneInterface"; +import { fileType } from "./interface/assets"; +import { SyntaxError as parserSyntaxError } from './parser'; +import { contentParser } from './scriptParser/contentParser'; +import { assetsScanner } from './scriptParser/assetsScanner'; +import { subSceneScanner } from './scriptParser/subSceneScanner'; +import { uniqWith } from 'lodash'; +import { IWebGALStyleObj, scss2cssinjsParser } from './styleParser'; +export { SyntaxError as parserSyntaxError } from './parser'; +import { + ADD_NEXT_ARG_LIST, + SCRIPT_CONFIG, + ConfigMap, + ConfigItem, +} from './config/scriptConfig'; +import { sceneParser } from './sceneParser'; + +export class NewSceneParser { + + private readonly assetsPrefetcher; + private readonly assetSetter; + private readonly ADD_NEXT_ARG_LIST; + private readonly SCRIPT_CONFIG; + + public constructor(assetsPrefetcher: ((assetList: Array) => void), + assetSetter: (fileName: string, assetType: fileType) => string, + ADD_NEXT_ARG_LIST: Array, SCRIPT_CONFIG: Array) { + this.assetsPrefetcher = assetsPrefetcher; + this.assetSetter = assetSetter; + this.ADD_NEXT_ARG_LIST = ADD_NEXT_ARG_LIST; + this.SCRIPT_CONFIG = SCRIPT_CONFIG; + } + + public parse(rawScene: string, sceneName: string, sceneUrl: string) { + let result; + try { + result = p.parse(rawScene); + } catch (e) { + throw parserSyntaxError(`ERROR: parsing scene "${rawScene}" error with ${e}`); + } + + let assetsList: Array = []; // 场景资源列表 + let subSceneList: Array = []; // 子场景列表 + + // 开始资源的预加载 + assetsList = uniqWith(assetsList); // 去重 + this.assetsPrefetcher(assetsList); + + result.sentenceList.forEach((sentence) => { + // 为了向后兼容性,我们单独抽取choose命令的原始语句 + if (sentence.command === commandType.choose) { + const r = sentence.args.find(obj => obj.key === 'contentRawRange'); + sentence.content = rawScene.substring(r.value[0], r.value[1]); + } + + // 将语句内容里的文件名转为相对或绝对路径 + const content = contentParser(sentence.content, sentence.command, this.assetSetter); + + // 扫描语句携带资源 + const sentenceAssets = assetsScanner(sentence.command, content, sentence.args); + + // 扫描语句携带子场景 + const subScene = subSceneScanner(sentence.command, content); + + // 添加至语句解析结果 + sentence.sentenceAssets = sentenceAssets; + sentence.subScene = subScene; + + // 在这里解析出语句可能携带的资源和场景,合并到 assetsList 和 subSceneList + assetsList = [...assetsList, ...sentenceAssets]; + subSceneList = [...subSceneList, ...subScene]; + }); + + return result; + } + + public parseConfig(configText: string) { + return configParser(configText); + } + + public stringifyConfig(config: WebgalConfig) { + return config + .reduce( + (previousValue, curr) => + (previousValue + `${curr.command}:${curr.args.join('|')}${curr.options.length <= 0 ? '' : curr.options.reduce((p, c) => (p + ' -' + c.key + '=' + c.value), '')};\n`), + '' + ); + } + + public parseScssToWebgalStyleObj(scssString: string): IWebGALStyleObj { + return scss2cssinjsParser(scssString); + } + +} + +export default class SceneParser { + private readonly SCRIPT_CONFIG_MAP: ConfigMap; + constructor( + private readonly assetsPrefetcher: (assetList: IAsset[]) => void, + private readonly assetSetter: ( + fileName: string, + assetType: fileType, + ) => string, + private readonly ADD_NEXT_ARG_LIST: number[], + SCRIPT_CONFIG_INPUT: ConfigItem[] | ConfigMap, + ) { + if (Array.isArray(SCRIPT_CONFIG_INPUT)) { + this.SCRIPT_CONFIG_MAP = new Map(); + SCRIPT_CONFIG_INPUT.forEach((config) => { + this.SCRIPT_CONFIG_MAP.set(config.scriptString, config); + }); + } else { + this.SCRIPT_CONFIG_MAP = SCRIPT_CONFIG_INPUT; + } + } + /** + * 解析场景 + * @param rawScene 原始场景 + * @param sceneName 场景名称 + * @param sceneUrl 场景url + * @return 解析后的场景 + */ + parse(rawScene: string, sceneName: string, sceneUrl: string) { + return sceneParser( + rawScene, + sceneName, + sceneUrl, + this.assetsPrefetcher, + this.assetSetter, + this.ADD_NEXT_ARG_LIST, + this.SCRIPT_CONFIG_MAP, + ); + } + + parseConfig(configText: string) { + return configParser(configText); + } + + stringifyConfig(config: WebgalConfig) { + return config.reduce( + (previousValue, curr) => + previousValue + + `${curr.command}:${curr.args.join('|')}${ + curr.options.length <= 0 + ? '' + : curr.options.reduce( + (p, c) => p + ' -' + c.key + '=' + c.value, + '', + ) + };\n`, + '', + ); + } + + parseScssToWebgalStyleObj(scssString: string): IWebGALStyleObj{ + return scss2cssinjsParser(scssString); + } + +} + +export { ADD_NEXT_ARG_LIST, SCRIPT_CONFIG }; diff --git a/packages/parser/src/interface/assets.ts b/packages/parser/src/interface/assets.ts new file mode 100644 index 000000000..0fb0e2cfa --- /dev/null +++ b/packages/parser/src/interface/assets.ts @@ -0,0 +1,12 @@ +/** + * 内置资源类型的枚举 + */ +export enum fileType { + background, + bgm, + figure, + scene, + tex, + vocal, + video, +} diff --git a/packages/parser/src/interface/runtimeInterface.ts b/packages/parser/src/interface/runtimeInterface.ts new file mode 100644 index 000000000..d10f30fbd --- /dev/null +++ b/packages/parser/src/interface/runtimeInterface.ts @@ -0,0 +1,9 @@ +/** + * 子场景结束后回到父场景的入口 + * @interface sceneEntry + */ +export interface sceneEntry { + sceneName: string; // 场景名称 + sceneUrl: string; // 场景url + continueLine: number; // 继续原场景的行号 +} diff --git a/packages/parser/src/interface/sceneInterface.ts b/packages/parser/src/interface/sceneInterface.ts new file mode 100644 index 000000000..e5419af3b --- /dev/null +++ b/packages/parser/src/interface/sceneInterface.ts @@ -0,0 +1,105 @@ +/** + * 语句类型 + */ +import { sceneEntry } from './runtimeInterface'; +import { fileType } from './assets'; + +export enum commandType { + say, // 对话 + changeBg, // 更改背景 + changeFigure, // 更改立绘 + bgm, // 更改背景音乐 + video, // 播放视频 + pixi, // pixi演出 + pixiInit, // pixi初始化 + intro, // 黑屏文字演示 + miniAvatar, // 小头像 + changeScene, // 切换场景 + choose, // 分支选择 + end, // 结束游戏 + setComplexAnimation, // 动画演出 + setFilter, // 设置效果 + label, // 标签 + jumpLabel, // 跳转标签 + chooseLabel, // 选择标签 + setVar, // 设置变量 + if, // 条件跳转 + callScene, // 调用场景 + showVars, + unlockCg, + unlockBgm, + filmMode, + setTextbox, + setAnimation, + playEffect, + setTempAnimation, + comment, + setTransform, + setTransition, + getUserInput, + applyStyle +} + +/** + * 单个参数接口 + * @interface arg + */ +export interface arg { + key: string; // 参数键 + value: string | boolean | number; // 参数值 +} + +/** + * 资源接口 + * @interface IAsset + */ +export interface IAsset { + name: string; // 资源名称 + type: fileType; // 资源类型 + url: string; // 资源url + lineNumber: number; // 触发资源语句的行号 +} + +/** + * 单条语句接口 + * @interface ISentence + */ +export interface ISentence { + command: commandType; // 语句类型 + commandRaw: string; // 命令的原始内容,方便调试 + content: string; // 语句内容 + args: Array; // 参数列表 + sentenceAssets: Array; // 语句携带的资源列表 + subScene: Array; // 语句包含子场景列表 +} + +/** + * 场景接口 + * @interface IScene + */ +export interface IScene { + sceneName: string; // 场景名称 + sceneUrl: string; // 场景url + sentenceList: Array; // 语句列表 + assetsList: Array; // 资源列表 + subSceneList: Array; // 子场景的url列表 +} + +/** + * 当前的场景数据 + * @interface ISceneData + */ +export interface ISceneData { + currentSentenceId: number; // 当前语句ID + sceneStack: Array; // 场景栈 + currentScene: IScene; // 当前场景数据 +} + +/** + * 处理后的命令接口 + * @interface parsedCommand + */ +export interface parsedCommand { + type: commandType; + additionalArgs: Array; +} diff --git a/packages/parser/src/parser.js b/packages/parser/src/parser.js new file mode 100644 index 000000000..f7923a71b --- /dev/null +++ b/packages/parser/src/parser.js @@ -0,0 +1,6412 @@ +// @generated by Peggy 4.0.3. +// +// https://peggyjs.org/ + + + + const commandType = { + say: 0, // 对话 + changeBg: 1, // 更改背景 + changeFigure: 2, // 更改立绘 + bgm: 3, // 更改背景音乐 + video: 4, // 播放视频 + pixi: 5, // pixi演出 + pixiInit: 6, // pixi初始化 + intro: 7, // 黑屏文字演示 + miniAvatar: 8, // 小头像 + changeScene: 9, // 切换场景 + choose: 10, // 分支选择 + end: 11, // 结束游戏 + setComplexAnimation: 12, // 动画演出 + setFilter: 13, // 设置效果 + label: 14, // 标签 + jumpLabel: 15, // 跳转标签 + chooseLabel: 16, // 选择标签 + setVar: 17, // 设置变量 + if: 18, // 条件跳转 + callScene: 19, // 调用场景 + showVars: 20, + unlockCg: 21, + unlockBgm: 22, + filmMode: 23, + setTextbox: 24, + setAnimation: 25, + playEffect: 26, + setTempAnimation: 27, + comment: 28, + setTransform: 29, + setTransition: 30, + getUserInput: 31 + }; + + + function buildList(head, tail, index) { + return [head].concat(extractList(tail, index)); + } + + function extractList(list, index) { + return list.map(function(element) { return element[index]; }); + } + + function optionalList(value) { + return value !== null ? value : []; + } + + function optionalString(value) { + return value != null ? value : ""; + } + + function filterNulls(value) { + return value.filter(function(element) { return element != null; }); + } + + function processVocalFileName(args) { + return args.map((arg) => { + if (arg.key.toLowerCase().match(/.ogg|.mp3|.wav/)) { + return { + key: "vocal", + value: arg.key + }; + } + return arg; + }); + } + + function processNone(content) { + if (content === "" || content.toLowerCase() === "none") { + return ""; + } + return content; + } + +function peg$subclass(child, parent) { + function C() { this.constructor = child; } + C.prototype = parent.prototype; + child.prototype = new C(); +} + +function peg$SyntaxError(message, expected, found, location) { + var self = Error.call(this, message); + // istanbul ignore next Check is a necessary evil to support older environments + if (Object.setPrototypeOf) { + Object.setPrototypeOf(self, peg$SyntaxError.prototype); + } + self.expected = expected; + self.found = found; + self.location = location; + self.name = "SyntaxError"; + return self; +} + +peg$subclass(peg$SyntaxError, Error); + +function peg$padEnd(str, targetLength, padString) { + padString = padString || " "; + if (str.length > targetLength) { return str; } + targetLength -= str.length; + padString += padString.repeat(targetLength); + return str + padString.slice(0, targetLength); +} + +peg$SyntaxError.prototype.format = function(sources) { + var str = "Error: " + this.message; + if (this.location) { + var src = null; + var k; + for (k = 0; k < sources.length; k++) { + if (sources[k].source === this.location.source) { + src = sources[k].text.split(/\r\n|\n|\r/g); + break; + } + } + var s = this.location.start; + var offset_s = (this.location.source && (typeof this.location.source.offset === "function")) + ? this.location.source.offset(s) + : s; + var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column; + if (src) { + var e = this.location.end; + var filler = peg$padEnd("", offset_s.line.toString().length, ' '); + var line = src[s.line - 1]; + var last = s.line === e.line ? e.column : line.length + 1; + var hatLen = (last - s.column) || 1; + str += "\n --> " + loc + "\n" + + filler + " |\n" + + offset_s.line + " | " + line + "\n" + + filler + " | " + peg$padEnd("", s.column - 1, ' ') + + peg$padEnd("", hatLen, "^"); + } else { + str += "\n at " + loc; + } + } + return str; +}; + +peg$SyntaxError.buildMessage = function(expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function(expectation) { + return "\"" + literalEscape(expectation.text) + "\""; + }, + + class: function(expectation) { + var escapedParts = expectation.parts.map(function(part) { + return Array.isArray(part) + ? classEscape(part[0]) + "-" + classEscape(part[1]) + : classEscape(part); + }); + + return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]"; + }, + + any: function() { + return "any character"; + }, + + end: function() { + return "end of input"; + }, + + other: function(expectation) { + return expectation.description; + } + }; + + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + + function literalEscape(s) { + return s + .replace(/\\/g, "\\\\") + .replace(/"/g, "\\\"") + .replace(/\0/g, "\\0") + .replace(/\t/g, "\\t") + .replace(/\n/g, "\\n") + .replace(/\r/g, "\\r") + .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) + .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); + } + + function classEscape(s) { + return s + .replace(/\\/g, "\\\\") + .replace(/\]/g, "\\]") + .replace(/\^/g, "\\^") + .replace(/-/g, "\\-") + .replace(/\0/g, "\\0") + .replace(/\t/g, "\\t") + .replace(/\n/g, "\\n") + .replace(/\r/g, "\\r") + .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); }) + .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); }); + } + + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + + function describeExpected(expected) { + var descriptions = expected.map(describeExpectation); + var i, j; + + descriptions.sort(); + + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + + switch (descriptions.length) { + case 1: + return descriptions[0]; + + case 2: + return descriptions[0] + " or " + descriptions[1]; + + default: + return descriptions.slice(0, -1).join(", ") + + ", or " + + descriptions[descriptions.length - 1]; + } + } + + function describeFound(found) { + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; + } + + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; +}; + +function peg$parse(input, options) { + options = options !== undefined ? options : {}; + + var peg$FAILED = {}; + var peg$source = options.grammarSource; + + var peg$startRuleFunctions = { Start: peg$parseStart }; + var peg$startRuleFunction = peg$parseStart; + + var peg$c0 = "program"; + var peg$c1 = "body"; + var peg$c2 = "head"; + var peg$c3 = "tail"; + var peg$c4 = ";"; + var peg$c5 = " -"; + var peg$c6 = "key"; + var peg$c7 = "="; + var peg$c8 = "value"; + var peg$c9 = "changeBg"; + var peg$c10 = "changeFigure"; + var peg$c11 = "bgm"; + var peg$c12 = "playVideo"; + var peg$c13 = "pixiPerform"; + var peg$c14 = "pixiInit"; + var peg$c15 = "intro"; + var peg$c16 = "miniAvatar"; + var peg$c17 = "changeScene"; + var peg$c18 = "choose"; + var peg$c19 = "end"; + var peg$c20 = "setComplexAnimation"; + var peg$c21 = "setFilter"; + var peg$c22 = "label"; + var peg$c23 = "jumpLabel"; + var peg$c24 = "chooseLabel"; + var peg$c25 = "setVar"; + var peg$c26 = "if"; + var peg$c27 = "callScene"; + var peg$c28 = "showVars"; + var peg$c29 = "unlockCg"; + var peg$c30 = "unlockBgm"; + var peg$c31 = "filmMode"; + var peg$c32 = "setTextbox"; + var peg$c33 = "setAnimation"; + var peg$c34 = "playEffect"; + var peg$c35 = "setTempAnimation"; + var peg$c36 = "comment"; + var peg$c37 = "setTransform"; + var peg$c38 = "setTransition"; + var peg$c39 = "getUserInput"; + var peg$c40 = "'"; + var peg$c41 = "sequence"; + var peg$c42 = "\""; + var peg$c43 = "\\"; + var peg$c44 = "0"; + var peg$c45 = "b"; + var peg$c46 = "f"; + var peg$c47 = "n"; + var peg$c48 = "r"; + var peg$c49 = "t"; + var peg$c50 = "v"; + var peg$c51 = "x"; + var peg$c52 = "digits"; + var peg$c53 = "u"; + var peg$c54 = "\n"; + var peg$c55 = "\r\n"; + var peg$c56 = ":"; + var peg$c57 = "fileName"; + var peg$c58 = "args"; + var peg$c59 = "performName"; + var peg$c60 = "lines"; + var peg$c61 = "choices"; + var peg$c62 = "|"; + var peg$c63 = "("; + var peg$c64 = "sexp"; + var peg$c65 = ")"; + var peg$c66 = "["; + var peg$c67 = "cexp"; + var peg$c68 = "]"; + var peg$c69 = "->"; + var peg$c70 = "text"; + var peg$c71 = "dest"; + var peg$c72 = "animationName"; + var peg$c73 = "labelName"; + var peg$c74 = "kv"; + var peg$c75 = "sceneName"; + var peg$c76 = "name"; + var peg$c77 = "content"; + var peg$c78 = "json"; + var peg$c79 = "into"; + var peg$c80 = "speaker"; + var peg$c81 = "err"; + + var peg$r0 = /^[(-);={}]/; + var peg$r1 = /^['\\]/; + var peg$r2 = /^["\\]/; + var peg$r3 = /^["'\\]/; + var peg$r4 = /^[(-){}]/; + var peg$r5 = /^[0-9ux]/; + var peg$r6 = /^[0-9]/; + var peg$r7 = /^[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/; + var peg$r8 = /^[0-9a-f]/i; + var peg$r9 = /^[0-9_\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7\u09E2-\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B56-\u0B57\u0B62-\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0CE6-\u0CEF\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62-\u0D63\u0D66-\u0D6F\u0D82-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18-\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19D9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u200C-\u200D\u203F-\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099-\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880-\uA881\uA8B4-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C-\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5-\uAAF6\uABE3-\uABEA\uABEC-\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33-\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]/; + var peg$r10 = /^[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/; + var peg$r11 = /^[\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7\u09E2-\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2-\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B56-\u0B57\u0B62-\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62-\u0D63\u0D82-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099-\u309A\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880-\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C-\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5-\uAAF6\uABE3-\uABEA\uABEC-\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/; + var peg$r12 = /^[\n\r\u2028\u2029]/; + var peg$r13 = /^[\r\u2028-\u2029]/; + var peg$r14 = /^[\t\v-\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/; + var peg$r15 = /^[);]/; + var peg$r16 = /^[:-;]/; + var peg$r17 = /^[a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137-\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148-\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C-\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA-\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9-\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC-\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF-\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F-\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0-\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB-\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE-\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6-\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FC7\u1FD0-\u1FD3\u1FD6-\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6-\u1FF7\u210A\u210E-\u210F\u2113\u212F\u2134\u2139\u213C-\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65-\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73-\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3-\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]/; + var peg$r18 = /^[\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5-\u06E6\u07F4-\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C-\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D-\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C-\uA69D\uA717-\uA71F\uA770\uA788\uA7F8-\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3-\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E-\uFF9F]/; + var peg$r19 = /^[\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A-\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/; + var peg$r20 = /^[\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC]/; + var peg$r21 = /^[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178-\u0179\u017B\u017D\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018B\u018E-\u0191\u0193-\u0194\u0196-\u0198\u019C-\u019D\u019F-\u01A0\u01A2\u01A4\u01A6-\u01A7\u01A9\u01AC\u01AE-\u01AF\u01B1-\u01B3\u01B5\u01B7-\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A-\u023B\u023D-\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E-\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9-\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0-\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E-\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D-\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A]/; + var peg$r22 = /^[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0982-\u0983\u09BE-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0B02-\u0B03\u0B3E\u0B40\u0B47-\u0B48\u0B4B-\u0B4C\u0B57\u0BBE-\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82-\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7-\u0CC8\u0CCA-\u0CCB\u0CD5-\u0CD6\u0D02-\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82-\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2-\u0DF3\u0F3E-\u0F3F\u0F7F\u102B-\u102C\u1031\u1038\u103B-\u103C\u1056-\u1057\u1062-\u1064\u1067-\u106D\u1083-\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7-\u17C8\u1923-\u1926\u1929-\u192B\u1930-\u1931\u1933-\u1938\u1A19-\u1A1A\u1A55\u1A57\u1A61\u1A63-\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B82\u1BA1\u1BA6-\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1C24-\u1C2B\u1C34-\u1C35\u1CE1\u1CF2-\u1CF3\u302E-\u302F\uA823-\uA824\uA827\uA880-\uA881\uA8B4-\uA8C3\uA952-\uA953\uA983\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BD-\uA9C0\uAA2F-\uAA30\uAA33-\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE-\uAAEF\uAAF5\uABE3-\uABE4\uABE6-\uABE7\uABE9-\uABEA\uABEC]/; + var peg$r23 = /^[\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2-\u09E3\u0A01-\u0A02\u0A3C\u0A41-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7-\u0AC8\u0ACD\u0AE2-\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62-\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC-\u0CCD\u0CE2-\u0CE3\u0D01\u0D41-\u0D44\u0D4D\u0D62-\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039-\u103A\u103D-\u103E\u1058-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193B\u1A17-\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80-\u1B81\u1BA2-\u1BA5\u1BA8-\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8-\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099-\u309A\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA825-\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31-\uAA32\uAA35-\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEC-\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/; + var peg$r24 = /^[0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]/; + var peg$r25 = /^[\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF]/; + var peg$r26 = /^[_\u203F-\u2040\u2054\uFE33-\uFE34\uFE4D-\uFE4F\uFF3F]/; + var peg$r27 = /^[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/; + + var peg$e0 = peg$anyExpectation(); + var peg$e1 = peg$literalExpectation(";", false); + var peg$e2 = peg$otherExpectation("source element"); + var peg$e3 = peg$otherExpectation("arguments"); + var peg$e4 = peg$otherExpectation("argument"); + var peg$e5 = peg$literalExpectation(" -", false); + var peg$e6 = peg$otherExpectation("argument with value"); + var peg$e7 = peg$literalExpectation("=", false); + var peg$e8 = peg$otherExpectation("argument without value"); + var peg$e9 = peg$otherExpectation("reserve word"); + var peg$e10 = peg$otherExpectation("'changeBg'"); + var peg$e11 = peg$literalExpectation("changeBg", false); + var peg$e12 = peg$otherExpectation("'changeFigure'"); + var peg$e13 = peg$literalExpectation("changeFigure", false); + var peg$e14 = peg$otherExpectation("'bgm'"); + var peg$e15 = peg$literalExpectation("bgm", false); + var peg$e16 = peg$otherExpectation("'playVideo'"); + var peg$e17 = peg$literalExpectation("playVideo", false); + var peg$e18 = peg$otherExpectation("'pixiPerform'"); + var peg$e19 = peg$literalExpectation("pixiPerform", false); + var peg$e20 = peg$otherExpectation("'pixiInit'"); + var peg$e21 = peg$literalExpectation("pixiInit", false); + var peg$e22 = peg$otherExpectation("'intro'"); + var peg$e23 = peg$literalExpectation("intro", false); + var peg$e24 = peg$otherExpectation("'miniAvatar'"); + var peg$e25 = peg$literalExpectation("miniAvatar", false); + var peg$e26 = peg$otherExpectation("'changeScene'"); + var peg$e27 = peg$literalExpectation("changeScene", false); + var peg$e28 = peg$otherExpectation("'choose'"); + var peg$e29 = peg$literalExpectation("choose", false); + var peg$e30 = peg$otherExpectation("'end'"); + var peg$e31 = peg$literalExpectation("end", false); + var peg$e32 = peg$otherExpectation("'setComplexAnimation'"); + var peg$e33 = peg$literalExpectation("setComplexAnimation", false); + var peg$e34 = peg$otherExpectation("'setFilter'"); + var peg$e35 = peg$literalExpectation("setFilter", false); + var peg$e36 = peg$otherExpectation("'label'"); + var peg$e37 = peg$literalExpectation("label", false); + var peg$e38 = peg$otherExpectation("'jumpLabel'"); + var peg$e39 = peg$literalExpectation("jumpLabel", false); + var peg$e40 = peg$otherExpectation("'chooseLabel'"); + var peg$e41 = peg$literalExpectation("chooseLabel", false); + var peg$e42 = peg$otherExpectation("'setVar'"); + var peg$e43 = peg$literalExpectation("setVar", false); + var peg$e44 = peg$otherExpectation("'if'"); + var peg$e45 = peg$literalExpectation("if", false); + var peg$e46 = peg$otherExpectation("'callScene'"); + var peg$e47 = peg$literalExpectation("callScene", false); + var peg$e48 = peg$otherExpectation("'showVars'"); + var peg$e49 = peg$literalExpectation("showVars", false); + var peg$e50 = peg$otherExpectation("'unlockCg'"); + var peg$e51 = peg$literalExpectation("unlockCg", false); + var peg$e52 = peg$otherExpectation("'unlockBgm'"); + var peg$e53 = peg$literalExpectation("unlockBgm", false); + var peg$e54 = peg$otherExpectation("'filmMode'"); + var peg$e55 = peg$literalExpectation("filmMode", false); + var peg$e56 = peg$otherExpectation("'setTextbox'"); + var peg$e57 = peg$literalExpectation("setTextbox", false); + var peg$e58 = peg$otherExpectation("'setAnimation'"); + var peg$e59 = peg$literalExpectation("setAnimation", false); + var peg$e60 = peg$otherExpectation("'playEffect'"); + var peg$e61 = peg$literalExpectation("playEffect", false); + var peg$e62 = peg$otherExpectation("'setTempAnimation'"); + var peg$e63 = peg$literalExpectation("setTempAnimation", false); + var peg$e64 = peg$otherExpectation("'comment'"); + var peg$e65 = peg$literalExpectation("comment", false); + var peg$e66 = peg$otherExpectation("'setTransform'"); + var peg$e67 = peg$literalExpectation("setTransform", false); + var peg$e68 = peg$otherExpectation("'setTransition'"); + var peg$e69 = peg$literalExpectation("setTransition", false); + var peg$e70 = peg$otherExpectation("'getUserInput'"); + var peg$e71 = peg$literalExpectation("getUserInput", false); + var peg$e72 = peg$classExpectation([["(", ")"], ";", "=", "{", "}"], false, false); + var peg$e73 = peg$otherExpectation("string"); + var peg$e74 = peg$literalExpectation("'", false); + var peg$e75 = peg$literalExpectation("\"", false); + var peg$e76 = peg$otherExpectation("string allow white space"); + var peg$e77 = peg$classExpectation(["'", "\\"], false, false); + var peg$e78 = peg$literalExpectation("\\", false); + var peg$e79 = peg$classExpectation(["\"", "\\"], false, false); + var peg$e80 = peg$literalExpectation("0", false); + var peg$e81 = peg$classExpectation(["\"", "'", "\\"], false, false); + var peg$e82 = peg$literalExpectation("b", false); + var peg$e83 = peg$literalExpectation("f", false); + var peg$e84 = peg$literalExpectation("n", false); + var peg$e85 = peg$literalExpectation("r", false); + var peg$e86 = peg$literalExpectation("t", false); + var peg$e87 = peg$literalExpectation("v", false); + var peg$e88 = peg$classExpectation([["(", ")"], "{", "}"], false, false); + var peg$e89 = peg$classExpectation([["0", "9"], "u", "x"], false, false); + var peg$e90 = peg$classExpectation([["0", "9"]], false, false); + var peg$e91 = peg$literalExpectation("x", false); + var peg$e92 = peg$literalExpectation("u", false); + var peg$e93 = peg$classExpectation(["$", ["A", "Z"], "_", ["a", "z"], "\xAA", "\xB5", "\xBA", ["\xC0", "\xD6"], ["\xD8", "\xF6"], ["\xF8", "\u02C1"], ["\u02C6", "\u02D1"], ["\u02E0", "\u02E4"], "\u02EC", "\u02EE", ["\u0370", "\u0374"], ["\u0376", "\u0377"], ["\u037A", "\u037D"], "\u037F", "\u0386", ["\u0388", "\u038A"], "\u038C", ["\u038E", "\u03A1"], ["\u03A3", "\u03F5"], ["\u03F7", "\u0481"], ["\u048A", "\u052F"], ["\u0531", "\u0556"], "\u0559", ["\u0561", "\u0587"], ["\u05D0", "\u05EA"], ["\u05F0", "\u05F2"], ["\u0620", "\u064A"], ["\u066E", "\u066F"], ["\u0671", "\u06D3"], "\u06D5", ["\u06E5", "\u06E6"], ["\u06EE", "\u06EF"], ["\u06FA", "\u06FC"], "\u06FF", "\u0710", ["\u0712", "\u072F"], ["\u074D", "\u07A5"], "\u07B1", ["\u07CA", "\u07EA"], ["\u07F4", "\u07F5"], "\u07FA", ["\u0800", "\u0815"], "\u081A", "\u0824", "\u0828", ["\u0840", "\u0858"], ["\u08A0", "\u08B4"], ["\u0904", "\u0939"], "\u093D", "\u0950", ["\u0958", "\u0961"], ["\u0971", "\u0980"], ["\u0985", "\u098C"], ["\u098F", "\u0990"], ["\u0993", "\u09A8"], ["\u09AA", "\u09B0"], "\u09B2", ["\u09B6", "\u09B9"], "\u09BD", "\u09CE", ["\u09DC", "\u09DD"], ["\u09DF", "\u09E1"], ["\u09F0", "\u09F1"], ["\u0A05", "\u0A0A"], ["\u0A0F", "\u0A10"], ["\u0A13", "\u0A28"], ["\u0A2A", "\u0A30"], ["\u0A32", "\u0A33"], ["\u0A35", "\u0A36"], ["\u0A38", "\u0A39"], ["\u0A59", "\u0A5C"], "\u0A5E", ["\u0A72", "\u0A74"], ["\u0A85", "\u0A8D"], ["\u0A8F", "\u0A91"], ["\u0A93", "\u0AA8"], ["\u0AAA", "\u0AB0"], ["\u0AB2", "\u0AB3"], ["\u0AB5", "\u0AB9"], "\u0ABD", "\u0AD0", ["\u0AE0", "\u0AE1"], "\u0AF9", ["\u0B05", "\u0B0C"], ["\u0B0F", "\u0B10"], ["\u0B13", "\u0B28"], ["\u0B2A", "\u0B30"], ["\u0B32", "\u0B33"], ["\u0B35", "\u0B39"], "\u0B3D", ["\u0B5C", "\u0B5D"], ["\u0B5F", "\u0B61"], "\u0B71", "\u0B83", ["\u0B85", "\u0B8A"], ["\u0B8E", "\u0B90"], ["\u0B92", "\u0B95"], ["\u0B99", "\u0B9A"], "\u0B9C", ["\u0B9E", "\u0B9F"], ["\u0BA3", "\u0BA4"], ["\u0BA8", "\u0BAA"], ["\u0BAE", "\u0BB9"], "\u0BD0", ["\u0C05", "\u0C0C"], ["\u0C0E", "\u0C10"], ["\u0C12", "\u0C28"], ["\u0C2A", "\u0C39"], "\u0C3D", ["\u0C58", "\u0C5A"], ["\u0C60", "\u0C61"], ["\u0C85", "\u0C8C"], ["\u0C8E", "\u0C90"], ["\u0C92", "\u0CA8"], ["\u0CAA", "\u0CB3"], ["\u0CB5", "\u0CB9"], "\u0CBD", "\u0CDE", ["\u0CE0", "\u0CE1"], ["\u0CF1", "\u0CF2"], ["\u0D05", "\u0D0C"], ["\u0D0E", "\u0D10"], ["\u0D12", "\u0D3A"], "\u0D3D", "\u0D4E", ["\u0D5F", "\u0D61"], ["\u0D7A", "\u0D7F"], ["\u0D85", "\u0D96"], ["\u0D9A", "\u0DB1"], ["\u0DB3", "\u0DBB"], "\u0DBD", ["\u0DC0", "\u0DC6"], ["\u0E01", "\u0E30"], ["\u0E32", "\u0E33"], ["\u0E40", "\u0E46"], ["\u0E81", "\u0E82"], "\u0E84", ["\u0E87", "\u0E88"], "\u0E8A", "\u0E8D", ["\u0E94", "\u0E97"], ["\u0E99", "\u0E9F"], ["\u0EA1", "\u0EA3"], "\u0EA5", "\u0EA7", ["\u0EAA", "\u0EAB"], ["\u0EAD", "\u0EB0"], ["\u0EB2", "\u0EB3"], "\u0EBD", ["\u0EC0", "\u0EC4"], "\u0EC6", ["\u0EDC", "\u0EDF"], "\u0F00", ["\u0F40", "\u0F47"], ["\u0F49", "\u0F6C"], ["\u0F88", "\u0F8C"], ["\u1000", "\u102A"], "\u103F", ["\u1050", "\u1055"], ["\u105A", "\u105D"], "\u1061", ["\u1065", "\u1066"], ["\u106E", "\u1070"], ["\u1075", "\u1081"], "\u108E", ["\u10A0", "\u10C5"], "\u10C7", "\u10CD", ["\u10D0", "\u10FA"], ["\u10FC", "\u1248"], ["\u124A", "\u124D"], ["\u1250", "\u1256"], "\u1258", ["\u125A", "\u125D"], ["\u1260", "\u1288"], ["\u128A", "\u128D"], ["\u1290", "\u12B0"], ["\u12B2", "\u12B5"], ["\u12B8", "\u12BE"], "\u12C0", ["\u12C2", "\u12C5"], ["\u12C8", "\u12D6"], ["\u12D8", "\u1310"], ["\u1312", "\u1315"], ["\u1318", "\u135A"], ["\u1380", "\u138F"], ["\u13A0", "\u13F5"], ["\u13F8", "\u13FD"], ["\u1401", "\u166C"], ["\u166F", "\u167F"], ["\u1681", "\u169A"], ["\u16A0", "\u16EA"], ["\u16EE", "\u16F8"], ["\u1700", "\u170C"], ["\u170E", "\u1711"], ["\u1720", "\u1731"], ["\u1740", "\u1751"], ["\u1760", "\u176C"], ["\u176E", "\u1770"], ["\u1780", "\u17B3"], "\u17D7", "\u17DC", ["\u1820", "\u1877"], ["\u1880", "\u18A8"], "\u18AA", ["\u18B0", "\u18F5"], ["\u1900", "\u191E"], ["\u1950", "\u196D"], ["\u1970", "\u1974"], ["\u1980", "\u19AB"], ["\u19B0", "\u19C9"], ["\u1A00", "\u1A16"], ["\u1A20", "\u1A54"], "\u1AA7", ["\u1B05", "\u1B33"], ["\u1B45", "\u1B4B"], ["\u1B83", "\u1BA0"], ["\u1BAE", "\u1BAF"], ["\u1BBA", "\u1BE5"], ["\u1C00", "\u1C23"], ["\u1C4D", "\u1C4F"], ["\u1C5A", "\u1C7D"], ["\u1CE9", "\u1CEC"], ["\u1CEE", "\u1CF1"], ["\u1CF5", "\u1CF6"], ["\u1D00", "\u1DBF"], ["\u1E00", "\u1F15"], ["\u1F18", "\u1F1D"], ["\u1F20", "\u1F45"], ["\u1F48", "\u1F4D"], ["\u1F50", "\u1F57"], "\u1F59", "\u1F5B", "\u1F5D", ["\u1F5F", "\u1F7D"], ["\u1F80", "\u1FB4"], ["\u1FB6", "\u1FBC"], "\u1FBE", ["\u1FC2", "\u1FC4"], ["\u1FC6", "\u1FCC"], ["\u1FD0", "\u1FD3"], ["\u1FD6", "\u1FDB"], ["\u1FE0", "\u1FEC"], ["\u1FF2", "\u1FF4"], ["\u1FF6", "\u1FFC"], "\u2071", "\u207F", ["\u2090", "\u209C"], "\u2102", "\u2107", ["\u210A", "\u2113"], "\u2115", ["\u2119", "\u211D"], "\u2124", "\u2126", "\u2128", ["\u212A", "\u212D"], ["\u212F", "\u2139"], ["\u213C", "\u213F"], ["\u2145", "\u2149"], "\u214E", ["\u2160", "\u2188"], ["\u2C00", "\u2C2E"], ["\u2C30", "\u2C5E"], ["\u2C60", "\u2CE4"], ["\u2CEB", "\u2CEE"], ["\u2CF2", "\u2CF3"], ["\u2D00", "\u2D25"], "\u2D27", "\u2D2D", ["\u2D30", "\u2D67"], "\u2D6F", ["\u2D80", "\u2D96"], ["\u2DA0", "\u2DA6"], ["\u2DA8", "\u2DAE"], ["\u2DB0", "\u2DB6"], ["\u2DB8", "\u2DBE"], ["\u2DC0", "\u2DC6"], ["\u2DC8", "\u2DCE"], ["\u2DD0", "\u2DD6"], ["\u2DD8", "\u2DDE"], "\u2E2F", ["\u3005", "\u3007"], ["\u3021", "\u3029"], ["\u3031", "\u3035"], ["\u3038", "\u303C"], ["\u3041", "\u3096"], ["\u309D", "\u309F"], ["\u30A1", "\u30FA"], ["\u30FC", "\u30FF"], ["\u3105", "\u312D"], ["\u3131", "\u318E"], ["\u31A0", "\u31BA"], ["\u31F0", "\u31FF"], ["\u3400", "\u4DB5"], ["\u4E00", "\u9FD5"], ["\uA000", "\uA48C"], ["\uA4D0", "\uA4FD"], ["\uA500", "\uA60C"], ["\uA610", "\uA61F"], ["\uA62A", "\uA62B"], ["\uA640", "\uA66E"], ["\uA67F", "\uA69D"], ["\uA6A0", "\uA6EF"], ["\uA717", "\uA71F"], ["\uA722", "\uA788"], ["\uA78B", "\uA7AD"], ["\uA7B0", "\uA7B7"], ["\uA7F7", "\uA801"], ["\uA803", "\uA805"], ["\uA807", "\uA80A"], ["\uA80C", "\uA822"], ["\uA840", "\uA873"], ["\uA882", "\uA8B3"], ["\uA8F2", "\uA8F7"], "\uA8FB", "\uA8FD", ["\uA90A", "\uA925"], ["\uA930", "\uA946"], ["\uA960", "\uA97C"], ["\uA984", "\uA9B2"], "\uA9CF", ["\uA9E0", "\uA9E4"], ["\uA9E6", "\uA9EF"], ["\uA9FA", "\uA9FE"], ["\uAA00", "\uAA28"], ["\uAA40", "\uAA42"], ["\uAA44", "\uAA4B"], ["\uAA60", "\uAA76"], "\uAA7A", ["\uAA7E", "\uAAAF"], "\uAAB1", ["\uAAB5", "\uAAB6"], ["\uAAB9", "\uAABD"], "\uAAC0", "\uAAC2", ["\uAADB", "\uAADD"], ["\uAAE0", "\uAAEA"], ["\uAAF2", "\uAAF4"], ["\uAB01", "\uAB06"], ["\uAB09", "\uAB0E"], ["\uAB11", "\uAB16"], ["\uAB20", "\uAB26"], ["\uAB28", "\uAB2E"], ["\uAB30", "\uAB5A"], ["\uAB5C", "\uAB65"], ["\uAB70", "\uABE2"], ["\uAC00", "\uD7A3"], ["\uD7B0", "\uD7C6"], ["\uD7CB", "\uD7FB"], ["\uF900", "\uFA6D"], ["\uFA70", "\uFAD9"], ["\uFB00", "\uFB06"], ["\uFB13", "\uFB17"], "\uFB1D", ["\uFB1F", "\uFB28"], ["\uFB2A", "\uFB36"], ["\uFB38", "\uFB3C"], "\uFB3E", ["\uFB40", "\uFB41"], ["\uFB43", "\uFB44"], ["\uFB46", "\uFBB1"], ["\uFBD3", "\uFD3D"], ["\uFD50", "\uFD8F"], ["\uFD92", "\uFDC7"], ["\uFDF0", "\uFDFB"], ["\uFE70", "\uFE74"], ["\uFE76", "\uFEFC"], ["\uFF21", "\uFF3A"], ["\uFF41", "\uFF5A"], ["\uFF66", "\uFFBE"], ["\uFFC2", "\uFFC7"], ["\uFFCA", "\uFFCF"], ["\uFFD2", "\uFFD7"], ["\uFFDA", "\uFFDC"]], false, false); + var peg$e94 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true); + var peg$e95 = peg$classExpectation([["0", "9"], "_", ["\u0300", "\u036F"], ["\u0483", "\u0487"], ["\u0591", "\u05BD"], "\u05BF", ["\u05C1", "\u05C2"], ["\u05C4", "\u05C5"], "\u05C7", ["\u0610", "\u061A"], ["\u064B", "\u0669"], "\u0670", ["\u06D6", "\u06DC"], ["\u06DF", "\u06E4"], ["\u06E7", "\u06E8"], ["\u06EA", "\u06ED"], ["\u06F0", "\u06F9"], "\u0711", ["\u0730", "\u074A"], ["\u07A6", "\u07B0"], ["\u07C0", "\u07C9"], ["\u07EB", "\u07F3"], ["\u0816", "\u0819"], ["\u081B", "\u0823"], ["\u0825", "\u0827"], ["\u0829", "\u082D"], ["\u0859", "\u085B"], ["\u08E3", "\u0903"], ["\u093A", "\u093C"], ["\u093E", "\u094F"], ["\u0951", "\u0957"], ["\u0962", "\u0963"], ["\u0966", "\u096F"], ["\u0981", "\u0983"], "\u09BC", ["\u09BE", "\u09C4"], ["\u09C7", "\u09C8"], ["\u09CB", "\u09CD"], "\u09D7", ["\u09E2", "\u09E3"], ["\u09E6", "\u09EF"], ["\u0A01", "\u0A03"], "\u0A3C", ["\u0A3E", "\u0A42"], ["\u0A47", "\u0A48"], ["\u0A4B", "\u0A4D"], "\u0A51", ["\u0A66", "\u0A71"], "\u0A75", ["\u0A81", "\u0A83"], "\u0ABC", ["\u0ABE", "\u0AC5"], ["\u0AC7", "\u0AC9"], ["\u0ACB", "\u0ACD"], ["\u0AE2", "\u0AE3"], ["\u0AE6", "\u0AEF"], ["\u0B01", "\u0B03"], "\u0B3C", ["\u0B3E", "\u0B44"], ["\u0B47", "\u0B48"], ["\u0B4B", "\u0B4D"], ["\u0B56", "\u0B57"], ["\u0B62", "\u0B63"], ["\u0B66", "\u0B6F"], "\u0B82", ["\u0BBE", "\u0BC2"], ["\u0BC6", "\u0BC8"], ["\u0BCA", "\u0BCD"], "\u0BD7", ["\u0BE6", "\u0BEF"], ["\u0C00", "\u0C03"], ["\u0C3E", "\u0C44"], ["\u0C46", "\u0C48"], ["\u0C4A", "\u0C4D"], ["\u0C55", "\u0C56"], ["\u0C62", "\u0C63"], ["\u0C66", "\u0C6F"], ["\u0C81", "\u0C83"], "\u0CBC", ["\u0CBE", "\u0CC4"], ["\u0CC6", "\u0CC8"], ["\u0CCA", "\u0CCD"], ["\u0CD5", "\u0CD6"], ["\u0CE2", "\u0CE3"], ["\u0CE6", "\u0CEF"], ["\u0D01", "\u0D03"], ["\u0D3E", "\u0D44"], ["\u0D46", "\u0D48"], ["\u0D4A", "\u0D4D"], "\u0D57", ["\u0D62", "\u0D63"], ["\u0D66", "\u0D6F"], ["\u0D82", "\u0D83"], "\u0DCA", ["\u0DCF", "\u0DD4"], "\u0DD6", ["\u0DD8", "\u0DDF"], ["\u0DE6", "\u0DEF"], ["\u0DF2", "\u0DF3"], "\u0E31", ["\u0E34", "\u0E3A"], ["\u0E47", "\u0E4E"], ["\u0E50", "\u0E59"], "\u0EB1", ["\u0EB4", "\u0EB9"], ["\u0EBB", "\u0EBC"], ["\u0EC8", "\u0ECD"], ["\u0ED0", "\u0ED9"], ["\u0F18", "\u0F19"], ["\u0F20", "\u0F29"], "\u0F35", "\u0F37", "\u0F39", ["\u0F3E", "\u0F3F"], ["\u0F71", "\u0F84"], ["\u0F86", "\u0F87"], ["\u0F8D", "\u0F97"], ["\u0F99", "\u0FBC"], "\u0FC6", ["\u102B", "\u103E"], ["\u1040", "\u1049"], ["\u1056", "\u1059"], ["\u105E", "\u1060"], ["\u1062", "\u1064"], ["\u1067", "\u106D"], ["\u1071", "\u1074"], ["\u1082", "\u108D"], ["\u108F", "\u109D"], ["\u135D", "\u135F"], ["\u1712", "\u1714"], ["\u1732", "\u1734"], ["\u1752", "\u1753"], ["\u1772", "\u1773"], ["\u17B4", "\u17D3"], "\u17DD", ["\u17E0", "\u17E9"], ["\u180B", "\u180D"], ["\u1810", "\u1819"], "\u18A9", ["\u1920", "\u192B"], ["\u1930", "\u193B"], ["\u1946", "\u194F"], ["\u19D0", "\u19D9"], ["\u1A17", "\u1A1B"], ["\u1A55", "\u1A5E"], ["\u1A60", "\u1A7C"], ["\u1A7F", "\u1A89"], ["\u1A90", "\u1A99"], ["\u1AB0", "\u1ABD"], ["\u1B00", "\u1B04"], ["\u1B34", "\u1B44"], ["\u1B50", "\u1B59"], ["\u1B6B", "\u1B73"], ["\u1B80", "\u1B82"], ["\u1BA1", "\u1BAD"], ["\u1BB0", "\u1BB9"], ["\u1BE6", "\u1BF3"], ["\u1C24", "\u1C37"], ["\u1C40", "\u1C49"], ["\u1C50", "\u1C59"], ["\u1CD0", "\u1CD2"], ["\u1CD4", "\u1CE8"], "\u1CED", ["\u1CF2", "\u1CF4"], ["\u1CF8", "\u1CF9"], ["\u1DC0", "\u1DF5"], ["\u1DFC", "\u1DFF"], ["\u200C", "\u200D"], ["\u203F", "\u2040"], "\u2054", ["\u20D0", "\u20DC"], "\u20E1", ["\u20E5", "\u20F0"], ["\u2CEF", "\u2CF1"], "\u2D7F", ["\u2DE0", "\u2DFF"], ["\u302A", "\u302F"], ["\u3099", "\u309A"], ["\uA620", "\uA629"], "\uA66F", ["\uA674", "\uA67D"], ["\uA69E", "\uA69F"], ["\uA6F0", "\uA6F1"], "\uA802", "\uA806", "\uA80B", ["\uA823", "\uA827"], ["\uA880", "\uA881"], ["\uA8B4", "\uA8C4"], ["\uA8D0", "\uA8D9"], ["\uA8E0", "\uA8F1"], ["\uA900", "\uA909"], ["\uA926", "\uA92D"], ["\uA947", "\uA953"], ["\uA980", "\uA983"], ["\uA9B3", "\uA9C0"], ["\uA9D0", "\uA9D9"], "\uA9E5", ["\uA9F0", "\uA9F9"], ["\uAA29", "\uAA36"], "\uAA43", ["\uAA4C", "\uAA4D"], ["\uAA50", "\uAA59"], ["\uAA7B", "\uAA7D"], "\uAAB0", ["\uAAB2", "\uAAB4"], ["\uAAB7", "\uAAB8"], ["\uAABE", "\uAABF"], "\uAAC1", ["\uAAEB", "\uAAEF"], ["\uAAF5", "\uAAF6"], ["\uABE3", "\uABEA"], ["\uABEC", "\uABED"], ["\uABF0", "\uABF9"], "\uFB1E", ["\uFE00", "\uFE0F"], ["\uFE20", "\uFE2F"], ["\uFE33", "\uFE34"], ["\uFE4D", "\uFE4F"], ["\uFF10", "\uFF19"], "\uFF3F"], false, false); + var peg$e96 = peg$classExpectation([["A", "Z"], ["a", "z"], "\xAA", "\xB5", "\xBA", ["\xC0", "\xD6"], ["\xD8", "\xF6"], ["\xF8", "\u02C1"], ["\u02C6", "\u02D1"], ["\u02E0", "\u02E4"], "\u02EC", "\u02EE", ["\u0370", "\u0374"], ["\u0376", "\u0377"], ["\u037A", "\u037D"], "\u037F", "\u0386", ["\u0388", "\u038A"], "\u038C", ["\u038E", "\u03A1"], ["\u03A3", "\u03F5"], ["\u03F7", "\u0481"], ["\u048A", "\u052F"], ["\u0531", "\u0556"], "\u0559", ["\u0561", "\u0587"], ["\u05D0", "\u05EA"], ["\u05F0", "\u05F2"], ["\u0620", "\u064A"], ["\u066E", "\u066F"], ["\u0671", "\u06D3"], "\u06D5", ["\u06E5", "\u06E6"], ["\u06EE", "\u06EF"], ["\u06FA", "\u06FC"], "\u06FF", "\u0710", ["\u0712", "\u072F"], ["\u074D", "\u07A5"], "\u07B1", ["\u07CA", "\u07EA"], ["\u07F4", "\u07F5"], "\u07FA", ["\u0800", "\u0815"], "\u081A", "\u0824", "\u0828", ["\u0840", "\u0858"], ["\u08A0", "\u08B4"], ["\u0904", "\u0939"], "\u093D", "\u0950", ["\u0958", "\u0961"], ["\u0971", "\u0980"], ["\u0985", "\u098C"], ["\u098F", "\u0990"], ["\u0993", "\u09A8"], ["\u09AA", "\u09B0"], "\u09B2", ["\u09B6", "\u09B9"], "\u09BD", "\u09CE", ["\u09DC", "\u09DD"], ["\u09DF", "\u09E1"], ["\u09F0", "\u09F1"], ["\u0A05", "\u0A0A"], ["\u0A0F", "\u0A10"], ["\u0A13", "\u0A28"], ["\u0A2A", "\u0A30"], ["\u0A32", "\u0A33"], ["\u0A35", "\u0A36"], ["\u0A38", "\u0A39"], ["\u0A59", "\u0A5C"], "\u0A5E", ["\u0A72", "\u0A74"], ["\u0A85", "\u0A8D"], ["\u0A8F", "\u0A91"], ["\u0A93", "\u0AA8"], ["\u0AAA", "\u0AB0"], ["\u0AB2", "\u0AB3"], ["\u0AB5", "\u0AB9"], "\u0ABD", "\u0AD0", ["\u0AE0", "\u0AE1"], "\u0AF9", ["\u0B05", "\u0B0C"], ["\u0B0F", "\u0B10"], ["\u0B13", "\u0B28"], ["\u0B2A", "\u0B30"], ["\u0B32", "\u0B33"], ["\u0B35", "\u0B39"], "\u0B3D", ["\u0B5C", "\u0B5D"], ["\u0B5F", "\u0B61"], "\u0B71", "\u0B83", ["\u0B85", "\u0B8A"], ["\u0B8E", "\u0B90"], ["\u0B92", "\u0B95"], ["\u0B99", "\u0B9A"], "\u0B9C", ["\u0B9E", "\u0B9F"], ["\u0BA3", "\u0BA4"], ["\u0BA8", "\u0BAA"], ["\u0BAE", "\u0BB9"], "\u0BD0", ["\u0C05", "\u0C0C"], ["\u0C0E", "\u0C10"], ["\u0C12", "\u0C28"], ["\u0C2A", "\u0C39"], "\u0C3D", ["\u0C58", "\u0C5A"], ["\u0C60", "\u0C61"], ["\u0C85", "\u0C8C"], ["\u0C8E", "\u0C90"], ["\u0C92", "\u0CA8"], ["\u0CAA", "\u0CB3"], ["\u0CB5", "\u0CB9"], "\u0CBD", "\u0CDE", ["\u0CE0", "\u0CE1"], ["\u0CF1", "\u0CF2"], ["\u0D05", "\u0D0C"], ["\u0D0E", "\u0D10"], ["\u0D12", "\u0D3A"], "\u0D3D", "\u0D4E", ["\u0D5F", "\u0D61"], ["\u0D7A", "\u0D7F"], ["\u0D85", "\u0D96"], ["\u0D9A", "\u0DB1"], ["\u0DB3", "\u0DBB"], "\u0DBD", ["\u0DC0", "\u0DC6"], ["\u0E01", "\u0E30"], ["\u0E32", "\u0E33"], ["\u0E40", "\u0E46"], ["\u0E81", "\u0E82"], "\u0E84", ["\u0E87", "\u0E88"], "\u0E8A", "\u0E8D", ["\u0E94", "\u0E97"], ["\u0E99", "\u0E9F"], ["\u0EA1", "\u0EA3"], "\u0EA5", "\u0EA7", ["\u0EAA", "\u0EAB"], ["\u0EAD", "\u0EB0"], ["\u0EB2", "\u0EB3"], "\u0EBD", ["\u0EC0", "\u0EC4"], "\u0EC6", ["\u0EDC", "\u0EDF"], "\u0F00", ["\u0F40", "\u0F47"], ["\u0F49", "\u0F6C"], ["\u0F88", "\u0F8C"], ["\u1000", "\u102A"], "\u103F", ["\u1050", "\u1055"], ["\u105A", "\u105D"], "\u1061", ["\u1065", "\u1066"], ["\u106E", "\u1070"], ["\u1075", "\u1081"], "\u108E", ["\u10A0", "\u10C5"], "\u10C7", "\u10CD", ["\u10D0", "\u10FA"], ["\u10FC", "\u1248"], ["\u124A", "\u124D"], ["\u1250", "\u1256"], "\u1258", ["\u125A", "\u125D"], ["\u1260", "\u1288"], ["\u128A", "\u128D"], ["\u1290", "\u12B0"], ["\u12B2", "\u12B5"], ["\u12B8", "\u12BE"], "\u12C0", ["\u12C2", "\u12C5"], ["\u12C8", "\u12D6"], ["\u12D8", "\u1310"], ["\u1312", "\u1315"], ["\u1318", "\u135A"], ["\u1380", "\u138F"], ["\u13A0", "\u13F5"], ["\u13F8", "\u13FD"], ["\u1401", "\u166C"], ["\u166F", "\u167F"], ["\u1681", "\u169A"], ["\u16A0", "\u16EA"], ["\u16EE", "\u16F8"], ["\u1700", "\u170C"], ["\u170E", "\u1711"], ["\u1720", "\u1731"], ["\u1740", "\u1751"], ["\u1760", "\u176C"], ["\u176E", "\u1770"], ["\u1780", "\u17B3"], "\u17D7", "\u17DC", ["\u1820", "\u1877"], ["\u1880", "\u18A8"], "\u18AA", ["\u18B0", "\u18F5"], ["\u1900", "\u191E"], ["\u1950", "\u196D"], ["\u1970", "\u1974"], ["\u1980", "\u19AB"], ["\u19B0", "\u19C9"], ["\u1A00", "\u1A16"], ["\u1A20", "\u1A54"], "\u1AA7", ["\u1B05", "\u1B33"], ["\u1B45", "\u1B4B"], ["\u1B83", "\u1BA0"], ["\u1BAE", "\u1BAF"], ["\u1BBA", "\u1BE5"], ["\u1C00", "\u1C23"], ["\u1C4D", "\u1C4F"], ["\u1C5A", "\u1C7D"], ["\u1CE9", "\u1CEC"], ["\u1CEE", "\u1CF1"], ["\u1CF5", "\u1CF6"], ["\u1D00", "\u1DBF"], ["\u1E00", "\u1F15"], ["\u1F18", "\u1F1D"], ["\u1F20", "\u1F45"], ["\u1F48", "\u1F4D"], ["\u1F50", "\u1F57"], "\u1F59", "\u1F5B", "\u1F5D", ["\u1F5F", "\u1F7D"], ["\u1F80", "\u1FB4"], ["\u1FB6", "\u1FBC"], "\u1FBE", ["\u1FC2", "\u1FC4"], ["\u1FC6", "\u1FCC"], ["\u1FD0", "\u1FD3"], ["\u1FD6", "\u1FDB"], ["\u1FE0", "\u1FEC"], ["\u1FF2", "\u1FF4"], ["\u1FF6", "\u1FFC"], "\u2071", "\u207F", ["\u2090", "\u209C"], "\u2102", "\u2107", ["\u210A", "\u2113"], "\u2115", ["\u2119", "\u211D"], "\u2124", "\u2126", "\u2128", ["\u212A", "\u212D"], ["\u212F", "\u2139"], ["\u213C", "\u213F"], ["\u2145", "\u2149"], "\u214E", ["\u2160", "\u2188"], ["\u2C00", "\u2C2E"], ["\u2C30", "\u2C5E"], ["\u2C60", "\u2CE4"], ["\u2CEB", "\u2CEE"], ["\u2CF2", "\u2CF3"], ["\u2D00", "\u2D25"], "\u2D27", "\u2D2D", ["\u2D30", "\u2D67"], "\u2D6F", ["\u2D80", "\u2D96"], ["\u2DA0", "\u2DA6"], ["\u2DA8", "\u2DAE"], ["\u2DB0", "\u2DB6"], ["\u2DB8", "\u2DBE"], ["\u2DC0", "\u2DC6"], ["\u2DC8", "\u2DCE"], ["\u2DD0", "\u2DD6"], ["\u2DD8", "\u2DDE"], "\u2E2F", ["\u3005", "\u3007"], ["\u3021", "\u3029"], ["\u3031", "\u3035"], ["\u3038", "\u303C"], ["\u3041", "\u3096"], ["\u309D", "\u309F"], ["\u30A1", "\u30FA"], ["\u30FC", "\u30FF"], ["\u3105", "\u312D"], ["\u3131", "\u318E"], ["\u31A0", "\u31BA"], ["\u31F0", "\u31FF"], ["\u3400", "\u4DB5"], ["\u4E00", "\u9FD5"], ["\uA000", "\uA48C"], ["\uA4D0", "\uA4FD"], ["\uA500", "\uA60C"], ["\uA610", "\uA61F"], ["\uA62A", "\uA62B"], ["\uA640", "\uA66E"], ["\uA67F", "\uA69D"], ["\uA6A0", "\uA6EF"], ["\uA717", "\uA71F"], ["\uA722", "\uA788"], ["\uA78B", "\uA7AD"], ["\uA7B0", "\uA7B7"], ["\uA7F7", "\uA801"], ["\uA803", "\uA805"], ["\uA807", "\uA80A"], ["\uA80C", "\uA822"], ["\uA840", "\uA873"], ["\uA882", "\uA8B3"], ["\uA8F2", "\uA8F7"], "\uA8FB", "\uA8FD", ["\uA90A", "\uA925"], ["\uA930", "\uA946"], ["\uA960", "\uA97C"], ["\uA984", "\uA9B2"], "\uA9CF", ["\uA9E0", "\uA9E4"], ["\uA9E6", "\uA9EF"], ["\uA9FA", "\uA9FE"], ["\uAA00", "\uAA28"], ["\uAA40", "\uAA42"], ["\uAA44", "\uAA4B"], ["\uAA60", "\uAA76"], "\uAA7A", ["\uAA7E", "\uAAAF"], "\uAAB1", ["\uAAB5", "\uAAB6"], ["\uAAB9", "\uAABD"], "\uAAC0", "\uAAC2", ["\uAADB", "\uAADD"], ["\uAAE0", "\uAAEA"], ["\uAAF2", "\uAAF4"], ["\uAB01", "\uAB06"], ["\uAB09", "\uAB0E"], ["\uAB11", "\uAB16"], ["\uAB20", "\uAB26"], ["\uAB28", "\uAB2E"], ["\uAB30", "\uAB5A"], ["\uAB5C", "\uAB65"], ["\uAB70", "\uABE2"], ["\uAC00", "\uD7A3"], ["\uD7B0", "\uD7C6"], ["\uD7CB", "\uD7FB"], ["\uF900", "\uFA6D"], ["\uFA70", "\uFAD9"], ["\uFB00", "\uFB06"], ["\uFB13", "\uFB17"], "\uFB1D", ["\uFB1F", "\uFB28"], ["\uFB2A", "\uFB36"], ["\uFB38", "\uFB3C"], "\uFB3E", ["\uFB40", "\uFB41"], ["\uFB43", "\uFB44"], ["\uFB46", "\uFBB1"], ["\uFBD3", "\uFD3D"], ["\uFD50", "\uFD8F"], ["\uFD92", "\uFDC7"], ["\uFDF0", "\uFDFB"], ["\uFE70", "\uFE74"], ["\uFE76", "\uFEFC"], ["\uFF21", "\uFF3A"], ["\uFF41", "\uFF5A"], ["\uFF66", "\uFFBE"], ["\uFFC2", "\uFFC7"], ["\uFFCA", "\uFFCF"], ["\uFFD2", "\uFFD7"], ["\uFFDA", "\uFFDC"]], false, false); + var peg$e97 = peg$classExpectation([["\u0300", "\u036F"], ["\u0483", "\u0487"], ["\u0591", "\u05BD"], "\u05BF", ["\u05C1", "\u05C2"], ["\u05C4", "\u05C5"], "\u05C7", ["\u0610", "\u061A"], ["\u064B", "\u065F"], "\u0670", ["\u06D6", "\u06DC"], ["\u06DF", "\u06E4"], ["\u06E7", "\u06E8"], ["\u06EA", "\u06ED"], "\u0711", ["\u0730", "\u074A"], ["\u07A6", "\u07B0"], ["\u07EB", "\u07F3"], ["\u0816", "\u0819"], ["\u081B", "\u0823"], ["\u0825", "\u0827"], ["\u0829", "\u082D"], ["\u0859", "\u085B"], ["\u08E3", "\u0903"], ["\u093A", "\u093C"], ["\u093E", "\u094F"], ["\u0951", "\u0957"], ["\u0962", "\u0963"], ["\u0981", "\u0983"], "\u09BC", ["\u09BE", "\u09C4"], ["\u09C7", "\u09C8"], ["\u09CB", "\u09CD"], "\u09D7", ["\u09E2", "\u09E3"], ["\u0A01", "\u0A03"], "\u0A3C", ["\u0A3E", "\u0A42"], ["\u0A47", "\u0A48"], ["\u0A4B", "\u0A4D"], "\u0A51", ["\u0A70", "\u0A71"], "\u0A75", ["\u0A81", "\u0A83"], "\u0ABC", ["\u0ABE", "\u0AC5"], ["\u0AC7", "\u0AC9"], ["\u0ACB", "\u0ACD"], ["\u0AE2", "\u0AE3"], ["\u0B01", "\u0B03"], "\u0B3C", ["\u0B3E", "\u0B44"], ["\u0B47", "\u0B48"], ["\u0B4B", "\u0B4D"], ["\u0B56", "\u0B57"], ["\u0B62", "\u0B63"], "\u0B82", ["\u0BBE", "\u0BC2"], ["\u0BC6", "\u0BC8"], ["\u0BCA", "\u0BCD"], "\u0BD7", ["\u0C00", "\u0C03"], ["\u0C3E", "\u0C44"], ["\u0C46", "\u0C48"], ["\u0C4A", "\u0C4D"], ["\u0C55", "\u0C56"], ["\u0C62", "\u0C63"], ["\u0C81", "\u0C83"], "\u0CBC", ["\u0CBE", "\u0CC4"], ["\u0CC6", "\u0CC8"], ["\u0CCA", "\u0CCD"], ["\u0CD5", "\u0CD6"], ["\u0CE2", "\u0CE3"], ["\u0D01", "\u0D03"], ["\u0D3E", "\u0D44"], ["\u0D46", "\u0D48"], ["\u0D4A", "\u0D4D"], "\u0D57", ["\u0D62", "\u0D63"], ["\u0D82", "\u0D83"], "\u0DCA", ["\u0DCF", "\u0DD4"], "\u0DD6", ["\u0DD8", "\u0DDF"], ["\u0DF2", "\u0DF3"], "\u0E31", ["\u0E34", "\u0E3A"], ["\u0E47", "\u0E4E"], "\u0EB1", ["\u0EB4", "\u0EB9"], ["\u0EBB", "\u0EBC"], ["\u0EC8", "\u0ECD"], ["\u0F18", "\u0F19"], "\u0F35", "\u0F37", "\u0F39", ["\u0F3E", "\u0F3F"], ["\u0F71", "\u0F84"], ["\u0F86", "\u0F87"], ["\u0F8D", "\u0F97"], ["\u0F99", "\u0FBC"], "\u0FC6", ["\u102B", "\u103E"], ["\u1056", "\u1059"], ["\u105E", "\u1060"], ["\u1062", "\u1064"], ["\u1067", "\u106D"], ["\u1071", "\u1074"], ["\u1082", "\u108D"], "\u108F", ["\u109A", "\u109D"], ["\u135D", "\u135F"], ["\u1712", "\u1714"], ["\u1732", "\u1734"], ["\u1752", "\u1753"], ["\u1772", "\u1773"], ["\u17B4", "\u17D3"], "\u17DD", ["\u180B", "\u180D"], "\u18A9", ["\u1920", "\u192B"], ["\u1930", "\u193B"], ["\u1A17", "\u1A1B"], ["\u1A55", "\u1A5E"], ["\u1A60", "\u1A7C"], "\u1A7F", ["\u1AB0", "\u1ABD"], ["\u1B00", "\u1B04"], ["\u1B34", "\u1B44"], ["\u1B6B", "\u1B73"], ["\u1B80", "\u1B82"], ["\u1BA1", "\u1BAD"], ["\u1BE6", "\u1BF3"], ["\u1C24", "\u1C37"], ["\u1CD0", "\u1CD2"], ["\u1CD4", "\u1CE8"], "\u1CED", ["\u1CF2", "\u1CF4"], ["\u1CF8", "\u1CF9"], ["\u1DC0", "\u1DF5"], ["\u1DFC", "\u1DFF"], ["\u20D0", "\u20DC"], "\u20E1", ["\u20E5", "\u20F0"], ["\u2CEF", "\u2CF1"], "\u2D7F", ["\u2DE0", "\u2DFF"], ["\u302A", "\u302F"], ["\u3099", "\u309A"], "\uA66F", ["\uA674", "\uA67D"], ["\uA69E", "\uA69F"], ["\uA6F0", "\uA6F1"], "\uA802", "\uA806", "\uA80B", ["\uA823", "\uA827"], ["\uA880", "\uA881"], ["\uA8B4", "\uA8C4"], ["\uA8E0", "\uA8F1"], ["\uA926", "\uA92D"], ["\uA947", "\uA953"], ["\uA980", "\uA983"], ["\uA9B3", "\uA9C0"], "\uA9E5", ["\uAA29", "\uAA36"], "\uAA43", ["\uAA4C", "\uAA4D"], ["\uAA7B", "\uAA7D"], "\uAAB0", ["\uAAB2", "\uAAB4"], ["\uAAB7", "\uAAB8"], ["\uAABE", "\uAABF"], "\uAAC1", ["\uAAEB", "\uAAEF"], ["\uAAF5", "\uAAF6"], ["\uABE3", "\uABEA"], ["\uABEC", "\uABED"], "\uFB1E", ["\uFE00", "\uFE0F"], ["\uFE20", "\uFE2F"]], false, false); + var peg$e98 = peg$otherExpectation("line terminator"); + var peg$e99 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], false, false); + var peg$e100 = peg$otherExpectation("end of line"); + var peg$e101 = peg$literalExpectation("\n", false); + var peg$e102 = peg$literalExpectation("\r\n", false); + var peg$e103 = peg$classExpectation(["\r", ["\u2028", "\u2029"]], false, false); + var peg$e104 = peg$otherExpectation("whitespace"); + var peg$e105 = peg$classExpectation(["\t", ["\v", "\f"], " ", "\xA0", "\u1680", ["\u2000", "\u200A"], "\u202F", "\u205F", "\u3000", "\uFEFF"], false, false); + var peg$e106 = peg$otherExpectation("changeBg statement"); + var peg$e107 = peg$literalExpectation(":", false); + var peg$e108 = peg$otherExpectation("changeFigure statement"); + var peg$e109 = peg$otherExpectation("bgm statement"); + var peg$e110 = peg$otherExpectation("video statement"); + var peg$e111 = peg$otherExpectation("pixi statement"); + var peg$e112 = peg$otherExpectation("pixiInit statement"); + var peg$e113 = peg$otherExpectation("intro statement"); + var peg$e114 = peg$otherExpectation("miniAvatar statement"); + var peg$e115 = peg$otherExpectation("changeScene statement"); + var peg$e116 = peg$otherExpectation("choose statement"); + var peg$e117 = peg$otherExpectation("choices"); + var peg$e118 = peg$literalExpectation("|", false); + var peg$e119 = peg$otherExpectation("choice"); + var peg$e120 = peg$literalExpectation("(", false); + var peg$e121 = peg$literalExpectation(")", false); + var peg$e122 = peg$literalExpectation("[", false); + var peg$e123 = peg$literalExpectation("]", false); + var peg$e124 = peg$literalExpectation("->", false); + var peg$e125 = peg$otherExpectation("end statement"); + var peg$e126 = peg$otherExpectation("setComplexAnimation statement"); + var peg$e127 = peg$otherExpectation("setFilter statement"); + var peg$e128 = peg$otherExpectation("label statement"); + var peg$e129 = peg$otherExpectation("jumpLabel statement"); + var peg$e130 = peg$otherExpectation("setVar statement"); + var peg$e131 = peg$otherExpectation("internal argument"); + var peg$e132 = peg$classExpectation([")", ";"], false, false); + var peg$e133 = peg$otherExpectation("callScene statement"); + var peg$e134 = peg$otherExpectation("showVars statement"); + var peg$e135 = peg$otherExpectation("unlockCg statement"); + var peg$e136 = peg$otherExpectation("unlockBgm statement"); + var peg$e137 = peg$otherExpectation("filmMode statement"); + var peg$e138 = peg$otherExpectation("setTextbox statement"); + var peg$e139 = peg$otherExpectation("setAnimation statement"); + var peg$e140 = peg$otherExpectation("setTransition statement"); + var peg$e141 = peg$otherExpectation("playEffect statement"); + var peg$e142 = peg$otherExpectation("setTempAnimation statement"); + var peg$e143 = peg$otherExpectation("setTransform statement"); + var peg$e144 = peg$otherExpectation("getUserInput statement"); + var peg$e145 = peg$otherExpectation("say statement"); + var peg$e146 = peg$classExpectation([[":", ";"]], false, false); + var peg$e147 = peg$otherExpectation("statement"); + var peg$e148 = peg$classExpectation([["a", "z"], "\xB5", ["\xDF", "\xF6"], ["\xF8", "\xFF"], "\u0101", "\u0103", "\u0105", "\u0107", "\u0109", "\u010B", "\u010D", "\u010F", "\u0111", "\u0113", "\u0115", "\u0117", "\u0119", "\u011B", "\u011D", "\u011F", "\u0121", "\u0123", "\u0125", "\u0127", "\u0129", "\u012B", "\u012D", "\u012F", "\u0131", "\u0133", "\u0135", ["\u0137", "\u0138"], "\u013A", "\u013C", "\u013E", "\u0140", "\u0142", "\u0144", "\u0146", ["\u0148", "\u0149"], "\u014B", "\u014D", "\u014F", "\u0151", "\u0153", "\u0155", "\u0157", "\u0159", "\u015B", "\u015D", "\u015F", "\u0161", "\u0163", "\u0165", "\u0167", "\u0169", "\u016B", "\u016D", "\u016F", "\u0171", "\u0173", "\u0175", "\u0177", "\u017A", "\u017C", ["\u017E", "\u0180"], "\u0183", "\u0185", "\u0188", ["\u018C", "\u018D"], "\u0192", "\u0195", ["\u0199", "\u019B"], "\u019E", "\u01A1", "\u01A3", "\u01A5", "\u01A8", ["\u01AA", "\u01AB"], "\u01AD", "\u01B0", "\u01B4", "\u01B6", ["\u01B9", "\u01BA"], ["\u01BD", "\u01BF"], "\u01C6", "\u01C9", "\u01CC", "\u01CE", "\u01D0", "\u01D2", "\u01D4", "\u01D6", "\u01D8", "\u01DA", ["\u01DC", "\u01DD"], "\u01DF", "\u01E1", "\u01E3", "\u01E5", "\u01E7", "\u01E9", "\u01EB", "\u01ED", ["\u01EF", "\u01F0"], "\u01F3", "\u01F5", "\u01F9", "\u01FB", "\u01FD", "\u01FF", "\u0201", "\u0203", "\u0205", "\u0207", "\u0209", "\u020B", "\u020D", "\u020F", "\u0211", "\u0213", "\u0215", "\u0217", "\u0219", "\u021B", "\u021D", "\u021F", "\u0221", "\u0223", "\u0225", "\u0227", "\u0229", "\u022B", "\u022D", "\u022F", "\u0231", ["\u0233", "\u0239"], "\u023C", ["\u023F", "\u0240"], "\u0242", "\u0247", "\u0249", "\u024B", "\u024D", ["\u024F", "\u0293"], ["\u0295", "\u02AF"], "\u0371", "\u0373", "\u0377", ["\u037B", "\u037D"], "\u0390", ["\u03AC", "\u03CE"], ["\u03D0", "\u03D1"], ["\u03D5", "\u03D7"], "\u03D9", "\u03DB", "\u03DD", "\u03DF", "\u03E1", "\u03E3", "\u03E5", "\u03E7", "\u03E9", "\u03EB", "\u03ED", ["\u03EF", "\u03F3"], "\u03F5", "\u03F8", ["\u03FB", "\u03FC"], ["\u0430", "\u045F"], "\u0461", "\u0463", "\u0465", "\u0467", "\u0469", "\u046B", "\u046D", "\u046F", "\u0471", "\u0473", "\u0475", "\u0477", "\u0479", "\u047B", "\u047D", "\u047F", "\u0481", "\u048B", "\u048D", "\u048F", "\u0491", "\u0493", "\u0495", "\u0497", "\u0499", "\u049B", "\u049D", "\u049F", "\u04A1", "\u04A3", "\u04A5", "\u04A7", "\u04A9", "\u04AB", "\u04AD", "\u04AF", "\u04B1", "\u04B3", "\u04B5", "\u04B7", "\u04B9", "\u04BB", "\u04BD", "\u04BF", "\u04C2", "\u04C4", "\u04C6", "\u04C8", "\u04CA", "\u04CC", ["\u04CE", "\u04CF"], "\u04D1", "\u04D3", "\u04D5", "\u04D7", "\u04D9", "\u04DB", "\u04DD", "\u04DF", "\u04E1", "\u04E3", "\u04E5", "\u04E7", "\u04E9", "\u04EB", "\u04ED", "\u04EF", "\u04F1", "\u04F3", "\u04F5", "\u04F7", "\u04F9", "\u04FB", "\u04FD", "\u04FF", "\u0501", "\u0503", "\u0505", "\u0507", "\u0509", "\u050B", "\u050D", "\u050F", "\u0511", "\u0513", "\u0515", "\u0517", "\u0519", "\u051B", "\u051D", "\u051F", "\u0521", "\u0523", "\u0525", "\u0527", "\u0529", "\u052B", "\u052D", "\u052F", ["\u0561", "\u0587"], ["\u13F8", "\u13FD"], ["\u1D00", "\u1D2B"], ["\u1D6B", "\u1D77"], ["\u1D79", "\u1D9A"], "\u1E01", "\u1E03", "\u1E05", "\u1E07", "\u1E09", "\u1E0B", "\u1E0D", "\u1E0F", "\u1E11", "\u1E13", "\u1E15", "\u1E17", "\u1E19", "\u1E1B", "\u1E1D", "\u1E1F", "\u1E21", "\u1E23", "\u1E25", "\u1E27", "\u1E29", "\u1E2B", "\u1E2D", "\u1E2F", "\u1E31", "\u1E33", "\u1E35", "\u1E37", "\u1E39", "\u1E3B", "\u1E3D", "\u1E3F", "\u1E41", "\u1E43", "\u1E45", "\u1E47", "\u1E49", "\u1E4B", "\u1E4D", "\u1E4F", "\u1E51", "\u1E53", "\u1E55", "\u1E57", "\u1E59", "\u1E5B", "\u1E5D", "\u1E5F", "\u1E61", "\u1E63", "\u1E65", "\u1E67", "\u1E69", "\u1E6B", "\u1E6D", "\u1E6F", "\u1E71", "\u1E73", "\u1E75", "\u1E77", "\u1E79", "\u1E7B", "\u1E7D", "\u1E7F", "\u1E81", "\u1E83", "\u1E85", "\u1E87", "\u1E89", "\u1E8B", "\u1E8D", "\u1E8F", "\u1E91", "\u1E93", ["\u1E95", "\u1E9D"], "\u1E9F", "\u1EA1", "\u1EA3", "\u1EA5", "\u1EA7", "\u1EA9", "\u1EAB", "\u1EAD", "\u1EAF", "\u1EB1", "\u1EB3", "\u1EB5", "\u1EB7", "\u1EB9", "\u1EBB", "\u1EBD", "\u1EBF", "\u1EC1", "\u1EC3", "\u1EC5", "\u1EC7", "\u1EC9", "\u1ECB", "\u1ECD", "\u1ECF", "\u1ED1", "\u1ED3", "\u1ED5", "\u1ED7", "\u1ED9", "\u1EDB", "\u1EDD", "\u1EDF", "\u1EE1", "\u1EE3", "\u1EE5", "\u1EE7", "\u1EE9", "\u1EEB", "\u1EED", "\u1EEF", "\u1EF1", "\u1EF3", "\u1EF5", "\u1EF7", "\u1EF9", "\u1EFB", "\u1EFD", ["\u1EFF", "\u1F07"], ["\u1F10", "\u1F15"], ["\u1F20", "\u1F27"], ["\u1F30", "\u1F37"], ["\u1F40", "\u1F45"], ["\u1F50", "\u1F57"], ["\u1F60", "\u1F67"], ["\u1F70", "\u1F7D"], ["\u1F80", "\u1F87"], ["\u1F90", "\u1F97"], ["\u1FA0", "\u1FA7"], ["\u1FB0", "\u1FB4"], ["\u1FB6", "\u1FB7"], "\u1FBE", ["\u1FC2", "\u1FC4"], ["\u1FC6", "\u1FC7"], ["\u1FD0", "\u1FD3"], ["\u1FD6", "\u1FD7"], ["\u1FE0", "\u1FE7"], ["\u1FF2", "\u1FF4"], ["\u1FF6", "\u1FF7"], "\u210A", ["\u210E", "\u210F"], "\u2113", "\u212F", "\u2134", "\u2139", ["\u213C", "\u213D"], ["\u2146", "\u2149"], "\u214E", "\u2184", ["\u2C30", "\u2C5E"], "\u2C61", ["\u2C65", "\u2C66"], "\u2C68", "\u2C6A", "\u2C6C", "\u2C71", ["\u2C73", "\u2C74"], ["\u2C76", "\u2C7B"], "\u2C81", "\u2C83", "\u2C85", "\u2C87", "\u2C89", "\u2C8B", "\u2C8D", "\u2C8F", "\u2C91", "\u2C93", "\u2C95", "\u2C97", "\u2C99", "\u2C9B", "\u2C9D", "\u2C9F", "\u2CA1", "\u2CA3", "\u2CA5", "\u2CA7", "\u2CA9", "\u2CAB", "\u2CAD", "\u2CAF", "\u2CB1", "\u2CB3", "\u2CB5", "\u2CB7", "\u2CB9", "\u2CBB", "\u2CBD", "\u2CBF", "\u2CC1", "\u2CC3", "\u2CC5", "\u2CC7", "\u2CC9", "\u2CCB", "\u2CCD", "\u2CCF", "\u2CD1", "\u2CD3", "\u2CD5", "\u2CD7", "\u2CD9", "\u2CDB", "\u2CDD", "\u2CDF", "\u2CE1", ["\u2CE3", "\u2CE4"], "\u2CEC", "\u2CEE", "\u2CF3", ["\u2D00", "\u2D25"], "\u2D27", "\u2D2D", "\uA641", "\uA643", "\uA645", "\uA647", "\uA649", "\uA64B", "\uA64D", "\uA64F", "\uA651", "\uA653", "\uA655", "\uA657", "\uA659", "\uA65B", "\uA65D", "\uA65F", "\uA661", "\uA663", "\uA665", "\uA667", "\uA669", "\uA66B", "\uA66D", "\uA681", "\uA683", "\uA685", "\uA687", "\uA689", "\uA68B", "\uA68D", "\uA68F", "\uA691", "\uA693", "\uA695", "\uA697", "\uA699", "\uA69B", "\uA723", "\uA725", "\uA727", "\uA729", "\uA72B", "\uA72D", ["\uA72F", "\uA731"], "\uA733", "\uA735", "\uA737", "\uA739", "\uA73B", "\uA73D", "\uA73F", "\uA741", "\uA743", "\uA745", "\uA747", "\uA749", "\uA74B", "\uA74D", "\uA74F", "\uA751", "\uA753", "\uA755", "\uA757", "\uA759", "\uA75B", "\uA75D", "\uA75F", "\uA761", "\uA763", "\uA765", "\uA767", "\uA769", "\uA76B", "\uA76D", "\uA76F", ["\uA771", "\uA778"], "\uA77A", "\uA77C", "\uA77F", "\uA781", "\uA783", "\uA785", "\uA787", "\uA78C", "\uA78E", "\uA791", ["\uA793", "\uA795"], "\uA797", "\uA799", "\uA79B", "\uA79D", "\uA79F", "\uA7A1", "\uA7A3", "\uA7A5", "\uA7A7", "\uA7A9", "\uA7B5", "\uA7B7", "\uA7FA", ["\uAB30", "\uAB5A"], ["\uAB60", "\uAB65"], ["\uAB70", "\uABBF"], ["\uFB00", "\uFB06"], ["\uFB13", "\uFB17"], ["\uFF41", "\uFF5A"]], false, false); + var peg$e149 = peg$classExpectation([["\u02B0", "\u02C1"], ["\u02C6", "\u02D1"], ["\u02E0", "\u02E4"], "\u02EC", "\u02EE", "\u0374", "\u037A", "\u0559", "\u0640", ["\u06E5", "\u06E6"], ["\u07F4", "\u07F5"], "\u07FA", "\u081A", "\u0824", "\u0828", "\u0971", "\u0E46", "\u0EC6", "\u10FC", "\u17D7", "\u1843", "\u1AA7", ["\u1C78", "\u1C7D"], ["\u1D2C", "\u1D6A"], "\u1D78", ["\u1D9B", "\u1DBF"], "\u2071", "\u207F", ["\u2090", "\u209C"], ["\u2C7C", "\u2C7D"], "\u2D6F", "\u2E2F", "\u3005", ["\u3031", "\u3035"], "\u303B", ["\u309D", "\u309E"], ["\u30FC", "\u30FE"], "\uA015", ["\uA4F8", "\uA4FD"], "\uA60C", "\uA67F", ["\uA69C", "\uA69D"], ["\uA717", "\uA71F"], "\uA770", "\uA788", ["\uA7F8", "\uA7F9"], "\uA9CF", "\uA9E6", "\uAA70", "\uAADD", ["\uAAF3", "\uAAF4"], ["\uAB5C", "\uAB5F"], "\uFF70", ["\uFF9E", "\uFF9F"]], false, false); + var peg$e150 = peg$classExpectation(["\xAA", "\xBA", "\u01BB", ["\u01C0", "\u01C3"], "\u0294", ["\u05D0", "\u05EA"], ["\u05F0", "\u05F2"], ["\u0620", "\u063F"], ["\u0641", "\u064A"], ["\u066E", "\u066F"], ["\u0671", "\u06D3"], "\u06D5", ["\u06EE", "\u06EF"], ["\u06FA", "\u06FC"], "\u06FF", "\u0710", ["\u0712", "\u072F"], ["\u074D", "\u07A5"], "\u07B1", ["\u07CA", "\u07EA"], ["\u0800", "\u0815"], ["\u0840", "\u0858"], ["\u08A0", "\u08B4"], ["\u0904", "\u0939"], "\u093D", "\u0950", ["\u0958", "\u0961"], ["\u0972", "\u0980"], ["\u0985", "\u098C"], ["\u098F", "\u0990"], ["\u0993", "\u09A8"], ["\u09AA", "\u09B0"], "\u09B2", ["\u09B6", "\u09B9"], "\u09BD", "\u09CE", ["\u09DC", "\u09DD"], ["\u09DF", "\u09E1"], ["\u09F0", "\u09F1"], ["\u0A05", "\u0A0A"], ["\u0A0F", "\u0A10"], ["\u0A13", "\u0A28"], ["\u0A2A", "\u0A30"], ["\u0A32", "\u0A33"], ["\u0A35", "\u0A36"], ["\u0A38", "\u0A39"], ["\u0A59", "\u0A5C"], "\u0A5E", ["\u0A72", "\u0A74"], ["\u0A85", "\u0A8D"], ["\u0A8F", "\u0A91"], ["\u0A93", "\u0AA8"], ["\u0AAA", "\u0AB0"], ["\u0AB2", "\u0AB3"], ["\u0AB5", "\u0AB9"], "\u0ABD", "\u0AD0", ["\u0AE0", "\u0AE1"], "\u0AF9", ["\u0B05", "\u0B0C"], ["\u0B0F", "\u0B10"], ["\u0B13", "\u0B28"], ["\u0B2A", "\u0B30"], ["\u0B32", "\u0B33"], ["\u0B35", "\u0B39"], "\u0B3D", ["\u0B5C", "\u0B5D"], ["\u0B5F", "\u0B61"], "\u0B71", "\u0B83", ["\u0B85", "\u0B8A"], ["\u0B8E", "\u0B90"], ["\u0B92", "\u0B95"], ["\u0B99", "\u0B9A"], "\u0B9C", ["\u0B9E", "\u0B9F"], ["\u0BA3", "\u0BA4"], ["\u0BA8", "\u0BAA"], ["\u0BAE", "\u0BB9"], "\u0BD0", ["\u0C05", "\u0C0C"], ["\u0C0E", "\u0C10"], ["\u0C12", "\u0C28"], ["\u0C2A", "\u0C39"], "\u0C3D", ["\u0C58", "\u0C5A"], ["\u0C60", "\u0C61"], ["\u0C85", "\u0C8C"], ["\u0C8E", "\u0C90"], ["\u0C92", "\u0CA8"], ["\u0CAA", "\u0CB3"], ["\u0CB5", "\u0CB9"], "\u0CBD", "\u0CDE", ["\u0CE0", "\u0CE1"], ["\u0CF1", "\u0CF2"], ["\u0D05", "\u0D0C"], ["\u0D0E", "\u0D10"], ["\u0D12", "\u0D3A"], "\u0D3D", "\u0D4E", ["\u0D5F", "\u0D61"], ["\u0D7A", "\u0D7F"], ["\u0D85", "\u0D96"], ["\u0D9A", "\u0DB1"], ["\u0DB3", "\u0DBB"], "\u0DBD", ["\u0DC0", "\u0DC6"], ["\u0E01", "\u0E30"], ["\u0E32", "\u0E33"], ["\u0E40", "\u0E45"], ["\u0E81", "\u0E82"], "\u0E84", ["\u0E87", "\u0E88"], "\u0E8A", "\u0E8D", ["\u0E94", "\u0E97"], ["\u0E99", "\u0E9F"], ["\u0EA1", "\u0EA3"], "\u0EA5", "\u0EA7", ["\u0EAA", "\u0EAB"], ["\u0EAD", "\u0EB0"], ["\u0EB2", "\u0EB3"], "\u0EBD", ["\u0EC0", "\u0EC4"], ["\u0EDC", "\u0EDF"], "\u0F00", ["\u0F40", "\u0F47"], ["\u0F49", "\u0F6C"], ["\u0F88", "\u0F8C"], ["\u1000", "\u102A"], "\u103F", ["\u1050", "\u1055"], ["\u105A", "\u105D"], "\u1061", ["\u1065", "\u1066"], ["\u106E", "\u1070"], ["\u1075", "\u1081"], "\u108E", ["\u10D0", "\u10FA"], ["\u10FD", "\u1248"], ["\u124A", "\u124D"], ["\u1250", "\u1256"], "\u1258", ["\u125A", "\u125D"], ["\u1260", "\u1288"], ["\u128A", "\u128D"], ["\u1290", "\u12B0"], ["\u12B2", "\u12B5"], ["\u12B8", "\u12BE"], "\u12C0", ["\u12C2", "\u12C5"], ["\u12C8", "\u12D6"], ["\u12D8", "\u1310"], ["\u1312", "\u1315"], ["\u1318", "\u135A"], ["\u1380", "\u138F"], ["\u1401", "\u166C"], ["\u166F", "\u167F"], ["\u1681", "\u169A"], ["\u16A0", "\u16EA"], ["\u16F1", "\u16F8"], ["\u1700", "\u170C"], ["\u170E", "\u1711"], ["\u1720", "\u1731"], ["\u1740", "\u1751"], ["\u1760", "\u176C"], ["\u176E", "\u1770"], ["\u1780", "\u17B3"], "\u17DC", ["\u1820", "\u1842"], ["\u1844", "\u1877"], ["\u1880", "\u18A8"], "\u18AA", ["\u18B0", "\u18F5"], ["\u1900", "\u191E"], ["\u1950", "\u196D"], ["\u1970", "\u1974"], ["\u1980", "\u19AB"], ["\u19B0", "\u19C9"], ["\u1A00", "\u1A16"], ["\u1A20", "\u1A54"], ["\u1B05", "\u1B33"], ["\u1B45", "\u1B4B"], ["\u1B83", "\u1BA0"], ["\u1BAE", "\u1BAF"], ["\u1BBA", "\u1BE5"], ["\u1C00", "\u1C23"], ["\u1C4D", "\u1C4F"], ["\u1C5A", "\u1C77"], ["\u1CE9", "\u1CEC"], ["\u1CEE", "\u1CF1"], ["\u1CF5", "\u1CF6"], ["\u2135", "\u2138"], ["\u2D30", "\u2D67"], ["\u2D80", "\u2D96"], ["\u2DA0", "\u2DA6"], ["\u2DA8", "\u2DAE"], ["\u2DB0", "\u2DB6"], ["\u2DB8", "\u2DBE"], ["\u2DC0", "\u2DC6"], ["\u2DC8", "\u2DCE"], ["\u2DD0", "\u2DD6"], ["\u2DD8", "\u2DDE"], "\u3006", "\u303C", ["\u3041", "\u3096"], "\u309F", ["\u30A1", "\u30FA"], "\u30FF", ["\u3105", "\u312D"], ["\u3131", "\u318E"], ["\u31A0", "\u31BA"], ["\u31F0", "\u31FF"], ["\u3400", "\u4DB5"], ["\u4E00", "\u9FD5"], ["\uA000", "\uA014"], ["\uA016", "\uA48C"], ["\uA4D0", "\uA4F7"], ["\uA500", "\uA60B"], ["\uA610", "\uA61F"], ["\uA62A", "\uA62B"], "\uA66E", ["\uA6A0", "\uA6E5"], "\uA78F", "\uA7F7", ["\uA7FB", "\uA801"], ["\uA803", "\uA805"], ["\uA807", "\uA80A"], ["\uA80C", "\uA822"], ["\uA840", "\uA873"], ["\uA882", "\uA8B3"], ["\uA8F2", "\uA8F7"], "\uA8FB", "\uA8FD", ["\uA90A", "\uA925"], ["\uA930", "\uA946"], ["\uA960", "\uA97C"], ["\uA984", "\uA9B2"], ["\uA9E0", "\uA9E4"], ["\uA9E7", "\uA9EF"], ["\uA9FA", "\uA9FE"], ["\uAA00", "\uAA28"], ["\uAA40", "\uAA42"], ["\uAA44", "\uAA4B"], ["\uAA60", "\uAA6F"], ["\uAA71", "\uAA76"], "\uAA7A", ["\uAA7E", "\uAAAF"], "\uAAB1", ["\uAAB5", "\uAAB6"], ["\uAAB9", "\uAABD"], "\uAAC0", "\uAAC2", ["\uAADB", "\uAADC"], ["\uAAE0", "\uAAEA"], "\uAAF2", ["\uAB01", "\uAB06"], ["\uAB09", "\uAB0E"], ["\uAB11", "\uAB16"], ["\uAB20", "\uAB26"], ["\uAB28", "\uAB2E"], ["\uABC0", "\uABE2"], ["\uAC00", "\uD7A3"], ["\uD7B0", "\uD7C6"], ["\uD7CB", "\uD7FB"], ["\uF900", "\uFA6D"], ["\uFA70", "\uFAD9"], "\uFB1D", ["\uFB1F", "\uFB28"], ["\uFB2A", "\uFB36"], ["\uFB38", "\uFB3C"], "\uFB3E", ["\uFB40", "\uFB41"], ["\uFB43", "\uFB44"], ["\uFB46", "\uFBB1"], ["\uFBD3", "\uFD3D"], ["\uFD50", "\uFD8F"], ["\uFD92", "\uFDC7"], ["\uFDF0", "\uFDFB"], ["\uFE70", "\uFE74"], ["\uFE76", "\uFEFC"], ["\uFF66", "\uFF6F"], ["\uFF71", "\uFF9D"], ["\uFFA0", "\uFFBE"], ["\uFFC2", "\uFFC7"], ["\uFFCA", "\uFFCF"], ["\uFFD2", "\uFFD7"], ["\uFFDA", "\uFFDC"]], false, false); + var peg$e151 = peg$classExpectation(["\u01C5", "\u01C8", "\u01CB", "\u01F2", ["\u1F88", "\u1F8F"], ["\u1F98", "\u1F9F"], ["\u1FA8", "\u1FAF"], "\u1FBC", "\u1FCC", "\u1FFC"], false, false); + var peg$e152 = peg$classExpectation([["A", "Z"], ["\xC0", "\xD6"], ["\xD8", "\xDE"], "\u0100", "\u0102", "\u0104", "\u0106", "\u0108", "\u010A", "\u010C", "\u010E", "\u0110", "\u0112", "\u0114", "\u0116", "\u0118", "\u011A", "\u011C", "\u011E", "\u0120", "\u0122", "\u0124", "\u0126", "\u0128", "\u012A", "\u012C", "\u012E", "\u0130", "\u0132", "\u0134", "\u0136", "\u0139", "\u013B", "\u013D", "\u013F", "\u0141", "\u0143", "\u0145", "\u0147", "\u014A", "\u014C", "\u014E", "\u0150", "\u0152", "\u0154", "\u0156", "\u0158", "\u015A", "\u015C", "\u015E", "\u0160", "\u0162", "\u0164", "\u0166", "\u0168", "\u016A", "\u016C", "\u016E", "\u0170", "\u0172", "\u0174", "\u0176", ["\u0178", "\u0179"], "\u017B", "\u017D", ["\u0181", "\u0182"], "\u0184", ["\u0186", "\u0187"], ["\u0189", "\u018B"], ["\u018E", "\u0191"], ["\u0193", "\u0194"], ["\u0196", "\u0198"], ["\u019C", "\u019D"], ["\u019F", "\u01A0"], "\u01A2", "\u01A4", ["\u01A6", "\u01A7"], "\u01A9", "\u01AC", ["\u01AE", "\u01AF"], ["\u01B1", "\u01B3"], "\u01B5", ["\u01B7", "\u01B8"], "\u01BC", "\u01C4", "\u01C7", "\u01CA", "\u01CD", "\u01CF", "\u01D1", "\u01D3", "\u01D5", "\u01D7", "\u01D9", "\u01DB", "\u01DE", "\u01E0", "\u01E2", "\u01E4", "\u01E6", "\u01E8", "\u01EA", "\u01EC", "\u01EE", "\u01F1", "\u01F4", ["\u01F6", "\u01F8"], "\u01FA", "\u01FC", "\u01FE", "\u0200", "\u0202", "\u0204", "\u0206", "\u0208", "\u020A", "\u020C", "\u020E", "\u0210", "\u0212", "\u0214", "\u0216", "\u0218", "\u021A", "\u021C", "\u021E", "\u0220", "\u0222", "\u0224", "\u0226", "\u0228", "\u022A", "\u022C", "\u022E", "\u0230", "\u0232", ["\u023A", "\u023B"], ["\u023D", "\u023E"], "\u0241", ["\u0243", "\u0246"], "\u0248", "\u024A", "\u024C", "\u024E", "\u0370", "\u0372", "\u0376", "\u037F", "\u0386", ["\u0388", "\u038A"], "\u038C", ["\u038E", "\u038F"], ["\u0391", "\u03A1"], ["\u03A3", "\u03AB"], "\u03CF", ["\u03D2", "\u03D4"], "\u03D8", "\u03DA", "\u03DC", "\u03DE", "\u03E0", "\u03E2", "\u03E4", "\u03E6", "\u03E8", "\u03EA", "\u03EC", "\u03EE", "\u03F4", "\u03F7", ["\u03F9", "\u03FA"], ["\u03FD", "\u042F"], "\u0460", "\u0462", "\u0464", "\u0466", "\u0468", "\u046A", "\u046C", "\u046E", "\u0470", "\u0472", "\u0474", "\u0476", "\u0478", "\u047A", "\u047C", "\u047E", "\u0480", "\u048A", "\u048C", "\u048E", "\u0490", "\u0492", "\u0494", "\u0496", "\u0498", "\u049A", "\u049C", "\u049E", "\u04A0", "\u04A2", "\u04A4", "\u04A6", "\u04A8", "\u04AA", "\u04AC", "\u04AE", "\u04B0", "\u04B2", "\u04B4", "\u04B6", "\u04B8", "\u04BA", "\u04BC", "\u04BE", ["\u04C0", "\u04C1"], "\u04C3", "\u04C5", "\u04C7", "\u04C9", "\u04CB", "\u04CD", "\u04D0", "\u04D2", "\u04D4", "\u04D6", "\u04D8", "\u04DA", "\u04DC", "\u04DE", "\u04E0", "\u04E2", "\u04E4", "\u04E6", "\u04E8", "\u04EA", "\u04EC", "\u04EE", "\u04F0", "\u04F2", "\u04F4", "\u04F6", "\u04F8", "\u04FA", "\u04FC", "\u04FE", "\u0500", "\u0502", "\u0504", "\u0506", "\u0508", "\u050A", "\u050C", "\u050E", "\u0510", "\u0512", "\u0514", "\u0516", "\u0518", "\u051A", "\u051C", "\u051E", "\u0520", "\u0522", "\u0524", "\u0526", "\u0528", "\u052A", "\u052C", "\u052E", ["\u0531", "\u0556"], ["\u10A0", "\u10C5"], "\u10C7", "\u10CD", ["\u13A0", "\u13F5"], "\u1E00", "\u1E02", "\u1E04", "\u1E06", "\u1E08", "\u1E0A", "\u1E0C", "\u1E0E", "\u1E10", "\u1E12", "\u1E14", "\u1E16", "\u1E18", "\u1E1A", "\u1E1C", "\u1E1E", "\u1E20", "\u1E22", "\u1E24", "\u1E26", "\u1E28", "\u1E2A", "\u1E2C", "\u1E2E", "\u1E30", "\u1E32", "\u1E34", "\u1E36", "\u1E38", "\u1E3A", "\u1E3C", "\u1E3E", "\u1E40", "\u1E42", "\u1E44", "\u1E46", "\u1E48", "\u1E4A", "\u1E4C", "\u1E4E", "\u1E50", "\u1E52", "\u1E54", "\u1E56", "\u1E58", "\u1E5A", "\u1E5C", "\u1E5E", "\u1E60", "\u1E62", "\u1E64", "\u1E66", "\u1E68", "\u1E6A", "\u1E6C", "\u1E6E", "\u1E70", "\u1E72", "\u1E74", "\u1E76", "\u1E78", "\u1E7A", "\u1E7C", "\u1E7E", "\u1E80", "\u1E82", "\u1E84", "\u1E86", "\u1E88", "\u1E8A", "\u1E8C", "\u1E8E", "\u1E90", "\u1E92", "\u1E94", "\u1E9E", "\u1EA0", "\u1EA2", "\u1EA4", "\u1EA6", "\u1EA8", "\u1EAA", "\u1EAC", "\u1EAE", "\u1EB0", "\u1EB2", "\u1EB4", "\u1EB6", "\u1EB8", "\u1EBA", "\u1EBC", "\u1EBE", "\u1EC0", "\u1EC2", "\u1EC4", "\u1EC6", "\u1EC8", "\u1ECA", "\u1ECC", "\u1ECE", "\u1ED0", "\u1ED2", "\u1ED4", "\u1ED6", "\u1ED8", "\u1EDA", "\u1EDC", "\u1EDE", "\u1EE0", "\u1EE2", "\u1EE4", "\u1EE6", "\u1EE8", "\u1EEA", "\u1EEC", "\u1EEE", "\u1EF0", "\u1EF2", "\u1EF4", "\u1EF6", "\u1EF8", "\u1EFA", "\u1EFC", "\u1EFE", ["\u1F08", "\u1F0F"], ["\u1F18", "\u1F1D"], ["\u1F28", "\u1F2F"], ["\u1F38", "\u1F3F"], ["\u1F48", "\u1F4D"], "\u1F59", "\u1F5B", "\u1F5D", "\u1F5F", ["\u1F68", "\u1F6F"], ["\u1FB8", "\u1FBB"], ["\u1FC8", "\u1FCB"], ["\u1FD8", "\u1FDB"], ["\u1FE8", "\u1FEC"], ["\u1FF8", "\u1FFB"], "\u2102", "\u2107", ["\u210B", "\u210D"], ["\u2110", "\u2112"], "\u2115", ["\u2119", "\u211D"], "\u2124", "\u2126", "\u2128", ["\u212A", "\u212D"], ["\u2130", "\u2133"], ["\u213E", "\u213F"], "\u2145", "\u2183", ["\u2C00", "\u2C2E"], "\u2C60", ["\u2C62", "\u2C64"], "\u2C67", "\u2C69", "\u2C6B", ["\u2C6D", "\u2C70"], "\u2C72", "\u2C75", ["\u2C7E", "\u2C80"], "\u2C82", "\u2C84", "\u2C86", "\u2C88", "\u2C8A", "\u2C8C", "\u2C8E", "\u2C90", "\u2C92", "\u2C94", "\u2C96", "\u2C98", "\u2C9A", "\u2C9C", "\u2C9E", "\u2CA0", "\u2CA2", "\u2CA4", "\u2CA6", "\u2CA8", "\u2CAA", "\u2CAC", "\u2CAE", "\u2CB0", "\u2CB2", "\u2CB4", "\u2CB6", "\u2CB8", "\u2CBA", "\u2CBC", "\u2CBE", "\u2CC0", "\u2CC2", "\u2CC4", "\u2CC6", "\u2CC8", "\u2CCA", "\u2CCC", "\u2CCE", "\u2CD0", "\u2CD2", "\u2CD4", "\u2CD6", "\u2CD8", "\u2CDA", "\u2CDC", "\u2CDE", "\u2CE0", "\u2CE2", "\u2CEB", "\u2CED", "\u2CF2", "\uA640", "\uA642", "\uA644", "\uA646", "\uA648", "\uA64A", "\uA64C", "\uA64E", "\uA650", "\uA652", "\uA654", "\uA656", "\uA658", "\uA65A", "\uA65C", "\uA65E", "\uA660", "\uA662", "\uA664", "\uA666", "\uA668", "\uA66A", "\uA66C", "\uA680", "\uA682", "\uA684", "\uA686", "\uA688", "\uA68A", "\uA68C", "\uA68E", "\uA690", "\uA692", "\uA694", "\uA696", "\uA698", "\uA69A", "\uA722", "\uA724", "\uA726", "\uA728", "\uA72A", "\uA72C", "\uA72E", "\uA732", "\uA734", "\uA736", "\uA738", "\uA73A", "\uA73C", "\uA73E", "\uA740", "\uA742", "\uA744", "\uA746", "\uA748", "\uA74A", "\uA74C", "\uA74E", "\uA750", "\uA752", "\uA754", "\uA756", "\uA758", "\uA75A", "\uA75C", "\uA75E", "\uA760", "\uA762", "\uA764", "\uA766", "\uA768", "\uA76A", "\uA76C", "\uA76E", "\uA779", "\uA77B", ["\uA77D", "\uA77E"], "\uA780", "\uA782", "\uA784", "\uA786", "\uA78B", "\uA78D", "\uA790", "\uA792", "\uA796", "\uA798", "\uA79A", "\uA79C", "\uA79E", "\uA7A0", "\uA7A2", "\uA7A4", "\uA7A6", "\uA7A8", ["\uA7AA", "\uA7AD"], ["\uA7B0", "\uA7B4"], "\uA7B6", ["\uFF21", "\uFF3A"]], false, false); + var peg$e153 = peg$classExpectation(["\u0903", "\u093B", ["\u093E", "\u0940"], ["\u0949", "\u094C"], ["\u094E", "\u094F"], ["\u0982", "\u0983"], ["\u09BE", "\u09C0"], ["\u09C7", "\u09C8"], ["\u09CB", "\u09CC"], "\u09D7", "\u0A03", ["\u0A3E", "\u0A40"], "\u0A83", ["\u0ABE", "\u0AC0"], "\u0AC9", ["\u0ACB", "\u0ACC"], ["\u0B02", "\u0B03"], "\u0B3E", "\u0B40", ["\u0B47", "\u0B48"], ["\u0B4B", "\u0B4C"], "\u0B57", ["\u0BBE", "\u0BBF"], ["\u0BC1", "\u0BC2"], ["\u0BC6", "\u0BC8"], ["\u0BCA", "\u0BCC"], "\u0BD7", ["\u0C01", "\u0C03"], ["\u0C41", "\u0C44"], ["\u0C82", "\u0C83"], "\u0CBE", ["\u0CC0", "\u0CC4"], ["\u0CC7", "\u0CC8"], ["\u0CCA", "\u0CCB"], ["\u0CD5", "\u0CD6"], ["\u0D02", "\u0D03"], ["\u0D3E", "\u0D40"], ["\u0D46", "\u0D48"], ["\u0D4A", "\u0D4C"], "\u0D57", ["\u0D82", "\u0D83"], ["\u0DCF", "\u0DD1"], ["\u0DD8", "\u0DDF"], ["\u0DF2", "\u0DF3"], ["\u0F3E", "\u0F3F"], "\u0F7F", ["\u102B", "\u102C"], "\u1031", "\u1038", ["\u103B", "\u103C"], ["\u1056", "\u1057"], ["\u1062", "\u1064"], ["\u1067", "\u106D"], ["\u1083", "\u1084"], ["\u1087", "\u108C"], "\u108F", ["\u109A", "\u109C"], "\u17B6", ["\u17BE", "\u17C5"], ["\u17C7", "\u17C8"], ["\u1923", "\u1926"], ["\u1929", "\u192B"], ["\u1930", "\u1931"], ["\u1933", "\u1938"], ["\u1A19", "\u1A1A"], "\u1A55", "\u1A57", "\u1A61", ["\u1A63", "\u1A64"], ["\u1A6D", "\u1A72"], "\u1B04", "\u1B35", "\u1B3B", ["\u1B3D", "\u1B41"], ["\u1B43", "\u1B44"], "\u1B82", "\u1BA1", ["\u1BA6", "\u1BA7"], "\u1BAA", "\u1BE7", ["\u1BEA", "\u1BEC"], "\u1BEE", ["\u1BF2", "\u1BF3"], ["\u1C24", "\u1C2B"], ["\u1C34", "\u1C35"], "\u1CE1", ["\u1CF2", "\u1CF3"], ["\u302E", "\u302F"], ["\uA823", "\uA824"], "\uA827", ["\uA880", "\uA881"], ["\uA8B4", "\uA8C3"], ["\uA952", "\uA953"], "\uA983", ["\uA9B4", "\uA9B5"], ["\uA9BA", "\uA9BB"], ["\uA9BD", "\uA9C0"], ["\uAA2F", "\uAA30"], ["\uAA33", "\uAA34"], "\uAA4D", "\uAA7B", "\uAA7D", "\uAAEB", ["\uAAEE", "\uAAEF"], "\uAAF5", ["\uABE3", "\uABE4"], ["\uABE6", "\uABE7"], ["\uABE9", "\uABEA"], "\uABEC"], false, false); + var peg$e154 = peg$classExpectation([["\u0300", "\u036F"], ["\u0483", "\u0487"], ["\u0591", "\u05BD"], "\u05BF", ["\u05C1", "\u05C2"], ["\u05C4", "\u05C5"], "\u05C7", ["\u0610", "\u061A"], ["\u064B", "\u065F"], "\u0670", ["\u06D6", "\u06DC"], ["\u06DF", "\u06E4"], ["\u06E7", "\u06E8"], ["\u06EA", "\u06ED"], "\u0711", ["\u0730", "\u074A"], ["\u07A6", "\u07B0"], ["\u07EB", "\u07F3"], ["\u0816", "\u0819"], ["\u081B", "\u0823"], ["\u0825", "\u0827"], ["\u0829", "\u082D"], ["\u0859", "\u085B"], ["\u08E3", "\u0902"], "\u093A", "\u093C", ["\u0941", "\u0948"], "\u094D", ["\u0951", "\u0957"], ["\u0962", "\u0963"], "\u0981", "\u09BC", ["\u09C1", "\u09C4"], "\u09CD", ["\u09E2", "\u09E3"], ["\u0A01", "\u0A02"], "\u0A3C", ["\u0A41", "\u0A42"], ["\u0A47", "\u0A48"], ["\u0A4B", "\u0A4D"], "\u0A51", ["\u0A70", "\u0A71"], "\u0A75", ["\u0A81", "\u0A82"], "\u0ABC", ["\u0AC1", "\u0AC5"], ["\u0AC7", "\u0AC8"], "\u0ACD", ["\u0AE2", "\u0AE3"], "\u0B01", "\u0B3C", "\u0B3F", ["\u0B41", "\u0B44"], "\u0B4D", "\u0B56", ["\u0B62", "\u0B63"], "\u0B82", "\u0BC0", "\u0BCD", "\u0C00", ["\u0C3E", "\u0C40"], ["\u0C46", "\u0C48"], ["\u0C4A", "\u0C4D"], ["\u0C55", "\u0C56"], ["\u0C62", "\u0C63"], "\u0C81", "\u0CBC", "\u0CBF", "\u0CC6", ["\u0CCC", "\u0CCD"], ["\u0CE2", "\u0CE3"], "\u0D01", ["\u0D41", "\u0D44"], "\u0D4D", ["\u0D62", "\u0D63"], "\u0DCA", ["\u0DD2", "\u0DD4"], "\u0DD6", "\u0E31", ["\u0E34", "\u0E3A"], ["\u0E47", "\u0E4E"], "\u0EB1", ["\u0EB4", "\u0EB9"], ["\u0EBB", "\u0EBC"], ["\u0EC8", "\u0ECD"], ["\u0F18", "\u0F19"], "\u0F35", "\u0F37", "\u0F39", ["\u0F71", "\u0F7E"], ["\u0F80", "\u0F84"], ["\u0F86", "\u0F87"], ["\u0F8D", "\u0F97"], ["\u0F99", "\u0FBC"], "\u0FC6", ["\u102D", "\u1030"], ["\u1032", "\u1037"], ["\u1039", "\u103A"], ["\u103D", "\u103E"], ["\u1058", "\u1059"], ["\u105E", "\u1060"], ["\u1071", "\u1074"], "\u1082", ["\u1085", "\u1086"], "\u108D", "\u109D", ["\u135D", "\u135F"], ["\u1712", "\u1714"], ["\u1732", "\u1734"], ["\u1752", "\u1753"], ["\u1772", "\u1773"], ["\u17B4", "\u17B5"], ["\u17B7", "\u17BD"], "\u17C6", ["\u17C9", "\u17D3"], "\u17DD", ["\u180B", "\u180D"], "\u18A9", ["\u1920", "\u1922"], ["\u1927", "\u1928"], "\u1932", ["\u1939", "\u193B"], ["\u1A17", "\u1A18"], "\u1A1B", "\u1A56", ["\u1A58", "\u1A5E"], "\u1A60", "\u1A62", ["\u1A65", "\u1A6C"], ["\u1A73", "\u1A7C"], "\u1A7F", ["\u1AB0", "\u1ABD"], ["\u1B00", "\u1B03"], "\u1B34", ["\u1B36", "\u1B3A"], "\u1B3C", "\u1B42", ["\u1B6B", "\u1B73"], ["\u1B80", "\u1B81"], ["\u1BA2", "\u1BA5"], ["\u1BA8", "\u1BA9"], ["\u1BAB", "\u1BAD"], "\u1BE6", ["\u1BE8", "\u1BE9"], "\u1BED", ["\u1BEF", "\u1BF1"], ["\u1C2C", "\u1C33"], ["\u1C36", "\u1C37"], ["\u1CD0", "\u1CD2"], ["\u1CD4", "\u1CE0"], ["\u1CE2", "\u1CE8"], "\u1CED", "\u1CF4", ["\u1CF8", "\u1CF9"], ["\u1DC0", "\u1DF5"], ["\u1DFC", "\u1DFF"], ["\u20D0", "\u20DC"], "\u20E1", ["\u20E5", "\u20F0"], ["\u2CEF", "\u2CF1"], "\u2D7F", ["\u2DE0", "\u2DFF"], ["\u302A", "\u302D"], ["\u3099", "\u309A"], "\uA66F", ["\uA674", "\uA67D"], ["\uA69E", "\uA69F"], ["\uA6F0", "\uA6F1"], "\uA802", "\uA806", "\uA80B", ["\uA825", "\uA826"], "\uA8C4", ["\uA8E0", "\uA8F1"], ["\uA926", "\uA92D"], ["\uA947", "\uA951"], ["\uA980", "\uA982"], "\uA9B3", ["\uA9B6", "\uA9B9"], "\uA9BC", "\uA9E5", ["\uAA29", "\uAA2E"], ["\uAA31", "\uAA32"], ["\uAA35", "\uAA36"], "\uAA43", "\uAA4C", "\uAA7C", "\uAAB0", ["\uAAB2", "\uAAB4"], ["\uAAB7", "\uAAB8"], ["\uAABE", "\uAABF"], "\uAAC1", ["\uAAEC", "\uAAED"], "\uAAF6", "\uABE5", "\uABE8", "\uABED", "\uFB1E", ["\uFE00", "\uFE0F"], ["\uFE20", "\uFE2F"]], false, false); + var peg$e155 = peg$classExpectation([["0", "9"], ["\u0660", "\u0669"], ["\u06F0", "\u06F9"], ["\u07C0", "\u07C9"], ["\u0966", "\u096F"], ["\u09E6", "\u09EF"], ["\u0A66", "\u0A6F"], ["\u0AE6", "\u0AEF"], ["\u0B66", "\u0B6F"], ["\u0BE6", "\u0BEF"], ["\u0C66", "\u0C6F"], ["\u0CE6", "\u0CEF"], ["\u0D66", "\u0D6F"], ["\u0DE6", "\u0DEF"], ["\u0E50", "\u0E59"], ["\u0ED0", "\u0ED9"], ["\u0F20", "\u0F29"], ["\u1040", "\u1049"], ["\u1090", "\u1099"], ["\u17E0", "\u17E9"], ["\u1810", "\u1819"], ["\u1946", "\u194F"], ["\u19D0", "\u19D9"], ["\u1A80", "\u1A89"], ["\u1A90", "\u1A99"], ["\u1B50", "\u1B59"], ["\u1BB0", "\u1BB9"], ["\u1C40", "\u1C49"], ["\u1C50", "\u1C59"], ["\uA620", "\uA629"], ["\uA8D0", "\uA8D9"], ["\uA900", "\uA909"], ["\uA9D0", "\uA9D9"], ["\uA9F0", "\uA9F9"], ["\uAA50", "\uAA59"], ["\uABF0", "\uABF9"], ["\uFF10", "\uFF19"]], false, false); + var peg$e156 = peg$classExpectation([["\u16EE", "\u16F0"], ["\u2160", "\u2182"], ["\u2185", "\u2188"], "\u3007", ["\u3021", "\u3029"], ["\u3038", "\u303A"], ["\uA6E6", "\uA6EF"]], false, false); + var peg$e157 = peg$classExpectation(["_", ["\u203F", "\u2040"], "\u2054", ["\uFE33", "\uFE34"], ["\uFE4D", "\uFE4F"], "\uFF3F"], false, false); + var peg$e158 = peg$classExpectation([" ", "\xA0", "\u1680", ["\u2000", "\u200A"], "\u202F", "\u205F", "\u3000"], false, false); + + var peg$f0 = function(program) { return { sentenceList: program, errors }; }; + var peg$f1 = function(program) { return { sentenceList: program, errors }; }; + var peg$f2 = function() { report("parsing cannot preceed"); }; + var peg$f3 = function(body) { + return optionalList(body); + }; + var peg$f4 = function(head, tail) { + return buildList(head, tail, 1); + }; + var peg$f5 = function() { + report("non-completed parsing"); + }; + var peg$f6 = function(head, tail) { + return buildList(head, tail, 1); + }; + var peg$f7 = function(key, value) { + value = value.trim() + + if (value === "none") { + value = ""; + } else if (value === "true" || value === "false") { + value = (value === "true"); + } else { + const number = Number(value); + if (!isNaN(number)) { + value = number; + } + } + + return { key, value }; + }; + var peg$f8 = function(key) { + return { key, value: true }; + }; + var peg$f9 = function() { return text(); }; + var peg$f10 = function(sequence) { return sequence.join(""); }; + var peg$f11 = function(sequence) { return sequence.join(""); }; + var peg$f12 = function(sequence) { return sequence.join("") }; + var peg$f13 = function(sequence) { return sequence.join(""); }; + var peg$f14 = function(sequence) { return sequence.join(""); }; + var peg$f15 = function(sequence) { return sequence.join(""); }; + var peg$f16 = function() { return text(); }; + var peg$f17 = function(sequence) { return sequence; }; + var peg$f18 = function() { return text(); }; + var peg$f19 = function(sequence) { return sequence; }; + var peg$f20 = function() { return text(); }; + var peg$f21 = function() { return text(); }; + var peg$f22 = function() { return "\0"; }; + var peg$f23 = function() { return "\b"; }; + var peg$f24 = function() { return "\f"; }; + var peg$f25 = function() { return "\n"; }; + var peg$f26 = function() { return "\r"; }; + var peg$f27 = function() { return "\t"; }; + var peg$f28 = function() { return "\v"; }; + var peg$f29 = function() { return text(); }; + var peg$f30 = function(digits) { + return String.fromCharCode(parseInt(digits, 16)); + }; + var peg$f31 = function(digits) { + return String.fromCharCode(parseInt(digits, 16)); + }; + var peg$f32 = function(sequence) { return sequence; }; + var peg$f33 = function(comment) { + comment = optionalString(comment); + + return { + command: commandType.comment, + commandRaw: "comment", + content: comment, + args: [], + } + }; + var peg$f34 = function() { + return { + command: commandType.comment, + commandRaw: "comment", + content: "", + args: [], + } + }; + var peg$f35 = function(fileName, args) { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.changeBg, + commandRaw: "changeBg", + content: fileName, + args, + }; + }; + var peg$f36 = function(fileName, args) { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.changeFigure, + commandRaw: "changeFigure", + content: fileName, + args, + }; + }; + var peg$f37 = function(fileName, args) { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.bgm, + commandRaw: "bgm", + content: fileName, + args, + }; + }; + var peg$f38 = function(fileName, args) { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.video, + commandRaw: "playVideo", + content: fileName, + args, + }; + }; + var peg$f39 = function(performName, args) { + args = optionalList(args); + + return { + command: commandType.pixi, + commandRaw: "pixiPerform", + content: performName, + args, + }; + }; + var peg$f40 = function() { + return { + command: commandType.pixiInit, + commandRaw: "pixiInit", + content: "", + args: [], + }; + }; + var peg$f41 = function(lines, args) { + args = optionalList(args); + + return { + command: commandType.intro, + commandRaw: "intro", + content: processNone(lines.trim()), + args, + }; + }; + var peg$f42 = function(fileName, args) { + args = optionalList(args); + + return { + command: commandType.miniAvatar, + commandRaw: "miniAvatar", + content: processNone(fileName.trim()), + args, + }; + }; + var peg$f43 = function(fileName, args) { + args = optionalList(args); + + return { + command: commandType.changeScene, + commandRaw: "changeScene", + content: processNone(fileName.trim()), + args, + }; + }; + var peg$f44 = function(choices) { + choices.choiceList = optionalList(choices.choiceList); + + return { + command: commandType.choose, + commandRaw: "choose", + content: "", + args: [ + { key: "choices", value: choices.choiceList }, + { key: "contentRawRange", value: choices.contentRawRange } + ], + }; + }; + var peg$f45 = function(head, tail) { + const loc = location(); + + return { + contentRawRange: [loc.start.offset, loc.end.offset], + choiceList: buildList(head, tail, 1) + }; + }; + var peg$f46 = function(sexp, cexp, text, dest) { + return { + showExpression: sexp, + clickExpression: cexp, + text, + destination: dest, + } + }; + var peg$f47 = function(text, dest) { + return { + showExpression: "", + clickExpression: "", + text, + destination: dest, + } + }; + var peg$f48 = function(sequence) { return sequence.join(""); }; + var peg$f49 = function() { return text(); }; + var peg$f50 = function(sequence) { return sequence.join(""); }; + var peg$f51 = function() { return text(); }; + var peg$f52 = function() { return text(); }; + var peg$f53 = function() { return text(); }; + var peg$f54 = function() { + return { + command: commandType.end, + commandRaw: "end", + content: "", + args: [], + }; + }; + var peg$f55 = function(animationName, args) { + args = optionalList(args); + + return { + command: commandType.setComplexAnimation, + commandRaw: "setComplexAnimation", + content: animationName, + args, + }; + }; + var peg$f56 = function() { + return { + command: commandType.setFilter, + commandRaw: "setFilter", + content: "", + args: [], + }; + }; + var peg$f57 = function(labelName) { + return { + command: commandType.label, + commandRaw: "label", + content: labelName, + args: [], + }; + }; + var peg$f58 = function(labelName) { + return { + command: commandType.jumpLabel, + commandRaw: "jumpLabel", + content: labelName, + args: [], + }; + }; + var peg$f59 = function(kv, args) { + // we prefix variableName and expression with `#` to separate it from + // user-defined arguments + args = optionalList(args); + + return { + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: kv.key }, + { key: "#internalExpression", value: kv.value }, + ].concat(args), + }; + }; + var peg$f60 = function(kv, args) { + args = optionalList(args); + + return { + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: kv.key }, + { key: "#expression", value: kv.value }, + ].concat(args), + }; + }; + var peg$f61 = function(key, value) { + if (value === "none") { + value = ""; + } else if (value === "true" || value === "false") { + value = (value === "true"); + } else { + const number = Number(value); + if (!isNaN(number)) { + value = number; + } + } + + return { key, value }; + }; + var peg$f62 = function() { return text(); }; + var peg$f63 = function(sceneName) { + return { + command: commandType.callScene, + commandRaw: "callScene", + content: sceneName, + args: [], + }; + }; + var peg$f64 = function() { + return { + command: commandType.showVars, + commandRaw: "showVars", + content: "", + args: [], + }; + }; + var peg$f65 = function(name, args) { + args = optionalList(args); + + return { + command: commandType.unlockCg, + commandRaw: "unlockCg", + content: name, + args, + }; + }; + var peg$f66 = function(name, args) { + args = optionalList(args); + + return { + command: commandType.unlockBgm, + commandRaw: "unlockBgm", + content: name, + args, + }; + }; + var peg$f67 = function(content) { + content = processNone(content.trim()); + + return { + command: commandType.filmMode, + commandRaw: "filmMode", + content, + args: [], + }; + }; + var peg$f68 = function(content) { + return { + command: commandType.setTextbox, + commandRaw: "setTextbox", + content, + args: [], + }; + }; + var peg$f69 = function(content, args) { + args = optionalList(args); + + return { + command: commandType.setAnimation, + commandRaw: "setAnimation", + content, + args, + }; + }; + var peg$f70 = function(args) { + args = optionalList(args); + + return { + command: commandType.setTransition, + commandRaw: "setTransition", + content: "", + args, + }; + }; + var peg$f71 = function(name, args) { + name = processNone(name.trim()); + args = optionalList(args); + + return { + command: commandType.playEffect, + commandRaw: "playEffect", + content: name, + args, + }; + }; + var peg$f72 = function(json, args) { + // Here, we do a trick by directly check whether a bracket is in the + // expression since we don't want to add extra cost on parsing JSON. + // The direct check holds because the content will never encounter a + // close bracket. + args = optionalList(args); + + return { + command: commandType.setTempAnimation, + commandRaw: "setTempAnimation", + content: `[${json}]`, + args, + }; + }; + var peg$f73 = function(json, args) { + args = optionalList(args); + + return { + command: commandType.setTransform, + commandRaw: "setTransform", + content: json, + args, + }; + }; + var peg$f74 = function(into, args) { + args = optionalList(args); + + return { + command: commandType.getUserInput, + commandRaw: "getUserInput", + content: into, + args, + }; + }; + var peg$f75 = function(speaker, content, args) { + args = optionalList(args); + args = processVocalFileName(args); + + return { + command: commandType.say, + commandRaw: speaker, + content: content.trim(), + args: [{ key: "speaker", value: speaker }].concat(args), + } + }; + var peg$f76 = function(content, args) { + args = optionalList(args); + + return { + command: commandType.say, + commandRaw: "say", + content: content.trim(), + args, + } + }; + var peg$f77 = function() { return text(); }; + var peg$f78 = function(err) { report("unexpected statement `" + err + "`"); }; + var peg$currPos = options.peg$currPos | 0; + var peg$savedPos = peg$currPos; + var peg$posDetailsCache = [{ line: 1, column: 1 }]; + var peg$maxFailPos = peg$currPos; + var peg$maxFailExpected = options.peg$maxFailExpected || []; + var peg$silentFails = options.peg$silentFails | 0; + + var peg$result; + + if (options.startRule) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + + function offset() { + return peg$savedPos; + } + + function range() { + return { + source: peg$source, + start: peg$savedPos, + end: peg$currPos + }; + } + + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + + function expected(description, location) { + location = location !== undefined + ? location + : peg$computeLocation(peg$savedPos, peg$currPos); + + throw peg$buildStructuredError( + [peg$otherExpectation(description)], + input.substring(peg$savedPos, peg$currPos), + location + ); + } + + function error(message, location) { + location = location !== undefined + ? location + : peg$computeLocation(peg$savedPos, peg$currPos); + + throw peg$buildSimpleError(message, location); + } + + function peg$literalExpectation(text, ignoreCase) { + return { type: "literal", text: text, ignoreCase: ignoreCase }; + } + + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; + } + + function peg$anyExpectation() { + return { type: "any" }; + } + + function peg$endExpectation() { + return { type: "end" }; + } + + function peg$otherExpectation(description) { + return { type: "other", description: description }; + } + + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos]; + var p; + + if (details) { + return details; + } else { + if (pos >= peg$posDetailsCache.length) { + p = peg$posDetailsCache.length - 1; + } else { + p = pos; + while (!peg$posDetailsCache[--p]) {} + } + + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + + p++; + } + + peg$posDetailsCache[pos] = details; + + return details; + } + } + + function peg$computeLocation(startPos, endPos, offset) { + var startPosDetails = peg$computePosDetails(startPos); + var endPosDetails = peg$computePosDetails(endPos); + + var res = { + source: peg$source, + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + if (offset && peg$source && (typeof peg$source.offset === "function")) { + res.start = peg$source.offset(res.start); + res.end = peg$source.offset(res.end); + } + return res; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { return; } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildSimpleError(message, location) { + return new peg$SyntaxError(message, null, null, location); + } + + function peg$buildStructuredError(expected, found, location) { + return new peg$SyntaxError( + peg$SyntaxError.buildMessage(expected, found), + expected, + found, + location + ); + } + + function peg$parseStart() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseProgram(); + s2 = peg$parseEOF(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f0(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseProgram(); + s2 = peg$parseREPORT(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f1(s1); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseREPORT() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e0); } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (input.length > peg$currPos) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e0); } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f2(); + } + s0 = s1; + + return s0; + } + + function peg$parseProgram() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseSourceElements(); + if (s1 === peg$FAILED) { + s1 = null; + } + peg$savedPos = s0; + s1 = peg$f3(s1); + s0 = s1; + + return s0; + } + + function peg$parseSourceElements() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parseSourceElement(); + if (s1 !== peg$FAILED) { + s2 = peg$parseCommentSegment(); + if (s2 === peg$FAILED) { + s2 = null; + } + s3 = []; + s4 = peg$parseSourceElementTail(); + while (s4 !== peg$FAILED) { + s3.push(s4); + s4 = peg$parseSourceElementTail(); + } + peg$savedPos = s0; + s0 = peg$f4(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseSourceElementTail() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parseEOS(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceElement(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCommentSegment(); + if (s3 === peg$FAILED) { + s3 = null; + } + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSKIPToNextStatement(); + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceElement(); + if (s2 !== peg$FAILED) { + s3 = peg$parseCommentSegment(); + if (s3 === peg$FAILED) { + s3 = null; + } + s1 = [s1, s2, s3]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseSKIPToNextStatement() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parseREPORTNonCompletedParsing(); + if (s1 !== peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseREPORTNonCompletedParsing() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseNonLineTerminator(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseNonLineTerminator(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f5(); + } + s0 = s1; + + return s0; + } + + function peg$parseNonLineTerminator() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseLineTerminatorSequence(); + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseCommentSymbol() { + var s0; + + if (input.charCodeAt(peg$currPos) === 59) { + s0 = peg$c4; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e1); } + } + + return s0; + } + + function peg$parseCommentSegment() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parse_(); + s2 = peg$parseCommentSymbol(); + if (s2 !== peg$FAILED) { + s3 = peg$currPos; + s4 = peg$parseComment(); + s3 = input.substring(s3, peg$currPos); + s0 = s3; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseSourceElement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$parseStatement(); + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e2); } + } + + return s0; + } + + function peg$parseArgList() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseArg(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$currPos; + peg$silentFails++; + s5 = peg$parse__(); + peg$silentFails--; + peg$currPos = s4; + s4 = undefined; + s5 = peg$parseArg(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$currPos; + peg$silentFails++; + s5 = peg$parse__(); + peg$silentFails--; + peg$currPos = s4; + s4 = undefined; + s5 = peg$parseArg(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f6(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e3); } + } + + return s0; + } + + function peg$parseArg() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parse__(); + peg$silentFails--; + peg$currPos = s1; + s1 = undefined; + s2 = peg$parseArgStart(); + if (s2 !== peg$FAILED) { + s3 = peg$parseArgBody(); + if (s3 !== peg$FAILED) { + s0 = s3; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e4); } + } + + return s0; + } + + function peg$parseArgStart() { + var s0; + + if (input.substr(peg$currPos, 2) === peg$c5) { + s0 = peg$c5; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e5); } + } + + return s0; + } + + function peg$parseArgBody() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parseArgWithValue(); + if (s1 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseArgWithoutValue(); + if (s1 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseArgWithValue() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseArgKey(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c7; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e7); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseStringLiteralAllowWhiteSpace(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f7(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e6); } + } + + return s0; + } + + function peg$parseArgWithoutValue() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseArgKey(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f8(s1); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e8); } + } + + return s0; + } + + function peg$parseReservedWord() { + var s0, s1; + + peg$silentFails++; + s0 = peg$parseChangeBgToken(); + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e9); } + } + + return s0; + } + + function peg$parseChangeBgToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 8) === peg$c9) { + s1 = peg$c9; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e11); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e10); } + } + + return s0; + } + + function peg$parseChangeFigureToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 12) === peg$c10) { + s1 = peg$c10; + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e13); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e12); } + } + + return s0; + } + + function peg$parseBgmToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c11) { + s1 = peg$c11; + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e15); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e14); } + } + + return s0; + } + + function peg$parseVideoToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c12) { + s1 = peg$c12; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e17); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e16); } + } + + return s0; + } + + function peg$parsePixiToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 11) === peg$c13) { + s1 = peg$c13; + peg$currPos += 11; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e19); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e18); } + } + + return s0; + } + + function peg$parsePixiInitToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 8) === peg$c14) { + s1 = peg$c14; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e21); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e20); } + } + + return s0; + } + + function peg$parseIntroToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c15) { + s1 = peg$c15; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e23); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e22); } + } + + return s0; + } + + function peg$parseMiniAvatarToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 10) === peg$c16) { + s1 = peg$c16; + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e25); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e24); } + } + + return s0; + } + + function peg$parseChangeSceneToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 11) === peg$c17) { + s1 = peg$c17; + peg$currPos += 11; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e27); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e26); } + } + + return s0; + } + + function peg$parseChooseToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c18) { + s1 = peg$c18; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e29); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e28); } + } + + return s0; + } + + function peg$parseEndToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 3) === peg$c19) { + s1 = peg$c19; + peg$currPos += 3; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e31); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e30); } + } + + return s0; + } + + function peg$parseSetComplexAnimationToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 19) === peg$c20) { + s1 = peg$c20; + peg$currPos += 19; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e33); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e32); } + } + + return s0; + } + + function peg$parseSetFilterToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c21) { + s1 = peg$c21; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e35); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e34); } + } + + return s0; + } + + function peg$parseLabelToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 5) === peg$c22) { + s1 = peg$c22; + peg$currPos += 5; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e37); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e36); } + } + + return s0; + } + + function peg$parseJumpLabelToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c23) { + s1 = peg$c23; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e39); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e38); } + } + + return s0; + } + + function peg$parseChooseLabelToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 11) === peg$c24) { + s1 = peg$c24; + peg$currPos += 11; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e41); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e40); } + } + + return s0; + } + + function peg$parseSetVarToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 6) === peg$c25) { + s1 = peg$c25; + peg$currPos += 6; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e43); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e42); } + } + + return s0; + } + + function peg$parseIfToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 2) === peg$c26) { + s1 = peg$c26; + peg$currPos += 2; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e45); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e44); } + } + + return s0; + } + + function peg$parseCallSceneToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c27) { + s1 = peg$c27; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e47); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e46); } + } + + return s0; + } + + function peg$parseShowVarsToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 8) === peg$c28) { + s1 = peg$c28; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e49); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e48); } + } + + return s0; + } + + function peg$parseUnlockCgToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 8) === peg$c29) { + s1 = peg$c29; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e51); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e50); } + } + + return s0; + } + + function peg$parseUnlockBgmToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 9) === peg$c30) { + s1 = peg$c30; + peg$currPos += 9; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e53); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e52); } + } + + return s0; + } + + function peg$parseFilmModeToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 8) === peg$c31) { + s1 = peg$c31; + peg$currPos += 8; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e55); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e54); } + } + + return s0; + } + + function peg$parseSetTextboxToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 10) === peg$c32) { + s1 = peg$c32; + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e57); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e56); } + } + + return s0; + } + + function peg$parseSetAnimationToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 12) === peg$c33) { + s1 = peg$c33; + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e59); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e58); } + } + + return s0; + } + + function peg$parsePlayEffectToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 10) === peg$c34) { + s1 = peg$c34; + peg$currPos += 10; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e61); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e60); } + } + + return s0; + } + + function peg$parseSetTempAnimationToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 16) === peg$c35) { + s1 = peg$c35; + peg$currPos += 16; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e63); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e62); } + } + + return s0; + } + + function peg$parseCommentToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 7) === peg$c36) { + s1 = peg$c36; + peg$currPos += 7; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e65); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e64); } + } + + return s0; + } + + function peg$parseSetTransformToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 12) === peg$c37) { + s1 = peg$c37; + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e67); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e66); } + } + + return s0; + } + + function peg$parseSetTransitionToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 13) === peg$c38) { + s1 = peg$c38; + peg$currPos += 13; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e69); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e68); } + } + + return s0; + } + + function peg$parseGetUserInputToken() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.substr(peg$currPos, 12) === peg$c39) { + s1 = peg$c39; + peg$currPos += 12; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e71); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseIdentifierPart(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e70); } + } + + return s0; + } + + function peg$parseArgKey() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseKeyCharacter(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseKeyCharacter(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } else { + s0 = s1; + } + + return s0; + } + + function peg$parseKeyCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = input.charAt(peg$currPos); + if (peg$r0.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e72); } + } + if (s2 === peg$FAILED) { + s2 = peg$parseWhiteSpace(); + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + s2 = peg$parseArgStart(); + } + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f9(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseStringLiteral() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c40; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e74); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseSingleStringCharacter(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseSingleStringCharacter(); + } + if (input.charCodeAt(peg$currPos) === 39) { + s3 = peg$c40; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e74); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f10(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c42; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e75); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseDoubleStringCharacter(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseDoubleStringCharacter(); + } + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c42; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e75); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f11(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseStringCharacter(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseStringCharacter(); + } + peg$savedPos = s0; + s1 = peg$f12(s1); + s0 = s1; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e73); } + } + + return s0; + } + + function peg$parseStringLiteralAllowWhiteSpace() { + var s0, s1, s2, s3; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 39) { + s1 = peg$c40; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e74); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseSingleStringCharacter(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseSingleStringCharacter(); + } + if (input.charCodeAt(peg$currPos) === 39) { + s3 = peg$c40; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e74); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f13(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 34) { + s1 = peg$c42; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e75); } + } + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parseDoubleStringCharacter(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parseDoubleStringCharacter(); + } + if (input.charCodeAt(peg$currPos) === 34) { + s3 = peg$c42; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e75); } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f14(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = []; + s2 = peg$parseStringCharacterAllowWhiteSpace(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseStringCharacterAllowWhiteSpace(); + } + peg$savedPos = s0; + s1 = peg$f15(s1); + s0 = s1; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e76); } + } + + return s0; + } + + function peg$parseSingleStringCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = input.charAt(peg$currPos); + if (peg$r1.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e77); } + } + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f16(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c43; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e78); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseEscapeSequence(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f17(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseDoubleStringCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = input.charAt(peg$currPos); + if (peg$r2.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e79); } + } + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f18(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c43; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e78); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseEscapeSequence(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f19(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseStringCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseCommentSymbol(); + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + s2 = peg$parseWhiteSpace(); + if (s2 === peg$FAILED) { + s2 = peg$parseArgStart(); + } + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f20(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseStringCharacterAllowWhiteSpace() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseCommentSymbol(); + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + s2 = peg$parseArgStart(); + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f21(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseEscapeSequence() { + var s0, s1, s2, s3; + + s0 = peg$parseCharacterEscapeSequence(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 48) { + s1 = peg$c44; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e80); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + peg$silentFails++; + s3 = peg$parseDecimalDigit(); + peg$silentFails--; + if (s3 === peg$FAILED) { + s2 = undefined; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f22(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseHexEscapeSequence(); + if (s0 === peg$FAILED) { + s0 = peg$parseUnicodeEscapeSequence(); + } + } + } + + return s0; + } + + function peg$parseCharacterEscapeSequence() { + var s0; + + s0 = peg$parseSingleEscapeCharacter(); + if (s0 === peg$FAILED) { + s0 = peg$parseNonEscapeCharacter(); + } + + return s0; + } + + function peg$parseSingleEscapeCharacter() { + var s0, s1; + + s0 = input.charAt(peg$currPos); + if (peg$r3.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e81); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 98) { + s1 = peg$c45; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e82); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f23(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 102) { + s1 = peg$c46; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e83); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f24(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 110) { + s1 = peg$c47; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e84); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f25(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 114) { + s1 = peg$c48; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e85); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f26(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 116) { + s1 = peg$c49; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e86); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f27(); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 118) { + s1 = peg$c50; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e87); } + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f28(); + } + s0 = s1; + } + } + } + } + } + } + + return s0; + } + + function peg$parseBraceCharacterSequence() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r4.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e88); } + } + + return s0; + } + + function peg$parseNonEscapeCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseEscapeCharacter(); + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f29(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseEscapeCharacter() { + var s0; + + s0 = peg$parseSingleEscapeCharacter(); + if (s0 === peg$FAILED) { + s0 = input.charAt(peg$currPos); + if (peg$r5.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e89); } + } + } + + return s0; + } + + function peg$parseDecimalDigit() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r6.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e90); } + } + + return s0; + } + + function peg$parseHexEscapeSequence() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 120) { + s1 = peg$c51; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e91); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + s4 = peg$parseHexDigit(); + if (s4 !== peg$FAILED) { + s5 = peg$parseHexDigit(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s2 = input.substring(s2, peg$currPos); + } else { + s2 = s3; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f30(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseUnicodeEscapeSequence() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 117) { + s1 = peg$c53; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e92); } + } + if (s1 !== peg$FAILED) { + s2 = peg$currPos; + s3 = peg$currPos; + s4 = peg$parseHexDigit(); + if (s4 !== peg$FAILED) { + s5 = peg$parseHexDigit(); + if (s5 !== peg$FAILED) { + s6 = peg$parseHexDigit(); + if (s6 !== peg$FAILED) { + s7 = peg$parseHexDigit(); + if (s7 !== peg$FAILED) { + s4 = [s4, s5, s6, s7]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s2 = input.substring(s2, peg$currPos); + } else { + s2 = s3; + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f31(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseIdentifierStart() { + var s0, s1, s2; + + s0 = input.charAt(peg$currPos); + if (peg$r7.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e93); } + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 92) { + s1 = peg$c43; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e78); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseUnicodeEscapeSequence(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f32(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseHexDigit() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r8.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e94); } + } + + return s0; + } + + function peg$parseIdentifierPart() { + var s0; + + s0 = peg$parseIdentifierStart(); + if (s0 === peg$FAILED) { + s0 = input.charAt(peg$currPos); + if (peg$r9.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e95); } + } + } + + return s0; + } + + function peg$parseUnicodeLetter() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r10.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e96); } + } + + return s0; + } + + function peg$parseUnicodeCombiningMark() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r11.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e97); } + } + + return s0; + } + + function peg$parseSourceCharacter() { + var s0; + + if (input.length > peg$currPos) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e0); } + } + + return s0; + } + + function peg$parseLineTerminator() { + var s0, s1; + + peg$silentFails++; + s0 = input.charAt(peg$currPos); + if (peg$r12.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e99); } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e98); } + } + + return s0; + } + + function peg$parseLineTerminatorSequence() { + var s0, s1; + + peg$silentFails++; + if (input.charCodeAt(peg$currPos) === 10) { + s0 = peg$c54; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e101); } + } + if (s0 === peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c55) { + s0 = peg$c55; + peg$currPos += 2; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e102); } + } + if (s0 === peg$FAILED) { + s0 = input.charAt(peg$currPos); + if (peg$r13.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e103); } + } + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e100); } + } + + return s0; + } + + function peg$parseWhiteSpace() { + var s0, s1; + + peg$silentFails++; + s0 = input.charAt(peg$currPos); + if (peg$r14.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e105); } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e104); } + } + + return s0; + } + + function peg$parse_M_() { + var s0, s1; + + s0 = []; + s1 = peg$parseWhiteSpace(); + if (s1 === peg$FAILED) { + s1 = peg$parseLineTerminatorSequence(); + } + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parseWhiteSpace(); + if (s1 === peg$FAILED) { + s1 = peg$parseLineTerminatorSequence(); + } + } + } else { + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parse__() { + var s0, s1; + + s0 = []; + s1 = peg$parseWhiteSpace(); + if (s1 === peg$FAILED) { + s1 = peg$parseLineTerminatorSequence(); + } + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parseWhiteSpace(); + if (s1 === peg$FAILED) { + s1 = peg$parseLineTerminatorSequence(); + } + } + + return s0; + } + + function peg$parse_() { + var s0, s1; + + s0 = []; + s1 = peg$parseWhiteSpace(); + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parseWhiteSpace(); + } + + return s0; + } + + function peg$parseComment() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = []; + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseLineTerminator(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = undefined; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parseSourceCharacter(); + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$currPos; + s3 = peg$currPos; + peg$silentFails++; + s4 = peg$parseLineTerminator(); + peg$silentFails--; + if (s4 === peg$FAILED) { + s3 = undefined; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + s4 = peg$parseSourceCharacter(); + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + } + s0 = input.substring(s0, peg$currPos); + + return s0; + } + + function peg$parseEOS() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parse_(); + if (input.charCodeAt(peg$currPos) === 59) { + s2 = peg$c4; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e1); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseComment(); + s4 = peg$parseLineTerminatorSequence(); + if (s4 !== peg$FAILED) { + s1 = [s1, s2, s3, s4]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parse_(); + s2 = peg$parseLineTerminatorSequence(); + if (s2 !== peg$FAILED) { + s1 = [s1, s2]; + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + + return s0; + } + + function peg$parseEOF() { + var s0, s1; + + s0 = peg$currPos; + peg$silentFails++; + if (input.length > peg$currPos) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e0); } + } + peg$silentFails--; + if (s1 === peg$FAILED) { + s0 = undefined; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseEmptyStatement() { + var s0, s1, s2, s3, s4; + + s0 = peg$currPos; + s1 = peg$parse_(); + s2 = peg$parseCommentSegment(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f33(s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$currPos; + s3 = peg$parse_(); + s4 = peg$parseLineTerminatorSequence(); + if (s4 !== peg$FAILED) { + s3 = [s3, s4]; + s2 = s3; + } else { + peg$currPos = s2; + s2 = peg$FAILED; + } + peg$silentFails--; + if (s2 !== peg$FAILED) { + peg$currPos = s1; + s1 = undefined; + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f34(); + } + s0 = s1; + } + + return s0; + } + + function peg$parseChangeBgStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseChangeBgToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f35(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e106); } + } + + return s0; + } + + function peg$parseChangeFigureStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseChangeFigureToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f36(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e108); } + } + + return s0; + } + + function peg$parseBgmStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseBgmToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f37(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e109); } + } + + return s0; + } + + function peg$parseVideoStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseVideoToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f38(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e110); } + } + + return s0; + } + + function peg$parsePixiStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parsePixiToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f39(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e111); } + } + + return s0; + } + + function peg$parsePixiInitStatement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parsePixiInitToken(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f40(); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e112); } + } + + return s0; + } + + function peg$parseIntroStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseIntroToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteralAllowWhiteSpace(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f41(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e113); } + } + + return s0; + } + + function peg$parseMiniAvatarStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseMiniAvatarToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f42(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e114); } + } + + return s0; + } + + function peg$parseChangeSceneStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseChangeSceneToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f43(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e115); } + } + + return s0; + } + + function peg$parseChooseStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseChooseToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseChoiceList(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f44(s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e116); } + } + + return s0; + } + + function peg$parseChoiceList() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseChoice(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$currPos; + s4 = peg$parseVerticalBar(); + if (s4 !== peg$FAILED) { + s5 = peg$parseChoice(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$parseVerticalBar(); + if (s4 !== peg$FAILED) { + s5 = peg$parseChoice(); + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + peg$savedPos = s0; + s0 = peg$f45(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e117); } + } + + return s0; + } + + function peg$parseVerticalBar() { + var s0; + + if (input.charCodeAt(peg$currPos) === 124) { + s0 = peg$c62; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e118); } + } + + return s0; + } + + function peg$parseChoice() { + var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; + + peg$silentFails++; + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c63; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e120); } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseNoParenthesisExpression(); + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c65; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e121); } + } + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c66; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e122); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parseNoBracketExpression(); + if (input.charCodeAt(peg$currPos) === 93) { + s6 = peg$c68; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e123); } + } + if (s6 !== peg$FAILED) { + if (input.substr(peg$currPos, 2) === peg$c69) { + s7 = peg$c69; + peg$currPos += 2; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e124); } + } + if (s7 !== peg$FAILED) { + s8 = peg$parseChoiceTextLiteral(); + if (input.charCodeAt(peg$currPos) === 58) { + s9 = peg$c56; + peg$currPos++; + } else { + s9 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s9 !== peg$FAILED) { + s10 = peg$parseChoiceDestinationLiteral(); + peg$savedPos = s0; + s0 = peg$f46(s2, s5, s8, s10); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseChoiceTextLiteral(); + if (input.charCodeAt(peg$currPos) === 58) { + s2 = peg$c56; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseChoiceDestinationLiteral(); + peg$savedPos = s0; + s0 = peg$f47(s1, s3); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e119); } + } + + return s0; + } + + function peg$parseNoParenthesisExpression() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseNoParenthesisExpressionCharacter(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseNoParenthesisExpressionCharacter(); + } + peg$savedPos = s0; + s1 = peg$f48(s1); + s0 = s1; + + return s0; + } + + function peg$parseNoParenthesisExpressionCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s2 = peg$c65; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e121); } + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f49(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseNoBracketExpression() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseNoBracketExpressionCharacter(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseNoBracketExpressionCharacter(); + } + peg$savedPos = s0; + s1 = peg$f50(s1); + s0 = s1; + + return s0; + } + + function peg$parseNoBracketExpressionCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 93) { + s2 = peg$c68; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e123); } + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f51(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseChoiceTextLiteral() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseChoiceTextCharacter(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseChoiceTextCharacter(); + } + s0 = input.substring(s0, peg$currPos); + + return s0; + } + + function peg$parseChoiceTextCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseCommentSymbol(); + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s2 = peg$c56; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f52(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseChoiceDestinationLiteral() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseChoiceDestinationCharacter(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseChoiceDestinationCharacter(); + } + s0 = input.substring(s0, peg$currPos); + + return s0; + } + + function peg$parseChoiceDestinationCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = peg$parseCommentSymbol(); + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + s2 = peg$parseVerticalBar(); + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f53(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseEndStatement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseEndToken(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f54(); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e125); } + } + + return s0; + } + + function peg$parseSetComplexAnimationStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetComplexAnimationToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f55(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e126); } + } + + return s0; + } + + function peg$parseSetFilterStatement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetFilterToken(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f56(); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e127); } + } + + return s0; + } + + function peg$parseLabelStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseLabelToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f57(s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e128); } + } + + return s0; + } + + function peg$parseJumpLabelStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseJumpLabelToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f58(s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e129); } + } + + return s0; + } + + function peg$parseSetVarStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetVarToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseInternalArgWithValue(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f59(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseSetVarToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseArgWithValue(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f60(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e130); } + } + + return s0; + } + + function peg$parseInternalArgWithValue() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseArgKey(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c7; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e7); } + } + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 40) { + s3 = peg$c63; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e120); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseInternalArgLiteral(); + if (s4 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s5 = peg$c65; + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e121); } + } + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f61(s1, s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e6); } + } + + return s0; + } + + function peg$parseInternalArgLiteral() { + var s0, s1, s2; + + peg$silentFails++; + s0 = peg$currPos; + s1 = []; + s2 = peg$parseInternalArgCharacter(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseInternalArgCharacter(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } else { + s0 = s1; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e131); } + } + + return s0; + } + + function peg$parseInternalArgCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = input.charAt(peg$currPos); + if (peg$r15.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e132); } + } + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s2 = peg$c7; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e7); } + } + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f62(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseCallSceneStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseCallSceneToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f63(s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e133); } + } + + return s0; + } + + function peg$parseShowVarsStatement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseShowVarsToken(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f64(); + } + s0 = s1; + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e134); } + } + + return s0; + } + + function peg$parseUnlockCgStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseUnlockCgToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f65(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e135); } + } + + return s0; + } + + function peg$parseUnlockBgmStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseUnlockBgmToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f66(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e136); } + } + + return s0; + } + + function peg$parseFilmModeStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseFilmModeToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteralAllowWhiteSpace(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f67(s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e137); } + } + + return s0; + } + + function peg$parseSetTextboxStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetTextboxToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f68(s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e138); } + } + + return s0; + } + + function peg$parseSetAnimationStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetAnimationToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f69(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e139); } + } + + return s0; + } + + function peg$parseSetTransitionStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetTransitionToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseArgList(); + if (s4 === peg$FAILED) { + s4 = null; + } + peg$savedPos = s0; + s0 = peg$f70(s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e140); } + } + + return s0; + } + + function peg$parsePlayEffectStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parsePlayEffectToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f71(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e141); } + } + + return s0; + } + + function peg$parseSetTempAnimationStatement() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetTempAnimationToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 91) { + s4 = peg$c66; + peg$currPos++; + } else { + s4 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e122); } + } + if (s4 !== peg$FAILED) { + s5 = peg$parseNoBracketExpression(); + if (input.charCodeAt(peg$currPos) === 93) { + s6 = peg$c68; + peg$currPos++; + } else { + s6 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e123); } + } + if (s6 !== peg$FAILED) { + s7 = peg$parseArgList(); + if (s7 === peg$FAILED) { + s7 = null; + } + peg$savedPos = s0; + s0 = peg$f72(s5, s7); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e142); } + } + + return s0; + } + + function peg$parseSetTransformStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSetTransformToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseStringLiteral(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f73(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e143); } + } + + return s0; + } + + function peg$parseGetUserInputStatement() { + var s0, s1, s2, s3, s4, s5; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseGetUserInputToken(); + if (s1 !== peg$FAILED) { + s2 = peg$parse__(); + if (input.charCodeAt(peg$currPos) === 58) { + s3 = peg$c56; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s3 !== peg$FAILED) { + s4 = peg$parseArgKey(); + if (s4 !== peg$FAILED) { + s5 = peg$parseArgList(); + if (s5 === peg$FAILED) { + s5 = null; + } + peg$savedPos = s0; + s0 = peg$f74(s4, s5); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e144); } + } + + return s0; + } + + function peg$parseSayStatement() { + var s0, s1, s2, s3, s4; + + peg$silentFails++; + s0 = peg$currPos; + s1 = peg$parseSpeakerLiteral(); + if (input.charCodeAt(peg$currPos) === 58) { + s2 = peg$c56; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e107); } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseStringLiteralAllowWhiteSpace(); + if (s3 !== peg$FAILED) { + s4 = peg$parseArgList(); + if (s4 === peg$FAILED) { + s4 = null; + } + peg$savedPos = s0; + s0 = peg$f75(s1, s3, s4); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseNonEmptyStringLiteralAllowWhiteSpace(); + if (s1 !== peg$FAILED) { + s2 = peg$parseArgList(); + if (s2 === peg$FAILED) { + s2 = null; + } + peg$savedPos = s0; + s0 = peg$f76(s1, s2); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e145); } + } + + return s0; + } + + function peg$parseNonEmptyStringLiteralAllowWhiteSpace() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseStringCharacterAllowWhiteSpace(); + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseStringCharacterAllowWhiteSpace(); + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s0 = input.substring(s0, peg$currPos); + } else { + s0 = s1; + } + + return s0; + } + + function peg$parseSpeakerLiteral() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + s2 = peg$parseSpeakerCharacter(); + while (s2 !== peg$FAILED) { + s1.push(s2); + s2 = peg$parseSpeakerCharacter(); + } + s0 = input.substring(s0, peg$currPos); + + return s0; + } + + function peg$parseSpeakerCharacter() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$currPos; + peg$silentFails++; + s2 = input.charAt(peg$currPos); + if (peg$r16.test(s2)) { + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e146); } + } + if (s2 === peg$FAILED) { + s2 = peg$parseLineTerminator(); + if (s2 === peg$FAILED) { + s2 = peg$parseEOS(); + if (s2 === peg$FAILED) { + s2 = peg$parseArgStart(); + } + } + } + peg$silentFails--; + if (s2 === peg$FAILED) { + s1 = undefined; + } else { + peg$currPos = s1; + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + s2 = peg$parseSourceCharacter(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s0 = peg$f77(); + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseStatement() { + var s0, s1; + + peg$silentFails++; + s0 = peg$parseChangeBgStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseChangeFigureStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseBgmStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseVideoStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parsePixiStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parsePixiInitStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseIntroStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseMiniAvatarStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseChangeSceneStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseChooseStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseEndStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetComplexAnimationStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetFilterStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseLabelStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseJumpLabelStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetVarStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseCallSceneStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseShowVarsStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseUnlockCgStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseUnlockBgmStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseFilmModeStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetTextboxStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetAnimationStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetTransitionStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parsePlayEffectStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetTempAnimationStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSetTransformStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseGetUserInputStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseSayStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseEmptyStatement(); + if (s0 === peg$FAILED) { + s0 = peg$parseERRORStatement(); + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + peg$silentFails--; + if (s0 === peg$FAILED) { + s1 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e147); } + } + + return s0; + } + + function peg$parseERRORStatement() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$currPos; + s2 = []; + s3 = peg$currPos; + s4 = peg$currPos; + peg$silentFails++; + s5 = peg$parseEOS(); + peg$silentFails--; + if (s5 === peg$FAILED) { + s4 = undefined; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + if (input.length > peg$currPos) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e0); } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + if (s3 !== peg$FAILED) { + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$currPos; + s4 = peg$currPos; + peg$silentFails++; + s5 = peg$parseEOS(); + peg$silentFails--; + if (s5 === peg$FAILED) { + s4 = undefined; + } else { + peg$currPos = s4; + s4 = peg$FAILED; + } + if (s4 !== peg$FAILED) { + if (input.length > peg$currPos) { + s5 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s5 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e0); } + } + if (s5 !== peg$FAILED) { + s4 = [s4, s5]; + s3 = s4; + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } else { + peg$currPos = s3; + s3 = peg$FAILED; + } + } + } else { + s2 = peg$FAILED; + } + if (s2 !== peg$FAILED) { + s1 = input.substring(s1, peg$currPos); + } else { + s1 = s2; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$f78(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseLl() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r17.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e148); } + } + + return s0; + } + + function peg$parseLm() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r18.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e149); } + } + + return s0; + } + + function peg$parseLo() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r19.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e150); } + } + + return s0; + } + + function peg$parseLt() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r20.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e151); } + } + + return s0; + } + + function peg$parseLu() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r21.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e152); } + } + + return s0; + } + + function peg$parseMc() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r22.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e153); } + } + + return s0; + } + + function peg$parseMn() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r23.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e154); } + } + + return s0; + } + + function peg$parseNd() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r24.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e155); } + } + + return s0; + } + + function peg$parseNl() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r25.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e156); } + } + + return s0; + } + + function peg$parsePc() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r26.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e157); } + } + + return s0; + } + + function peg$parseZs() { + var s0; + + s0 = input.charAt(peg$currPos); + if (peg$r27.test(s0)) { + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { peg$fail(peg$e158); } + } + + return s0; + } + + + // ----- Error Handling ----- + let errors = []; + function report(message, loc = location()) { + errors.push({ + location: `${loc.start.offset}(${loc.start.line}:${loc.start.column})..${loc.end.offset}(${loc.end.line}:${loc.end.column})`, + message, + }); + } + + peg$result = peg$startRuleFunction(); + + if (options.peg$library) { + return /** @type {any} */ ({ + peg$result, + peg$currPos, + peg$FAILED, + peg$maxFailExpected, + peg$maxFailPos + }); + } + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail(peg$endExpectation()); + } + + throw peg$buildStructuredError( + peg$maxFailExpected, + peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, + peg$maxFailPos < input.length + ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) + : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) + ); + } +} + +const peg$allowedStartRules = [ + "Start" +]; + +export { + peg$allowedStartRules as StartRules, + peg$SyntaxError as SyntaxError, + peg$parse as parse +}; +//# sourceMappingURL=parser.js.map diff --git a/packages/parser/src/parser.js.map b/packages/parser/src/parser.js.map new file mode 100644 index 000000000..1fa566992 --- /dev/null +++ b/packages/parser/src/parser.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["parser.pegjs"],"names":["$top_level_initializer","Start","program","REPORT","Program","body","SourceElements","head","tail","SourceElementTail","SKIPToNextStatement","REPORTNonCompletedParsing","NonLineTerminator","CommentSymbol","CommentSegment","SourceElement","ArgList","Arg","ArgStart","ArgBody","ArgWithValue","key","value","ArgWithoutValue","ReservedWord","ChangeBgToken","ChangeFigureToken","BgmToken","VideoToken","PixiToken","PixiInitToken","IntroToken","MiniAvatarToken","ChangeSceneToken","ChooseToken","EndToken","SetComplexAnimationToken","SetFilterToken","LabelToken","JumpLabelToken","ChooseLabelToken","SetVarToken","IfToken","CallSceneToken","ShowVarsToken","UnlockCgToken","UnlockBgmToken","FilmModeToken","SetTextboxToken","SetAnimationToken","PlayEffectToken","SetTempAnimationToken","CommentToken","SetTransformToken","SetTransitionToken","GetUserInputToken","ArgKey","KeyCharacter","StringLiteral","sequence","StringLiteralAllowWhiteSpace","SingleStringCharacter","DoubleStringCharacter","StringCharacter","StringCharacterAllowWhiteSpace","EscapeSequence","CharacterEscapeSequence","SingleEscapeCharacter","BraceCharacterSequence","NonEscapeCharacter","EscapeCharacter","DecimalDigit","HexEscapeSequence","digits","UnicodeEscapeSequence","IdentifierStart","HexDigit","IdentifierPart","UnicodeLetter","UnicodeCombiningMark","SourceCharacter","LineTerminator","LineTerminatorSequence","WhiteSpace","_M_","__","_","Comment","EOS","EOF","EmptyStatement","comment","ChangeBgStatement","fileName","args","ChangeFigureStatement","BgmStatement","VideoStatement","PixiStatement","performName","PixiInitStatement","IntroStatement","lines","MiniAvatarStatement","ChangeSceneStatement","ChooseStatement","choices","ChoiceList","VerticalBar","Choice","sexp","cexp","text","dest","NoParenthesisExpression","NoParenthesisExpressionCharacter","NoBracketExpression","NoBracketExpressionCharacter","ChoiceTextLiteral","ChoiceTextCharacter","ChoiceDestinationLiteral","ChoiceDestinationCharacter","EndStatement","SetComplexAnimationStatement","animationName","SetFilterStatement","LabelStatement","labelName","JumpLabelStatement","SetVarStatement","kv","InternalArgWithValue","InternalArgLiteral","InternalArgCharacter","CallSceneStatement","sceneName","ShowVarsStatement","UnlockCgStatement","name","UnlockBgmStatement","FilmModeStatement","content","SetTextboxStatement","SetAnimationStatement","SetTransitionStatement","PlayEffectStatement","SetTempAnimationStatement","json","SetTransformStatement","GetUserInputStatement","into","SayStatement","speaker","NonEmptyStringLiteralAllowWhiteSpace","SpeakerLiteral","SpeakerCharacter","Statement","ERRORStatement","err","Ll","Lm","Lo","Lt","Lu","Mc","Mn","Nd","Nl","Pc","Zs","$initializer"],"mappings":";;;;;AAAEA;AACFA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAkB2B,2CAA2C,E;kCACxC,2CAA2C,E;2BAG/D,mCAAmC,E;+BAGjB;AAC5B;AACA,IAAI,E;qCAGgE;AACpE;AACA,IAAI,E;2BAUsB;AAC1B;AACA,IAAI,E;qCAkB4B;AAChC;AACA,IAAI,E;qCAYqD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;8BAGc;AAClB;AACA,IAAI,E;2BAsDkH,gBAAgB,E;oCAcvF,2BAA2B,E;oCAC3B,2BAA2B,E;oCACzC,0BAA0B,E;oCAGZ,2BAA2B,E;oCAC3B,2BAA2B,E;oCAC1B,2BAA2B,E;4BAGrB,gBAAgB,E;oCAClC,kBAAkB,E;4BAGA,gBAAgB,E;oCAClC,kBAAkB,E;4BAGiC,gBAAgB,E;4BAG7B,gBAAgB,E;4BAMjE,cAAc,E;4BAY3B,cAAc,E;4BACd,cAAc,E;4BACd,cAAc,E;4BACd,cAAc,E;4BACd,cAAc,E;4BACd,cAAc,E;4BASiC,gBAAgB,E;kCAYpC;AACvC;AACA,IAAI,E;kCAGqD;AACzD;AACA,IAAI,E;oCAQuC,kBAAkB,E;mCA8E7B;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;4BAC+B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;0CAG6D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;0CAGiE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;0CAGwD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;0CAG0D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;6CAG4D;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;4BAGiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;uCAGsE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;0CAG+D;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;0CAGgE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;mCAGyC;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAG0C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;kDAMuI;AAC3I;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAC4D;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;oCAG8C,2BAA2B,E;4BAGxB,gBAAgB,E;oCAGvB,2BAA2B,E;4BAGpB,gBAAgB,E;4BAMA,gBAAgB,E;4BAMR,gBAAgB,E;4BAG7E;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;+CAG6E;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;4BAGkB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;qCAG6C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;qCAGiD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;oCAI4D;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;oCAEoD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAGmD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;4BAMuE,gBAAgB,E;qCAGtC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;4BAGiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAGyD;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAG0D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;mCAG6D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;mCAGgD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;yCAGgE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;gCAG2C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAG2D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAG+E;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAG6D;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;sCAGsD;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;kDAIiF;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;yCAC8D;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,E;4BAS4E,gBAAgB,E;+BA8C/D,+CAA+C,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA9zBhFC,cAAK;;;AACgB;AAAfC,SAAQ;AAAQ;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkD;AAClD;AAAfA,WAAQ;AAAQ;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADkD;;;;;WAGvEC,eAAM;;;AACE;AAAD;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAA;AAAA;AAAA;AAAC;AAAA;AAAA;AAAA;AAAA;;;;;WAERC,gBAAO;;;AACmB;AAApBC,SAAK;AAAL;AAAAA,WAAmB;AAAA;AAAC;AAAA;AAAA;;;;;WAI1BC,uBAAc;;;AACU;AAAlBC,SAAK;AAA6B;AAAf;AAAc;AAAA;AAAA;AAAEC,WAAK;AAAC;AAAiB;AAAA;AAAjB;AAAiB;AAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAIxCC,0BAAiB;;;AACR;AAAH;AAAiB;AAAb;AAAa;AAAC;AAAc;AAAA;AAAA;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgB;AACd;AAAnB;AAAiC;AAAb;AAAa;AAAC;AAAc;AAAA;AAAA;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADA;;;;;WAGvCC,4BAAmB;;;AACY;AAAzB;AAAyB;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAE/BC,kCAAyB;;;AACD;AAAD;AAAjB;AAAiB;AAAA;AAAA;AAAjB;AAAiB;AAAA;AAAA;AAAA;AAAC;AAAA;AAAA;AAAA;AAAA;;;;;WAIxBC,0BAAiB;;;AACc;AAAzB;AAAA;AAAE;AAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAE/BC,sBAAa;;;AACP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,uBAAc;;;AACP;AAAD;AAAE;AAAa;AAAE;AAAC;AAAD;AAAF;AAAA;AAAA;AAAA;AAAA;;;;;WAErBC,sBAAa;;;AAAb;AACM;AAAS;AAAA;AAAA;AAAA;AAAA;;;;;WAKfC,gBAAO;;;AAAP;AACc;AAART,SAAK;AAAG;AAACC,WAAK;AAAI;AAAH;AAAA;AAAC;AAAD;AAAA;AAAA;AAAI;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAK;AAAA;AAAL;AAAH;AAAA;AAAC;AAAD;AAAA;AAAA;AAAI;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAK;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAET;AAAA;AAAA;AAAA;AAAA;;;;;WAELS,YAAG;;;AAAH;AACS;AAAH;AAAA;AAAC;AAAD;AAAA;AAAA;AAAI;AAAQ;AAAE;AAAF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAS;AAAA;AAAA;AAAA;AAAA;;;;;WAE3BC,iBAAQ;;;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,gBAAO;;;AACD;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;AAAG;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAH;;;;;WAEnBC,qBAAY;;;AAAZ;AACgB;AAAVC,SAAI;AAAU;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,aAAM;AAAP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAef;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,wBAAe;;;AAAf;AACgB;AAAVF,SAAI;AAAM;AAAA;AAAA;AAAA;AAAA;AAEX;AAAA;AAAA;AAAA;AAAA;;;;;WAILG,qBAAY;;;AAAZ;AACM;AAAO;AAAA;AAAA;AAAA;AAAA;;;;;WAObC,sBAAa;;;AAAb;AAAiE;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAU;AAAe;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,0BAAiB;;;AAAjB;AAAqE;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAc;AAAW;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,iBAAQ;;;AAAR;AAA4D;AAAL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAK;AAAoB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAApB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,mBAAU;;;AAAV;AAAkE;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAW;AAAc;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,kBAAS;;;AAAT;AAAoE;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;AAAY;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,sBAAa;;;AAAb;AAAiE;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAU;AAAe;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,mBAAU;;;AAAV;AAA8D;AAAP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO;AAAkB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiC;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,wBAAe;;;AAAf;AAAmE;AAAZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAY;AAAa;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,yBAAgB;;;AAAhB;AAAoE;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;AAAY;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,oBAAW;;;AAAX;AAA+D;AAAR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAQ;AAAiB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgC;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,iBAAQ;;;AAAR;AAA4D;AAAL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAK;AAAoB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAApB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,iCAAwB;;;AAAxB;AAA4E;AAArB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAqB;AAAI;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmB;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,uBAAc;;;AAAd;AAAkE;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAW;AAAc;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,mBAAU;;;AAAV;AAA8D;AAAP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO;AAAkB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiC;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,uBAAc;;;AAAd;AAAkE;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAW;AAAc;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,yBAAgB;;;AAAhB;AAAoE;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAa;AAAY;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,oBAAW;;;AAAX;AAA+D;AAAR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAQ;AAAiB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgC;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,gBAAO;;;AAAP;AAA2D;AAAJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAI;AAAqB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAArB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,uBAAc;;;AAAd;AAAkE;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAW;AAAc;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,sBAAa;;;AAAb;AAAiE;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAU;AAAe;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,sBAAa;;;AAAb;AAAiE;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAU;AAAe;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,uBAAc;;;AAAd;AAAkE;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAW;AAAc;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,sBAAa;;;AAAb;AAAiE;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAU;AAAe;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,wBAAe;;;AAAf;AAAmE;AAAZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAY;AAAa;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,0BAAiB;;;AAAjB;AAAqE;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAc;AAAW;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,wBAAe;;;AAAf;AAAmE;AAAZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAY;AAAa;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,8BAAqB;;;AAArB;AAAyE;AAAlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkB;AAAO;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsB;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,qBAAY;;;AAAZ;AAAgE;AAAT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAS;AAAgB;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,0BAAiB;;;AAAjB;AAAqE;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAc;AAAW;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,2BAAkB;;;AAAlB;AAAsE;AAAf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAe;AAAU;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyB;AAAA;AAAA;AAAA;AAAA;;;;;WAC/FC,0BAAiB;;;AAAjB;AAAqE;AAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAc;AAAW;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAA;AAAA;AAAA;AAAA;;;;;WAQ/FC,eAAM;;;AACA;AAAa;AAAZ;AAAY;AAAA;AAAA;AAAZ;AAAY;AAAA;AAAA;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,qBAAY;;;AACwF;AAA9F;AAAA;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgF;AAAjC;AAAiC;AAApB;AAAoB;AAAH;AAAG;AAAG;AAAH;AAAA;AAAA;AAAA;AAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAapGC,sBAAa;;;AAAb;AACS;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAA/BC,WAAS;AAAA;AAAqB;AAAA;AAArB;AAAqB;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACkC;AAAlE;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAA/BA,aAAS;AAAA;AAAqB;AAAA;AAArB;AAAqB;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkC;AAC5C;AAAzBA,aAAS;AAAA;AAAe;AAAA;AAAf;AAAe;AAAC;AAAA;AAAA;AAD4C;AAAA;AACf;AAAA;AAAA;AAAA;AAAA;;;;;WAE5DC,qCAA4B;;;AAA5B;AACS;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAA/BD,WAAS;AAAA;AAAqB;AAAA;AAArB;AAAqB;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACkC;AAAlE;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAA/BA,aAAS;AAAA;AAAqB;AAAA;AAArB;AAAqB;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkC;AAC7B;AAAxCA,aAAS;AAAA;AAA8B;AAAA;AAA9B;AAA8B;AAAC;AAAA;AAAA;AAD6B;AAAA;AACC;AAAA;AAAA;AAAA;AAAA;;;;;WAE5EE,8BAAqB;;;AACe;AAA9B;AAAA;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAU;AAAG;AAAH;AAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAC7D;AAAJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAI;AAACF,aAAS;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAD6D;;;;;WAGvEG,8BAAqB;;;AACe;AAA9B;AAAA;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAU;AAAG;AAAH;AAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAC7D;AAAJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAI;AAACH,aAAS;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAD6D;;;;;WAGvEI,wBAAe;;;AACsD;AAA/D;AAAA;AAAE;AAAiD;AAAjC;AAAiC;AAAhB;AAAgB;AAAV;AAAU;AAAG;AAAH;AAAA;AAAA;AAAA;AAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAErEC,uCAA8B;;;AAC0B;AAAlD;AAAA;AAAE;AAAoC;AAApB;AAAoB;AAAH;AAAG;AAAG;AAAH;AAAA;AAAA;AAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAIxDC,uBAAc;;;AACR;AAEiB;AADd;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAC;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACc;AAAjB;AAAiB;AACjB;AADiB;AAAA;AAAA;;;;;WAGvBC,gCAAuB;;;AACjB;AAAqB;AACrB;AADqB;;;;;WAG3BC,8BAAqB;;;AACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOqB;AAJlB;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAA;AAAA;AAIkB;AAHlB;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAA;AAAA;AAGkB;AAFlB;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAA;AAAA;AAEkB;AADlB;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAA;AAAA;AACkB;AAAlB;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAA;AAAA;AAAkB;AAClB;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAA;AAAA;AADkB;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAG3BC,+BAAsB;;;AAChB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAKNC,2BAAkB;;;AACuB;AAAnC;AAAA;AAAE;AAAe;AAAG;AAAH;AAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAEzCC,wBAAe;;;AACT;AAAqB;AACrB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADqB;;;;;WAK3BC,qBAAY;;;AACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,0BAAiB;;;AACR;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,WAAO;AAAU;AAAR;AAAQ;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAjB;AAAAA,aAAO;AAAA;AAAPA,aAAO;AAAA;AAAR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAITC,8BAAqB;;;AACZ;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACD,WAAO;AAAU;AAAR;AAA0B;AAAjB;AAAiB;AAAR;AAAQ;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAnC;AAAAA,aAAO;AAAA;AAAPA,aAAO;AAAA;AAAR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAMTE,wBAAe;;;AACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEG;AACC;AAAJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAI;AAAChB,aAAS;AAAV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADD;;;;;WAGTiB,iBAAQ;;;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,uBAAc;;;AACR;AAAe;AACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADe;;;;;WAOrBC,sBAAa;;;AACP;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAONC,6BAAoB;;;AACd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAWNC,wBAAe;;;AACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,uBAAc;;;AAAd;AACM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkB;AAAA;AAAA;AAAA;AAAA;;;;;WAExBC,+BAAsB;;;AAAtB;AACM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACM;AAAN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAM;AACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADM;AAAA;AAGE;AAAA;AAAA;AAAA;AAAA;;;;;WAEdC,mBAAU;;;AAAV;AACM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AAAA;AAAA;AAAA;AAAA;;;;;WAGRC,YAAG;;;AACG;AAAC;AAAU;AAAG;AAAH;AAAyB;AAAA;AAAA;AAAnC;AAAU;AAAG;AAAH;AAAyB;AAAA;AAAA;AAAA;;;;;WAE1CC,WAAE;;;AACI;AAAC;AAAU;AAAG;AAAH;AAAyB;AAAA;AAAnC;AAAU;AAAG;AAAH;AAAyB;;;;;WAE1CC,UAAC;;;AACK;AAAC;AAAU;AAAA;AAAV;AAAU;;;;;WAEjBC,gBAAO;;;AACD;AAAkC;AAAjB;AAAf;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAe;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiB;AAAA;AAAjB;AAAf;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAe;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiB;AAAlC;;;;;WAENC,YAAG;;;AACI;AAAD;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAW;AAAP;AAAQ;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAuB;AACnC;AAAD;AAAE;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADmC;;;;;WAG1CC,YAAG;;;AACG;AAAA;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAINC,uBAAc;;;AACP;AAAD;AAAEC,SAAQ;AAAT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASF;AAC4B;AAA3B;AAAA;AAAG;AAAD;AAAE;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2B;AAAA;AAAA;AAAA;AAAA;AAD5B;;;;;WAULC,0BAAiB;;;AAAjB;AACmB;AAAb;AAA2C;AAA7B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAtBC,aAAS;AAAa;AAACC,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU5C;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,8BAAqB;;;AAArB;AACuB;AAAjB;AAA+C;AAA7B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAtBF,aAAS;AAAa;AAACC,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUhD;AAAA;AAAA;AAAA;AAAA;;;;;WAELE,qBAAY;;;AAAZ;AACc;AAAR;AAAsC;AAA7B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAtBH,aAAS;AAAa;AAACC,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUvC;AAAA;AAAA;AAAA;AAAA;;;;;WAELG,uBAAc;;;AAAd;AACgB;AAAV;AAAwC;AAA7B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAtBJ,aAAS;AAAa;AAACC,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUzC;AAAA;AAAA;AAAA;AAAA;;;;;WAELI,sBAAa;;;AAAb;AACe;AAAT;AAA0C;AAAhC;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6B;AAAzBC,aAAY;AAAa;AAACL,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS3C;AAAA;AAAA;AAAA;AAAA;;;;;WAELM,0BAAiB;;;AAAjB;AACmB;AAAb;AAAa;AAAA;AAAA;AAAA;AAAA;AAOd;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,uBAAc;;;AAAd;AACgB;AAAV;AAAoD;AAAzC;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsC;AAAlCC,aAAM;AAA4B;AAACR,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASrD;AAAA;AAAA;AAAA;AAAA;;;;;WAELS,4BAAmB;;;AAAnB;AACqB;AAAf;AAA6C;AAA7B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAtBV,aAAS;AAAa;AAACC,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS9C;AAAA;AAAA;AAAA;AAAA;;;;;WAELU,6BAAoB;;;AAApB;AACsB;AAAhB;AAA8C;AAA7B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0B;AAAtBX,aAAS;AAAa;AAACC,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/C;AAAA;AAAA;AAAA;AAAA;;;;;WAELW,wBAAe;;;AAAf;AACiB;AAAX;AAAkB;AAAN;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,aAAQ;AAAT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYnB;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,mBAAU;;;AAAV;AACiB;AAAXpG,SAAK;AAAM;AAACC,WAAK;AAAY;AAAX;AAAW;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAQ;AAAA;AAAR;AAAX;AAAW;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAQ;AAA1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAOZ;AAAA;AAAA;AAAA;AAAA;;;;;WAELoG,oBAAW;;;AACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,eAAM;;;AAAN;AACS;AAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAqG;AAAjGC,WAAK;AAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoE;AAAhE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgE;AAA5DC,eAAK;AAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AAA/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+B;AAA1BC,mBAAK;AAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,sBAAK;AAAN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtG;AACuB;AAAtBD,WAAK;AAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,aAAK;AAAN;AAAA;AAAA;AAAA;AAAA;AAAA;AAD3B;AAQA;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,gCAAuB;;;AACyB;AAA1CvD,SAAS;AAAA;AAAgC;AAAA;AAAhC;AAAgC;AAAC;AAAA;AAAA;;;;;WAEhDwD,yCAAgC;;;AACG;AAA7B;AAAA;AAAE;AAAoB;AAAH;AAAG;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAH;AAAA;AAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAEnCC,4BAAmB;;;AACyB;AAAtCzD,SAAS;AAAA;AAA4B;AAAA;AAA5B;AAA4B;AAAC;AAAA;AAAA;;;;;WAE5C0D,qCAA4B;;;AACO;AAA7B;AAAA;AAAE;AAAoB;AAAH;AAAG;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAH;AAAA;AAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAEnCC,0BAAiB;;;AACX;AAAoB;AAAnB;AAAmB;AAAA;AAAnB;AAAmB;AAApB;;;;;WAENC,4BAAmB;;;AACgC;AAA7C;AAAA;AAAE;AAAoC;AAApB;AAAoB;AAAH;AAAG;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAH;AAAA;AAAA;AAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAEnDC,iCAAwB;;;AAClB;AAA2B;AAA1B;AAA0B;AAAA;AAA1B;AAA0B;AAA3B;;;;;WAENC,mCAA0B;;;AACiC;AAArD;AAAA;AAAE;AAAoC;AAApB;AAAoB;AAAH;AAAG;AAAG;AAAH;AAAA;AAAA;AAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAE3DC,qBAAY;;;AAAZ;AACc;AAAR;AAAQ;AAAA;AAAA;AAAA;AAAA;AAOT;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,qCAA4B;;;AAA5B;AAC8B;AAAxB;AAA2D;AAAlC;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+B;AAA3BC,aAAc;AAAa;AAAC9B,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5D;AAAA;AAAA;AAAA;AAAA;;;;;WAEL+B,2BAAkB;;;AAAlB;AACoB;AAAd;AAAc;AAAA;AAAA;AAAA;AAAA;AAOf;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,uBAAc;;;AAAd;AACgB;AAAV;AAAiB;AAAN;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,aAAU;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOlB;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,2BAAkB;;;AAAlB;AACoB;AAAd;AAAqB;AAAN;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACD,aAAU;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtB;AAAA;AAAA;AAAA;AAAA;;;;;WAELE,wBAAe;;;AAAf;AAEiB;AAAX;AAA0C;AAA9B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2B;AAAvBC,aAAG;AAAoB;AAACpC,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc3C;AAEY;AAAX;AAAkC;AAAtB;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmB;AAAfoC,eAAG;AAAY;AAACpC,iBAAK;AAAL;AAAAA,mBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAFnC;AAcA;AAAA;AAAA;AAAA;AAAA;;;;;WAELqC,6BAAoB;;;AAApB;AACgB;AAAV9G,SAAI;AAAuC;AAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgC;AAA5B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA4B;AAAxBC,eAAM;AAAkB;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa5C;AAAA;AAAA;AAAA;AAAA;;;;;WAEL8G,2BAAkB;;;AAAlB;AACM;AAAqB;AAApB;AAAoB;AAAA;AAAA;AAApB;AAAoB;AAAA;AAAA;AAAA;AAArB;AAAA;AAAA;AAAA;AAAA;AAAsB;AAAA;AAAA;AAAA;AAAA;;;;;WAE5BC,6BAAoB;;;AACqC;AAAnD;AAAA;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0C;AAApB;AAAoB;AAAH;AAAG;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAH;AAAA;AAAA;AAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAEzDC,2BAAkB;;;AAAlB;AACoB;AAAd;AAAqB;AAAN;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,aAAU;AAAX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOtB;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,0BAAiB;;;AAAjB;AACmB;AAAb;AAAa;AAAA;AAAA;AAAA;AAAA;AAOd;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,0BAAiB;;;AAAjB;AACmB;AAAb;AAAuC;AAAzB;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsB;AAAlBC,aAAK;AAAa;AAAC5C,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASxC;AAAA;AAAA;AAAA;AAAA;;;;;WAEL6C,2BAAkB;;;AAAlB;AACoB;AAAd;AAAwC;AAAzB;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsB;AAAlBD,aAAK;AAAa;AAAC5C,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASzC;AAAA;AAAA;AAAA;AAAA;;;;;WAEL8C,0BAAiB;;;AAAjB;AACmB;AAAb;AAAoB;AAAN;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACC,aAAQ;AAAT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASrB;AAAA;AAAA;AAAA;AAAA;;;;;WAELC,4BAAmB;;;AAAnB;AACqB;AAAf;AAAsB;AAAN;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACD,aAAQ;AAAT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB;AAAA;AAAA;AAAA;AAAA;;;;;WAELE,8BAAqB;;;AAArB;AACuB;AAAjB;AAA8C;AAA5B;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyB;AAArBF,aAAQ;AAAa;AAAC/C,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/C;AAAA;AAAA;AAAA;AAAA;;;;;WAELkD,+BAAsB;;;AAAtB;AACwB;AAAlB;AAAyB;AAAN;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAClD,aAAK;AAAL;AAAAA,eAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS1B;AAAA;AAAA;AAAA;AAAA;;;;;WAELmD,4BAAmB;;;AAAnB;AACqB;AAAf;AAAyC;AAAzB;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsB;AAAlBP,aAAK;AAAa;AAAC5C,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU1C;AAAA;AAAA;AAAA;AAAA;;;;;WAELoD,kCAAyB;;;AAAzB;AAC2B;AAArB;AAA6D;AAAvC;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoC;AAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgC;AAA5BC,eAAK;AAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAACrD,iBAAK;AAAL;AAAAA,mBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAa9D;AAAA;AAAA;AAAA;AAAA;;;;;WAELsD,8BAAqB;;;AAArB;AACuB;AAAjB;AAA2C;AAAzB;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsB;AAAlBD,aAAK;AAAa;AAACrD,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5C;AAAA;AAAA;AAAA;AAAA;;;;;WAELuD,8BAAqB;;;AAArB;AACuB;AAAjB;AAAoC;AAAlB;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAe;AAAXC,aAAK;AAAM;AAACxD,eAAK;AAAL;AAAAA,iBAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASrC;AAAA;AAAA;AAAA;AAAA;;;;;WAGLyD,qBAAY;;;AAAZ;AAC4B;AAAtBC,SAAQ;AAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAwC;AAApCX,WAAQ;AAA4B;AAAC/C,aAAK;AAAL;AAAAA,eAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUhE;AAC6C;AAA5C+C,WAAQ;AAAoC;AAAC/C,aAAK;AAAL;AAAAA,eAAY;AAAA;AAAb;AAAA;AAAA;AAAA;AAAA;AAAA;AAD7C;AAUA;AAAA;AAAA;AAAA;AAAA;;;;;WAEL2D,6CAAoC;;;AAC9B;AAA+B;AAA9B;AAA8B;AAAA;AAAA;AAA9B;AAA8B;AAAA;AAAA;AAAA;AAA/B;AAAA;AAAA;AAAA;AAAA;;;;;WAENC,uBAAc;;;AACR;AAAiB;AAAhB;AAAgB;AAAA;AAAhB;AAAgB;AAAjB;;;;;WAENC,yBAAgB;;;AAC8C;AAAxD;AAAA;AAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA0C;AAApB;AAAoB;AAAH;AAAG;AAAG;AAAH;AAAA;AAAA;AAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAC;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAM9DC,kBAAS;;;AAAT;AACM;AAiCc;AAhCd;AAgCc;AA/Bd;AA+Bc;AA9Bd;AA8Bc;AA7Bd;AA6Bc;AA5Bd;AA4Bc;AA3Bd;AA2Bc;AA1Bd;AA0Bc;AAzBd;AAyBc;AAxBd;AAwBc;AAvBd;AAuBc;AAtBd;AAsBc;AArBd;AAqBc;AApBd;AAoBc;AAnBd;AAmBc;AAlBd;AAkBc;AAjBd;AAiBc;AAhBd;AAgBc;AAfd;AAec;AAdd;AAcc;AAbd;AAac;AAZd;AAYc;AAXd;AAWc;AAVd;AAUc;AATd;AASc;AARd;AAQc;AAPd;AAOc;AANd;AAMc;AAHd;AAGc;AAAd;AAAc;AAEd;AAFc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;;;;;WAIpBC,uBAAc;;;AAAiB;AAAdC,SAAI;AAAS;AAAH;AAAJ;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAI;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAH;AAAJ;AAAA;AAAC;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAI;AAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAG;AAAA;AAAA;AAAA;AAAb;AAAAA,WAAI;AAAA;AAAJA,WAAI;AAAA;AAAU;AAAA;AAAA;AAAA;AAAA;;;;;WA2B/BC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;WAGLC,WAAE;;;AAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;AAr4BJC;AACDA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA;AACAA","file":"parser.js"} \ No newline at end of file diff --git a/packages/parser/src/parser.pegjs b/packages/parser/src/parser.pegjs new file mode 100644 index 000000000..5313f4459 --- /dev/null +++ b/packages/parser/src/parser.pegjs @@ -0,0 +1,979 @@ +{{ + const commandType = { + say: 0, // 对话 + changeBg: 1, // 更改背景 + changeFigure: 2, // 更改立绘 + bgm: 3, // 更改背景音乐 + video: 4, // 播放视频 + pixi: 5, // pixi演出 + pixiInit: 6, // pixi初始化 + intro: 7, // 黑屏文字演示 + miniAvatar: 8, // 小头像 + changeScene: 9, // 切换场景 + choose: 10, // 分支选择 + end: 11, // 结束游戏 + setComplexAnimation: 12, // 动画演出 + setFilter: 13, // 设置效果 + label: 14, // 标签 + jumpLabel: 15, // 跳转标签 + chooseLabel: 16, // 选择标签 + setVar: 17, // 设置变量 + if: 18, // 条件跳转 + callScene: 19, // 调用场景 + showVars: 20, + unlockCg: 21, + unlockBgm: 22, + filmMode: 23, + setTextbox: 24, + setAnimation: 25, + playEffect: 26, + setTempAnimation: 27, + comment: 28, + setTransform: 29, + setTransition: 30, + getUserInput: 31 + }; + + + function buildList(head, tail, index) { + return [head].concat(extractList(tail, index)); + } + + function extractList(list, index) { + return list.map(function(element) { return element[index]; }); + } + + function optionalList(value) { + return value !== null ? value : []; + } + + function optionalString(value) { + return value != null ? value : ""; + } + + function filterNulls(value) { + return value.filter(function(element) { return element != null; }); + } + + function processVocalFileName(args) { + return args.map((arg) => { + if (arg.key.toLowerCase().match(/.ogg|.mp3|.wav/)) { + return { + key: "vocal", + value: arg.key + }; + } + return arg; + }); + } + + function processNone(content) { + if (content === "" || content.toLowerCase() === "none") { + return ""; + } + return content; + } +}} + +{ + // ----- Error Handling ----- + let errors = []; + function report(message, loc = location()) { + errors.push({ + location: `${loc.start.offset}(${loc.start.line}:${loc.start.column})..${loc.end.offset}(${loc.end.line}:${loc.end.column})`, + message, + }); + } +} + + +// ----- Entrypoint ----- + +Start + = program:Program EOF { return { sentenceList: program, errors }; } + / program:Program REPORT { return { sentenceList: program, errors }; } + +REPORT + = .+ { report("parsing cannot preceed"); } + +Program + = body:SourceElements? { + return optionalList(body); + } + +SourceElements + = head:SourceElement CommentSegment? tail:(SourceElementTail)* { + return buildList(head, tail, 1); + } + +SourceElementTail + = EOS SourceElement CommentSegment? + / SKIPToNextStatement SourceElement CommentSegment? + +SKIPToNextStatement + = REPORTNonCompletedParsing LineTerminator + +REPORTNonCompletedParsing + = NonLineTerminator+ { + report("non-completed parsing"); + } + +NonLineTerminator + = !(LineTerminatorSequence) SourceCharacter + +CommentSymbol + = ";" + +CommentSegment + = _ CommentSymbol @$Comment + +SourceElement "source element" + = Statement + // / FunctionDeclaration + +// ----- Arguments ----- + +ArgList "arguments" + = head:Arg tail:(&__ Arg)* { + return buildList(head, tail, 1); + } + +Arg "argument" + = &__ ArgStart @ArgBody + +ArgStart + = " -" + +ArgBody + = @ArgWithValue / @ArgWithoutValue + +ArgWithValue "argument with value" + = key:ArgKey "=" value:StringLiteralAllowWhiteSpace { + value = value.trim() + + if (value === "none") { + value = ""; + } else if (value === "true" || value === "false") { + value = (value === "true"); + } else { + const number = Number(value); + if (!isNaN(number)) { + value = number; + } + } + + return { key, value }; + } + +ArgWithoutValue "argument without value" + = key:ArgKey { + return { key, value: true }; + } + +// ----- Reserved Words & Tokens ----- + +ReservedWord "reserve word" + = Keyword + // / ArgKeyword + +Keyword + = ChangeBgToken + + +ChangeBgToken "'changeBg'" = @"changeBg" !IdentifierPart +ChangeFigureToken "'changeFigure'" = @"changeFigure" !IdentifierPart +BgmToken "'bgm'" = @"bgm" !IdentifierPart +VideoToken "'playVideo'" = @"playVideo" !IdentifierPart // NOT SAME +PixiToken "'pixiPerform'" = @"pixiPerform" !IdentifierPart // NOT SAME +PixiInitToken "'pixiInit'" = @"pixiInit" !IdentifierPart +IntroToken "'intro'" = @"intro" !IdentifierPart +MiniAvatarToken "'miniAvatar'" = @"miniAvatar" !IdentifierPart +ChangeSceneToken "'changeScene'" = @"changeScene" !IdentifierPart +ChooseToken "'choose'" = @"choose" !IdentifierPart +EndToken "'end'" = @"end" !IdentifierPart +SetComplexAnimationToken "'setComplexAnimation'" = @"setComplexAnimation" !IdentifierPart +SetFilterToken "'setFilter'" = @"setFilter" !IdentifierPart +LabelToken "'label'" = @"label" !IdentifierPart +JumpLabelToken "'jumpLabel'" = @"jumpLabel" !IdentifierPart +ChooseLabelToken "'chooseLabel'" = @"chooseLabel" !IdentifierPart +SetVarToken "'setVar'" = @"setVar" !IdentifierPart +IfToken "'if'" = @"if" !IdentifierPart +CallSceneToken "'callScene'" = @"callScene" !IdentifierPart +ShowVarsToken "'showVars'" = @"showVars" !IdentifierPart +UnlockCgToken "'unlockCg'" = @"unlockCg" !IdentifierPart +UnlockBgmToken "'unlockBgm'" = @"unlockBgm" !IdentifierPart +FilmModeToken "'filmMode'" = @"filmMode" !IdentifierPart +SetTextboxToken "'setTextbox'" = @"setTextbox" !IdentifierPart +SetAnimationToken "'setAnimation'" = @"setAnimation" !IdentifierPart +PlayEffectToken "'playEffect'" = @"playEffect" !IdentifierPart +SetTempAnimationToken "'setTempAnimation'" = @"setTempAnimation" !IdentifierPart +CommentToken "'comment'" = @"comment" !IdentifierPart // NO HANDLER +SetTransformToken "'setTransform'" = @"setTransform" !IdentifierPart +SetTransitionToken "'setTransition'" = @"setTransition" !IdentifierPart +GetUserInputToken "'getUserInput'" = @"getUserInput" !IdentifierPart + + +/* +Currently, we do not need to check all argument keys. But the key should be +more strict than the value, e.g., do not allow symbols and special characters, +and should not be empty. +*/ +ArgKey + = $KeyCharacter+ + +KeyCharacter + = !(CommentSymbol / "=" / BraceCharacterSequence / WhiteSpace / LineTerminator / EOS / ArgStart) SourceCharacter { return text(); } + +// ArgKeyword +// = NextToken +// / LeftToken +// / TransformToken + +// NextToken "'next'" = @"next" !IdentifierPart +// LeftToken "'left'" = @"left" !IdentifierPart +// TransformToken "'transform'" = @"transform" !IdentifierPart + +// ----- String ----- + +StringLiteral "string" + = "'" sequence:SingleStringCharacter* "'" { return sequence.join(""); } + / '"' sequence:DoubleStringCharacter* '"' { return sequence.join(""); } + / sequence:StringCharacter* { return sequence.join("") } + +StringLiteralAllowWhiteSpace "string allow white space" + = "'" sequence:SingleStringCharacter* "'" { return sequence.join(""); } + / '"' sequence:DoubleStringCharacter* '"' { return sequence.join(""); } + / sequence:StringCharacterAllowWhiteSpace* { return sequence.join(""); } + +SingleStringCharacter + = !("'" / "\\" / LineTerminator) SourceCharacter { return text(); } + / "\\" sequence:EscapeSequence { return sequence; } + +DoubleStringCharacter + = !('"' / "\\" / LineTerminator) SourceCharacter { return text(); } + / "\\" sequence:EscapeSequence { return sequence; } + +StringCharacter + = !(CommentSymbol / LineTerminator / EOS / WhiteSpace / ArgStart) SourceCharacter { return text(); } + +StringCharacterAllowWhiteSpace + = !(CommentSymbol / LineTerminator / EOS / ArgStart) SourceCharacter { return text(); } + +// ----- String: Escape ----- + +EscapeSequence + = CharacterEscapeSequence + / "0" !DecimalDigit { return "\0"; } + / HexEscapeSequence + / UnicodeEscapeSequence + +CharacterEscapeSequence + = SingleEscapeCharacter + / NonEscapeCharacter + +SingleEscapeCharacter + = "'" + / '"' + / "\\" + / "b" { return "\b"; } + / "f" { return "\f"; } + / "n" { return "\n"; } + / "r" { return "\r"; } + / "t" { return "\t"; } + / "v" { return "\v"; } + +BraceCharacterSequence + = "{" + / "}" + / "(" + / ")" + +NonEscapeCharacter + = !(EscapeCharacter / LineTerminator) SourceCharacter { return text(); } + +EscapeCharacter + = SingleEscapeCharacter + / DecimalDigit + / "x" + / "u" + +DecimalDigit + = [0-9] + +HexEscapeSequence + = "x" digits:$(HexDigit HexDigit) { + return String.fromCharCode(parseInt(digits, 16)); + } + +UnicodeEscapeSequence + = "u" digits:$(HexDigit HexDigit HexDigit HexDigit) { + return String.fromCharCode(parseInt(digits, 16)); + } + +// ----- Identifier ----- + +IdentifierStart + = UnicodeLetter + / "$" + / "_" + / "\\" sequence:UnicodeEscapeSequence { return sequence; } + +HexDigit + = [0-9a-f]i + +IdentifierPart + = IdentifierStart + / UnicodeCombiningMark + / UnicodeDigit + / UnicodeConnectorPunctuation + / "\u200C" + / "\u200D" + +UnicodeLetter + = Lu + / Ll + / Lt + / Lm + / Lo + / Nl + +UnicodeCombiningMark + = Mn + / Mc + +UnicodeDigit + = Nd + +UnicodeConnectorPunctuation + = Pc + +// ----- Character, Space & Line Terminators ----- + +SourceCharacter + = . + +LineTerminator "line terminator" + = [\n\r\u2028\u2029] + +LineTerminatorSequence "end of line" + = "\n" + / "\r\n" + / "\r" + / "\u2028" + / "\u2029" + +WhiteSpace "whitespace" + = "\t" + / "\v" + / "\f" + / " " + / "\u00A0" + / "\uFEFF" + / Zs + +// Mandatory white space +_M_ + = (WhiteSpace / LineTerminatorSequence)+ + +__ + = (WhiteSpace / LineTerminatorSequence)* + +_ + = (WhiteSpace)* + +Comment + = $(!LineTerminator SourceCharacter)* + +EOS + = _ ";" Comment LineTerminatorSequence + / _ LineTerminatorSequence + +EOF + = !. + +// ----- Statements ----- + +EmptyStatement + = _ comment:CommentSegment { + comment = optionalString(comment); + + return { + command: commandType.comment, + commandRaw: "comment", + content: comment, + args: [], + } + } + / &(_ LineTerminatorSequence) { + return { + command: commandType.comment, + commandRaw: "comment", + content: "", + args: [], + } + } + +ChangeBgStatement "changeBg statement" + = ChangeBgToken __ ":" fileName:StringLiteral args:ArgList? { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.changeBg, + commandRaw: "changeBg", + content: fileName, + args, + }; + } + +ChangeFigureStatement "changeFigure statement" + = ChangeFigureToken __ ":" fileName:StringLiteral args:ArgList? { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.changeFigure, + commandRaw: "changeFigure", + content: fileName, + args, + }; + } + +BgmStatement "bgm statement" + = BgmToken __ ":" fileName:StringLiteral args:ArgList? { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.bgm, + commandRaw: "bgm", + content: fileName, + args, + }; + } + +VideoStatement "video statement" + = VideoToken __ ":" fileName:StringLiteral args:ArgList? { + args = optionalList(args); + fileName = processNone(fileName.trim()); + + return { + command: commandType.video, + commandRaw: "playVideo", + content: fileName, + args, + }; + } + +PixiStatement "pixi statement" + = PixiToken __ ":" performName:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.pixi, + commandRaw: "pixiPerform", + content: performName, + args, + }; + } + +PixiInitStatement "pixiInit statement" + = PixiInitToken { + return { + command: commandType.pixiInit, + commandRaw: "pixiInit", + content: "", + args: [], + }; + } + +IntroStatement "intro statement" + = IntroToken __ ":" lines:StringLiteralAllowWhiteSpace args:ArgList? { + args = optionalList(args); + + return { + command: commandType.intro, + commandRaw: "intro", + content: processNone(lines.trim()), + args, + }; + } + +MiniAvatarStatement "miniAvatar statement" + = MiniAvatarToken __ ":" fileName:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.miniAvatar, + commandRaw: "miniAvatar", + content: processNone(fileName.trim()), + args, + }; + } + +ChangeSceneStatement "changeScene statement" + = ChangeSceneToken __ ":" fileName:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.changeScene, + commandRaw: "changeScene", + content: processNone(fileName.trim()), + args, + }; + } + +ChooseStatement "choose statement" + = ChooseToken __ ":" choices:ChoiceList { + choices.choiceList = optionalList(choices.choiceList); + + return { + command: commandType.choose, + commandRaw: "choose", + content: "", + args: [ + { key: "choices", value: choices.choiceList }, + { key: "contentRawRange", value: choices.contentRawRange } + ], + }; + } + +ChoiceList "choices" + = head:Choice tail:(VerticalBar Choice)* { + const loc = location(); + + return { + contentRawRange: [loc.start.offset, loc.end.offset], + choiceList: buildList(head, tail, 1) + }; + } + +VerticalBar + = "|" + +Choice "choice" + = "(" sexp:NoParenthesisExpression ")" "[" cexp:NoBracketExpression "]" "->" text:ChoiceTextLiteral ":" dest:ChoiceDestinationLiteral { + return { + showExpression: sexp, + clickExpression: cexp, + text, + destination: dest, + } + } + / text:ChoiceTextLiteral ":" dest:ChoiceDestinationLiteral { + return { + showExpression: "", + clickExpression: "", + text, + destination: dest, + } + } + +NoParenthesisExpression + = sequence:NoParenthesisExpressionCharacter* { return sequence.join(""); } + +NoParenthesisExpressionCharacter + = !(LineTerminator / EOS / ")") SourceCharacter { return text(); } + +NoBracketExpression + = sequence:NoBracketExpressionCharacter* { return sequence.join(""); } + +NoBracketExpressionCharacter + = !(LineTerminator / EOS / "]") SourceCharacter { return text(); } + +ChoiceTextLiteral + = $ChoiceTextCharacter* + +ChoiceTextCharacter + = !(CommentSymbol / LineTerminator / EOS / ":") SourceCharacter { return text(); } + +ChoiceDestinationLiteral + = $ChoiceDestinationCharacter* + +ChoiceDestinationCharacter + = !(CommentSymbol / LineTerminator / EOS / VerticalBar) SourceCharacter { return text(); } + +EndStatement "end statement" + = EndToken { + return { + command: commandType.end, + commandRaw: "end", + content: "", + args: [], + }; + } + +SetComplexAnimationStatement "setComplexAnimation statement" + = SetComplexAnimationToken __ ":" animationName:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.setComplexAnimation, + commandRaw: "setComplexAnimation", + content: animationName, + args, + }; + } + +SetFilterStatement "setFilter statement" + = SetFilterToken { + return { + command: commandType.setFilter, + commandRaw: "setFilter", + content: "", + args: [], + }; + } + +LabelStatement "label statement" + = LabelToken __ ":" labelName:StringLiteral { + return { + command: commandType.label, + commandRaw: "label", + content: labelName, + args: [], + }; + } + +JumpLabelStatement "jumpLabel statement" + = JumpLabelToken __ ":" labelName:StringLiteral { + return { + command: commandType.jumpLabel, + commandRaw: "jumpLabel", + content: labelName, + args: [], + }; + } + +SetVarStatement "setVar statement" + /* Internal variables */ + = SetVarToken __ ":" kv:InternalArgWithValue args:ArgList? { + // we prefix variableName and expression with `#` to separate it from + // user-defined arguments + args = optionalList(args); + + return { + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: kv.key }, + { key: "#internalExpression", value: kv.value }, + ].concat(args), + }; + } + /* Other variables */ + / SetVarToken __ ":" kv:ArgWithValue args:ArgList? { + args = optionalList(args); + + return { + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: kv.key }, + { key: "#expression", value: kv.value }, + ].concat(args), + }; + } + +InternalArgWithValue "argument with value" + = key:ArgKey "=" "(" value:InternalArgLiteral ")" { + if (value === "none") { + value = ""; + } else if (value === "true" || value === "false") { + value = (value === "true"); + } else { + const number = Number(value); + if (!isNaN(number)) { + value = number; + } + } + + return { key, value }; + } + +InternalArgLiteral "internal argument" + = $InternalArgCharacter+ + +InternalArgCharacter + = !(CommentSymbol / ")" / LineTerminator / EOS / "=") SourceCharacter { return text(); } + +CallSceneStatement "callScene statement" + = CallSceneToken __ ":" sceneName:StringLiteral { + return { + command: commandType.callScene, + commandRaw: "callScene", + content: sceneName, + args: [], + }; + } + +ShowVarsStatement "showVars statement" + = ShowVarsToken { + return { + command: commandType.showVars, + commandRaw: "showVars", + content: "", + args: [], + }; + } + +UnlockCgStatement "unlockCg statement" + = UnlockCgToken __ ":" name:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.unlockCg, + commandRaw: "unlockCg", + content: name, + args, + }; + } + +UnlockBgmStatement "unlockBgm statement" + = UnlockBgmToken __ ":" name:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.unlockBgm, + commandRaw: "unlockBgm", + content: name, + args, + }; + } + +FilmModeStatement "filmMode statement" + = FilmModeToken __ ":" content:StringLiteralAllowWhiteSpace { + content = processNone(content.trim()); + + return { + command: commandType.filmMode, + commandRaw: "filmMode", + content, + args: [], + }; + } + +SetTextboxStatement "setTextbox statement" + = SetTextboxToken __ ":" content:StringLiteral { + return { + command: commandType.setTextbox, + commandRaw: "setTextbox", + content, + args: [], + }; + } + +SetAnimationStatement "setAnimation statement" + = SetAnimationToken __ ":" content:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.setAnimation, + commandRaw: "setAnimation", + content, + args, + }; + } + +SetTransitionStatement "setTransition statement" + = SetTransitionToken __ ":" args:ArgList? { + args = optionalList(args); + + return { + command: commandType.setTransition, + commandRaw: "setTransition", + content: "", + args, + }; + } + +PlayEffectStatement "playEffect statement" + = PlayEffectToken __ ":" name:StringLiteral args:ArgList? { + name = processNone(name.trim()); + args = optionalList(args); + + return { + command: commandType.playEffect, + commandRaw: "playEffect", + content: name, + args, + }; + } + +SetTempAnimationStatement "setTempAnimation statement" + = SetTempAnimationToken __ ":" "[" json:NoBracketExpression "]" args:ArgList? { + // Here, we do a trick by directly check whether a bracket is in the + // expression since we don't want to add extra cost on parsing JSON. + // The direct check holds because the content will never encounter a + // close bracket. + args = optionalList(args); + + return { + command: commandType.setTempAnimation, + commandRaw: "setTempAnimation", + content: `[${json}]`, + args, + }; + } + +SetTransformStatement "setTransform statement" + = SetTransformToken __ ":" json:StringLiteral args:ArgList? { + args = optionalList(args); + + return { + command: commandType.setTransform, + commandRaw: "setTransform", + content: json, + args, + }; + } + +GetUserInputStatement "getUserInput statement" + = GetUserInputToken __ ":" into:ArgKey args:ArgList? { + args = optionalList(args); + + return { + command: commandType.getUserInput, + commandRaw: "getUserInput", + content: into, + args, + }; + } + + +SayStatement "say statement" + = speaker:SpeakerLiteral ":" content:StringLiteralAllowWhiteSpace args:ArgList? { + args = optionalList(args); + args = processVocalFileName(args); + + return { + command: commandType.say, + commandRaw: speaker, + content: content.trim(), + args: [{ key: "speaker", value: speaker }].concat(args), + } + } + / content:NonEmptyStringLiteralAllowWhiteSpace args:ArgList? { + args = optionalList(args); + + return { + command: commandType.say, + commandRaw: "say", + content: content.trim(), + args, + } + } + +NonEmptyStringLiteralAllowWhiteSpace + = $StringCharacterAllowWhiteSpace+ + +SpeakerLiteral + = $SpeakerCharacter* + +SpeakerCharacter + = !(CommentSymbol / ":" / LineTerminator / EOS / ArgStart) SourceCharacter { return text(); } + + +/*****************************************************************************/ +/****************** ! REMEMBER TO ADD NEW STATEMENTS HERE ! ******************/ +/*****************************************************************************/ +Statement "statement" + = ChangeBgStatement + / ChangeFigureStatement + / BgmStatement + / VideoStatement + / PixiStatement + / PixiInitStatement + / IntroStatement + / MiniAvatarStatement + / ChangeSceneStatement + / ChooseStatement + / EndStatement + / SetComplexAnimationStatement + / SetFilterStatement + / LabelStatement + / JumpLabelStatement + / SetVarStatement + / CallSceneStatement + / ShowVarsStatement + / UnlockCgStatement + / UnlockBgmStatement + / FilmModeStatement + / SetTextboxStatement + / SetAnimationStatement + / SetTransitionStatement + / PlayEffectStatement + / SetTempAnimationStatement + / SetTransformStatement + / GetUserInputStatement +// if all commands failed, it should be a say statement +// (either with or without ':') + / SayStatement +// if still cannot match, it may be a comment without command or an empty line +// (which is also a comment) + / EmptyStatement +// if still cannot match, it should be an error + / ERRORStatement +/*****************************************************************************/ +/****************** ! REMEMBER TO ADD NEW STATEMENTS HERE ! ******************/ +/*****************************************************************************/ +ERRORStatement = err:$(!EOS .)+ { report("unexpected statement `" + err + "`"); }; + + +// ----- Unicode Character Categories ----- +// +// Extracted from the following Unicode Character Database file: +// +// http://www.unicode.org/Public/8.0.0/ucd/extracted/DerivedGeneralCategory.txt +// +// Unix magic used: +// +// grep "; $CATEGORY" DerivedGeneralCategory.txt | # Filter characters +// cut -f1 -d " " | # Extract code points +// grep -v '[0-9a-fA-F]\{5\}' | # Exclude non-BMP characters +// sed -e 's/\.\./-/' | # Adjust formatting +// sed -e 's/\([0-9a-fA-F]\{4\}\)/\\u\1/g' | # Adjust formatting +// tr -d '\n' # Join lines +// +// ECMA-262 allows using Unicode 3.0 or later, version 8.0.0 was the latest one +// at the time of writing. +// +// Non-BMP characters are completely ignored to avoid surrogate pair handling +// (detecting surrogate pairs isn't possible with a simple character class and +// other methods would degrade performance). I don't consider it a big deal as +// even parsers in JavaScript engines of common browsers seem to ignore them. + +// Letter, Lowercase +Ll = [\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137-\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148-\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C-\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA-\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9-\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC-\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF-\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F-\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0-\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB-\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE-\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0561-\u0587\u13F8-\u13FD\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6-\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FC7\u1FD0-\u1FD3\u1FD6-\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6-\u1FF7\u210A\u210E-\u210F\u2113\u212F\u2134\u2139\u213C-\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65-\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73-\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3-\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7B5\uA7B7\uA7FA\uAB30-\uAB5A\uAB60-\uAB65\uAB70-\uABBF\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A] + +// Letter, Modifier +Lm = [\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5-\u06E6\u07F4-\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C-\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D-\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA69C-\uA69D\uA717-\uA71F\uA770\uA788\uA7F8-\uA7F9\uA9CF\uA9E6\uAA70\uAADD\uAAF3-\uAAF4\uAB5C-\uAB5F\uFF70\uFF9E-\uFF9F] + +// Letter, Other +Lo = [\u00AA\u00BA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A-\uA62B\uA66E\uA6A0-\uA6E5\uA78F\uA7F7\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9E0-\uA9E4\uA9E7-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC] + +// Letter, Titlecase +Lt = [\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC] + +// Letter, Uppercase +Lu = [\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178-\u0179\u017B\u017D\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018B\u018E-\u0191\u0193-\u0194\u0196-\u0198\u019C-\u019D\u019F-\u01A0\u01A2\u01A4\u01A6-\u01A7\u01A9\u01AC\u01AE-\u01AF\u01B1-\u01B3\u01B5\u01B7-\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A-\u023B\u023D-\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u037F\u0386\u0388-\u038A\u038C\u038E-\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9-\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0-\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0528\u052A\u052C\u052E\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u13A0-\u13F5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E-\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA698\uA69A\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D-\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA796\uA798\uA79A\uA79C\uA79E\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA-\uA7AD\uA7B0-\uA7B4\uA7B6\uFF21-\uFF3A] + +// Mark, Spacing Combining +Mc = [\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E-\u094F\u0982-\u0983\u09BE-\u09C0\u09C7-\u09C8\u09CB-\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB-\u0ACC\u0B02-\u0B03\u0B3E\u0B40\u0B47-\u0B48\u0B4B-\u0B4C\u0B57\u0BBE-\u0BBF\u0BC1-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82-\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7-\u0CC8\u0CCA-\u0CCB\u0CD5-\u0CD6\u0D02-\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82-\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2-\u0DF3\u0F3E-\u0F3F\u0F7F\u102B-\u102C\u1031\u1038\u103B-\u103C\u1056-\u1057\u1062-\u1064\u1067-\u106D\u1083-\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7-\u17C8\u1923-\u1926\u1929-\u192B\u1930-\u1931\u1933-\u1938\u1A19-\u1A1A\u1A55\u1A57\u1A61\u1A63-\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B44\u1B82\u1BA1\u1BA6-\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2-\u1BF3\u1C24-\u1C2B\u1C34-\u1C35\u1CE1\u1CF2-\u1CF3\u302E-\u302F\uA823-\uA824\uA827\uA880-\uA881\uA8B4-\uA8C3\uA952-\uA953\uA983\uA9B4-\uA9B5\uA9BA-\uA9BB\uA9BD-\uA9C0\uAA2F-\uAA30\uAA33-\uAA34\uAA4D\uAA7B\uAA7D\uAAEB\uAAEE-\uAAEF\uAAF5\uABE3-\uABE4\uABE6-\uABE7\uABE9-\uABEA\uABEC] + +// Mark, Nonspacing +Mn = [\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962-\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2-\u09E3\u0A01-\u0A02\u0A3C\u0A41-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A70-\u0A71\u0A75\u0A81-\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7-\u0AC8\u0ACD\u0AE2-\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62-\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC-\u0CCD\u0CE2-\u0CE3\u0D01\u0D41-\u0D44\u0D4D\u0D62-\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039-\u103A\u103D-\u103E\u1058-\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193B\u1A17-\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80-\u1B81\u1BA2-\u1BA5\u1BA8-\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8-\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099-\u309A\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA825-\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9E5\uAA29-\uAA2E\uAA31-\uAA32\uAA35-\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEC-\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F] + +// Number, Decimal Digit +Nd = [\u0030-\u0039\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19] + +// Number, Letter +Nl = [\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF] + +// Punctuation, Connector +Pc = [\u005F\u203F-\u2040\u2054\uFE33-\uFE34\uFE4D-\uFE4F\uFF3F] + +// Separator, Space +Zs = [\u0020\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000] \ No newline at end of file diff --git a/packages/parser/src/sceneParser.ts b/packages/parser/src/sceneParser.ts new file mode 100644 index 000000000..9d2a72b83 --- /dev/null +++ b/packages/parser/src/sceneParser.ts @@ -0,0 +1,66 @@ +import { + commandType, + IAsset, + IScene, + ISentence, +} from './interface/sceneInterface'; +import { scriptParser } from './scriptParser/scriptParser'; +import uniqWith from 'lodash/uniqWith'; +import { fileType } from './interface/assets'; +import { ConfigMap } from './config/scriptConfig'; + +/** + * 场景解析器 + * @param rawScene 原始场景 + * @param sceneName 场景名称 + * @param sceneUrl 场景url + * @param assetsPrefetcher + * @param assetSetter + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + * @return {IScene} 解析后的场景 + */ +export const sceneParser = ( + rawScene: string, + sceneName: string, + sceneUrl: string, + assetsPrefetcher: (assetList: Array) => void, + assetSetter: (fileName: string, assetType: fileType) => string, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): IScene => { + const rawSentenceList = rawScene.split('\n'); // 原始句子列表 + + // 去分号留到后面去做了,现在注释要单独处理 + const rawSentenceListWithoutEmpty = rawSentenceList; + // .map((sentence) => sentence.split(";")[0]) + // .filter((sentence) => sentence.trim() !== ""); + let assetsList: Array = []; // 场景资源列表 + let subSceneList: Array = []; // 子场景列表 + const sentenceList: Array = rawSentenceListWithoutEmpty.map( + (sentence) => { + const returnSentence: ISentence = scriptParser( + sentence, + assetSetter, + ADD_NEXT_ARG_LIST, + SCRIPT_CONFIG_MAP, + ); + // 在这里解析出语句可能携带的资源和场景,合并到 assetsList 和 subSceneList + assetsList = [...assetsList, ...returnSentence.sentenceAssets]; + subSceneList = [...subSceneList, ...returnSentence.subScene]; + return returnSentence; + }, + ); + + // 开始资源的预加载 + assetsList = uniqWith(assetsList); // 去重 + assetsPrefetcher(assetsList); + + return { + sceneName: sceneName, // 场景名称 + sceneUrl: sceneUrl, + sentenceList: sentenceList, // 语句列表 + assetsList: assetsList, // 资源列表 + subSceneList: subSceneList, // 子场景列表 + }; +}; diff --git a/packages/parser/src/sceneTextPreProcessor.ts b/packages/parser/src/sceneTextPreProcessor.ts new file mode 100644 index 000000000..244c2c91b --- /dev/null +++ b/packages/parser/src/sceneTextPreProcessor.ts @@ -0,0 +1,223 @@ +/** + * Preprocessor for scene text. + * + * Use two-pass to generate a new scene text that concats multiline sequences + * into a single line and add placeholder lines to preserve the original number + * of lines. + * + * @param sceneText The original scene text + * @returns The processed scene text + */ +export function sceneTextPreProcess(sceneText: string): string { + let lines = sceneText.replaceAll('\r', '').split('\n'); + + lines = sceneTextPreProcessPassOne(lines); + lines = sceneTextPreProcessPassTwo(lines); + + return lines.join('\n'); +} + +/** + * Pass one. + * + * Add escape character to all lines that should be multiline. + * + * @param lines The original lines + * @returns The processed lines + */ +function sceneTextPreProcessPassOne(lines: string[]): string[] { + const processedLines: string[] = []; + let lastLineIsMultiline = false; + let thisLineIsMultiline = false; + + for (const line of lines) { + thisLineIsMultiline = false; + + if (canBeMultiline(line)) { + thisLineIsMultiline = true; + } + + if (shouldNotBeMultiline(line, lastLineIsMultiline)) { + thisLineIsMultiline = false; + } + + if (thisLineIsMultiline) { + processedLines[processedLines.length - 1] += '\\'; + } + + processedLines.push(line); + + lastLineIsMultiline = thisLineIsMultiline; + } + + return processedLines; +} + +function canBeMultiline(line: string): boolean { + if (!line.startsWith(' ')) { + return false; + } + + const trimmedLine = line.trimStart(); + return trimmedLine.startsWith('|') || trimmedLine.startsWith('-'); +} + +/** + * Logic to check if a line should not be multiline. + * + * @param line The line to check + * @returns If the line should not be multiline + */ +function shouldNotBeMultiline(line: string, lastLineIsMultiline: boolean): boolean { + if (!lastLineIsMultiline && isEmptyLine(line)) { + return true; + } + + // Custom logic: if the line contains -concat, it should not be multiline + if (line.indexOf('-concat') !== -1) { + return true; + } + + return false; +} + +function isEmptyLine(line: string): boolean { + return line.trim() === ''; +} + + +/** + * Pass two. + * + * Traverse the lines to + * - remove escape characters + * - add placeholder lines to preserve the original number of lines. + * + * @param lines The lines in pass one + * @returns The processed lines + */ +function sceneTextPreProcessPassTwo(lines: string[]): string[] { + const processedLines: string[] = []; + let currentMultilineContent = ""; + let placeHolderLines: string[] = []; + + function concat(line: string) { + let trimmed = line.trim(); + if (trimmed.startsWith('-')) { + trimmed = " " + trimmed; + } + currentMultilineContent = currentMultilineContent + trimmed; + placeHolderLines.push(placeholderLine(line)); + } + + for (const line of lines) { + console.log(line); + if (line.endsWith('\\')) { + const trueLine = line.slice(0, -1); + + if (currentMultilineContent === "") { + // first line + currentMultilineContent = trueLine; + } else { + // middle line + concat(trueLine); + } + continue; + } + + if (currentMultilineContent !== "") { + // end line + concat(line); + processedLines.push(currentMultilineContent); + processedLines.push(...placeHolderLines); + + placeHolderLines = []; + currentMultilineContent = ""; + continue; + } + + processedLines.push(line); + } + + return processedLines; +} + +/** + * Placeholder Line. Adding this line preserves the original number of lines + * in the scene text, so that it can be compatible with the graphical editor. + * + * @param content The original content on this line + * @returns The placeholder line + */ +function placeholderLine(content = "") { + return ";_WEBGAL_LINE_BREAK_" + content; +} + +// export function sceneTextPreProcess(sceneText: string): string { +// const lines = sceneText.replaceAll('\r', '').split('\n'); +// const processedLines: string[] = []; +// let lastNonMultilineIndex = -1; +// let isInMultilineSequence = false; + +// function isMultiline(line: string): boolean { +// if (!line.startsWith(' ')) return false; +// const trimmedLine = line.trimStart(); +// return trimmedLine.startsWith('|') || trimmedLine.startsWith('-'); +// } + +// for (let i = 0; i < lines.length; i++) { +// const line = lines[i]; + +// if (line.trim() === '') { +// // Empty line handling +// if (isInMultilineSequence) { +// // Check if the next line is a multiline line + +// let isStillInMulti = false; +// for (let j = i + 1; j < lines.length; j++) { +// const lookForwardLine = lines[j] || ''; +// // 遇到正常语句了,直接中断 +// if (lookForwardLine.trim() !== '' && !isMultiline(lookForwardLine)) { +// isStillInMulti = false; +// break; +// } +// // 必须找到后面接的是参数,并且中间没有遇到任何正常语句才行 +// if (lookForwardLine.trim() !== '' && isMultiline(lookForwardLine)) { +// isStillInMulti = true; +// break; +// } +// } +// if (isStillInMulti) { +// // Still within a multiline sequence +// processedLines.push(';_WEBGAL_LINE_BREAK_'); +// } else { +// // End of multiline sequence +// isInMultilineSequence = false; +// processedLines.push(line); +// } +// } else { +// // Preserve empty lines outside of multiline sequences +// processedLines.push(line); +// } +// } else if (isMultiline(line)) { +// // Multiline statement handling +// if (lastNonMultilineIndex >= 0) { +// // Concatenate to the previous non-multiline statement +// const trimedLine = line.trimStart(); +// const addBlank = trimedLine.startsWith('-') ? ' ' : ''; +// processedLines[lastNonMultilineIndex] += addBlank + trimedLine; +// } + +// // Add the special comment line +// processedLines.push(';_WEBGAL_LINE_BREAK_' + line); +// isInMultilineSequence = true; +// } else { +// // Non-multiline statement handling +// processedLines.push(line); +// lastNonMultilineIndex = processedLines.length - 1; +// isInMultilineSequence = false; +// } +// } + +// return processedLines.join('\n'); +// } \ No newline at end of file diff --git a/packages/parser/src/scriptParser/argsParser.ts b/packages/parser/src/scriptParser/argsParser.ts new file mode 100644 index 000000000..9cff77451 --- /dev/null +++ b/packages/parser/src/scriptParser/argsParser.ts @@ -0,0 +1,71 @@ +import { arg } from '../interface/sceneInterface'; +import { fileType } from '../interface/assets'; + +/** + * 参数解析器 + * @param argsRaw 原始参数字符串 + * @param assetSetter + * @return {Array} 解析后的参数列表 + */ +export function argsParser( + argsRaw: string, + assetSetter: (fileName: string, assetType: fileType) => string, +): Array { + const returnArrayList: Array = []; + // 处理参数 + // 不要去空格 + let newArgsRaw = argsRaw.replace(/ /g, ' '); + // 分割参数列表 + let rawArgsList: Array = newArgsRaw.split(' -'); + // 去除空字符串 + rawArgsList = rawArgsList.filter((e) => { + return e !== ''; + }); + rawArgsList.forEach((e) => { + const equalSignIndex = e.indexOf('='); + let argName = e.slice(0, equalSignIndex); + let argValue: string | undefined = e.slice(equalSignIndex + 1); + if (equalSignIndex < 0) { + argName = e; + argValue = undefined; + } + // 判断是不是语音参数 + if (argName.toLowerCase().match(/.ogg|.mp3|.wav/)) { + returnArrayList.push({ + key: 'vocal', + value: assetSetter(e, fileType.vocal), + }); + } else { + // 判断是不是省略参数 + if (argValue === undefined) { + returnArrayList.push({ + key: argName, + value: true, + }); + } else { + // 是字符串描述的布尔值 + if (argValue === 'true' || argValue === 'false') { + returnArrayList.push({ + key: argName, + value: argValue === 'true', + }); + } else { + // 是数字 + if (!isNaN(Number(argValue))) { + returnArrayList.push({ + key: argName, + value: Number(argValue), + }); + } else { + // 是普通参数 + returnArrayList.push({ + key: argName, + value: argValue, + }); + } + } + } + } + }); + return returnArrayList; +} diff --git a/packages/parser/src/scriptParser/assetsScanner.ts b/packages/parser/src/scriptParser/assetsScanner.ts new file mode 100644 index 000000000..cdff61be5 --- /dev/null +++ b/packages/parser/src/scriptParser/assetsScanner.ts @@ -0,0 +1,76 @@ +import { arg, commandType, IAsset } from '../interface/sceneInterface'; +import { fileType } from '../interface/assets'; + +/** + * 根据语句类型、语句内容、参数列表,扫描该语句可能携带的资源 + * @param command 语句类型 + * @param content 语句内容 + * @param args 参数列表 + * @return {Array} 语句携带的参数列表 + */ +export const assetsScanner = ( + command: commandType, + content: string, + args: Array, +): Array => { + let hasVocalArg = false; + const returnAssetsList: Array = []; + if (command === commandType.say) { + args.forEach((e) => { + if (e.key === 'vocal') { + hasVocalArg = true; + returnAssetsList.push({ + name: e.value as string, + url: e.value as string, + lineNumber: 0, + type: fileType.vocal, + }); + } + }); + } + if (content === 'none' || content === '') { + return returnAssetsList; + } + // 处理语句携带的资源 + if (command === commandType.changeBg) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.background, + }); + } + if (command === commandType.changeFigure) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.figure, + }); + } + if (command === commandType.miniAvatar) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.figure, + }); + } + if (command === commandType.video) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.video, + }); + } + if (command === commandType.bgm) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.bgm, + }); + } + return returnAssetsList; +}; diff --git a/packages/parser/src/scriptParser/commandParser.ts b/packages/parser/src/scriptParser/commandParser.ts new file mode 100644 index 000000000..b08655881 --- /dev/null +++ b/packages/parser/src/scriptParser/commandParser.ts @@ -0,0 +1,65 @@ +import { ConfigMap } from '../config/scriptConfig'; +import { commandType, parsedCommand } from '../interface/sceneInterface'; + +/** + * 处理命令 + * @param commandRaw + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + * @return {parsedCommand} 处理后的命令 + */ +export const commandParser = ( + commandRaw: string, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): parsedCommand => { + let returnCommand: parsedCommand = { + type: commandType.say, // 默认是say + additionalArgs: [], + }; + // 开始处理命令内容 + const type: commandType = getCommandType( + commandRaw, + ADD_NEXT_ARG_LIST, + SCRIPT_CONFIG_MAP, + ); + returnCommand.type = type; + // 如果是对话,加上额外的参数 + if (type === commandType.say && commandRaw !== 'say') { + returnCommand.additionalArgs.push({ + key: 'speaker', + value: commandRaw, + }); + } + returnCommand = addNextArg(returnCommand, type, ADD_NEXT_ARG_LIST); + return returnCommand; +}; + +/** + * 根据command原始值判断是什么命令 + * @param command command原始值 + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + * @return {commandType} 得到的command类型 + */ +function getCommandType( + command: string, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): commandType { + return SCRIPT_CONFIG_MAP.get(command)?.scriptType ?? commandType.say; +} + +function addNextArg( + commandToParse: parsedCommand, + thisCommandType: commandType, + ADD_NEXT_ARG_LIST: commandType[], +) { + if (ADD_NEXT_ARG_LIST.includes(thisCommandType)) { + commandToParse.additionalArgs.push({ + key: 'next', + value: true, + }); + } + return commandToParse; +} diff --git a/packages/parser/src/scriptParser/contentParser.ts b/packages/parser/src/scriptParser/contentParser.ts new file mode 100644 index 000000000..cbb6fd161 --- /dev/null +++ b/packages/parser/src/scriptParser/contentParser.ts @@ -0,0 +1,70 @@ +import { commandType } from '../interface/sceneInterface'; +import { fileType } from '../interface/assets'; + +/** + * 解析语句内容的函数,主要作用是把文件名改为绝对地址或相对地址(根据使用情况而定) + * @param contentRaw 原始语句内容 + * @param type 语句类型 + * @param assetSetter + * @return {string} 解析后的语句内容 + */ +export const contentParser = ( + contentRaw: string, + type: commandType, + assetSetter: any, +) => { + if (contentRaw === 'none' || contentRaw === '') { + return ''; + } + switch (type) { + case commandType.playEffect: + return assetSetter(contentRaw, fileType.vocal); + case commandType.changeBg: + return assetSetter(contentRaw, fileType.background); + case commandType.changeFigure: + return assetSetter(contentRaw, fileType.figure); + case commandType.bgm: + return assetSetter(contentRaw, fileType.bgm); + case commandType.callScene: + return assetSetter(contentRaw, fileType.scene); + case commandType.changeScene: + return assetSetter(contentRaw, fileType.scene); + case commandType.miniAvatar: + return assetSetter(contentRaw, fileType.figure); + case commandType.video: + return assetSetter(contentRaw, fileType.video); + case commandType.choose: + return getChooseContent(contentRaw, assetSetter); + case commandType.unlockBgm: + return assetSetter(contentRaw, fileType.bgm); + case commandType.unlockCg: + return assetSetter(contentRaw, fileType.background); + default: + return contentRaw; + } +}; + +function getChooseContent(contentRaw: string, assetSetter: any): string { + const chooseList = contentRaw.split(/(? = []; + const chooseValueList: Array = []; + for (const e of chooseList) { + chooseKeyList.push(e.split(/(? { + if (e.match(/\./)) { + return assetSetter(e, fileType.scene); + } else { + return e; + } + }); + let ret = ''; + for (let i = 0; i < chooseKeyList.length; i++) { + if (i !== 0) { + ret = ret + '|'; + } + ret = ret + `${chooseKeyList[i]}:${parsedChooseList[i]}`; + } + return ret; +} diff --git a/packages/parser/src/scriptParser/scriptParser.ts b/packages/parser/src/scriptParser/scriptParser.ts new file mode 100644 index 000000000..10bbfe197 --- /dev/null +++ b/packages/parser/src/scriptParser/scriptParser.ts @@ -0,0 +1,114 @@ +import { + arg, + commandType, + IAsset, + ISentence, + parsedCommand, +} from '../interface/sceneInterface'; +import { commandParser } from './commandParser'; +import { argsParser } from './argsParser'; +import { contentParser } from './contentParser'; +import { assetsScanner } from './assetsScanner'; +import { subSceneScanner } from './subSceneScanner'; +import { ConfigMap } from '../config/scriptConfig'; + +/** + * 语句解析器 + * @param sentenceRaw 原始语句 + * @param assetSetter + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + */ +export const scriptParser = ( + sentenceRaw: string, + assetSetter: any, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): ISentence => { + let command: commandType; // 默认为对话 + let content: string; // 语句内容 + let subScene: Array; // 语句携带的子场景(可能没有) + const args: Array = []; // 语句参数列表 + let sentenceAssets: Array; // 语句携带的资源列表 + let parsedCommand: parsedCommand; // 解析后的命令 + let commandRaw: string; + + // 正式开始解析 + + // 去分号 + let newSentenceRaw = sentenceRaw.split(/(?} 子场景列表 + */ +import { commandType } from '../interface/sceneInterface'; + +export const subSceneScanner = ( + command: commandType, + content: string, +): Array => { + const subSceneList: Array = []; + if ( + command === commandType.changeScene || + command === commandType.callScene + ) { + subSceneList.push(content); + } + if (command === commandType.choose) { + const chooseList = content.split('|'); + const chooseValue = chooseList.map((e) => e.split(':')[1] ?? ''); + chooseValue.forEach((e) => { + if (e.match(/\./)) { + subSceneList.push(e); + } + }); + } + return subSceneList; +}; diff --git a/packages/parser/src/styleParser/index.ts b/packages/parser/src/styleParser/index.ts new file mode 100644 index 000000000..a97d0f621 --- /dev/null +++ b/packages/parser/src/styleParser/index.ts @@ -0,0 +1,39 @@ +export interface IWebGALStyleObj { + classNameStyles: Record; + others: string; +} + +export function scss2cssinjsParser(scssString: string): IWebGALStyleObj { + const [classNameStyles, others] = parseCSS(scssString); + return { + classNameStyles, + others, + }; +} + +/** + * GPT 4 写的,临时用,以后要重构!!! + * TODO:用人类智能重构,要是用着一直没问题,也不是不可以 trust AI + * @param css + */ +function parseCSS(css: string): [Record, string] { + const result: Record = {}; + let specialRules = ''; + let matches; + + // 使用非贪婪匹配,尝试正确处理任意层次的嵌套 + const classRegex = /\.([^{\s]+)\s*{((?:[^{}]*|{[^}]*})*)}/g; + const specialRegex = /(@[^{]+{\s*(?:[^{}]*{[^}]*}[^{}]*)+\s*})/g; + + while ((matches = classRegex.exec(css)) !== null) { + const key = matches[1]; + const value = matches[2].trim().replace(/\s*;\s*/g, ';\n'); + result[key] = value; + } + + while ((matches = specialRegex.exec(css)) !== null) { + specialRules += matches[1].trim() + '\n'; + } + + return [result, specialRules.trim()]; +} diff --git a/packages/parser/test/bgm.test.ts b/packages/parser/test/bgm.test.ts new file mode 100644 index 000000000..ccd4f8436 --- /dev/null +++ b/packages/parser/test/bgm.test.ts @@ -0,0 +1,56 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; +import { fileType } from "../src/interface/assets"; + +test("bgm-1", async () => { + expectContainEqual(`bgm:夏影.mp3;`, + [{ + command: commandType.bgm, + commandRaw: "bgm", + content: "夏影.mp3", + args: [], + sentenceAssets: [{ name: '夏影.mp3', url: '夏影.mp3', lineNumber: 0, type: fileType.bgm }], + subScene: [] + }] + ); +}); + +test("bgm-2", async () => { + expectContainEqual(`bgm:夏影.mp3 -volume=30;`, + [{ + command: commandType.bgm, + commandRaw: "bgm", + content: "夏影.mp3", + args: [{ key: "volume", value: 30 }], + sentenceAssets: [{ name: '夏影.mp3', url: '夏影.mp3', lineNumber: 0, type: fileType.bgm }], + subScene: [] + }] + ); +}); + +test("bgm-3", async () => { + expectContainEqual(`bgm:夏影.mp3 -enter=3000;`, + [{ + command: commandType.bgm, + commandRaw: "bgm", + content: "夏影.mp3", + args: [{ key: "enter", value: 3000 }], + sentenceAssets: [{ name: '夏影.mp3', url: '夏影.mp3', lineNumber: 0, type: fileType.bgm }], + subScene: [] + }] + ); +}); + +test("bgm-4", async () => { + expectContainEqual(`bgm:none -enter=3000;`, + [{ + command: commandType.bgm, + commandRaw: "bgm", + content: "", + args: [{ key: "enter", value: 3000 }], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/callScene.test.ts b/packages/parser/test/callScene.test.ts new file mode 100644 index 000000000..acf2bdc53 --- /dev/null +++ b/packages/parser/test/callScene.test.ts @@ -0,0 +1,16 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("callScene-1", async () => { + expectContainEqual(`callScene:Chapter-2.txt;`, + [{ + command: commandType.callScene, + commandRaw: "callScene", + content: "Chapter-2.txt", + args: [], + sentenceAssets: [], + subScene: ["Chapter-2.txt"] + }] + ); +}); diff --git a/packages/parser/test/changeBg.test.ts b/packages/parser/test/changeBg.test.ts new file mode 100644 index 000000000..cf906ae33 --- /dev/null +++ b/packages/parser/test/changeBg.test.ts @@ -0,0 +1,130 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; +import { fileType } from "../src/interface/assets"; + +test("changeBg-1", async () => { + expectContainEqual(`changeBg:1.jpg -left="https://example-url.com" -next; 引号字符串允许包含任何特殊字符`, + [{ + command: commandType.changeBg, + commandRaw: "changeBg", + content: "1.jpg", + args: [ + { key: "left", value: "https://example-url.com" }, + { key: "next", value: true } + ], + sentenceAssets: [{ name: '1.jpg', url: '1.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + }] + ); +}); + +test("changeBg-2", async () => { + expectContainEqual(`changeBg:2-1.jpg -left=" ; 不匹配的引号不会被解析为引号字符串`, + [{ + command: commandType.changeBg, + commandRaw: "changeBg", + content: "2-1.jpg", + args: [ + { key: "left", value: '"' } + ], + sentenceAssets: [{ name: '2-1.jpg', url: '2-1.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + }] + ); +}); + +test("changeBg-3", async () => { + expectContainEqual( +`changeBg:3_1.jpg -transform='{"hello": "world"}' ; JSON字符串`, + [{ + command: commandType.changeBg, + commandRaw: "changeBg", + content: "3_1.jpg", + args: [ + { key: "transform", value: '{"hello": "world"}' } + ], + sentenceAssets: [{ name: '3_1.jpg', url: '3_1.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + }] + ); +}); + +test("changeBg-4", async () => { + expectContainEqual(`changeBg:4-4-4.jpg -transform={"hello":"world"} ; 不加单引号也可以,但不能有空格`, + [{ + command: commandType.changeBg, + commandRaw: "changeBg", + content: "4-4-4.jpg", + args: [ + { key: "transform", value: '{"hello":"world"}' } + ], + sentenceAssets: [{ name: '4-4-4.jpg', url: '4-4-4.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + }] + ); +}); + +test("changeBg-5", async () => { + expectContainEqual(`changeBg:5.jpg -transform="{"hello": "world"}" ; 显然这个会解析失败`, [ + { + command: commandType.changeBg, + commandRaw: "changeBg", + content: "5.jpg", + args: [ + { key: "transform", value: '{' } + ], + sentenceAssets: [{ name: '5.jpg', url: '5.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + } + ], [{ + location: '29(1:30)..61(1:62)', + message: "parsing cannot preceed" + }]); +}); + +test("changeBg-6", async () => { + expectContainEqual(`changeBg:6.jpg -transform="{\\"hello\\": \\"world\\"}" ; 但引号字符串支持转义又比较好地弥补了这一点`, + [{ + command: commandType.changeBg, + commandRaw: "changeBg", + content: "6.jpg", + args: [ + { key: "transform", value: '{"hello": "world"}' } + ], + sentenceAssets: [{ name: '6.jpg', url: '6.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + }] + ); +}); + +test("changeBg-7", async () => { + expectContainEqual(`changeBg:7.jpg -next=true ; 不含引号的值直接解析`, + [{ + command: commandType.changeBg, + commandRaw: "changeBg", + content: "7.jpg", + args: [ + { key: "next", value: true } + ], + sentenceAssets: [{ name: '7.jpg', url: '7.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + }] + ); +}); + +test("changeBg-8", async () => { + expectContainEqual(`changeBg:8.jpg -next -left=none ; 测试多个参数`, + [{ + command: commandType.changeBg, + commandRaw: "changeBg", + content: "8.jpg", + args: [ + { key: "next", value: true }, + { key: "left", value: "" } + ], + sentenceAssets: [{ name: '8.jpg', url: '8.jpg', lineNumber: 0, type: fileType.background }], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/changeFigure.test.ts b/packages/parser/test/changeFigure.test.ts new file mode 100644 index 000000000..a87006440 --- /dev/null +++ b/packages/parser/test/changeFigure.test.ts @@ -0,0 +1,64 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; +import { fileType } from "../src/interface/assets"; + +test("changeFigure-1", async () => { + expectContainEqual(`changeFigure:testFigure02.png -next; 改变人物立绘`, + [{ + command: commandType.changeFigure, + commandRaw: "changeFigure", + content: "testFigure02.png", + args: [ + { key: "next", value: true }, + ], + sentenceAssets: [ + { + name: 'testFigure02.png', + url: 'testFigure02.png', + lineNumber: 0, + type: fileType.figure + } + ], + subScene: [] + }] + ); +}); + +test("changeFigure-2", async () => { + expectContainEqual(`changeFigure:testFigure03.png -left -id=test1; 一个初始位置在右侧的自由立绘`, + [{ + command: commandType.changeFigure, + commandRaw: "changeFigure", + content: "testFigure03.png", + args: [ + { key: "left", value: true }, + { key: "id", value: 'test1' }, + ], + sentenceAssets: [ + { + name: 'testFigure03.png', + url: 'testFigure03.png', + lineNumber: 0, + type: fileType.figure + } + ], + subScene: [] + }] + ); +}); + +test("changeFigure-2", async () => { + expectContainEqual(`changeFigure:none -id=test1; 通过 id 关闭立绘`, + [{ + command: commandType.changeFigure, + commandRaw: "changeFigure", + content: "", + args: [ + { key: "id", value: 'test1' }, + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/changeScene.test.ts b/packages/parser/test/changeScene.test.ts new file mode 100644 index 000000000..0776db952 --- /dev/null +++ b/packages/parser/test/changeScene.test.ts @@ -0,0 +1,16 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("changeScene-1", async () => { + expectContainEqual(`changeScene:Chapter-2.txt;`, + [{ + command: commandType.changeScene, + commandRaw: "changeScene", + content: "Chapter-2.txt", + args: [], + sentenceAssets: [], + subScene: ["Chapter-2.txt"] + }] + ); +}); diff --git a/packages/parser/test/choose.test.ts b/packages/parser/test/choose.test.ts new file mode 100644 index 000000000..1b8abb6ad --- /dev/null +++ b/packages/parser/test/choose.test.ts @@ -0,0 +1,106 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("choose-1", async () => { + expectContainEqual(`choose:叫住她:Chapter-2.txt|回家:Chapter-3.txt;`, + [{ + command: commandType.choose, + commandRaw: "choose", + content: "叫住她:Chapter-2.txt|回家:Chapter-3.txt", + args: [ + { + key: "choices", + value: [ + { + showExpression: "", + clickExpression: "", + text: "叫住她", + destination: "Chapter-2.txt" + }, + { + showExpression: "", + clickExpression: "", + text: "回家", + destination: "Chapter-3.txt" + } + ] + }, + { + key: "contentRawRange", + value: [7, 41], + } + ], + sentenceAssets: [], + subScene: ["Chapter-2.txt", "Chapter-3.txt"] + }]); +}); + +test("choose-2", async () => { + expectContainEqual(`choose:(showConditionVar>1)[enableConditionVar>2]->叫住她:Chapter-2.txt|回家:Chapter-3.txt;`, + [{ + command: commandType.choose, + commandRaw: "choose", + content: "(showConditionVar>1)[enableConditionVar>2]->叫住她:Chapter-2.txt|回家:Chapter-3.txt", + args: [ + { + key: "choices", + value: [ + { + showExpression: "showConditionVar>1", + clickExpression: "enableConditionVar>2", + text: "叫住她", + destination: "Chapter-2.txt" + }, + { + showExpression: "", + clickExpression: "", + text: "回家", + destination: "Chapter-3.txt" + } + ] + }, + { + key: "contentRawRange", + value: [7, 85], + } + ], + sentenceAssets: [], + subScene: ["Chapter-2.txt", "Chapter-3.txt"] + }] + ); +}); + +test("choose-3", async () => { + expectContainEqual(`choose:分支 1:label_1|分支 2:label_2;`, + [{ + command: commandType.choose, + commandRaw: "choose", + content: "分支 1:label_1|分支 2:label_2", + args: [ + { + key: "choices", + value: [ + { + showExpression: "", + clickExpression: "", + text: "分支 1", + destination: "label_1" + }, + { + showExpression: "", + clickExpression: "", + text: "分支 2", + destination: "label_2" + } + ] + }, + { + key: "contentRawRange", + value: [7, 32], + } + ], + sentenceAssets: [], + subScene: [] + }]); +}); diff --git a/packages/parser/test/comment.test.ts b/packages/parser/test/comment.test.ts new file mode 100644 index 000000000..c3bebfa51 --- /dev/null +++ b/packages/parser/test/comment.test.ts @@ -0,0 +1,17 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; +import { fileType } from "../src/interface/assets"; + +test("comment-1", async () => { + expectContainEqual(` +`, + [{ + command: commandType.comment, + commandRaw: "comment", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }]); +}); diff --git a/packages/parser/test/debug-linebreak.ts b/packages/parser/test/debug-linebreak.ts new file mode 100644 index 000000000..03e32dff7 --- /dev/null +++ b/packages/parser/test/debug-linebreak.ts @@ -0,0 +1,13 @@ +import {sceneTextPreProcess} from "../src/sceneTextPreProcessor"; +import * as fsp from "fs/promises"; + + +async function debug() { + const sceneRaw = await fsp.readFile('test/test-resources/line-break.txt'); + const sceneText = sceneRaw.toString(); + const result = sceneTextPreProcess(sceneText) + console.log(result) + console.log(result.split('\n').length) +} + +debug(); diff --git a/packages/parser/test/end.test.ts b/packages/parser/test/end.test.ts new file mode 100644 index 000000000..7e5dcf8a8 --- /dev/null +++ b/packages/parser/test/end.test.ts @@ -0,0 +1,16 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual } from './util'; + +test("end-1", async () => { + expectContainEqual(`end;`, + [{ + command: commandType.end, + commandRaw: "end", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/errorHandling.test.ts b/packages/parser/test/errorHandling.test.ts new file mode 100644 index 000000000..c535c1d45 --- /dev/null +++ b/packages/parser/test/errorHandling.test.ts @@ -0,0 +1,74 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("err-1", async () => { + expectContainEqual(`end:shouldNotAddContentHere -(); +end;`, + [ + { + command: commandType.end, + commandRaw: "end", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.end, + commandRaw: "end", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + } + ], + [ + { + location: '3(1:4)..32(1:33)', + message: "non-completed parsing" + } + ] + ); +}); + +test("err-2", async () => { + expectContainEqual(`one command:is not affected -next +end:shouldNotAddContentHere -() +another command:is not affected as well`, [ + { + command: commandType.say, + commandRaw: "one command", + content: "is not affected", + args: [ + { key: "speaker", value: "one command" }, + { key: "next", value: true } + ], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.end, + commandRaw: "end", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.say, + commandRaw: "another command", + content: "is not affected as well", + args: [ + { key: "speaker", value: "another command" }, + ], + sentenceAssets: [], + subScene: [] + } + ], [ + { + location: '37(2:4)..65(2:32)', + message: "non-completed parsing" + } + ]); +}); \ No newline at end of file diff --git a/packages/parser/test/filmMode.test.ts b/packages/parser/test/filmMode.test.ts new file mode 100644 index 000000000..e28266b81 --- /dev/null +++ b/packages/parser/test/filmMode.test.ts @@ -0,0 +1,42 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("filmMode-1", async () => { + expectContainEqual(`filmMode:Film Mode Test;`, + [{ + command: commandType.filmMode, + commandRaw: "filmMode", + content: "Film Mode Test", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("filmMode-2", async () => { + expectContainEqual(`filmMode:none;`, + [{ + command: commandType.filmMode, + commandRaw: "filmMode", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("filmMode-3", async () => { + expectContainEqual(`filmMode:;`, + [{ + command: commandType.filmMode, + commandRaw: "filmMode", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/getUserInput.test.ts b/packages/parser/test/getUserInput.test.ts new file mode 100644 index 000000000..dc808f016 --- /dev/null +++ b/packages/parser/test/getUserInput.test.ts @@ -0,0 +1,19 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual } from './util'; + +test("getUserInput-1", async () => { + expectContainEqual(`getUserInput:name -title=如何称呼你 -buttonText=确认; 将用户输入写入 name 变量中`, + [{ + command: commandType.getUserInput, + commandRaw: "getUserInput", + content: "name", + args: [ + { key: "title", value: "如何称呼你" }, + { key: "buttonText", value: "确认" } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/integration.disablefornow.ts b/packages/parser/test/integration.disablefornow.ts new file mode 100644 index 000000000..f0ea3183b --- /dev/null +++ b/packages/parser/test/integration.disablefornow.ts @@ -0,0 +1,197 @@ +import { SceneParser } from "../src/index"; +import { ADD_NEXT_ARG_LIST, SCRIPT_CONFIG } from "../src/config/scriptConfig"; +import { expect, test } from "vitest"; +import { commandType, ISentence } from "../src/interface/sceneInterface"; +import * as fsp from 'fs/promises'; +import { fileType } from "../src/interface/assets"; + + +test("label", async () => { + const sceneRaw = await fsp.readFile('test/test-resources/start.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "start", "/start.txt"); + const expectSentenceItem: ISentence = { + command: commandType.label, + commandRaw: "label", + content: "end", + args: [ + { key: "next", value: true } + ], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("args", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/start.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "start", "/start.txt"); + const expectSentenceItem: ISentence = { + command: commandType.changeFigure, + commandRaw: "changeFigure", + content: "m2.png", + args: [ + { key: "left", value: true }, + { key: "next", value: true } + ], + sentenceAssets: [{ name: "m2.png", url: 'm2.png', type: fileType.figure, lineNumber: 0 }], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("choose", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/choose.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "choose", "/choose.txt"); + console.error(result.errors); + const expectSentenceItem: ISentence = { + command: commandType.choose, + commandRaw: "choose", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("long-script", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/long-script.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + console.log('line count:', sceneText.split('\n').length); + console.time('parse-time-consumed'); + const result = parser.parse(sceneText, "start", "/start.txt"); + console.timeEnd('parse-time-consumed'); + const expectSentenceItem: ISentence = { + command: commandType.label, + commandRaw: "label", + content: "end", + args: [ + { key: "next", value: true } + ], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("var", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/var.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "var", "/var.txt"); + const expectSentenceItem: ISentence = { + command: commandType.say, + commandRaw: "WebGAL", + content: "a=1?", + args: [{ key: 'speaker', value: 'WebGAL' }, { key: 'when', value: "a==1" }], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("config", async () => { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const configFesult = parser.parseConfig(` +Game_name:欢迎使用WebGAL!; +Game_key:0f86dstRf; +Title_img:WebGAL_New_Enter_Image.png; +Title_bgm:s_Title.mp3; +Title_logos: 1.png | 2.png | Image Logo.png| -show -active=false -add=op! -count=3;This is a fake config, do not reference anything. + `); + expect(configFesult).toContainEqual({ + command: 'Title_logos', + args: ['1.png', '2.png', 'Image Logo.png'], + options: [ + { key: 'show', value: true }, + { key: 'active', value: false }, + { key: 'add', value: 'op!' }, + { key: 'count', value: 3 }, + ] + }); +}); + +test("config-stringify", async () => { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const configFesult = parser.parseConfig(` +Game_name:欢迎使用WebGAL!; +Game_key:0f86dstRf; +Title_img:WebGAL_New_Enter_Image.png; +Title_bgm:s_Title.mp3; +Title_logos: 1.png | 2.png | Image Logo.png| -show -active=false -add=op! -count=3;This is a fake config, do not reference anything. + `); + const stringifyResult = parser.stringifyConfig(configFesult); + const configResult2 = parser.parseConfig(stringifyResult); + expect(configResult2).toContainEqual({ + command: 'Title_logos', + args: ['1.png', '2.png', 'Image Logo.png'], + options: [ + { key: 'show', value: true }, + { key: 'active', value: false }, + { key: 'add', value: 'op!' }, + { key: 'count', value: 3 }, + ] + }); +}); + + +test("say statement", async () => { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(`say:123 -speaker=xx;`, 'test', 'test'); + expect(result.sentenceList).toContainEqual({ + command: commandType.say, + commandRaw: "say", + content: "123", + args: [{ key: 'speaker', value: 'xx' }], + sentenceAssets: [], + subScene: [] + }); +}); diff --git a/packages/parser/test/intro.test.ts b/packages/parser/test/intro.test.ts new file mode 100644 index 000000000..363ddf692 --- /dev/null +++ b/packages/parser/test/intro.test.ts @@ -0,0 +1,42 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("intro-1", async () => { + expectContainEqual(`intro:回忆不需要适合的剧本,|反正一说出口,|都成了戏言。;`, + [{ + command: commandType.intro, + commandRaw: "intro", + content: "回忆不需要适合的剧本,|反正一说出口,|都成了戏言。", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("intro-2", async () => { + expectContainEqual(`intro:回忆不需要适合的剧本,|反正一说出口,|都成了戏言。 -hold;`, + [{ + command: commandType.intro, + commandRaw: "intro", + content: "回忆不需要适合的剧本,|反正一说出口,|都成了戏言。", + args: [{ key: "hold", value: true }], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("intro-3", async () => { + expectContainEqual(`intro:你好|欢迎来到 WebGAL 的世界;`, + [{ + command: commandType.intro, + commandRaw: "intro", + content: "你好|欢迎来到 WebGAL 的世界", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/jumpLabel.test.ts b/packages/parser/test/jumpLabel.test.ts new file mode 100644 index 000000000..b447694a0 --- /dev/null +++ b/packages/parser/test/jumpLabel.test.ts @@ -0,0 +1,16 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("jumpLabel-1", async () => { + expectContainEqual(`jumpLabel:label_1; // 跳转到 label_1`, + [{ + command: commandType.jumpLabel, + commandRaw: "jumpLabel", + content: "label_1", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/label.test.ts b/packages/parser/test/label.test.ts new file mode 100644 index 000000000..93e106461 --- /dev/null +++ b/packages/parser/test/label.test.ts @@ -0,0 +1,16 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("label-1", async () => { + expectContainEqual(`label:label_1; // 创建名为 label_1 的 label`, + [{ + command: commandType.label, + commandRaw: "label", + content: "label_1", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/miniAvatar.test.ts b/packages/parser/test/miniAvatar.test.ts new file mode 100644 index 000000000..acae3b53b --- /dev/null +++ b/packages/parser/test/miniAvatar.test.ts @@ -0,0 +1,50 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; +import { fileType } from "../src/interface/assets"; + +test("miniAvatar-1", async () => { + expectContainEqual(`miniAvatar:minipic_test.png; 在左下角显示minipic_test.png`, + [{ + command: commandType.miniAvatar, + commandRaw: "miniAvatar", + content: "minipic_test.png", + args: [], + sentenceAssets: [ + { + name: 'minipic_test.png', + url: 'minipic_test.png', + lineNumber: 0, + type: fileType.figure + } + ], + subScene: [] + }] + ); +}); + +test("miniAvatar-2", async () => { + expectContainEqual(`miniAvatar:none; 关闭这个小头像`, + [{ + command: commandType.miniAvatar, + commandRaw: "miniAvatar", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("miniAvatar-3", async () => { + expectContainEqual(`miniAvatar:; 关闭这个小头像`, + [{ + command: commandType.miniAvatar, + commandRaw: "miniAvatar", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/parserMultiline.test.ts b/packages/parser/test/parserMultiline.test.ts new file mode 100644 index 000000000..42815bcd2 --- /dev/null +++ b/packages/parser/test/parserMultiline.test.ts @@ -0,0 +1,148 @@ +import { sceneTextPreProcess } from "../src/sceneTextPreProcessor"; +import { expect, test } from "vitest"; + +test("parser-multiline-basic", async () => { + const testScene = `changeFigure:a.png -left + -next + -id=id1 + +saySomething`; + const expected = `changeFigure:a.png -left -next -id=id1 +;_WEBGAL_LINE_BREAK_ -next +;_WEBGAL_LINE_BREAK_ -id=id1 + +saySomething`; + + const preprocessedScene = sceneTextPreProcess(testScene); + expect(preprocessedScene).toEqual(expected); +}); + + +test("parser-multiline-disable-when-encounter-concat-1", async () => { + const testScene = `intro:aaa + |bbb -concat +`; + const expected = `intro:aaa + |bbb -concat +`; + + const preprocessedScene = sceneTextPreProcess(testScene); + expect(preprocessedScene).toEqual(expected); +}); + + +test("parser-multiline-disable-when-encounter-concat-2", async () => { + const testScene = `intro:aaa + |bbb + |ccc -concat +`; + const expected = `intro:aaa|bbb +;_WEBGAL_LINE_BREAK_ |bbb + |ccc -concat +`; + + const preprocessedScene = sceneTextPreProcess(testScene); + expect(preprocessedScene).toEqual(expected); +}); + +test("parser-multiline-user-force-allow-multiline-in-concat", async () => { + const testScene = String.raw`intro:aaa\ +|bbb\ +|ccc -concat +`; + const expected = `intro:aaa|bbb|ccc -concat +;_WEBGAL_LINE_BREAK_|bbb +;_WEBGAL_LINE_BREAK_|ccc -concat +`; + + const preprocessedScene = sceneTextPreProcess(testScene); + expect(preprocessedScene).toEqual(expected); +}); + +test("parser-multiline-others-same-as-before", async () => { + const testScene = `听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +`; + + const preprocessedScene = sceneTextPreProcess(testScene); + expect(preprocessedScene).toEqual(testScene); +}); + +test("parser-multiline-full", async () => { + const testScene = `changeFigure:a.png -left + -next + -id=id1 + +intro:aaa + |bbb|ccc + |ddd + -next; + +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好 +|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left + -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 + -v1.wav; +changeFigure:stand2.png + -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back + -target=fig-left + -next; + +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 + -v5.wav; +`; + + const expected = `changeFigure:a.png -left -next -id=id1 +;_WEBGAL_LINE_BREAK_ -next +;_WEBGAL_LINE_BREAK_ -id=id1 + +intro:aaa|bbb|ccc|ddd -next; +;_WEBGAL_LINE_BREAK_ |bbb|ccc +;_WEBGAL_LINE_BREAK_ |ddd +;_WEBGAL_LINE_BREAK_ -next; + +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好 +|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +;_WEBGAL_LINE_BREAK_ -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +;_WEBGAL_LINE_BREAK_ -v1.wav; +changeFigure:stand2.png -right -next; +;_WEBGAL_LINE_BREAK_ -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +;_WEBGAL_LINE_BREAK_ -target=fig-left +;_WEBGAL_LINE_BREAK_ -next; + +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +;_WEBGAL_LINE_BREAK_ -v5.wav; +`; + + const preprocessedScene = sceneTextPreProcess(testScene); + expect(preprocessedScene).toEqual(expected); +}); diff --git a/packages/parser/test/pixi.test.ts b/packages/parser/test/pixi.test.ts new file mode 100644 index 000000000..ea02299d4 --- /dev/null +++ b/packages/parser/test/pixi.test.ts @@ -0,0 +1,29 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("pixi-1", async () => { + expectContainEqual(`pixiInit;`, + [{ + command: commandType.pixiInit, + commandRaw: "pixiInit", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("pixi-2", async () => { + expectContainEqual(`pixiPerform:rain; // 添加一个下雨的特效`, + [{ + command: commandType.pixi, + commandRaw: "pixiPerform", + content: "rain", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/playEffect.test.ts b/packages/parser/test/playEffect.test.ts new file mode 100644 index 000000000..458077020 --- /dev/null +++ b/packages/parser/test/playEffect.test.ts @@ -0,0 +1,51 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("playEffect-1", async () => { + expectContainEqual(`playEffect:xxx.mp3;`, + [{ + command: commandType.playEffect, + commandRaw: "playEffect", + content: "xxx.mp3", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("playEffect-2", async () => { + expectContainEqual(`playEffect:xxx.mp3 -volume=30;`, + [{ + command: commandType.playEffect, + commandRaw: "playEffect", + content: "xxx.mp3", + args: [{ key: "volume", value: 30 }], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("playEffect-3", async () => { + expectContainEqual(`playEffect:xxx.mp3 -id=xxx; +playEffect:none -id=xxx; // 停止这个循环的效果音`, [ + { + command: commandType.playEffect, + commandRaw: "playEffect", + content: "xxx.mp3", + args: [{ key: "id", value: "xxx" }], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.playEffect, + commandRaw: "playEffect", + content: "", + args: [{ key: "id", value: "xxx" }], + sentenceAssets: [], + subScene: [] + } + ]); +}); diff --git a/packages/parser/test/playVideo.test.ts b/packages/parser/test/playVideo.test.ts new file mode 100644 index 000000000..f6a100dfa --- /dev/null +++ b/packages/parser/test/playVideo.test.ts @@ -0,0 +1,17 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; +import { fileType } from "../src/interface/assets"; + +test("playVideo-1", async () => { + expectContainEqual(`playVideo:OP.mp4;`, + [{ + command: commandType.video, + commandRaw: "playVideo", + content: "OP.mp4", + args: [], + sentenceAssets: [{ name: 'OP.mp4', url: 'OP.mp4', lineNumber: 0, type: fileType.video }], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/say.test.ts b/packages/parser/test/say.test.ts new file mode 100644 index 000000000..797d18522 --- /dev/null +++ b/packages/parser/test/say.test.ts @@ -0,0 +1,112 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; +import { fileType } from "../src/interface/assets"; + +test("say-1", async () => { + expectContainEqual(`雪之下雪乃:你到得真早;`, + [{ + command: commandType.say, + commandRaw: "雪之下雪乃", + content: "你到得真早", + args: [ + { key: "speaker", value: "雪之下雪乃" }, + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("say-2", async () => { + expectContainEqual(`对不起,等很久了吗?;`, + [{ + command: commandType.say, + commandRaw: "say", + content: "对不起,等很久了吗?", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("say-3", async () => { + expectContainEqual(`:这是一句旁白;`, + [{ + command: commandType.say, + commandRaw: "", + content: "这是一句旁白", + args: [ + { key: "speaker", value: "" }, + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("say-4", async () => { + expectContainEqual(`WebGAL:a=1? -when=a==1;`, + [{ + command: commandType.say, + commandRaw: "WebGAL", + content: "a=1?", + args: [ + { key: "speaker", value: "WebGAL" }, + { key: "when", value: "a==1" }, + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("say-5", async () => { + expectContainEqual(`WebGAL: 你 打 字 带 空 格 -when=a==1;`, + [{ + command: commandType.say, + commandRaw: "WebGAL", + content: "你 打 字 带 空 格", + args: [ + { key: "speaker", value: "WebGAL" }, + { key: "when", value: "a==1" }, + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("say-6", async () => { + expectContainEqual(`WebGAL: 你 打 字 带 空 格 -when=a==1;`, + [{ + command: commandType.say, + commandRaw: "WebGAL", + content: "你 打 字 带 空 格", + args: [ + { key: "speaker", value: "WebGAL" }, + { key: "when", value: "a==1" }, + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("say-7", async () => { + expectContainEqual(`比企谷八幡:刚到而已 -V3.ogg -volume=30;`, + [{ + command: commandType.say, + commandRaw: "比企谷八幡", + content: "刚到而已", + args: [ + { key: "speaker", value: "比企谷八幡" }, + { key: "vocal", value: "V3.ogg" }, + { key: "volume", value: 30 }, + ], + sentenceAssets: [{ name: 'V3.ogg', url: 'V3.ogg', lineNumber: 0, type: fileType.vocal }], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/setAnimation.test.ts b/packages/parser/test/setAnimation.test.ts new file mode 100644 index 000000000..29b95f504 --- /dev/null +++ b/packages/parser/test/setAnimation.test.ts @@ -0,0 +1,29 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("setAnimation-1", async () => { + expectContainEqual(`; // 为中间立绘设置一个从下方进入的动画,并转到下一句 +setAnimation:enter-from-bottom -target=fig-center -next;`, + [ + { + command: commandType.comment, + commandRaw: "comment", + content: " // 为中间立绘设置一个从下方进入的动画,并转到下一句", + args: [], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.setAnimation, + commandRaw: "setAnimation", + content: "enter-from-bottom", + args: [ + { key: "target", value: "fig-center" }, + { key: "next", value: true }, + ], + sentenceAssets: [], + subScene: [] + } + ]); +}); diff --git a/packages/parser/test/setTempAnimation.test.ts b/packages/parser/test/setTempAnimation.test.ts new file mode 100644 index 000000000..900da8600 --- /dev/null +++ b/packages/parser/test/setTempAnimation.test.ts @@ -0,0 +1,19 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("setTempAnimation-1", async () => { + expectContainEqual(`setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0}, {"position": {"x": 400,"y": 0},"duration": 250}, {"position": {"x": 600,"y": 0},"duration": 500}, {"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next;`, + [{ + command: commandType.setTempAnimation, + commandRaw: "setTempAnimation", + content: `[{"position": {"x": 500,"y": 0},"duration": 0}, {"position": {"x": 400,"y": 0},"duration": 250}, {"position": {"x": 600,"y": 0},"duration": 500}, {"position": {"x": 500,"y": 0},"duration": 250}]`, + args: [ + { key: "target", value: "fig-left" }, + { key: "next", value: true } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); \ No newline at end of file diff --git a/packages/parser/test/setTextbox.test.ts b/packages/parser/test/setTextbox.test.ts new file mode 100644 index 000000000..2932d52bd --- /dev/null +++ b/packages/parser/test/setTextbox.test.ts @@ -0,0 +1,29 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("setTextbox-1", async () => { + expectContainEqual(`setTextbox:hide; // 关闭文本框`, + [{ + command: commandType.setTextbox, + commandRaw: "setTextbox", + content: "hide", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setTextbox-2", async () => { + expectContainEqual(`setTextbox:on; // 可以是除 hide 以外的任意值。`, + [{ + command: commandType.setTextbox, + commandRaw: "setTextbox", + content: "on", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/setTransform.test.ts b/packages/parser/test/setTransform.test.ts new file mode 100644 index 000000000..b8aabfa59 --- /dev/null +++ b/packages/parser/test/setTransform.test.ts @@ -0,0 +1,19 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("setTransform-1", async () => { + expectContainEqual(`setTransform:{"position":{"x":100,"y":0}} -target=fig-center -duration=0;`, + [{ + command: commandType.setTransform, + commandRaw: "setTransform", + content: '{"position":{"x":100,"y":0}}', + args: [ + { key: "target", value: "fig-center" }, + { key: "duration", value: 0 } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/setTransition.test.ts b/packages/parser/test/setTransition.test.ts new file mode 100644 index 000000000..dd23ac33d --- /dev/null +++ b/packages/parser/test/setTransition.test.ts @@ -0,0 +1,20 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("setTransition-1", async () => { + expectContainEqual(`setTransition: -target=fig-center -enter=enter-from-bottom -exit=exit;`, + [{ + command: commandType.setTransition, + commandRaw: "setTransition", + content: "", + args: [ + { key: "target", value: "fig-center" }, + { key: "enter", value: "enter-from-bottom" }, + { key: "exit", value: "exit" }, + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/setVar.test.ts b/packages/parser/test/setVar.test.ts new file mode 100644 index 000000000..73ae7ed40 --- /dev/null +++ b/packages/parser/test/setVar.test.ts @@ -0,0 +1,161 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("setVar-1", async () => { + expectContainEqual(`setVar:a=1; // 可以设置数字`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: 1 } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setVar-2", async () => { + expectContainEqual(`setVar:a=true; // 可以设置布尔值`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: true } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setVar-3", async () => { + expectContainEqual(`setVar:a=人物名称; // 可以设置字符串`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: "人物名称" } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setVar-4", async () => { + expectContainEqual(`setVar:a=random();`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: "random()" } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setVar-5", async () => { + expectContainEqual(`setVar:a=5+a*5;`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: "5+a*5" } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setVar-6", async () => { + expectContainEqual(`setVar:a=5+a*5;`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: "5+a*5" } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setVar-7", async () => { + expectContainEqual(`setVar:a=1; +setVar:b=a+1;`, [ + { + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: 1 } + ], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "b" }, + { key: "#expression", value: "a+1" } + ], + sentenceAssets: [], + subScene: [] + }, + ]); +}); + +test("setVar-8", async () => { + expectContainEqual(`setVar:a=1 -global;`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#expression", value: 1 }, + { key: "global", value: true } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); + +test("setVar-9", async () => { + expectContainEqual(`setVar:a=($stage.bgm.volume) -global;`, + [{ + command: commandType.setVar, + commandRaw: "setVar", + content: "", + args: [ + { key: "#variableName", value: "a" }, + { key: "#internalExpression", value: "$stage.bgm.volume" }, + { key: "global", value: true } + ], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/showVars.test.ts b/packages/parser/test/showVars.test.ts new file mode 100644 index 000000000..d7d05fa16 --- /dev/null +++ b/packages/parser/test/showVars.test.ts @@ -0,0 +1,16 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual } from './util'; + +test("showVars-1", async () => { + expectContainEqual(`showVars;`, + [{ + command: commandType.showVars, + commandRaw: "showVars", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }] + ); +}); diff --git a/packages/parser/test/test-resources/choose.txt b/packages/parser/test/test-resources/choose.txt new file mode 100644 index 000000000..adcacf08f --- /dev/null +++ b/packages/parser/test/test-resources/choose.txt @@ -0,0 +1,5 @@ +choose:; +choose:|; +choose:fff:; +choose::ff; +choose:|:ff; diff --git a/packages/parser/test/test-resources/line-break.txt b/packages/parser/test/test-resources/line-break.txt new file mode 100644 index 000000000..750e21cae --- /dev/null +++ b/packages/parser/test/test-resources/line-break.txt @@ -0,0 +1,38 @@ +changeFigure:a.png -left + -next + + + -id=id1 + +intro:aaa + |bbb|ccc + |ddd + -next; + +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好 +|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left + -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 + -v1.wav; +changeFigure:stand2.png + -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back + -target=fig-left + + + -next; + +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 + -v5.wav; diff --git a/packages/parser/test/test-resources/long-script.txt b/packages/parser/test/test-resources/long-script.txt new file mode 100644 index 000000000..548a33a72 --- /dev/null +++ b/packages/parser/test/test-resources/long-script.txt @@ -0,0 +1,3672 @@ +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; diff --git a/packages/parser/test/test-resources/start.txt b/packages/parser/test/test-resources/start.txt new file mode 100644 index 000000000..a1240cea9 --- /dev/null +++ b/packages/parser/test/test-resources/start.txt @@ -0,0 +1,105 @@ +; 初始场景,以及特效演示 +changeBg:c4.jpg -next; +unlockCg:c4.jpg -name=街前; 解锁部分CG +unlockCg:xgmain.jpeg -name=星光咖啡馆与死神之蝶; +unlockBgm:s_Title.mp3 -name=Smiling-Swinging!!; +WebGAL:特效系统是3.9.2版本新引入的系统,你想要看特效的演示吗?; +choose:观看特效演示:demo|我不要看特效,直接来吧!:toStart; +label:demo; +pixiInit; +pixiPerform:rain; +WebGAL:现在展示的是下雨的特效。; +pixiInit; +pixiPerform:snow; +WebGAL:现在展示的是下雪的特效。; +setTextbox:hide; +pixiInit; +setTextbox:on -next; +WebGAL:特效的演示已经结束,现在我们正式开始吧!; + +; 正式场景 +label:toStart; +playVideo:OP.mp4; +changeBg:c3.jpg -next; +unlockCg:c3.jpg -name=cafe; +changeFigure:m2.png -left -next; +bgm:cb1.mp3; +unlockBgm:cb1.mp3 -name=ひとすじの光明; +setAnimation:enter-from-left -target=fig-left -next; +米咖多:蛋包饭是栞那做的,但红茶是夏目泡的。 -v1.ogg; +昂晴:......; +顺便问一下,你是打算做什么的?; +changeFigure:m1.png -left -next; +米咖多:就是倒饮料。然后咖啡和红茶的冲泡方式我还是记住了的。 -v2.ogg; +昂晴:这、这样么......; +:这猫爪子真的能泡茶么。; +拿得了水壶吗?就凭他那个肉球爪子......; +难道这些也是凭借猫妖的奇特力量做到的吗?; +changeFigure:none -left -next; +changeFigure:k1.png -next; +setAnimation:enter-from-bottom -target=fig-center -next; +栞那:那么,你想先尝哪个? -v3.ogg; +choose:品尝蛋包饭:dbf|品尝红茶:hc; + +; 栞那选项 +label:dbf; +昂晴:总之,先确认下蛋包饭的味道吧; +changeFigure:k2.png -next; +栞那:明白了,交给我吧 -v4.ogg; +changeFigure:none -next; +changeFigure:m2.png -left -next; +changeFigure:k3.png -right -next; +setAnimation:enter-from-left -target=fig-left -next; +setAnimation:enter-from-right -target=fig-right -next; +栞那:那么米咖多先生,我去做一下试作品 -v5.ogg; +米咖多:嗯。去吧 -v6.ogg; +changeFigure:none -left -next; +changeFigure:none -right -next; +changeFigure:k4.png -next; +setAnimation:enter-from-bottom -target=fig-center -next; +栞那:那么高岭同学,我们移动到厨房吧 -v7.ogg; +changeFigure:none -next; +bgm:cb2.mp3; +unlockBgm:cb2.mp3 -name=Tea Break; +changeBg:c2.jpg; +unlockCg:c2.jpg -name=厨房; +changeFigure:k2.png -next; +栞那:话不多说开始做吧 -v8.ogg; +jumpLabel:end; + +; 夏目选项 +label:hc; +changeFigure:none -next; +changeFigure:m1.png -left -next; +changeFigure:k1.png -right -next; +setAnimation:enter-from-left -target=fig-left -next; +setAnimation:enter-from-right -target=fig-right -next; +米咖多:那么就是,夏目了吧 -v9.ogg; +changeFigure:k6.png -right -next; +栞那:她刚去休息,要不要我叫回来呢? -v10.ogg; +昂晴:没事,我自己去吧; +changeFigure:none -left -next; +changeFigure:none -right -next; +bgm:cb2.mp3; +changeBg:c1.jpg -next; +unlockCg:c1.jpg -name=休息室; +:我先敲了敲门; +miniAvatar:n1.png; +夏目:哪位? -v11.ogg; +昂晴:我是高岭,可以进去吗?; +夏目:可以,没问题 -v12.ogg; +昂晴:打搅了; +miniAvatar:none; +changeFigure:n4.png -next; +昂晴:打搅你休息了; +夏目:不用在意,怎么了? -v13.ogg; +changeFigure:n2.png -next; +:她并没有无精打采,比想象中精神多了; +昂晴:问道拿手菜谱,就听说四季同学泡的红茶味道不错,我也想品尝一下; +夏目:明白了,那我们回去吧 -v14.ogg; +jumpLabel:end; + +; 结束场景 +label:end; +changeFigure:none -next; +WebGAL:基础演出的展示已经结束。; diff --git a/packages/parser/test/test-resources/var.txt b/packages/parser/test/test-resources/var.txt new file mode 100644 index 000000000..33c2f0a00 --- /dev/null +++ b/packages/parser/test/test-resources/var.txt @@ -0,0 +1,2 @@ +setVar:a=1; +WebGAL:a=1? -when=a==1; diff --git a/packages/parser/test/unlockBgm.test.ts b/packages/parser/test/unlockBgm.test.ts new file mode 100644 index 000000000..99848b33b --- /dev/null +++ b/packages/parser/test/unlockBgm.test.ts @@ -0,0 +1,28 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("unlockBgm-1", async () => { + expectContainEqual(`; // 解锁bgm并赋予名称 +unlockBgm:s_Title.mp3 -name=Smiling-Swinging!!!;`, + [ + { + command: commandType.comment, + commandRaw: "comment", + content: " // 解锁bgm并赋予名称", + args: [], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.unlockBgm, + commandRaw: "unlockBgm", + content: "s_Title.mp3", + args: [ + { key: "name", value: "Smiling-Swinging!!!" }, + ], + sentenceAssets: [], + subScene: [] + } + ]); +}); diff --git a/packages/parser/test/unlockCg.test.ts b/packages/parser/test/unlockCg.test.ts new file mode 100644 index 000000000..902f770a0 --- /dev/null +++ b/packages/parser/test/unlockCg.test.ts @@ -0,0 +1,29 @@ +import { test } from "vitest"; +import { commandType } from "../src/interface/sceneInterface"; +import { expectContainEqual, expectThrow } from './util'; + +test("unlockCg-1", async () => { + expectContainEqual(`; // 解锁CG并赋予名称 +unlockCg:xgmain.jpeg -name=星光咖啡馆与死神之蝶 -series=1;`, + [ + { + command: commandType.comment, + commandRaw: "comment", + content: " // 解锁CG并赋予名称", + args: [], + sentenceAssets: [], + subScene: [] + }, + { + command: commandType.unlockCg, + commandRaw: "unlockCg", + content: "xgmain.jpeg", + args: [ + { key: "name", value: "星光咖啡馆与死神之蝶" }, + { key: "series", value: 1 } + ], + sentenceAssets: [], + subScene: [] + } + ]); +}); diff --git a/packages/parser/test/util.ts b/packages/parser/test/util.ts new file mode 100644 index 000000000..5e6900217 --- /dev/null +++ b/packages/parser/test/util.ts @@ -0,0 +1,39 @@ + +import SceneParser, { parserSyntaxError } from "../src/index"; +import { ADD_NEXT_ARG_LIST, SCRIPT_CONFIG } from "../src/config/scriptConfig"; +import { expect } from "vitest"; +import { IError, ISentence } from "../src/interface/sceneInterface"; +import { chai } from 'vitest'; + +chai.config.truncateThreshold = 100000; + +export function expectContainEqual(rawScene: string, expectedSentenceItem: Array, errors: Array = []) { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(rawScene, "start", "/start.txt"); + + expect(result.sentenceList).toEqual(expectedSentenceItem); + // if (Array.isArray(expectedSentenceItem)) { + // expectedSentenceItem.forEach((s) => expect(result.sentenceList).toContainEqual(s)); + // } else { + // expect(result.sentenceList).toEqual(expectedSentenceItem); + // } + + if (errors) { + for (const error of errors) { + expect(result.errors).toContainEqual(error); + } + } +} + +export function expectThrow(rawScene: string) { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + expect(() => parser.parse(rawScene, "start", "/start.txt")).toThrow(parserSyntaxError); +} \ No newline at end of file diff --git a/packages/parser/tsconfig.json b/packages/parser/tsconfig.json new file mode 100644 index 000000000..5fb839743 --- /dev/null +++ b/packages/parser/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "declaration": true, + "declarationDir": "build/types", + "target": "ESNext", + "useDefineForClassFields": true, + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": false, + "skipLibCheck": false, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "noImplicitAny": false, + "moduleResolution": "Node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "paths": { + "@/*": ["./src/*"] + } + }, + "include": [ + "src" + ], + "references": [{ "path": "./tsconfig.node.json"}] +} diff --git a/packages/parser/tsconfig.node.json b/packages/parser/tsconfig.node.json new file mode 100644 index 000000000..fde6cf327 --- /dev/null +++ b/packages/parser/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "module": "esnext", + "moduleResolution": "node" + }, + "include": [ + "vite.config.ts" + ] +} diff --git a/packages/parser_legacy/.babelrc b/packages/parser_legacy/.babelrc new file mode 100644 index 000000000..cc4476abb --- /dev/null +++ b/packages/parser_legacy/.babelrc @@ -0,0 +1,14 @@ +{ + "presets": [ + [ + "@babel/preset-env", + { + "useBuiltIns": "entry", + "corejs": "3.6.4", + "modules": false + }, + "@babel/preset-typescript" + ] + ], + "exclude": "node_modules/**" +} diff --git a/packages/parser_legacy/.gitignore b/packages/parser_legacy/.gitignore new file mode 100644 index 000000000..549164b2f --- /dev/null +++ b/packages/parser_legacy/.gitignore @@ -0,0 +1,4 @@ +coverage +node_modules +.idea +.vscode diff --git a/packages/parser_legacy/.npmignore b/packages/parser_legacy/.npmignore new file mode 100644 index 000000000..7bcd9b489 --- /dev/null +++ b/packages/parser_legacy/.npmignore @@ -0,0 +1,6 @@ +coverage +test +.babelrc +rollup.config.js +tsconfig.json +tsconfig.node.json diff --git a/packages/parser_legacy/.prettierrc b/packages/parser_legacy/.prettierrc new file mode 100644 index 000000000..33f6d8eaf --- /dev/null +++ b/packages/parser_legacy/.prettierrc @@ -0,0 +1,19 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": true, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "trailingComma": "all", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "always", + "requirePragma": false, + "insertPragma": false, + "proseWrap": "preserve", + "htmlWhitespaceSensitivity": "css", + "endOfLine": "lf", + "embeddedLanguageFormatting": "auto" +} diff --git a/packages/parser_legacy/package.json b/packages/parser_legacy/package.json new file mode 100644 index 000000000..28c1d49d1 --- /dev/null +++ b/packages/parser_legacy/package.json @@ -0,0 +1,42 @@ +{ + "name": "webgal-parser-legacy", + "version": "4.5.2", + "description": "WebGAL script parser", + "scripts": { + "test": "vitest", + "coverage": "vitest run --coverage", + "build": "rimraf -rf ./build && rollup --config", + "build-ci": "rollup --config", + "debug": "tsx test/debug.ts", + "debug-scss-parser": "tsx test/debugCssParser.ts" + }, + "types": "./build/types/index.d.ts", + "module": "./build/es/index.js", + "main": "./build/cjs/index.cjs", + "author": "Mahiru ", + "license": "MPL-2.0", + "dependencies": { + "chevrotain": "^10.5.0", + "cloudlogjs": "^1.0.11", + "lodash": "^4.17.21", + "tsx": "^3.12.7" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^23.0.2", + "@rollup/plugin-json": "^5.0.1", + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-typescript": "^9.0.2", + "@types/lodash": "^4.14.189", + "@types/node": "^18.14.0", + "@vitest/coverage-c8": "^0.28.5", + "rollup": "^3.3.0", + "rollup-plugin-babel": "^4.4.0", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-typescript2": "^0.34.1", + "ts-node": "^10.9.1", + "tslib": "^2.4.1", + "typescript": "^4.9.3", + "vitest": "^0.28.5" + }, + "type": "module" +} diff --git a/packages/parser_legacy/rollup.config.js b/packages/parser_legacy/rollup.config.js new file mode 100644 index 000000000..787b18bc7 --- /dev/null +++ b/packages/parser_legacy/rollup.config.js @@ -0,0 +1,69 @@ +import typescript from "rollup-plugin-typescript2"; +import resolve from "@rollup/plugin-node-resolve"; +import commonjs from "@rollup/plugin-commonjs"; + +const mode = process.env.MODE ?? 'prod'; +const isProd = mode === "prod"; + +export default [ + { + input: `./src/index.ts`, + output: + { + file: "./build/es/index.js", + format: "es", + sourcemap: !isProd + }, + plugins: [ + resolve(), commonjs(), typescript({ + useTsconfigDeclarationDir: true, + tsconfigOverride: { + compilerOptions: { + sourceMap: !isProd, + declarationDir: "build/es" + }, include: ["src"] + } + })] + }, { + input: `./src/index.ts`, + output: [ + { + file: "./build/cjs/index.cjs", + exports: "named", + format: "cjs", + sourcemap: !isProd + }, + ], + plugins: [ + resolve(), commonjs(), typescript({ + useTsconfigDeclarationDir: true, + tsconfigOverride: { + compilerOptions: { + sourceMap: !isProd, + declarationDir: "build/cjs" + }, include: ["src"] + } + })], + }, + { + input: `./src/index.ts`, + output: [ + { + file: "./build/umd/index.global.js", + name: 'webgalParser', + format: 'iife', + sourcemap: !isProd + }, + ], + plugins: [ + resolve(), commonjs(), typescript({ + useTsconfigDeclarationDir: true, + tsconfigOverride: { + compilerOptions: { + sourceMap: !isProd, + declarationDir: "build/types" + }, include: ["src"] + } + })], + } +]; diff --git a/packages/parser_legacy/src/config/scriptConfig.ts b/packages/parser_legacy/src/config/scriptConfig.ts new file mode 100644 index 000000000..c8463fd7b --- /dev/null +++ b/packages/parser_legacy/src/config/scriptConfig.ts @@ -0,0 +1,50 @@ +import {commandType} from '../interface/sceneInterface'; + +export const SCRIPT_CONFIG = [ + { scriptString: 'intro', scriptType: commandType.intro }, + { scriptString: 'changeBg', scriptType: commandType.changeBg }, + { scriptString: 'changeFigure', scriptType: commandType.changeFigure }, + { scriptString: 'miniAvatar', scriptType: commandType.miniAvatar }, + { scriptString: 'changeScene', scriptType: commandType.changeScene }, + { scriptString: 'choose', scriptType: commandType.choose }, + { scriptString: 'end', scriptType: commandType.end }, + { scriptString: 'bgm', scriptType: commandType.bgm }, + { scriptString: 'playVideo', scriptType: commandType.video }, + { + scriptString: 'setComplexAnimation', + scriptType: commandType.setComplexAnimation, + }, + { scriptString: 'setFilter', scriptType: commandType.setFilter }, + { scriptString: 'pixiInit', scriptType: commandType.pixiInit }, + { scriptString: 'pixiPerform', scriptType: commandType.pixi }, + { scriptString: 'label', scriptType: commandType.label }, + { scriptString: 'jumpLabel', scriptType: commandType.jumpLabel }, + { scriptString: 'setVar', scriptType: commandType.setVar }, + { scriptString: 'callScene', scriptType: commandType.callScene }, + { scriptString: 'showVars', scriptType: commandType.showVars }, + { scriptString: 'unlockCg', scriptType: commandType.unlockCg }, + { scriptString: 'unlockBgm', scriptType: commandType.unlockBgm }, + { scriptString: 'say', scriptType: commandType.say }, + { scriptString: 'filmMode', scriptType: commandType.filmMode }, + { scriptString: 'callScene', scriptType: commandType.callScene }, + { scriptString: 'setTextbox', scriptType: commandType.setTextbox }, + { scriptString: 'setAnimation', scriptType: commandType.setAnimation }, + { scriptString: 'playEffect', scriptType: commandType.playEffect }, + { scriptString: 'applyStyle', scriptType: commandType.applyStyle }, +]; +export const ADD_NEXT_ARG_LIST = [ + commandType.bgm, + commandType.pixi, + commandType.pixiInit, + commandType.label, + commandType.if, + commandType.miniAvatar, + commandType.setVar, + commandType.unlockBgm, + commandType.unlockCg, + commandType.filmMode, + commandType.playEffect, +]; + +export type ConfigMap = Map; +export type ConfigItem = { scriptString: string; scriptType: commandType }; diff --git a/packages/parser_legacy/src/configParser/configParser.ts b/packages/parser_legacy/src/configParser/configParser.ts new file mode 100644 index 000000000..cca9e66ec --- /dev/null +++ b/packages/parser_legacy/src/configParser/configParser.ts @@ -0,0 +1,72 @@ +import { argsParser } from '../scriptParser/argsParser'; + +interface IOptionItem { + key: string; + value: string | number | boolean; +} +interface IConfigItem { + command: string; + args: string[]; + options: IOptionItem[]; +} + +export type WebgalConfig = IConfigItem[]; + +function configLineParser(inputLine: string): IConfigItem { + const options: Array = []; + let command: string; + + let newSentenceRaw = inputLine.split(';')[0]; + if (newSentenceRaw === '') { + // 注释提前返回 + return { + command: '', + args: [], + options: [], + }; + } + // 截取命令 + const getCommandResult = /\s*:\s*/.exec(newSentenceRaw); + + // 没有command + if (getCommandResult === null) { + command = ''; + } else { + command = newSentenceRaw.substring(0, getCommandResult.index); + // 划分命令区域和content区域 + newSentenceRaw = newSentenceRaw.substring( + getCommandResult.index + 1, + newSentenceRaw.length, + ); + } + // 截取 Options 区域 + const getOptionsResult = / -/.exec(newSentenceRaw); + // 获取到参数 + if (getOptionsResult) { + const optionsRaw = newSentenceRaw.substring( + getOptionsResult.index, + newSentenceRaw.length, + ); + newSentenceRaw = newSentenceRaw.substring(0, getOptionsResult.index); + for (const e of argsParser(optionsRaw, (name, _) => { + return name; + })) { + options.push(e); + } + } + return { + command, + args: newSentenceRaw + .split('|') + .map((e) => e.trim()) + .filter((e) => e !== ''), + options, + }; +} + +export function configParser(configText: string): WebgalConfig { + const configLines = configText.replaceAll(`\r`, '').split('\n'); + return configLines + .map((e) => configLineParser(e)) + .filter((e) => e.command !== ''); +} diff --git a/packages/parser_legacy/src/index.ts b/packages/parser_legacy/src/index.ts new file mode 100644 index 000000000..9bcdd4197 --- /dev/null +++ b/packages/parser_legacy/src/index.ts @@ -0,0 +1,78 @@ +import { + ADD_NEXT_ARG_LIST, + SCRIPT_CONFIG, + ConfigMap, + ConfigItem, +} from './config/scriptConfig'; +import { configParser, WebgalConfig } from './configParser/configParser'; +import { fileType } from './interface/assets'; +import { IAsset } from './interface/sceneInterface'; +import { sceneParser } from './sceneParser'; +import {IWebGALStyleObj, scss2cssinjsParser} from "./styleParser"; + +export default class SceneParser { + private readonly SCRIPT_CONFIG_MAP: ConfigMap; + constructor( + private readonly assetsPrefetcher: (assetList: IAsset[]) => void, + private readonly assetSetter: ( + fileName: string, + assetType: fileType, + ) => string, + private readonly ADD_NEXT_ARG_LIST: number[], + SCRIPT_CONFIG_INPUT: ConfigItem[] | ConfigMap, + ) { + if (Array.isArray(SCRIPT_CONFIG_INPUT)) { + this.SCRIPT_CONFIG_MAP = new Map(); + SCRIPT_CONFIG_INPUT.forEach((config) => { + this.SCRIPT_CONFIG_MAP.set(config.scriptString, config); + }); + } else { + this.SCRIPT_CONFIG_MAP = SCRIPT_CONFIG_INPUT; + } + } + /** + * 解析场景 + * @param rawScene 原始场景 + * @param sceneName 场景名称 + * @param sceneUrl 场景url + * @return 解析后的场景 + */ + parse(rawScene: string, sceneName: string, sceneUrl: string) { + return sceneParser( + rawScene, + sceneName, + sceneUrl, + this.assetsPrefetcher, + this.assetSetter, + this.ADD_NEXT_ARG_LIST, + this.SCRIPT_CONFIG_MAP, + ); + } + + parseConfig(configText: string) { + return configParser(configText); + } + + stringifyConfig(config: WebgalConfig) { + return config.reduce( + (previousValue, curr) => + previousValue + + `${curr.command}:${curr.args.join('|')}${ + curr.options.length <= 0 + ? '' + : curr.options.reduce( + (p, c) => p + ' -' + c.key + '=' + c.value, + '', + ) + };\n`, + '', + ); + } + + parseScssToWebgalStyleObj(scssString: string): IWebGALStyleObj{ + return scss2cssinjsParser(scssString); + } + +} + +export { ADD_NEXT_ARG_LIST, SCRIPT_CONFIG }; diff --git a/packages/parser_legacy/src/interface/assets.ts b/packages/parser_legacy/src/interface/assets.ts new file mode 100644 index 000000000..0fb0e2cfa --- /dev/null +++ b/packages/parser_legacy/src/interface/assets.ts @@ -0,0 +1,12 @@ +/** + * 内置资源类型的枚举 + */ +export enum fileType { + background, + bgm, + figure, + scene, + tex, + vocal, + video, +} diff --git a/packages/parser_legacy/src/interface/runtimeInterface.ts b/packages/parser_legacy/src/interface/runtimeInterface.ts new file mode 100644 index 000000000..d10f30fbd --- /dev/null +++ b/packages/parser_legacy/src/interface/runtimeInterface.ts @@ -0,0 +1,9 @@ +/** + * 子场景结束后回到父场景的入口 + * @interface sceneEntry + */ +export interface sceneEntry { + sceneName: string; // 场景名称 + sceneUrl: string; // 场景url + continueLine: number; // 继续原场景的行号 +} diff --git a/packages/parser_legacy/src/interface/sceneInterface.ts b/packages/parser_legacy/src/interface/sceneInterface.ts new file mode 100644 index 000000000..e5419af3b --- /dev/null +++ b/packages/parser_legacy/src/interface/sceneInterface.ts @@ -0,0 +1,105 @@ +/** + * 语句类型 + */ +import { sceneEntry } from './runtimeInterface'; +import { fileType } from './assets'; + +export enum commandType { + say, // 对话 + changeBg, // 更改背景 + changeFigure, // 更改立绘 + bgm, // 更改背景音乐 + video, // 播放视频 + pixi, // pixi演出 + pixiInit, // pixi初始化 + intro, // 黑屏文字演示 + miniAvatar, // 小头像 + changeScene, // 切换场景 + choose, // 分支选择 + end, // 结束游戏 + setComplexAnimation, // 动画演出 + setFilter, // 设置效果 + label, // 标签 + jumpLabel, // 跳转标签 + chooseLabel, // 选择标签 + setVar, // 设置变量 + if, // 条件跳转 + callScene, // 调用场景 + showVars, + unlockCg, + unlockBgm, + filmMode, + setTextbox, + setAnimation, + playEffect, + setTempAnimation, + comment, + setTransform, + setTransition, + getUserInput, + applyStyle +} + +/** + * 单个参数接口 + * @interface arg + */ +export interface arg { + key: string; // 参数键 + value: string | boolean | number; // 参数值 +} + +/** + * 资源接口 + * @interface IAsset + */ +export interface IAsset { + name: string; // 资源名称 + type: fileType; // 资源类型 + url: string; // 资源url + lineNumber: number; // 触发资源语句的行号 +} + +/** + * 单条语句接口 + * @interface ISentence + */ +export interface ISentence { + command: commandType; // 语句类型 + commandRaw: string; // 命令的原始内容,方便调试 + content: string; // 语句内容 + args: Array; // 参数列表 + sentenceAssets: Array; // 语句携带的资源列表 + subScene: Array; // 语句包含子场景列表 +} + +/** + * 场景接口 + * @interface IScene + */ +export interface IScene { + sceneName: string; // 场景名称 + sceneUrl: string; // 场景url + sentenceList: Array; // 语句列表 + assetsList: Array; // 资源列表 + subSceneList: Array; // 子场景的url列表 +} + +/** + * 当前的场景数据 + * @interface ISceneData + */ +export interface ISceneData { + currentSentenceId: number; // 当前语句ID + sceneStack: Array; // 场景栈 + currentScene: IScene; // 当前场景数据 +} + +/** + * 处理后的命令接口 + * @interface parsedCommand + */ +export interface parsedCommand { + type: commandType; + additionalArgs: Array; +} diff --git a/packages/parser_legacy/src/parser4/index.ts b/packages/parser_legacy/src/parser4/index.ts new file mode 100644 index 000000000..3456958b9 --- /dev/null +++ b/packages/parser_legacy/src/parser4/index.ts @@ -0,0 +1,158 @@ +// (function jsonGrammarOnlyExample() { +// // ----------------- Lexer ----------------- +// const createToken = chevrotain.createToken; +// const Lexer = chevrotain.Lexer; +// +// const True = createToken({ name: "True", pattern: /true/ }); +// const False = createToken({ name: "False", pattern: /false/ }); +// const LCurly = createToken({ name: "LCurly", pattern: /{/ }); +// const RCurly = createToken({ name: "RCurly", pattern: /}/ }); +// const LSquare = createToken({ name: "LSquare", pattern: /\[/ }); +// const RSquare = createToken({ name: "RSquare", pattern: /]/ }); +// const Comma = createToken({ name: "Comma", pattern: /,/ }); +// const Colon = createToken({ name: "Colon", pattern: /:/ }); +// const Lf = createToken({ name: "LF", pattern: /\n/ }); +// const Semi = createToken({ name: ";", pattern: /;/ }); +// const Command = createToken({ name: "Command", pattern: /Command/ }); +// const ArgS = createToken({ name: " -", pattern: / -/ }); +// const StringLiteral = createToken({ +// name: "StringLiteral", pattern: /(?!(?:true|false|Command)\b)\w+/ +// }); +// const NumberLiteral = createToken({ +// name: "NumberLiteral", pattern: /-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/ +// }); +// +// const Equal = createToken({ +// name: "=", +// pattern: /=/ +// }); +// +// const webgalTokens = [NumberLiteral, StringLiteral, RCurly, LCurly, +// LSquare, RSquare, Comma, Colon, True, False, Equal, Command, ArgS, Lf, Semi]; +// +// const WebGalLexer = new Lexer(webgalTokens, { +// // Less position info tracked, reduces verbosity of the playground output. +// positionTracking: "onlyStart" +// }); +// +// // Labels only affect error messages and Diagrams. +// LCurly.LABEL = "'{'"; +// RCurly.LABEL = "'}'"; +// LSquare.LABEL = "'['"; +// RSquare.LABEL = "']'"; +// Comma.LABEL = "','"; +// Colon.LABEL = "':'"; +// +// +// // ----------------- parser ----------------- +// const CstParser = chevrotain.CstParser; +// +// class webgalScriptParser extends CstParser { +// constructor() { +// super(webgalTokens, { +// recoveryEnabled: true +// }); +// +// const $ = this; +// +// $.RULE("scene", () => { +// $.MANY_SEP({ +// SEP: Lf, DEF: () => { +// $.SUBRULE($.sentence); +// } +// }); +// }); +// +// $.RULE("sentence", () => { +// $.OR([ +// { ALT: () => $.SUBRULE($.commonSentence) }, +// { ALT: () => $.SUBRULE($.comment) } +// ]); +// }); +// +// $.RULE("commonSentence", () => { +// $.OR([ +// { ALT: () => $.SUBRULE($.commandSentence) }, +// { ALT: () => $.SUBRULE($.dialog) } +// ]); +// $.OPTION(() => { +// $.CONSUME(Semi); +// }); +// }); +// +// $.RULE("comment", () => { +// $.CONSUME(Semi); +// $.CONSUME(StringLiteral); +// }); +// +// $.RULE("dialog", () => { +// $.CONSUME(StringLiteral); +// +// }); +// +// +// $.RULE("commandSentence", () => { +// $.CONSUME(Command); +// $.CONSUME(Colon); +// $.CONSUME(StringLiteral); +// $.OPTION(() => { +// $.SUBRULE($.args); +// }); +// }); +// +// $.RULE("args", () => { +// $.CONSUME(ArgS); +// $.MANY_SEP({ +// SEP: ArgS, DEF: () => { +// $.SUBRULE($.arg); +// } +// }); +// }); +// +// $.RULE("arg", () => { +// $.CONSUME(StringLiteral); +// $.CONSUME(Equal); +// $.SUBRULE($.argv); +// }); +// +// $.RULE("argv", () => { +// $.OR([ +// { +// ALT: () => { +// this.CONSUME(StringLiteral); +// } +// }, +// { +// ALT: () => { +// this.CONSUME(NumberLiteral); +// } +// }, +// { +// ALT: () => { +// this.CONSUME(True); +// } +// }, +// { +// ALT: () => { +// this.CONSUME(False); +// } +// }]); +// }); +// +// // very important to call this after all the rules have been setup. +// // otherwise the parser may not work correctly as it will lack information +// // derived from the self analysis. +// this.performSelfAnalysis(); +// } +// +// } +// +// +// // for the playground to work the returned object must contain these fields +// return { +// lexer: WebGalLexer, +// parser: webgalScriptParser, +// defaultRule: "scene" +// }; +// }()); +export const parser4 = 'unreleased'; diff --git a/packages/parser_legacy/src/sceneParser.ts b/packages/parser_legacy/src/sceneParser.ts new file mode 100644 index 000000000..9d2a72b83 --- /dev/null +++ b/packages/parser_legacy/src/sceneParser.ts @@ -0,0 +1,66 @@ +import { + commandType, + IAsset, + IScene, + ISentence, +} from './interface/sceneInterface'; +import { scriptParser } from './scriptParser/scriptParser'; +import uniqWith from 'lodash/uniqWith'; +import { fileType } from './interface/assets'; +import { ConfigMap } from './config/scriptConfig'; + +/** + * 场景解析器 + * @param rawScene 原始场景 + * @param sceneName 场景名称 + * @param sceneUrl 场景url + * @param assetsPrefetcher + * @param assetSetter + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + * @return {IScene} 解析后的场景 + */ +export const sceneParser = ( + rawScene: string, + sceneName: string, + sceneUrl: string, + assetsPrefetcher: (assetList: Array) => void, + assetSetter: (fileName: string, assetType: fileType) => string, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): IScene => { + const rawSentenceList = rawScene.split('\n'); // 原始句子列表 + + // 去分号留到后面去做了,现在注释要单独处理 + const rawSentenceListWithoutEmpty = rawSentenceList; + // .map((sentence) => sentence.split(";")[0]) + // .filter((sentence) => sentence.trim() !== ""); + let assetsList: Array = []; // 场景资源列表 + let subSceneList: Array = []; // 子场景列表 + const sentenceList: Array = rawSentenceListWithoutEmpty.map( + (sentence) => { + const returnSentence: ISentence = scriptParser( + sentence, + assetSetter, + ADD_NEXT_ARG_LIST, + SCRIPT_CONFIG_MAP, + ); + // 在这里解析出语句可能携带的资源和场景,合并到 assetsList 和 subSceneList + assetsList = [...assetsList, ...returnSentence.sentenceAssets]; + subSceneList = [...subSceneList, ...returnSentence.subScene]; + return returnSentence; + }, + ); + + // 开始资源的预加载 + assetsList = uniqWith(assetsList); // 去重 + assetsPrefetcher(assetsList); + + return { + sceneName: sceneName, // 场景名称 + sceneUrl: sceneUrl, + sentenceList: sentenceList, // 语句列表 + assetsList: assetsList, // 资源列表 + subSceneList: subSceneList, // 子场景列表 + }; +}; diff --git a/packages/parser_legacy/src/scriptParser/argsParser.ts b/packages/parser_legacy/src/scriptParser/argsParser.ts new file mode 100644 index 000000000..9cff77451 --- /dev/null +++ b/packages/parser_legacy/src/scriptParser/argsParser.ts @@ -0,0 +1,71 @@ +import { arg } from '../interface/sceneInterface'; +import { fileType } from '../interface/assets'; + +/** + * 参数解析器 + * @param argsRaw 原始参数字符串 + * @param assetSetter + * @return {Array} 解析后的参数列表 + */ +export function argsParser( + argsRaw: string, + assetSetter: (fileName: string, assetType: fileType) => string, +): Array { + const returnArrayList: Array = []; + // 处理参数 + // 不要去空格 + let newArgsRaw = argsRaw.replace(/ /g, ' '); + // 分割参数列表 + let rawArgsList: Array = newArgsRaw.split(' -'); + // 去除空字符串 + rawArgsList = rawArgsList.filter((e) => { + return e !== ''; + }); + rawArgsList.forEach((e) => { + const equalSignIndex = e.indexOf('='); + let argName = e.slice(0, equalSignIndex); + let argValue: string | undefined = e.slice(equalSignIndex + 1); + if (equalSignIndex < 0) { + argName = e; + argValue = undefined; + } + // 判断是不是语音参数 + if (argName.toLowerCase().match(/.ogg|.mp3|.wav/)) { + returnArrayList.push({ + key: 'vocal', + value: assetSetter(e, fileType.vocal), + }); + } else { + // 判断是不是省略参数 + if (argValue === undefined) { + returnArrayList.push({ + key: argName, + value: true, + }); + } else { + // 是字符串描述的布尔值 + if (argValue === 'true' || argValue === 'false') { + returnArrayList.push({ + key: argName, + value: argValue === 'true', + }); + } else { + // 是数字 + if (!isNaN(Number(argValue))) { + returnArrayList.push({ + key: argName, + value: Number(argValue), + }); + } else { + // 是普通参数 + returnArrayList.push({ + key: argName, + value: argValue, + }); + } + } + } + } + }); + return returnArrayList; +} diff --git a/packages/parser_legacy/src/scriptParser/assetsScanner.ts b/packages/parser_legacy/src/scriptParser/assetsScanner.ts new file mode 100644 index 000000000..cdff61be5 --- /dev/null +++ b/packages/parser_legacy/src/scriptParser/assetsScanner.ts @@ -0,0 +1,76 @@ +import { arg, commandType, IAsset } from '../interface/sceneInterface'; +import { fileType } from '../interface/assets'; + +/** + * 根据语句类型、语句内容、参数列表,扫描该语句可能携带的资源 + * @param command 语句类型 + * @param content 语句内容 + * @param args 参数列表 + * @return {Array} 语句携带的参数列表 + */ +export const assetsScanner = ( + command: commandType, + content: string, + args: Array, +): Array => { + let hasVocalArg = false; + const returnAssetsList: Array = []; + if (command === commandType.say) { + args.forEach((e) => { + if (e.key === 'vocal') { + hasVocalArg = true; + returnAssetsList.push({ + name: e.value as string, + url: e.value as string, + lineNumber: 0, + type: fileType.vocal, + }); + } + }); + } + if (content === 'none' || content === '') { + return returnAssetsList; + } + // 处理语句携带的资源 + if (command === commandType.changeBg) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.background, + }); + } + if (command === commandType.changeFigure) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.figure, + }); + } + if (command === commandType.miniAvatar) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.figure, + }); + } + if (command === commandType.video) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.video, + }); + } + if (command === commandType.bgm) { + returnAssetsList.push({ + name: content, + url: content, + lineNumber: 0, + type: fileType.bgm, + }); + } + return returnAssetsList; +}; diff --git a/packages/parser_legacy/src/scriptParser/commandParser.ts b/packages/parser_legacy/src/scriptParser/commandParser.ts new file mode 100644 index 000000000..b08655881 --- /dev/null +++ b/packages/parser_legacy/src/scriptParser/commandParser.ts @@ -0,0 +1,65 @@ +import { ConfigMap } from '../config/scriptConfig'; +import { commandType, parsedCommand } from '../interface/sceneInterface'; + +/** + * 处理命令 + * @param commandRaw + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + * @return {parsedCommand} 处理后的命令 + */ +export const commandParser = ( + commandRaw: string, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): parsedCommand => { + let returnCommand: parsedCommand = { + type: commandType.say, // 默认是say + additionalArgs: [], + }; + // 开始处理命令内容 + const type: commandType = getCommandType( + commandRaw, + ADD_NEXT_ARG_LIST, + SCRIPT_CONFIG_MAP, + ); + returnCommand.type = type; + // 如果是对话,加上额外的参数 + if (type === commandType.say && commandRaw !== 'say') { + returnCommand.additionalArgs.push({ + key: 'speaker', + value: commandRaw, + }); + } + returnCommand = addNextArg(returnCommand, type, ADD_NEXT_ARG_LIST); + return returnCommand; +}; + +/** + * 根据command原始值判断是什么命令 + * @param command command原始值 + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + * @return {commandType} 得到的command类型 + */ +function getCommandType( + command: string, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): commandType { + return SCRIPT_CONFIG_MAP.get(command)?.scriptType ?? commandType.say; +} + +function addNextArg( + commandToParse: parsedCommand, + thisCommandType: commandType, + ADD_NEXT_ARG_LIST: commandType[], +) { + if (ADD_NEXT_ARG_LIST.includes(thisCommandType)) { + commandToParse.additionalArgs.push({ + key: 'next', + value: true, + }); + } + return commandToParse; +} diff --git a/packages/parser_legacy/src/scriptParser/contentParser.ts b/packages/parser_legacy/src/scriptParser/contentParser.ts new file mode 100644 index 000000000..cbb6fd161 --- /dev/null +++ b/packages/parser_legacy/src/scriptParser/contentParser.ts @@ -0,0 +1,70 @@ +import { commandType } from '../interface/sceneInterface'; +import { fileType } from '../interface/assets'; + +/** + * 解析语句内容的函数,主要作用是把文件名改为绝对地址或相对地址(根据使用情况而定) + * @param contentRaw 原始语句内容 + * @param type 语句类型 + * @param assetSetter + * @return {string} 解析后的语句内容 + */ +export const contentParser = ( + contentRaw: string, + type: commandType, + assetSetter: any, +) => { + if (contentRaw === 'none' || contentRaw === '') { + return ''; + } + switch (type) { + case commandType.playEffect: + return assetSetter(contentRaw, fileType.vocal); + case commandType.changeBg: + return assetSetter(contentRaw, fileType.background); + case commandType.changeFigure: + return assetSetter(contentRaw, fileType.figure); + case commandType.bgm: + return assetSetter(contentRaw, fileType.bgm); + case commandType.callScene: + return assetSetter(contentRaw, fileType.scene); + case commandType.changeScene: + return assetSetter(contentRaw, fileType.scene); + case commandType.miniAvatar: + return assetSetter(contentRaw, fileType.figure); + case commandType.video: + return assetSetter(contentRaw, fileType.video); + case commandType.choose: + return getChooseContent(contentRaw, assetSetter); + case commandType.unlockBgm: + return assetSetter(contentRaw, fileType.bgm); + case commandType.unlockCg: + return assetSetter(contentRaw, fileType.background); + default: + return contentRaw; + } +}; + +function getChooseContent(contentRaw: string, assetSetter: any): string { + const chooseList = contentRaw.split(/(? = []; + const chooseValueList: Array = []; + for (const e of chooseList) { + chooseKeyList.push(e.split(/(? { + if (e.match(/\./)) { + return assetSetter(e, fileType.scene); + } else { + return e; + } + }); + let ret = ''; + for (let i = 0; i < chooseKeyList.length; i++) { + if (i !== 0) { + ret = ret + '|'; + } + ret = ret + `${chooseKeyList[i]}:${parsedChooseList[i]}`; + } + return ret; +} diff --git a/packages/parser_legacy/src/scriptParser/scriptParser.ts b/packages/parser_legacy/src/scriptParser/scriptParser.ts new file mode 100644 index 000000000..10bbfe197 --- /dev/null +++ b/packages/parser_legacy/src/scriptParser/scriptParser.ts @@ -0,0 +1,114 @@ +import { + arg, + commandType, + IAsset, + ISentence, + parsedCommand, +} from '../interface/sceneInterface'; +import { commandParser } from './commandParser'; +import { argsParser } from './argsParser'; +import { contentParser } from './contentParser'; +import { assetsScanner } from './assetsScanner'; +import { subSceneScanner } from './subSceneScanner'; +import { ConfigMap } from '../config/scriptConfig'; + +/** + * 语句解析器 + * @param sentenceRaw 原始语句 + * @param assetSetter + * @param ADD_NEXT_ARG_LIST + * @param SCRIPT_CONFIG_MAP + */ +export const scriptParser = ( + sentenceRaw: string, + assetSetter: any, + ADD_NEXT_ARG_LIST: commandType[], + SCRIPT_CONFIG_MAP: ConfigMap, +): ISentence => { + let command: commandType; // 默认为对话 + let content: string; // 语句内容 + let subScene: Array; // 语句携带的子场景(可能没有) + const args: Array = []; // 语句参数列表 + let sentenceAssets: Array; // 语句携带的资源列表 + let parsedCommand: parsedCommand; // 解析后的命令 + let commandRaw: string; + + // 正式开始解析 + + // 去分号 + let newSentenceRaw = sentenceRaw.split(/(?} 子场景列表 + */ +import { commandType } from '../interface/sceneInterface'; + +export const subSceneScanner = ( + command: commandType, + content: string, +): Array => { + const subSceneList: Array = []; + if ( + command === commandType.changeScene || + command === commandType.callScene + ) { + subSceneList.push(content); + } + if (command === commandType.choose) { + const chooseList = content.split('|'); + const chooseValue = chooseList.map((e) => e.split(':')[1] ?? ''); + chooseValue.forEach((e) => { + if (e.match(/\./)) { + subSceneList.push(e); + } + }); + } + return subSceneList; +}; diff --git a/packages/parser_legacy/src/styleParser/index.ts b/packages/parser_legacy/src/styleParser/index.ts new file mode 100644 index 000000000..a97d0f621 --- /dev/null +++ b/packages/parser_legacy/src/styleParser/index.ts @@ -0,0 +1,39 @@ +export interface IWebGALStyleObj { + classNameStyles: Record; + others: string; +} + +export function scss2cssinjsParser(scssString: string): IWebGALStyleObj { + const [classNameStyles, others] = parseCSS(scssString); + return { + classNameStyles, + others, + }; +} + +/** + * GPT 4 写的,临时用,以后要重构!!! + * TODO:用人类智能重构,要是用着一直没问题,也不是不可以 trust AI + * @param css + */ +function parseCSS(css: string): [Record, string] { + const result: Record = {}; + let specialRules = ''; + let matches; + + // 使用非贪婪匹配,尝试正确处理任意层次的嵌套 + const classRegex = /\.([^{\s]+)\s*{((?:[^{}]*|{[^}]*})*)}/g; + const specialRegex = /(@[^{]+{\s*(?:[^{}]*{[^}]*}[^{}]*)+\s*})/g; + + while ((matches = classRegex.exec(css)) !== null) { + const key = matches[1]; + const value = matches[2].trim().replace(/\s*;\s*/g, ';\n'); + result[key] = value; + } + + while ((matches = specialRegex.exec(css)) !== null) { + specialRules += matches[1].trim() + '\n'; + } + + return [result, specialRules.trim()]; +} diff --git a/packages/parser_legacy/test/debug.ts b/packages/parser_legacy/test/debug.ts new file mode 100644 index 000000000..cf58e6467 --- /dev/null +++ b/packages/parser_legacy/test/debug.ts @@ -0,0 +1,27 @@ +import * as fsp from "fs/promises"; +import SceneParser, {ADD_NEXT_ARG_LIST, SCRIPT_CONFIG} from "../src"; + + +async function debug() { + const sceneRaw = await fsp.readFile('test/test-resources/var.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "var", "/var.txt"); + console.log(result) + const configFesult = parser.parseConfig(` +Game_name:欢迎使用WebGAL!; +Game_key:0f86dstRf; +Title_img:WebGAL_New_Enter_Image.png; +Title_bgm:s_Title.mp3; +Title_logos: 1.png | 2.png | Image Logo.png| -show -active=false -add=op! -count=3;This is a fake config, do not reference anything. + `) + console.log(configFesult) + console.log(parser.stringifyConfig(configFesult)) +} + +debug(); diff --git a/packages/parser_legacy/test/debugCssParser.ts b/packages/parser_legacy/test/debugCssParser.ts new file mode 100644 index 000000000..039aac4b6 --- /dev/null +++ b/packages/parser_legacy/test/debugCssParser.ts @@ -0,0 +1,18 @@ +import * as fsp from "fs/promises"; +import SceneParser, {ADD_NEXT_ARG_LIST, SCRIPT_CONFIG} from "../src"; + + +async function debug() { + const sceneRaw = await fsp.readFile('test/test-resources/debug.scss'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const configFesult = parser.parseScssToWebgalStyleObj(sceneText) + console.log(configFesult) +} + +debug(); diff --git a/packages/parser_legacy/test/parser.test.ts b/packages/parser_legacy/test/parser.test.ts new file mode 100644 index 000000000..05161f6b4 --- /dev/null +++ b/packages/parser_legacy/test/parser.test.ts @@ -0,0 +1,196 @@ +import SceneParser from "../src/index"; +import { ADD_NEXT_ARG_LIST, SCRIPT_CONFIG } from "../src/config/scriptConfig"; +import { expect, test } from "vitest"; +import { commandType, ISentence } from "../src/interface/sceneInterface"; +import * as fsp from 'fs/promises'; +import { fileType } from "../src/interface/assets"; + +test("label", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/start.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "start", "/start.txt"); + const expectSentenceItem: ISentence = { + command: commandType.label, + commandRaw: "label", + content: "end", + args: [ + { key: "next", value: true } + ], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("args", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/start.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "start", "/start.txt"); + const expectSentenceItem: ISentence = { + command: commandType.changeFigure, + commandRaw: "changeFigure", + content: "m2.png", + args: [ + { key: "left", value: true }, + { key: "next", value: true } + ], + sentenceAssets: [{ name: "m2.png", url: 'm2.png', type: fileType.figure, lineNumber: 0 }], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("choose", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/choose.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "choose", "/choose.txt"); + const expectSentenceItem: ISentence = { + command: commandType.choose, + commandRaw: "choose", + content: "", + args: [], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("long-script", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/long-script.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + console.log('line count:', sceneText.split('\n').length); + console.time('parse-time-consumed'); + const result = parser.parse(sceneText, "start", "/start.txt"); + console.timeEnd('parse-time-consumed'); + const expectSentenceItem: ISentence = { + command: commandType.label, + commandRaw: "label", + content: "end", + args: [ + { key: "next", value: true } + ], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("var", async () => { + + const sceneRaw = await fsp.readFile('test/test-resources/var.txt'); + const sceneText = sceneRaw.toString(); + + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(sceneText, "var", "/var.txt"); + const expectSentenceItem: ISentence = { + command: commandType.say, + commandRaw: "WebGAL", + content: "a=1?", + args: [{ key: 'speaker', value: 'WebGAL' }, { key: 'when', value: "a==1" }], + sentenceAssets: [], + subScene: [] + }; + expect(result.sentenceList).toContainEqual(expectSentenceItem); +}); + +test("config", async () => { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const configFesult = parser.parseConfig(` +Game_name:欢迎使用WebGAL!; +Game_key:0f86dstRf; +Title_img:WebGAL_New_Enter_Image.png; +Title_bgm:s_Title.mp3; +Title_logos: 1.png | 2.png | Image Logo.png| -show -active=false -add=op! -count=3;This is a fake config, do not reference anything. + `); + expect(configFesult).toContainEqual({ + command: 'Title_logos', + args: ['1.png', '2.png', 'Image Logo.png'], + options: [ + { key: 'show', value: true }, + { key: 'active', value: false }, + { key: 'add', value: 'op!' }, + { key: 'count', value: 3 }, + ] + }); +}); + +test("config-stringify", async () => { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const configFesult = parser.parseConfig(` +Game_name:欢迎使用WebGAL!; +Game_key:0f86dstRf; +Title_img:WebGAL_New_Enter_Image.png; +Title_bgm:s_Title.mp3; +Title_logos: 1.png | 2.png | Image Logo.png| -show -active=false -add=op! -count=3;This is a fake config, do not reference anything. + `); + const stringifyResult = parser.stringifyConfig(configFesult); + const configResult2 = parser.parseConfig(stringifyResult); + expect(configResult2).toContainEqual({ + command: 'Title_logos', + args: ['1.png', '2.png', 'Image Logo.png'], + options: [ + { key: 'show', value: true }, + { key: 'active', value: false }, + { key: 'add', value: 'op!' }, + { key: 'count', value: 3 }, + ] + }); +}); + + +test("say statement", async () => { + const parser = new SceneParser((assetList) => { + }, (fileName, assetType) => { + return fileName; + }, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + + const result = parser.parse(`say:123 -speaker=xx;`, 'test', 'test'); + expect(result.sentenceList).toContainEqual({ + command: commandType.say, + commandRaw: "say", + content: "123", + args: [{ key: 'speaker', value: 'xx' }], + sentenceAssets: [], + subScene: [] + }); +}); diff --git a/packages/parser_legacy/test/test-resources/choose.txt b/packages/parser_legacy/test/test-resources/choose.txt new file mode 100644 index 000000000..adcacf08f --- /dev/null +++ b/packages/parser_legacy/test/test-resources/choose.txt @@ -0,0 +1,5 @@ +choose:; +choose:|; +choose:fff:; +choose::ff; +choose:|:ff; diff --git a/packages/parser_legacy/test/test-resources/debug.scss b/packages/parser_legacy/test/test-resources/debug.scss new file mode 100644 index 000000000..bffd61c0b --- /dev/null +++ b/packages/parser_legacy/test/test-resources/debug.scss @@ -0,0 +1,64 @@ +.Title_main { + width: 100%; + height: 100%; + position: absolute; + z-index: 13; +} + +.Title_buttonList { + font-family: "思源宋体", serif; + display: flex; + position: absolute; + left: 0; + min-width: 25%; + height: 100%; + justify-content: center; + align-items: flex-start; + flex-flow: column; + transition: background 0.75s; + padding-left: 120px; +} + +.Title_button { + font-weight: bold; + text-align: center; + flex: 0 1 auto; + cursor: pointer; + padding: 1em 2em 1em 2em; + margin: 20px 0; + transition: all 0.33s; + background: rgba(255, 255, 255, 0.15); + backdrop-filter: blur(5px); + border-radius: 4px; + transform: skewX(-10deg); + background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)); + + &:hover { + font-weight: bold; + text-shadow: 0 0 10px rgba(255, 255, 255, 1); + padding: 1em 6em 1em 3em; + } + &:active { + font-weight: bold; + } +} + +.Title_button_text { + color: transparent; + background: linear-gradient(135deg, #fdfbfb 0%, #dcddde 100%); + -webkit-background-clip: text; + padding: 0 0.5em 0 0.5em; + font-size: 200%; + font-family: WebgalUI, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; + letter-spacing: 0.15em; +} + +.Title_backup_background { + width: 100%; + height: 100%; + position: absolute; + z-index: 13; + background: linear-gradient(135deg, #fdfbfb 0%, #dcddde 100%); +} + + diff --git a/packages/parser_legacy/test/test-resources/long-script.txt b/packages/parser_legacy/test/test-resources/long-script.txt new file mode 100644 index 000000000..548a33a72 --- /dev/null +++ b/packages/parser_legacy/test/test-resources/long-script.txt @@ -0,0 +1,3672 @@ +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; +; WebGAL 引擎会默认读取 start.txt 作为初始场景,因此请不要删除,并在初始场景内跳转到其他场景 +bgm:s_Title.mp3; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 WebGAL 的世界; +changeBg:bg.png -next; +unlockCg:bg.png -name=良夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -next; +setAnimation:enter-from-left -target=fig-left -next; +WebGAL:欢迎使用 WebGAL!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +WebGAL 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 WebGAL 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -next; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +WebGAL 引擎也具有动画系统和特效系统,使用 WebGAL 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +你可以通过以下两个分支了解 WebGAL 的更多故事。 -v8.wav; +pixiInit; +choose:WebGAL 发展历程:choose1|WebGAL 冷知识:choose2; + +;分支1 +label:choose1; +WebGAL 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,WebGAL 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,WebGAL 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +WebGAL 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +WebGAL 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +WebGAL 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; + +;结束分支 +label:end; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +WebGAL 项目组期待你的作品能够在 WebGAL 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 WebGAL 项目! -v23.wav; +end; diff --git a/packages/parser_legacy/test/test-resources/start.txt b/packages/parser_legacy/test/test-resources/start.txt new file mode 100644 index 000000000..a1240cea9 --- /dev/null +++ b/packages/parser_legacy/test/test-resources/start.txt @@ -0,0 +1,105 @@ +; 初始场景,以及特效演示 +changeBg:c4.jpg -next; +unlockCg:c4.jpg -name=街前; 解锁部分CG +unlockCg:xgmain.jpeg -name=星光咖啡馆与死神之蝶; +unlockBgm:s_Title.mp3 -name=Smiling-Swinging!!; +WebGAL:特效系统是3.9.2版本新引入的系统,你想要看特效的演示吗?; +choose:观看特效演示:demo|我不要看特效,直接来吧!:toStart; +label:demo; +pixiInit; +pixiPerform:rain; +WebGAL:现在展示的是下雨的特效。; +pixiInit; +pixiPerform:snow; +WebGAL:现在展示的是下雪的特效。; +setTextbox:hide; +pixiInit; +setTextbox:on -next; +WebGAL:特效的演示已经结束,现在我们正式开始吧!; + +; 正式场景 +label:toStart; +playVideo:OP.mp4; +changeBg:c3.jpg -next; +unlockCg:c3.jpg -name=cafe; +changeFigure:m2.png -left -next; +bgm:cb1.mp3; +unlockBgm:cb1.mp3 -name=ひとすじの光明; +setAnimation:enter-from-left -target=fig-left -next; +米咖多:蛋包饭是栞那做的,但红茶是夏目泡的。 -v1.ogg; +昂晴:......; +顺便问一下,你是打算做什么的?; +changeFigure:m1.png -left -next; +米咖多:就是倒饮料。然后咖啡和红茶的冲泡方式我还是记住了的。 -v2.ogg; +昂晴:这、这样么......; +:这猫爪子真的能泡茶么。; +拿得了水壶吗?就凭他那个肉球爪子......; +难道这些也是凭借猫妖的奇特力量做到的吗?; +changeFigure:none -left -next; +changeFigure:k1.png -next; +setAnimation:enter-from-bottom -target=fig-center -next; +栞那:那么,你想先尝哪个? -v3.ogg; +choose:品尝蛋包饭:dbf|品尝红茶:hc; + +; 栞那选项 +label:dbf; +昂晴:总之,先确认下蛋包饭的味道吧; +changeFigure:k2.png -next; +栞那:明白了,交给我吧 -v4.ogg; +changeFigure:none -next; +changeFigure:m2.png -left -next; +changeFigure:k3.png -right -next; +setAnimation:enter-from-left -target=fig-left -next; +setAnimation:enter-from-right -target=fig-right -next; +栞那:那么米咖多先生,我去做一下试作品 -v5.ogg; +米咖多:嗯。去吧 -v6.ogg; +changeFigure:none -left -next; +changeFigure:none -right -next; +changeFigure:k4.png -next; +setAnimation:enter-from-bottom -target=fig-center -next; +栞那:那么高岭同学,我们移动到厨房吧 -v7.ogg; +changeFigure:none -next; +bgm:cb2.mp3; +unlockBgm:cb2.mp3 -name=Tea Break; +changeBg:c2.jpg; +unlockCg:c2.jpg -name=厨房; +changeFigure:k2.png -next; +栞那:话不多说开始做吧 -v8.ogg; +jumpLabel:end; + +; 夏目选项 +label:hc; +changeFigure:none -next; +changeFigure:m1.png -left -next; +changeFigure:k1.png -right -next; +setAnimation:enter-from-left -target=fig-left -next; +setAnimation:enter-from-right -target=fig-right -next; +米咖多:那么就是,夏目了吧 -v9.ogg; +changeFigure:k6.png -right -next; +栞那:她刚去休息,要不要我叫回来呢? -v10.ogg; +昂晴:没事,我自己去吧; +changeFigure:none -left -next; +changeFigure:none -right -next; +bgm:cb2.mp3; +changeBg:c1.jpg -next; +unlockCg:c1.jpg -name=休息室; +:我先敲了敲门; +miniAvatar:n1.png; +夏目:哪位? -v11.ogg; +昂晴:我是高岭,可以进去吗?; +夏目:可以,没问题 -v12.ogg; +昂晴:打搅了; +miniAvatar:none; +changeFigure:n4.png -next; +昂晴:打搅你休息了; +夏目:不用在意,怎么了? -v13.ogg; +changeFigure:n2.png -next; +:她并没有无精打采,比想象中精神多了; +昂晴:问道拿手菜谱,就听说四季同学泡的红茶味道不错,我也想品尝一下; +夏目:明白了,那我们回去吧 -v14.ogg; +jumpLabel:end; + +; 结束场景 +label:end; +changeFigure:none -next; +WebGAL:基础演出的展示已经结束。; diff --git a/packages/parser_legacy/test/test-resources/var.txt b/packages/parser_legacy/test/test-resources/var.txt new file mode 100644 index 000000000..8185817d4 --- /dev/null +++ b/packages/parser_legacy/test/test-resources/var.txt @@ -0,0 +1,11 @@ +setVar:a=1; +WebGAL:a=1? -when=a==1; + +;正常解析 +WebGAL:test; + +; : 异常测试 +WebGAL : test; + +分号后应该被截断;看不到我! +转义分号后应该不截断\;能看到我! diff --git a/packages/parser_legacy/tsconfig.json b/packages/parser_legacy/tsconfig.json new file mode 100644 index 000000000..5fb839743 --- /dev/null +++ b/packages/parser_legacy/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "declaration": true, + "declarationDir": "build/types", + "target": "ESNext", + "useDefineForClassFields": true, + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": false, + "skipLibCheck": false, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "noImplicitAny": false, + "moduleResolution": "Node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "paths": { + "@/*": ["./src/*"] + } + }, + "include": [ + "src" + ], + "references": [{ "path": "./tsconfig.node.json"}] +} diff --git a/packages/parser_legacy/tsconfig.node.json b/packages/parser_legacy/tsconfig.node.json new file mode 100644 index 000000000..fde6cf327 --- /dev/null +++ b/packages/parser_legacy/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "module": "esnext", + "moduleResolution": "node" + }, + "include": [ + "vite.config.ts" + ] +} diff --git a/packages/server/.gitattributes b/packages/server/.gitattributes new file mode 100644 index 000000000..dfe077042 --- /dev/null +++ b/packages/server/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/packages/server/.gitignore b/packages/server/.gitignore new file mode 100644 index 000000000..70dffce3c --- /dev/null +++ b/packages/server/.gitignore @@ -0,0 +1,130 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +debug +WebGAL diff --git a/packages/server/LICENSE b/packages/server/LICENSE new file mode 100644 index 000000000..a612ad981 --- /dev/null +++ b/packages/server/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/packages/server/README.md b/packages/server/README.md new file mode 100644 index 000000000..0909c5ea2 --- /dev/null +++ b/packages/server/README.md @@ -0,0 +1,17 @@ +# WebGAL-Server +WebGAL Server and Command LIne Interface. + +WebGAL 本地调试服务器 + +## 使用说明 +### 自动探测模式 +自动探测模式在以下两种情况下探测 WebGAL 工程文件: + +1、当前目录就是 WebGAL 工程的根目录。 + +2、当前目录包含名为 'WebGAL' 的目录(不区分大小写),这个目录是 WebGAL 工程的根目录。 + +### 指定目录模式 +通过命令行运行此程序,第一个(且唯一一个)参数就是要指定的绝对或相对路径,是 WebGAL 的工程目录。 + +**注意:Windows 下的路径不能以 \ 分隔,请以 \\ 或 / 分隔,否则会发生错误。** diff --git a/packages/server/index-linux b/packages/server/index-linux new file mode 100644 index 000000000..241939b51 Binary files /dev/null and b/packages/server/index-linux differ diff --git a/packages/server/index-macos b/packages/server/index-macos new file mode 100644 index 000000000..d8c3cae7a Binary files /dev/null and b/packages/server/index-macos differ diff --git a/packages/server/index-win.exe b/packages/server/index-win.exe new file mode 100644 index 000000000..5db3afea7 Binary files /dev/null and b/packages/server/index-win.exe differ diff --git a/packages/server/index.js b/packages/server/index.js new file mode 100644 index 000000000..b4d39d7ec --- /dev/null +++ b/packages/server/index.js @@ -0,0 +1,81 @@ +const express = require('express'); +const Cloudlog = require("cloudlogjs"); +const fs = require('fs'); +const path = require('path'); +const rl = require('readline'); +const open = require('open'); + +// 读取控制台输入 +const readline = rl.createInterface({ + input: process.stdin, + output: process.stdout +}) + +const server = new express(); +const Port = process.env.PORT || 3000; +const logger = new Cloudlog(); + +// 读取控制台数据 +const args = process.argv; +logger.info(`WebGAL Server 启动参数:`, args); + +// 读取工作目录 +const cwd = process.cwd(); +logger.info(`WebGAL 工作目录当前为 ${cwd}`); + +// 检测并获取 WebGAL 游戏资源所在目录 +let webgalWd = ''; + +// 参数模式 +if (args.length >= 3) { + // 参数就是工作目录 + const wdr = args[2]; + logger.info(`指定工作目录:${wdr}`); + if (wdr[0] === '/' || wdr.match(/^\w:/)) { + // 绝对路径模式 + logger.debug('绝对路径模式'); + webgalWd = wdr; + } else { + // 相对路径模式 + logger.debug('相对路径模式'); + const rwd = wdr.split(/[\\\/]/g); + webgalWd = path.join(cwd, ...rwd); + } + // 输出 + logger.info(`工作目录被设置为 ${webgalWd}`); +} + +// 自动探测模式 +if (webgalWd === '') { + const dirInfo = fs.readdirSync(cwd); + if (dirInfo.includes('index.html')) { + logger.info(`在当前工作目录下启动 WebGAL`); + webgalWd = cwd; + } else { + // 全转成大写,复制一份副本 + const dirInfoUpperCase = dirInfo.map(e => e.toUpperCase()); + if (dirInfoUpperCase.includes('WEBGAL')) { + // 找 index + const index = dirInfoUpperCase.findIndex(e => e === 'WEBGAL'); + const trueDirName = dirInfo[index]; + webgalWd = path.join(cwd, trueDirName); + } else { + // 没找到 + logger.info(`未找到 WebGAL 文件,请在 WebGAL 项目目录下启动 WebGAL-Server 或在本目录下的 WebGAL 文件夹下启动。`); + } + } +} + +if (webgalWd) { + // 监听端口 + server.use(express.static(webgalWd))//allow browser access resources + server.listen(Port, () => { + logger.info(`启动 WebGAL 服务器,运行于 http://localhost:${Port} .`) + }) + open(`http://localhost:${Port}`); +} else { + logger.error(`未找到启动文件,请退出`); + readline.on('line', () => { + process.exit(); + }) +} diff --git a/packages/server/package.json b/packages/server/package.json new file mode 100644 index 000000000..6e2de1951 --- /dev/null +++ b/packages/server/package.json @@ -0,0 +1,21 @@ +{ + "name": "WebGAL-Server", + "scripts": { + "start": "node index.js", + "pkg": "pkg index.js" + }, + "version": "0.1.0", + "description": "WebGAL Server and Command LIne Interface.", + "main": "index.js", + "repository": "https://github.com/WebGAL-Technical-Committee/WebGAL-Server.git", + "author": "Mahiru ", + "license": "MPL-2.0", + "devDependencies": { + "pkg": "^5.8.0" + }, + "dependencies": { + "cloudlogjs": "^1.0.11", + "express": "^4.20.0", + "open": "^8.4.0" + } +} diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock new file mode 100644 index 000000000..1a8c9536f --- /dev/null +++ b/packages/server/yarn.lock @@ -0,0 +1,1407 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/generator@7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" + integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== + dependencies: + "@babel/types" "^7.18.2" + "@jridgewell/gen-mapping" "^0.3.0" + jsesc "^2.5.1" + +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + +"@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + +"@babel/parser@7.18.4": + version "7.18.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" + integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow== + +"@babel/types@7.18.4": + version "7.18.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" + integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + +"@babel/types@^7.18.2": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" + integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.7" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" + integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +axios@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" + integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== + dependencies: + follow-redirects "^1.14.4" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +body-parser@1.20.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5" + integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== + dependencies: + bytes "3.1.2" + content-type "~1.0.4" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.10.3" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +cloudlogjs@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/cloudlogjs/-/cloudlogjs-1.0.11.tgz#986ee884b786434c9bf3812e2afdbea9163e31a3" + integrity sha512-0dfQYXHCpPfGOrOEJjRRWcRArjqKxBSYb01+YLdFVj5bQ+9sZ1Uf5EuXpfqZh+r9Xlugpipi2uvNcdChAKHq2w== + dependencies: + axios "^0.24.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + +express@^4.18.1: + version "4.18.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" + integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.0" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.5.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.2.0" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.7" + qs "6.10.3" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +follow-redirects@^1.14.4: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +from2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g== + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg== + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +into-stream@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-6.0.0.tgz#4bfc1244c0128224e18b8870e85b2de8e66c6702" + integrity sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA== + dependencies: + from2 "^2.3.0" + p-is-promise "^3.0.0" + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-core-module@2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + dependencies: + has "^1.0.3" + +is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-response@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" + integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== + +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multistream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8" + integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw== + dependencies: + once "^1.4.0" + readable-stream "^3.6.0" + +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +node-abi@^2.21.0: + version "2.30.1" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" + integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== + dependencies: + semver "^5.4.1" + +node-fetch@^2.6.6: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +npmlog@^4.0.1: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +open@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" + integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +p-is-promise@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-3.0.0.tgz#58e78c7dfe2e163cf2a04ff869e7c1dba64a5971" + integrity sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-fetch@3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.2.tgz#6f68ebc54842b73f8c0808959a9df3739dcb28b7" + integrity sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA== + dependencies: + chalk "^4.1.2" + fs-extra "^9.1.0" + https-proxy-agent "^5.0.0" + node-fetch "^2.6.6" + progress "^2.0.3" + semver "^7.3.5" + tar-fs "^2.1.1" + yargs "^16.2.0" + +pkg@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.0.tgz#a77644aeff0b94a1656d7f76558837f7c754a4c0" + integrity sha512-8h9PUDYFi+LOMLbIyGRdP21g08mAtHidSpofSrf8LWhxUWGHymaRzcopEGiynB5EhQmZUKM6PQ9kCImV2TpdjQ== + dependencies: + "@babel/generator" "7.18.2" + "@babel/parser" "7.18.4" + "@babel/types" "7.18.4" + chalk "^4.1.2" + fs-extra "^9.1.0" + globby "^11.1.0" + into-stream "^6.0.0" + is-core-module "2.9.0" + minimist "^1.2.6" + multistream "^4.1.0" + pkg-fetch "3.4.2" + prebuild-install "6.1.4" + resolve "^1.22.0" + stream-meter "^1.0.4" + +prebuild-install@6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" + integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^2.21.0" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +progress@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +qs@6.10.3: + version "6.10.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@^2.1.4: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +resolve@^1.22.0: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +semver@^5.4.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^7.3.5: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.18.0" + +set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.0: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" + integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== + dependencies: + decompress-response "^4.2.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +stream-meter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" + integrity sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ== + dependencies: + readable-stream "^2.1.4" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tar-fs@^2.0.0, tar-fs@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +wide-align@^1.1.0: + version "1.1.5" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" diff --git a/packages/webgal/.eslintignore b/packages/webgal/.eslintignore new file mode 100644 index 000000000..0bdc31f75 --- /dev/null +++ b/packages/webgal/.eslintignore @@ -0,0 +1,10 @@ +*.md +*.css +*.scss +*.otf +*.svg +*.ttf +*.ico +*.mp3 +*.wav +*.txt diff --git a/packages/webgal/.eslintrc.js b/packages/webgal/.eslintrc.js new file mode 100644 index 000000000..ba9e148db --- /dev/null +++ b/packages/webgal/.eslintrc.js @@ -0,0 +1,32 @@ +module.exports = { + extends: ['alloy', 'alloy/react', 'alloy/typescript', 'plugin:prettier/recommended'], + env: { + // 你的环境变量(包含多个预定义的全局变量) + // + // browser: true, + // node: true, + // mocha: true, + // jest: true, + // jquery: true + }, + globals: { + // 你的全局变量(设置为 false 表示它不允许被重新赋值) + // + // myGlobal: false + }, + rules: { + // 自定义你的规则 + // 最大圈复杂度 + complexity: ['error', 30], + 'linebreak-style': ['error', 'unix'], + semi: 2, + // indent: ['error', 2], + 'semi-style': ['error', 'last'], + 'react/jsx-no-useless-fragment': [ + 'error', + { + allowExpressions: true, + }, + ], + }, +}; diff --git a/packages/webgal/.prettierignore b/packages/webgal/.prettierignore new file mode 100644 index 000000000..75191a9ce --- /dev/null +++ b/packages/webgal/.prettierignore @@ -0,0 +1,5 @@ +*.md +*.css +*.scss +*.otf +*.svg diff --git a/packages/webgal/.prettierrc.js b/packages/webgal/.prettierrc.js new file mode 100644 index 000000000..ae7b006b1 --- /dev/null +++ b/packages/webgal/.prettierrc.js @@ -0,0 +1,42 @@ +// .prettierrc.js +module.exports = { + // 一行最多 120 字符 + printWidth: 120, + // 使用 n 个空格缩进 + tabWidth: 2, + // 不使用缩进符,而使用空格 + useTabs: false, + // 行尾需要有分号 + semi: true, + // 使用单引号 + singleQuote: true, + // 对象的 key 仅在必要时用引号 + quoteProps: 'as-needed', + // jsx 不使用单引号,而使用双引号 + jsxSingleQuote: false, + // 末尾需要有逗号 + trailingComma: 'all', + // 大括号内的首尾需要空格 + bracketSpacing: true, + // jsx 标签的反尖括号需要换行 + bracketSameLine: false, + // 箭头函数,只有一个参数的时候,也需要括号 + arrowParens: 'always', + // 每个文件格式化的范围是文件的全部内容 + rangeStart: 0, + rangeEnd: Infinity, + // 不需要写文件开头的 @prettier + requirePragma: false, + // 不需要自动在文件开头插入 @prettier + insertPragma: false, + // 使用默认的折行标准 + proseWrap: 'preserve', + // 根据显示样式决定 html 要不要折行 + htmlWhitespaceSensitivity: 'css', + // vue 文件中的 script 和 style 内不用缩进 + vueIndentScriptAndStyle: false, + // 换行符使用 lf + endOfLine: 'lf', + // 格式化内嵌代码 + embeddedLanguageFormatting: 'auto', +} diff --git a/packages/webgal/index.html b/packages/webgal/index.html new file mode 100644 index 000000000..c3ffb4d19 --- /dev/null +++ b/packages/webgal/index.html @@ -0,0 +1,288 @@ + + + + + + + + + WebGAL + + + + +
+
+ +
+ +
+ +
+
+
+ PRESS THE SCREEN TO START +
+
+
+
+ Powered by WebGAL Framework +
+
+ Made with ❤ by OpenWebGAL +
+
+
+
+
+
+ + + + + + + + + + diff --git a/packages/webgal/package.json b/packages/webgal/package.json new file mode 100644 index 000000000..52f5b5a1d --- /dev/null +++ b/packages/webgal/package.json @@ -0,0 +1,57 @@ +{ + "name": "webgal", + "private": true, + "version": "4.5.9", + "scripts": { + "dev": "vite --host --port 3000", + "build": "cross-env NODE_ENV=production tsc && vite build --base=./", + "preview": "vite preview", + "lint": "eslint src/** --fix" + }, + "dependencies": { + "@emotion/css": "^11.11.2", + "@icon-park/react": "^1.4.2", + "@reduxjs/toolkit": "^1.8.1", + "angular-expressions": "^1.1.5", + "axios": "^0.28.0", + "cloudlogjs": "^1.0.9", + "i18next": "^22.4.15", + "localforage": "^1.10.0", + "lodash": "^4.17.21", + "mitt": "^3.0.0", + "modern-css-reset": "^1.4.0", + "pixi-filters": "^4.2.0", + "pixi-live2d-display-webgal": "^0.5.8", + "pixi-spine": "^3.1.2", + "pixi.js": "^6.3.0", + "popmotion": "^11.0.5", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-i18next": "^12.2.2", + "react-redux": "^8.0.1", + "sass": "^1.49.9", + "uuid": "^9.0.0", + "vite-plugin-package-version": "^1.0.2" + }, + "devDependencies": { + "@types/lodash": "^4.14.180", + "@types/node": "^17.0.23", + "@types/react": "^17.0.33", + "@types/react-dom": "^17.0.10", + "@types/uuid": "^8.3.4", + "@typescript-eslint/eslint-plugin": "^5.18.0", + "@typescript-eslint/parser": "^5.18.0", + "@vitejs/plugin-react": "^4.0.4", + "cross-env": "^7.0.3", + "eslint": "^8.13.0", + "eslint-config-alloy": "^4.5.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-react": "^7.29.4", + "lint-staged": "^12.3.7", + "prettier": "^2.6.2", + "rollup-plugin-visualizer": "^5.6.0", + "typescript": "^4.5.4", + "vite": "^4.5.5" + } +} diff --git a/packages/webgal/public/game/animation/animationTable.json b/packages/webgal/public/game/animation/animationTable.json new file mode 100644 index 000000000..f4ed953b6 --- /dev/null +++ b/packages/webgal/public/game/animation/animationTable.json @@ -0,0 +1,19 @@ +[ + "enter-from-left", + "enter-from-bottom", + "enter-from-right", + "shake", + "move-front-and-back", + "enter", + "exit", + "blur", + "oldFilm", + "dotFilm", + "reflectionFilm", + "glitchFilm", + "rgbFilm", + "godrayFilm", + "removeFilm", + "shockwaveIn", + "shockwaveOut" +] diff --git a/packages/webgal/public/game/animation/blur.json b/packages/webgal/public/game/animation/blur.json new file mode 100644 index 000000000..82a7f2da8 --- /dev/null +++ b/packages/webgal/public/game/animation/blur.json @@ -0,0 +1,10 @@ +[ + { + "blur": 0, + "duration": 0 + }, + { + "blur": 5, + "duration": 300 + } +] diff --git a/packages/webgal/public/game/animation/dotFilm.json b/packages/webgal/public/game/animation/dotFilm.json new file mode 100644 index 000000000..b68183d20 --- /dev/null +++ b/packages/webgal/public/game/animation/dotFilm.json @@ -0,0 +1,6 @@ +[ + { + "dotFilm": 1, + "duration": 0 + } +] diff --git a/packages/webgal/public/game/animation/enter-from-bottom.json b/packages/webgal/public/game/animation/enter-from-bottom.json new file mode 100644 index 000000000..4ac5b0163 --- /dev/null +++ b/packages/webgal/public/game/animation/enter-from-bottom.json @@ -0,0 +1,20 @@ +[ + { + "alpha": 0, + "position": { + "x": 0, + "y": 50 + }, + "blur": 5, + "duration": 0 + }, + { + "alpha": 1, + "position": { + "x": 0, + "y": 0 + }, + "blur": 0, + "duration": 500 + } +] diff --git a/packages/webgal/public/game/animation/enter-from-left.json b/packages/webgal/public/game/animation/enter-from-left.json new file mode 100644 index 000000000..974c02d87 --- /dev/null +++ b/packages/webgal/public/game/animation/enter-from-left.json @@ -0,0 +1,30 @@ +[ + { + "alpha": 0, + "scale": { + "x": 1, + "y": 1 + }, + "position": { + "x": -50, + "y": 0 + }, + "rotation": 0, + "blur": 5, + "duration": 0 + }, + { + "alpha": 1, + "scale": { + "x": 1, + "y": 1 + }, + "position": { + "x": 0, + "y": 0 + }, + "rotation": 0, + "blur": 0, + "duration": 500 + } +] diff --git a/packages/webgal/public/game/animation/enter-from-right.json b/packages/webgal/public/game/animation/enter-from-right.json new file mode 100644 index 000000000..df705a481 --- /dev/null +++ b/packages/webgal/public/game/animation/enter-from-right.json @@ -0,0 +1,20 @@ +[ + { + "alpha": 0, + "position": { + "x": 50, + "y": 0 + }, + "blur": 5, + "duration": 0 + }, + { + "alpha": 1, + "position": { + "x": 0, + "y": 0 + }, + "blur": 0, + "duration": 500 + } +] diff --git a/packages/webgal/public/game/animation/enter.json b/packages/webgal/public/game/animation/enter.json new file mode 100644 index 000000000..70eaae283 --- /dev/null +++ b/packages/webgal/public/game/animation/enter.json @@ -0,0 +1,10 @@ +[ + { + "alpha": 0, + "duration": 0 + }, + { + "alpha": 1, + "duration": 300 + } +] diff --git a/packages/webgal/public/game/animation/exit.json b/packages/webgal/public/game/animation/exit.json new file mode 100644 index 000000000..3f468cf7a --- /dev/null +++ b/packages/webgal/public/game/animation/exit.json @@ -0,0 +1,10 @@ +[ + { + "alpha": 1, + "duration": 0 + }, + { + "alpha": 0, + "duration": 300 + } +] diff --git a/packages/webgal/public/game/animation/glitchFilm.json b/packages/webgal/public/game/animation/glitchFilm.json new file mode 100644 index 000000000..5060afab8 --- /dev/null +++ b/packages/webgal/public/game/animation/glitchFilm.json @@ -0,0 +1,6 @@ +[ + { + "glitchFilm": 1, + "duration": 0 + } +] \ No newline at end of file diff --git a/packages/webgal/public/game/animation/godrayFilm.json b/packages/webgal/public/game/animation/godrayFilm.json new file mode 100644 index 000000000..1dd1ad321 --- /dev/null +++ b/packages/webgal/public/game/animation/godrayFilm.json @@ -0,0 +1,6 @@ +[ + { + "godrayFilm": 1, + "duration": 0 + } +] diff --git a/packages/webgal/public/game/animation/move-front-and-back.json b/packages/webgal/public/game/animation/move-front-and-back.json new file mode 100644 index 000000000..59b8ea390 --- /dev/null +++ b/packages/webgal/public/game/animation/move-front-and-back.json @@ -0,0 +1,23 @@ +[ + { + "scale": { + "x": 1, + "y": 1 + }, + "duration": 0 + }, + { + "scale": { + "x": 1.15, + "y": 1.15 + }, + "duration": 500 + }, + { + "scale": { + "x": 1, + "y": 1 + }, + "duration": 500 + } +] diff --git a/packages/webgal/public/game/animation/oldFilm.json b/packages/webgal/public/game/animation/oldFilm.json new file mode 100644 index 000000000..25c871fef --- /dev/null +++ b/packages/webgal/public/game/animation/oldFilm.json @@ -0,0 +1,6 @@ +[ + { + "oldFilm": 1, + "duration": 0 + } +] diff --git a/packages/webgal/public/game/animation/reflectionFilm.json b/packages/webgal/public/game/animation/reflectionFilm.json new file mode 100644 index 000000000..4989708b3 --- /dev/null +++ b/packages/webgal/public/game/animation/reflectionFilm.json @@ -0,0 +1,6 @@ +[ + { + "reflectionFilm": 1, + "duration": 0 + } +] diff --git a/packages/webgal/public/game/animation/removeFilm.json b/packages/webgal/public/game/animation/removeFilm.json new file mode 100644 index 000000000..4e82ca50d --- /dev/null +++ b/packages/webgal/public/game/animation/removeFilm.json @@ -0,0 +1,11 @@ +[ + { + "oldFilm": 0, + "dotFilm": 0, + "reflectionFilm": 0, + "glitchFilm": 0, + "rgbFilm": 0, + "godrayFilm": 0, + "duration": 0 + } +] diff --git a/packages/webgal/public/game/animation/rgbFilm.json b/packages/webgal/public/game/animation/rgbFilm.json new file mode 100644 index 000000000..dd7fb9b04 --- /dev/null +++ b/packages/webgal/public/game/animation/rgbFilm.json @@ -0,0 +1,6 @@ +[ + { + "rgbFilm": 1, + "duration": 0 + } +] diff --git a/packages/webgal/public/game/animation/shake.json b/packages/webgal/public/game/animation/shake.json new file mode 100644 index 000000000..47b5c8fb8 --- /dev/null +++ b/packages/webgal/public/game/animation/shake.json @@ -0,0 +1,30 @@ +[ + { + "position": { + "x": 0, + "y": 0 + }, + "duration": 0 + }, + { + "position": { + "x": -100, + "y": 0 + }, + "duration": 250 + }, + { + "position": { + "x": 100, + "y": 0 + }, + "duration": 500 + }, + { + "position": { + "x": 0, + "y": 0 + }, + "duration": 250 + } +] diff --git a/packages/webgal/public/game/animation/shockwaveIn.json b/packages/webgal/public/game/animation/shockwaveIn.json new file mode 100644 index 000000000..41afc947b --- /dev/null +++ b/packages/webgal/public/game/animation/shockwaveIn.json @@ -0,0 +1,14 @@ +[ + { + "shockwaveFilter": 0, + "alpha": 1, + "radiusAlphaFilter": 0, + "duration": 0 + }, + { + "shockwaveFilter": 3.05, + "alpha": 1, + "radiusAlphaFilter": 1.05, + "duration": 2000 + } +] diff --git a/packages/webgal/public/game/animation/shockwaveOut.json b/packages/webgal/public/game/animation/shockwaveOut.json new file mode 100644 index 000000000..56719bdc5 --- /dev/null +++ b/packages/webgal/public/game/animation/shockwaveOut.json @@ -0,0 +1,12 @@ +[ + { + "shockwaveFilter": 0, + "alpha": 1, + "duration": 0 + }, + { + "shockwaveFilter": 3, + "alpha": 1, + "duration": 2000 + } +] diff --git a/packages/webgal/public/game/background/WebGAL_New_Enter_Image.png b/packages/webgal/public/game/background/WebGAL_New_Enter_Image.png new file mode 100644 index 000000000..e83234b74 Binary files /dev/null and b/packages/webgal/public/game/background/WebGAL_New_Enter_Image.png differ diff --git a/packages/webgal/public/game/background/WebGalEnter.png b/packages/webgal/public/game/background/WebGalEnter.png new file mode 100644 index 000000000..50e07f661 Binary files /dev/null and b/packages/webgal/public/game/background/WebGalEnter.png differ diff --git a/packages/webgal/public/game/background/bg.png b/packages/webgal/public/game/background/bg.png new file mode 100644 index 000000000..127ca4d9f Binary files /dev/null and b/packages/webgal/public/game/background/bg.png differ diff --git a/packages/webgal/public/game/bgm/s_Title.mp3 b/packages/webgal/public/game/bgm/s_Title.mp3 new file mode 100644 index 000000000..b12645e94 Binary files /dev/null and b/packages/webgal/public/game/bgm/s_Title.mp3 differ diff --git a/packages/webgal/public/game/config.txt b/packages/webgal/public/game/config.txt new file mode 100644 index 000000000..3bc42af83 --- /dev/null +++ b/packages/webgal/public/game/config.txt @@ -0,0 +1,5 @@ +Game_name:欢迎使用WebGAL!; +Game_key:0f87dstRg; +Title_img:WebGAL_New_Enter_Image.png; +Title_bgm:s_Title.mp3; +Game_Logo:WebGalEnter.png; diff --git a/packages/webgal/public/game/figure/1/closed_eyes.png b/packages/webgal/public/game/figure/1/closed_eyes.png new file mode 100644 index 000000000..9900056c6 Binary files /dev/null and b/packages/webgal/public/game/figure/1/closed_eyes.png differ diff --git a/packages/webgal/public/game/figure/1/closed_mouth.png b/packages/webgal/public/game/figure/1/closed_mouth.png new file mode 100644 index 000000000..53892b017 Binary files /dev/null and b/packages/webgal/public/game/figure/1/closed_mouth.png differ diff --git a/packages/webgal/public/game/figure/1/halfopen_mouth.png b/packages/webgal/public/game/figure/1/halfopen_mouth.png new file mode 100644 index 000000000..c6a9427ec Binary files /dev/null and b/packages/webgal/public/game/figure/1/halfopen_mouth.png differ diff --git a/packages/webgal/public/game/figure/1/open_eyes.png b/packages/webgal/public/game/figure/1/open_eyes.png new file mode 100644 index 000000000..53892b017 Binary files /dev/null and b/packages/webgal/public/game/figure/1/open_eyes.png differ diff --git a/packages/webgal/public/game/figure/1/open_mouth.png b/packages/webgal/public/game/figure/1/open_mouth.png new file mode 100644 index 000000000..9d6e1ed01 Binary files /dev/null and b/packages/webgal/public/game/figure/1/open_mouth.png differ diff --git a/packages/webgal/public/game/figure/2/closed_eyes.png b/packages/webgal/public/game/figure/2/closed_eyes.png new file mode 100644 index 000000000..a151f2c14 Binary files /dev/null and b/packages/webgal/public/game/figure/2/closed_eyes.png differ diff --git a/packages/webgal/public/game/figure/2/closed_mouth.png b/packages/webgal/public/game/figure/2/closed_mouth.png new file mode 100644 index 000000000..8e828d044 Binary files /dev/null and b/packages/webgal/public/game/figure/2/closed_mouth.png differ diff --git a/packages/webgal/public/game/figure/2/halfopen_mouth.png b/packages/webgal/public/game/figure/2/halfopen_mouth.png new file mode 100644 index 000000000..15cceaf66 Binary files /dev/null and b/packages/webgal/public/game/figure/2/halfopen_mouth.png differ diff --git a/packages/webgal/public/game/figure/2/open_eyes.png b/packages/webgal/public/game/figure/2/open_eyes.png new file mode 100644 index 000000000..8e828d044 Binary files /dev/null and b/packages/webgal/public/game/figure/2/open_eyes.png differ diff --git a/packages/webgal/public/game/figure/2/open_mouth.png b/packages/webgal/public/game/figure/2/open_mouth.png new file mode 100644 index 000000000..6c74fb119 Binary files /dev/null and b/packages/webgal/public/game/figure/2/open_mouth.png differ diff --git a/packages/webgal/public/game/figure/3/closed_eyes.png b/packages/webgal/public/game/figure/3/closed_eyes.png new file mode 100644 index 000000000..e32445b54 Binary files /dev/null and b/packages/webgal/public/game/figure/3/closed_eyes.png differ diff --git a/packages/webgal/public/game/figure/3/closed_mouth.png b/packages/webgal/public/game/figure/3/closed_mouth.png new file mode 100644 index 000000000..7eb1de513 Binary files /dev/null and b/packages/webgal/public/game/figure/3/closed_mouth.png differ diff --git a/packages/webgal/public/game/figure/3/halfopen_mouth.png b/packages/webgal/public/game/figure/3/halfopen_mouth.png new file mode 100644 index 000000000..5b845144b Binary files /dev/null and b/packages/webgal/public/game/figure/3/halfopen_mouth.png differ diff --git a/packages/webgal/public/game/figure/3/open_eyes.png b/packages/webgal/public/game/figure/3/open_eyes.png new file mode 100644 index 000000000..7eb1de513 Binary files /dev/null and b/packages/webgal/public/game/figure/3/open_eyes.png differ diff --git a/packages/webgal/public/game/figure/3/open_mouth.png b/packages/webgal/public/game/figure/3/open_mouth.png new file mode 100644 index 000000000..f4df6005d Binary files /dev/null and b/packages/webgal/public/game/figure/3/open_mouth.png differ diff --git a/packages/webgal/public/game/figure/miniavatar.png b/packages/webgal/public/game/figure/miniavatar.png new file mode 100644 index 000000000..fc5d484e4 Binary files /dev/null and b/packages/webgal/public/game/figure/miniavatar.png differ diff --git a/packages/webgal/public/game/figure/stand.png b/packages/webgal/public/game/figure/stand.png new file mode 100644 index 000000000..eca86cc2a Binary files /dev/null and b/packages/webgal/public/game/figure/stand.png differ diff --git a/packages/webgal/public/game/figure/stand2.png b/packages/webgal/public/game/figure/stand2.png new file mode 100644 index 000000000..b7c9d4bee Binary files /dev/null and b/packages/webgal/public/game/figure/stand2.png differ diff --git a/packages/webgal/public/game/scene/demo_animation.txt b/packages/webgal/public/game/scene/demo_animation.txt new file mode 100644 index 000000000..9cd74655a --- /dev/null +++ b/packages/webgal/public/game/scene/demo_animation.txt @@ -0,0 +1,19 @@ +bgm:s_Title.mp3 -volume=80 -enter=3000; +unlockBgm:s_Title.mp3 -name=ようこそ; +intro:■初めに| このデモゲームで使用している画像素材は、AI生成画像です; +intro:■クレジット| 「VOICEVOX:小夜/SAYO」; +intro:まばたき、口パクのアニメーションテストです; +changeBg:bg.png; +changeFigure:1/open_mouth.png -left -next -id=test1 -animationFlag=on -eyesOpen=1/open_eyes.png -eyesClose=1/closed_eyes.png -mouthOpen=1/open_mouth.png -mouthHalfOpen=1/halfopen_mouth.png -mouthClose=1/closed_mouth.png; +WebGAL:こんにちは -001_小夜SAYO(ノーマル)_こんにちは。.wav -fontSize=default -animationFlag=on -figureId=test1; +WebGALは、かつてないまったく新しいビジュアルノベルエンジンです。 -003_小夜SAYO(ノーマル)_ウェブギャルは、か….wav -fontSize=default -animationFlag=on -figureId=test1; +changeFigure:2/open_mouth.png -next -id=test2 -animationFlag=on -eyesOpen=2/open_eyes.png -eyesClose=2/closed_eyes.png -mouthOpen=2/open_mouth.png -mouthHalfOpen=2/halfopen_mouth.png -mouthClose=2/closed_mouth.png; +WebGAL2:WebGALへようこそ -002_小夜SAYO(ノーマル)_ウェブギャルへよう….wav -fontSize=large -right -animationFlag=on; +Web技術を使用して開発されたエンジンであるため、ウェブページで優れたパフォーマンスを発揮します。 -004_小夜SAYO(ノーマル)_Web技術を使用し….wav -fontSize=default -right -animationFlag=on -figureId=test2; +changeFigure:3/open_mouth.png -right -next -id=test3 -animationFlag=on -eyesOpen=3/open_eyes.png -eyesClose=3/closed_eyes.png -mouthOpen=3/open_mouth.png -mouthHalfOpen=3/halfopen_mouth.png -mouthClose=3/closed_mouth.png; +WebGAL3:この機能のおかげで、ウェブサイト上に公開すると、プレイヤーはリンクを押すだけで -005_小夜SAYO(ノーマル)_この機能のおかげで….wav -fontSize=default -id -figureId=test3; +いつでも、どこでも、ウェブサイト上でゲームをプレイすることができます! -006_小夜SAYO(ノーマル)_いつでも、どこでも….wav -fontSize=default -id -figureId=test3; +changeFigure: -id=test1; +changeFigure: -id=test2; +changeFigure: -id=test3; +choose:简体中文:demo_zh_cn.txt|日本語:demo_ja.txt|English:demo_en.txt; diff --git a/packages/webgal/public/game/scene/demo_changeConfig.txt b/packages/webgal/public/game/scene/demo_changeConfig.txt new file mode 100644 index 000000000..8666897a8 --- /dev/null +++ b/packages/webgal/public/game/scene/demo_changeConfig.txt @@ -0,0 +1,15 @@ +webgal:我会修改标题 -hold; +setVar:Game_name=WebGal_Change -global; +webgal:游戏标题已经被我修改为{Game_name} -hold; +webgal:我会修改游戏背景 -hold; +setVar:Title_img=bg.png -global; +webgal:游戏背景已经被我修改为{Title_img} -hold; +webgal:获取Debug值:{Debug} -hold; +setVar:GameNum=15 -global; +webgal:获取并修改GameNum的值:{GameNum} -hold; +setVar:GameNum_Double=GameNum_Double + 5; +webgal:获取GameNum_Double的值,但我不会修改它原本的值:{GameNum_Double} -hold; +webgal:获取bgm声音:{$stage.bgm.volume} -hold; +setVar:bgm_calc= $stage.bgm.volume * 2 ; +webgal:获取bgm声音的两倍是{bgm_calc} -hold; +end; diff --git a/packages/webgal/public/game/scene/demo_en.txt b/packages/webgal/public/game/scene/demo_en.txt new file mode 100644 index 000000000..55c8918a8 --- /dev/null +++ b/packages/webgal/public/game/scene/demo_en.txt @@ -0,0 +1,52 @@ +bgm:s_Title.mp3 -volume=80 -enter=3000; +unlockBgm:s_Title.mp3 -name=welcome; +intro:*Getting started| The image materials used in this demo game are AI-generated images; +intro:*Credit| Created By ondoku3.com; +changeBg:bg.png -next; +unlockCg:bg.png -name=良い夜; +changeFigure:stand.png -left -enter=enter-from-left -next; +miniAvatar:miniavatar.png; +WebGAL:Hello -e001_Hello.mp3; +Welcome to WebGAL! -e002_Welcome_to_WebGAL.mp3; +WebGAL is a completely new web visual engine never seen before. -e003_WebGAL_is_a_completely_new_web.mp3; +changeFigure:stand2.png -right -next; +It is an engine developed using web technology, so it performs well on web pages. -e004_It_is_an_engine_developedusing_web.mp3; +Thanks to this feature, once published on your website's platform,|players can simply click a link to play your game on your website anytime, anywhere! -e005_Thanks_to_this_ feature_once.mp3; +setAnimation:move-front-and-back -target=fig-left -next; +Very attractive, don't you think? -e006_Very attractive.mp3; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +In addition, WebGAL allows you to add animations and special effects to create high quality games. -e007_In_addition_ WebGAL_allows you.mp3; +pixiInit; +pixiPerform:snow; +For example, let's make it snow as a special effect. -e008_For_example_let's_make.mp3; +As you can see, WebGAL has attractive features. |Try it out and experience it. -e009_As_you_can see_WebGAL.mp3; +That's all for the feature introduction. -e010_That's_all_for_the_feature introduction.mp3; +Next,I will introduce the history and trivia of WebGAL. -e011_Next_I_will introduce_the_ history.mp3; +pixiInit; +choose:WebGAL History:choose1|WebGAL Trivia:choose2; +;選択1 +label:choose1; +WebGAL was developed to make it easier for more people to create their own visual novel games. -e012_WebGAL _was_developed to_make_it_ easier.mp3; +Initially, WebGAL had very few features, supporting only standing and background image display, audio playback, and choices. -e013_Initially_ WebGAL_had_very_few_features.mp3; +After a long development period, it has now been reborn as an engine with many excellent functions. -e014_After_a_long _development period.mp3; +Additionally, the release of the WebGAL editor makes creating and outputting games simpler and easier. -e015_Additionally,_the release_of_the WebGAL_editor.mp3; +jumpLabel:end; +;選択2 +label:choose2; +The WebGAL project has reached 1000 stars on GitHub in just under a year! -e016_The_WebGAL project_has reached_1000.mp3; +The development process of WebGAL is a process of learning development while developing. -e017_The_development process_of WebGAL_is_a process.mp3; +WebGAL's scripting language was designed from the ground up to simplify production difficulty! -e018_WebGAL's _scripting language_was designed_from the_ground.mp3; +;エンド +label:end; +;changeFigure:none -left -next; +;changeFigure:stand.png -next; +The WebGAL project supports many keyboard shortcuts and the ability to go back to scenes to more closely match the functionality of a visual novel game engine for the desktop. -e019_The_WebGAL_project_supports_many_keyboard shortcuts.mp3; +Try pressing the "Backlog" button on the menu or scrolling the mouse wheel up! -e020_Try_pressing the_Backlog button.mp3; +Features like quick save, quick load, auto mode and skip mode are also supported. -e021_Features_like_quick_save_quick_load.mp3; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +For developers who are developing games for the first time, we provide beautiful general-purpose UI and rich preset functions and animations. -e022_For developers_who_ are_developing_ games.mp3; +So you can start making games quickly. -e023_So_you_can_ start_making_ games_quickly.mp3; +We hope that your work will be exhibited at WebGAL. -e024_We_hope_ that_your_work.mp3; +Thank you for your interest in the WebGAL project! -e025_Thank_you_ for_your_interest_in_the_WebGAL_project!.mp3; +end; diff --git a/packages/webgal/public/game/scene/demo_escape.txt b/packages/webgal/public/game/scene/demo_escape.txt new file mode 100644 index 000000000..f0f4cd023 --- /dev/null +++ b/packages/webgal/public/game/scene/demo_escape.txt @@ -0,0 +1,3 @@ +intro:我会显示出来:\:\,\.\;不信你看看 -hold; +WebGal:我会显示出来:\:\,\.\;不信你看看; +choose:我会显示出来:\:\,\.\;不信你看看; diff --git a/packages/webgal/public/game/scene/demo_ja.txt b/packages/webgal/public/game/scene/demo_ja.txt new file mode 100644 index 000000000..6cf5aad05 --- /dev/null +++ b/packages/webgal/public/game/scene/demo_ja.txt @@ -0,0 +1,64 @@ +bgm:s_Title.mp3 -volume=80 -enter=3000; +unlockBgm:s_Title.mp3 -name=ようこそ; +intro:■初めに| このデモゲームで使用している画像素材は、AI生成画像です; +intro:■クレジット| 「VOICEVOX:小夜/SAYO」; +changeBg:bg.png -next; +unlockCg:bg.png -name=良い夜; // CGのロックを解いて、名前をつけます。 +changeFigure:stand.png -left -enter=enter-from-left -next; +miniAvatar:miniavatar.png; +WebGAL:こんにちは。 -001_小夜SAYO(ノーマル)_こんにちは。.wav; +WebGALへようこそ! -002_小夜SAYO(ノーマル)_ウェブギャルへよう….wav; +WebGALは、かつてないまったく新しいビジュアルノベルエンジンです。 -003_小夜SAYO(ノーマル)_ウェブギャルは、か….wav; +changeFigure:stand2.png -right -next; +Web技術を使用して開発されたエンジンであるため、ウェブページで優れたパフォーマンスを発揮します。 -004_小夜SAYO(ノーマル)_Web技術を使用し….wav; +この機能のおかげで、ウェブサイト上に公開すると、プレイヤーはリンクを押すだけで、 -005_小夜SAYO(ノーマル)_この機能のおかげで….wav; +いつでも、どこでも、ウェブサイト上でゲームをプレイすることができます! -006_小夜SAYO(ノーマル)_いつでも、どこでも….wav; +setAnimation:move-front-and-back -target=fig-left -next; +とっても、魅力的ではありませんか? -007_小夜SAYO(ノーマル)_とっても、魅力的で….wav; +changeFigure:none -right -next; +setAnimation:l2c -target=fig-left -next; +さらに、WebGALでは、アニメーションや特殊効果を追加することができ、クオリティの高いゲームを作成することができます。 -008_小夜SAYO(ノーマル)_さらに、ウェブギャ….wav; +pixiInit; +pixiPerform:snow; +例えば、特殊効果として、雪を降らせてみます。 -009_小夜SAYO(ノーマル)_例えば、特殊効果と….wav; +こんな感じに、WebGALには、魅力的な機能があります。| ぜひ、使ってみて体験してみてください。 -010_小夜SAYO(ノーマル)_こんな感じに、ウェ….wav; +機能の紹介は以上です。 -011_小夜SAYO(ノーマル)_機能の紹介は以上で….wav; +次に、WebGALの歴史と豆知識について紹介します。 -012_小夜SAYO(ノーマル)_次に、ウェブギャル….wav; +興味があれば、引き続きお聞きください。 -013_小夜SAYO(ノーマル)_興味があれば、引き….wav; +pixiInit; +choose:WebGAL 歴史:choose1|WebGAL 豆知識:choose2; + +;選択1 +label:choose1; +WebGALは、より多くの人が自分のビジュアルノベルゲームを簡単に作成できるようにと、開発されました。 -014_小夜SAYO(ノーマル)_ウェブギャルは、よ….wav; +当初のWebGALには、機能がほとんどなく、立ち絵と背景画像の表示、音声再生、選択肢の選択機能のみをサポートしていました。 -015_小夜SAYO(ノーマル)_当初のウェブギャル….wav; +長きにわたる開発期間を経て、今では多くの優れた機能があるエンジンとして、生まれ変わりました。 -016_小夜SAYO(ノーマル)_長きにわたる開発期….wav; +さらに、WebGALエディターのリリースにより、ゲームの作成と出力がよりシンプルかつ容易になりました。 -017_小夜SAYO(ノーマル)_さらに、ウェブギャ….wav; +jumpLabel:end; + +;選択2 +label:choose2; +WebGALプロジェクトは、わずか1年足らずでGitHubで1000スターを獲得しました! -019_小夜SAYO(ノーマル)_ウェブギャルプロジ….wav; +WebGALの開発過程は、開発しながら開発を学ぶプロセスです。 -020_小夜SAYO(ノーマル)_ウェブギャルの開発….wav; +そのため、彼女は3回のリファクタリングを経験し、毎回ほぼゼロからやり直す形となりました。 -021_小夜SAYO(ノーマル)_そのため、彼女は3….wav; +WebGALのスクリプト言語は、制作の難易度を簡素化するためにゼロから設計されました! -022_小夜SAYO(ノーマル)_ウェブギャルのスク….wav; +; +;l2d +;label:l2d; +;changeFigure:hiyori/hiyori_pro_t11.model3.json -left -motion=Idle -next; +;WebGALプロジェクトでは、現在Live2Dの実験的なサポートも始まっています!これからは正式な機能として成長する可能性もあります! -023_小夜SAYO(ノーマル)_ウェブギャルプロジ….wav +; +;エンド +label:end; +;changeFigure:none -left -next; +;changeFigure:stand.png -next; +WebGALプロジェクトは、デスクトップ向けのビジュアルノベルゲームエンジンの機能により近づくため、多くのショートカットキーとシーンの戻る機能をサポートしています。 -024_小夜SAYO(ノーマル)_ウェブギャルプロジ….wav; +メニューの「LOG」ボタンを押すか、マウスホイールを上にスクロールしてみてください! -025_小夜SAYO(ノーマル)_メニューのログボタ….wav; +豊富な設定、クイックセーブ、クイックロード、自動モード、スキップモードなどの機能もサポートされています。 -026_小夜SAYO(ノーマル)_豊富な設定、クイッ….wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +初めてゲームを開発する開発者のために、美しい汎用UIと豊富なプリセット機能やアニメーションを提供しています。 -028_小夜SAYO(ノーマル)_初めてゲームを開発….wav +ですから、心配せずに素早くゲーム制作を始めることができます。 -029_小夜SAYO(ノーマル)_ですから、心配せず….wav; +WebGALプロジェクトチームは、あなたの作品がWebGALで展示されることを期待しています! -030_小夜SAYO(ノーマル)_ウェブギャルプロジ….wav +リンクを1つ用意するだけで、無数のユーザーがあなたの作品をすぐに楽しめるようになります。 -031_小夜SAYO(ノーマル)_リンクを1つ用意す….wav; +WebGALプロジェクトへのご注目、ありがとうございます! -032_小夜SAYO(ノーマル)_ウェブギャルプロジ….wav; +end; diff --git a/packages/webgal/public/game/scene/demo_var.txt b/packages/webgal/public/game/scene/demo_var.txt new file mode 100644 index 000000000..9b31b80f5 --- /dev/null +++ b/packages/webgal/public/game/scene/demo_var.txt @@ -0,0 +1,11 @@ +setVar:bg=bg.png; +changeBg:{bg} -next; +setVar:speaker=WebGAL; +{speaker}:Background now is {bg}.; +{speaker}:\{bg\} is not use interpolation.; +setVar:a=3; +setVar:bg=WebGalEnter.png -when=a>2; +changeBg:{bg} -next; +setVar:func=variable interpolation; +{speaker}:Bg changed! Welcome to {speaker} {func}!; +end; diff --git a/packages/webgal/public/game/scene/demo_zh_cn.txt b/packages/webgal/public/game/scene/demo_zh_cn.txt new file mode 100644 index 000000000..c6230e31b --- /dev/null +++ b/packages/webgal/public/game/scene/demo_zh_cn.txt @@ -0,0 +1,74 @@ +bgm:s_Title.mp3 -volume=80 -enter=3000; +unlockBgm:s_Title.mp3 -name=雲を追いかけて; +intro:你好|欢迎来到 {egine} 的世界; +changeBg:WebGalEnter.png -next; +setTransition: -target=bg-main -exit=shockwaveOut; +:你好|欢迎来到 {egine} 的世界; +changeBg:bg.png -next; +setTransition: -target=bg-main -enter=shockwaveIn -next; +unlockCg:bg.png -name=良い夜; // 解锁CG并赋予名称 +changeFigure:stand.png -left -enter=enter-from-left -next; +miniAvatar:miniavatar.png; +{heroine}:欢迎使用 {egine}!这是一款全新的网页端视觉小说引擎。 -v1.wav; +changeFigure:stand2.png -right -next; +{egine} 是使用 Web 技术开发的引擎,因此在网页端有良好的表现。 -v2.wav; +由于这个特性,如果你将 {egine} 部署到服务器或网页托管平台上,玩家只需要一串链接就可以开始游玩! -v3.wav; +setAnimation:move-front-and-back -target=fig-left -continue; +听起来是不是非常吸引人? -v4.wav; +changeFigure:none -right -next; +setTransform:{"position": {"x": 500,"y": 0}} -target=fig-left -next; +{egine} 引擎也具有动画系统和特效系统,使用 {egine} 开发的游戏可以拥有很好的表现效果。 -v5.wav; +pixiInit; +pixiPerform:snow; +比如,这个下起小雪的特效。 -v6.wav; +除此以外,分支选择的功能也必不可少。 -v7.wav; +pixiInit; +WebGAL:接下来介绍一些新版本功能! +WebGAL:比如这个[注](zhù)[音](yīn)功能,可以为游戏带来更好的体验! +WebGAL:我们也支持了[文本拓展语法](style=color:#B5495B\;),可以为[文](wen)[本](ben)带来[富文本支持](style-alltext=font-style:italic\; style=color:#66327C\;)、交互等特性。 +WebGAL:新版本添加了特性:获取用户输入,你要尝试一下吗? +choose:尝试一下:userInput|算了吧:toNextPart; + +label:userInput; +getUserInput:name -title=如何称呼你 -buttonText=确认; +WebGAL:很高兴遇见你,{name}! +jumpLabel:toNextPart; + +label:toNextPart; +你可以通过以下两个分支了解 {egine} 的更多故事。 -v8.wav; +choose:{egine} 发展历程:choose1|{egine} 冷知识:choose2; + +;分支1 +label:choose1; +{egine} 的开发初衷是能够让更多人可以更方便地制作属于自己的视觉小说。 -v9.wav; +在一开始,{egine} 只具备很少的功能,仅仅能支持立绘和背景的显示、语音播放和分支选择。 -v10.wav; +setAnimation:move-front-and-back -target=fig-left -next; +在经历一年的发展后,现在已经是支持了很多优秀的表现效果的引擎了! -v11.wav; +除此以外,{egine} 编辑器的加入也使得制作和导出一个游戏更加方便快捷。 -v12.wav; +jumpLabel:end; + +;分支2 +label:choose2; +这个演示游戏使用的素材是 AI 生成的。 -v13.wav; +{egine} 项目只用了一年不到就在 GitHub 获得了 1000 星标! -v14.wav; +{egine} 的开发历程,是一个在开发中学习开发的过程。因此她经历了3次重构,并且每次几乎都是推倒重来式的。 -v15.wav; +{egine} 的脚本语言是为了简化制作难度而全新设计的! -v16.wav; +; +;l2d +;label:l2d; +;changeFigure:hiyori/hiyori_pro_t11.model3.json -left -motion=Idle -next; +;{egine} 项目现在也开始尝试实验性支持 live2D!今后可能会成为一个正式功能! +; +;结束分支 +label:end; +;changeFigure:none -left -next; +;changeFigure:stand.png -next; +为了更接近桌面端视觉小说引擎的能力,我们支持很多快捷键以及可跳转的剧情回溯。 -v17.wav; +按下菜单中的“回想”按钮或者向上滚动鼠标滚轮试试吧! -v18.wav; +快速存读挡、丰富的选项、自动播放以及快进等功能,也是应有尽有。 -v19.wav; +setTempAnimation:[{"position": {"x": 500,"y": 0},"duration": 0},{"position": {"x": 400,"y": 0},"duration": 250},{"position": {"x": 600,"y": 0},"duration": 500},{"position": {"x": 500,"y": 0},"duration": 250}] -target=fig-left -next; +当然,这不算什么,因为大多数成熟的引擎都有这些功能。但是在 Web 端,这却是很少见的。 -v20.wav; +我们为可能初次开发游戏的开发者提供了美观的通用 UI 和丰富的预设功能与动画。所以你可以没有顾虑地快速开始制作游戏。 -v21.wav; +{egine} 项目组期待你的作品能够在 {egine} 上呈现!只需要一个链接就可以让万千用户立刻开始享受你的作品。 -v22.wav; +感谢你关注 {egine} 项目! -v23.wav; +end; diff --git a/packages/webgal/public/game/scene/function_test.txt b/packages/webgal/public/game/scene/function_test.txt new file mode 100644 index 000000000..8514bd9d0 --- /dev/null +++ b/packages/webgal/public/game/scene/function_test.txt @@ -0,0 +1 @@ +choose:Lip Sync Animation Test:demo_animation.txt | Variable interpolation test:demo_var.txt | Change Config:demo_changeConfig.txt; diff --git a/packages/webgal/public/game/scene/start.txt b/packages/webgal/public/game/scene/start.txt new file mode 100644 index 000000000..1e072c7c3 --- /dev/null +++ b/packages/webgal/public/game/scene/start.txt @@ -0,0 +1,3 @@ +setVar:heroine=WebGAL; +setVar:egine=WebGAL; +choose:简体中文:demo_zh_cn.txt|日本語:demo_ja.txt|English:demo_en.txt|Test:function_test.txt; diff --git a/packages/webgal/public/game/template/Stage/Choose/choose.scss b/packages/webgal/public/game/template/Stage/Choose/choose.scss new file mode 100644 index 000000000..4040078bc --- /dev/null +++ b/packages/webgal/public/game/template/Stage/Choose/choose.scss @@ -0,0 +1,54 @@ +.Choose_Main { + position: absolute; + width: 100%; + height: 100%; + display: flex; + flex-flow: column; + justify-content: center; + align-items: center; + z-index: 13; + background: rgba(0, 0, 0, 0.05); +} + +.Choose_item { + font-family: "WebgalUI", serif; + cursor: pointer; + min-width: 50%; + padding: 0.25em 1em 0.25em 1em; + font-size: 265%; + color: #8E354A; + text-align: center; + border-radius: 4px; + border: 3px solid rgba(0, 0, 0, 0); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.25); + background: rgba(255, 255, 255, 0.65); + margin: 0.25em 0 0.25em 0; + transition: background-color 0.5s, border 0.5s, font-weight 0.5s, box-shadow 0.5s; + + &:hover { + background: rgba(255, 255, 255, 0.9); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.35); + border: 3px solid #8E354A; + } +} + +.Choose_item_disabled { + font-family: "WebgalUI", serif; + cursor: not-allowed; + min-width: 50%; + padding: 0.25em 1em 0.25em 1em; + font-size: 265%; + color: rgba(142, 53, 74, 0.5); + text-align: center; + border-radius: 4px; + border: 3px solid rgba(0, 0, 0, 0); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.25); + background: rgba(255, 255, 255, 0.5); + margin: 0.25em 0 0.25em 0; + transition: background-color 0.5s, border 0.5s, font-weight 0.5s, box-shadow 0.5s; +} + +.Choose_item_outer { + color: #000; + min-width: 50%; +} diff --git a/packages/webgal/public/game/template/Stage/TextBox/textbox.scss b/packages/webgal/public/game/template/Stage/TextBox/textbox.scss new file mode 100644 index 000000000..23120e12d --- /dev/null +++ b/packages/webgal/public/game/template/Stage/TextBox/textbox.scss @@ -0,0 +1,155 @@ +.TextBox_main { + z-index: 3; + position: absolute; + right: 25px; + min-height: 330px; + max-height: 330px; + background-blend-mode: darken; + border-radius: 165px 20px 20px 165px; + bottom: 20px; + left: 275px; + font-weight: bold; + color: white; + padding: 1em 50px 70px 200px; + box-sizing: border-box; + display: flex; + flex-flow: column; + align-items: flex-start; + letter-spacing: 0.2em; + transition: left 0.33s; +} + +.TextBox_main_miniavatarOff { + left: 25px; +} + +.TextBox_Background { + z-index: 2; + background: linear-gradient(rgba(245, 247, 250, 1) 0%, rgba(189, 198, 222, 1) 100%); +} + +@keyframes showSoftly { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.TextBox_textElement_start { + position: relative; + animation: TextDelayShow 1000ms ease-out forwards; + opacity: 0; +} + +.outer { + position: absolute; + white-space: nowrap; + left: 0; + top: 0; + background-image: linear-gradient(#0B346E 0%, #141423 100%); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + z-index: 2; +} + +.inner { + white-space: nowrap; + position: absolute; + left: 0; + top: 0; + -webkit-text-stroke: 0.1em rgba(255, 255, 255, 1); + z-index: 1; +} + +.zhanwei { + color: transparent; + white-space: nowrap; +} + + +.TextBox_textElement_Settled { + position: relative; + opacity: 1; +} + + +.TextBox_showName { + font-size: 85%; + padding: 0 2em 0 2em; + position: absolute; + left: 150px; + top: -68px; + height: 80px; + line-height: 68px; + border-radius: 40px; + z-index: 3; + border: 4px solid rgba(255, 255, 255, 0); +} + +.TextBox_ShowName_Background { + z-index: 2; + background: rgba(11, 52, 110, 1); + border: 4px solid rgba(255, 255, 255, 0.75); + box-shadow: 3px 3px 10px rgba(100, 100, 100, 0.5); +} + +@keyframes TextDelayShow { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.miniAvatarContainer { + position: absolute; + height: 450px; + width: 450px; + bottom: 0; + left: -250px; + border-radius: 100% 0 0 100%; + overflow: hidden; +} + +.miniAvatarImg { + max-height: 100%; + max-width: 100%; + position: absolute; + bottom: 0; + filter: drop-shadow(15px 0 3px rgba(0, 0, 0, 0.5)); +} + +.nameContainer { + position: absolute; + left: 2em; + top: -3.5em; +} + +.outerName { + position: absolute; + left: 0; + top: 0; + background: linear-gradient(150deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 35%, rgb(165, 212, 228) 100%); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + z-index: 2; +} + +.innerName { + position: absolute; + left: 0; + top: 0; + z-index: 1; +} + +.text { + line-height: 1.9em; + overflow: hidden; +} diff --git a/packages/webgal/public/game/template/UI/Title/title.scss b/packages/webgal/public/game/template/UI/Title/title.scss new file mode 100644 index 000000000..48073c96b --- /dev/null +++ b/packages/webgal/public/game/template/UI/Title/title.scss @@ -0,0 +1,58 @@ +.Title_main { + width: 100%; + height: 100%; + position: absolute; + z-index: 13; +} + +.Title_buttonList { + font-family: "思源宋体", serif; + display: flex; + position: absolute; + left: 0; + min-width: 25%; + height: 100%; + justify-content: center; + align-items: flex-start; + flex-flow: column; + transition: background 0.75s; + padding-left: 120px; +} + +.Title_button { + font-weight: bold; + text-align: center; + flex: 0 1 auto; + cursor: pointer; + padding: 1em 2em 1em 2em; + margin: 20px 0; + transition: all 0.33s; + background: rgba(255, 255, 255, 0.15); + backdrop-filter: blur(5px); + border-radius: 4px; + transform: skewX(-10deg); + background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)); + + &:hover { + text-shadow: 0 0 10px rgba(255, 255, 255, 1); + padding: 1em 6em 1em 3em; + } +} + +.Title_button_text { + color: transparent; + background: linear-gradient(135deg, #fdfbfb 0%, #dcddde 100%); + -webkit-background-clip: text; + padding: 0 0.5em 0 0.5em; + font-size: 200%; + font-family: WebgalUI, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; + letter-spacing: 0.15em; +} + +.Title_backup_background { + width: 100%; + height: 100%; + position: absolute; + z-index: 13; + background: linear-gradient(135deg, #fdfbfb 0%, #dcddde 100%); +} diff --git a/packages/webgal/public/game/template/template.json b/packages/webgal/public/game/template/template.json new file mode 100644 index 000000000..3194a3688 --- /dev/null +++ b/packages/webgal/public/game/template/template.json @@ -0,0 +1,4 @@ +{ + "name":"Default Template", + "webgal-version":"4.5.9" +} diff --git a/packages/webgal/public/game/tex/cherryBlossoms.png b/packages/webgal/public/game/tex/cherryBlossoms.png new file mode 100644 index 000000000..28b4bc013 Binary files /dev/null and b/packages/webgal/public/game/tex/cherryBlossoms.png differ diff --git a/packages/webgal/public/game/tex/raindrop.png b/packages/webgal/public/game/tex/raindrop.png new file mode 100644 index 000000000..4e1b8cd12 Binary files /dev/null and b/packages/webgal/public/game/tex/raindrop.png differ diff --git a/packages/webgal/public/game/tex/snowFlake_min.png b/packages/webgal/public/game/tex/snowFlake_min.png new file mode 100644 index 000000000..181856280 Binary files /dev/null and b/packages/webgal/public/game/tex/snowFlake_min.png differ diff --git a/packages/webgal/public/game/userStyleSheet.css b/packages/webgal/public/game/userStyleSheet.css new file mode 100644 index 000000000..e69de29bb diff --git "a/packages/webgal/public/game/vocal/001_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257\343\200\202.wav" "b/packages/webgal/public/game/vocal/001_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257\343\200\202.wav" new file mode 100644 index 000000000..a08d8d5e4 Binary files /dev/null and "b/packages/webgal/public/game/vocal/001_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\202\223\343\201\253\343\201\241\343\201\257\343\200\202.wav" differ diff --git "a/packages/webgal/public/game/vocal/002_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\270\343\202\210\343\201\206\342\200\246.wav" "b/packages/webgal/public/game/vocal/002_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\270\343\202\210\343\201\206\342\200\246.wav" new file mode 100644 index 000000000..176bf13df Binary files /dev/null and "b/packages/webgal/public/game/vocal/002_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\270\343\202\210\343\201\206\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/003_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\257\343\200\201\343\201\213\342\200\246.wav" "b/packages/webgal/public/game/vocal/003_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\257\343\200\201\343\201\213\342\200\246.wav" new file mode 100644 index 000000000..48d85ce7b Binary files /dev/null and "b/packages/webgal/public/game/vocal/003_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\257\343\200\201\343\201\213\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/004_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_Web\346\212\200\350\241\223\343\202\222\344\275\277\347\224\250\343\201\227\342\200\246.wav" "b/packages/webgal/public/game/vocal/004_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_Web\346\212\200\350\241\223\343\202\222\344\275\277\347\224\250\343\201\227\342\200\246.wav" new file mode 100644 index 000000000..2237bfd78 Binary files /dev/null and "b/packages/webgal/public/game/vocal/004_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_Web\346\212\200\350\241\223\343\202\222\344\275\277\347\224\250\343\201\227\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/005_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\201\256\346\251\237\350\203\275\343\201\256\343\201\212\343\201\213\343\201\222\343\201\247\342\200\246.wav" "b/packages/webgal/public/game/vocal/005_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\201\256\346\251\237\350\203\275\343\201\256\343\201\212\343\201\213\343\201\222\343\201\247\342\200\246.wav" new file mode 100644 index 000000000..2d83864d0 Binary files /dev/null and "b/packages/webgal/public/game/vocal/005_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\201\256\346\251\237\350\203\275\343\201\256\343\201\212\343\201\213\343\201\222\343\201\247\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/006_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\204\343\201\244\343\201\247\343\202\202\343\200\201\343\201\251\343\201\223\343\201\247\343\202\202\342\200\246.wav" "b/packages/webgal/public/game/vocal/006_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\204\343\201\244\343\201\247\343\202\202\343\200\201\343\201\251\343\201\223\343\201\247\343\202\202\342\200\246.wav" new file mode 100644 index 000000000..91bedcf59 Binary files /dev/null and "b/packages/webgal/public/game/vocal/006_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\204\343\201\244\343\201\247\343\202\202\343\200\201\343\201\251\343\201\223\343\201\247\343\202\202\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/007_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\250\343\201\243\343\201\246\343\202\202\343\200\201\351\255\205\345\212\233\347\232\204\343\201\247\342\200\246.wav" "b/packages/webgal/public/game/vocal/007_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\250\343\201\243\343\201\246\343\202\202\343\200\201\351\255\205\345\212\233\347\232\204\343\201\247\342\200\246.wav" new file mode 100644 index 000000000..96e203ca6 Binary files /dev/null and "b/packages/webgal/public/game/vocal/007_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\250\343\201\243\343\201\246\343\202\202\343\200\201\351\255\205\345\212\233\347\232\204\343\201\247\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/008_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\225\343\202\211\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\342\200\246.wav" "b/packages/webgal/public/game/vocal/008_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\225\343\202\211\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\342\200\246.wav" new file mode 100644 index 000000000..b088ccb31 Binary files /dev/null and "b/packages/webgal/public/game/vocal/008_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\225\343\202\211\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/009_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\344\276\213\343\201\210\343\201\260\343\200\201\347\211\271\346\256\212\345\212\271\346\236\234\343\201\250\342\200\246.wav" "b/packages/webgal/public/game/vocal/009_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\344\276\213\343\201\210\343\201\260\343\200\201\347\211\271\346\256\212\345\212\271\346\236\234\343\201\250\342\200\246.wav" new file mode 100644 index 000000000..9ba368ea0 Binary files /dev/null and "b/packages/webgal/public/game/vocal/009_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\344\276\213\343\201\210\343\201\260\343\200\201\347\211\271\346\256\212\345\212\271\346\236\234\343\201\250\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/010_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\202\223\343\201\252\346\204\237\343\201\230\343\201\253\343\200\201\343\202\246\343\202\247\342\200\246.wav" "b/packages/webgal/public/game/vocal/010_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\202\223\343\201\252\346\204\237\343\201\230\343\201\253\343\200\201\343\202\246\343\202\247\342\200\246.wav" new file mode 100644 index 000000000..c988c6185 Binary files /dev/null and "b/packages/webgal/public/game/vocal/010_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\202\223\343\201\252\346\204\237\343\201\230\343\201\253\343\200\201\343\202\246\343\202\247\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/011_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\346\251\237\350\203\275\343\201\256\347\264\271\344\273\213\343\201\257\344\273\245\344\270\212\343\201\247\342\200\246.wav" "b/packages/webgal/public/game/vocal/011_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\346\251\237\350\203\275\343\201\256\347\264\271\344\273\213\343\201\257\344\273\245\344\270\212\343\201\247\342\200\246.wav" new file mode 100644 index 000000000..fe424d398 Binary files /dev/null and "b/packages/webgal/public/game/vocal/011_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\346\251\237\350\203\275\343\201\256\347\264\271\344\273\213\343\201\257\344\273\245\344\270\212\343\201\247\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/012_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\346\254\241\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\342\200\246.wav" "b/packages/webgal/public/game/vocal/012_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\346\254\241\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\342\200\246.wav" new file mode 100644 index 000000000..6242cebea Binary files /dev/null and "b/packages/webgal/public/game/vocal/012_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\346\254\241\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/013_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\350\210\210\345\221\263\343\201\214\343\201\202\343\202\214\343\201\260\343\200\201\345\274\225\343\201\215\342\200\246.wav" "b/packages/webgal/public/game/vocal/013_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\350\210\210\345\221\263\343\201\214\343\201\202\343\202\214\343\201\260\343\200\201\345\274\225\343\201\215\342\200\246.wav" new file mode 100644 index 000000000..2914606cf Binary files /dev/null and "b/packages/webgal/public/game/vocal/013_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\350\210\210\345\221\263\343\201\214\343\201\202\343\202\214\343\201\260\343\200\201\345\274\225\343\201\215\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/014_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\257\343\200\201\343\202\210\342\200\246.wav" "b/packages/webgal/public/game/vocal/014_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\257\343\200\201\343\202\210\342\200\246.wav" new file mode 100644 index 000000000..76693e53e Binary files /dev/null and "b/packages/webgal/public/game/vocal/014_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\257\343\200\201\343\202\210\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/015_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\345\275\223\345\210\235\343\201\256\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\342\200\246.wav" "b/packages/webgal/public/game/vocal/015_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\345\275\223\345\210\235\343\201\256\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\342\200\246.wav" new file mode 100644 index 000000000..a6f0ecef2 Binary files /dev/null and "b/packages/webgal/public/game/vocal/015_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\345\275\223\345\210\235\343\201\256\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/016_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\351\225\267\343\201\215\343\201\253\343\202\217\343\201\237\343\202\213\351\226\213\347\231\272\346\234\237\342\200\246.wav" "b/packages/webgal/public/game/vocal/016_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\351\225\267\343\201\215\343\201\253\343\202\217\343\201\237\343\202\213\351\226\213\347\231\272\346\234\237\342\200\246.wav" new file mode 100644 index 000000000..5664b1537 Binary files /dev/null and "b/packages/webgal/public/game/vocal/016_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\351\225\267\343\201\215\343\201\253\343\202\217\343\201\237\343\202\213\351\226\213\347\231\272\346\234\237\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/017_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\225\343\202\211\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\342\200\246.wav" "b/packages/webgal/public/game/vocal/017_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\225\343\202\211\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\342\200\246.wav" new file mode 100644 index 000000000..a7bb23cb0 Binary files /dev/null and "b/packages/webgal/public/game/vocal/017_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\225\343\202\211\343\201\253\343\200\201\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/018_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\201\256\343\203\207\343\203\242\343\202\262\343\203\274\343\203\240\343\201\247\344\275\277\342\200\246.wav" "b/packages/webgal/public/game/vocal/018_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\201\256\343\203\207\343\203\242\343\202\262\343\203\274\343\203\240\343\201\247\344\275\277\342\200\246.wav" new file mode 100644 index 000000000..bea68b70f Binary files /dev/null and "b/packages/webgal/public/game/vocal/018_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\223\343\201\256\343\203\207\343\203\242\343\202\262\343\203\274\343\203\240\343\201\247\344\275\277\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/019_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" "b/packages/webgal/public/game/vocal/019_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" new file mode 100644 index 000000000..3ef6703a9 Binary files /dev/null and "b/packages/webgal/public/game/vocal/019_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/020_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\256\351\226\213\347\231\272\342\200\246.wav" "b/packages/webgal/public/game/vocal/020_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\256\351\226\213\347\231\272\342\200\246.wav" new file mode 100644 index 000000000..78fd5fadf Binary files /dev/null and "b/packages/webgal/public/game/vocal/020_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\256\351\226\213\347\231\272\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/021_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\235\343\201\256\343\201\237\343\202\201\343\200\201\345\275\274\345\245\263\343\201\2573\342\200\246.wav" "b/packages/webgal/public/game/vocal/021_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\235\343\201\256\343\201\237\343\202\201\343\200\201\345\275\274\345\245\263\343\201\2573\342\200\246.wav" new file mode 100644 index 000000000..d461d9f08 Binary files /dev/null and "b/packages/webgal/public/game/vocal/021_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\235\343\201\256\343\201\237\343\202\201\343\200\201\345\275\274\345\245\263\343\201\2573\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/022_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\256\343\202\271\343\202\257\342\200\246.wav" "b/packages/webgal/public/game/vocal/022_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\256\343\202\271\343\202\257\342\200\246.wav" new file mode 100644 index 000000000..4bd6a77f3 Binary files /dev/null and "b/packages/webgal/public/game/vocal/022_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\201\256\343\202\271\343\202\257\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/023_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" "b/packages/webgal/public/game/vocal/023_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" new file mode 100644 index 000000000..db603e9fc Binary files /dev/null and "b/packages/webgal/public/game/vocal/023_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/024_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" "b/packages/webgal/public/game/vocal/024_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" new file mode 100644 index 000000000..ced32290a Binary files /dev/null and "b/packages/webgal/public/game/vocal/024_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/025_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\203\241\343\203\213\343\203\245\343\203\274\343\201\256\343\203\255\343\202\260\343\203\234\343\202\277\342\200\246.wav" "b/packages/webgal/public/game/vocal/025_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\203\241\343\203\213\343\203\245\343\203\274\343\201\256\343\203\255\343\202\260\343\203\234\343\202\277\342\200\246.wav" new file mode 100644 index 000000000..bbc7e66a5 Binary files /dev/null and "b/packages/webgal/public/game/vocal/025_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\203\241\343\203\213\343\203\245\343\203\274\343\201\256\343\203\255\343\202\260\343\203\234\343\202\277\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/026_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\350\261\212\345\257\214\343\201\252\350\250\255\345\256\232\343\200\201\343\202\257\343\202\244\343\203\203\342\200\246.wav" "b/packages/webgal/public/game/vocal/026_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\350\261\212\345\257\214\343\201\252\350\250\255\345\256\232\343\200\201\343\202\257\343\202\244\343\203\203\342\200\246.wav" new file mode 100644 index 000000000..1021c800b Binary files /dev/null and "b/packages/webgal/public/game/vocal/026_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\350\261\212\345\257\214\343\201\252\350\250\255\345\256\232\343\200\201\343\202\257\343\202\244\343\203\203\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/027_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\202\343\201\241\343\202\215\343\202\223\343\200\201\343\201\223\343\202\214\343\202\211\343\201\256\342\200\246.wav" "b/packages/webgal/public/game/vocal/027_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\202\343\201\241\343\202\215\343\202\223\343\200\201\343\201\223\343\202\214\343\202\211\343\201\256\342\200\246.wav" new file mode 100644 index 000000000..14fbb4f80 Binary files /dev/null and "b/packages/webgal/public/game/vocal/027_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\202\343\201\241\343\202\215\343\202\223\343\200\201\343\201\223\343\202\214\343\202\211\343\201\256\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/028_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\345\210\235\343\202\201\343\201\246\343\202\262\343\203\274\343\203\240\343\202\222\351\226\213\347\231\272\342\200\246.wav" "b/packages/webgal/public/game/vocal/028_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\345\210\235\343\202\201\343\201\246\343\202\262\343\203\274\343\203\240\343\202\222\351\226\213\347\231\272\342\200\246.wav" new file mode 100644 index 000000000..4aab87f89 Binary files /dev/null and "b/packages/webgal/public/game/vocal/028_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\345\210\235\343\202\201\343\201\246\343\202\262\343\203\274\343\203\240\343\202\222\351\226\213\347\231\272\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/029_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\247\343\201\231\343\201\213\343\202\211\343\200\201\345\277\203\351\205\215\343\201\233\343\201\232\342\200\246.wav" "b/packages/webgal/public/game/vocal/029_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\247\343\201\231\343\201\213\343\202\211\343\200\201\345\277\203\351\205\215\343\201\233\343\201\232\342\200\246.wav" new file mode 100644 index 000000000..f97ca4d97 Binary files /dev/null and "b/packages/webgal/public/game/vocal/029_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\201\247\343\201\231\343\201\213\343\202\211\343\200\201\345\277\203\351\205\215\343\201\233\343\201\232\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/030_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" "b/packages/webgal/public/game/vocal/030_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" new file mode 100644 index 000000000..f21c3de6b Binary files /dev/null and "b/packages/webgal/public/game/vocal/030_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/031_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\203\252\343\203\263\343\202\257\343\202\2221\343\201\244\347\224\250\346\204\217\343\201\231\342\200\246.wav" "b/packages/webgal/public/game/vocal/031_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\203\252\343\203\263\343\202\257\343\202\2221\343\201\244\347\224\250\346\204\217\343\201\231\342\200\246.wav" new file mode 100644 index 000000000..f73b0cbff Binary files /dev/null and "b/packages/webgal/public/game/vocal/031_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\203\252\343\203\263\343\202\257\343\202\2221\343\201\244\347\224\250\346\204\217\343\201\231\342\200\246.wav" differ diff --git "a/packages/webgal/public/game/vocal/032_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" "b/packages/webgal/public/game/vocal/032_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" new file mode 100644 index 000000000..4993293b6 Binary files /dev/null and "b/packages/webgal/public/game/vocal/032_\345\260\217\345\244\234SAYO\357\274\210\343\203\216\343\203\274\343\203\236\343\203\253\357\274\211_\343\202\246\343\202\247\343\203\226\343\202\256\343\203\243\343\203\253\343\203\227\343\203\255\343\202\270\342\200\246.wav" differ diff --git a/packages/webgal/public/game/vocal/e001_Hello.mp3 b/packages/webgal/public/game/vocal/e001_Hello.mp3 new file mode 100644 index 000000000..7f2853032 Binary files /dev/null and b/packages/webgal/public/game/vocal/e001_Hello.mp3 differ diff --git a/packages/webgal/public/game/vocal/e002_Welcome_to_WebGAL.mp3 b/packages/webgal/public/game/vocal/e002_Welcome_to_WebGAL.mp3 new file mode 100644 index 000000000..12faadc62 Binary files /dev/null and b/packages/webgal/public/game/vocal/e002_Welcome_to_WebGAL.mp3 differ diff --git a/packages/webgal/public/game/vocal/e003_WebGAL_is_a_completely_new_web.mp3 b/packages/webgal/public/game/vocal/e003_WebGAL_is_a_completely_new_web.mp3 new file mode 100644 index 000000000..eba6c1824 Binary files /dev/null and b/packages/webgal/public/game/vocal/e003_WebGAL_is_a_completely_new_web.mp3 differ diff --git a/packages/webgal/public/game/vocal/e004_It_is_an_engine_developedusing_web.mp3 b/packages/webgal/public/game/vocal/e004_It_is_an_engine_developedusing_web.mp3 new file mode 100644 index 000000000..1690f360d Binary files /dev/null and b/packages/webgal/public/game/vocal/e004_It_is_an_engine_developedusing_web.mp3 differ diff --git a/packages/webgal/public/game/vocal/e005_Thanks_to_this_ feature_once.mp3 b/packages/webgal/public/game/vocal/e005_Thanks_to_this_ feature_once.mp3 new file mode 100644 index 000000000..dd9e9c4c0 Binary files /dev/null and b/packages/webgal/public/game/vocal/e005_Thanks_to_this_ feature_once.mp3 differ diff --git a/packages/webgal/public/game/vocal/e006_Very attractive.mp3 b/packages/webgal/public/game/vocal/e006_Very attractive.mp3 new file mode 100644 index 000000000..91a952686 Binary files /dev/null and b/packages/webgal/public/game/vocal/e006_Very attractive.mp3 differ diff --git a/packages/webgal/public/game/vocal/e007_In_addition_ WebGAL_allows you.mp3 b/packages/webgal/public/game/vocal/e007_In_addition_ WebGAL_allows you.mp3 new file mode 100644 index 000000000..49a5cdf6a Binary files /dev/null and b/packages/webgal/public/game/vocal/e007_In_addition_ WebGAL_allows you.mp3 differ diff --git a/packages/webgal/public/game/vocal/e008_For_example_let's_make.mp3 b/packages/webgal/public/game/vocal/e008_For_example_let's_make.mp3 new file mode 100644 index 000000000..e38d26be2 Binary files /dev/null and b/packages/webgal/public/game/vocal/e008_For_example_let's_make.mp3 differ diff --git a/packages/webgal/public/game/vocal/e009_As_you_can see_WebGAL.mp3 b/packages/webgal/public/game/vocal/e009_As_you_can see_WebGAL.mp3 new file mode 100644 index 000000000..bbfe2e1a2 Binary files /dev/null and b/packages/webgal/public/game/vocal/e009_As_you_can see_WebGAL.mp3 differ diff --git a/packages/webgal/public/game/vocal/e010_That's_all_for_the_feature introduction.mp3 b/packages/webgal/public/game/vocal/e010_That's_all_for_the_feature introduction.mp3 new file mode 100644 index 000000000..ba767c71b Binary files /dev/null and b/packages/webgal/public/game/vocal/e010_That's_all_for_the_feature introduction.mp3 differ diff --git a/packages/webgal/public/game/vocal/e011_Next_I_will introduce_the_ history.mp3 b/packages/webgal/public/game/vocal/e011_Next_I_will introduce_the_ history.mp3 new file mode 100644 index 000000000..c2f1284a8 Binary files /dev/null and b/packages/webgal/public/game/vocal/e011_Next_I_will introduce_the_ history.mp3 differ diff --git a/packages/webgal/public/game/vocal/e012_WebGAL _was_developed to_make_it_ easier.mp3 b/packages/webgal/public/game/vocal/e012_WebGAL _was_developed to_make_it_ easier.mp3 new file mode 100644 index 000000000..9142ca323 Binary files /dev/null and b/packages/webgal/public/game/vocal/e012_WebGAL _was_developed to_make_it_ easier.mp3 differ diff --git a/packages/webgal/public/game/vocal/e013_Initially_ WebGAL_had_very_few_features.mp3 b/packages/webgal/public/game/vocal/e013_Initially_ WebGAL_had_very_few_features.mp3 new file mode 100644 index 000000000..8e3feb981 Binary files /dev/null and b/packages/webgal/public/game/vocal/e013_Initially_ WebGAL_had_very_few_features.mp3 differ diff --git a/packages/webgal/public/game/vocal/e014_After_a_long _development period.mp3 b/packages/webgal/public/game/vocal/e014_After_a_long _development period.mp3 new file mode 100644 index 000000000..0d660e1cd Binary files /dev/null and b/packages/webgal/public/game/vocal/e014_After_a_long _development period.mp3 differ diff --git a/packages/webgal/public/game/vocal/e015_Additionally,_the release_of_the WebGAL_editor.mp3 b/packages/webgal/public/game/vocal/e015_Additionally,_the release_of_the WebGAL_editor.mp3 new file mode 100644 index 000000000..f0f9370b7 Binary files /dev/null and b/packages/webgal/public/game/vocal/e015_Additionally,_the release_of_the WebGAL_editor.mp3 differ diff --git a/packages/webgal/public/game/vocal/e016_The_WebGAL project_has reached_1000.mp3 b/packages/webgal/public/game/vocal/e016_The_WebGAL project_has reached_1000.mp3 new file mode 100644 index 000000000..6ad0cd6c2 Binary files /dev/null and b/packages/webgal/public/game/vocal/e016_The_WebGAL project_has reached_1000.mp3 differ diff --git a/packages/webgal/public/game/vocal/e017_The_development process_of WebGAL_is_a process.mp3 b/packages/webgal/public/game/vocal/e017_The_development process_of WebGAL_is_a process.mp3 new file mode 100644 index 000000000..feb8f9db6 Binary files /dev/null and b/packages/webgal/public/game/vocal/e017_The_development process_of WebGAL_is_a process.mp3 differ diff --git a/packages/webgal/public/game/vocal/e018_WebGAL's _scripting language_was designed_from the_ground.mp3 b/packages/webgal/public/game/vocal/e018_WebGAL's _scripting language_was designed_from the_ground.mp3 new file mode 100644 index 000000000..738ab9524 Binary files /dev/null and b/packages/webgal/public/game/vocal/e018_WebGAL's _scripting language_was designed_from the_ground.mp3 differ diff --git a/packages/webgal/public/game/vocal/e019_The_WebGAL_project_supports_many_keyboard shortcuts.mp3 b/packages/webgal/public/game/vocal/e019_The_WebGAL_project_supports_many_keyboard shortcuts.mp3 new file mode 100644 index 000000000..d68478ab5 Binary files /dev/null and b/packages/webgal/public/game/vocal/e019_The_WebGAL_project_supports_many_keyboard shortcuts.mp3 differ diff --git a/packages/webgal/public/game/vocal/e020_Try_pressing the_Backlog button.mp3 b/packages/webgal/public/game/vocal/e020_Try_pressing the_Backlog button.mp3 new file mode 100644 index 000000000..c166554f0 Binary files /dev/null and b/packages/webgal/public/game/vocal/e020_Try_pressing the_Backlog button.mp3 differ diff --git a/packages/webgal/public/game/vocal/e021_Features_like_quick_save_quick_load.mp3 b/packages/webgal/public/game/vocal/e021_Features_like_quick_save_quick_load.mp3 new file mode 100644 index 000000000..82a0d1d44 Binary files /dev/null and b/packages/webgal/public/game/vocal/e021_Features_like_quick_save_quick_load.mp3 differ diff --git a/packages/webgal/public/game/vocal/e022_For developers_who_ are_developing_ games.mp3 b/packages/webgal/public/game/vocal/e022_For developers_who_ are_developing_ games.mp3 new file mode 100644 index 000000000..c9afdf926 Binary files /dev/null and b/packages/webgal/public/game/vocal/e022_For developers_who_ are_developing_ games.mp3 differ diff --git a/packages/webgal/public/game/vocal/e023_So_you_can_ start_making_ games_quickly.mp3 b/packages/webgal/public/game/vocal/e023_So_you_can_ start_making_ games_quickly.mp3 new file mode 100644 index 000000000..262385754 Binary files /dev/null and b/packages/webgal/public/game/vocal/e023_So_you_can_ start_making_ games_quickly.mp3 differ diff --git a/packages/webgal/public/game/vocal/e024_We_hope_ that_your_work.mp3 b/packages/webgal/public/game/vocal/e024_We_hope_ that_your_work.mp3 new file mode 100644 index 000000000..36633e5a4 Binary files /dev/null and b/packages/webgal/public/game/vocal/e024_We_hope_ that_your_work.mp3 differ diff --git a/packages/webgal/public/game/vocal/e025_Thank_you_ for_your_interest_in_the_WebGAL_project!.mp3 b/packages/webgal/public/game/vocal/e025_Thank_you_ for_your_interest_in_the_WebGAL_project!.mp3 new file mode 100644 index 000000000..ba9a98268 Binary files /dev/null and b/packages/webgal/public/game/vocal/e025_Thank_you_ for_your_interest_in_the_WebGAL_project!.mp3 differ diff --git a/packages/webgal/public/game/vocal/v1.wav b/packages/webgal/public/game/vocal/v1.wav new file mode 100644 index 000000000..6af4cd575 Binary files /dev/null and b/packages/webgal/public/game/vocal/v1.wav differ diff --git a/packages/webgal/public/game/vocal/v10.wav b/packages/webgal/public/game/vocal/v10.wav new file mode 100644 index 000000000..0c4508d28 Binary files /dev/null and b/packages/webgal/public/game/vocal/v10.wav differ diff --git a/packages/webgal/public/game/vocal/v11.wav b/packages/webgal/public/game/vocal/v11.wav new file mode 100644 index 000000000..9971cd7e3 Binary files /dev/null and b/packages/webgal/public/game/vocal/v11.wav differ diff --git a/packages/webgal/public/game/vocal/v12.wav b/packages/webgal/public/game/vocal/v12.wav new file mode 100644 index 000000000..bdf912a99 Binary files /dev/null and b/packages/webgal/public/game/vocal/v12.wav differ diff --git a/packages/webgal/public/game/vocal/v13.wav b/packages/webgal/public/game/vocal/v13.wav new file mode 100644 index 000000000..bb260dcdc Binary files /dev/null and b/packages/webgal/public/game/vocal/v13.wav differ diff --git a/packages/webgal/public/game/vocal/v14.wav b/packages/webgal/public/game/vocal/v14.wav new file mode 100644 index 000000000..cdda2a9bf Binary files /dev/null and b/packages/webgal/public/game/vocal/v14.wav differ diff --git a/packages/webgal/public/game/vocal/v15.wav b/packages/webgal/public/game/vocal/v15.wav new file mode 100644 index 000000000..8da026ebe Binary files /dev/null and b/packages/webgal/public/game/vocal/v15.wav differ diff --git a/packages/webgal/public/game/vocal/v16.wav b/packages/webgal/public/game/vocal/v16.wav new file mode 100644 index 000000000..39a4b0826 Binary files /dev/null and b/packages/webgal/public/game/vocal/v16.wav differ diff --git a/packages/webgal/public/game/vocal/v17.wav b/packages/webgal/public/game/vocal/v17.wav new file mode 100644 index 000000000..3b9917930 Binary files /dev/null and b/packages/webgal/public/game/vocal/v17.wav differ diff --git a/packages/webgal/public/game/vocal/v18.wav b/packages/webgal/public/game/vocal/v18.wav new file mode 100644 index 000000000..3f5831e27 Binary files /dev/null and b/packages/webgal/public/game/vocal/v18.wav differ diff --git a/packages/webgal/public/game/vocal/v19.wav b/packages/webgal/public/game/vocal/v19.wav new file mode 100644 index 000000000..af0fe7745 Binary files /dev/null and b/packages/webgal/public/game/vocal/v19.wav differ diff --git a/packages/webgal/public/game/vocal/v2.wav b/packages/webgal/public/game/vocal/v2.wav new file mode 100644 index 000000000..57dc1e9db Binary files /dev/null and b/packages/webgal/public/game/vocal/v2.wav differ diff --git a/packages/webgal/public/game/vocal/v20.wav b/packages/webgal/public/game/vocal/v20.wav new file mode 100644 index 000000000..757e80734 Binary files /dev/null and b/packages/webgal/public/game/vocal/v20.wav differ diff --git a/packages/webgal/public/game/vocal/v21.wav b/packages/webgal/public/game/vocal/v21.wav new file mode 100644 index 000000000..040500b2c Binary files /dev/null and b/packages/webgal/public/game/vocal/v21.wav differ diff --git a/packages/webgal/public/game/vocal/v22.wav b/packages/webgal/public/game/vocal/v22.wav new file mode 100644 index 000000000..908c988f4 Binary files /dev/null and b/packages/webgal/public/game/vocal/v22.wav differ diff --git a/packages/webgal/public/game/vocal/v23.wav b/packages/webgal/public/game/vocal/v23.wav new file mode 100644 index 000000000..a17c7615b Binary files /dev/null and b/packages/webgal/public/game/vocal/v23.wav differ diff --git a/packages/webgal/public/game/vocal/v3.wav b/packages/webgal/public/game/vocal/v3.wav new file mode 100644 index 000000000..740f2b886 Binary files /dev/null and b/packages/webgal/public/game/vocal/v3.wav differ diff --git a/packages/webgal/public/game/vocal/v4.wav b/packages/webgal/public/game/vocal/v4.wav new file mode 100644 index 000000000..32598179e Binary files /dev/null and b/packages/webgal/public/game/vocal/v4.wav differ diff --git a/packages/webgal/public/game/vocal/v5.wav b/packages/webgal/public/game/vocal/v5.wav new file mode 100644 index 000000000..ad3eaaa79 Binary files /dev/null and b/packages/webgal/public/game/vocal/v5.wav differ diff --git a/packages/webgal/public/game/vocal/v6.wav b/packages/webgal/public/game/vocal/v6.wav new file mode 100644 index 000000000..a86f2fd24 Binary files /dev/null and b/packages/webgal/public/game/vocal/v6.wav differ diff --git a/packages/webgal/public/game/vocal/v7.wav b/packages/webgal/public/game/vocal/v7.wav new file mode 100644 index 000000000..d67959cff Binary files /dev/null and b/packages/webgal/public/game/vocal/v7.wav differ diff --git a/packages/webgal/public/game/vocal/v8.wav b/packages/webgal/public/game/vocal/v8.wav new file mode 100644 index 000000000..92dfda9cb Binary files /dev/null and b/packages/webgal/public/game/vocal/v8.wav differ diff --git a/packages/webgal/public/game/vocal/v9.wav b/packages/webgal/public/game/vocal/v9.wav new file mode 100644 index 000000000..aa7f9e777 Binary files /dev/null and b/packages/webgal/public/game/vocal/v9.wav differ diff --git a/packages/webgal/public/icons/apple-touch-icon.png b/packages/webgal/public/icons/apple-touch-icon.png new file mode 100644 index 000000000..75a1281d9 Binary files /dev/null and b/packages/webgal/public/icons/apple-touch-icon.png differ diff --git a/packages/webgal/public/icons/favicon.ico b/packages/webgal/public/icons/favicon.ico new file mode 100644 index 000000000..2f4226607 Binary files /dev/null and b/packages/webgal/public/icons/favicon.ico differ diff --git a/packages/webgal/public/icons/icon-192-maskable.png b/packages/webgal/public/icons/icon-192-maskable.png new file mode 100644 index 000000000..55710da09 Binary files /dev/null and b/packages/webgal/public/icons/icon-192-maskable.png differ diff --git a/packages/webgal/public/icons/icon-192.png b/packages/webgal/public/icons/icon-192.png new file mode 100644 index 000000000..2f1940862 Binary files /dev/null and b/packages/webgal/public/icons/icon-192.png differ diff --git a/packages/webgal/public/icons/icon-512-maskable.png b/packages/webgal/public/icons/icon-512-maskable.png new file mode 100644 index 000000000..35271a107 Binary files /dev/null and b/packages/webgal/public/icons/icon-512-maskable.png differ diff --git a/packages/webgal/public/icons/icon-512.png b/packages/webgal/public/icons/icon-512.png new file mode 100644 index 000000000..32a1e0985 Binary files /dev/null and b/packages/webgal/public/icons/icon-512.png differ diff --git a/packages/webgal/public/manifest.json b/packages/webgal/public/manifest.json new file mode 100644 index 000000000..7526b7e66 --- /dev/null +++ b/packages/webgal/public/manifest.json @@ -0,0 +1,33 @@ +{ + "name": "WebGAL", + "short_name": "WebGAL", + "start_url": ".", + "display": "fullscreen", + "description": "WebGAL DEMO", + "dir": "auto", + "orientation": "landscape", + "icons": [ + { + "src": "./icons/icon-192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "./icons/icon-512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "./icons/icon-192-maskable.png", + "type": "image/png", + "sizes": "192x192", + "purpose": "maskable" + }, + { + "src": "./icons/icon-512-maskable.png", + "type": "image/png", + "sizes": "512x512", + "purpose": "maskable" + } + ] +} \ No newline at end of file diff --git a/packages/webgal/public/webgal-serviceworker.js b/packages/webgal/public/webgal-serviceworker.js new file mode 100644 index 000000000..c3eeee301 --- /dev/null +++ b/packages/webgal/public/webgal-serviceworker.js @@ -0,0 +1,63 @@ +self.addEventListener('install', (ev) => { + // console.log('[service worker] installing'); + ev.waitUntil(self.skipWaiting()); +}); + +// fetch事件是每次页面请求资源时触发的 +self.addEventListener('fetch', function (event) { + const url = event.request.url; + const isReturnCache = !!(url.match('/assets/') && !url.match('game')); + if (isReturnCache) { + // console.log('%cCACHED: ' + url, 'color: #005CAF; padding: 2px;'); + } + if (!isReturnCache) { + event.respondWith(fetch(event.request)); + } else { + event.respondWith( + // 检查在缓存中是否有匹配的资源 + caches.match(event.request).then(function (response) { + // 如果缓存中有匹配的资源,则返回缓存资源 + if (response) { + return response; + } + // 如果没有匹配的资源,则尝试从网络请求 + // 同时将获取的资源存入缓存 + return fetch(event.request) + .then(function (networkResponse) { + console.log('%cCACHED: ' + url, 'color: #005CAF; padding: 2px;'); + if (networkResponse.status === 206 && event.request.headers.has('range')) { + // 如果是部分响应且请求带有Range头,则创建新的请求,将完整响应返回给客户端 + // eslint-disable-next-line max-nested-callbacks + return fetch(event.request.url).then(function (fullNetworkResponse) { + const headers = {}; + for (let entry of fullNetworkResponse.headers.entries()) { + headers[entry[0]] = entry[1]; + } + const fullResponse = new Response(fullNetworkResponse.body, { + status: fullNetworkResponse.status, + statusText: fullNetworkResponse.statusText, + headers: headers, + }); + const clonedResponse = fullResponse.clone(); + // eslint-disable-next-line max-nested-callbacks + caches.open('my-cache').then(function (cache) { + cache.put(event.request, clonedResponse); + }); + return fullResponse; + }); + } + const clonedResponse = networkResponse.clone(); + // eslint-disable-next-line max-nested-callbacks + caches.open('my-cache').then(function (cache) { + cache.put(event.request, clonedResponse); + }); + return networkResponse; + }) + .catch(function (error) { + console.error('Fetching failed:', error); + throw error; + }); + }), + ); + } +}); diff --git a/packages/webgal/src/App.tsx b/packages/webgal/src/App.tsx new file mode 100644 index 000000000..2ed11e21d --- /dev/null +++ b/packages/webgal/src/App.tsx @@ -0,0 +1,43 @@ +import Title from '@/UI/Title/Title'; +import Logo from '@/UI/Logo/Logo'; +import { useEffect } from 'react'; +import { initializeScript } from './Core/initializeScript'; +import Menu from '@/UI/Menu/Menu'; +import { Stage } from '@/Stage/Stage'; +import { BottomControlPanel } from '@/UI/BottomControlPanel/BottomControlPanel'; +import { Backlog } from '@/UI/Backlog/Backlog'; +import { Extra } from '@/UI/Extra/Extra'; +import { BottomControlPanelFilm } from '@/UI/BottomControlPanel/BottomControlPanelFilm'; +import GlobalDialog from '@/UI/GlobalDialog/GlobalDialog'; +import DevPanel from '@/UI/DevPanel/DevPanel'; +import Translation from '@/UI/Translation/Translation'; +import { PanicOverlay } from '@/UI/PanicOverlay/PanicOverlay'; +import { useFullScreen } from './hooks/useFullScreen'; + +function App() { + useEffect(() => { + initializeScript(); + }, []); + + useFullScreen(); + + // Provider用于对各组件提供状态 + return ( +
+ + + + + + + <Logo /> + <Extra /> + <Menu /> + <GlobalDialog /> + <PanicOverlay /> + <DevPanel /> + </div> + ); +} + +export default App; diff --git a/packages/webgal/src/Core/Modules/animationFunctions.ts b/packages/webgal/src/Core/Modules/animationFunctions.ts new file mode 100644 index 000000000..e1cc14658 --- /dev/null +++ b/packages/webgal/src/Core/Modules/animationFunctions.ts @@ -0,0 +1,93 @@ +import { generateUniversalSoftInAnimationObj } from '@/Core/controller/stage/pixi/animations/universalSoftIn'; +import { logger } from '@/Core/util/logger'; +import { generateUniversalSoftOffAnimationObj } from '@/Core/controller/stage/pixi/animations/universalSoftOff'; +import { webgalStore } from '@/store/store'; +import cloneDeep from 'lodash/cloneDeep'; +import { baseTransform } from '@/store/stageInterface'; +import { generateTimelineObj } from '@/Core/controller/stage/pixi/animations/timeline'; +import { WebGAL } from '@/Core/WebGAL'; + +export function getAnimationObject(animationName: string, target: string, duration: number) { + const effect = WebGAL.animationManager.getAnimations().find((ani) => ani.name === animationName); + if (effect) { + const mappedEffects = effect.effects.map((effect) => { + const targetSetEffect = webgalStore.getState().stage.effects.find((e) => e.target === target); + const newEffect = cloneDeep({ ...(targetSetEffect?.transform ?? baseTransform), duration: 0 }); + Object.assign(newEffect, effect); + newEffect.duration = effect.duration; + return newEffect; + }); + logger.debug('装载自定义动画', mappedEffects); + return generateTimelineObj(mappedEffects, target, duration); + } + return null; +} + +export function getAnimateDuration(animationName: string) { + const effect = WebGAL.animationManager.getAnimations().find((ani) => ani.name === animationName); + if (effect) { + let duration = 0; + effect.effects.forEach((e) => { + duration += e.duration; + }); + return duration; + } + return 0; +} + +// eslint-disable-next-line max-params +export function getEnterExitAnimation( + target: string, + type: 'enter' | 'exit', + isBg = false, + realTarget?: string, // 用于立绘和背景移除时,以当前时间打上特殊标记 +): { + duration: number; + animation: { + setStartState: () => void; + tickerFunc: (delta: number) => void; + setEndState: () => void; + } | null; +} { + if (type === 'enter') { + let duration = 500; + if (isBg) { + duration = 1500; + } + // 走默认动画 + let animation: { + setStartState: () => void; + tickerFunc: (delta: number) => void; + setEndState: () => void; + } | null = generateUniversalSoftInAnimationObj(realTarget ?? target, duration); + const animarionName = WebGAL.animationManager.nextEnterAnimationName.get(target); + if (animarionName) { + logger.debug('取代默认进入动画', target); + animation = getAnimationObject(animarionName, realTarget ?? target, getAnimateDuration(animarionName)); + duration = getAnimateDuration(animarionName); + // 用后重置 + WebGAL.animationManager.nextEnterAnimationName.delete(target); + } + return { duration, animation }; + } else { + let duration = 750; + if (isBg) { + duration = 1500; + } + // 走默认动画 + let animation: { + setStartState: () => void; + tickerFunc: (delta: number) => void; + setEndState: () => void; + } | null = generateUniversalSoftOffAnimationObj(realTarget ?? target, duration); + const animarionName = WebGAL.animationManager.nextExitAnimationName.get(target); + if (animarionName) { + logger.debug('取代默认退出动画', target); + animation = getAnimationObject(animarionName, realTarget ?? target, getAnimateDuration(animarionName)); + duration = getAnimateDuration(animarionName); + // 用后重置 + WebGAL.animationManager.nextExitAnimationName.delete(target); + } + return { duration, animation }; + } +} diff --git a/packages/webgal/src/Core/Modules/animations.ts b/packages/webgal/src/Core/Modules/animations.ts new file mode 100644 index 000000000..7b07650fc --- /dev/null +++ b/packages/webgal/src/Core/Modules/animations.ts @@ -0,0 +1,19 @@ +import { ITransform } from '@/store/stageInterface'; + +export interface IUserAnimation { + name: string; + effects: Array<ITransform & { duration: number }>; +} + +export class AnimationManager { + public nextEnterAnimationName: Map<string, string> = new Map(); + public nextExitAnimationName: Map<string, string> = new Map(); + private animations: Array<IUserAnimation> = []; + + public addAnimation(animation: IUserAnimation) { + this.animations.push(animation); + } + public getAnimations() { + return this.animations; + } +} diff --git a/packages/webgal/src/Core/Modules/backlog.ts b/packages/webgal/src/Core/Modules/backlog.ts new file mode 100644 index 000000000..8d9c9e8c8 --- /dev/null +++ b/packages/webgal/src/Core/Modules/backlog.ts @@ -0,0 +1,69 @@ +/** + * 当前的backlog + */ +import { IEffect, IStageState } from '@/store/stageInterface'; +import { webgalStore } from '@/store/store'; +import { ISaveScene } from '@/store/userDataInterface'; +import cloneDeep from 'lodash/cloneDeep'; + +import { SYSTEM_CONFIG } from '@/config'; +import { SceneManager } from '@/Core/Modules/scene'; + +export interface IBacklogItem { + currentStageState: IStageState; + saveScene: ISaveScene; +} + +export class BacklogManager { + public isSaveBacklogNext = false; + private backlog: Array<IBacklogItem> = []; + + private readonly sceneManager: SceneManager; + + public constructor(sceneManager: SceneManager) { + this.sceneManager = sceneManager; + } + + public getBacklog() { + return this.backlog; + } + + public editLastBacklogItemEffect(effects: IEffect[]) { + this.backlog[this.backlog.length - 1].currentStageState.effects = effects; + } + + public makeBacklogEmpty() { + this.backlog.splice(0, this.backlog.length); // 清空backlog + } + public insertBacklogItem(item: IBacklogItem) { + this.backlog.push(item); + } + public saveCurrentStateToBacklog() { + // 存一下 Backlog + const currentStageState = webgalStore.getState().stage; + const stageStateToBacklog = cloneDeep(currentStageState); + stageStateToBacklog.PerformList.forEach((ele) => { + ele.script.args.forEach((argelement) => { + if (argelement.key === 'concat') { + argelement.value = false; + ele.script.content = stageStateToBacklog.showText; + } + }); + }); + const backlogElement: IBacklogItem = { + currentStageState: stageStateToBacklog, + saveScene: { + currentSentenceId: this.sceneManager.sceneData.currentSentenceId, // 当前语句ID + sceneStack: cloneDeep(this.sceneManager.sceneData.sceneStack), // 场景栈 + sceneName: this.sceneManager.sceneData.currentScene.sceneName, // 场景名称 + sceneUrl: this.sceneManager.sceneData.currentScene.sceneUrl, // 场景url + }, + }; + this.getBacklog().push(backlogElement); + + // 清除超出长度的部分 + while (this.getBacklog().length > SYSTEM_CONFIG.backlog_size) { + this.getBacklog().shift(); + } + } +} diff --git a/packages/webgal/src/Core/Modules/events.ts b/packages/webgal/src/Core/Modules/events.ts new file mode 100644 index 000000000..af8b08eae --- /dev/null +++ b/packages/webgal/src/Core/Modules/events.ts @@ -0,0 +1,32 @@ +import mitt from 'mitt'; + +interface IWebgalEvent<T> { + on: (callback: (message?: T) => void, id?: string) => void; + off: (callback: (message?: T) => void, id?: string) => void; + emit: (message?: T, id?: string) => void; +} + +export class Events { + public textSettle = formEvent('text-settle'); + public userInteractNext = formEvent('__NEXT'); + public fullscreenDbClick = formEvent('fullscreen-dbclick'); + public styleUpdate = formEvent('style-update'); +} + +const eventBus = mitt(); + +function formEvent<T>(eventName: string): IWebgalEvent<T> { + return { + on: (callback, id?) => { + // @ts-ignore + eventBus.on(`${eventName}-${id ?? ''}`, callback); + }, + emit: (message?, id?) => { + eventBus.emit(`${eventName}-${id ?? ''}`, message); + }, + off: (callback, id?) => { + // @ts-ignore + eventBus.off(`${eventName}-${id ?? ''}`, callback); + }, + }; +} diff --git a/packages/webgal/src/Core/Modules/gamePlay.ts b/packages/webgal/src/Core/Modules/gamePlay.ts new file mode 100644 index 000000000..69d1c0fe9 --- /dev/null +++ b/packages/webgal/src/Core/Modules/gamePlay.ts @@ -0,0 +1,29 @@ +import PixiStage from '@/Core/controller/stage/pixi/PixiController'; +import { PerformController } from '@/Core/Modules/perform/performController'; + +/** + * 游戏运行时变量 + */ +export class Gameplay { + public isAuto = false; + public isFast = false; + public autoInterval: ReturnType<typeof setInterval> | null = null; + public fastInterval: ReturnType<typeof setInterval> | null = null; + public autoTimeout: ReturnType<typeof setTimeout> | null = null; + public pixiStage: PixiStage | null = null; + public performController = new PerformController(); + public resetGamePlay() { + this.performController.timeoutList = []; + this.isAuto = false; + this.isFast = false; + const autoInterval = this.autoInterval; + if (autoInterval !== null) clearInterval(autoInterval); + this.autoInterval = null; + const fastInterval = this.fastInterval; + if (fastInterval !== null) clearInterval(fastInterval); + this.fastInterval = null; + const autoTimeout = this.autoTimeout; + if (autoTimeout !== null) clearInterval(autoTimeout); + this.autoTimeout = null; + } +} diff --git a/packages/webgal/src/Core/Modules/perform/performController.ts b/packages/webgal/src/Core/Modules/perform/performController.ts new file mode 100644 index 000000000..6386425f0 --- /dev/null +++ b/packages/webgal/src/Core/Modules/perform/performController.ts @@ -0,0 +1,133 @@ +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { webgalStore } from '@/store/store'; +import cloneDeep from 'lodash/cloneDeep'; +import { resetStageState, stageActions } from '@/store/stageReducer'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import { IRunPerform } from '@/store/stageInterface'; +import { WEBGAL_NONE } from '@/Core/constants'; + +/** + * 获取随机演出名称 + */ +export const getRandomPerformName = (): string => { + return Math.random().toString().substring(0, 10); +}; + +export class PerformController { + public performList: Array<IPerform> = []; + public timeoutList: Array<ReturnType<typeof setTimeout>> = []; + + public arrangeNewPerform(perform: IPerform, script: ISentence, syncPerformState = true) { + // 检查演出列表内是否有相同的演出,如果有,一定是出了什么问题 + const dupPerformIndex = this.performList.findIndex((p) => p.performName === perform.performName); + if (dupPerformIndex > -1) { + // 结束并删除全部重复演出 + for (let i = 0; i < this.performList.length; i++) { + const e = this.performList[i]; + if (e.performName === perform.performName) { + e.stopFunction(); + clearTimeout(e.stopTimeout as unknown as number); + this.performList.splice(i, 1); + i--; + } + } + } + + // 语句不执行演出 + if (perform.performName === WEBGAL_NONE) { + return; + } + // 同步演出状态 + if (syncPerformState) { + const performToAdd = { id: perform.performName, isHoldOn: perform.isHoldOn, script: script }; + webgalStore.dispatch(stageActions.addPerform(performToAdd)); + } + + // 时间到后自动清理演出 + perform.stopTimeout = setTimeout(() => { + // perform.stopFunction(); + // perform.isOver = true; + if (!perform.isHoldOn) { + // 如果不是保持演出,清除 + this.unmountPerform(perform.performName); + } + }, perform.duration); + + if (script.args.find((e) => e.key === 'continue' && e.value === true)) perform.goNextWhenOver = true; + + this.performList.push(perform); + } + + public unmountPerform(name: string, force = false) { + if (!force) { + for (let i = 0; i < this.performList.length; i++) { + const e = this.performList[i]; + if (!e.isHoldOn && e.performName === name) { + e.stopFunction(); + clearTimeout(e.stopTimeout as unknown as number); + /** + * 在演出列表里删除演出对象的操作必须在调用 goNextWhenOver 之前 + * 因为 goNextWhenOver 会调用 nextSentence,而 nextSentence 会清除目前未结束的演出 + * 那么 nextSentence 函数就会删除这个演出,但是此时,在这个上下文,i 已经被确定了 + * 所以 goNextWhenOver 后的代码会多删东西,解决方法就是在调用 goNextWhenOver 前先删掉这个演出对象 + * 此问题对所有 goNextWhenOver 属性为真的演出都有影响,但只有 2 个演出有此问题 + */ + this.performList.splice(i, 1); + i--; + if (e.goNextWhenOver) { + // nextSentence(); + this.goNextWhenOver(); + } + } + } + } else { + for (let i = 0; i < this.performList.length; i++) { + const e = this.performList[i]; + if (e.performName === name) { + e.stopFunction(); + clearTimeout(e.stopTimeout as unknown as number); + if (e.goNextWhenOver) { + // nextSentence(); + this.goNextWhenOver(); + } + this.performList.splice(i, 1); + i--; + /** + * 从状态表里清除演出 + */ + this.erasePerformFromState(name); + } + } + } + } + + public erasePerformFromState(name: string) { + webgalStore.dispatch(stageActions.removePerformByName(name)); + } + + public removeAllPerform() { + for (const e of this.performList) { + e.stopFunction(); + } + this.performList = []; + for (const e of this.timeoutList) { + clearTimeout(e); + } + } + + private goNextWhenOver() { + let isBlockingAuto = false; + this.performList?.forEach((e) => { + if (e.blockingAuto()) + // 阻塞且没有结束的演出 + isBlockingAuto = true; + }); + if (isBlockingAuto) { + // 有阻塞,提前结束 + setTimeout(this.goNextWhenOver, 100); + } else { + nextSentence(); + } + } +} diff --git a/packages/webgal/src/Core/Modules/perform/performInterface.ts b/packages/webgal/src/Core/Modules/perform/performInterface.ts new file mode 100644 index 000000000..8e00b2f90 --- /dev/null +++ b/packages/webgal/src/Core/Modules/perform/performInterface.ts @@ -0,0 +1,44 @@ +/** + * 描述演出的接口,主要用于控制演出,而不是执行(在演出开始时被调用演出的执行器返回) + * @interface IPerform + */ +export interface IPerform { + // 演出名称,用于在后面手动清除演出,如果没有标识,则代表不是保持演出,给予一个随机字符串 + performName: string; + // 持续时间,单位为ms,持续时间到后自动回收演出 + duration: number; + // 演出是不是一个保持类型的演出 + isHoldOn: boolean; + // 卸载演出的函数 + stopFunction: () => void; + // 演出是否阻塞游戏流程继续(一个函数,返回 boolean类型的结果,判断要不要阻塞) + blockingNext: () => boolean; + // 演出是否阻塞自动模式(一个函数,返回 boolean类型的结果,判断要不要阻塞) + blockingAuto: () => boolean; + // 自动回收使用的 Timeout + stopTimeout: undefined | ReturnType<typeof setTimeout>; + // 演出结束后转到下一句 + goNextWhenOver?: boolean; + // 对于延迟触发的演出,使用 Promise + arrangePerformPromise?: Promise<IPerform>; + // 跳过由 nextSentence 函数引发的演出回收 + skipNextCollect?: boolean; +} + +// next之后,可以被打断的演出会被打断,不能被打断的演出会继续,阻塞next的演出会阻止next被响应。 +// 被打断或执行完毕的演出会移出演出列表 +// 只有所有演出都完成,或者仅存在不阻塞auto的演出,才允许auto + +/** + * 初始化的演出 + */ +export const initPerform: IPerform = { + performName: '', + duration: 100, + // isOver: false, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, +}; diff --git a/packages/webgal/src/Core/Modules/scene.ts b/packages/webgal/src/Core/Modules/scene.ts new file mode 100644 index 000000000..1f72069f1 --- /dev/null +++ b/packages/webgal/src/Core/Modules/scene.ts @@ -0,0 +1,37 @@ +import { ISceneData } from '@/Core/controller/scene/sceneInterface'; +import cloneDeep from 'lodash/cloneDeep'; + +export interface ISceneEntry { + sceneName: string; // 场景名称 + sceneUrl: string; // 场景url + continueLine: number; // 继续原场景的行号 +} + +/** + * 初始化场景数据 + */ +export const initSceneData = { + currentSentenceId: 0, // 当前语句ID + sceneStack: [], + // 初始场景,没有数据 + currentScene: { + sceneName: '', // 场景名称 + sceneUrl: '', // 场景url + sentenceList: [], // 语句列表 + assetsList: [], // 资源列表 + subSceneList: [], // 子场景列表 + }, +}; + +export class SceneManager { + public settledScenes: Array<string> = []; + public settledAssets: Array<string> = []; + public sceneData: ISceneData = cloneDeep(initSceneData); + public lockSceneWrite = false; + + public resetScene() { + this.sceneData.currentSentenceId = 0; + this.sceneData.sceneStack = []; + this.sceneData.currentScene = cloneDeep(initSceneData.currentScene); + } +} diff --git a/packages/webgal/src/Core/WebGAL.ts b/packages/webgal/src/Core/WebGAL.ts new file mode 100644 index 000000000..0874d828e --- /dev/null +++ b/packages/webgal/src/Core/WebGAL.ts @@ -0,0 +1,7 @@ +import { WebgalCore } from '@/Core/webgalCore'; + +export const WebGAL = new WebgalCore(); + +// 调试,不调试给去掉 +// @ts-ignore +// window.WebGAL = WebGAL; diff --git a/packages/webgal/src/Core/constants.ts b/packages/webgal/src/Core/constants.ts new file mode 100644 index 000000000..6f7dd2a05 --- /dev/null +++ b/packages/webgal/src/Core/constants.ts @@ -0,0 +1,8 @@ +export const STAGE_KEYS = { + BGMAIN: 'bg-main', + FIG_C: 'fig-center', + FIG_L: 'fig-left', + FIG_R: 'fig-right', +}; + +export const WEBGAL_NONE = 'none'; diff --git a/packages/webgal/src/Core/controller/customUI/scss2cssinjsParser.ts b/packages/webgal/src/Core/controller/customUI/scss2cssinjsParser.ts new file mode 100644 index 000000000..b8c14fef4 --- /dev/null +++ b/packages/webgal/src/Core/controller/customUI/scss2cssinjsParser.ts @@ -0,0 +1,6 @@ +import { IWebGALStyleObj } from 'webgal-parser/build/types/styleParser'; +import { WebgalParser } from '@/Core/parser/sceneParser'; + +export function scss2cssinjsParser(scssString: string): IWebGALStyleObj { + return WebgalParser.parseScssToWebgalStyleObj(scssString); +} diff --git a/packages/webgal/src/Core/controller/gamePlay/autoPlay.ts b/packages/webgal/src/Core/controller/gamePlay/autoPlay.ts new file mode 100644 index 000000000..0abe68278 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/autoPlay.ts @@ -0,0 +1,77 @@ +// import {logger} from '../../util/logger'; +import styles from '@/UI/BottomControlPanel/bottomControlPanel.module.scss'; +import { webgalStore } from '@/store/store'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 设置 autoplay 按钮的激活与否 + * @param on + */ +const setButton = (on: boolean) => { + const autoIcon = document.getElementById('Button_ControlPanel_auto'); + if (autoIcon) { + if (on) { + autoIcon.className = styles.button_on; + } else autoIcon.className = styles.singleButton; + } +}; + +/** + * 停止自动播放 + */ +export const stopAuto = () => { + WebGAL.gameplay.isAuto = false; + setButton(false); + if (WebGAL.gameplay.autoInterval !== null) { + clearInterval(WebGAL.gameplay.autoInterval); + WebGAL.gameplay.autoInterval = null; + } + if (WebGAL.gameplay.autoTimeout !== null) { + clearTimeout(WebGAL.gameplay.autoTimeout); + WebGAL.gameplay.autoTimeout = null; + } +}; + +/** + * 切换自动播放状态 + */ +export const switchAuto = () => { + // 现在正在自动播放 + if (WebGAL.gameplay.isAuto) { + stopAuto(); + } else { + // 当前不在自动播放 + WebGAL.gameplay.isAuto = true; + setButton(true); + WebGAL.gameplay.autoInterval = setInterval(autoPlay, 100); + } +}; + +export const autoNextSentence = () => { + nextSentence(); + WebGAL.gameplay.autoTimeout = null; +}; + +/** + * 自动播放的执行函数 + */ +const autoPlay = () => { + const delay = webgalStore.getState().userData.optionData.autoSpeed; + const autoPlayDelay = 750 - 250 * delay; + let isBlockingAuto = false; + WebGAL.gameplay.performController.performList.forEach((e) => { + if (e.blockingAuto()) + // 阻塞且没有结束的演出 + isBlockingAuto = true; + }); + if (isBlockingAuto) { + // 有阻塞,提前结束 + return; + } + // nextSentence(); + if (WebGAL.gameplay.autoTimeout === null) { + WebGAL.gameplay.autoTimeout = setTimeout(autoNextSentence, autoPlayDelay); + } +}; diff --git a/packages/webgal/src/Core/controller/gamePlay/backToTitle.ts b/packages/webgal/src/Core/controller/gamePlay/backToTitle.ts new file mode 100644 index 000000000..5d0c000bc --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/backToTitle.ts @@ -0,0 +1,22 @@ +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; +import { setVisibility } from '@/store/GUIReducer'; +import { stopAllPerform } from '@/Core/controller/gamePlay/stopAllPerform'; +import { stopAuto } from '@/Core/controller/gamePlay/autoPlay'; +import { stopFast } from '@/Core/controller/gamePlay/fastSkip'; +import { setEbg } from '@/Core/gameScripts/changeBg/setEbg'; + +export const backToTitle = () => { + const dispatch = webgalStore.dispatch; + stopAllPerform(); + stopAuto(); + stopFast(); + // 清除语音 + dispatch(setStage({ key: 'playVocal', value: '' })); + // 重新打开标题界面 + dispatch(setVisibility({ component: 'showTitle', visibility: true })); + /** + * 重设为标题背景 + */ + setEbg(webgalStore.getState().GUI.titleBg); +}; diff --git a/packages/webgal/src/Core/controller/gamePlay/fastSkip.ts b/packages/webgal/src/Core/controller/gamePlay/fastSkip.ts new file mode 100644 index 000000000..755e5d500 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/fastSkip.ts @@ -0,0 +1,75 @@ +// 切换自动播放状态 +import { stopAuto } from './autoPlay'; +import styles from '@/UI/BottomControlPanel/bottomControlPanel.module.scss'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; + +import { WebGAL } from '@/Core/WebGAL'; +import { SYSTEM_CONFIG } from '@/config'; + +/** + * 设置 fast 按钮的激活与否 + * @param on + */ +const setButton = (on: boolean) => { + const autoIcon = document.getElementById('Button_ControlPanel_fast'); + if (autoIcon) { + if (on) { + autoIcon.className = styles.button_on; + } else autoIcon.className = styles.singleButton; + } +}; + +/** + * 停止快进模式 + */ +export const stopFast = () => { + if (!isFast()) { + return; + } + WebGAL.gameplay.isFast = false; + setButton(false); + if (WebGAL.gameplay.fastInterval !== null) { + clearInterval(WebGAL.gameplay.fastInterval); + WebGAL.gameplay.fastInterval = null; + } +}; + +/** + * 开启快进 + */ +export const startFast = () => { + if (isFast()) { + return; + } + WebGAL.gameplay.isFast = true; + setButton(true); + WebGAL.gameplay.fastInterval = setInterval(() => { + nextSentence(); + }, SYSTEM_CONFIG.fast_timeout); +}; + +// 判断是否是快进模式 +export const isFast = function () { + return WebGAL.gameplay.isFast; +}; + +/** + * 停止快进模式与自动播放 + */ +export const stopAll = () => { + stopFast(); + stopAuto(); +}; + +/** + * 切换快进模式 + */ +export const switchFast = () => { + // 现在正在快进 + if (WebGAL.gameplay.isFast) { + stopFast(); + } else { + // 当前不在快进 + startFast(); + } +}; diff --git a/packages/webgal/src/Core/controller/gamePlay/nextSentence.ts b/packages/webgal/src/Core/controller/gamePlay/nextSentence.ts new file mode 100644 index 000000000..7cb4a9f78 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/nextSentence.ts @@ -0,0 +1,87 @@ +import { scriptExecutor } from './scriptExecutor'; +import { logger } from '../../util/logger'; +import { webgalStore } from '@/store/store'; +import { resetStageState } from '@/store/stageReducer'; +import cloneDeep from 'lodash/cloneDeep'; +import { IBacklogItem } from '@/Core/Modules/backlog'; + +import { SYSTEM_CONFIG } from '@/config'; +import { WebGAL } from '@/Core/WebGAL'; +import { IRunPerform } from '@/store/stageInterface'; + +/** + * 进行下一句 + */ +export const nextSentence = () => { + /** + * 发送 “发生点击下一句” 事件。 + */ + WebGAL.events.userInteractNext.emit(); + + // 如果当前显示标题,那么不进行下一句 + const GUIState = webgalStore.getState().GUI; + if (GUIState.showTitle) { + return; + } + + // 第一步,检查是否存在 blockNext 的演出 + let isBlockingNext = false; + WebGAL.gameplay.performController.performList.forEach((e) => { + if (e.blockingNext()) + // 阻塞且没有结束的演出 + isBlockingNext = true; + }); + if (isBlockingNext) { + // 有阻塞,提前结束 + logger.warn('next 被阻塞!'); + return; + } + + // 检查是否处于演出完成状态,不是则结束所有普通演出(保持演出不算做普通演出) + let allSettled = true; + WebGAL.gameplay.performController.performList.forEach((e) => { + if (!e.isHoldOn && !e.skipNextCollect) allSettled = false; + }); + if (allSettled) { + // 所有普通演出已经结束 + // if (WebGAL.backlogManager.isSaveBacklogNext) { + // WebGAL.backlogManager.isSaveBacklogNext = false; + // } + // 清除状态表的演出序列(因为这时候已经准备进行下一句了) + const stageState = webgalStore.getState().stage; + const newStageState = cloneDeep(stageState); + for (let i = 0; i < newStageState.PerformList.length; i++) { + const e: IRunPerform = newStageState.PerformList[i]; + if (!e.isHoldOn) { + newStageState.PerformList.splice(i, 1); + i--; + } + } + webgalStore.dispatch(resetStageState(newStageState)); + scriptExecutor(); + return; + } + + // 不处于 allSettled 状态,清除所有普通演出,强制进入settled。 + logger.debug('提前结束被触发,现在清除普通演出'); + let isGoNext = false; + for (let i = 0; i < WebGAL.gameplay.performController.performList.length; i++) { + const e = WebGAL.gameplay.performController.performList[i]; + if (!e.isHoldOn) { + if (e.goNextWhenOver) { + isGoNext = true; + } // 先检查是不是要跳过收集 + if (!e.skipNextCollect) { + // 由于提前结束使用的不是 unmountPerform 标准 API,所以不会触发两次 nextSentence + e.stopFunction(); + clearTimeout(e.stopTimeout as unknown as number); + WebGAL.gameplay.performController.performList.splice(i, 1); + i--; + } + } + } + if (isGoNext) { + // 由于不使用 unmountPerform 标准 API,这里需要手动收集一下 isGoNext + nextSentence(); + } +}; diff --git a/packages/webgal/src/Core/controller/gamePlay/runScript.ts b/packages/webgal/src/Core/controller/gamePlay/runScript.ts new file mode 100644 index 000000000..e76b76174 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/runScript.ts @@ -0,0 +1,25 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { initPerform, IPerform } from '@/Core/Modules/perform/performInterface'; + +import { WebGAL } from '@/Core/WebGAL'; +import { scriptRegistry, SCRIPT_TAG_MAP, ScriptFunction } from '@/Core/parser/sceneParser'; + +/** + * 语句调用器,真正执行语句的调用,并自动将演出在指定时间卸载 + * @param script 调用的语句 + */ +export const runScript = (script: ISentence) => { + let perform: IPerform = initPerform; + const funcToRun: ScriptFunction = scriptRegistry[script.command]?.scriptFunction ?? SCRIPT_TAG_MAP.say.scriptFunction; // 默认是say + + // 调用脚本对应的函数 + perform = funcToRun(script); + + if (perform.arrangePerformPromise) { + perform.arrangePerformPromise.then((resolovedPerform) => + WebGAL.gameplay.performController.arrangeNewPerform(resolovedPerform, script), + ); + } else { + WebGAL.gameplay.performController.arrangeNewPerform(perform, script); + } +}; diff --git a/packages/webgal/src/Core/controller/gamePlay/scriptExecutor.ts b/packages/webgal/src/Core/controller/gamePlay/scriptExecutor.ts new file mode 100644 index 000000000..3370b99a5 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/scriptExecutor.ts @@ -0,0 +1,157 @@ +import { commandType, ISentence } from '@/Core/controller/scene/sceneInterface'; +import { runScript } from './runScript'; +import { logger } from '../../util/logger'; +import { IStageState } from '@/store/stageInterface'; +import { restoreScene } from '../scene/restoreScene'; +import { webgalStore } from '@/store/store'; +import { getValueFromStateElseKey } from '@/Core/gameScripts/setVar'; +import { strIf } from '@/Core/controller/gamePlay/strIf'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import cloneDeep from 'lodash/cloneDeep'; +import { ISceneEntry } from '@/Core/Modules/scene'; +import { IBacklogItem } from '@/Core/Modules/backlog'; +import { SYSTEM_CONFIG } from '@/config'; +import { WebGAL } from '@/Core/WebGAL'; + +export const whenChecker = (whenValue: string | undefined): boolean => { + if (whenValue === undefined) { + return true; + } + // 先把变量解析出来 + const valExpArr = whenValue.split(/([+\-*\/()><!]|>=|<=|==|&&|\|\||!=)/g); + const valExp = valExpArr + .map((e) => { + if (e.match(/[a-zA-Z]/)) { + if (e.match(/true/) || e.match(/false/)) { + return e; + } + return getValueFromStateElseKey(e, true); + } else return e; + }) + .reduce((pre, curr) => pre + curr, ''); + return !!strIf(valExp); +}; + +/** + * 语句执行器 + * 执行语句,同步场景状态,并根据情况立即执行下一句或者加入backlog + */ +export const scriptExecutor = () => { + // 超过总语句数量,则从场景栈拿出一个需要继续的场景,然后继续流程。若场景栈清空,则停止流程 + if ( + WebGAL.sceneManager.sceneData.currentSentenceId > + WebGAL.sceneManager.sceneData.currentScene.sentenceList.length - 1 + ) { + if (WebGAL.sceneManager.sceneData.sceneStack.length !== 0) { + const sceneToRestore: ISceneEntry | undefined = WebGAL.sceneManager.sceneData.sceneStack.pop(); + if (sceneToRestore !== undefined) { + restoreScene(sceneToRestore); + } + } + return; + } + const currentScript: ISentence = + WebGAL.sceneManager.sceneData.currentScene.sentenceList[WebGAL.sceneManager.sceneData.currentSentenceId]; + + const interpolationOneItem = (content: string): string => { + let retContent = content; + const contentExp = retContent.match(/(?<!\\)\{(.*?)\}/g); + + if (contentExp !== null) { + contentExp.forEach((e) => { + const contentVarValue = getValueFromStateElseKey(e.replace(/(?<!\\)\{(.*)\}/, '$1')); + retContent = retContent.replace(e, contentVarValue); + }); + } + retContent = retContent.replace(/\\{/g, '{').replace(/\\}/g, '}'); + return retContent; + }; + + /** + * Variable interpolation + */ + const variableInterpolation = () => { + currentScript.content = interpolationOneItem(currentScript.content); + + currentScript.args.forEach((arg) => { + if (arg.value && typeof arg.value === 'string') { + arg.value = interpolationOneItem(arg.value); + } + }); + }; + + variableInterpolation(); + + // 判断这个脚本要不要执行 + let runThis = true; + let isHasWhenArg = false; + let whenValue = ''; + currentScript.args.forEach((e) => { + if (e.key === 'when') { + isHasWhenArg = true; + whenValue = e.value.toString(); + } + }); + // 如果语句有 when + if (isHasWhenArg) { + runThis = whenChecker(whenValue); + } + + // 执行语句 + if (!runThis) { + logger.warn('不满足条件,跳过本句!'); + WebGAL.sceneManager.sceneData.currentSentenceId++; + nextSentence(); + return; + } + runScript(currentScript); + let isNext = false; // 是否要进行下一句 + currentScript.args.forEach((e) => { + // 判断是否有下一句的参数 + if (e.key === 'next' && e.value) { + isNext = true; + } + }); + + let isSaveBacklog = currentScript.command === commandType.say; // 是否在本句保存backlog(一般遇到对话保存) + // 检查当前对话是否有 notend 参数 + currentScript.args.forEach((e) => { + if (e.key === 'notend' && e.value === true) { + isSaveBacklog = false; + } + }); + let currentStageState: IStageState; + + // 执行至指定 sentenceID + // if (runToSentence >= 0 && runtime_currentSceneData.currentSentenceId < runToSentence) { + // runtime_currentSceneData.currentSentenceId++; + // scriptExecutor(runToSentence); + // return; + // } + + // 执行“下一句” + if (isNext) { + WebGAL.sceneManager.sceneData.currentSentenceId++; + scriptExecutor(); + return; + } + + /** + * 为了让 backlog 拿到连续执行了多条语句后正确的数据,放到下一个宏任务中执行(我也不知道为什么这样能正常,有能力的可以研究一下 + */ + setTimeout(() => { + // 同步当前舞台数据 + currentStageState = webgalStore.getState().stage; + const allState = { + currentStageState: currentStageState, + globalGameVar: webgalStore.getState().userData.globalGameVar, + }; + logger.debug('本条语句执行结果', allState); + // 保存 backlog + if (isSaveBacklog) { + // WebGAL.backlogManager.isSaveBacklogNext = true; + WebGAL.backlogManager.saveCurrentStateToBacklog(); + } + }, 0); + WebGAL.sceneManager.sceneData.currentSentenceId++; +}; diff --git a/packages/webgal/src/Core/controller/gamePlay/startContinueGame.ts b/packages/webgal/src/Core/controller/gamePlay/startContinueGame.ts new file mode 100644 index 000000000..e3998acd5 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/startContinueGame.ts @@ -0,0 +1,52 @@ +import { assetSetter, fileType } from '../../util/gameAssetsAccess/assetSetter'; +import { sceneFetcher } from '../scene/sceneFetcher'; +import { sceneParser } from '../../parser/sceneParser'; +import { resetStage } from '@/Core/controller/stage/resetStage'; +import { webgalStore } from '@/store/store'; +import { setVisibility } from '@/store/GUIReducer'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import { setEbg } from '@/Core/gameScripts/changeBg/setEbg'; +import { restorePerform } from '@/Core/controller/storage/jumpFromBacklog'; + +import { hasFastSaveRecord, loadFastSaveGame } from '@/Core/controller/storage/fastSaveLoad'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 从头开始游戏 + */ +export const startGame = () => { + resetStage(true); + + // 重新获取初始场景 + const sceneUrl: string = assetSetter('start.txt', fileType.scene); + // 场景写入到运行时 + sceneFetcher(sceneUrl).then((rawScene) => { + WebGAL.sceneManager.sceneData.currentScene = sceneParser(rawScene, 'start.txt', sceneUrl); + // 开始第一条语句 + nextSentence(); + }); + webgalStore.dispatch(setVisibility({ component: 'showTitle', visibility: false })); +}; + +export async function continueGame() { + /** + * 重设模糊背景 + */ + setEbg(webgalStore.getState().stage.bgName); + // 当且仅当游戏未开始时使用快速存档 + // 当游戏开始后 使用原来的逻辑 + if ((await hasFastSaveRecord()) && WebGAL.sceneManager.sceneData.currentSentenceId === 0) { + // 恢复记录 + await loadFastSaveGame(); + return; + } + if ( + WebGAL.sceneManager.sceneData.currentSentenceId === 0 && + WebGAL.sceneManager.sceneData.currentScene.sceneName === 'start.txt' + ) { + // 如果游戏没有开始,开始游戏 + nextSentence(); + } else { + restorePerform(); + } +} diff --git a/packages/webgal/src/Core/controller/gamePlay/stopAllPerform.ts b/packages/webgal/src/Core/controller/gamePlay/stopAllPerform.ts new file mode 100644 index 000000000..fd3746d81 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/stopAllPerform.ts @@ -0,0 +1,14 @@ +import { logger } from '@/Core/util/logger'; + +import { WebGAL } from '@/Core/WebGAL'; + +export const stopAllPerform = () => { + logger.warn('清除所有演出'); + for (let i = 0; i < WebGAL.gameplay.performController.performList.length; i++) { + const e = WebGAL.gameplay.performController.performList[i]; + e.stopFunction(); + clearTimeout(e.stopTimeout as unknown as number); + WebGAL.gameplay.performController.performList.splice(i, 1); + i--; + } +}; diff --git a/packages/webgal/src/Core/controller/gamePlay/strIf.ts b/packages/webgal/src/Core/controller/gamePlay/strIf.ts new file mode 100644 index 000000000..82f7d87f1 --- /dev/null +++ b/packages/webgal/src/Core/controller/gamePlay/strIf.ts @@ -0,0 +1,10 @@ +import { compile } from 'angular-expressions'; + +export function strIf(s: string) { + try { + const res = compile(s); + return res(); + } catch { + return false; + } +} diff --git a/packages/webgal/src/Core/controller/scene/callScene.ts b/packages/webgal/src/Core/controller/scene/callScene.ts new file mode 100644 index 000000000..ead6e3bd1 --- /dev/null +++ b/packages/webgal/src/Core/controller/scene/callScene.ts @@ -0,0 +1,44 @@ +import { sceneFetcher } from './sceneFetcher'; +import { sceneParser } from '../../parser/sceneParser'; +import { logger } from '../../util/logger'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import uniqWith from 'lodash/uniqWith'; +import { scenePrefetcher } from '@/Core/util/prefetcher/scenePrefetcher'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 调用场景 + * @param sceneUrl 场景路径 + * @param sceneName 场景名称 + */ +export const callScene = (sceneUrl: string, sceneName: string) => { + if (WebGAL.sceneManager.lockSceneWrite) { + return; + } + WebGAL.sceneManager.lockSceneWrite = true; + // 先将本场景压入场景栈 + WebGAL.sceneManager.sceneData.sceneStack.push({ + sceneName: WebGAL.sceneManager.sceneData.currentScene.sceneName, + sceneUrl: WebGAL.sceneManager.sceneData.currentScene.sceneUrl, + continueLine: WebGAL.sceneManager.sceneData.currentSentenceId, + }); + // 场景写入到运行时 + sceneFetcher(sceneUrl) + .then((rawScene) => { + WebGAL.sceneManager.sceneData.currentScene = sceneParser(rawScene, sceneName, sceneUrl); + WebGAL.sceneManager.sceneData.currentSentenceId = 0; + // 开始场景的预加载 + const subSceneList = WebGAL.sceneManager.sceneData.currentScene.subSceneList; + WebGAL.sceneManager.settledScenes.push(sceneUrl); // 放入已加载场景列表,避免递归加载相同场景 + const subSceneListUniq = uniqWith(subSceneList); // 去重 + scenePrefetcher(subSceneListUniq); + logger.debug('现在调用场景,调用结果:', WebGAL.sceneManager.sceneData); + WebGAL.sceneManager.lockSceneWrite = false; + nextSentence(); + }) + .catch((e) => { + logger.error('场景调用错误', e); + WebGAL.sceneManager.lockSceneWrite = false; + }); +}; diff --git a/packages/webgal/src/Core/controller/scene/changeScene.ts b/packages/webgal/src/Core/controller/scene/changeScene.ts new file mode 100644 index 000000000..67df0879a --- /dev/null +++ b/packages/webgal/src/Core/controller/scene/changeScene.ts @@ -0,0 +1,38 @@ +import { sceneFetcher } from './sceneFetcher'; +import { sceneParser } from '../../parser/sceneParser'; +import { logger } from '../../util/logger'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import uniqWith from 'lodash/uniqWith'; +import { scenePrefetcher } from '@/Core/util/prefetcher/scenePrefetcher'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 切换场景 + * @param sceneUrl 场景路径 + * @param sceneName 场景名称 + */ +export const changeScene = (sceneUrl: string, sceneName: string) => { + if (WebGAL.sceneManager.lockSceneWrite) { + return; + } + WebGAL.sceneManager.lockSceneWrite = true; + // 场景写入到运行时 + sceneFetcher(sceneUrl) + .then((rawScene) => { + WebGAL.sceneManager.sceneData.currentScene = sceneParser(rawScene, sceneName, sceneUrl); + WebGAL.sceneManager.sceneData.currentSentenceId = 0; + // 开始场景的预加载 + const subSceneList = WebGAL.sceneManager.sceneData.currentScene.subSceneList; + WebGAL.sceneManager.settledScenes.push(sceneUrl); // 放入已加载场景列表,避免递归加载相同场景 + const subSceneListUniq = uniqWith(subSceneList); // 去重 + scenePrefetcher(subSceneListUniq); + logger.debug('现在切换场景,切换后的结果:', WebGAL.sceneManager.sceneData); + WebGAL.sceneManager.lockSceneWrite = false; + nextSentence(); + }) + .catch((e) => { + logger.error('场景调用错误', e); + WebGAL.sceneManager.lockSceneWrite = false; + }); +}; diff --git a/packages/webgal/src/Core/controller/scene/restoreScene.ts b/packages/webgal/src/Core/controller/scene/restoreScene.ts new file mode 100644 index 000000000..1486c272c --- /dev/null +++ b/packages/webgal/src/Core/controller/scene/restoreScene.ts @@ -0,0 +1,31 @@ +import { sceneFetcher } from './sceneFetcher'; +import { sceneParser } from '../../parser/sceneParser'; +import { logger } from '../../util/logger'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import { ISceneEntry } from '@/Core/Modules/scene'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 恢复场景 + * @param entry 场景入口 + */ +export const restoreScene = (entry: ISceneEntry) => { + if (WebGAL.sceneManager.lockSceneWrite) { + return; + } + WebGAL.sceneManager.lockSceneWrite = true; + // 场景写入到运行时 + sceneFetcher(entry.sceneUrl) + .then((rawScene) => { + WebGAL.sceneManager.sceneData.currentScene = sceneParser(rawScene, entry.sceneName, entry.sceneUrl); + WebGAL.sceneManager.sceneData.currentSentenceId = entry.continueLine + 1; // 重设场景 + logger.debug('现在恢复场景,恢复后场景:', WebGAL.sceneManager.sceneData.currentScene); + WebGAL.sceneManager.lockSceneWrite = false; + nextSentence(); + }) + .catch((e) => { + logger.error('场景调用错误', e); + WebGAL.sceneManager.lockSceneWrite = false; + }); +}; diff --git a/packages/webgal/src/Core/controller/scene/sceneFetcher.ts b/packages/webgal/src/Core/controller/scene/sceneFetcher.ts new file mode 100644 index 000000000..c66c04cf1 --- /dev/null +++ b/packages/webgal/src/Core/controller/scene/sceneFetcher.ts @@ -0,0 +1,19 @@ +import axios from 'axios'; + +/** + * 原始场景文件获取函数 + * @param sceneUrl 场景文件路径 + */ +export const sceneFetcher = (sceneUrl: string) => { + return new Promise<string>((resolve, reject) => { + axios + .get(sceneUrl) + .then((response) => { + const rawScene: string = response.data.toString(); + resolve(rawScene); + }) + .catch((e) => { + reject(e); + }); + }); +}; diff --git a/packages/webgal/src/Core/controller/scene/sceneInterface.ts b/packages/webgal/src/Core/controller/scene/sceneInterface.ts new file mode 100644 index 000000000..a4c556dbf --- /dev/null +++ b/packages/webgal/src/Core/controller/scene/sceneInterface.ts @@ -0,0 +1,105 @@ +/** + * 语句类型 + */ +import { fileType } from '@/Core/util/gameAssetsAccess/assetSetter'; +import { ISceneEntry } from '@/Core/Modules/scene'; + +export enum commandType { + say, // 对话 + changeBg, // 更改背景 + changeFigure, // 更改立绘 + bgm, // 更改背景音乐 + video, // 播放视频 + pixi, // pixi演出 + pixiInit, // pixi初始化 + intro, // 黑屏文字演示 + miniAvatar, // 小头像 + changeScene, // 切换场景 + choose, // 分支选择 + end, // 结束游戏 + setComplexAnimation, // 动画演出 + setFilter, // 设置效果 + label, // 标签 + jumpLabel, // 跳转标签 + chooseLabel, // 选择标签 + setVar, // 设置变量 + if, // 条件跳转 + callScene, // 调用场景 + showVars, + unlockCg, + unlockBgm, + filmMode, + setTextbox, + setAnimation, + playEffect, + setTempAnimation, + comment, + setTransform, + setTransition, + getUserInput, + applyStyle, +} + +/** + * 单个参数接口 + * @interface arg + */ +export interface arg { + key: string; // 参数键 + value: string | boolean | number; // 参数值 +} + +/** + * 资源接口 + * @interface IAsset + */ +export interface IAsset { + name: string; // 资源名称 + type: fileType; // 资源类型 + url: string; // 资源url + lineNumber: number; // 触发资源语句的行号 +} + +/** + * 单条语句接口 + * @interface ISentence + */ +export interface ISentence { + command: commandType; // 语句类型 + commandRaw: string; // 命令的原始内容,方便调试 + content: string; // 语句内容 + args: Array<arg>; // 参数列表 + sentenceAssets: Array<IAsset>; // 语句携带的资源列表 + subScene: Array<string>; // 语句包含子场景列表 +} + +/** + * 场景接口 + * @interface IScene + */ +export interface IScene { + sceneName: string; // 场景名称 + sceneUrl: string; // 场景url + sentenceList: Array<ISentence>; // 语句列表 + assetsList: Array<IAsset>; // 资源列表 + subSceneList: Array<string>; // 子场景的url列表 +} + +/** + * 当前的场景数据 + * @interface ISceneData + */ +export interface ISceneData { + currentSentenceId: number; // 当前语句ID + sceneStack: Array<ISceneEntry>; // 场景栈 + currentScene: IScene; // 当前场景数据 +} + +/** + * 处理后的命令接口 + * @interface parsedCommand + */ +export interface parsedCommand { + type: commandType; + additionalArgs: Array<arg>; +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/PixiController.ts b/packages/webgal/src/Core/controller/stage/pixi/PixiController.ts new file mode 100644 index 000000000..ddd8aac00 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/PixiController.ts @@ -0,0 +1,1053 @@ +import * as PIXI from 'pixi.js'; +import { v4 as uuid } from 'uuid'; +import { webgalStore } from '@/store/store'; +import { setStage, stageActions } from '@/store/stageReducer'; +import cloneDeep from 'lodash/cloneDeep'; +import { IEffect, IFigureAssociatedAnimation, IFigureMetadata } from '@/store/stageInterface'; +import { logger } from '@/Core/util/logger'; +import { isIOS } from '@/Core/initializeScript'; +import { WebGALPixiContainer } from '@/Core/controller/stage/pixi/WebGALPixiContainer'; +import { WebGAL } from '@/Core/WebGAL'; +import 'pixi-spine'; // Do this once at the very start of your code. This registers the loader! +import { Spine } from 'pixi-spine'; +import { SCREEN_CONSTANTS } from '@/Core/util/constants'; +// import { figureCash } from '@/Core/gameScripts/vocal/conentsCash'; // 如果要使用 Live2D,取消这里的注释 +// import { Live2DModel, SoundManager } from 'pixi-live2d-display-webgal'; // 如果要使用 Live2D,取消这里的注释 + +export interface IAnimationObject { + setStartState: Function; + setEndState: Function; + tickerFunc: PIXI.TickerCallback<number>; + getEndFilterEffect?: Function; +} + +interface IStageAnimationObject { + // 唯一标识 + uuid: string; + // 一般与作用目标有关 + key: string; + targetKey?: string; + type: 'common' | 'preset'; + animationObject: IAnimationObject; +} + +export interface IStageObject { + // 唯一标识 + uuid: string; + // 一般与作用目标有关 + key: string; + pixiContainer: WebGALPixiContainer; + // 相关的源 url + sourceUrl: string; + sourceExt: string; + sourceType: 'img' | 'live2d' | 'spine' | 'gif' | 'video'; +} + +export interface ILive2DRecord { + target: string; + motion: string; + expression: string; +} + +// export interface IRegisterTickerOpr { +// tickerGeneratorFn: (targetKey: string, duration: number) => PIXI.TickerCallback<number>; +// key: string; +// target: string; +// duration: number; +// } + +// @ts-ignore +window.PIXI = PIXI; + +export default class PixiStage { + /** + * 当前的 PIXI App + */ + public currentApp: PIXI.Application | null = null; + public readonly effectsContainer: PIXI.Container; + public frameDuration = 16.67; + public notUpdateBacklogEffects = false; + private readonly figureContainer: PIXI.Container; + private figureObjects: Array<IStageObject> = []; + private readonly backgroundContainer: PIXI.Container; + private backgroundObjects: Array<IStageObject> = []; + + // 注册到 Ticker 上的函数 + private stageAnimations: Array<IStageAnimationObject> = []; + private assetLoader = new PIXI.Loader(); + private loadQueue: { url: string; callback: () => void; name?: string }[] = []; + private live2dFigureRecorder: Array<ILive2DRecord> = []; + + // 锁定变换对象(对象可能正在执行动画,不能应用变换) + private lockTransformTarget: Array<string> = []; + private stageWidth = SCREEN_CONSTANTS.width; + private stageHeight = SCREEN_CONSTANTS.height; + /** + * 暂时没用上,以后可能用 + * @private + */ + private MAX_TEX_COUNT = 10; + + public constructor() { + const app = new PIXI.Application({ + backgroundAlpha: 0, + preserveDrawingBuffer: true, + }); + // @ts-ignore + + window.PIXIapp = this; // @ts-ignore + window.__PIXI_APP__ = app; + // 清空原节点 + const pixiContainer = document.getElementById('pixiContianer'); + if (pixiContainer) { + pixiContainer.innerHTML = ''; + pixiContainer.appendChild(app.view); + } + + // 设置样式 + app.renderer.view.style.position = 'absolute'; + app.renderer.view.style.display = 'block'; + app.renderer.view.id = 'pixiCanvas'; + // @ts-ignore + app.renderer.autoResize = true; + const appRoot = document.getElementById('root'); + if (appRoot) { + app.renderer.resize(appRoot.clientWidth, appRoot.clientHeight); + } + if (isIOS) { + app.renderer.view.style.zIndex = '-5'; + } + + // 设置可排序 + app.stage.sortableChildren = true; + + // 添加 3 个 Container 用于做渲染 + this.effectsContainer = new PIXI.Container(); + this.effectsContainer.zIndex = 3; + this.figureContainer = new PIXI.Container(); + this.figureContainer.sortableChildren = true; // 允许立绘启用 z-index + this.figureContainer.zIndex = 2; + this.backgroundContainer = new PIXI.Container(); + this.backgroundContainer.zIndex = 0; + app.stage.addChild(this.effectsContainer, this.figureContainer, this.backgroundContainer); + this.currentApp = app; + // 每 5s 获取帧率,并且防 loader 死 + const update = () => { + this.updateFps(); + setTimeout(update, 10000); + }; + update(); + // loader 防死 + const reload = () => { + setTimeout(reload, 500); + this.callLoader(); + }; + reload(); + } + + public getFigureObjects() { + return this.figureObjects; + } + + public getAllLockedObject() { + return this.lockTransformTarget; + } + + /** + * 注册动画 + * @param animationObject + * @param key + * @param target + */ + public registerAnimation(animationObject: IAnimationObject | null, key: string, target = 'default') { + if (!animationObject) return; + this.stageAnimations.push({ uuid: uuid(), animationObject, key: key, targetKey: target, type: 'common' }); + // 上锁 + this.lockStageObject(target); + animationObject.setStartState(); + this.currentApp?.ticker.add(animationObject.tickerFunc); + } + + /** + * 注册预设动画 + * @param animationObject + * @param key + * @param target + * @param currentEffects + */ + // eslint-disable-next-line max-params + public registerPresetAnimation( + animationObject: IAnimationObject | null, + key: string, + target = 'default', + currentEffects: IEffect[], + ) { + if (!animationObject) return; + const effect = currentEffects.find((effect) => effect.target === target); + if (effect) { + const targetPixiContainer = this.getStageObjByKey(target); + if (targetPixiContainer) { + const container = targetPixiContainer.pixiContainer; + Object.assign(container, effect.transform); + } + return; + } + this.stageAnimations.push({ uuid: uuid(), animationObject, key: key, targetKey: target, type: 'preset' }); + // 上锁 + this.lockStageObject(target); + animationObject.setStartState(); + this.currentApp?.ticker.add(animationObject.tickerFunc); + } + + public stopPresetAnimationOnTarget(target: string) { + const targetPresetAnimations = this.stageAnimations.find((e) => e.targetKey === target && e.type === 'preset'); + if (targetPresetAnimations) { + this.removeAnimation(targetPresetAnimations.key); + } + } + + /** + * 移除动画 + * @param key + */ + public removeAnimation(key: string) { + const index = this.stageAnimations.findIndex((e) => e.key === key); + if (index >= 0) { + const thisTickerFunc = this.stageAnimations[index]; + this.currentApp?.ticker.remove(thisTickerFunc.animationObject.tickerFunc); + thisTickerFunc.animationObject.setEndState(); + this.unlockStageObject(thisTickerFunc.targetKey ?? 'default'); + this.stageAnimations.splice(index, 1); + } + } + + public removeAnimationWithSetEffects(key: string) { + const index = this.stageAnimations.findIndex((e) => e.key === key); + if (index >= 0) { + const thisTickerFunc = this.stageAnimations[index]; + this.currentApp?.ticker.remove(thisTickerFunc.animationObject.tickerFunc); + thisTickerFunc.animationObject.setEndState(); + const webgalFilters = thisTickerFunc.animationObject.getEndFilterEffect?.() ?? {}; + this.unlockStageObject(thisTickerFunc.targetKey ?? 'default'); + if (thisTickerFunc.targetKey) { + const target = this.getStageObjByKey(thisTickerFunc.targetKey); + if (target) { + const targetTransform = { + alpha: target.pixiContainer.alphaFilterVal, + scale: { + x: target.pixiContainer.scale.x, + y: target.pixiContainer.scale.y, + }, + // pivot: { + // x: target.pixiContainer.pivot.x, + // y: target.pixiContainer.pivot.y, + // }, + position: { + x: target.pixiContainer.x, + y: target.pixiContainer.y, + }, + rotation: target.pixiContainer.rotation, + // @ts-ignore + blur: target.pixiContainer.blur, + ...webgalFilters, + }; + let effect: IEffect = { + target: thisTickerFunc.targetKey, + transform: targetTransform, + }; + webgalStore.dispatch(stageActions.updateEffect(effect)); + // if (!this.notUpdateBacklogEffects) updateCurrentBacklogEffects(webgalStore.getState().stage.effects); + } + } + this.stageAnimations.splice(index, 1); + } + } + + // eslint-disable-next-line max-params + public performMouthSyncAnimation( + key: string, + targetAnimation: IFigureAssociatedAnimation, + mouthState: string, + presetPosition: string, + ) { + const currentFigure = this.getStageObjByKey(key)?.pixiContainer as WebGALPixiContainer; + + if (!currentFigure) { + return; + } + + const mouthTextureUrls: any = { + open: targetAnimation.mouthAnimation.open, + half_open: targetAnimation.mouthAnimation.halfOpen, + closed: targetAnimation.mouthAnimation.close, + }; + + // Load mouth texture (reuse if already loaded) + this.loadAsset(mouthTextureUrls[mouthState], () => { + const texture = this.assetLoader.resources[mouthTextureUrls[mouthState]].texture; + const sprite = currentFigure?.children?.[0] as PIXI.Sprite; + if (!texture || !sprite) { + return; + } + sprite.texture = texture; + }); + } + + // eslint-disable-next-line max-params + public performBlinkAnimation( + key: string, + targetAnimation: IFigureAssociatedAnimation, + blinkState: string, + presetPosition: string, + ) { + const currentFigure = this.getStageObjByKey(key)?.pixiContainer as WebGALPixiContainer; + + if (!currentFigure) { + return; + } + const blinkTextureUrls: any = { + open: targetAnimation.blinkAnimation.open, + closed: targetAnimation.blinkAnimation.close, + }; + + // Load eye texture (reuse if already loaded) + this.loadAsset(blinkTextureUrls[blinkState], () => { + const texture = this.assetLoader.resources[blinkTextureUrls[blinkState]].texture; + const sprite = currentFigure?.children?.[0] as PIXI.Sprite; + if (!texture || !sprite) { + return; + } + sprite.texture = texture; + }); + } + + /** + * 添加背景 + * @param key 背景的标识,一般和背景类型有关 + * @param url 背景图片url + */ + public addBg(key: string, url: string) { + // const loader = this.assetLoader; + const loader = this.assetLoader; + // 准备用于存放这个背景的 Container + const thisBgContainer = new WebGALPixiContainer(); + + // 是否有相同 key 的背景 + const setBgIndex = this.backgroundObjects.findIndex((e) => e.key === key); + const isBgSet = setBgIndex >= 0; + + // 已经有一个这个 key 的背景存在了 + if (isBgSet) { + // 挤占 + this.removeStageObjectByKey(key); + } + + // 挂载 + this.backgroundContainer.addChild(thisBgContainer); + const bgUuid = uuid(); + this.backgroundObjects.push({ + uuid: bgUuid, + key: key, + pixiContainer: thisBgContainer, + sourceUrl: url, + sourceType: 'img', + sourceExt: this.getExtName(url), + }); + + // 完成图片加载后执行的函数 + const setup = () => { + // TODO:找一个更好的解法,现在的解法是无论是否复用原来的资源,都设置一个延时以让动画工作正常! + + setTimeout(() => { + const texture = loader.resources?.[url]?.texture; + if (texture && this.getStageObjByUuid(bgUuid)) { + /** + * 重设大小 + */ + const originalWidth = texture.width; + const originalHeight = texture.height; + const scaleX = this.stageWidth / originalWidth; + const scaleY = this.stageHeight / originalHeight; + const targetScale = Math.max(scaleX, scaleY); + const bgSprite = new PIXI.Sprite(texture); + bgSprite.scale.x = targetScale; + bgSprite.scale.y = targetScale; + bgSprite.anchor.set(0.5); + bgSprite.position.y = this.stageHeight / 2; + thisBgContainer.setBaseX(this.stageWidth / 2); + thisBgContainer.setBaseY(this.stageHeight / 2); + thisBgContainer.pivot.set(0, this.stageHeight / 2); + + // 挂载 + thisBgContainer.addChild(bgSprite); + } + }, 0); + }; + + /** + * 加载器部分 + */ + this.cacheGC(); + if (!loader.resources?.[url]?.texture) { + this.loadAsset(url, setup); + } else { + // 复用 + setup(); + } + } + + public addSpineBg(key: string, url: string) { + const spineId = `spine-${url}`; + const loader = this.assetLoader; + // 准备用于存放这个背景的 Container + const thisBgContainer = new WebGALPixiContainer(); + + // 是否有相同 key 的背景 + const setBgIndex = this.backgroundObjects.findIndex((e) => e.key === key); + const isBgSet = setBgIndex >= 0; + + // 已经有一个这个 key 的背景存在了 + if (isBgSet) { + // 挤占 + this.removeStageObjectByKey(key); + } + + // 挂载 + this.backgroundContainer.addChild(thisBgContainer); + const bgUuid = uuid(); + this.backgroundObjects.push({ + uuid: bgUuid, + key: key, + pixiContainer: thisBgContainer, + sourceUrl: url, + sourceType: 'live2d', + sourceExt: this.getExtName(url), + }); + + // 完成图片加载后执行的函数 + const setup = () => { + const spineResource: any = this.assetLoader.resources?.[spineId]; + // TODO:找一个更好的解法,现在的解法是无论是否复用原来的资源,都设置一个延时以让动画工作正常! + setTimeout(() => { + if (spineResource && this.getStageObjByUuid(bgUuid)) { + const bgSpine = new Spine(spineResource.spineData); + const transY = spineResource?.spineData?.y ?? 0; + /** + * 重设大小 + */ + const originalWidth = bgSpine.width; // TODO: 视图大小可能小于画布大小,应提供参数指定视图大小 + const originalHeight = bgSpine.height; // TODO: 视图大小可能小于画布大小,应提供参数指定视图大小 + const scaleX = this.stageWidth / originalWidth; + const scaleY = this.stageHeight / originalHeight; + logger.debug('bgSpine state', bgSpine.state); + // TODO: 也许应该使用 setAnimation 播放初始动画 + if (bgSpine.spineData.animations.length > 0) { + // 播放首个动画 + bgSpine.state.setAnimation(0, bgSpine.spineData.animations[0].name, true); + } + const targetScale = Math.max(scaleX, scaleY); + const bgSprite = new PIXI.Sprite(); + bgSprite.addChild(bgSpine); + bgSprite.scale.x = targetScale; + bgSprite.scale.y = targetScale; + bgSprite.anchor.set(0.5); + bgSprite.position.y = this.stageHeight / 2; + thisBgContainer.setBaseX(this.stageWidth / 2); + thisBgContainer.setBaseY(this.stageHeight / 2); + thisBgContainer.pivot.set(0, this.stageHeight / 2); + + // 挂载 + thisBgContainer.addChild(bgSprite); + } + }, 0); + }; + + /** + * 加载器部分 + */ + this.cacheGC(); + if (!loader.resources?.[url]) { + this.loadAsset(url, setup, spineId); + } else { + // 复用 + setup(); + } + } + + /** + * 添加立绘 + * @param key 立绘的标识,一般和立绘位置有关 + * @param url 立绘图片url + * @param presetPosition + */ + public addFigure(key: string, url: string, presetPosition: 'left' | 'center' | 'right' = 'center') { + const loader = this.assetLoader; + // 准备用于存放这个立绘的 Container + const thisFigureContainer = new WebGALPixiContainer(); + + // 是否有相同 key 的立绘 + const setFigIndex = this.figureObjects.findIndex((e) => e.key === key); + const isFigSet = setFigIndex >= 0; + + // 已经有一个这个 key 的立绘存在了 + if (isFigSet) { + this.removeStageObjectByKey(key); + } + + const metadata = this.getFigureMetadataByKey(key); + if (metadata) { + if (metadata.zIndex) { + thisFigureContainer.zIndex = metadata.zIndex; + } + } + // 挂载 + this.figureContainer.addChild(thisFigureContainer); + const figureUuid = uuid(); + this.figureObjects.push({ + uuid: figureUuid, + key: key, + pixiContainer: thisFigureContainer, + sourceUrl: url, + sourceType: 'img', + sourceExt: this.getExtName(url), + }); + + // 完成图片加载后执行的函数 + const setup = () => { + // TODO:找一个更好的解法,现在的解法是无论是否复用原来的资源,都设置一个延时以让动画工作正常! + setTimeout(() => { + const texture = loader.resources?.[url]?.texture; + if (texture && this.getStageObjByUuid(figureUuid)) { + /** + * 重设大小 + */ + const originalWidth = texture.width; + const originalHeight = texture.height; + const scaleX = this.stageWidth / originalWidth; + const scaleY = this.stageHeight / originalHeight; + const targetScale = Math.min(scaleX, scaleY); + const figureSprite = new PIXI.Sprite(texture); + figureSprite.scale.x = targetScale; + figureSprite.scale.y = targetScale; + figureSprite.anchor.set(0.5); + figureSprite.position.y = this.stageHeight / 2; + const targetWidth = originalWidth * targetScale; + const targetHeight = originalHeight * targetScale; + thisFigureContainer.setBaseY(this.stageHeight / 2); + if (targetHeight < this.stageHeight) { + thisFigureContainer.setBaseY(this.stageHeight / 2 + this.stageHeight - targetHeight / 2); + } + if (presetPosition === 'center') { + thisFigureContainer.setBaseX(this.stageWidth / 2); + } + if (presetPosition === 'left') { + thisFigureContainer.setBaseX(targetWidth / 2); + } + if (presetPosition === 'right') { + thisFigureContainer.setBaseX(this.stageWidth - targetWidth / 2); + } + thisFigureContainer.pivot.set(0, this.stageHeight / 2); + thisFigureContainer.addChild(figureSprite); + } + }, 0); + }; + + /** + * 加载器部分 + */ + this.cacheGC(); + if (!loader.resources?.[url]?.texture) { + this.loadAsset(url, setup); + } else { + // 复用 + setup(); + } + } + + /** + * 添加 Spine 立绘 + * @param key 立绘的标识,一般和立绘位置有关 + * @param url 立绘图片url + * @param presetPosition + */ + public addSpineFigure(key: string, url: string, presetPosition: 'left' | 'center' | 'right' = 'center') { + const spineId = `spine-${url}`; + const loader = this.assetLoader; + // 准备用于存放这个立绘的 Container + const thisFigureContainer = new WebGALPixiContainer(); + + // 是否有相同 key 的立绘 + const setFigIndex = this.figureObjects.findIndex((e) => e.key === key); + const isFigSet = setFigIndex >= 0; + + // 已经有一个这个 key 的立绘存在了 + if (isFigSet) { + this.removeStageObjectByKey(key); + } + + const metadata = this.getFigureMetadataByKey(key); + if (metadata) { + if (metadata.zIndex) { + thisFigureContainer.zIndex = metadata.zIndex; + } + } + // 挂载 + this.figureContainer.addChild(thisFigureContainer); + const figureUuid = uuid(); + this.figureObjects.push({ + uuid: figureUuid, + key: key, + pixiContainer: thisFigureContainer, + sourceUrl: url, + sourceType: 'live2d', + sourceExt: this.getExtName(url), + }); + + // 完成图片加载后执行的函数 + const setup = () => { + const spineResource: any = this.assetLoader.resources?.[spineId]; + // TODO:找一个更好的解法,现在的解法是无论是否复用原来的资源,都设置一个延时以让动画工作正常! + setTimeout(() => { + if (spineResource && this.getStageObjByUuid(figureUuid)) { + const figureSpine = new Spine(spineResource.spineData); + const transY = spineResource?.spineData?.y ?? 0; + /** + * 重设大小 + */ + const originalWidth = figureSpine.width; + const originalHeight = figureSpine.height; + const scaleX = this.stageWidth / originalWidth; + const scaleY = this.stageHeight / originalHeight; + // 我也不知道为什么啊啊啊啊 + figureSpine.y = -(scaleY * transY) / 2; + figureSpine.state.setAnimation(0, '07', true); + const targetScale = Math.min(scaleX, scaleY); + const figureSprite = new PIXI.Sprite(); + figureSprite.addChild(figureSpine); + figureSprite.scale.x = targetScale; + figureSprite.scale.y = targetScale; + figureSprite.anchor.set(0.5); + figureSprite.position.y = this.stageHeight / 2; + const targetWidth = originalWidth * targetScale; + const targetHeight = originalHeight * targetScale; + thisFigureContainer.setBaseY(this.stageHeight / 2); + if (targetHeight < this.stageHeight) { + thisFigureContainer.setBaseY(this.stageHeight / 2 + this.stageHeight - targetHeight / 2); + } + if (presetPosition === 'center') { + thisFigureContainer.setBaseX(this.stageWidth / 2); + } + if (presetPosition === 'left') { + thisFigureContainer.setBaseX(targetWidth / 2); + } + if (presetPosition === 'right') { + thisFigureContainer.setBaseX(this.stageWidth - targetWidth / 2); + } + thisFigureContainer.pivot.set(0, this.stageHeight / 2); + thisFigureContainer.addChild(figureSprite); + } + }, 0); + }; + + /** + * 加载器部分 + */ + this.cacheGC(); + if (!loader.resources?.[url]) { + this.loadAsset(url, setup, spineId); + } else { + // 复用 + setup(); + } + } + + /** + * Live2d立绘,如果要使用 Live2D,取消这里的注释 + * @param jsonPath + */ + // eslint-disable-next-line max-params + // public addLive2dFigure(key: string, jsonPath: string, pos: string, motion: string, expression: string) { + // let stageWidth = this.stageWidth; + // let stageHeight = this.stageHeight; + // logger.debug('Using motion:', motion); + // + // figureCash.push(jsonPath); + // + // const loader = this.assetLoader; + // // 准备用于存放这个立绘的 Container + // const thisFigureContainer = new WebGALPixiContainer(); + // + // // 是否有相同 key 的立绘 + // const setFigIndex = this.figureObjects.findIndex((e) => e.key === key); + // const isFigSet = setFigIndex >= 0; + // + // // 已经有一个这个 key 的立绘存在了 + // if (isFigSet) { + // this.removeStageObjectByKey(key); + // } + // + // const metadata = this.getFigureMetadataByKey(key); + // if (metadata) { + // if (metadata.zIndex) { + // thisFigureContainer.zIndex = metadata.zIndex; + // } + // } + // // 挂载 + // this.figureContainer.addChild(thisFigureContainer); + // this.figureObjects.push({ + // uuid: uuid(), + // key: key, + // pixiContainer: thisFigureContainer, + // sourceUrl: jsonPath, + // sourceType: 'live2d', + // sourceExt: 'json', + // }); + // // eslint-disable-next-line @typescript-eslint/no-this-alias + // const instance = this; + // + // const setup = () => { + // if (thisFigureContainer) { + // (async function () { + // let overrideBounds: [number, number, number, number] = [0, 0, 0, 0]; + // const mot = webgalStore.getState().stage.live2dMotion.find((e) => e.target === key); + // if (mot?.overrideBounds) { + // overrideBounds = mot.overrideBounds; + // } + // console.log(overrideBounds); + // const models = await Promise.all([ + // Live2DModel.from(jsonPath, { + // autoInteract: false, + // overWriteBounds: { + // x0: overrideBounds[0], + // y0: overrideBounds[1], + // x1: overrideBounds[2], + // y1: overrideBounds[3], + // }, + // }), + // ]); + // + // models.forEach((model) => { + // const scaleX = stageWidth / model.width; + // const scaleY = stageHeight / model.height; + // const targetScale = Math.min(scaleX, scaleY) * 1.5; + // const targetWidth = model.width * targetScale; + // // const targetHeight = model.height * targetScale; + // + // model.scale.set(targetScale); + // model.anchor.set(0.5); + // model.position.x = stageWidth / 2; + // model.position.y = stageHeight / 1.2; + // + // if (pos === 'left') { + // model.position.x = targetWidth / 2; + // } + // if (pos === 'right') { + // model.position.x = stageWidth - targetWidth / 2; + // } + // + // let motionToSet = motion; + // let animation_index = 0; + // let priority_number = 3; + // // var audio_link = voiceCash.pop(); + // + // // model.motion(category_name, animation_index, priority_number,location.href + audio_link); + // /** + // * 检查 Motion 和 Expression + // */ + // const motionFromState = webgalStore.getState().stage.live2dMotion.find((e) => e.target === key); + // const expressionFromState = webgalStore.getState().stage.live2dExpression.find((e) => e.target === key); + // if (motionFromState) { + // motionToSet = motionFromState.motion; + // } + // instance.updateL2dMotionByKey(key, motionToSet); + // model.motion(motionToSet, animation_index, priority_number); + // let expressionToSet = expression; + // if (expressionFromState) { + // expressionToSet = expressionFromState.expression; + // } + // instance.updateL2dExpressionByKey(key, expressionToSet); + // model.expression(expressionToSet); + // // @ts-ignore + // if (model.internalModel.eyeBlink) { + // // @ts-ignore + // model.internalModel.eyeBlink.blinkInterval = 1000 * 60 * 60 * 24; // @ts-ignore + // model.internalModel.eyeBlink.nextBlinkTimeLeft = 1000 * 60 * 60 * 24; + // } + // + // // lip-sync is still a problem and you can not. + // SoundManager.volume = 0; // @ts-ignore + // if (model.internalModel.angleXParamIndex !== undefined) model.internalModel.angleXParamIndex = 999; // @ts-ignore + // if (model.internalModel.angleYParamIndex !== undefined) model.internalModel.angleYParamIndex = 999; // @ts-ignore + // if (model.internalModel.angleZParamIndex !== undefined) model.internalModel.angleZParamIndex = 999; + // thisFigureContainer.addChild(model); + // }); + // })(); + // } + // }; + // + // /** + // * 加载器部分 + // */ + // const resourses = Object.keys(loader.resources); + // this.cacheGC(); + // if (!resourses.includes(jsonPath)) { + // this.loadAsset(jsonPath, setup); + // } else { + // // 复用 + // setup(); + // } + // } + + public changeModelMotionByKey(key: string, motion: string) { + // logger.debug(`Applying motion ${motion} to ${key}`); + const target = this.figureObjects.find((e) => e.key === key); + if (target?.sourceType !== 'live2d') return; + const figureRecordTarget = this.live2dFigureRecorder.find((e) => e.target === key); + if (target && figureRecordTarget?.motion !== motion) { + const container = target.pixiContainer; + const children = container.children; + for (const model of children) { + let category_name = motion; + let animation_index = 0; + let priority_number = 3; // @ts-ignore + const internalModel = model?.internalModel ?? undefined; // 安全访问 + internalModel?.motionManager?.stopAllMotions?.(); + // @ts-ignore + model.motion(category_name, animation_index, priority_number); + } + this.updateL2dMotionByKey(key, motion); + } + } + + public changeModelExpressionByKey(key: string, expression: string) { + // logger.debug(`Applying expression ${expression} to ${key}`); + const target = this.figureObjects.find((e) => e.key === key); + if (target?.sourceType !== 'live2d') return; + const figureRecordTarget = this.live2dFigureRecorder.find((e) => e.target === key); + if (target && figureRecordTarget?.expression !== expression) { + const container = target.pixiContainer; + const children = container.children; + for (const model of children) { + // @ts-ignore + model.expression(expression); + } + this.updateL2dExpressionByKey(key, expression); + } + } + + public setModelMouthY(key: string, y: number) { + function mapToZeroOne(value: number) { + return value < 50 ? 0 : (value - 50) / 50; + } + + const paramY = mapToZeroOne(y); + const target = this.figureObjects.find((e) => e.key === key); + if (target && target.sourceType === 'live2d') { + const container = target.pixiContainer; + const children = container.children; + for (const model of children) { + // @ts-ignore + if (model?.internalModel) { + // @ts-ignore + if (model?.internalModel?.coreModel?.setParamFloat) + // @ts-ignore + model?.internalModel?.coreModel?.setParamFloat?.('PARAM_MOUTH_OPEN_Y', paramY); + // @ts-ignore + if (model?.internalModel?.coreModel?.setParameterValueById) + // @ts-ignore + model?.internalModel?.coreModel?.setParameterValueById('ParamMouthOpenY', paramY); + } + } + } + } + + /** + * 根据 key 获取舞台上的对象 + * @param key + */ + public getStageObjByKey(key: string) { + return [...this.figureObjects, ...this.backgroundObjects].find((e) => e.key === key); + } + + public getStageObjByUuid(objUuid: string) { + return [...this.figureObjects, ...this.backgroundObjects].find((e) => e.uuid === objUuid); + } + + public getAllStageObj() { + return [...this.figureObjects, ...this.backgroundObjects]; + } + + /** + * 根据 key 删除舞台上的对象 + * @param key + */ + public removeStageObjectByKey(key: string) { + const indexFig = this.figureObjects.findIndex((e) => e.key === key); + const indexBg = this.backgroundObjects.findIndex((e) => e.key === key); + if (indexFig >= 0) { + const bgSprite = this.figureObjects[indexFig]; + for (const element of bgSprite.pixiContainer.children) { + element.destroy(); + } + bgSprite.pixiContainer.destroy(); + this.figureContainer.removeChild(bgSprite.pixiContainer); + this.figureObjects.splice(indexFig, 1); + } + if (indexBg >= 0) { + const bgSprite = this.backgroundObjects[indexBg]; + for (const element of bgSprite.pixiContainer.children) { + element.destroy(); + } + bgSprite.pixiContainer.destroy(); + this.backgroundContainer.removeChild(bgSprite.pixiContainer); + this.backgroundObjects.splice(indexBg, 1); + } + // /** + // * 删掉相关 Effects,因为已经移除了 + // */ + // const prevEffects = webgalStore.getState().stage.effects; + // const newEffects = __.cloneDeep(prevEffects); + // const index = newEffects.findIndex((e) => e.target === key); + // if (index >= 0) { + // newEffects.splice(index, 1); + // } + // updateCurrentEffects(newEffects); + } + + public cacheGC() { + PIXI.utils.clearTextureCache(); + } + + private updateL2dMotionByKey(target: string, motion: string) { + const figureTargetIndex = this.live2dFigureRecorder.findIndex((e) => e.target === target); + if (figureTargetIndex >= 0) { + this.live2dFigureRecorder[figureTargetIndex].motion = motion; + } else { + this.live2dFigureRecorder.push({ target, motion, expression: '' }); + } + } + + private updateL2dExpressionByKey(target: string, expression: string) { + const figureTargetIndex = this.live2dFigureRecorder.findIndex((e) => e.target === target); + if (figureTargetIndex >= 0) { + this.live2dFigureRecorder[figureTargetIndex].expression = expression; + } else { + this.live2dFigureRecorder.push({ target, motion: '', expression }); + } + } + + private loadAsset(url: string, callback: () => void, name?: string) { + /** + * Loader 复用疑似有问题,转而采用先前的单独方式 + */ + this.loadQueue.unshift({ url, callback, name }); + /** + * 尝试启动加载 + */ + this.callLoader(); + } + + private callLoader() { + if (!this.assetLoader.loading) { + const front = this.loadQueue.shift(); + if (front) { + try { + if (this.assetLoader.resources[front.url]) { + front.callback(); + this.callLoader(); + } else { + if (front.name) { + this.assetLoader.add(front.name, front.url).load(() => { + front.callback(); + this.callLoader(); + }); + } else { + this.assetLoader.add(front.url).load(() => { + front.callback(); + this.callLoader(); + }); + } + } + } catch (error) { + logger.fatal('PIXI Loader 故障', error); + front.callback(); + // this.assetLoader.reset(); // 暂时先不用重置 + this.callLoader(); + } + } + } + } + + private updateFps() { + getScreenFps?.(120).then((fps) => { + this.frameDuration = 1000 / (fps as number); + // logger.info('当前帧率', fps); + }); + } + + private lockStageObject(targetName: string) { + this.lockTransformTarget.push(targetName); + } + + private unlockStageObject(targetName: string) { + const index = this.lockTransformTarget.findIndex((name) => name === targetName); + if (index >= 0) this.lockTransformTarget.splice(index, 1); + } + + private getExtName(url: string) { + return url.split('.').pop() ?? 'png'; + } + + private getFigureMetadataByKey(key: string): IFigureMetadata | undefined { + console.log(key, webgalStore.getState().stage.figureMetaData); + return webgalStore.getState().stage.figureMetaData[key]; + } +} + +function updateCurrentBacklogEffects(newEffects: IEffect[]) { + /** + * 更新当前 backlog 条目的 effects 记录 + */ + setTimeout(() => { + WebGAL.backlogManager.editLastBacklogItemEffect(cloneDeep(newEffects)); + }, 50); + + webgalStore.dispatch(setStage({ key: 'effects', value: newEffects })); +} + +/** + * @param {number} targetCount 不小于1的整数,表示经过targetCount帧之后返回结果 + * @return {Promise<number>} + */ +const getScreenFps = (() => { + // 先做一下兼容性处理 + const nextFrame = [ + window.requestAnimationFrame, + // @ts-ignore + window.webkitRequestAnimationFrame, + // @ts-ignore + window.mozRequestAnimationFrame, + ].find((fn) => fn); + if (!nextFrame) { + console.error('requestAnimationFrame is not supported!'); + return; + } + return (targetCount = 60) => { + // 判断参数是否合规 + if (targetCount < 1) throw new Error('targetCount cannot be less than 1.'); + const beginDate = Date.now(); + let count = 0; + return new Promise((resolve) => { + (function log() { + nextFrame(() => { + if (++count >= targetCount) { + const diffDate = Date.now() - beginDate; + const fps = (count / diffDate) * 1000; + return resolve(fps); + } + log(); + }); + })(); + }); + }; +})(); diff --git a/packages/webgal/src/Core/controller/stage/pixi/WebGALPixiContainer.ts b/packages/webgal/src/Core/controller/stage/pixi/WebGALPixiContainer.ts new file mode 100644 index 000000000..5dc9047c2 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/WebGALPixiContainer.ts @@ -0,0 +1,331 @@ +import { OldFilmFilter } from '@pixi/filter-old-film'; +import { DotFilter } from '@pixi/filter-dot'; +import { ReflectionFilter } from '@pixi/filter-reflection'; +import { GlitchFilter } from '@pixi/filter-glitch'; +import { RGBSplitFilter } from '@pixi/filter-rgb-split'; +import { GodrayFilter } from '@pixi/filter-godray'; +import * as PIXI from 'pixi.js'; +import { + getOrCreateShockwaveFilterImpl, + getShockwaveFilter, + setShockwaveFilter, +} from '@/Core/controller/stage/pixi/filters/ShockwaveFilter'; +import { + getOrCreateRadiusAlphaFilterImpl, + getRadiusAlphaFilter, + setRadiusAlphaFilter, +} from '@/Core/controller/stage/pixi/shaders/RadiusAlphaFilter'; + +export class WebGALPixiContainer extends PIXI.Container { + public containerFilters = new Map<string, PIXI.Filter>(); + private baseX = 0; + private baseY = 0; + + private alphaFilter = new PIXI.filters.AlphaFilter(1); + + public constructor() { + super(); + this.addFilter(this.alphaFilter); + } + + public get alphaFilterVal() { + return this.alphaFilter.alpha; + } + + public set alphaFilterVal(value: number) { + this.alphaFilter.alpha = value; + } + + public addFilter(filter: PIXI.Filter) { + if (this.filters) { + this.filters.push(filter); + } else { + this.filters = [filter]; + } + } + + public removeFilter(name: string) { + const filter = this.containerFilters.get(name); + if (filter) { + const index = (this?.filters ?? []).findIndex((e) => e === filter); + if (this.filters) { + this.filters.splice(index, 1); + this.containerFilters.delete(name); + } + } + } + + public get blur(): number { + // @ts-ignore + return this.getOrCreateBlurFilter().blur as number; + } + + public set blur(value: number) { + // @ts-ignore + this.getOrCreateBlurFilter().blur = value; + } + + public get x() { + const rX = super.position?.x ?? 0; + return rX - this.baseX; + } + + public set x(value) { + if (!super.position) { + return; + } + super.position.x = value + this.baseX; + } + + public get y() { + const rY = super.position?.y ?? 0; + return rY - this.baseY; + } + + public set y(value) { + if (!super.position) { + return; + } + super.position.y = value + this.baseY; + } + + public setBaseX(x: number) { + const originalX = this.x; + this.baseX = x; + this.x = originalX; + } + + public setBaseY(y: number) { + const originalY = this.y; + this.baseY = y; + this.y = originalY; + } + + public getOrCreateBlurFilter() { + const blurFilterFromMap = this.containerFilters.get('blur'); + if (blurFilterFromMap) { + return blurFilterFromMap; + } else { + const blurFilter = new PIXI.filters.BlurFilter(); + // 默认的 blur 是8,覆盖掉 + blurFilter.blur = 0; + this.addFilter(blurFilter); + this.containerFilters.set('blur', blurFilter); + return blurFilter; + } + } + + /** + * old film filter + * @public + */ + public getOrCreateOldFilmFilter(createMode = true) { + const blurFilterFromMap = this.containerFilters.get('oldFilm'); + if (blurFilterFromMap) { + return blurFilterFromMap; + } else { + if (createMode) { + const oldFilm = new OldFilmFilter(); + this.addFilter(oldFilm); + this.containerFilters.set('oldFilm', oldFilm); + return oldFilm; + } else return null; + } + } + public get oldFilm(): number { + if (this.getOrCreateOldFilmFilter(false)) return 1; + return 0; + } + + public set oldFilm(value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + this.removeFilter('oldFilm'); + } else this.getOrCreateOldFilmFilter(); + } + + /** + * dot film filter + * @public + */ + public getOrCreateDotFilter(createMode = true) { + const blurFilterFromMap = this.containerFilters.get('dotFilm'); + if (blurFilterFromMap) { + return blurFilterFromMap; + } else { + if (createMode) { + const dotFilm = new DotFilter(); + this.addFilter(dotFilm); + this.containerFilters.set('dotFilm', dotFilm); + return dotFilm; + } else return null; + } + } + public get dotFilm(): number { + if (this.getOrCreateDotFilter(false)) return 1; + return 0; + } + + public set dotFilm(value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + this.removeFilter('dotFilm'); + } else this.getOrCreateDotFilter(); + } + + /** + * reflection film filter + * @public + */ + public getOrCreateReflectionFilter(createMode = true) { + const blurFilterFromMap = this.containerFilters.get('reflectionFilm'); + if (blurFilterFromMap) { + return blurFilterFromMap; + } else { + if (createMode) { + const reflectionFilm = new ReflectionFilter(); + this.addFilter(reflectionFilm); + this.containerFilters.set('reflectionFilm', reflectionFilm); + return reflectionFilm; + } else return null; + } + } + public get reflectionFilm(): number { + if (this.getOrCreateReflectionFilter(false)) return 1; + return 0; + } + + public set reflectionFilm(value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + this.removeFilter('reflectionFilm'); + } else this.getOrCreateReflectionFilter(); + } + + /** + * glitchFilter film filter + * @public + */ + public getOrCreateGlitchFilter(createMode = true) { + const blurFilterFromMap = this.containerFilters.get('glitchFilm'); + if (blurFilterFromMap) { + return blurFilterFromMap; + } else { + if (createMode) { + const glitchFilm = new GlitchFilter(); + this.addFilter(glitchFilm); + this.containerFilters.set('glitchFilm', glitchFilm); + return glitchFilm; + } else return null; + } + } + public get glitchFilm(): number { + if (this.getOrCreateGlitchFilter(false)) return 1; + return 0; + } + + public set glitchFilm(value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + this.removeFilter('glitchFilm'); + } else this.getOrCreateGlitchFilter(); + } + + /** + * rgbSplitFilter film filter + * @public + */ + public getOrCreateRGBSplitFilter(createMode = true) { + const blurFilterFromMap = this.containerFilters.get('rgbFilm'); + if (blurFilterFromMap) { + return blurFilterFromMap; + } else { + if (createMode) { + const rgbFilm = new RGBSplitFilter(); + this.addFilter(rgbFilm); + this.containerFilters.set('rgbFilm', rgbFilm); + return rgbFilm; + } + } + } + public get rgbFilm(): number { + if (this.getOrCreateRGBSplitFilter(false)) return 1; + return 0; + } + + public set rgbFilm(value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + this.removeFilter('rgbFilm'); + } else this.getOrCreateRGBSplitFilter(); + } + + /** + * godrayFilter film filter + * @public + */ + public getOrCreateGodrayFilter(createMode = true) { + const blurFilterFromMap = this.containerFilters.get('godrayFilm'); + if (blurFilterFromMap) { + return blurFilterFromMap; + } else { + if (createMode) { + const godrayFilm = new GodrayFilter(); + this.addFilter(godrayFilm); + this.containerFilters.set('godrayFilm', godrayFilm); + return godrayFilm; + } + } + } + public get godrayFilm(): number { + if (this.getOrCreateGodrayFilter(false)) return 1; + return 0; + } + + public set godrayFilm(value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + this.removeFilter('godrayFilm'); + } else this.getOrCreateGodrayFilter(); + } + + /** + * ShockwaveFilter + */ + + public getOrCreateShockwaveFilter(createMode = true) { + return getOrCreateShockwaveFilterImpl(this, createMode); + } + public get shockwaveFilter(): number { + return getShockwaveFilter(this); + } + public set shockwaveFilter(value: number) { + setShockwaveFilter(this, value); + } + + /** + * RadiusAlphaFilter + */ + + public getOrCreateRadiusAlphaFilter(createMode = true) { + return getOrCreateRadiusAlphaFilterImpl(this, createMode); + } + public get radiusAlphaFilter(): number { + return getRadiusAlphaFilter(this); + } + public set radiusAlphaFilter(value: number) { + setRadiusAlphaFilter(this, value); + } +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/animations/generateTransformAnimationObj.ts b/packages/webgal/src/Core/controller/stage/pixi/animations/generateTransformAnimationObj.ts new file mode 100644 index 000000000..2c0396415 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/animations/generateTransformAnimationObj.ts @@ -0,0 +1,31 @@ +import { ITransform } from '@/store/stageInterface'; +import { webgalStore } from '@/store/store'; + +type AnimationFrame = ITransform & { duration: number }; +type AnimationObj = Array<AnimationFrame>; + +export function generateTransformAnimationObj( + target: string, + applyFrame: AnimationFrame, + duration: number | string | boolean | null, +): AnimationObj { + let animationObj; + // 获取那个 target 的当前变换 + const transformState = webgalStore.getState().stage.effects; + const targetEffect = transformState.find((effect) => effect.target === target); + applyFrame.duration = 500; + if (duration && typeof duration === 'number') { + applyFrame.duration = duration; + } + animationObj = [applyFrame]; + // 找到 effect + if (targetEffect) { + const effectWithDuration = { ...targetEffect!.transform!, duration: 0 }; + animationObj.unshift(effectWithDuration); + } else { + // 应用默认effect,也就是最终的 effect 的 alpha = 0 版本 + const effectWithDuration = { ...applyFrame, alpha: 0, duration: 0 }; + animationObj.unshift(effectWithDuration); + } + return animationObj; +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/animations/index.ts b/packages/webgal/src/Core/controller/stage/pixi/animations/index.ts new file mode 100644 index 000000000..94998d7b0 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/animations/index.ts @@ -0,0 +1,9 @@ +import { generateUniversalSoftInAnimationObj } from '@/Core/controller/stage/pixi/animations/universalSoftIn'; +import { generateUniversalSoftOffAnimationObj } from '@/Core/controller/stage/pixi/animations/universalSoftOff'; +import { generateTestblurAnimationObj } from '@/Core/controller/stage/pixi/animations/testblur'; + +export const webgalAnimations: Array<{ name: string; animationGenerateFunc: Function }> = [ + { name: 'universalSoftIn', animationGenerateFunc: generateUniversalSoftInAnimationObj }, + { name: 'universalSoftOff', animationGenerateFunc: generateUniversalSoftOffAnimationObj }, + { name: 'testblur', animationGenerateFunc: generateTestblurAnimationObj }, +]; diff --git a/packages/webgal/src/Core/controller/stage/pixi/animations/template.ts b/packages/webgal/src/Core/controller/stage/pixi/animations/template.ts new file mode 100644 index 000000000..74b017a10 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/animations/template.ts @@ -0,0 +1,49 @@ +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 动画创建模板 + * @param targetKey 作用目标 + * @param duration 持续时间 + */ +export function generateTemplateAnimationObj(targetKey: string, duration: number) { + const target = WebGAL.gameplay.pixiStage!.getStageObjByKey(targetKey); + + // 先设置一个通用的初态 + + // TODO:通用初态设置 + /** + * 在此书写为动画设置初态的操作 + */ + function setStartState() {} + + // TODO:通用终态设置 + /** + * 在此书写为动画设置终态的操作 + */ + function setEndState() {} + + /** + * 在此书写动画每一帧执行的函数 + * @param delta + */ + function tickerFunc(delta: number) { + if (target) { + // 要操控的精灵 + const sprite = target.pixiContainer; + // 每一帧的时间 + const baseDuration = WebGAL.gameplay.pixiStage!.frameDuration; + + /** + * 在下面书写具体的动画 + */ + + // 具体的操作...... + } + } + + return { + setStartState, + setEndState, + tickerFunc, + }; +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/animations/testblur.ts b/packages/webgal/src/Core/controller/stage/pixi/animations/testblur.ts new file mode 100644 index 000000000..2bb9a98e9 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/animations/testblur.ts @@ -0,0 +1,59 @@ +import { WebGAL } from '@/Core/WebGAL'; + +export function generateTestblurAnimationObj(targetKey: string, duration: number) { + const target = WebGAL.gameplay.pixiStage!.getStageObjByKey(targetKey); + + // 先设置一个通用的初态 + + // TODO:通用初态设置 + /** + * 在此书写为动画设置初态的操作 + */ + function setStartState() { + if (target) { + target.pixiContainer.alpha = 0; + // @ts-ignore + target.pixiContainer.blur = 0; + } + } + + // TODO:通用终态设置 + /** + * 在此书写为动画设置终态的操作 + */ + function setEndState() { + if (target) { + target.pixiContainer.alpha = 1; + // @ts-ignore + target.pixiContainer.blur = 5; + } + } + + /** + * 在此书写动画每一帧执行的函数 + * @param delta + */ + function tickerFunc(delta: number) { + if (target) { + const container = target.pixiContainer; + const baseDuration = WebGAL.gameplay.pixiStage!.frameDuration; + const currentAddOplityDelta = (duration / baseDuration) * delta; + const increasement = 1 / currentAddOplityDelta; + const decreasement = 5 / currentAddOplityDelta; + if (container.alpha < 1) { + container.alpha += increasement; + } + // @ts-ignore + if (container.blur < 5) { + // @ts-ignore + container.blur += decreasement; + } + } + } + + return { + setStartState, + setEndState, + tickerFunc, + }; +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/animations/timeline.ts b/packages/webgal/src/Core/controller/stage/pixi/animations/timeline.ts new file mode 100644 index 000000000..8d94cd474 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/animations/timeline.ts @@ -0,0 +1,132 @@ +import { ITransform } from '@/store/stageInterface'; +import { animate } from 'popmotion'; +import { WebGAL } from '@/Core/WebGAL'; +import { webgalStore } from '@/store/store'; +import { stageActions } from '@/store/stageReducer'; +import omitBy from 'lodash/omitBy'; +import isUndefined from 'lodash/isUndefined'; + +/** + * 动画创建模板 + * @param timeline + * @param targetKey 作用目标 + * @param duration 持续时间 + */ +export function generateTimelineObj( + timeline: Array<ITransform & { duration: number }>, + targetKey: string, + duration: number, +) { + for (const segment of timeline) { + // 处理 alphaL + // @ts-ignore + segment['alphaFilterVal'] = segment.alpha; + segment.alpha = 1; + } + const target = WebGAL.gameplay.pixiStage!.getStageObjByKey(targetKey); + let currentDelay = 0; + const values = []; + const times: number[] = []; + for (const segment of timeline) { + const segmentDuration = segment.duration; + currentDelay += segmentDuration; + const { position, scale, ...segmentValues } = segment; + // 不能用 scale,因为 popmotion 不能用嵌套 + values.push({ x: position.x, y: position.y, scaleX: scale.x, scaleY: scale.y, ...segmentValues }); + if (duration !== 0) { + times.push(currentDelay / duration); + } else times.push(0); + } + const container = target?.pixiContainer; + let animateInstance: ReturnType<typeof animate> | null = null; + // 只有有 duration 的时候才有动画 + if (duration > 0) { + animateInstance = animate({ + to: values, + offset: times, + duration, + onUpdate: (updateValue) => { + if (container) { + const { scaleX, scaleY, ...val } = updateValue; + Object.assign(container, omitBy(val, isUndefined)); + // 因为 popmotion 不能用嵌套,scale 要手动设置 + if (!isUndefined(scaleX)) container.scale.x = scaleX; + if (!isUndefined(scaleY)) container.scale.y = scaleY; + } + }, + }); + } + + const { duration: sliceDuration, ...endState } = getEndStateEffect(); + webgalStore.dispatch(stageActions.updateEffect({ target: targetKey, transform: endState })); + + /** + * 在此书写为动画设置初态的操作 + */ + function setStartState() { + if (target?.pixiContainer) { + // 不能赋值到 position,因为 x 和 y 被 WebGALPixiContainer 代理,而 position 属性没有代理 + const { position, scale, ...state } = getStartStateEffect(); + const assignValue = omitBy({ x: position.x, y: position.y, ...state }, isUndefined); + Object.assign(target?.pixiContainer, assignValue); + if (target?.pixiContainer) { + if (!isUndefined(scale.x)) { + target.pixiContainer.scale.x = scale.x; + } + if (!isUndefined(scale?.y)) { + target.pixiContainer.scale.y = scale.y; + } + } + } + } + + /** + * 在此书写为动画设置终态的操作 + */ + function setEndState() { + if (animateInstance) animateInstance.stop(); + animateInstance = null; + if (target?.pixiContainer) { + // 不能赋值到 position,因为 x 和 y 被 WebGALPixiContainer 代理,而 position 属性没有代理 + // 不能赋值到 position,因为 x 和 y 被 WebGALPixiContainer 代理,而 position 属性没有代理 + const { position, scale, ...state } = getEndStateEffect(); + const assignValue = omitBy({ x: position.x, y: position.y, ...state }, isUndefined); + Object.assign(target?.pixiContainer, assignValue); + if (target?.pixiContainer) { + if (!isUndefined(scale.x)) { + target.pixiContainer.scale.x = scale.x; + } + if (!isUndefined(scale?.y)) { + target.pixiContainer.scale.y = scale.y; + } + } + } + } + + /** + * 在此书写动画每一帧执行的函数 + * @param delta + */ + function tickerFunc(delta: number) {} + + function getStartStateEffect() { + return timeline[0]; + } + + function getEndStateEffect() { + return timeline[timeline.length - 1]; + } + + function getEndFilterEffect() { + const endSegment = timeline[timeline.length - 1]; + const { alpha, rotation, blur, duration, scale, position, ...rest } = endSegment; + return rest; + } + + return { + setStartState, + setEndState, + tickerFunc, + getEndFilterEffect, + }; +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/animations/universalSoftIn.ts b/packages/webgal/src/Core/controller/stage/pixi/animations/universalSoftIn.ts new file mode 100644 index 000000000..1d7ebcffd --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/animations/universalSoftIn.ts @@ -0,0 +1,50 @@ +import { WebGAL } from '@/Core/WebGAL'; + +export function generateUniversalSoftInAnimationObj(targetKey: string, duration: number) { + const target = WebGAL.gameplay.pixiStage!.getStageObjByKey(targetKey); + + // 先设置一个通用的初态 + + // TODO:通用初态设置 + /** + * 在此书写为动画设置初态的操作 + */ + function setStartState() { + if (target) { + target.pixiContainer.alphaFilterVal = 0; + } + } + + // TODO:通用终态设置 + /** + * 在此书写为动画设置终态的操作 + */ + function setEndState() { + if (target) { + target.pixiContainer.alphaFilterVal = 1; + } + } + + /** + * 在此书写动画每一帧执行的函数 + * @param delta + */ + function tickerFunc(delta: number) { + if (target) { + const sprite = target.pixiContainer; + const baseDuration = WebGAL.gameplay.pixiStage!.frameDuration; + const currentAddOplityDelta = (duration / baseDuration) * delta; + const increasement = 1 / currentAddOplityDelta; + // const decreasement = 5 / currentAddOplityDelta; + if (sprite.alphaFilterVal < 1) { + sprite.alpha += increasement; + } + } + } + + return { + setStartState, + setEndState, + tickerFunc, + }; +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/animations/universalSoftOff.ts b/packages/webgal/src/Core/controller/stage/pixi/animations/universalSoftOff.ts new file mode 100644 index 000000000..0d6c8915d --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/animations/universalSoftOff.ts @@ -0,0 +1,41 @@ +import { WebGAL } from '@/Core/WebGAL'; + +export function generateUniversalSoftOffAnimationObj(targetKey: string, duration: number) { + const target = WebGAL.gameplay.pixiStage!.getStageObjByKey(targetKey); + + // 先设置一个通用的初态 + + /** + * 在此书写为动画设置初态的操作 + */ + function setStartState() {} + + /** + * 在此书写为动画设置终态的操作 + */ + function setEndState() { + if (target) target.pixiContainer.alphaFilterVal = 0; + } + + /** + * 在此书写动画每一帧执行的函数 + * @param delta + */ + function tickerFunc(delta: number) { + if (target) { + const targetContainer = target.pixiContainer; + const baseDuration = WebGAL.gameplay.pixiStage!.frameDuration; + const currentAddOplityDelta = (duration / baseDuration) * delta; + const decreasement = 1 / currentAddOplityDelta; + if (targetContainer.alphaFilterVal > 0) { + targetContainer.alphaFilterVal -= decreasement; + } + } + } + + return { + setStartState, + setEndState, + tickerFunc, + }; +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/filters/ShockwaveFilter.ts b/packages/webgal/src/Core/controller/stage/pixi/filters/ShockwaveFilter.ts new file mode 100644 index 000000000..1598901cc --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/filters/ShockwaveFilter.ts @@ -0,0 +1,39 @@ +import { WebGALPixiContainer } from '@/Core/controller/stage/pixi/WebGALPixiContainer'; +import { ShockwaveFilter } from 'pixi-filters'; + +const FILTER_NAME = 'shockwaveFilter'; + +export function getOrCreateShockwaveFilterImpl(container: WebGALPixiContainer, createMode: boolean) { + const shockwaveFilterFromMap = container.containerFilters.get(FILTER_NAME); + if (shockwaveFilterFromMap) { + return shockwaveFilterFromMap; + } else { + if (createMode) { + const shockwaveFilter = new ShockwaveFilter([1280, 720]); + shockwaveFilter.time = 0; + container.addFilter(shockwaveFilter); + container.containerFilters.set(FILTER_NAME, shockwaveFilter); + return shockwaveFilter; + } + } +} + +export function getShockwaveFilter(container: WebGALPixiContainer) { + if (container.getOrCreateShockwaveFilter(false)) { + const shockwaveFilter = container.getOrCreateShockwaveFilter() as ShockwaveFilter; + return shockwaveFilter.time; + } + return 0; +} + +export function setShockwaveFilter(container: WebGALPixiContainer, value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + container.removeFilter(FILTER_NAME); + } else { + const shockwaveFilter = container.getOrCreateShockwaveFilter() as ShockwaveFilter; + if (shockwaveFilter) shockwaveFilter.time = value; + } +} diff --git a/packages/webgal/src/Core/controller/stage/pixi/shaders/RadiusAlphaFilter.ts b/packages/webgal/src/Core/controller/stage/pixi/shaders/RadiusAlphaFilter.ts new file mode 100644 index 000000000..5f3dab198 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/pixi/shaders/RadiusAlphaFilter.ts @@ -0,0 +1,93 @@ +import * as PIXI from 'pixi.js'; +import { WebGALPixiContainer } from '@/Core/controller/stage/pixi/WebGALPixiContainer'; + +const INIT_RAD = 0; +const FILTER_NAME = 'radiusAlphaFilter'; + +class RadiusAlphaFilter extends PIXI.Filter { + public constructor(center: PIXI.Point, radius: number) { + const fragmentShader = ` +// 半径透明度的fragment shader +precision mediump float; + +uniform sampler2D uSampler; // 输入纹理 +varying vec2 vTextureCoord; // 当前片元的纹理坐标 +uniform vec2 center; // 圆心坐标 +uniform float radius; // 圆的半径 + +void main(void) { + vec4 color = texture2D(uSampler, vTextureCoord); + + // 计算屏幕宽高比 + float aspect = 16.0 / 9.0; + + // 根据宽高比校正纹理坐标 + vec2 aspectCorrectCoord = vTextureCoord; + aspectCorrectCoord.x *= aspect; + + // 计算片元到圆心的距离 + float dist = distance(aspectCorrectCoord, center * vec2(aspect, 1.0)); + + // 使用smoothstep函数计算alpha值,实现边缘羽化效果 + float alpha = smoothstep(radius, radius + 0.05, dist); + + // 输出最终颜色 + gl_FragColor = color * (1.0 - alpha); +} + `; // 填入上面的fragment shader代码 + super(null as any, fragmentShader); + this.uniforms.center = [center.x, center.y]; + this.uniforms.radius = radius; + } + + public set center(value: PIXI.Point) { + this.uniforms.center = [value.x, value.y]; + } + + public get center(): PIXI.Point { + return new PIXI.Point(this.uniforms.center[0], this.uniforms.center[1]); + } + + public set radius(value: number) { + this.uniforms.radius = value; + } + + public get radius(): number { + return this.uniforms.radius; + } +} + +export function getOrCreateRadiusAlphaFilterImpl(container: WebGALPixiContainer, createMode: boolean) { + const shockwaveFilterFromMap = container.containerFilters.get(FILTER_NAME); + if (shockwaveFilterFromMap) { + return shockwaveFilterFromMap; + } else { + if (createMode) { + const shockwaveFilter = new RadiusAlphaFilter(new PIXI.Point(0.5, 0.5), INIT_RAD); + shockwaveFilter.radius = INIT_RAD; + container.addFilter(shockwaveFilter); + container.containerFilters.set(FILTER_NAME, shockwaveFilter); + return shockwaveFilter; + } + } +} + +export function getRadiusAlphaFilter(container: WebGALPixiContainer) { + if (container.getOrCreateShockwaveFilter(false)) { + const shockwaveFilter = container.getOrCreateRadiusAlphaFilter() as RadiusAlphaFilter; + return shockwaveFilter.radius; + } + return INIT_RAD; +} + +export function setRadiusAlphaFilter(container: WebGALPixiContainer, value: number) { + /** + * 如果是0,就移除这个滤镜 + */ + if (value === 0) { + container.removeFilter(FILTER_NAME); + } else { + const shockwaveFilter = container.getOrCreateRadiusAlphaFilter() as RadiusAlphaFilter; + if (shockwaveFilter) shockwaveFilter.radius = value; + } +} diff --git a/packages/webgal/src/Core/controller/stage/playBgm.ts b/packages/webgal/src/Core/controller/stage/playBgm.ts new file mode 100644 index 000000000..b6e76c2e8 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/playBgm.ts @@ -0,0 +1,48 @@ +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; +import { logger } from '@/Core/util/logger'; + +// /** +// * 停止bgm +// */ +// export const eraseBgm = () => { +// logger.debug(`停止bgm`); +// // 停止之前的bgm +// let VocalControl: any = document.getElementById('currentBgm'); +// if (VocalControl !== null) { +// VocalControl.currentTime = 0; +// if (!VocalControl.paused) VocalControl.pause(); +// } +// // 获得舞台状态并设置 +// webgalStore.dispatch(setStage({key: 'bgm', value: ''})); +// }; + +let emptyBgmTimeout: ReturnType<typeof setTimeout>; + +/** + * 播放bgm + * @param url bgm路径 + * @param enter 淡入时间(单位毫秒) + * @param volume 背景音乐 音量调整(0 - 100) + */ +export function playBgm(url: string, enter = 0, volume = 100): void { + logger.debug('playing bgm' + url); + if (url === '') { + emptyBgmTimeout = setTimeout(() => { + // 淡入淡出效果结束后,将 bgm 置空 + webgalStore.dispatch(setStage({ key: 'bgm', value: { src: '', enter: 0, volume: 100 } })); + }, enter); + const lastSrc = webgalStore.getState().stage.bgm.src; + webgalStore.dispatch(setStage({ key: 'bgm', value: { src: lastSrc, enter: -enter, volume: volume } })); + } else { + // 不要清除bgm了! + clearTimeout(emptyBgmTimeout); + webgalStore.dispatch(setStage({ key: 'bgm', value: { src: url, enter: enter, volume: volume } })); + } + setTimeout(() => { + const audioElement = document.getElementById('currentBgm') as HTMLAudioElement; + if (audioElement.src) { + audioElement?.play(); + } + }, 0); +} diff --git a/packages/webgal/src/Core/controller/stage/resetStage.ts b/packages/webgal/src/Core/controller/stage/resetStage.ts new file mode 100644 index 000000000..4bc087086 --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/resetStage.ts @@ -0,0 +1,29 @@ +import { initState, resetStageState, setStage } from '@/store/stageReducer'; +import { webgalStore } from '@/store/store'; +import cloneDeep from 'lodash/cloneDeep'; +import { WebGAL } from '@/Core/WebGAL'; + +export const resetStage = (resetBacklog: boolean, resetSceneAndVar = true) => { + /** + * 清空运行时 + */ + if (resetBacklog) { + WebGAL.backlogManager.makeBacklogEmpty(); + } + // 清空sceneData,并重新获取 + if (resetSceneAndVar) { + WebGAL.sceneManager.resetScene(); + } + + // 清空所有演出和timeOut + WebGAL.gameplay.performController.removeAllPerform(); + WebGAL.gameplay.resetGamePlay(); + + // 清空舞台状态表 + const initSceneDataCopy = cloneDeep(initState); + const currentVars = webgalStore.getState().stage.GameVar; + webgalStore.dispatch(resetStageState(initSceneDataCopy)); + if (!resetSceneAndVar) { + webgalStore.dispatch(setStage({ key: 'GameVar', value: currentVars })); + } +}; diff --git a/packages/webgal/src/Core/controller/stage/setVolume.ts b/packages/webgal/src/Core/controller/stage/setVolume.ts new file mode 100644 index 000000000..14f0ec36f --- /dev/null +++ b/packages/webgal/src/Core/controller/stage/setVolume.ts @@ -0,0 +1,21 @@ +import { logger } from '../../util/logger'; +import { webgalStore } from '@/store/store'; + +/** + * 设置音量 + */ +export const setVolume = () => { + const userDataState = webgalStore.getState().userData; + const mainVol = userDataState.optionData.volumeMain; + const vocalVol = mainVol * 0.01 * userDataState.optionData.vocalVolume * 0.01; + const bgmVol = mainVol * 0.01 * userDataState.optionData.bgmVolume * 0.01; + logger.debug(`设置背景音量:${bgmVol},语音音量:${vocalVol}`); + // const bgmElement: any = document.getElementById('currentBgm'); + // if (bgmElement) { + // bgmElement.volume = bgmVol.toString(); + // } + // const vocalElement: any = document.getElementById('currentVocal'); + // if (vocalElement) { + // vocalElement.volume = vocalVol.toString(); + // } +}; diff --git a/packages/webgal/src/Core/controller/storage/fastSaveLoad.ts b/packages/webgal/src/Core/controller/storage/fastSaveLoad.ts new file mode 100644 index 000000000..61c5975cb --- /dev/null +++ b/packages/webgal/src/Core/controller/storage/fastSaveLoad.ts @@ -0,0 +1,62 @@ +import { webgalStore } from '@/store/store'; +import { getStorageAsync, setStorageAsync } from '@/Core/controller/storage/storageController'; +import { ISaveData } from '@/store/userDataInterface'; +import { loadGameFromStageData } from '@/Core/controller/storage/loadGame'; +import { generateCurrentStageData } from '@/Core/controller/storage/saveGame'; +import cloneDeep from 'lodash/cloneDeep'; +import { WebGAL } from '@/Core/WebGAL'; +import { saveActions } from '@/store/savesReducer'; +import { dumpFastSaveToStorage, getFastSaveFromStorage } from '@/Core/controller/storage/savesController'; + +export let fastSaveGameKey = ''; +export let isFastSaveKey = ''; +let lock = true; + +export function initKey() { + lock = false; + fastSaveGameKey = `FastSaveKey-${WebGAL.gameName}-${WebGAL.gameKey}`; + isFastSaveKey = `FastSaveActive-${WebGAL.gameName}-${WebGAL.gameKey}`; +} + +/** + * 用于紧急回避时的数据存储 & 快速保存 + */ +export async function fastSaveGame() { + const saveData: ISaveData = generateCurrentStageData(-1, false); + const newSaveData = cloneDeep(saveData); + webgalStore.dispatch(saveActions.setFastSave(newSaveData)); + await dumpFastSaveToStorage(); +} + +/** + * 判断是否有无存储紧急回避时的数据 + */ +export async function hasFastSaveRecord() { + // return await localforage.getItem(isFastSaveKey); + await getStorageAsync(); + return webgalStore.getState().saveData.quickSaveData !== null; +} + +/** + * 加载紧急回避时的数据 + */ +export async function loadFastSaveGame() { + // 获得存档文件 + // const loadFile: ISaveData | null = await localforage.getItem(fastSaveGameKey); + await getFastSaveFromStorage(); + const loadFile: ISaveData | null = webgalStore.getState().saveData.quickSaveData; + if (!loadFile) { + return; + } + loadGameFromStageData(loadFile); +} + +/** + * 移除紧急回避的数据 + */ +export async function removeFastSaveGameRecord() { + webgalStore.dispatch(saveActions.resetFastSave()); + await setStorageAsync(); + // await localforage.setItem(isFastSaveKey, false); + // await localforage.setItem(fastSaveGameKey, null); +} diff --git a/packages/webgal/src/Core/controller/storage/jumpFromBacklog.ts b/packages/webgal/src/Core/controller/storage/jumpFromBacklog.ts new file mode 100644 index 000000000..2ebf4ce6b --- /dev/null +++ b/packages/webgal/src/Core/controller/storage/jumpFromBacklog.ts @@ -0,0 +1,80 @@ +import { logger } from '../../util/logger'; +import { sceneFetcher } from '../scene/sceneFetcher'; +import { sceneParser } from '../../parser/sceneParser'; +import { IStageState } from '@/store/stageInterface'; +import { webgalStore } from '@/store/store'; +import { resetStageState, stageActions } from '@/store/stageReducer'; +import { setVisibility } from '@/store/GUIReducer'; +import { runScript } from '@/Core/controller/gamePlay/runScript'; +import { stopAllPerform } from '@/Core/controller/gamePlay/stopAllPerform'; +import cloneDeep from 'lodash/cloneDeep'; +import uniqWith from 'lodash/uniqWith'; +import { scenePrefetcher } from '@/Core/util/prefetcher/scenePrefetcher'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 恢复演出 + */ +export const restorePerform = () => { + const stageState = webgalStore.getState().stage; + const performToRestore = cloneDeep(stageState.PerformList); + // 清除状态表中演出序列 + webgalStore.dispatch(stageActions.removeAllPerform()); + performToRestore.forEach((e) => { + runScript(e.script); + }); +}; + +/** + * 从 backlog 跳转至一个先前的状态 + * @param index + * @param refetchScene + */ +export const jumpFromBacklog = (index: number, refetchScene = true) => { + const dispatch = webgalStore.dispatch; + // 获得存档文件 + const backlogFile = WebGAL.backlogManager.getBacklog()[index]; + logger.debug('读取的backlog数据', backlogFile); + // 重新获取并同步场景状态 + if (refetchScene) + sceneFetcher(backlogFile.saveScene.sceneUrl).then((rawScene) => { + WebGAL.sceneManager.sceneData.currentScene = sceneParser( + rawScene, + backlogFile.saveScene.sceneName, + backlogFile.saveScene.sceneUrl, + ); + // 开始场景的预加载 + const subSceneList = WebGAL.sceneManager.sceneData.currentScene.subSceneList; + WebGAL.sceneManager.settledScenes.push(WebGAL.sceneManager.sceneData.currentScene.sceneUrl); // 放入已加载场景列表,避免递归加载相同场景 + const subSceneListUniq = uniqWith(subSceneList); // 去重 + scenePrefetcher(subSceneListUniq); + }); + WebGAL.sceneManager.sceneData.currentSentenceId = backlogFile.saveScene.currentSentenceId; + WebGAL.sceneManager.sceneData.sceneStack = cloneDeep(backlogFile.saveScene.sceneStack); + + // 强制停止所有演出 + stopAllPerform(); + + // 弹出backlog项目到指定状态 + for (let i = WebGAL.backlogManager.getBacklog().length - 1; i > index; i--) { + WebGAL.backlogManager.getBacklog().pop(); + } + + // 要记录本句 Backlog + WebGAL.backlogManager.isSaveBacklogNext = true; + + // 恢复舞台状态 + const newStageState: IStageState = cloneDeep(backlogFile.currentStageState); + + dispatch(resetStageState(newStageState)); + + // 恢复演出 + setTimeout(restorePerform, 0); + + // 关闭backlog界面 + dispatch(setVisibility({ component: 'showBacklog', visibility: false })); + + // 重新显示 TextBox + dispatch(setVisibility({ component: 'showTextBox', visibility: true })); +}; diff --git a/packages/webgal/src/Core/controller/storage/loadGame.ts b/packages/webgal/src/Core/controller/storage/loadGame.ts new file mode 100644 index 000000000..ae471ab7e --- /dev/null +++ b/packages/webgal/src/Core/controller/storage/loadGame.ts @@ -0,0 +1,77 @@ +import { ISaveData } from '@/store/userDataInterface'; +import { logger } from '../../util/logger'; +import { sceneFetcher } from '../scene/sceneFetcher'; +import { sceneParser } from '../../parser/sceneParser'; +import { webgalStore } from '@/store/store'; +import { resetStageState } from '@/store/stageReducer'; +import { setVisibility } from '@/store/GUIReducer'; +import { restorePerform } from './jumpFromBacklog'; +import { stopAllPerform } from '@/Core/controller/gamePlay/stopAllPerform'; +import cloneDeep from 'lodash/cloneDeep'; +import uniqWith from 'lodash/uniqWith'; +import { scenePrefetcher } from '@/Core/util/prefetcher/scenePrefetcher'; +import { setEbg } from '@/Core/gameScripts/changeBg/setEbg'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 读取游戏存档 + * @param index 要读取的存档的档位 + */ +export const loadGame = (index: number) => { + const userDataState = webgalStore.getState().saveData; + // 获得存档文件 + const loadFile: ISaveData = userDataState.saveData[index]; + logger.debug('读取的存档数据', loadFile); + // 加载存档 + loadGameFromStageData(loadFile); +}; + +export function loadGameFromStageData(stageData: ISaveData) { + if (!stageData) { + logger.info('暂无存档'); + return; + } + const loadFile = stageData; + // 重新获取并同步场景状态 + sceneFetcher(loadFile.sceneData.sceneUrl).then((rawScene) => { + WebGAL.sceneManager.sceneData.currentScene = sceneParser( + rawScene, + loadFile.sceneData.sceneName, + loadFile.sceneData.sceneUrl, + ); + // 开始场景的预加载 + const subSceneList = WebGAL.sceneManager.sceneData.currentScene.subSceneList; + WebGAL.sceneManager.settledScenes.push(WebGAL.sceneManager.sceneData.currentScene.sceneUrl); // 放入已加载场景列表,避免递归加载相同场景 + const subSceneListUniq = uniqWith(subSceneList); // 去重 + scenePrefetcher(subSceneListUniq); + }); + WebGAL.sceneManager.sceneData.currentSentenceId = loadFile.sceneData.currentSentenceId; + WebGAL.sceneManager.sceneData.sceneStack = cloneDeep(loadFile.sceneData.sceneStack); + + // 强制停止所有演出 + stopAllPerform(); + + // 恢复backlog + const newBacklog = loadFile.backlog; + WebGAL.backlogManager.getBacklog().splice(0, WebGAL.backlogManager.getBacklog().length); // 清空原backlog + for (const e of newBacklog) { + WebGAL.backlogManager.getBacklog().push(e); + } + + // 恢复舞台状态 + const newStageState = cloneDeep(loadFile.nowStageState); + const dispatch = webgalStore.dispatch; + dispatch(resetStageState(newStageState)); + + // 恢复演出 + setTimeout(restorePerform, 0); + // restorePerform(); + + dispatch(setVisibility({ component: 'showTitle', visibility: false })); + dispatch(setVisibility({ component: 'showMenuPanel', visibility: false })); + /** + * 恢复模糊背景 + */ + setEbg(webgalStore.getState().stage.bgName); +} diff --git a/packages/webgal/src/Core/controller/storage/saveGame.ts b/packages/webgal/src/Core/controller/storage/saveGame.ts new file mode 100644 index 000000000..c729b334c --- /dev/null +++ b/packages/webgal/src/Core/controller/storage/saveGame.ts @@ -0,0 +1,60 @@ +import { logger } from '../../util/logger'; +import { ISaveData } from '@/store/userDataInterface'; +import { dumpToStorageFast } from './storageController'; +import { webgalStore } from '@/store/store'; +import { setUserData } from '@/store/userDataReducer'; +import cloneDeep from 'lodash/cloneDeep'; + +import { WebGAL } from '@/Core/WebGAL'; +import { saveActions } from '@/store/savesReducer'; +import { dumpSavesToStorage } from '@/Core/controller/storage/savesController'; + +/** + * 保存游戏 + * @param index 游戏的档位 + */ +export const saveGame = (index: number) => { + const saveData: ISaveData = generateCurrentStageData(index); + webgalStore.dispatch(saveActions.saveGame({ index, saveData })); + dumpSavesToStorage(index, index); +}; + +/** + * 生成现在游戏的数据快照 + * @param index 游戏的档位 + */ +export function generateCurrentStageData(index: number, isSavePreviewImage = true) { + const stageState = webgalStore.getState().stage; + const saveBacklog = cloneDeep(WebGAL.backlogManager.getBacklog()); + + /** + * 生成缩略图 + */ + + let urlToSave = ''; + if (isSavePreviewImage) { + const canvas: HTMLCanvasElement = document.getElementById('pixiCanvas')! as HTMLCanvasElement; + const canvas2 = document.createElement('canvas'); + const context = canvas2.getContext('2d'); + canvas2.width = 480; + canvas2.height = 270; + context!.drawImage(canvas, 0, 0, 480, 270); + urlToSave = canvas2.toDataURL('image/webp', 0.5); + canvas2.remove(); + } + const saveData: ISaveData = { + nowStageState: cloneDeep(stageState), + backlog: saveBacklog, // 舞台数据 + index: index, // 存档的序号 + saveTime: new Date().toLocaleDateString() + ' ' + new Date().toLocaleTimeString('chinese', { hour12: false }), // 保存时间 + // 场景数据 + sceneData: { + currentSentenceId: WebGAL.sceneManager.sceneData.currentSentenceId, // 当前语句ID + sceneStack: cloneDeep(WebGAL.sceneManager.sceneData.sceneStack), // 场景栈 + sceneName: WebGAL.sceneManager.sceneData.currentScene.sceneName, // 场景名称 + sceneUrl: WebGAL.sceneManager.sceneData.currentScene.sceneUrl, // 场景url + }, + previewImage: urlToSave, + }; + return saveData; +} diff --git a/packages/webgal/src/Core/controller/storage/savesController.ts b/packages/webgal/src/Core/controller/storage/savesController.ts new file mode 100644 index 000000000..3a01b4046 --- /dev/null +++ b/packages/webgal/src/Core/controller/storage/savesController.ts @@ -0,0 +1,36 @@ +import localforage from 'localforage'; +import { WebGAL } from '@/Core/WebGAL'; +import { logger } from '@/Core/util/logger'; +import { webgalStore } from '@/store/store'; +import { saveActions } from '@/store/savesReducer'; +import { ISaveData } from '@/store/userDataInterface'; + +export function dumpSavesToStorage(startIndex: number, endIndex: number) { + for (let i = startIndex; i <= endIndex; i++) { + const save = webgalStore.getState().saveData.saveData[i]; + localforage.setItem(`${WebGAL.gameKey}-saves${i}`, save).then(() => { + logger.info(`存档${i}写入本地存储`); + }); + } +} + +export function getSavesFromStorage(startIndex: number, endIndex: number) { + for (let i = startIndex; i <= endIndex; i++) { + localforage.getItem(`${WebGAL.gameKey}-saves${i}`).then((save) => { + webgalStore.dispatch(saveActions.saveGame({ index: i, saveData: save as ISaveData })); + logger.info(`存档${i}读取自本地存储`); + }); + } +} + +export async function dumpFastSaveToStorage() { + const save = webgalStore.getState().saveData.quickSaveData; + await localforage.setItem(`${WebGAL.gameKey}-saves-fast`, save); + logger.info(`快速存档写入本地存储`); +} + +export async function getFastSaveFromStorage() { + const save = await localforage.getItem(`${WebGAL.gameKey}-saves-fast`); + webgalStore.dispatch(saveActions.setFastSave(save as ISaveData)); + logger.info(`快速存档读取自本地存储`); +} diff --git a/packages/webgal/src/Core/controller/storage/storageController.ts b/packages/webgal/src/Core/controller/storage/storageController.ts new file mode 100644 index 000000000..1d0a1fb86 --- /dev/null +++ b/packages/webgal/src/Core/controller/storage/storageController.ts @@ -0,0 +1,96 @@ +import * as localforage from 'localforage'; +import { IUserData } from '@/store/userDataInterface'; +import { logger } from '../../util/logger'; +import { webgalStore } from '@/store/store'; +import { initState, resetUserData } from '@/store/userDataReducer'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 写入本地存储 + */ +export const setStorage = debounce(() => { + const userDataState = webgalStore.getState().userData; + localforage.setItem(WebGAL.gameKey, userDataState).then(() => { + logger.info('写入本地存储'); + }); +}, 100); + +/** + * 从本地存储获取数据 + */ +export const getStorage = debounce(() => { + localforage.getItem(WebGAL.gameKey).then((newUserData) => { + // 如果没有数据或者属性不完全,重新初始化 + if (!newUserData || !checkUserDataProperty(newUserData)) { + logger.warn('现在重置数据'); + setStorage(); + return; + } + webgalStore.dispatch(resetUserData(newUserData as IUserData)); + }); +}, 100); + +/** + * 防抖函数 + * @param func 要执行的函数 + * @param wait 防抖等待时间 + */ +function debounce<T, K>(func: (...args: T[]) => K, wait: number) { + let timeout: ReturnType<typeof setTimeout>; + + function context(...args: T[]): K { + clearTimeout(timeout); + let ret!: K; + timeout = setTimeout(() => { + ret = func.apply(context, args); + }, wait); + return ret; + } + + return context; +} + +export const dumpToStorageFast = () => { + const userDataState = webgalStore.getState().userData; + localforage.setItem(WebGAL.gameKey, userDataState).then(() => { + localforage.getItem(WebGAL.gameKey).then((newUserData) => { + // 如果没有数据,初始化 + if (!newUserData) { + setStorage(); + return; + } + webgalStore.dispatch(resetUserData(newUserData as IUserData)); + }); + logger.info('同步本地存储'); + }); +}; + +/** + * 检查用户数据属性是否齐全 + * @param userData 需要检查的数据 + */ +function checkUserDataProperty(userData: any) { + let result = true; + for (const key in initState) { + if (!userData.hasOwnProperty(key)) { + result = false; + } + } + return result; +} + +export async function setStorageAsync() { + const userDataState = webgalStore.getState().userData; + return await localforage.setItem(WebGAL.gameKey, userDataState); +} + +export async function getStorageAsync() { + const newUserData = await localforage.getItem(WebGAL.gameKey); + if (!newUserData || !checkUserDataProperty(newUserData)) { + const userDataState = webgalStore.getState().userData; + logger.warn('现在重置数据'); + return await localforage.setItem(WebGAL.gameKey, userDataState); + } else webgalStore.dispatch(resetUserData(newUserData as IUserData)); + return; +} diff --git a/packages/webgal/src/Core/gameScripts/applyStyle.ts b/packages/webgal/src/Core/gameScripts/applyStyle.ts new file mode 100644 index 000000000..ca7e85d7e --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/applyStyle.ts @@ -0,0 +1,30 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { stageActions } from '@/store/stageReducer'; + +/** + * 语句执行的模板代码 + * @param sentence + */ +export const applyStyle = (sentence: ISentence): IPerform => { + const { content } = sentence; + const applyStyleSegments = content.split(','); + for (const applyStyleSegment of applyStyleSegments) { + const splitSegment = applyStyleSegment.split('->'); + if (splitSegment.length >= 2) { + const classNameToBeChange = splitSegment[0]; + const classNameChangeTo = splitSegment[1]; + webgalStore.dispatch(stageActions.replaceUIlable([classNameToBeChange, classNameChangeTo])); + } + } + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/bgm.ts b/packages/webgal/src/Core/gameScripts/bgm.ts new file mode 100644 index 000000000..1a973eb23 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/bgm.ts @@ -0,0 +1,41 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { playBgm } from '@/Core/controller/stage/playBgm'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { webgalStore } from '@/store/store'; +import { unlockBgmInUserData } from '@/store/userDataReducer'; + +/** + * 播放一段bgm + * @param sentence + */ +export const bgm = (sentence: ISentence): IPerform => { + let url: string = sentence.content; // 获取bgm的url + let name = ''; + let series = 'default'; + sentence.args.forEach((e) => { + if (e.key === 'unlockname') { + name = e.value.toString(); + } + if (e.key === 'series') { + series = e.value.toString(); + } + }); + const enter = getSentenceArgByKey(sentence, 'enter'); // 获取bgm的淡入时间 + const volume = getSentenceArgByKey(sentence, 'volume'); // 获取bgm的音量比 + if (name !== '') webgalStore.dispatch(unlockBgmInUserData({ name, url, series })); + playBgm( + url, + typeof enter === 'number' && enter >= 0 ? enter : 0, // 已正确设置淡入时间时,进行淡入 + typeof volume === 'number' && volume >= 0 && volume <= 100 ? volume : 100, // 已正确设置音量比时,进行音量调整 + ); + return { + performName: 'none', + duration: 0, + isHoldOn: true, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/callSceneScript.ts b/packages/webgal/src/Core/gameScripts/callSceneScript.ts new file mode 100644 index 000000000..48aec5494 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/callSceneScript.ts @@ -0,0 +1,22 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { callScene } from '../controller/scene/callScene'; + +/** + * 调用一个场景,在场景结束后回到调用这个场景的父场景。 + * @param sentence + */ +export const callSceneScript = (sentence: ISentence): IPerform => { + const sceneNameArray: Array<string> = sentence.content.split('/'); + const sceneName = sceneNameArray[sceneNameArray.length - 1]; + callScene(sentence.content, sceneName); + return { + performName: 'none', + duration: 0, + isHoldOn: true, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/changeBg/index.ts b/packages/webgal/src/Core/gameScripts/changeBg/index.ts new file mode 100644 index 000000000..9917789f6 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/changeBg/index.ts @@ -0,0 +1,104 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +// import {getRandomPerformName} from '../../../util/getRandomPerformName'; +import styles from '@/Stage/stage.module.scss'; +import { webgalStore } from '@/store/store'; +import { setStage, stageActions } from '@/store/stageReducer'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { unlockCgInUserData } from '@/store/userDataReducer'; +import { logger } from '@/Core/util/logger'; +import { ITransform } from '@/store/stageInterface'; +import { generateTransformAnimationObj } from '@/Core/controller/stage/pixi/animations/generateTransformAnimationObj'; +import { IUserAnimation } from '@/Core/Modules/animations'; +import cloneDeep from 'lodash/cloneDeep'; +import { getAnimateDuration } from '@/Core/Modules/animationFunctions'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 进行背景图片的切换 + * @param sentence 语句 + * @return {IPerform} + */ +export const changeBg = (sentence: ISentence): IPerform => { + const url = sentence.content; + let name = ''; + let series = 'default'; + sentence.args.forEach((e) => { + if (e.key === 'unlockname') { + name = e.value.toString(); + } + if (e.key === 'series') { + series = e.value.toString(); + } + }); + + const dispatch = webgalStore.dispatch; + if (name !== '') dispatch(unlockCgInUserData({ name, url, series })); + + /** + * 删掉相关 Effects,因为已经移除了 + */ + dispatch(stageActions.removeEffectByTargetId(`bg-main`)); + + // 处理 transform 和 默认 transform + const transformString = getSentenceArgByKey(sentence, 'transform'); + let duration = getSentenceArgByKey(sentence, 'duration'); + if (!duration || typeof duration !== 'number') { + duration = 1000; + } + let animationObj: (ITransform & { + duration: number; + })[]; + if (transformString) { + try { + const frame = JSON.parse(transformString.toString()) as ITransform & { duration: number }; + animationObj = generateTransformAnimationObj('bg-main', frame, duration); + // 因为是切换,必须把一开始的 alpha 改为 0 + animationObj[0].alpha = 0; + const animationName = (Math.random() * 10).toString(16); + const newAnimation: IUserAnimation = { name: animationName, effects: animationObj }; + WebGAL.animationManager.addAnimation(newAnimation); + duration = getAnimateDuration(animationName); + WebGAL.animationManager.nextEnterAnimationName.set('bg-main', animationName); + } catch (e) { + // 解析都错误了,歇逼吧 + applyDefaultTransform(); + } + } else { + applyDefaultTransform(); + } + + function applyDefaultTransform() { + // 应用默认的 + const frame = {}; + animationObj = generateTransformAnimationObj('bg-main', frame as ITransform & { duration: number }, duration); + // 因为是切换,必须把一开始的 alpha 改为 0 + animationObj[0].alpha = 0; + const animationName = (Math.random() * 10).toString(16); + const newAnimation: IUserAnimation = { name: animationName, effects: animationObj }; + WebGAL.animationManager.addAnimation(newAnimation); + duration = getAnimateDuration(animationName); + WebGAL.animationManager.nextEnterAnimationName.set('bg-main', animationName); + } + + // 应用动画的优先级更高一点 + if (getSentenceArgByKey(sentence, 'enter')) { + WebGAL.animationManager.nextEnterAnimationName.set('bg-main', getSentenceArgByKey(sentence, 'enter')!.toString()); + duration = getAnimateDuration(getSentenceArgByKey(sentence, 'enter')!.toString()); + } + if (getSentenceArgByKey(sentence, 'exit')) { + WebGAL.animationManager.nextExitAnimationName.set('bg-main-off', getSentenceArgByKey(sentence, 'exit')!.toString()); + duration = getAnimateDuration(getSentenceArgByKey(sentence, 'exit')!.toString()); + } + dispatch(setStage({ key: 'bgName', value: sentence.content })); + + return { + performName: 'none', + duration, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/changeBg/setEbg.ts b/packages/webgal/src/Core/gameScripts/changeBg/setEbg.ts new file mode 100644 index 000000000..d018903ff --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/changeBg/setEbg.ts @@ -0,0 +1,6 @@ +export function setEbg(url: string) { + const ebg = document.getElementById('ebg'); + if (ebg) { + ebg.style.backgroundImage = `url("${url}")`; + } +} diff --git a/packages/webgal/src/Core/gameScripts/changeFigure.ts b/packages/webgal/src/Core/gameScripts/changeFigure.ts new file mode 100644 index 000000000..bad8e7201 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/changeFigure.ts @@ -0,0 +1,292 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { setStage, stageActions } from '@/store/stageReducer'; +import cloneDeep from 'lodash/cloneDeep'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { IFreeFigure, IStageState, ITransform } from '@/store/stageInterface'; +import { IUserAnimation } from '@/Core/Modules/animations'; +import { generateTransformAnimationObj } from '@/Core/controller/stage/pixi/animations/generateTransformAnimationObj'; +import { assetSetter, fileType } from '@/Core/util/gameAssetsAccess/assetSetter'; +import { logger } from '@/Core/util/logger'; +import { getAnimateDuration } from '@/Core/Modules/animationFunctions'; +import { WebGAL } from '@/Core/WebGAL'; +/** + * 更改立绘 + * @param sentence 语句 + */ +// eslint-disable-next-line complexity +export function changeFigure(sentence: ISentence): IPerform { + // 根据参数设置指定位置 + let pos: 'center' | 'left' | 'right' = 'center'; + let content = sentence.content; + let isFreeFigure = false; + let motion = ''; + let expression = ''; + let key = ''; + let duration = 500; + let mouthOpen = ''; + let mouthClose = ''; + let mouthHalfOpen = ''; + let eyesOpen = ''; + let eyesClose = ''; + let animationFlag: any = ''; + let mouthAnimationKey: any = 'mouthAnimation'; + let eyesAnimationKey: any = 'blinkAnimation'; + let overrideBounds = ''; + let zIndex = -1; + const dispatch = webgalStore.dispatch; + + for (const e of sentence.args) { + switch (e.key) { + case 'left': + if (e.value === true) { + pos = 'left'; + mouthAnimationKey = 'mouthAnimationLeft'; + eyesAnimationKey = 'blinkAnimationLeft'; + } + break; + case 'right': + if (e.value === true) { + pos = 'right'; + mouthAnimationKey = 'mouthAnimationRight'; + eyesAnimationKey = 'blinkAnimationRight'; + } + break; + case 'clear': + if (e.value === true) { + content = ''; + } + break; + case 'id': + isFreeFigure = true; + key = e.value.toString(); + break; + case 'motion': + motion = e.value.toString(); + break; + case 'bounds': + overrideBounds = String(e.value); + break; + case 'expression': + expression = e.value.toString(); + break; + case 'mouthOpen': + mouthOpen = e.value.toString(); + mouthOpen = assetSetter(mouthOpen, fileType.figure); + break; + case 'mouthClose': + mouthClose = e.value.toString(); + mouthClose = assetSetter(mouthClose, fileType.figure); + break; + case 'mouthHalfOpen': + mouthHalfOpen = e.value.toString(); + mouthHalfOpen = assetSetter(mouthHalfOpen, fileType.figure); + break; + case 'eyesOpen': + eyesOpen = e.value.toString(); + eyesOpen = assetSetter(eyesOpen, fileType.figure); + break; + case 'eyesClose': + eyesClose = e.value.toString(); + eyesClose = assetSetter(eyesClose, fileType.figure); + break; + case 'animationFlag': + animationFlag = e.value.toString(); + break; + case 'none': + content = ''; + break; + case 'zIndex': + zIndex = Number(e.value); + break; + default: + break; + } + } + + const id = key ? key : `fig-${pos}`; + + const currentFigureAssociatedAnimation = webgalStore.getState().stage.figureAssociatedAnimation; + const filteredFigureAssociatedAnimation = currentFigureAssociatedAnimation.filter((item) => item.targetId !== id); + const newFigureAssociatedAnimationItem = { + targetId: id, + animationFlag: animationFlag, + mouthAnimation: { + open: mouthOpen, + close: mouthClose, + halfOpen: mouthHalfOpen, + }, + blinkAnimation: { + open: eyesOpen, + close: eyesClose, + }, + }; + filteredFigureAssociatedAnimation.push(newFigureAssociatedAnimationItem); + dispatch(setStage({ key: 'figureAssociatedAnimation', value: filteredFigureAssociatedAnimation })); + + /** + * 如果 url 没变,不移除 + */ + let isRemoveEffects = true; + if (key !== '') { + const figWithKey = webgalStore.getState().stage.freeFigure.find((e) => e.key === key); + if (figWithKey) { + if (figWithKey.name === sentence.content) { + isRemoveEffects = false; + } + } + } else { + if (pos === 'center') { + if (webgalStore.getState().stage.figName === sentence.content) { + isRemoveEffects = false; + } + } + if (pos === 'left') { + if (webgalStore.getState().stage.figNameLeft === sentence.content) { + isRemoveEffects = false; + } + } + if (pos === 'right') { + if (webgalStore.getState().stage.figNameRight === sentence.content) { + isRemoveEffects = false; + } + } + } + /** + * 处理 Effects + */ + if (isRemoveEffects) { + const deleteKey = `fig-${pos}`; + const deleteKey2 = `${key}`; + webgalStore.dispatch(stageActions.removeEffectByTargetId(deleteKey)); + webgalStore.dispatch(stageActions.removeEffectByTargetId(deleteKey2)); + // 重设 figureMetaData,这里是 zIndex,实际上任何键都可以,因为整体是移除那条记录 + dispatch(stageActions.setFigureMetaData([deleteKey, 'zIndex', 0, true])); + dispatch(stageActions.setFigureMetaData([deleteKey2, 'zIndex', 0, true])); + } + const setAnimationNames = (key: string, sentence: ISentence) => { + // 处理 transform 和 默认 transform + const transformString = getSentenceArgByKey(sentence, 'transform'); + const durationFromArg = getSentenceArgByKey(sentence, 'duration'); + if (durationFromArg && typeof durationFromArg === 'number') { + duration = durationFromArg; + } + let animationObj: (ITransform & { + duration: number; + })[]; + if (transformString) { + console.log(transformString); + try { + const frame = JSON.parse(transformString.toString()) as ITransform & { duration: number }; + animationObj = generateTransformAnimationObj(key, frame, duration); + // 因为是切换,必须把一开始的 alpha 改为 0 + animationObj[0].alpha = 0; + const animationName = (Math.random() * 10).toString(16); + const newAnimation: IUserAnimation = { name: animationName, effects: animationObj }; + WebGAL.animationManager.addAnimation(newAnimation); + duration = getAnimateDuration(animationName); + WebGAL.animationManager.nextEnterAnimationName.set(key, animationName); + } catch (e) { + // 解析都错误了,歇逼吧 + applyDefaultTransform(); + } + } else { + applyDefaultTransform(); + } + + function applyDefaultTransform() { + // 应用默认的 + const frame = {}; + animationObj = generateTransformAnimationObj(key, frame as ITransform & { duration: number }, duration); + // 因为是切换,必须把一开始的 alpha 改为 0 + animationObj[0].alpha = 0; + const animationName = (Math.random() * 10).toString(16); + const newAnimation: IUserAnimation = { name: animationName, effects: animationObj }; + WebGAL.animationManager.addAnimation(newAnimation); + duration = getAnimateDuration(animationName); + WebGAL.animationManager.nextEnterAnimationName.set(key, animationName); + } + const enterAnim = getSentenceArgByKey(sentence, 'enter'); + const exitAnim = getSentenceArgByKey(sentence, 'exit'); + if (enterAnim) { + WebGAL.animationManager.nextEnterAnimationName.set(key, enterAnim.toString()); + duration = getAnimateDuration(enterAnim.toString()); + } + if (exitAnim) { + WebGAL.animationManager.nextExitAnimationName.set(key + '-off', exitAnim.toString()); + duration = getAnimateDuration(exitAnim.toString()); + } + }; + if (isFreeFigure) { + /** + * 下面的代码是设置自由立绘的 + */ + const freeFigureItem: IFreeFigure = { key, name: content, basePosition: pos }; + setAnimationNames(key, sentence); + if (motion || overrideBounds) { + dispatch( + stageActions.setLive2dMotion({ target: key, motion, overrideBounds: getOverrideBoundsArr(overrideBounds) }), + ); + } + if (expression) { + dispatch(stageActions.setLive2dExpression({ target: key, expression })); + } + if (zIndex > 0) { + dispatch(stageActions.setFigureMetaData([key, 'zIndex', zIndex, false])); + } + dispatch(stageActions.setFreeFigureByKey(freeFigureItem)); + } else { + /** + * 下面的代码是设置与位置关联的立绘的 + */ + const positionMap = { + center: 'fig-center', + left: 'fig-left', + right: 'fig-right', + }; + const dispatchMap: Record<string, keyof IStageState> = { + center: 'figName', + left: 'figNameLeft', + right: 'figNameRight', + }; + + key = positionMap[pos]; + setAnimationNames(key, sentence); + if (motion || overrideBounds) { + dispatch( + stageActions.setLive2dMotion({ target: key, motion, overrideBounds: getOverrideBoundsArr(overrideBounds) }), + ); + } + if (expression) { + dispatch(stageActions.setLive2dExpression({ target: key, expression })); + } + if (zIndex > 0) { + dispatch(stageActions.setFigureMetaData([key, 'zIndex', zIndex, false])); + } + dispatch(setStage({ key: dispatchMap[pos], value: content })); + } + + return { + performName: 'none', + duration, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => false, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +} + +function getOverrideBoundsArr(raw: string): undefined | [number, number, number, number] { + const parseOverrideBoundsResult = raw.split(',').map((e) => Number(e)); + let isPass = true; + parseOverrideBoundsResult.forEach((e) => { + if (isNaN(e)) { + isPass = false; + } + }); + isPass = isPass && parseOverrideBoundsResult.length === 4; + if (isPass) return parseOverrideBoundsResult as [number, number, number, number]; + else return undefined; +} diff --git a/packages/webgal/src/Core/gameScripts/changeSceneScript.ts b/packages/webgal/src/Core/gameScripts/changeSceneScript.ts new file mode 100644 index 000000000..91a2d17a7 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/changeSceneScript.ts @@ -0,0 +1,22 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { changeScene } from '../controller/scene/changeScene'; + +/** + * 切换场景。在场景结束后不会回到父场景。 + * @param sentence + */ +export const changeSceneScript = (sentence: ISentence): IPerform => { + const sceneNameArray: Array<string> = sentence.content.split('/'); + const sceneName = sceneNameArray[sceneNameArray.length - 1]; + changeScene(sentence.content, sceneName); + return { + performName: 'none', + duration: 0, + isHoldOn: true, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/choose/choose.module.scss b/packages/webgal/src/Core/gameScripts/choose/choose.module.scss new file mode 100644 index 000000000..4040078bc --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/choose/choose.module.scss @@ -0,0 +1,54 @@ +.Choose_Main { + position: absolute; + width: 100%; + height: 100%; + display: flex; + flex-flow: column; + justify-content: center; + align-items: center; + z-index: 13; + background: rgba(0, 0, 0, 0.05); +} + +.Choose_item { + font-family: "WebgalUI", serif; + cursor: pointer; + min-width: 50%; + padding: 0.25em 1em 0.25em 1em; + font-size: 265%; + color: #8E354A; + text-align: center; + border-radius: 4px; + border: 3px solid rgba(0, 0, 0, 0); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.25); + background: rgba(255, 255, 255, 0.65); + margin: 0.25em 0 0.25em 0; + transition: background-color 0.5s, border 0.5s, font-weight 0.5s, box-shadow 0.5s; + + &:hover { + background: rgba(255, 255, 255, 0.9); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.35); + border: 3px solid #8E354A; + } +} + +.Choose_item_disabled { + font-family: "WebgalUI", serif; + cursor: not-allowed; + min-width: 50%; + padding: 0.25em 1em 0.25em 1em; + font-size: 265%; + color: rgba(142, 53, 74, 0.5); + text-align: center; + border-radius: 4px; + border: 3px solid rgba(0, 0, 0, 0); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.25); + background: rgba(255, 255, 255, 0.5); + margin: 0.25em 0 0.25em 0; + transition: background-color 0.5s, border 0.5s, font-weight 0.5s, box-shadow 0.5s; +} + +.Choose_item_outer { + color: #000; + min-width: 50%; +} diff --git a/packages/webgal/src/Core/gameScripts/choose/index.tsx b/packages/webgal/src/Core/gameScripts/choose/index.tsx new file mode 100644 index 000000000..ef22cc7ec --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/choose/index.tsx @@ -0,0 +1,119 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { changeScene } from '@/Core/controller/scene/changeScene'; +import { jmp } from '@/Core/gameScripts/label/jmp'; +import ReactDOM from 'react-dom'; +import React from 'react'; +import styles from './choose.module.scss'; +import { webgalStore } from '@/store/store'; +import { textFont } from '@/store/userDataInterface'; +import { PerformController } from '@/Core/Modules/perform/performController'; +import { useSEByWebgalStore } from '@/hooks/useSoundEffect'; +import { WebGAL } from '@/Core/WebGAL'; +import { whenChecker } from '@/Core/controller/gamePlay/scriptExecutor'; +import useEscape from '@/hooks/useEscape'; +import useApplyStyle from '@/hooks/useApplyStyle'; +import { Provider } from 'react-redux'; + +class ChooseOption { + /** + * 格式: + * (showConditionVar>1)[enableConditionVar>2]->text:jump + */ + public static parse(script: string): ChooseOption { + const parts = script.split('->'); + const conditonPart = parts.length > 1 ? parts[0] : null; + const mainPart = parts.length > 1 ? parts[1] : parts[0]; + const mainPartNodes = mainPart.split(/(?<!\\):/g); + const option = new ChooseOption(mainPartNodes[0], mainPartNodes[1]); + if (conditonPart !== null) { + const showConditionPart = conditonPart.match(/\((.*)\)/); + if (showConditionPart) { + option.showCondition = showConditionPart[1]; + } + const enableConditionPart = conditonPart.match(/\[(.*)\]/); + if (enableConditionPart) { + option.enableCondition = enableConditionPart[1]; + } + } + return option; + } + public text: string; + public jump: string; + public jumpToScene: boolean; + public showCondition?: string; + public enableCondition?: string; + + public constructor(text: string, jump: string) { + this.text = useEscape(text); + this.jump = jump; + this.jumpToScene = jump.match(/(?<!\\)\./) !== null; + } +} + +/** + * 显示选择枝 + * @param sentence + */ +export const choose = (sentence: ISentence): IPerform => { + const chooseOptionScripts = sentence.content.split(/(?<!\\)\|/); + const chooseOptions = chooseOptionScripts.map((e) => ChooseOption.parse(e)); + + // eslint-disable-next-line react/no-deprecated + ReactDOM.render( + <Provider store={webgalStore}> + <Choose chooseOptions={chooseOptions} /> + </Provider>, + document.getElementById('chooseContainer'), + ); + return { + performName: 'choose', + duration: 1000 * 60 * 60 * 24, + isHoldOn: false, + stopFunction: () => { + // eslint-disable-next-line react/no-deprecated + ReactDOM.render(<div />, document.getElementById('chooseContainer')); + }, + blockingNext: () => true, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; + +function Choose(props: { chooseOptions: ChooseOption[] }) { + const fontFamily = webgalStore.getState().userData.optionData.textboxFont; + const font = fontFamily === textFont.song ? '"思源宋体", serif' : '"WebgalUI", serif'; + const { playSeEnter, playSeClick } = useSEByWebgalStore(); + const applyStyle = useApplyStyle('Stage/Choose/choose.scss'); + // 运行时计算JSX.Element[] + const runtimeBuildList = (chooseListFull: ChooseOption[]) => { + return chooseListFull + .filter((e, i) => whenChecker(e.showCondition)) + .map((e, i) => { + const enable = whenChecker(e.enableCondition); + const className = enable + ? applyStyle('Choose_item', styles.Choose_item) + : applyStyle('Choose_item_disabled', styles.Choose_item_disabled); + const onClick = enable + ? () => { + playSeClick(); + if (e.jumpToScene) { + changeScene(e.jump, e.text); + } else { + jmp(e.jump); + } + WebGAL.gameplay.performController.unmountPerform('choose'); + } + : () => {}; + return ( + <div className={applyStyle('Choose_item_outer', styles.Choose_item_outer)} key={e.jump + i}> + <div className={className} style={{ fontFamily: font }} onClick={onClick} onMouseEnter={playSeEnter}> + {e.text} + </div> + </div> + ); + }); + }; + + return <div className={applyStyle('Choose_Main', styles.Choose_Main)}>{runtimeBuildList(props.chooseOptions)}</div>; +} diff --git a/packages/webgal/src/Core/gameScripts/comment.ts b/packages/webgal/src/Core/gameScripts/comment.ts new file mode 100644 index 000000000..8d2b9917d --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/comment.ts @@ -0,0 +1,20 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { logger } from '@/Core/util/logger'; + +/** + * 注释,打LOG + * @param sentence + */ +export const comment = (sentence: ISentence): IPerform => { + logger.debug(`脚本内注释${sentence.content}`); + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/end.ts b/packages/webgal/src/Core/gameScripts/end.ts new file mode 100644 index 000000000..3902472bf --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/end.ts @@ -0,0 +1,44 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { assetSetter, fileType } from '@/Core/util/gameAssetsAccess/assetSetter'; +import { sceneFetcher } from '@/Core/controller/scene/sceneFetcher'; +import { sceneParser } from '@/Core/parser/sceneParser'; +import { resetStage } from '@/Core/controller/stage/resetStage'; +import { webgalStore } from '@/store/store'; +import { setVisibility } from '@/store/GUIReducer'; +import { playBgm } from '@/Core/controller/stage/playBgm'; +import { WebGAL } from '@/Core/WebGAL'; +import { dumpToStorageFast } from '@/Core/controller/storage/storageController'; +import { saveActions } from '@/store/savesReducer'; + +/** + * 结束游戏 + * @param sentence + */ +export const end = (sentence: ISentence): IPerform => { + resetStage(true); + const dispatch = webgalStore.dispatch; + // 重新获取初始场景 + const sceneUrl: string = assetSetter('start.txt', fileType.scene); + // 为了在 scriptExecutor 自增 sentenceId 后再重置场景 + setTimeout(() => { + WebGAL.sceneManager.resetScene(); + }, 5); + dispatch(saveActions.resetFastSave()); + dumpToStorageFast(); + sceneFetcher(sceneUrl).then((rawScene) => { + // 场景写入到运行时 + WebGAL.sceneManager.sceneData.currentScene = sceneParser(rawScene, 'start.txt', sceneUrl); + }); + dispatch(setVisibility({ component: 'showTitle', visibility: true })); + playBgm(webgalStore.getState().GUI.titleBgm); + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/filmMode.ts b/packages/webgal/src/Core/gameScripts/filmMode.ts new file mode 100644 index 000000000..3009cc215 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/filmMode.ts @@ -0,0 +1,25 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; + +/** + * 语句执行的模板代码 + * @param sentence + */ +export const filmMode = (sentence: ISentence): IPerform => { + if (sentence.content !== '' && sentence.content !== 'none') { + webgalStore.dispatch(setStage({ key: 'enableFilm', value: sentence.content })); + } else { + webgalStore.dispatch(setStage({ key: 'enableFilm', value: '' })); + } + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/getUserInput/getUserInput.module.scss b/packages/webgal/src/Core/gameScripts/getUserInput/getUserInput.module.scss new file mode 100644 index 000000000..930d0463c --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/getUserInput/getUserInput.module.scss @@ -0,0 +1,106 @@ +.Choose_Main { + position: absolute; + width: 100%; + height: 100%; + display: flex; + flex-flow: column; + justify-content: center; + align-items: center; + z-index: 13; + background: rgba(0, 0, 0, 0.05); +} + +.Choose_item { + cursor: pointer; + min-width: 50%; + padding: 0.25em 1em 0.25em 1em; + font-size: 265%; + color: #005caf; + text-align: center; + border-radius: 4px; + border: 3px solid rgba(0, 0, 0, 0); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.25); + background: rgba(255, 255, 255, 0.65); + margin: 0.25em 0 0.25em 0; + transition: background-color 0.5s, border 0.5s, font-weight 0.5s, box-shadow 0.5s; +} + +//.title { +// cursor: pointer; +// min-width: 50%; +// padding: 0.25em 1em 0.25em 1em; +// font-size: 265%; +// color: #8E354A; +// text-align: center; +// border-radius: 4px; +// border: 3px solid rgba(0, 0, 0, 0); +// box-shadow: 0 0 25px rgba(0, 0, 0, 0.25); +// background: rgba(255, 255, 255, 0.65); +// margin: 0.25em 0 0.25em 0; +// transition: background-color 0.5s, border 0.5s, font-weight 0.5s, box-shadow 0.5s; +//} + +.glabalDialog_container_inner { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-flow: column; + background: linear-gradient(to right, + rgba(0, 92, 175, 0) 0%, + rgba(0, 92, 175, 0.5) 33%, + rgba(0, 92, 175, 0.85) 50%, + rgba(0, 92, 175, 0.5) 66%, + rgba(0, 92, 175, 0) 100% + ); + padding: 1em 5em 1.5em 5em; +} + +.glabalDialog_container { + //height: 20%; + color:white; + width: 100%; + border-top: 4px solid; + border-bottom: 4px solid; + border-image: linear-gradient(to right, + rgba(255, 255, 255, 0.05) 0%, + rgba(255, 255, 255, 0.85) 33%, + rgba(255, 255, 255, 1) 50%, + rgba(255, 255, 255, 0.85) 66%, + rgba(255, 255, 255, 0.05) 100% + ) 1; + //padding: 1px 1px 1px 1px; +} + +.title { + font-size: 300%; + letter-spacing: 0.05em; + text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); +} + +.Choose_item:hover { + //font-weight: bold; + background: rgba(255, 255, 255, 0.9); + box-shadow: 0 0 25px rgba(0, 0, 0, 0.35); + border: 3px solid #005caf; +} + +.button { + font-size: 200%; + padding: 0.15em 1em 0.15em 1em; + margin: 0.2em 1em 0.2em 1em; + cursor: pointer; + transition: background-color 0.33s, color 0.33s, font-weight 0.33s, transform 0.33s; + text-shadow: 0 0 10px rgba(255, 255, 255, 1); + border-radius: 5px; + //background: rgba(0, 0, 0, 0.05); +} + +.button:hover { + font-weight: bold; + color: #005caf; + transform: scale(1.1, 1.1); + text-shadow: 0 0 15px rgba(0, 0, 0, 0); + background: rgba(255, 255, 255, 0.85); +} diff --git a/packages/webgal/src/Core/gameScripts/getUserInput/index.tsx b/packages/webgal/src/Core/gameScripts/getUserInput/index.tsx new file mode 100644 index 000000000..68fb584bd --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/getUserInput/index.tsx @@ -0,0 +1,72 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { changeScene } from '@/Core/controller/scene/changeScene'; +import { jmp } from '@/Core/gameScripts/label/jmp'; +import ReactDOM from 'react-dom'; +import React from 'react'; +import styles from './getUserInput.module.scss'; +import { webgalStore } from '@/store/store'; +import { textFont } from '@/store/userDataInterface'; +import { PerformController } from '@/Core/Modules/perform/performController'; +import { useSEByWebgalStore } from '@/hooks/useSoundEffect'; +import { WebGAL } from '@/Core/WebGAL'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import { setStageVar } from '@/store/stageReducer'; + +/** + * 显示选择枝 + * @param sentence + */ +export const getUserInput = (sentence: ISentence): IPerform => { + const varKey = sentence.content.toString().trim(); + const titleFromArgs = getSentenceArgByKey(sentence, 'title'); + const title = (titleFromArgs === 0 ? 'Please Input' : titleFromArgs) ?? 'Please Input'; + const buttonTextFromArgs = getSentenceArgByKey(sentence, 'buttonText'); + const buttonText = (buttonTextFromArgs === 0 ? 'OK' : buttonTextFromArgs) ?? 'OK'; + const fontFamily = webgalStore.getState().userData.optionData.textboxFont; + const font = fontFamily === textFont.song ? '"思源宋体", serif' : '"WebgalUI", serif'; + const { playSeEnter, playSeClick } = useSEByWebgalStore(); + const chooseElements = ( + <div style={{ fontFamily: font }} className={styles.glabalDialog_container}> + <div className={styles.glabalDialog_container_inner}> + <div className={styles.title}>{title}</div> + <input id="user-input" className={styles.Choose_item} /> + <div + onMouseEnter={playSeEnter} + onClick={() => { + const userInput: HTMLInputElement = document.getElementById('user-input') as HTMLInputElement; + if (userInput) { + webgalStore.dispatch( + setStageVar({ key: varKey, value: (userInput?.value ?? '') === '' ? ' ' : userInput?.value ?? '' }), + ); + } + playSeClick(); + WebGAL.gameplay.performController.unmountPerform('userInput'); + nextSentence(); + }} + className={styles.button} + > + {buttonText} + </div> + </div> + </div> + ); + // eslint-disable-next-line react/no-deprecated + ReactDOM.render( + <div className={styles.Choose_Main}>{chooseElements}</div>, + document.getElementById('chooseContainer'), + ); + return { + performName: 'userInput', + duration: 1000 * 60 * 60 * 24, + isHoldOn: false, + stopFunction: () => { + // eslint-disable-next-line react/no-deprecated + ReactDOM.render(<div />, document.getElementById('chooseContainer')); + }, + blockingNext: () => true, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/intro.tsx b/packages/webgal/src/Core/gameScripts/intro.tsx new file mode 100644 index 000000000..0132ba0ec --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/intro.tsx @@ -0,0 +1,215 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import styles from '@/Stage/FullScreenPerform/fullScreenPerform.module.scss'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import { PerformController } from '@/Core/Modules/perform/performController'; +import { logger } from '@/Core/util/logger'; +import { WebGAL } from '@/Core/WebGAL'; +import { replace } from 'lodash'; +import useEscape from '@/hooks/useEscape'; +/** + * 显示一小段黑屏演示 + * @param sentence + */ +export const intro = (sentence: ISentence): IPerform => { + /** + * intro 内部控制 + */ + + const performName = `introPerform${Math.random().toString()}`; + let fontSize: string | undefined; + let backgroundColor: any = 'rgba(0, 0, 0, 1)'; + let color: any = 'rgba(255, 255, 255, 1)'; + const animationClass: any = (type: string, length = 0) => { + switch (type) { + case 'fadeIn': + return styles.fadeIn; + case 'slideIn': + return styles.slideIn; + case 'typingEffect': + return `${styles.typingEffect} ${length}`; + case 'pixelateEffect': + return styles.pixelateEffect; + case 'revealAnimation': + return styles.revealAnimation; + default: + return styles.fadeIn; + } + }; + let chosenAnimationClass = styles.fadeIn; + let delayTime = 1500; + let isHold = false; + let isUserForward = false; + + for (const e of sentence.args) { + if (e.key === 'backgroundColor') { + backgroundColor = e.value || 'rgba(0, 0, 0, 1)'; + } + if (e.key === 'fontColor') { + color = e.value || 'rgba(255, 255, 255, 1)'; + } + if (e.key === 'fontSize') { + switch (e.value) { + case 'small': + fontSize = '280%'; + break; + case 'medium': + fontSize = '350%'; + break; + case 'large': + fontSize = '420%'; + break; + } + } + if (e.key === 'animation') { + chosenAnimationClass = animationClass(e.value); + } + if (e.key === 'delayTime') { + const parsedValue = parseInt(e.value.toString(), 10); + delayTime = isNaN(parsedValue) ? delayTime : parsedValue; + } + if (e.key === 'hold') { + if (e.value === true) { + isHold = true; + } + } + if (e.key === 'userForward') { + // 用户手动控制向前步进 + if (e.value === true) { + isUserForward = true; + isHold = true; // 用户手动控制向前步进,所以必须是 hold + delayTime = 99999999; // 设置一个很大的延迟,这样自然就看起来不自动继续了 + } + } + } + + const introContainerStyle = { + background: backgroundColor, + color: color, + fontSize: fontSize || '350%', + width: '100%', + height: '100%', + }; + const introArray: Array<string> = sentence.content.split(/(?<!\\)\|/).map((val: string) => useEscape(val)); + + let endWait = 1000; + let baseDuration = endWait + delayTime * introArray.length; + const duration = isHold ? 1000 * 60 * 60 * 24 : 1000 + delayTime * introArray.length; + let isBlocking = true; + let setBlockingStateTimeout = setTimeout(() => { + isBlocking = false; + }, baseDuration); + + let timeout = setTimeout(() => {}); + const toNextIntroElement = () => { + const introContainer = document.getElementById('introContainer'); + // 由于用户操作,相当于时间向前推进,这时候更新这个演出的预计完成时间 + baseDuration -= delayTime; + clearTimeout(setBlockingStateTimeout); + setBlockingStateTimeout = setTimeout(() => { + isBlocking = false; + }, baseDuration); + if (introContainer) { + const children = introContainer.childNodes[0].childNodes[0].childNodes as any; + const len = children.length; + if (isUserForward) { + let isEnd = true; + for (const node of children) { + // 当前语句的延迟显示时间 + const currentDelay = Number(node.style.animationDelay.split('ms')[0]); + // 当前语句还没有显示,降低显示延迟,因为现在时间因为用户操作,相当于向前推进了 + if (currentDelay > 0) { + isEnd = false; + // 用 Animation API 操作,浏览器版本太低就无办法了 + const nodeAnimations = node.getAnimations(); + node.style.animationDelay = '0ms '; + for (const ani of nodeAnimations) { + ani.currentTime = 0; + ani.play(); + } + } + } + if (isEnd) { + clearTimeout(timeout); + clearTimeout(setBlockingStateTimeout); + WebGAL.gameplay.performController.unmountPerform(performName); + } + return; + } + children.forEach((node: HTMLDivElement, index: number) => { + // 当前语句的延迟显示时间 + const currentDelay = Number(node.style.animationDelay.split('ms')[0]); + // 当前语句还没有显示,降低显示延迟,因为现在时间因为用户操作,相当于向前推进了 + if (currentDelay > 0) { + node.style.animationDelay = `${currentDelay - delayTime}ms`; + } + // 最后一个元素了 + if (index === len - 1) { + // 并且已经完全显示了,这时候进行下一步 + if (currentDelay === 0) { + clearTimeout(timeout); + WebGAL.gameplay.performController.unmountPerform(performName); + // 卸载函数发生在 nextSentence 生效前,所以不需要做下一行的操作。 + // setTimeout(nextSentence, 0); + } else { + // 还没有完全显示,但是因为时间的推进,要提前完成演出,更新用于结束演出的计时器 + clearTimeout(timeout); + // 如果 Hold 了,自然不要自动结束 + if (!isHold) { + timeout = setTimeout(() => { + WebGAL.gameplay.performController.unmountPerform(performName); + }, baseDuration); + } + } + } + }); + } + }; + + /** + * 接受 next 事件 + */ + WebGAL.events.userInteractNext.on(toNextIntroElement); + + const showIntro = introArray.map((e, i) => ( + <div + key={'introtext' + i + Math.random().toString()} + style={{ animationDelay: `${delayTime * i}ms` }} + className={chosenAnimationClass} + > + {e} + {e === '' ? '\u00a0' : ''} + </div> + )); + const intro = ( + <div style={introContainerStyle}> + <div style={{ padding: '3em 4em 3em 4em' }}>{showIntro}</div> + </div> + ); + // eslint-disable-next-line react/no-deprecated + ReactDOM.render(intro, document.getElementById('introContainer')); + const introContainer = document.getElementById('introContainer'); + + if (introContainer) { + introContainer.style.display = 'block'; + } + + return { + performName, + duration, + isHoldOn: false, + stopFunction: () => { + const introContainer = document.getElementById('introContainer'); + if (introContainer) { + introContainer.style.display = 'none'; + } + WebGAL.events.userInteractNext.off(toNextIntroElement); + }, + blockingNext: () => isBlocking, + blockingAuto: () => isBlocking, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + goNextWhenOver: true, + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/jumpLabel.ts b/packages/webgal/src/Core/gameScripts/jumpLabel.ts new file mode 100644 index 000000000..9baaf2b4c --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/jumpLabel.ts @@ -0,0 +1,20 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { jmp } from '@/Core/gameScripts/label/jmp'; + +/** + * 跳转到指定标签 + * @param sentence + */ +export const jumpLabel = (sentence: ISentence): IPerform => { + jmp(sentence.content); + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/label/index.ts b/packages/webgal/src/Core/gameScripts/label/index.ts new file mode 100644 index 000000000..c0e2f4b99 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/label/index.ts @@ -0,0 +1,18 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; + +/** + * 标签代码,什么也不做 + * @param sentence + */ +export const label = (sentence: ISentence): IPerform => { + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/label/jmp.ts b/packages/webgal/src/Core/gameScripts/label/jmp.ts new file mode 100644 index 000000000..0e3f4d1d7 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/label/jmp.ts @@ -0,0 +1,17 @@ +import { commandType } from '@/Core/controller/scene/sceneInterface'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; + +import { WebGAL } from '@/Core/WebGAL'; + +export const jmp = (labelName: string) => { + // 在当前场景中找到指定的标签。 + const currentLine = WebGAL.sceneManager.sceneData.currentSentenceId; + let result = currentLine; + WebGAL.sceneManager.sceneData.currentScene.sentenceList.forEach((sentence, index) => { + if (sentence.command === commandType.label && sentence.content === labelName && index !== currentLine) { + result = index; + } + }); + WebGAL.sceneManager.sceneData.currentSentenceId = result; + setTimeout(nextSentence, 1); +}; diff --git a/packages/webgal/src/Core/gameScripts/miniAvatar.ts b/packages/webgal/src/Core/gameScripts/miniAvatar.ts new file mode 100644 index 000000000..fb5a40351 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/miniAvatar.ts @@ -0,0 +1,25 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; + +/** + * 显示小头像 + * @param sentence + */ +export const miniAvatar = (sentence: ISentence): IPerform => { + let content = sentence.content; + if (sentence.content === 'none' || sentence.content === '') { + content = ''; + } + webgalStore.dispatch(setStage({ key: 'miniAvatar', value: content })); + return { + performName: 'none', + duration: 0, + isHoldOn: true, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/pixi/index.ts b/packages/webgal/src/Core/gameScripts/pixi/index.ts new file mode 100644 index 000000000..57ca15f14 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/pixi/index.ts @@ -0,0 +1,45 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { logger } from '@/Core/util/logger'; +import { IResult, call } from '../../util/pixiPerformManager/pixiPerformManager'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 运行一段pixi演出 + * @param sentence + */ +export const pixi = (sentence: ISentence): IPerform => { + const pixiPerformName = 'PixiPerform' + sentence.content; + WebGAL.gameplay.performController.performList.forEach((e) => { + if (e.performName === pixiPerformName) { + return { + performName: 'none', + duration: 0, + isOver: false, + isHoldOn: true, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => false, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; + } + }); + const res: IResult = call(sentence.content); + const { container, tickerKey } = res; + + return { + performName: pixiPerformName, + duration: 0, + isHoldOn: true, + stopFunction: () => { + logger.warn('现在正在卸载pixi演出'); + container.destroy({ texture: true, baseTexture: true }); + WebGAL.gameplay.pixiStage?.effectsContainer.removeChild(container); + WebGAL.gameplay.pixiStage?.removeAnimation(tickerKey); + }, + blockingNext: () => false, + blockingAuto: () => false, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/pixi/performs/cherryBlossoms.ts b/packages/webgal/src/Core/gameScripts/pixi/performs/cherryBlossoms.ts new file mode 100644 index 000000000..e8f74811a --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/pixi/performs/cherryBlossoms.ts @@ -0,0 +1,90 @@ +import * as PIXI from 'pixi.js'; +import { registerPerform } from '@/Core/util/pixiPerformManager/pixiPerformManager'; + +import { WebGAL } from '@/Core/WebGAL'; +import { SCREEN_CONSTANTS } from '@/Core/util/constants'; + +const pixicherryBlossoms = (cherryBlossomsSpeed: number) => { + // アニメーション パラメータ + // 倍率を設定 + // 动画参数 + // 设置缩放的系数 + const scalePreset = 0.15; + + const effectsContainer = WebGAL!.gameplay!.pixiStage!.effectsContainer; + const app = WebGAL!.gameplay!.pixiStage!.currentApp!; + const container = new PIXI.Container(); + effectsContainer.addChild(container); + // テクスチャを作成 + // 创建纹理 + const texture = PIXI.Texture.from('./game/tex/cherryBlossoms.png'); + // コンテナを中央に移動 + // 将容器移到中心 + container.x = app.screen.width / 2; + container.y = app.screen.height / 2; + container.pivot.x = container.width / 2; + container.pivot.y = container.height / 2; + // ズームを調整 + // 调整缩放 + container.scale.x = 1; + container.scale.y = 1; + // container.rotation = -0.2; + const bunnyList: any = []; + // アニメーションの更新を監視 + // 监听动画更新 + function tickerFn(delta: number) { + // 桜の位置を制御するために使用される長さと幅を取得します + // 获取长宽,用于控制花出现位置 + const stageWidth = SCREEN_CONSTANTS.width; + const stageHeight = SCREEN_CONSTANTS.height; + // オブジェクトを作成 + // 创建对象 + const bunny = new PIXI.Sprite(texture); + let scaleRand = 0.25; + + bunny.scale.x = scalePreset * scaleRand; + bunny.scale.y = scalePreset * scaleRand; + // アンカーポイントを設定 + // 设置锚点 + bunny.anchor.set(0.5); + // ランダムな桜の位置 + // 随机花位置 + bunny.x = Math.random() * stageWidth - 0.5 * stageWidth; + bunny.y = 0 - 0.5 * stageHeight; + // @ts-ignore + bunny['dropSpeed'] = Math.random() * 5; + // @ts-ignore + bunny['acc'] = Math.random(); + container.addChild(bunny); + bunnyList.push(bunny); + + let count = 0; + for (const e of bunnyList) { + count++; + const randomNumber = Math.random(); + e['dropSpeed'] = e['acc'] * 0.01 + e['dropSpeed']; + e.y += delta * cherryBlossomsSpeed * e['dropSpeed'] * 0.3 + 0.7; + const addX = count % 2 === 0; + if (addX) { + e.x += delta * randomNumber * 0.5; + e.rotation += delta * randomNumber * 0.03; + } else { + e.x -= delta * randomNumber * 0.5; + e.rotation -= delta * randomNumber * 0.03; + } + } + // 同じ画面上の桜の数を制御します + // 控制同屏花数 + if (bunnyList.length >= 200) { + bunnyList.shift()?.destroy(); + container.removeChild(container.children[0]); + } + } + WebGAL!.gameplay!.pixiStage!.registerAnimation( + { setStartState: () => {}, setEndState: () => {}, tickerFunc: tickerFn }, + 'cherryBlossoms-Ticker', + ); + return { container, tickerKey: 'cherryBlossoms-Ticker' }; +}; + +registerPerform('cherryBlossoms', () => pixicherryBlossoms(3)); diff --git a/packages/webgal/src/Core/gameScripts/pixi/performs/rain.ts b/packages/webgal/src/Core/gameScripts/pixi/performs/rain.ts new file mode 100644 index 000000000..81a86365c --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/pixi/performs/rain.ts @@ -0,0 +1,84 @@ +import * as PIXI from 'pixi.js'; +import { registerPerform } from '@/Core/util/pixiPerformManager/pixiPerformManager'; + +import { WebGAL } from '@/Core/WebGAL'; +import { SCREEN_CONSTANTS } from '@/Core/util/constants'; + +const pixiRain = (rainSpeed: number, number: number) => { + // 动画参数 + // 设置缩放的系数 + const scalePreset = 0.48; + + const effectsContainer = WebGAL.gameplay.pixiStage!.effectsContainer!; + const app = WebGAL.gameplay.pixiStage!.currentApp!; + const container = new PIXI.Container(); + effectsContainer.addChild(container); + // 创建纹理 + const texture = PIXI.Texture.from('./game/tex/raindrop.png'); + // 将容器移到中心 + container.x = app.screen.width / 2; + container.y = app.screen.height / 2; + container.pivot.x = container.width / 2; + container.pivot.y = container.height / 2; + // 调整缩放 + container.scale.x = 1; + container.scale.y = 1; + // container.rotation = -0.2; + const bunnyList: PIXI.Sprite[] = []; + // 监听动画更新 + function ticker(delta: number) { + // 获取长宽,用于控制雪花出现位置 + const stageWidth = SCREEN_CONSTANTS.width; + const stageHeight = SCREEN_CONSTANTS.height; + for (let i = 0; i < number; i++) { + // 创建对象 + const bunny = new PIXI.Sprite(texture); + // 随机雨点大小 + let scaleRand = Math.random(); + if (scaleRand <= 0.5) { + scaleRand = 0.5; + } + bunny.scale.x = scalePreset * scaleRand; + bunny.scale.y = scalePreset * scaleRand; + // 设置锚点 + bunny.anchor.set(0.5); + // 随机雪花位置 + bunny.x = Math.random() * stageWidth - 0.5 * stageWidth; + bunny.y = 0 - 0.5 * stageHeight; + // @ts-ignore + bunny['dropSpeed'] = Math.random() * 2; + // @ts-ignore + bunny['acc'] = Math.random(); + bunny['alpha'] = Math.random(); + if (bunny['alpha'] >= 0.5) { + bunny['alpha'] = 0.5; + } + if (bunny['alpha'] <= 0.2) { + bunny['alpha'] = 0.2; + } + container.addChild(bunny); + // 控制每片雨点 + bunnyList.push(bunny); + + // 控制同屏雨点数 + if (bunnyList.length >= 2500) { + bunnyList.shift()?.destroy(); + container.removeChild(container.children[0]); + } + } + // 雨点落下 + for (const e of bunnyList) { + // @ts-ignore + e['dropSpeed'] = e['acc'] * 0.01 + e['dropSpeed']; + // @ts-ignore + e.y += delta * rainSpeed * e['dropSpeed'] * 1.1 + 3; + } + } + WebGAL.gameplay.pixiStage?.registerAnimation( + { setStartState: () => {}, setEndState: () => {}, tickerFunc: ticker }, + 'rain-Ticker', + ); + return { container, tickerKey: 'rain-Ticker' }; +}; + +registerPerform('rain', () => pixiRain(6, 10)); diff --git a/packages/webgal/src/Core/gameScripts/pixi/performs/snow.ts b/packages/webgal/src/Core/gameScripts/pixi/performs/snow.ts new file mode 100644 index 000000000..1c54db7ee --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/pixi/performs/snow.ts @@ -0,0 +1,82 @@ +import * as PIXI from 'pixi.js'; +import { registerPerform } from '@/Core/util/pixiPerformManager/pixiPerformManager'; + +import { WebGAL } from '@/Core/WebGAL'; +import { SCREEN_CONSTANTS } from '@/Core/util/constants'; + +const pixiSnow = (snowSpeed: number) => { + // 动画参数 + // 设置缩放的系数 + const scalePreset = 0.144; + + const effectsContainer = WebGAL.gameplay.pixiStage!.effectsContainer!; + const app = WebGAL.gameplay.pixiStage!.currentApp!; + const container = new PIXI.Container(); + effectsContainer.addChild(container); + // 创建纹理 + const texture = PIXI.Texture.from('./game/tex/snowFlake_min.png'); + // 将容器移到中心 + container.x = app.screen.width / 2; + container.y = app.screen.height / 2; + container.pivot.x = container.width / 2; + container.pivot.y = container.height / 2; + // 调整缩放 + container.scale.x = 1; + container.scale.y = 1; + // container.rotation = -0.2; + const bunnyList: any = []; + // 监听动画更新 + function tickerFn(delta: number) { + // 获取长宽,用于控制雪花出现位置 + const stageWidth = SCREEN_CONSTANTS.width; + const stageHeight = SCREEN_CONSTANTS.height; + // 创建对象 + const bunny = new PIXI.Sprite(texture); + // 随机雪花大小 + let scaleRand = Math.random(); + if (scaleRand <= 0.5) { + scaleRand = 0.5; + } + bunny.scale.x = scalePreset * scaleRand; + bunny.scale.y = scalePreset * scaleRand; + // 设置锚点 + bunny.anchor.set(0.5); + // 随机雪花位置 + bunny.x = Math.random() * stageWidth - 0.5 * stageWidth; + bunny.y = 0 - 0.5 * stageHeight; + // @ts-ignore + bunny['dropSpeed'] = Math.random() * 2; + // @ts-ignore + bunny['acc'] = Math.random(); + container.addChild(bunny); + // 控制每片雪花 + bunnyList.push(bunny); + let count = 0; // 用于判断雪花往左还是往右飘,是2的倍数则往左 + for (const e of bunnyList) { + count++; + const randomNumber = Math.random(); + e['dropSpeed'] = e['acc'] * 0.01 + e['dropSpeed']; + e.y += delta * snowSpeed * e['dropSpeed'] * 0.3 + 0.7; + const addX = count % 2 === 0; + if (addX) { + e.x += delta * randomNumber * 0.5; + e.rotation += delta * randomNumber * 0.03; + } else { + e.x -= delta * randomNumber * 0.5; + e.rotation -= delta * randomNumber * 0.03; + } + } + // 控制同屏雪花数 + if (bunnyList.length >= 500) { + bunnyList.shift()?.destroy(); + container.removeChild(container.children[0]); + } + } + WebGAL.gameplay.pixiStage?.registerAnimation( + { setStartState: () => {}, setEndState: () => {}, tickerFunc: tickerFn }, + 'snow-Ticker', + ); + return { container, tickerKey: 'snow-Ticker' }; +}; + +registerPerform('snow', () => pixiSnow(3)); diff --git a/packages/webgal/src/Core/gameScripts/pixi/pixiInit.ts b/packages/webgal/src/Core/gameScripts/pixi/pixiInit.ts new file mode 100644 index 000000000..60c7a5aef --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/pixi/pixiInit.ts @@ -0,0 +1,46 @@ +import { commandType, ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { logger } from '@/Core/util/logger'; +import { webgalStore } from '@/store/store'; +import { resetStageState, stageActions } from '@/store/stageReducer'; +import cloneDeep from 'lodash/cloneDeep'; + +import { WebGAL } from '@/Core/WebGAL'; +import { IRunPerform } from '@/store/stageInterface'; + +/** + * 初始化pixi + * @param sentence + */ +export const pixiInit = (sentence: ISentence): IPerform => { + WebGAL.gameplay.performController.performList.forEach((e) => { + if (e.performName.match(/PixiPerform/)) { + logger.warn('pixi 被脚本重新初始化', e.performName); + /** + * 卸载演出 + */ + for (let i = 0; i < WebGAL.gameplay.performController.performList.length; i++) { + const e2 = WebGAL.gameplay.performController.performList[i]; + if (e2.performName === e.performName) { + e2.stopFunction(); + clearTimeout(e2.stopTimeout as unknown as number); + WebGAL.gameplay.performController.performList.splice(i, 1); + i--; + } + } + /** + * 从状态表里清除演出 + */ + webgalStore.dispatch(stageActions.removeAllPixiPerforms()); + } + }); + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/playEffect.ts b/packages/webgal/src/Core/gameScripts/playEffect.ts new file mode 100644 index 000000000..4fa726b91 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/playEffect.ts @@ -0,0 +1,107 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { logger } from '@/Core/util/logger'; +import { RootState, webgalStore } from '@/store/store'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { useSelector } from 'react-redux'; +import { WebGAL } from '@/Core/WebGAL'; +import { WEBGAL_NONE } from '@/Core/constants'; + +/** + * 播放一段效果音 + * @param sentence 语句 + */ +export const playEffect = (sentence: ISentence): IPerform => { + logger.debug('play SE'); + // 如果有ID,这里被覆写,一般用于循环的情况 + // 有循环参数且有 ID,就循环 + let performInitName = 'effect-sound'; + // 清除先前的效果音 + WebGAL.gameplay.performController.unmountPerform(performInitName, true); + let url = sentence.content; + let isLoop = false; + // 清除带 id 的效果音 + if (getSentenceArgByKey(sentence, 'id')) { + const id = getSentenceArgByKey(sentence, 'id')?.toString() ?? ''; + performInitName = `effect-sound-${id}`; + WebGAL.gameplay.performController.unmountPerform(performInitName, true); + isLoop = true; + } + let isOver = false; + if (!url || url === WEBGAL_NONE) { + return { + performName: WEBGAL_NONE, + duration: 0, + isHoldOn: false, + blockingAuto(): boolean { + return false; + }, + blockingNext(): boolean { + return false; + }, + stopFunction(): void {}, + stopTimeout: undefined, + }; + } + return { + performName: 'none', + blockingAuto(): boolean { + return false; + }, + blockingNext(): boolean { + return false; + }, + isHoldOn: false, + stopFunction(): void {}, + stopTimeout: undefined, + + duration: 1000 * 60 * 60, + arrangePerformPromise: new Promise((resolve) => { + // 播放效果音 + setTimeout(() => { + const volumeArg = getSentenceArgByKey(sentence, 'volume'); + let seElement = document.createElement('audio'); + seElement.src = url; + if (isLoop) { + seElement.loop = true; + } + const userDataState = webgalStore.getState().userData; + const mainVol = userDataState.optionData.volumeMain; + // Work when volumeArg is a number between 0 and 100 + const volume = typeof volumeArg === 'number' && volumeArg >= 0 && volumeArg <= 100 ? volumeArg : 100; + const seVol = mainVol * 0.01 * (userDataState.optionData?.seVolume ?? 100) * 0.01 * volume * 0.01; + seElement.volume = seVol; + seElement.currentTime = 0; + const perform: IPerform = { + performName: performInitName, + duration: 1000 * 60 * 60, + isHoldOn: isLoop, + skipNextCollect: true, + stopFunction: () => { + // 演出已经结束了,所以不用播放效果音了 + seElement.pause(); + seElement.remove(); + }, + blockingNext: () => false, + blockingAuto: () => { + // loop 的话就不 block auto + if (isLoop) return false; + return !isOver; + }, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; + resolve(perform); + seElement?.play(); + seElement.onended = () => { + for (const e of WebGAL.gameplay.performController.performList) { + if (e.performName === performInitName) { + isOver = true; + e.stopFunction(); + WebGAL.gameplay.performController.unmountPerform(e.performName); + } + } + }; + }, 1); + }), + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/playVideo.tsx b/packages/webgal/src/Core/gameScripts/playVideo.tsx new file mode 100644 index 000000000..f57e41fdd --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/playVideo.tsx @@ -0,0 +1,118 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import React from 'react'; +import ReactDOM from 'react-dom'; +import styles from '@/Stage/FullScreenPerform/fullScreenPerform.module.scss'; +import { webgalStore } from '@/store/store'; +import { getRandomPerformName, PerformController } from '@/Core/Modules/perform/performController'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { WebGAL } from '@/Core/WebGAL'; +/** + * 播放一段视频 * @param sentence + */ +export const playVideo = (sentence: ISentence): IPerform => { + const userDataState = webgalStore.getState().userData; + const mainVol = userDataState.optionData.volumeMain; + const vocalVol = mainVol * 0.01 * userDataState.optionData.vocalVolume * 0.01; + const bgmVol = mainVol * 0.01 * userDataState.optionData.bgmVolume * 0.01; + const performInitName: string = getRandomPerformName(); + + let blockingNext = getSentenceArgByKey(sentence, 'skipOff'); + let blockingNextFlag = false; + if (blockingNext) { + blockingNextFlag = true; + } + + // eslint-disable-next-line react/no-deprecated + ReactDOM.render( + <div className={styles.videoContainer}> + <video className={styles.fullScreen_video} id="playVideoElement" src={sentence.content} autoPlay={true} /> + </div>, + document.getElementById('videoContainer'), + ); + let isOver = false; + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => blockingNextFlag, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + arrangePerformPromise: new Promise<IPerform>((resolve) => { + /** + * 启动视频播放 + */ + setTimeout(() => { + let VocalControl: any = document.getElementById('playVideoElement'); + if (VocalControl !== null) { + VocalControl.currentTime = 0; + VocalControl.volume = bgmVol; + const endPerform = () => { + for (const e of WebGAL.gameplay.performController.performList) { + if (e.performName === performInitName) { + isOver = true; + e.stopFunction(); + WebGAL.gameplay.performController.unmountPerform(e.performName); + } + } + }; + const skipVideo = () => { + endPerform(); + }; + // 双击可跳过视频 + WebGAL.events.fullscreenDbClick.on(skipVideo); + // 播放并作为一个特别演出加入 + const perform = { + performName: performInitName, + duration: 1000 * 60 * 60, + isOver: false, + isHoldOn: false, + stopFunction: () => { + WebGAL.events.fullscreenDbClick.off(skipVideo); + /** + * 恢复音量 + */ + const bgmElement: any = document.getElementById('currentBgm'); + if (bgmElement) { + bgmElement.volume = bgmVol.toString(); + } + const vocalElement: any = document.getElementById('currentVocal'); + if (bgmElement) { + vocalElement.volume = vocalVol.toString(); + } + // eslint-disable-next-line react/no-deprecated + ReactDOM.render(<div />, document.getElementById('videoContainer')); + }, + blockingNext: () => blockingNextFlag, + blockingAuto: () => { + return !isOver; + }, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + goNextWhenOver: true, + }; + resolve(perform); + /** + * 把bgm和语音的音量设为0 + */ + const vocalVol2 = 0; + const bgmVol2 = 0; + const bgmElement: any = document.getElementById('currentBgm'); + if (bgmElement) { + bgmElement.volume = bgmVol2.toString(); + } + const vocalElement: any = document.getElementById('currentVocal'); + if (bgmElement) { + vocalElement.volume = vocalVol2.toString(); + } + + VocalControl?.play(); + + VocalControl.onended = () => { + endPerform(); + }; + } + }, 1); + }), + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/say.ts b/packages/webgal/src/Core/gameScripts/say.ts new file mode 100644 index 000000000..95fb97cfa --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/say.ts @@ -0,0 +1,173 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { playVocal } from './vocal'; +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; +import { useTextDelay } from '@/hooks/useTextOptions'; +import { getRandomPerformName, PerformController } from '@/Core/Modules/perform/performController'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { textSize, voiceOption } from '@/store/userDataInterface'; +import { WebGAL } from '@/Core/WebGAL'; +import { compileSentence } from '@/Stage/TextBox/TextBox'; +import { performMouthAnimation } from '@/Core/gameScripts/vocal/vocalAnimation'; +import { match } from '@/Core/util/match'; + +/** + * 进行普通对话的显示 + * @param sentence 语句 + * @return {IPerform} 执行的演出 + */ +export const say = (sentence: ISentence): IPerform => { + const stageState = webgalStore.getState().stage; + const userDataState = webgalStore.getState().userData; + const dispatch = webgalStore.dispatch; + let dialogKey = Math.random().toString(); // 生成一个随机的key + let dialogToShow = sentence.content; // 获取对话内容 + if (dialogToShow) { + dialogToShow = String(dialogToShow).replace(/ /g, '\u00a0'); // 替换空格 + } + const isConcat = getSentenceArgByKey(sentence, 'concat'); // 是否是继承语句 + const isNotend = getSentenceArgByKey(sentence, 'notend') as boolean; // 是否有 notend 参数 + const speaker = getSentenceArgByKey(sentence, 'speaker'); // 获取说话者 + const clear = getSentenceArgByKey(sentence, 'clear'); // 是否清除说话者 + const vocal = getSentenceArgByKey(sentence, 'vocal'); // 是否播放语音 + + // 如果是concat,那么就继承上一句的key,并且继承上一句对话。 + if (isConcat) { + dialogKey = stageState.currentDialogKey; + dialogToShow = stageState.showText + dialogToShow; + dispatch(setStage({ key: 'currentConcatDialogPrev', value: stageState.showText })); + } else { + dispatch(setStage({ key: 'currentConcatDialogPrev', value: '' })); + } + + // 设置文本显示 + dispatch(setStage({ key: 'showText', value: dialogToShow })); + dispatch(setStage({ key: 'vocal', value: '' })); + + // 清除语音 + if (!(userDataState.optionData.voiceInterruption === voiceOption.no && vocal === null)) { + // 只有开关设置为不中断,并且没有语音的时候,才需要不中断 + dispatch(setStage({ key: 'playVocal', value: '' })); + WebGAL.gameplay.performController.unmountPerform('vocal-play', true); + } + // 设置key + dispatch(setStage({ key: 'currentDialogKey', value: dialogKey })); + // 计算延迟 + const textDelay = useTextDelay(userDataState.optionData.textSpeed); + // 本句延迟 + const textNodes = compileSentence(sentence.content, 3); + const len = textNodes.reduce((prev, curr) => prev + curr.length, 0); + const sentenceDelay = textDelay * len; + + for (const e of sentence.args) { + if (e.key === 'fontSize') { + switch (e.value) { + case 'default': + dispatch(setStage({ key: 'showTextSize', value: -1 })); + break; + case 'small': + dispatch(setStage({ key: 'showTextSize', value: textSize.small })); + break; + case 'medium': + dispatch(setStage({ key: 'showTextSize', value: textSize.medium })); + break; + case 'large': + dispatch(setStage({ key: 'showTextSize', value: textSize.large })); + break; + } + } + } + + // 设置显示的角色名称 + let showName: string | number | boolean = stageState.showName; // 先默认继承 + if (speaker !== null) { + showName = speaker; + } + if (clear) { + showName = ''; + } + dispatch(setStage({ key: 'showName', value: showName })); + + // 模拟说话 + let performSimulateVocalTimeout: ReturnType<typeof setTimeout> | null = null; + let performSimulateVocalDelay = 0; + let pos = ''; + let key = ''; + for (const e of sentence.args) { + if (e.value === true) { + match(e.key) + .with('left', () => { + pos = 'left'; + }) + .with('right', () => { + pos = 'right'; + }) + .endsWith('center', () => { + pos = 'center'; + }); + } + if (e.key === 'figureId') { + key = `${e.value.toString()}`; + } + } + let audioLevel = 80; + const performSimulateVocal = (end = false) => { + let nextAudioLevel = audioLevel + (Math.random() * 60 - 30); // 在 -30 到 +30 之间波动 + // 确保波动幅度不小于 5 + if (Math.abs(nextAudioLevel - audioLevel) < 5) { + nextAudioLevel = audioLevel + Math.sign(nextAudioLevel - audioLevel) * 5; + } + // 确保结果在 25 到 100 之间 + audioLevel = Math.max(15, Math.min(nextAudioLevel, 100)); + const currentStageState = webgalStore.getState().stage; + const figureAssociatedAnimation = currentStageState.figureAssociatedAnimation; + const animationItem = figureAssociatedAnimation.find((tid) => tid.targetId === key); + const targetKey = key ? key : `fig-${pos}`; + if (end) { + audioLevel = 0; + } + performMouthAnimation({ + audioLevel, + OPEN_THRESHOLD: 50, + HALF_OPEN_THRESHOLD: 25, + currentMouthValue: 0, + lerpSpeed: 1, + key: targetKey, + animationItem, + pos, + }); + if (!end) performSimulateVocalTimeout = setTimeout(performSimulateVocal, 50); + }; + // 播放一段语音 + if (vocal) { + playVocal(sentence); + } else if (key || pos) { + performSimulateVocalDelay = len * 250; + performSimulateVocal(); + } + + const performInitName: string = getRandomPerformName(); + let endDelay = 750 - userDataState.optionData.textSpeed * 250; + // 如果有 notend 参数,那么就不需要等待 + if (isNotend) { + endDelay = 0; + } + + return { + performName: performInitName, + duration: sentenceDelay + endDelay + performSimulateVocalDelay, + isHoldOn: false, + stopFunction: () => { + WebGAL.events.textSettle.emit(); + if (performSimulateVocalTimeout) { + performSimulateVocal(true); + clearTimeout(performSimulateVocalTimeout); + } + }, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + goNextWhenOver: isNotend, + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/setAnimation.ts b/packages/webgal/src/Core/gameScripts/setAnimation.ts new file mode 100644 index 000000000..26712fad5 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setAnimation.ts @@ -0,0 +1,47 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { IAnimationObject } from '@/Core/controller/stage/pixi/PixiController'; +import { logger } from '@/Core/util/logger'; +import { webgalStore } from '@/store/store'; + +import { getAnimateDuration, getAnimationObject } from '@/Core/Modules/animationFunctions'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 设置背景动画 + * @param sentence + */ +export const setAnimation = (sentence: ISentence): IPerform => { + const startDialogKey = webgalStore.getState().stage.currentDialogKey; + const animationName = sentence.content; + const animationDuration = getAnimateDuration(animationName); + const target = (getSentenceArgByKey(sentence, 'target')?.toString() ?? 'default_id').toString(); + const key = `${target}-${animationName}-${animationDuration}`; + let stopFunction; + setTimeout(() => { + WebGAL.gameplay.pixiStage?.stopPresetAnimationOnTarget(target); + const animationObj: IAnimationObject | null = getAnimationObject(animationName, target, animationDuration); + if (animationObj) { + logger.debug(`动画${animationName}作用在${target}`, animationDuration); + WebGAL.gameplay.pixiStage?.registerAnimation(animationObj, key, target); + } + }, 0); + stopFunction = () => { + setTimeout(() => { + const endDialogKey = webgalStore.getState().stage.currentDialogKey; + const isHasNext = startDialogKey !== endDialogKey; + WebGAL.gameplay.pixiStage?.removeAnimationWithSetEffects(key); + }, 0); + }; + + return { + performName: key, + duration: animationDuration, + isHoldOn: false, + stopFunction, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/setComplexAnimation.ts b/packages/webgal/src/Core/gameScripts/setComplexAnimation.ts new file mode 100644 index 000000000..4c30cac0c --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setComplexAnimation.ts @@ -0,0 +1,52 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { webgalAnimations } from '@/Core/controller/stage/pixi/animations'; +import { IAnimationObject } from '@/Core/controller/stage/pixi/PixiController'; +import { logger } from '@/Core/util/logger'; +import { webgalStore } from '@/store/store'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 设置背景动画 + * @param sentence + */ +export const setComplexAnimation = (sentence: ISentence): IPerform => { + const startDialogKey = webgalStore.getState().stage.currentDialogKey; + const animationName = sentence.content; + const animationDuration = (getSentenceArgByKey(sentence, 'duration') ?? 0) as number; + const target = (getSentenceArgByKey(sentence, 'target')?.toString() ?? '0') as string; + const key = `${target}-${animationName}-${animationDuration}`; + const animationFunction: Function | null = getAnimationObject(animationName); + let stopFunction: () => void = () => {}; + if (animationFunction) { + logger.debug(`动画${animationName}作用在${target}`, animationDuration); + const animationObj: IAnimationObject = animationFunction(target, animationDuration); + WebGAL.gameplay.pixiStage?.stopPresetAnimationOnTarget(target); + WebGAL.gameplay.pixiStage?.registerAnimation(animationObj, key, target); + stopFunction = () => { + const endDialogKey = webgalStore.getState().stage.currentDialogKey; + const isHasNext = startDialogKey !== endDialogKey; + WebGAL.gameplay.pixiStage?.removeAnimationWithSetEffects(key); + }; + } + return { + performName: key, + duration: animationDuration, + isHoldOn: false, + stopFunction, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; + +function getAnimationObject(animationName: string): Function | null { + const result = webgalAnimations.find((e) => e.name === animationName); + logger.debug('装载动画', result); + if (result) { + return result.animationGenerateFunc; + } + return null; +} diff --git a/packages/webgal/src/Core/gameScripts/setFilter.ts b/packages/webgal/src/Core/gameScripts/setFilter.ts new file mode 100644 index 000000000..90a5d9e8f --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setFilter.ts @@ -0,0 +1,18 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; + +/** + * 设置背景效果 + * @param sentence + */ +export const setFilter = (sentence: ISentence): IPerform => { + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/setTempAnimation.ts b/packages/webgal/src/Core/gameScripts/setTempAnimation.ts new file mode 100644 index 000000000..6ac435d1b --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setTempAnimation.ts @@ -0,0 +1,59 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { IAnimationObject } from '@/Core/controller/stage/pixi/PixiController'; +import { logger } from '@/Core/util/logger'; +import { webgalStore } from '@/store/store'; +import { generateTimelineObj } from '@/Core/controller/stage/pixi/animations/timeline'; +import cloneDeep from 'lodash/cloneDeep'; +import { baseTransform } from '@/store/stageInterface'; +import { IUserAnimation } from '../Modules/animations'; +import { getAnimateDuration, getAnimationObject } from '@/Core/Modules/animationFunctions'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 设置临时动画 + * @param sentence + */ +export const setTempAnimation = (sentence: ISentence): IPerform => { + const startDialogKey = webgalStore.getState().stage.currentDialogKey; + const animationName = (Math.random() * 10).toString(16); + const animationString = sentence.content; + let animationObj; + try { + animationObj = JSON.parse(animationString); + } catch (e) { + animationObj = []; + } + const newAnimation: IUserAnimation = { name: animationName, effects: animationObj }; + WebGAL.animationManager.addAnimation(newAnimation); + const animationDuration = getAnimateDuration(animationName); + const target = (getSentenceArgByKey(sentence, 'target')?.toString() ?? '0') as string; + const key = `${target}-${animationName}-${animationDuration}`; + let stopFunction = () => {}; + setTimeout(() => { + WebGAL.gameplay.pixiStage?.stopPresetAnimationOnTarget(target); + const animationObj: IAnimationObject | null = getAnimationObject(animationName, target, animationDuration); + if (animationObj) { + logger.debug(`动画${animationName}作用在${target}`, animationDuration); + WebGAL.gameplay.pixiStage?.registerAnimation(animationObj, key, target); + } + }, 0); + stopFunction = () => { + setTimeout(() => { + const endDialogKey = webgalStore.getState().stage.currentDialogKey; + const isHasNext = startDialogKey !== endDialogKey; + WebGAL.gameplay.pixiStage?.removeAnimationWithSetEffects(key); + }, 0); + }; + + return { + performName: key, + duration: animationDuration, + isHoldOn: false, + stopFunction, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/setTextbox.ts b/packages/webgal/src/Core/gameScripts/setTextbox.ts new file mode 100644 index 000000000..f112cee41 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setTextbox.ts @@ -0,0 +1,25 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; + +/** + * 语句执行的模板代码 + * @param sentence + */ +export function setTextbox(sentence: ISentence): IPerform { + if (sentence.content === 'hide') { + webgalStore.dispatch(setStage({ key: 'isDisableTextbox', value: true })); + } else { + webgalStore.dispatch(setStage({ key: 'isDisableTextbox', value: false })); + } + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +} diff --git a/packages/webgal/src/Core/gameScripts/setTransform.ts b/packages/webgal/src/Core/gameScripts/setTransform.ts new file mode 100644 index 000000000..d094638bb --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setTransform.ts @@ -0,0 +1,93 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { IAnimationObject } from '@/Core/controller/stage/pixi/PixiController'; +import { logger } from '@/Core/util/logger'; +import { webgalStore } from '@/store/store'; +import { generateTimelineObj } from '@/Core/controller/stage/pixi/animations/timeline'; +import cloneDeep from 'lodash/cloneDeep'; +import { baseTransform, ITransform } from '@/store/stageInterface'; +import { IUserAnimation } from '../Modules/animations'; +import { generateTransformAnimationObj } from '@/Core/controller/stage/pixi/animations/generateTransformAnimationObj'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 设置变换 + * @param sentence + */ +export const setTransform = (sentence: ISentence): IPerform => { + const startDialogKey = webgalStore.getState().stage.currentDialogKey; + const animationName = (Math.random() * 10).toString(16); + const animationString = sentence.content; + let animationObj: (ITransform & { + duration: number; + })[]; + const duration = getSentenceArgByKey(sentence, 'duration'); + const target = (getSentenceArgByKey(sentence, 'target')?.toString() ?? '0') as string; + try { + const frame = JSON.parse(animationString) as ITransform & { duration: number }; + animationObj = generateTransformAnimationObj(target, frame, duration); + } catch (e) { + // 解析都错误了,歇逼吧 + animationObj = []; + } + + const newAnimation: IUserAnimation = { name: animationName, effects: animationObj }; + WebGAL.animationManager.addAnimation(newAnimation); + const animationDuration = getAnimateDuration(animationName); + + const key = `${target}-${animationName}-${animationDuration}`; + let stopFunction = () => {}; + setTimeout(() => { + WebGAL.gameplay.pixiStage?.stopPresetAnimationOnTarget(target); + const animationObj: IAnimationObject | null = getAnimationObject(animationName, target, animationDuration); + if (animationObj) { + logger.debug(`动画${animationName}作用在${target}`, animationDuration); + WebGAL.gameplay.pixiStage?.registerAnimation(animationObj, key, target); + } + }, 0); + stopFunction = () => { + setTimeout(() => { + const endDialogKey = webgalStore.getState().stage.currentDialogKey; + const isHasNext = startDialogKey !== endDialogKey; + WebGAL.gameplay.pixiStage?.removeAnimationWithSetEffects(key); + }, 0); + }; + + return { + performName: key, + duration: animationDuration, + isHoldOn: false, + stopFunction, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; + +function getAnimationObject(animationName: string, target: string, duration: number) { + const effect = WebGAL.animationManager.getAnimations().find((ani) => ani.name === animationName); + if (effect) { + const mappedEffects = effect.effects.map((effect) => { + const newEffect = cloneDeep({ ...baseTransform, duration: 0 }); + Object.assign(newEffect, effect); + newEffect.duration = effect.duration; + return newEffect; + }); + logger.debug('装载自定义动画', mappedEffects); + return generateTimelineObj(mappedEffects, target, duration); + } + return null; +} + +function getAnimateDuration(animationName: string) { + const effect = WebGAL.animationManager.getAnimations().find((ani) => ani.name === animationName); + if (effect) { + let duration = 0; + effect.effects.forEach((e) => { + duration += e.duration; + }); + return duration; + } + return 0; +} diff --git a/packages/webgal/src/Core/gameScripts/setTransition.ts b/packages/webgal/src/Core/gameScripts/setTransition.ts new file mode 100644 index 000000000..1ad723329 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setTransition.ts @@ -0,0 +1,36 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import cloneDeep from 'lodash/cloneDeep'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { setStage } from '@/store/stageReducer'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 设置转场效果 + * @param sentence + */ +export const setTransition = (sentence: ISentence): IPerform => { + // 根据参数设置指定位置 + let key = '0'; + for (const e of sentence.args) { + if (e.key === 'target') { + key = e.value.toString(); + } + } + if (getSentenceArgByKey(sentence, 'enter')) { + WebGAL.animationManager.nextEnterAnimationName.set(key, getSentenceArgByKey(sentence, 'enter')!.toString()); + } + if (getSentenceArgByKey(sentence, 'exit')) { + WebGAL.animationManager.nextExitAnimationName.set(key + '-off', getSentenceArgByKey(sentence, 'exit')!.toString()); + } + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => false, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/setVar.ts b/packages/webgal/src/Core/gameScripts/setVar.ts new file mode 100644 index 000000000..ff6ac5508 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/setVar.ts @@ -0,0 +1,127 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { setStageVar } from '@/store/stageReducer'; +import { logger } from '@/Core/util/logger'; +import { compile } from 'angular-expressions'; +import { setScriptManagedGlobalVar } from '@/store/userDataReducer'; +import { ActionCreatorWithPayload } from '@reduxjs/toolkit'; +import { ISetGameVar } from '@/store/stageInterface'; +import { dumpToStorageFast } from '@/Core/controller/storage/storageController'; +import get from 'lodash/get'; +/** + * 设置变量 + * @param sentence + */ +export const setVar = (sentence: ISentence): IPerform => { + let setGlobal = false; + sentence.args.forEach((e) => { + if (e.key === 'global') { + setGlobal = true; + } + }); + let targetReducerFunction: ActionCreatorWithPayload<ISetGameVar, string>; + if (setGlobal) { + targetReducerFunction = setScriptManagedGlobalVar; + } else { + targetReducerFunction = setStageVar; + } + // 先把表达式拆分为变量名和赋值语句 + if (sentence.content.match(/\s*=\s*/)) { + const key = sentence.content.split(/\s*=\s*/)[0]; + const valExp = sentence.content.split(/\s*=\s*/)[1]; + if (valExp === 'random()') { + webgalStore.dispatch(targetReducerFunction({ key, value: Math.random() })); + } else if (valExp.match(/[+\-*\/()]/)) { + // 如果包含加减乘除号,则运算 + // 先取出运算表达式中的变量 + const valExpArr = valExp.split(/([+\-*\/()])/g); + // 将变量替换为变量的值,然后合成表达式字符串 + const valExp2 = valExpArr + .map((e) => { + if (!e.trim().match(/^[a-zA-Z_$][a-zA-Z0-9_.]*$/)) { + // 检查是否是变量名,不是就返回本身 + return e; + } + const _r = getValueFromStateElseKey(e.trim(), true); + return typeof _r === 'string' ? `'${_r}'` : _r; + }) + .reduce((pre, curr) => pre + curr, ''); + let result = ''; + try { + const exp = compile(valExp2); + result = exp(); + } catch (e) { + logger.error('expression compile error', e); + } + webgalStore.dispatch(targetReducerFunction({ key, value: result })); + } else if (valExp.match(/true|false/)) { + if (valExp.match(/true/)) { + webgalStore.dispatch(targetReducerFunction({ key, value: true })); + } + if (valExp.match(/false/)) { + webgalStore.dispatch(targetReducerFunction({ key, value: false })); + } + } else if (valExp.length === 0) { + webgalStore.dispatch(targetReducerFunction({ key, value: '' })); + } else { + if (!isNaN(Number(valExp))) { + webgalStore.dispatch(targetReducerFunction({ key, value: Number(valExp) })); + } else { + // 字符串 + webgalStore.dispatch(targetReducerFunction({ key, value: getValueFromStateElseKey(valExp, true) })); + } + } + if (setGlobal) { + logger.debug('设置全局变量:', { key, value: webgalStore.getState().userData.globalGameVar[key] }); + dumpToStorageFast(); + } else { + logger.debug('设置变量:', { key, value: webgalStore.getState().stage.GameVar[key] }); + } + } + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; + +type BaseVal = string | number | boolean | undefined; + +/** + * 取不到时返回 undefined + */ +export function getValueFromState(key: string) { + let ret: any; + const stage = webgalStore.getState().stage; + const userData = webgalStore.getState().userData; + const _Merge = { stage, userData }; // 不要直接合并到一起,防止可能的键冲突 + if (stage.GameVar.hasOwnProperty(key)) { + ret = stage.GameVar[key]; + } else if (userData.globalGameVar.hasOwnProperty(key)) { + ret = userData.globalGameVar[key]; + } else if (key.startsWith('$')) { + const propertyKey = key.replace('$', ''); + ret = get(_Merge, propertyKey, undefined) as BaseVal; + } + return ret; +} + +/** + * 取不到时返回 {key} + */ +export function getValueFromStateElseKey(key: string, useKeyNameAsReturn = false) { + const valueFromState = getValueFromState(key); + if (valueFromState === null || valueFromState === undefined) { + logger.warn('valueFromState result null, key = ' + key); + if (useKeyNameAsReturn) { + return key; + } + return `{${key}}`; + } + return valueFromState; +} diff --git a/packages/webgal/src/Core/gameScripts/showVars.ts b/packages/webgal/src/Core/gameScripts/showVars.ts new file mode 100644 index 000000000..1e677d176 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/showVars.ts @@ -0,0 +1,43 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; +import { logger } from '@/Core/util/logger'; +import { getRandomPerformName } from '@/Core/Modules/perform/performController'; +import { PERFORM_CONFIG } from '@/config'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 进行普通对话的显示 + * @param sentence 语句 + * @return {IPerform} 执行的演出 + */ +export const showVars = (sentence: ISentence): IPerform => { + const stageState = webgalStore.getState().stage; + const userDataState = webgalStore.getState().userData; + const dispatch = webgalStore.dispatch; + // 设置文本显示 + const allVar = { + stageGameVar: stageState.GameVar, + globalGameVar: userDataState.globalGameVar, + }; + dispatch(setStage({ key: 'showText', value: JSON.stringify(allVar) })); + dispatch(setStage({ key: 'showName', value: '展示变量' })); + logger.debug('展示变量:', allVar); + setTimeout(() => { + WebGAL.events.textSettle.emit(); + }, 0); + const performInitName: string = getRandomPerformName(); + const endDelay = 750 - userDataState.optionData.textSpeed * 250; + return { + performName: performInitName, + duration: endDelay, + isHoldOn: false, + stopFunction: () => { + WebGAL.events.textSettle.emit(); + }, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/template.ts b/packages/webgal/src/Core/gameScripts/template.ts new file mode 100644 index 000000000..4945e9d4a --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/template.ts @@ -0,0 +1,18 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; + +/** + * 语句执行的模板代码 + * @param sentence + */ +export const template = (sentence: ISentence): IPerform => { + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/unlockBgm.ts b/packages/webgal/src/Core/gameScripts/unlockBgm.ts new file mode 100644 index 000000000..8eb1493d2 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/unlockBgm.ts @@ -0,0 +1,39 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { unlockBgmInUserData } from '@/store/userDataReducer'; +import localforage from 'localforage'; +import { logger } from '@/Core/util/logger'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 解锁bgm + * @param sentence + */ +export const unlockBgm = (sentence: ISentence): IPerform => { + const url = sentence.content; + let name = sentence.content; + let series = 'default'; + sentence.args.forEach((e) => { + if (e.key === 'name') { + name = e.value.toString(); + } + if (e.key === 'series') { + series = e.value.toString(); + } + }); + logger.info(`解锁BGM:${name},路径:${url},所属系列:${series}`); + webgalStore.dispatch(unlockBgmInUserData({ name, url, series })); + const userDataState = webgalStore.getState().userData; + localforage.setItem(WebGAL.gameKey, userDataState).then(() => {}); + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/unlockCg.ts b/packages/webgal/src/Core/gameScripts/unlockCg.ts new file mode 100644 index 000000000..88772eb97 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/unlockCg.ts @@ -0,0 +1,39 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; +import { webgalStore } from '@/store/store'; +import { unlockCgInUserData } from '@/store/userDataReducer'; +import { logger } from '@/Core/util/logger'; +import localforage from 'localforage'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 解锁cg + * @param sentence + */ +export const unlockCg = (sentence: ISentence): IPerform => { + const url = sentence.content; + let name = sentence.content; + let series = 'default'; + sentence.args.forEach((e) => { + if (e.key === 'name') { + name = e.value.toString(); + } + if (e.key === 'series') { + series = e.value.toString(); + } + }); + logger.info(`解锁CG:${name},路径:${url},所属系列:${series}`); + webgalStore.dispatch(unlockCgInUserData({ name, url, series })); + const userDataState = webgalStore.getState().userData; + localforage.setItem(WebGAL.gameKey, userDataState).then(() => {}); + return { + performName: 'none', + duration: 0, + isHoldOn: false, + stopFunction: () => {}, + blockingNext: () => false, + blockingAuto: () => true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/vocal/conentsCash.ts b/packages/webgal/src/Core/gameScripts/vocal/conentsCash.ts new file mode 100644 index 000000000..d4be3828f --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/vocal/conentsCash.ts @@ -0,0 +1,30 @@ +export class FigureConentsCash { + private _content = ''; + + // public constructor() {} + public push(sentenceContent: string) { + this._content = sentenceContent; + } + public pop(): string { + const constContent = this._content; + this._content = ''; + return constContent; + } +} + +export class VoiceConentsCash { + private _content = ''; + + // public constructor() {} + public push(sentenceContent: string) { + this._content = sentenceContent; + } + public pop(): string { + const constContent = this._content; + this._content = ''; + return constContent; + } +} + +export const figureCash = new FigureConentsCash(); +export const voiceCash = new VoiceConentsCash(); diff --git a/packages/webgal/src/Core/gameScripts/vocal/index.ts b/packages/webgal/src/Core/gameScripts/vocal/index.ts new file mode 100644 index 000000000..e4e34661d --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/vocal/index.ts @@ -0,0 +1,199 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; +import { logger } from '@/Core/util/logger'; +import { webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; +import { getSentenceArgByKey } from '@/Core/util/getSentenceArg'; +import { IStageState } from '@/store/stageInterface'; +import { + audioContextWrapper, + getAudioLevel, + performBlinkAnimation, + performMouthAnimation, + updateThresholds, +} from '@/Core/gameScripts/vocal/vocalAnimation'; +import { match } from '../../util/match'; +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 播放一段语音 + * @param sentence 语句 + */ +export const playVocal = (sentence: ISentence) => { + logger.debug('play vocal'); + const performInitName = 'vocal-play'; + const url = getSentenceArgByKey(sentence, 'vocal'); // 获取语音的url + const volume = getSentenceArgByKey(sentence, 'volume'); // 获取语音的音量比 + let currentStageState: IStageState; + currentStageState = webgalStore.getState().stage; + let pos = ''; + let key = ''; + const freeFigure = currentStageState.freeFigure; + const figureAssociatedAnimation = currentStageState.figureAssociatedAnimation; + let bufferLength = 0; + let currentMouthValue = 0; + const lerpSpeed = 1; + + // 先停止之前的语音 + let VocalControl: any = document.getElementById('currentVocal'); + WebGAL.gameplay.performController.unmountPerform('vocal-play', true); + if (VocalControl !== null) { + VocalControl.currentTime = 0; + VocalControl.pause(); + } + + for (const e of sentence.args) { + if (e.value === true) { + match(e.key) + .with('left', () => { + pos = 'left'; + }) + .with('right', () => { + pos = 'right'; + }) + .endsWith('center', () => { + pos = 'center'; + }); + } + if (e.key === 'figureId') { + key = `${e.value.toString()}`; + } + } + + // 获得舞台状态 + webgalStore.dispatch(setStage({ key: 'playVocal', value: url })); + webgalStore.dispatch(setStage({ key: 'vocal', value: url })); + + let isOver = false; + + /** + * 嘴型同步 + */ + + return { + arrangePerformPromise: new Promise((resolve) => { + // 播放语音 + setTimeout(() => { + let VocalControl: any = document.getElementById('currentVocal'); + // 设置语音音量 + typeof volume === 'number' && volume >= 0 && volume <= 100 + ? webgalStore.dispatch(setStage({ key: 'vocalVolume', value: volume })) + : webgalStore.dispatch(setStage({ key: 'vocalVolume', value: 100 })); + // 设置语音 + if (VocalControl !== null) { + VocalControl.currentTime = 0; + // 播放并作为一个特别演出加入 + const perform = { + performName: performInitName, + duration: 1000 * 60 * 60, + isOver: false, + isHoldOn: false, + stopFunction: () => { + clearInterval(audioContextWrapper.audioLevelInterval); + VocalControl.pause(); + key = key ? key : `fig-${pos}`; + const animationItem = figureAssociatedAnimation.find((tid) => tid.targetId === key); + performMouthAnimation({ + audioLevel: 0, + OPEN_THRESHOLD: 1, + HALF_OPEN_THRESHOLD: 1, + currentMouthValue, + lerpSpeed, + key, + animationItem, + pos, + }); + clearTimeout(audioContextWrapper.blinkTimerID); + }, + blockingNext: () => false, + blockingAuto: () => { + return !isOver; + }, + skipNextCollect: true, + stopTimeout: undefined, // 暂时不用,后面会交给自动清除 + }; + WebGAL.gameplay.performController.arrangeNewPerform(perform, sentence, false); + key = key ? key : `fig-${pos}`; + const animationItem = figureAssociatedAnimation.find((tid) => tid.targetId === key); + if (animationItem) { + let maxAudioLevel = 0; + + const foundFigure = freeFigure.find((figure) => figure.key === key); + + if (foundFigure) { + pos = foundFigure.basePosition; + } + + if (!audioContextWrapper.audioContext) { + let audioContext: AudioContext | null; + audioContext = new AudioContext(); + audioContextWrapper.analyser = audioContext.createAnalyser(); + audioContextWrapper.analyser.fftSize = 256; + audioContextWrapper.dataArray = new Uint8Array(audioContextWrapper.analyser.frequencyBinCount); + } + + if (!audioContextWrapper.analyser) { + audioContextWrapper.analyser = audioContextWrapper.audioContext.createAnalyser(); + audioContextWrapper.analyser.fftSize = 256; + } + + bufferLength = audioContextWrapper.analyser.frequencyBinCount; + audioContextWrapper.dataArray = new Uint8Array(bufferLength); + let vocalControl = document.getElementById('currentVocal') as HTMLMediaElement; + + if (!audioContextWrapper.source) { + audioContextWrapper.source = audioContextWrapper.audioContext.createMediaElementSource(vocalControl); + audioContextWrapper.source.connect(audioContextWrapper.analyser); + } + + audioContextWrapper.analyser.connect(audioContextWrapper.audioContext.destination); + + // Lip-snc Animation + audioContextWrapper.audioLevelInterval = setInterval(() => { + const audioLevel = getAudioLevel( + audioContextWrapper.analyser!, + audioContextWrapper.dataArray!, + bufferLength, + ); + const { OPEN_THRESHOLD, HALF_OPEN_THRESHOLD } = updateThresholds(audioLevel); + + performMouthAnimation({ + audioLevel, + OPEN_THRESHOLD, + HALF_OPEN_THRESHOLD, + currentMouthValue, + lerpSpeed, + key, + animationItem, + pos, + }); + }, 50); + + // blinkAnimation + let animationEndTime: number; + + // 10sec + animationEndTime = Date.now() + 10000; + performBlinkAnimation({ key, animationItem, pos, animationEndTime }); + + // 10sec + setTimeout(() => { + clearTimeout(audioContextWrapper.blinkTimerID); + }, 10000); + } + + VocalControl?.play(); + + VocalControl.onended = () => { + for (const e of WebGAL.gameplay.performController.performList) { + if (e.performName === performInitName) { + isOver = true; + e.stopFunction(); + WebGAL.gameplay.performController.unmountPerform(e.performName); + } + } + }; + } + }, 1); + }), + }; +}; diff --git a/packages/webgal/src/Core/gameScripts/vocal/vocalAnimation.ts b/packages/webgal/src/Core/gameScripts/vocal/vocalAnimation.ts new file mode 100644 index 000000000..e46637006 --- /dev/null +++ b/packages/webgal/src/Core/gameScripts/vocal/vocalAnimation.ts @@ -0,0 +1,100 @@ +import { WebGAL } from '@/Core/WebGAL'; + +interface IAudioContextWrapper { + audioContext: AudioContext; + source: MediaElementAudioSourceNode | null; + analyser: AnalyserNode | undefined; + dataArray: Uint8Array | undefined; + audioLevelInterval: ReturnType<typeof setInterval>; + blinkTimerID: ReturnType<typeof setTimeout>; + maxAudioLevel: number; +} + +// Initialize the object based on the interface +export const audioContextWrapper: IAudioContextWrapper = { + audioContext: new AudioContext(), + source: null, + analyser: undefined, + dataArray: undefined, + audioLevelInterval: setInterval(() => {}, 0), // dummy interval + blinkTimerID: setTimeout(() => {}, 0), // dummy timeout + maxAudioLevel: 0, +}; + +export const updateThresholds = (audioLevel: number) => { + audioContextWrapper.maxAudioLevel = Math.max(audioLevel, audioContextWrapper.maxAudioLevel); + return { + OPEN_THRESHOLD: audioContextWrapper.maxAudioLevel * 0.75, + HALF_OPEN_THRESHOLD: audioContextWrapper.maxAudioLevel * 0.5, + }; +}; + +export const performBlinkAnimation = (params: { + key: string; + animationItem: any; + pos: string; + animationEndTime: number; +}) => { + let isBlinking = false; + + function blink() { + if (isBlinking || (params.animationEndTime && Date.now() > params.animationEndTime)) return; + isBlinking = true; + WebGAL.gameplay.pixiStage?.performBlinkAnimation(params.key, params.animationItem, 'closed', params.pos); + audioContextWrapper.blinkTimerID = setTimeout(() => { + WebGAL.gameplay.pixiStage?.performBlinkAnimation(params.key, params.animationItem, 'open', params.pos); + isBlinking = false; + const nextBlinkTime = Math.random() * 300 + 3500; + audioContextWrapper.blinkTimerID = setTimeout(blink, nextBlinkTime); + }, 200); + } + blink(); +}; + +// Updated getAudioLevel function +export const getAudioLevel = (analyser: AnalyserNode, dataArray: Uint8Array, bufferLength: number): number => { + analyser.getByteFrequencyData(dataArray); + let sum = 0; + for (let i = 0; i < bufferLength; i++) { + sum += dataArray[i]; + } + return sum / bufferLength; +}; + +export const performMouthAnimation = (params: { + audioLevel: number; + OPEN_THRESHOLD: number; + HALF_OPEN_THRESHOLD: number; + currentMouthValue: number; + lerpSpeed: number; + key: string; + animationItem: any; + pos: string; +}) => { + const { audioLevel, OPEN_THRESHOLD, HALF_OPEN_THRESHOLD, currentMouthValue, lerpSpeed, key, animationItem, pos } = + params; + + let targetValue; + if (audioLevel > OPEN_THRESHOLD) { + targetValue = 1; // open + } else if (audioLevel > HALF_OPEN_THRESHOLD) { + targetValue = 0.5; // half_open + } else { + targetValue = 0; // closed + } + // Lerp + const mouthValue = currentMouthValue + (targetValue - currentMouthValue) * lerpSpeed; + WebGAL.gameplay.pixiStage?.setModelMouthY(key, audioLevel); + + let mouthState; + if (mouthValue > 0.75) { + mouthState = 'open'; + } else if (mouthValue > 0.25) { + mouthState = 'half_open'; + } else { + mouthState = 'closed'; + } + if (animationItem !== undefined) { + WebGAL.gameplay.pixiStage?.performMouthSyncAnimation(key, animationItem, mouthState, pos); + } +}; diff --git a/packages/webgal/src/Core/initializeScript.ts b/packages/webgal/src/Core/initializeScript.ts new file mode 100644 index 000000000..51f8c3c02 --- /dev/null +++ b/packages/webgal/src/Core/initializeScript.ts @@ -0,0 +1,108 @@ +/** + * @file 引擎初始化时会执行的脚本,包括获取游戏信息,初始化运行时变量,初始化用户数据存储 + */ +import { logger } from './util/logger'; +import { infoFetcher } from './util/coreInitialFunction/infoFetcher'; +import { assetSetter, fileType } from './util/gameAssetsAccess/assetSetter'; +import { sceneFetcher } from './controller/scene/sceneFetcher'; +import { sceneParser } from './parser/sceneParser'; +import { bindExtraFunc } from '@/Core/util/coreInitialFunction/bindExtraFunc'; +import { webSocketFunc } from '@/Core/util/syncWithEditor/webSocketFunc'; +import uniqWith from 'lodash/uniqWith'; +import { scenePrefetcher } from './util/prefetcher/scenePrefetcher'; +import PixiStage from '@/Core/controller/stage/pixi/PixiController'; +import axios from 'axios'; +import { __INFO } from '@/config/info'; +import { WebGAL } from '@/Core/WebGAL'; + +const u = navigator.userAgent; +export const isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // 判断是否是 iOS终端 + +/** + * 引擎初始化函数 + */ +export const initializeScript = (): void => { + // 打印初始log信息 + logger.info(__INFO.version); + logger.info('Github: https://github.com/OpenWebGAL/WebGAL '); + logger.info('Made with ❤ by OpenWebGAL'); + // 激活强制缩放 + // 在调整窗口大小时重新计算宽高,设计稿按照 1600*900。 + if (isIOS) { + /** + * iOS + */ + alert( + `iOS 用户请横屏使用以获得最佳体验 +| Please use landscape mode on iOS for the best experience +| iOS ユーザーは横画面での使用をお勧めします`, + ); + } + + // 获得 userAnimation + loadStyle('./game/userStyleSheet.css'); + // 获得 user Animation + getUserAnimation(); + // 获取游戏信息 + infoFetcher('./game/config.txt'); + // 获取start场景 + const sceneUrl: string = assetSetter('start.txt', fileType.scene); + // 场景写入到运行时 + sceneFetcher(sceneUrl).then((rawScene) => { + WebGAL.sceneManager.sceneData.currentScene = sceneParser(rawScene, 'start.txt', sceneUrl); + // 开始场景的预加载 + const subSceneList = WebGAL.sceneManager.sceneData.currentScene.subSceneList; + WebGAL.sceneManager.settledScenes.push(sceneUrl); // 放入已加载场景列表,避免递归加载相同场景 + const subSceneListUniq = uniqWith(subSceneList); // 去重 + scenePrefetcher(subSceneListUniq); + }); + /** + * 启动Pixi + */ + WebGAL.gameplay.pixiStage = new PixiStage(); + + /** + * iOS 设备 卸载所有 Service Worker + */ + // if ('serviceWorker' in navigator && isIOS) { + // navigator.serviceWorker.getRegistrations().then((registrations) => { + // for (const registration of registrations) { + // registration.unregister().then(() => { + // logger.info('已卸载 Service Worker'); + // }); + // } + // }); + // } + + /** + * 绑定工具函数 + */ + bindExtraFunc(); + webSocketFunc(); +}; + +function loadStyle(url: string) { + const link = document.createElement('link'); + link.type = 'text/css'; + link.rel = 'stylesheet'; + link.href = url; + const head = document.getElementsByTagName('head')[0]; + head.appendChild(link); +} + +function getUserAnimation() { + axios.get('./game/animation/animationTable.json').then((res) => { + const animations: Array<string> = res.data; + for (const animationName of animations) { + axios.get(`./game/animation/${animationName}.json`).then((res) => { + if (res.data) { + const userAnimation = { + name: animationName, + effects: res.data, + }; + WebGAL.animationManager.addAnimation(userAnimation); + } + }); + } + }); +} diff --git a/packages/webgal/src/Core/parser/sceneParser.ts b/packages/webgal/src/Core/parser/sceneParser.ts new file mode 100644 index 000000000..74a19f419 --- /dev/null +++ b/packages/webgal/src/Core/parser/sceneParser.ts @@ -0,0 +1,93 @@ +import { assetSetter } from '@/Core/util/gameAssetsAccess/assetSetter'; +import { assetsPrefetcher } from '@/Core/util/prefetcher/assetsPrefetcher'; +import SceneParser from 'webgal-parser'; +import { commandType, IScene } from '../controller/scene/sceneInterface'; +import { logger } from '../util/logger'; +import { bgm } from '@/Core/gameScripts/bgm'; +import { callSceneScript } from '@/Core/gameScripts/callSceneScript'; +import { changeBg } from '@/Core/gameScripts/changeBg'; +import { changeFigure } from '@/Core/gameScripts/changeFigure'; +import { changeSceneScript } from '@/Core/gameScripts/changeSceneScript'; +import { choose } from '@/Core/gameScripts/choose'; +import { comment } from '@/Core/gameScripts/comment'; +import { filmMode } from '@/Core/gameScripts/filmMode'; +import { getUserInput } from '@/Core/gameScripts/getUserInput'; +import { intro } from '@/Core/gameScripts/intro'; +import { label } from '@/Core/gameScripts/label'; +import { miniAvatar } from '@/Core/gameScripts/miniAvatar'; +import { pixi } from '@/Core/gameScripts/pixi'; +import { playEffect } from '@/Core/gameScripts/playEffect'; +import { playVideo } from '@/Core/gameScripts/playVideo'; +import { setAnimation } from '@/Core/gameScripts/setAnimation'; +import { setComplexAnimation } from '@/Core/gameScripts/setComplexAnimation'; +import { setFilter } from '@/Core/gameScripts/setFilter'; +import { setTempAnimation } from '@/Core/gameScripts/setTempAnimation'; +import { setTextbox } from '@/Core/gameScripts/setTextbox'; +import { setTransform } from '@/Core/gameScripts/setTransform'; +import { setTransition } from '@/Core/gameScripts/setTransition'; +import { unlockBgm } from '@/Core/gameScripts/unlockBgm'; +import { unlockCg } from '@/Core/gameScripts/unlockCg'; +import { end } from '../gameScripts/end'; +import { jumpLabel } from '../gameScripts/jumpLabel'; +import { pixiInit } from '../gameScripts/pixi/pixiInit'; +import { say } from '../gameScripts/say'; +import { setVar } from '../gameScripts/setVar'; +import { showVars } from '../gameScripts/showVars'; +import { defineScripts, IConfigInterface, ScriptConfig, ScriptFunction, scriptRegistry } from './utils'; +import { applyStyle } from '@/Core/gameScripts/applyStyle'; + +export const SCRIPT_TAG_MAP = defineScripts({ + intro: ScriptConfig(commandType.intro, intro), + changeBg: ScriptConfig(commandType.changeBg, changeBg), + changeFigure: ScriptConfig(commandType.changeFigure, changeFigure), + miniAvatar: ScriptConfig(commandType.miniAvatar, miniAvatar, { next: true }), + changeScene: ScriptConfig(commandType.changeScene, changeSceneScript), + choose: ScriptConfig(commandType.choose, choose), + end: ScriptConfig(commandType.end, end), + bgm: ScriptConfig(commandType.bgm, bgm, { next: true }), + playVideo: ScriptConfig(commandType.video, playVideo), + setComplexAnimation: ScriptConfig(commandType.setComplexAnimation, setComplexAnimation), + setFilter: ScriptConfig(commandType.setFilter, setFilter), + pixiInit: ScriptConfig(commandType.pixiInit, pixiInit, { next: true }), + pixiPerform: ScriptConfig(commandType.pixi, pixi, { next: true }), + label: ScriptConfig(commandType.label, label, { next: true }), + jumpLabel: ScriptConfig(commandType.jumpLabel, jumpLabel), + setVar: ScriptConfig(commandType.setVar, setVar, { next: true }), + showVars: ScriptConfig(commandType.showVars, showVars), + unlockCg: ScriptConfig(commandType.unlockCg, unlockCg, { next: true }), + unlockBgm: ScriptConfig(commandType.unlockBgm, unlockBgm, { next: true }), + say: ScriptConfig(commandType.say, say), + filmMode: ScriptConfig(commandType.filmMode, filmMode, { next: true }), + callScene: ScriptConfig(commandType.callScene, callSceneScript), + setTextbox: ScriptConfig(commandType.setTextbox, setTextbox), + setAnimation: ScriptConfig(commandType.setAnimation, setAnimation), + playEffect: ScriptConfig(commandType.playEffect, playEffect, { next: true }), + setTempAnimation: ScriptConfig(commandType.setTempAnimation, setTempAnimation), + __commment: ScriptConfig(commandType.comment, comment, { next: true }), + setTransform: ScriptConfig(commandType.setTransform, setTransform), + setTransition: ScriptConfig(commandType.setTransition, setTransition, { next: true }), + getUserInput: ScriptConfig(commandType.getUserInput, getUserInput), + applyStyle: ScriptConfig(commandType.applyStyle, applyStyle, { next: true }), + // if: ScriptConfig(commandType.if, undefined, { next: true }), +}); + +export const SCRIPT_CONFIG: IConfigInterface[] = Object.values(SCRIPT_TAG_MAP); + +export const ADD_NEXT_ARG_LIST = SCRIPT_CONFIG.filter((config) => config.next).map((config) => config.scriptType); + +/** + * 场景解析器 + * @param rawScene 原始场景 + * @param sceneName 场景名称 + * @param sceneUrl 场景url + * @return {IScene} 解析后的场景 + */ +export const WebgalParser = new SceneParser(assetsPrefetcher, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG); + +export const sceneParser = (rawScene: string, sceneName: string, sceneUrl: string): IScene => { + const parsedScene = WebgalParser.parse(rawScene, sceneName, sceneUrl); + logger.info(`解析场景:${sceneName},数据为:`, parsedScene); + return parsedScene; +}; + +export { scriptRegistry, type ScriptFunction }; diff --git a/packages/webgal/src/Core/parser/utils.ts b/packages/webgal/src/Core/parser/utils.ts new file mode 100644 index 000000000..2c3ee5b3e --- /dev/null +++ b/packages/webgal/src/Core/parser/utils.ts @@ -0,0 +1,41 @@ +import { commandType, ISentence } from '@/Core/controller/scene/sceneInterface'; +import { IPerform } from '@/Core/Modules/perform/performInterface'; + +/** + * 规范函数的类型 + * @type {(sentence: ISentence) => IPerform} + */ +export type ScriptFunction = (sentence: ISentence) => IPerform; + +export interface ScriptConfig { + scriptType: commandType; + scriptFunction: ScriptFunction; + next?: boolean; +} + +export interface IConfigInterface extends ScriptConfig { + scriptString: string; +} + +export function ScriptConfig( + scriptType: commandType, + scriptFunction: ScriptFunction, + config?: Omit<ScriptConfig, 'scriptType' | 'scriptFunction'>, +): ScriptConfig { + return { scriptType, scriptFunction, ...config }; +} + +export const scriptRegistry: Record<commandType, IConfigInterface> = {} as any; + +export function defineScripts<R extends Record<string, Omit<IConfigInterface, 'scriptString'>>>( + record: R, +): { + [K in keyof R]: IConfigInterface; +} { + // eslint-disable-next-line + const result = {} as Record<keyof R, IConfigInterface>; + for (const [scriptString, config] of Object.entries(record)) { + result[scriptString as keyof R] = scriptRegistry[config.scriptType] = { scriptString, ...config }; + } + return result; +} diff --git a/packages/webgal/src/Core/util/constants.scss b/packages/webgal/src/Core/util/constants.scss new file mode 100644 index 000000000..1020b9e78 --- /dev/null +++ b/packages/webgal/src/Core/util/constants.scss @@ -0,0 +1,2 @@ +$screenWidth: 2560px; +$screenHeight: 1440px; diff --git a/packages/webgal/src/Core/util/constants.ts b/packages/webgal/src/Core/util/constants.ts new file mode 100644 index 000000000..cbd32bc73 --- /dev/null +++ b/packages/webgal/src/Core/util/constants.ts @@ -0,0 +1,4 @@ +export const SCREEN_CONSTANTS = { + height: 1440, + width: 2560, +}; diff --git a/packages/webgal/src/Core/util/coreInitialFunction/bindExtraFunc.ts b/packages/webgal/src/Core/util/coreInitialFunction/bindExtraFunc.ts new file mode 100644 index 000000000..6aa3c40d8 --- /dev/null +++ b/packages/webgal/src/Core/util/coreInitialFunction/bindExtraFunc.ts @@ -0,0 +1,5 @@ +import { syncFast } from '@/Core/util/syncWithEditor/syncWithOrigine'; + +export const bindExtraFunc = () => { + (window as any).JMP = syncFast; +}; diff --git a/packages/webgal/src/Core/util/coreInitialFunction/infoFetcher.ts b/packages/webgal/src/Core/util/coreInitialFunction/infoFetcher.ts new file mode 100644 index 000000000..3d6dad14c --- /dev/null +++ b/packages/webgal/src/Core/util/coreInitialFunction/infoFetcher.ts @@ -0,0 +1,66 @@ +import axios from 'axios'; +import { logger } from '../logger'; +import { getStorage, getStorageAsync, setStorage } from '../../controller/storage/storageController'; +import { webgalStore } from '@/store/store'; +import { initKey } from '@/Core/controller/storage/fastSaveLoad'; +import { WebgalParser } from '@/Core/parser/sceneParser'; +import { WebGAL } from '@/Core/WebGAL'; +import { getFastSaveFromStorage, getSavesFromStorage } from '@/Core/controller/storage/savesController'; +import { setGlobalVar } from '@/store/userDataReducer'; + +declare global { + interface Window { + renderPromise?: Function; + } +} +/** + * 获取游戏信息 + * @param url 游戏信息路径 + */ +export const infoFetcher = (url: string) => { + const dispatch = webgalStore.dispatch; + axios.get(url).then(async (r) => { + let gameConfigRaw: string = r.data; + let gameConfig = WebgalParser.parseConfig(gameConfigRaw); + logger.info('获取到游戏信息', gameConfig); + // 先把 key 找到并设置了 + const keyItem = gameConfig.find((e) => e.command === 'Game_key'); + WebGAL.gameKey = (keyItem?.args?.[0] as string) ?? ''; + initKey(); + await getStorageAsync(); + getFastSaveFromStorage(); + getSavesFromStorage(0, 0); + // 按照游戏的配置开始设置对应的状态 + gameConfig.forEach((e) => { + const { command, args } = e; + if (args.length > 0) { + if (args.length > 1) { + dispatch( + setGlobalVar({ + key: command, + value: args.join('|'), + }), + ); + } else { + let res: any = args[0].trim(); + if (/^(true|false)$/g.test(args[0])) { + res = res === 'true'; + } else if (/^[0-9]+\.?[0-9]+$/g.test(args[0])) { + res = Number(res); + } + + dispatch( + setGlobalVar({ + key: command, + value: res, + }), + ); + } + } + }); + + window?.renderPromise?.(); + delete window.renderPromise; + setStorage(); + }); +}; diff --git a/packages/webgal/src/Core/util/gameAssetsAccess/assetSetter.ts b/packages/webgal/src/Core/util/gameAssetsAccess/assetSetter.ts new file mode 100644 index 000000000..985a6be39 --- /dev/null +++ b/packages/webgal/src/Core/util/gameAssetsAccess/assetSetter.ts @@ -0,0 +1,56 @@ +/** + * @file 资源的引入可能是绝对链接,也可能是文件名,必须做必要的处理。 + */ + +/** + * 内置资源类型的枚举 + */ +export enum fileType { + background, + bgm, + figure, + scene, + tex, + vocal, + video, +} + +/** + * 获取资源路径 + * @param fileName 资源的名称或地址 + * @param assetType 资源类型 + * @return {string} 处理后的资源路径(绝对或相对) + */ +export const assetSetter = (fileName: string, assetType: fileType): string => { + // 是绝对链接,直接返回 + if (fileName.match('http://') || fileName.match('https://')) { + return fileName; + } else { + // 根据类型拼接资源的相对路径 + let returnFilePath: string; + switch (assetType) { + case fileType.background: + returnFilePath = `./game/background/${fileName}`; + break; + case fileType.scene: + returnFilePath = `./game/scene/${fileName}`; + break; + case fileType.vocal: + returnFilePath = `./game/vocal/${fileName}`; + break; + case fileType.figure: + returnFilePath = `./game/figure/${fileName}`; + break; + case fileType.bgm: + returnFilePath = `./game/bgm/${fileName}`; + break; + case fileType.video: + returnFilePath = `./game/video/${fileName}`; + break; + default: + returnFilePath = ``; + break; + } + return returnFilePath; + } +}; diff --git a/packages/webgal/src/Core/util/getSentenceArg.ts b/packages/webgal/src/Core/util/getSentenceArg.ts new file mode 100644 index 000000000..20e3ac709 --- /dev/null +++ b/packages/webgal/src/Core/util/getSentenceArg.ts @@ -0,0 +1,9 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; + +export function getSentenceArgByKey(sentnece: ISentence, argk: string): null | string | boolean | number { + const args = sentnece.args; + const result = args.find((arg) => arg.key === argk); + if (result) { + return result.value; + } else return null; +} diff --git a/packages/webgal/src/Core/util/logger.ts b/packages/webgal/src/Core/util/logger.ts new file mode 100644 index 000000000..fb6695a84 --- /dev/null +++ b/packages/webgal/src/Core/util/logger.ts @@ -0,0 +1,9 @@ +import Cloudlog from 'cloudlogjs'; + +/** + * 日志打印工具 + */ +export const logger = new Cloudlog(); +if (process.env.NODE_ENV === 'production') { + logger.setLevel('INFO'); +} diff --git a/packages/webgal/src/Core/util/match.ts b/packages/webgal/src/Core/util/match.ts new file mode 100644 index 000000000..b83f66f83 --- /dev/null +++ b/packages/webgal/src/Core/util/match.ts @@ -0,0 +1,38 @@ +class Matcher<T, R = any> { + private subject: T; + private result: R | undefined; + private isEnd = false; + + public constructor(subject: T) { + this.subject = subject; + } + + public with(pattern: T, fn: () => R): this { + if (!this.isEnd && this.subject === pattern) { + this.result = fn(); + this.isEnd = true; + } + return this; + } + + public endsWith(pattern: T, fn: () => R) { + if (!this.isEnd && this.subject === pattern) { + this.result = fn(); + this.isEnd = true; + } + return this.evaluate(); + } + + public default(fn: () => R) { + if (!this.isEnd) this.result = fn(); + return this.evaluate(); + } + + private evaluate(): R | undefined { + return this.result; + } +} + +export function match<T, R = any>(subject: T): Matcher<T, R> { + return new Matcher(subject); +} diff --git a/packages/webgal/src/Core/util/pixiPerformManager/initRegister.ts b/packages/webgal/src/Core/util/pixiPerformManager/initRegister.ts new file mode 100644 index 000000000..2003b782f --- /dev/null +++ b/packages/webgal/src/Core/util/pixiPerformManager/initRegister.ts @@ -0,0 +1,3 @@ +import '../../gameScripts/pixi/performs/cherryBlossoms'; +import '../../gameScripts/pixi/performs/rain'; +import '../../gameScripts/pixi/performs/snow'; diff --git a/packages/webgal/src/Core/util/pixiPerformManager/pixiPerformManager.ts b/packages/webgal/src/Core/util/pixiPerformManager/pixiPerformManager.ts new file mode 100644 index 000000000..23b69a71f --- /dev/null +++ b/packages/webgal/src/Core/util/pixiPerformManager/pixiPerformManager.ts @@ -0,0 +1,83 @@ +import type { Container } from 'pixi.js'; +import { logger } from '../logger'; + +/** + * 特效执行返回的结果 + */ +export type IResult<R extends Omit<Record<string | symbol | number, unknown>, 'container' | 'tickerKey'> = {}> = { + container: Container; + tickerKey: string; +} & R; + +type IName = string | (() => string); +type IPerformCallback = () => IResult; + +const performs = new Map<string, IPerformCallback>(); + +/** + * 获取名称, 可能报空 + * @param name 名称或者返回名称的函数 + * @returns {string} + */ +function getName(name: IName): string | null { + if (!name) return null; + if (typeof name === 'string') return name; + return name(); +} + +/** + * 获取名称, 不会报空 + * @param name 名称或者返回名称的函数 + * @returns {string} + */ +function getKey(name: IName): string { + const key = getName(name); + if (!key) { + logger.error('Get name of perform failed. There no name of the perform.'); + return ''; + } + return key; +} + +/** + * 注册特效, 注意, 同名会注销旧特效 + * @param name 特效名 + * @param callback 调用特效的函数 + */ +export function registerPerform(name: IName, callback: IPerformCallback): void { + if (!callback || typeof callback !== 'function') throw new Error(`"${name}" is not a callback.`); + performs.set(getKey(name), callback); +} + +/** + * 调用特效 + * @param name 特效名 + * @param args 自定义的参数 + * @returns {IResult} + */ +export function call(name: IName, args: unknown[] = []): IResult { + const callback = performs.get(getKey(name)); + + if (!callback || !(callback instanceof Function)) { + logger.error(`Can\'t call the perform named "${name}"`); + throw new Error(`"${name}" don't have the pixiPerform callback.`); + } + return (callback as IPerformCallback)(...(args as [])); +} + +/** + * 注销特效 + * @param name 特效名 + */ +export function unregisterPerform(name: IName) { + performs.delete(getKey(name)); +} + +/** + * 获取全部可调用的特效特效名 + */ +export function getPerforms(): string[] { + return [...performs.keys()]; +} + +import('./initRegister'); diff --git a/packages/webgal/src/Core/util/prefetcher/assetsPrefetcher.ts b/packages/webgal/src/Core/util/prefetcher/assetsPrefetcher.ts new file mode 100644 index 000000000..f3176f0cd --- /dev/null +++ b/packages/webgal/src/Core/util/prefetcher/assetsPrefetcher.ts @@ -0,0 +1,37 @@ +import { IAsset } from '@/Core/controller/scene/sceneInterface'; +import { logger } from '../logger'; + +import { WebGAL } from '@/Core/WebGAL'; + +/** + * 预加载函数 + * @param assetList 场景资源列表 + */ +export const assetsPrefetcher = (assetList: Array<IAsset>) => { + // @ts-ignore + // 未必要移除,加载到内存里也有用 + // if (window?.isElectron) { + // return; + // } + + for (const asset of assetList) { + // 判断是否已经存在 + const hasPrefetch = WebGAL.sceneManager.settledAssets.includes(asset.url); + if (hasPrefetch) { + logger.debug(`该资源${asset.url}已在预加载列表中,无需重复加载`); + } else { + const newLink = document.createElement('link'); + newLink.setAttribute('rel', 'prefetch'); + newLink.setAttribute('href', asset.url); + const head = document.getElementsByTagName('head'); + if (head.length) { + try { + head[0].appendChild(newLink); + } catch (e) { + console.log('预加载出错', e); + } + } + WebGAL.sceneManager.settledAssets.push(asset.url); + } + } +}; diff --git a/packages/webgal/src/Core/util/prefetcher/scenePrefetcher.ts b/packages/webgal/src/Core/util/prefetcher/scenePrefetcher.ts new file mode 100644 index 000000000..a09822b7d --- /dev/null +++ b/packages/webgal/src/Core/util/prefetcher/scenePrefetcher.ts @@ -0,0 +1,22 @@ +/** + * 场景预加载 + * @param sceneList 需要预加载的场景文件列表 + */ +import { sceneFetcher } from '../../controller/scene/sceneFetcher'; +import { sceneParser } from '../../parser/sceneParser'; +import { logger } from '@/Core/util/logger'; + +import { WebGAL } from '@/Core/WebGAL'; + +export const scenePrefetcher = (sceneList: Array<string>): void => { + for (const e of sceneList) { + if (!WebGAL.sceneManager.settledScenes.includes(e)) { + logger.info(`现在预加载场景${e}`); + sceneFetcher(e).then((r) => { + sceneParser(r, e, e); + }); + } else { + logger.warn(`场景${e}已经加载过,无需再次加载`); + } + } +}; diff --git a/packages/webgal/src/Core/util/syncWithEditor/syncWithOrigine.ts b/packages/webgal/src/Core/util/syncWithEditor/syncWithOrigine.ts new file mode 100644 index 000000000..9e430c7b3 --- /dev/null +++ b/packages/webgal/src/Core/util/syncWithEditor/syncWithOrigine.ts @@ -0,0 +1,88 @@ +import { resetStage } from '@/Core/controller/stage/resetStage'; +import { assetSetter, fileType } from '@/Core/util/gameAssetsAccess/assetSetter'; +import { sceneFetcher } from '@/Core/controller/scene/sceneFetcher'; +import { sceneParser } from '@/Core/parser/sceneParser'; +import { logger } from '../logger'; +import { webgalStore } from '@/store/store'; +import { setVisibility } from '@/store/GUIReducer'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; + +import { WebGAL } from '@/Core/WebGAL'; +import cloneDeep from 'lodash/cloneDeep'; +import { IScene } from '@/Core/controller/scene/sceneInterface'; +import { jumpFromBacklog } from '@/Core/controller/storage/jumpFromBacklog'; + +let syncFastTimeout: ReturnType<typeof setTimeout> | undefined; + +export const syncWithOrigine = (sceneName: string, sentenceId: number, expermental = false) => { + logger.warn('正在跳转到' + sceneName + ':' + sentenceId); + const dispatch = webgalStore.dispatch; + dispatch(setVisibility({ component: 'showTitle', visibility: false })); + dispatch(setVisibility({ component: 'showMenuPanel', visibility: false })); + dispatch(setVisibility({ component: 'isShowLogo', visibility: false })); + const title = document.getElementById('Title_enter_page'); + if (title) { + title.style.display = 'none'; + } + const pastScene = cloneDeep(WebGAL.sceneManager.sceneData.currentScene); + // 重新获取场景 + const sceneUrl: string = assetSetter(sceneName, fileType.scene); + // 场景写入到运行时 + sceneFetcher(sceneUrl).then((rawScene) => { + // 等等,先检查一下能不能恢复场景 + const lastSameSentence = findLastSameSentence(pastScene, WebGAL.sceneManager.sceneData.currentScene, sentenceId); + const lastRecoverySentenceId = Math.min(sentenceId, lastSameSentence); + const recId = findLastAvailableBacklog(lastRecoverySentenceId, sceneName); + const isCanRec = recId >= 0 && expermental; + resetStage(!isCanRec); + WebGAL.sceneManager.sceneData.currentScene = sceneParser(rawScene, sceneName, sceneUrl); + // 开始快进到指定语句 + const currentSceneName = WebGAL.sceneManager.sceneData.currentScene.sceneName; + WebGAL.gameplay.isFast = true; + if (isCanRec) { + jumpFromBacklog(recId, false); + } + if (syncFastTimeout) { + // 之前发生的跳转要清理掉 + clearTimeout(syncFastTimeout); + } + syncFast(sentenceId, currentSceneName); + }); +}; + +export function syncFast(sentenceId: number, currentSceneName: string) { + if ( + WebGAL.sceneManager.sceneData.currentSentenceId < sentenceId && + WebGAL.sceneManager.sceneData.currentScene.sceneName === currentSceneName + ) { + nextSentence(); + syncFastTimeout = setTimeout(() => syncFast(sentenceId, currentSceneName), 2); + } else { + WebGAL.gameplay.isFast = false; + } +} + +function findLastSameSentence(oldScene: IScene, newScene: IScene, sentenceId: number): number { + let lastSameSentence = 0; + for (let i = 0; i < sentenceId && i < oldScene.sentenceList.length; i++) { + const oldSentenceStr = JSON.stringify(oldScene.sentenceList[i]); + const newSentenceStr = JSON.stringify(newScene.sentenceList[i]); + if (oldSentenceStr !== newSentenceStr) { + break; + } + lastSameSentence = i; + } + return lastSameSentence; +} + +function findLastAvailableBacklog(targetSentence: number, sceneName: string) { + let lastAvailable = -1; + WebGAL.backlogManager.getBacklog().forEach((e, i) => { + const recSentenceId = e.saveScene.currentSentenceId; + const recSceneName = e.saveScene.sceneName; + if (recSentenceId <= targetSentence && recSceneName === sceneName) { + lastAvailable = i; + } + }); + return lastAvailable; +} diff --git a/packages/webgal/src/Core/util/syncWithEditor/webSocketFunc.ts b/packages/webgal/src/Core/util/syncWithEditor/webSocketFunc.ts new file mode 100644 index 000000000..73f5342d2 --- /dev/null +++ b/packages/webgal/src/Core/util/syncWithEditor/webSocketFunc.ts @@ -0,0 +1,77 @@ +import { logger } from '../logger'; +import { syncWithOrigine } from '@/Core/util/syncWithEditor/syncWithOrigine'; +import { DebugCommand, IDebugMessage } from '@/types/debugProtocol'; +import { WebGAL } from '@/Core/WebGAL'; +import { webgalStore } from '@/store/store'; +import { WebgalParser } from '@/Core/parser/sceneParser'; +import { runScript } from '@/Core/controller/gamePlay/runScript'; + +export const webSocketFunc = () => { + const loc: string = window.location.hostname; + const protocol: string = window.location.protocol; + const port: string = window.location.port; // 获取端口号 + + // 默认情况下,不需要在URL中明确指定标准HTTP(80)和HTTPS(443)端口 + let defaultPort = ''; + if (port && port !== '80' && port !== '443') { + // 如果存在非标准端口号,将其包含在URL中 + defaultPort = `:${port}`; + } + + if (protocol !== 'http:' && protocol !== 'https:') { + return; + } + // 根据当前协议构建WebSocket URL,并包括端口号(如果有) + let wsUrl = `ws://${loc}${defaultPort}/api/webgalsync`; + if (protocol === 'https:') { + wsUrl = `wss://${loc}${defaultPort}/api/webgalsync`; + } + logger.info('正在启动socket连接位于:' + wsUrl); + const socket = new WebSocket(wsUrl); + socket.onopen = () => { + logger.info('socket已连接'); + function sendStageSyncMessage() { + const message: IDebugMessage = { + event: 'message', + data: { + command: DebugCommand.SYNCFC, + sceneMsg: { + scene: WebGAL.sceneManager.sceneData.currentScene.sceneName, + sentence: WebGAL.sceneManager.sceneData.currentSentenceId, + }, + stageSyncMsg: webgalStore.getState().stage, + message: 'sync', + }, + }; + socket.send(JSON.stringify(message)); + // logger.debug('传送信息', message); + setTimeout(sendStageSyncMessage, 1000); + } + sendStageSyncMessage(); + }; + socket.onmessage = (e) => { + // logger.info('收到信息', e.data); + const str: string = e.data; + const data: IDebugMessage = JSON.parse(str); + const message = data.data; + if (message.command === DebugCommand.JUMP) { + syncWithOrigine(message.sceneMsg.scene, message.sceneMsg.sentence, message.message === 'exp'); + } + if (message.command === DebugCommand.EXE_COMMAND) { + const command = message.message; + const scene = WebgalParser.parse(command, 'temp.txt', 'temp.txt'); + const sentence = scene.sentenceList[0]; + runScript(sentence); + } + if (message.command === DebugCommand.REFETCH_TEMPLATE_FILES) { + const title = document.getElementById('Title_enter_page'); + if (title) { + title.style.display = 'none'; + } + WebGAL.events.styleUpdate.emit(); + } + }; + socket.onerror = (e) => { + logger.info('当前没有连接到 Terre 编辑器'); + }; +}; diff --git a/packages/webgal/src/Core/webgalCore.ts b/packages/webgal/src/Core/webgalCore.ts new file mode 100644 index 000000000..f1becd487 --- /dev/null +++ b/packages/webgal/src/Core/webgalCore.ts @@ -0,0 +1,16 @@ +import { BacklogManager } from '@/Core/Modules/backlog'; +import mitt from 'mitt'; +import { SceneManager } from '@/Core/Modules/scene'; +import { AnimationManager } from '@/Core/Modules/animations'; +import { Gameplay } from './Modules/gamePlay'; +import { Events } from '@/Core/Modules/events'; + +export class WebgalCore { + public sceneManager = new SceneManager(); + public backlogManager = new BacklogManager(this.sceneManager); + public animationManager = new AnimationManager(); + public gameplay = new Gameplay(); + public gameName = ''; + public gameKey = ''; + public events = new Events(); +} diff --git a/packages/webgal/src/Stage/AudioContainer/AudioContainer.tsx b/packages/webgal/src/Stage/AudioContainer/AudioContainer.tsx new file mode 100644 index 000000000..81b20dafd --- /dev/null +++ b/packages/webgal/src/Stage/AudioContainer/AudioContainer.tsx @@ -0,0 +1,130 @@ +import { useSelector } from 'react-redux'; +import { RootState, webgalStore } from '@/store/store'; +import { setStage } from '@/store/stageReducer'; +import { useEffect, useState } from 'react'; +import { logger } from '@/Core/util/logger'; + +export const AudioContainer = () => { + const stageStore = useSelector((webgalStore: RootState) => webgalStore.stage); + const titleBgm = useSelector((webgalStore: RootState) => webgalStore.GUI.titleBgm); + const isShowTitle = useSelector((webgalStore: RootState) => webgalStore.GUI.showTitle); + const userDataState = useSelector((state: RootState) => state.userData); + const mainVol = userDataState.optionData.volumeMain; + const vocalVol = mainVol * 0.01 * userDataState.optionData.vocalVolume * 0.01 * stageStore.vocalVolume * 0.01; + const bgmVol = mainVol * 0.01 * userDataState.optionData.bgmVolume * 0.01 * stageStore.bgm.volume * 0.01; + const bgmEnter = stageStore.bgm.enter; + const uiSoundEffects = stageStore.uiSe; + const seVol = mainVol * 0.01 * (userDataState.optionData?.seVolume ?? 100) * 0.01; + const uiSeVol = mainVol * 0.01 * (userDataState.optionData.uiSeVolume ?? 50) * 0.01; + const isEnterGame = useSelector((state: RootState) => state.GUI.isEnterGame); + + // 淡入淡出定时器 + const [fadeTimer, setFadeTimer] = useState(setTimeout(() => {}, 0)); + + /** + * 淡入BGM + * @param bgm 背景音乐 + * @param maxVol 最大音量 + * @param time 淡入时间 + */ + const bgmFadeIn = (bgm: HTMLAudioElement, maxVol: number, time: number) => { + // 设置初始音量 + time >= 0 ? (bgm.volume = 0) : (bgm.volume = maxVol); + // 设置音量递增时间间隔 + const duration = 10; + // 计算每duration的音量增量 + const volumeStep = (maxVol / time) * duration; + // 基于递归调用实现淡入淡出效果 + const fade = () => { + const timer = setTimeout(() => { + if (bgm.volume + volumeStep >= maxVol) { + // 如果音量接近或达到最大值,则设置最终音量(淡入) + bgm.volume = maxVol; + } else if (bgm.volume + volumeStep <= 0) { + // 如果音量接近或达到最小值,则设置最终音量(淡出) + bgm.volume = 0; + // 淡出效果结束后,将 bgm 置空 + webgalStore.dispatch(setStage({ key: 'bgm', value: { src: '', enter: 0, volume: 100 } })); + } else { + // 否则增加音量,并递归调用 + bgm.volume += volumeStep; + fade(); + } + }, duration); + // 将定时器引用存储到 fadeTimer 中 + setFadeTimer(timer); + }; + // 调用淡入淡出函数 + fade(); + }; + + useEffect(() => { + // 清除之前的淡入淡出定时器 + clearTimeout(fadeTimer); + // 获取当前背景音乐元素 + const bgmElement = document.getElementById('currentBgm') as HTMLAudioElement; + // 如果当前背景音乐元素存在,则淡入淡出 + if (bgmElement) { + bgmEnter === 0 ? (bgmElement.volume = bgmVol) : bgmFadeIn(bgmElement, bgmVol, bgmEnter); + } + }, [isShowTitle, titleBgm, stageStore.bgm.src, bgmVol, bgmEnter]); + + useEffect(() => { + logger.debug(`设置背景音量:${bgmVol}`); + }, [bgmVol]); + + useEffect(() => { + logger.debug(`设置背景音量淡入时间: ${bgmEnter}`); + }, [bgmEnter]); + + useEffect(() => { + logger.debug(`设置语音音量:${vocalVol}`); + const vocalElement: any = document.getElementById('currentVocal'); + if (vocalElement) { + vocalElement.volume = vocalVol.toString(); + } + }, [vocalVol]); + + useEffect(() => { + if (uiSoundEffects === '') return; + const uiSeAudioElement = document.createElement('audio'); + uiSeAudioElement.src = uiSoundEffects; + uiSeAudioElement.loop = false; + // 设置音量 + if (!isNaN(uiSeVol)) { + uiSeAudioElement.volume = uiSeVol; + } else { + // 针对原来使用 WebGAL version <= 4.4.2 的用户数据中不存在UI音效音量的情况 + logger.error('UI SE Vol is NaN'); + uiSeAudioElement.volume = isNaN(seVol) ? mainVol / 100 : seVol / 100; + } + // 播放UI音效 + uiSeAudioElement.play(); + uiSeAudioElement.addEventListener('ended', () => { + // Processing after sound effects are played + uiSeAudioElement.remove(); + }); + webgalStore.dispatch(setStage({ key: 'uiSe', value: '' })); + }, [uiSoundEffects]); + + useEffect(() => { + logger.debug(`设置音效音量: ${seVol}`); + }, [seVol]); + + useEffect(() => { + logger.debug(`设置用户界面音效音量: ${uiSeVol}`); + }, [uiSeVol]); + + return ( + <div> + <audio + key={isShowTitle.toString() + titleBgm} + id="currentBgm" + src={isShowTitle ? titleBgm : stageStore.bgm.src} + loop={true} + autoPlay={isEnterGame} + /> + <audio id="currentVocal" src={stageStore.playVocal} /> + </div> + ); +}; diff --git a/packages/webgal/src/Stage/FigureContainer/FigureContainer.tsx b/packages/webgal/src/Stage/FigureContainer/FigureContainer.tsx new file mode 100644 index 000000000..d2f30d6ca --- /dev/null +++ b/packages/webgal/src/Stage/FigureContainer/FigureContainer.tsx @@ -0,0 +1,24 @@ +import styles from './figureContainer.module.scss'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; + +export const FigureContainer = () => { + const stageState = useSelector((state: RootState) => state.stage); + return ( + <div className={styles.FigureContainer_main}> + <div className={styles.figContainerLeft + ' ' + styles.figContainer} id="figLeftContainer"> + {stageState.figNameLeft !== '' && ( + <img className={styles.figurePic} src={stageState.figNameLeft} alt="fig_left" /> + )} + </div> + <div className={styles.figContainerCenter + ' ' + styles.figContainer} id="figCenterContainer"> + {stageState.figName !== '' && <img className={styles.figurePic} src={stageState.figName} alt="fig_center" />} + </div> + <div className={styles.figContainerRight + ' ' + styles.figContainer} id="figRightContainer"> + {stageState.figNameRight !== '' && ( + <img className={styles.figurePic} src={stageState.figNameRight} alt="fig_right" /> + )} + </div> + </div> + ); +}; diff --git a/packages/webgal/src/Stage/FigureContainer/figureContainer.module.scss b/packages/webgal/src/Stage/FigureContainer/figureContainer.module.scss new file mode 100644 index 000000000..32a6d0875 --- /dev/null +++ b/packages/webgal/src/Stage/FigureContainer/figureContainer.module.scss @@ -0,0 +1,53 @@ +.FigureContainer_main { + z-index: 4; + width: 100%; + height: 100%; + position: absolute; + top: 0; + display: flex; +} + +.figurePic { + max-height: 100%; + max-width: 100%; + width: auto; + height: auto; + object-fit: cover; + animation: centerIn 0.5s ease-in-out forwards; +} + +.figContainer { + width: 98%; + left: 1%; + right: 1%; + position: absolute; + display: flex; + top: 5px; + bottom: 0; + z-index: 4; + animation: fig_default_animation 0.3s; +} + +.figContainerLeft { + justify-content: left; +} + +.figContainerCenter { + justify-content: center; +} + +.figContainerRight { + justify-content: right; +} + +@keyframes fig_default_animation { + 0% { + opacity: 0; + } + 30% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/packages/webgal/src/Stage/FullScreenPerform/FullScreenPerform.tsx b/packages/webgal/src/Stage/FullScreenPerform/FullScreenPerform.tsx new file mode 100644 index 000000000..6c6de634d --- /dev/null +++ b/packages/webgal/src/Stage/FullScreenPerform/FullScreenPerform.tsx @@ -0,0 +1,19 @@ +import styles from './fullScreenPerform.module.scss'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; + +export const FullScreenPerform = () => { + const stageState = useSelector((state: RootState) => state.stage); + let stageWidth = '100%'; + let stageHeight = '100%'; + let top = '0'; + if (stageState.enableFilm !== '') { + stageHeight = '76%'; + top = '12%'; + } + return ( + <div className={styles.FullScreenPerform_main} style={{ width: stageWidth, height: stageHeight, top: top }}> + <div id="videoContainer" /> + </div> + ); +}; diff --git a/packages/webgal/src/Stage/FullScreenPerform/fullScreenPerform.module.scss b/packages/webgal/src/Stage/FullScreenPerform/fullScreenPerform.module.scss new file mode 100644 index 000000000..e3039f6cf --- /dev/null +++ b/packages/webgal/src/Stage/FullScreenPerform/fullScreenPerform.module.scss @@ -0,0 +1,125 @@ +.FullScreenPerform_main { + position: absolute; + width: 100%; + height: 100%; + top: 0; +} + +.FullScreenPerform_element { + position: absolute; + display: none; + width: 100%; + height: 100%; + z-index: 11; +} + +.fullScreen_video { + position: absolute; + display: block; + width: 100%; + height: 100%; + z-index: 11; +} + +@keyframes slideIn { + 0% { + transform: translateX(-100%); + opacity: 0; + } + 100% { + transform: translateX(0); + opacity: 1; + } +} + +@keyframes typing { + from { + width: 0; + height: 0; + } + to { + width: 100%; + height: auto; + border-right:1px solid; + } +} + +@keyframes blinkCursor { + 50% { border-color: transparent; } +} + +@keyframes pixelateAnimation { + 0% { + filter: none; + opacity: 0; + } + 50% { + filter: blur(5px); + } + 100% { + filter: none; + opacity: 1; + } +} + +@keyframes revealAnimation { + 0% { + opacity: 0; + clip-path: polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%); + } + 100% { + opacity: 1; + clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); + } +} + +.fadeIn { + opacity: 0; + animation: intro_showSoftly 1.5s ease-out forwards; + font-family: "思源宋体", serif; +} + +.slideIn { + opacity: 0; + animation: slideIn 1.5s forwards; + font-family: "思源宋体", serif; +} + +.typingEffect { + display: block; + overflow: hidden; + white-space: pre-line; + width: 0; + animation: typing 1.5s forwards, blinkCursor 1s infinite 1.5s; + font-family: "思源宋体", serif; +} + +.pixelateEffect { + opacity: 0; + animation: pixelateAnimation 3s forwards; + font-family: "思源宋体", serif; +} + +.revealAnimation { + opacity: 0; + animation: revealAnimation 3s forwards; + font-family: "思源宋体", serif; +} + +@keyframes intro_showSoftly { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +.videoContainer { + position: absolute; + display: block; + width: 100%; + height: 100%; + z-index: 11; + background: rgba(0, 0, 0, 1); +} diff --git a/packages/webgal/src/Stage/MainStage/MainStage.tsx b/packages/webgal/src/Stage/MainStage/MainStage.tsx new file mode 100644 index 000000000..ac2c6eb0f --- /dev/null +++ b/packages/webgal/src/Stage/MainStage/MainStage.tsx @@ -0,0 +1,13 @@ +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { useSetBg } from '@/Stage/MainStage/useSetBg'; +import { useSetFigure } from '@/Stage/MainStage/useSetFigure'; +import { setStageObjectEffects } from '@/Stage/MainStage/useSetEffects'; + +export function MainStage() { + const stageState = useSelector((state: RootState) => state.stage); + useSetBg(stageState); + useSetFigure(stageState); + setStageObjectEffects(stageState); + return <div style={{ display: 'none' }} />; +} diff --git a/packages/webgal/src/Stage/MainStage/useSetBg.ts b/packages/webgal/src/Stage/MainStage/useSetBg.ts new file mode 100644 index 000000000..a292c0dd4 --- /dev/null +++ b/packages/webgal/src/Stage/MainStage/useSetBg.ts @@ -0,0 +1,64 @@ +import { IStageState } from '@/store/stageInterface'; +import { useEffect } from 'react'; +import { logger } from '@/Core/util/logger'; +import { IStageObject } from '@/Core/controller/stage/pixi/PixiController'; +import { setEbg } from '@/Core/gameScripts/changeBg/setEbg'; + +import { getEnterExitAnimation } from '@/Core/Modules/animationFunctions'; +import { WebGAL } from '@/Core/WebGAL'; + +export function useSetBg(stageState: IStageState) { + const bgName = stageState.bgName; + + /** + * 设置背景 + */ + useEffect(() => { + const thisBgKey = 'bg-main'; + if (bgName !== '') { + const currentBg = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisBgKey); + if (currentBg) { + if (currentBg.sourceUrl !== bgName) { + removeBg(currentBg); + } + } + addBg(undefined, thisBgKey, bgName); + setEbg(bgName); + logger.debug('重设背景'); + const { duration, animation } = getEnterExitAnimation('bg-main', 'enter', true); + WebGAL.gameplay.pixiStage!.registerPresetAnimation(animation, 'bg-main-softin', thisBgKey, stageState.effects); + setTimeout(() => WebGAL.gameplay.pixiStage!.removeAnimationWithSetEffects('bg-main-softin'), duration); + } else { + const currentBg = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisBgKey); + if (currentBg) { + removeBg(currentBg); + } + } + }, [bgName]); +} + +function removeBg(bgObject: IStageObject) { + WebGAL.gameplay.pixiStage?.removeAnimationWithSetEffects('bg-main-softin'); + const oldBgKey = bgObject.key; + bgObject.key = 'bg-main-off' + String(new Date().getTime()); + const bgKey = bgObject.key; + const bgAniKey = bgObject.key + '-softoff'; + WebGAL.gameplay.pixiStage?.removeStageObjectByKey(oldBgKey); + const { duration, animation } = getEnterExitAnimation('bg-main-off', 'exit', true, bgKey); + WebGAL.gameplay.pixiStage!.registerAnimation(animation, bgAniKey, bgKey); + setTimeout(() => { + WebGAL.gameplay.pixiStage?.removeAnimation(bgAniKey); + WebGAL.gameplay.pixiStage?.removeStageObjectByKey(bgKey); + }, duration); +} + +function addBg(type?: 'image' | 'spine', ...args: any[]) { + const url = args[1]; + if (url.endsWith('.skel')) { + // @ts-ignore + return WebGAL.gameplay.pixiStage?.addSpineBg(...args); + } else { + // @ts-ignore + return WebGAL.gameplay.pixiStage?.addBg(...args); + } +} diff --git a/packages/webgal/src/Stage/MainStage/useSetEffects.ts b/packages/webgal/src/Stage/MainStage/useSetEffects.ts new file mode 100644 index 000000000..796b461cd --- /dev/null +++ b/packages/webgal/src/Stage/MainStage/useSetEffects.ts @@ -0,0 +1,43 @@ +import { baseTransform, IEffect, IStageState, ITransform } from '@/store/stageInterface'; + +import { WebGAL } from '@/Core/WebGAL'; + +export function setStageObjectEffects(stageState: IStageState) { + const effects = stageState.effects; + setTimeout(() => { + setStageEffects(effects); + }, 10); +} + +export function setStageEffects(effects: IEffect[]) { + const stageObjects = WebGAL.gameplay.pixiStage?.getAllStageObj() ?? []; + for (const stageObj of stageObjects) { + const key = stageObj.key; + const effect = effects.find((effect) => effect.target === key); + const lockedStageTargets = WebGAL.gameplay.pixiStage?.getAllLockedObject() ?? []; + if (!lockedStageTargets.includes(key)) { + if (effect) { + // logger.debug('应用effects', key); + const targetPixiContainer = WebGAL.gameplay.pixiStage?.getStageObjByKey(key); + if (targetPixiContainer) { + const container = targetPixiContainer.pixiContainer; + Object.assign(container, convertTransform(effect.transform)); + } + } else { + const targetPixiContainer = WebGAL.gameplay.pixiStage?.getStageObjByKey(key); + if (targetPixiContainer) { + const container = targetPixiContainer.pixiContainer; + Object.assign(container, convertTransform(baseTransform)); + } + } + } + } +} + +function convertTransform(transform: ITransform | undefined) { + if (!transform) { + return {}; + } + const { position, alpha, ...rest } = transform; + return { ...rest, x: position.x, y: position.y, alphaFilterVal: alpha }; +} diff --git a/packages/webgal/src/Stage/MainStage/useSetFigure.ts b/packages/webgal/src/Stage/MainStage/useSetFigure.ts new file mode 100644 index 000000000..425323a93 --- /dev/null +++ b/packages/webgal/src/Stage/MainStage/useSetFigure.ts @@ -0,0 +1,228 @@ +import { IEffect, IStageState } from '@/store/stageInterface'; +import { useEffect } from 'react'; +import { logger } from '@/Core/util/logger'; +import { generateUniversalSoftInAnimationObj } from '@/Core/controller/stage/pixi/animations/universalSoftIn'; +import { IStageObject } from '@/Core/controller/stage/pixi/PixiController'; +import { generateUniversalSoftOffAnimationObj } from '@/Core/controller/stage/pixi/animations/universalSoftOff'; + +import { getEnterExitAnimation } from '@/Core/Modules/animationFunctions'; +import { WebGAL } from '@/Core/WebGAL'; + +export function useSetFigure(stageState: IStageState) { + const { figNameLeft, figName, figNameRight, freeFigure, live2dMotion, live2dExpression } = stageState; + + /** + * 同步 motion + */ + useEffect(() => { + for (const motion of live2dMotion) { + WebGAL.gameplay.pixiStage?.changeModelMotionByKey(motion.target, motion.motion); + } + }, [live2dMotion]); + + /** + * 同步 expression + */ + useEffect(() => { + for (const expression of live2dExpression) { + WebGAL.gameplay.pixiStage?.changeModelExpressionByKey(expression.target, expression.expression); + } + }, [live2dExpression]); + + /** + * 设置立绘 + */ + useEffect(() => { + /** + * 特殊处理:中间立绘 + */ + const thisFigKey = 'fig-center'; + const softInAniKey = 'fig-center-softin'; + if (figName !== '') { + const currentFigCenter = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigCenter) { + if (currentFigCenter.sourceUrl !== figName) { + removeFig(currentFigCenter, softInAniKey, stageState.effects); + } + } + addFigure(undefined, thisFigKey, figName, 'center'); + logger.debug('中立绘已重设'); + const { duration, animation } = getEnterExitAnimation(thisFigKey, 'enter'); + WebGAL.gameplay.pixiStage!.registerPresetAnimation(animation, softInAniKey, thisFigKey, stageState.effects); + setTimeout(() => WebGAL.gameplay.pixiStage!.removeAnimationWithSetEffects(softInAniKey), duration); + } else { + logger.debug('移除中立绘'); + const currentFigCenter = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigCenter) { + if (currentFigCenter.sourceUrl !== figName) { + removeFig(currentFigCenter, softInAniKey, stageState.effects); + } + } + } + }, [figName]); + + useEffect(() => { + /** + * 特殊处理:左侧立绘 + */ + const thisFigKey = 'fig-left'; + const softInAniKey = 'fig-left-softin'; + if (figNameLeft !== '') { + const currentFigLeft = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigLeft) { + if (currentFigLeft.sourceUrl !== figNameLeft) { + removeFig(currentFigLeft, softInAniKey, stageState.effects); + } + } + addFigure(undefined, thisFigKey, figNameLeft, 'left'); + logger.debug('左立绘已重设'); + const { duration, animation } = getEnterExitAnimation(thisFigKey, 'enter'); + WebGAL.gameplay.pixiStage!.registerPresetAnimation(animation, softInAniKey, thisFigKey, stageState.effects); + setTimeout(() => WebGAL.gameplay.pixiStage!.removeAnimationWithSetEffects(softInAniKey), duration); + } else { + logger.debug('移除左立绘'); + const currentFigLeft = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigLeft) { + if (currentFigLeft.sourceUrl !== figNameLeft) { + removeFig(currentFigLeft, softInAniKey, stageState.effects); + } + } + } + }, [figNameLeft]); + + useEffect(() => { + /** + * 特殊处理:右侧立绘 + */ + const thisFigKey = 'fig-right'; + const softInAniKey = 'fig-right-softin'; + if (figNameRight !== '') { + const currentFigRight = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigRight) { + if (currentFigRight.sourceUrl !== figNameRight) { + removeFig(currentFigRight, softInAniKey, stageState.effects); + } + } + addFigure(undefined, thisFigKey, figNameRight, 'right'); + logger.debug('右立绘已重设'); + const { duration, animation } = getEnterExitAnimation(thisFigKey, 'enter'); + WebGAL.gameplay.pixiStage!.registerPresetAnimation(animation, softInAniKey, thisFigKey, stageState.effects); + setTimeout(() => WebGAL.gameplay.pixiStage!.removeAnimationWithSetEffects(softInAniKey), duration); + } else { + const currentFigRight = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigRight) { + if (currentFigRight.sourceUrl !== figNameRight) { + removeFig(currentFigRight, softInAniKey, stageState.effects); + } + } + } + }, [figNameRight]); + + useEffect(() => { + // 自由立绘 + for (const fig of freeFigure) { + /** + * 特殊处理:自由立绘 + */ + const thisFigKey = `${fig.key}`; + const softInAniKey = `${fig.key}-softin`; + /** + * 非空 + */ + if (fig.name !== '') { + const currentFigThisKey = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigThisKey) { + if (currentFigThisKey.sourceUrl !== fig.name) { + removeFig(currentFigThisKey, softInAniKey, stageState.effects); + addFigure(undefined, thisFigKey, fig.name, fig.basePosition); + logger.debug(`${fig.key}立绘已重设`); + const { duration, animation } = getEnterExitAnimation(thisFigKey, 'enter'); + WebGAL.gameplay.pixiStage!.registerPresetAnimation(animation, softInAniKey, thisFigKey, stageState.effects); + setTimeout(() => WebGAL.gameplay.pixiStage!.removeAnimationWithSetEffects(softInAniKey), duration); + } + } else { + addFigure(undefined, thisFigKey, fig.name, fig.basePosition); + logger.debug(`${fig.key}立绘已重设`); + const { duration, animation } = getEnterExitAnimation(thisFigKey, 'enter'); + WebGAL.gameplay.pixiStage!.registerPresetAnimation(animation, softInAniKey, thisFigKey, stageState.effects); + setTimeout(() => WebGAL.gameplay.pixiStage!.removeAnimationWithSetEffects(softInAniKey), duration); + } + } else { + const currentFigThisKey = WebGAL.gameplay.pixiStage?.getStageObjByKey(thisFigKey); + if (currentFigThisKey) { + if (currentFigThisKey.sourceUrl !== fig.name) { + removeFig(currentFigThisKey, softInAniKey, stageState.effects); + } + } + } + } + + /** + * 移除不在状态表中的立绘 + */ + const currentFigures = WebGAL.gameplay.pixiStage?.getFigureObjects(); + if (currentFigures) { + for (const existFigure of currentFigures) { + if ( + existFigure.key === 'fig-left' || + existFigure.key === 'fig-center' || + existFigure.key === 'fig-right' || + existFigure.key.endsWith('-off') + ) { + // 什么也不做 + } else { + const existKey = existFigure.key; + const existFigInState = freeFigure.findIndex((fig) => fig.key === existKey); + if (existFigInState < 0) { + const softInAniKey = `${existFigure.key}-softin`; + removeFig(existFigure, softInAniKey, stageState.effects); + } + } + } + } + }, [freeFigure]); +} + +function removeFig(figObj: IStageObject, enterTikerKey: string, effects: IEffect[]) { + WebGAL.gameplay.pixiStage?.removeAnimationWithSetEffects(enterTikerKey); + // 快进,跳过退出动画 + if (WebGAL.gameplay.isFast) { + logger.debug('快速模式,立刻关闭立绘'); + WebGAL.gameplay.pixiStage?.removeStageObjectByKey(figObj.key); + return; + } + const oldFigKey = figObj.key; + const figLeaveAniKey = oldFigKey + '-off'; + figObj.key = oldFigKey + String(new Date().getTime()) + '-off'; + const figKey = figObj.key; + WebGAL.gameplay.pixiStage?.removeStageObjectByKey(oldFigKey); + const leaveKey = figKey + '-softoff'; + const { duration, animation } = getEnterExitAnimation(figLeaveAniKey, 'exit', false, figKey); + WebGAL.gameplay.pixiStage!.registerPresetAnimation(animation, leaveKey, figKey, effects); + setTimeout(() => { + WebGAL.gameplay.pixiStage?.removeAnimation(leaveKey); + WebGAL.gameplay.pixiStage?.removeStageObjectByKey(figKey); + }, duration); +} + +function addFigure(type?: 'image' | 'live2D' | 'spine', ...args: any[]) { + const url = args[1]; + if (url.endsWith('.json')) { + return addLive2dFigure(...args); + } else if (url.endsWith('.skel')) { + // @ts-ignore + return WebGAL.gameplay.pixiStage?.addSpineFigure(...args); + } else { + // @ts-ignore + return WebGAL.gameplay.pixiStage?.addFigure(...args); + } +} + +/** + * 如果要使用 Live2D,取消这里的注释 + * @param args + */ +function addLive2dFigure(...args: any[]) { + // @ts-ignore + // return WebGAL.gameplay.pixiStage?.addLive2dFigure(...args); +} diff --git a/packages/webgal/src/Stage/OldStage/OldStage.tsx b/packages/webgal/src/Stage/OldStage/OldStage.tsx new file mode 100644 index 000000000..fd3b0ccd9 --- /dev/null +++ b/packages/webgal/src/Stage/OldStage/OldStage.tsx @@ -0,0 +1,66 @@ +// import styles from '@/Components/Stage/stage.module.scss'; +// import { FigureContainer } from '@/Components/Stage/FigureContainer/FigureContainer'; +// import { useEffect } from 'react'; +// import { IEffect } from '@/store/stageInterface'; +// import { useSelector } from 'react-redux'; +// import { RootState } from '@/store/store'; + +export default function OldStage() { + // const stageState = useSelector((state: RootState) => state.stage); + // const oldBg = useSelector((state: RootState) => state.stageTemp.oldBg); + // const oldBgKey = useSelector((state: RootState) => state.stageTemp.oldBgKey); + // + // /** + // * 设置效果 + // */ + // useEffect(() => { + // const effectList: Array<IEffect> = stageState.effects; + // setTimeout(() => { + // effectList.forEach((effect) => { + // const target = document.getElementById(effect.target); + // if (target) { + // if (effect.filter !== '') { + // target.style.filter = effect.filter; + // } + // if (effect.transform !== '') { + // target.style.transform = effect.transform; + // } + // } + // }); + // }, 100); + // }); + // + // let stageWidth = '100%'; + // let stageHeight = '100%'; + // let top = '0'; + // if (stageState.enableFilm !== '') { + // stageHeight = '76%'; + // top = '12%'; + // } + // + // return ( + // <div className={styles.MainStage_main_container} style={{ width: stageWidth, height: stageHeight, top: top }}> + // {oldBg !== '' && ( + // <div + // key={'bgOld' + oldBg + oldBgKey} + // id="MainStage_bg_OldContainer" + // className={styles.MainStage_oldBgContainer} + // style={{ + // backgroundImage: `url("${oldBg}")`, + // backgroundSize: 'cover', + // }} + // /> + // )} + // <div + // key={'bgMain' + stageState.bgName} + // id="MainStage_bg_MainContainer" + // className={styles.MainStage_bgContainer} + // style={{ + // backgroundImage: `url("${stageState.bgName}")`, + // backgroundSize: 'cover', + // }} + // /> + // <FigureContainer /> + // </div> + // ); +} diff --git a/packages/webgal/src/Stage/Stage.tsx b/packages/webgal/src/Stage/Stage.tsx new file mode 100644 index 000000000..b782a7777 --- /dev/null +++ b/packages/webgal/src/Stage/Stage.tsx @@ -0,0 +1,138 @@ +import React, { FC } from 'react'; +import styles from './stage.module.scss'; +import { TextBox } from './TextBox/TextBox'; +import { AudioContainer } from './AudioContainer/AudioContainer'; +import { FullScreenPerform } from './FullScreenPerform/FullScreenPerform'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import { stopAll } from '@/Core/controller/gamePlay/fastSkip'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { setVisibility } from '@/store/GUIReducer'; +import { TextBoxFilm } from '@/Stage/TextBox/TextBoxFilm'; +import { useHotkey } from '@/hooks/useHotkey'; +import { MainStage } from '@/Stage/MainStage/MainStage'; +import IntroContainer from '@/Stage/introContainer/IntroContainer'; +import { isIOS } from '@/Core/initializeScript'; +import { WebGAL } from '@/Core/WebGAL'; +import { IGuiState } from '@/store/guiInterface'; +import { IStageState } from '@/store/stageInterface'; +// import OldStage from '@/Components/Stage/OldStage/OldStage'; + +function inTextBox(event: React.MouseEvent) { + const tb = document.getElementById('textBoxMain'); + if (!tb) { + return false; + } + let bounds = tb.getBoundingClientRect(); + return ( + event.clientX > bounds.left && + event.clientX < bounds.right && + event.clientY > bounds.top && + event.clientY < bounds.bottom + ); +} + +function checkMousePosition(event: React.MouseEvent, GUIState: IGuiState, dispatch: ReturnType<typeof useDispatch>) { + if (!GUIState.controlsVisibility && inTextBox(event)) { + dispatch(setVisibility({ component: 'controlsVisibility', visibility: true })); + } + if (GUIState.controlsVisibility && !inTextBox(event)) { + dispatch(setVisibility({ component: 'controlsVisibility', visibility: false })); + } +} + +function isTextboxHidden(stageState: IStageState, GUIState: IGuiState) { + if (!GUIState.showTextBox) { + return true; + } + + if (stageState.isDisableTextbox) { + return true; + } + + const isText = stageState.showText !== '' || stageState.showName !== ''; + if (!isText) { + return true; + } + + const isInIntro = document.getElementById('introContainer')?.style.display === 'block'; + if (isInIntro) { + return true; + } + + return false; +} + +let timeoutEventHandle: ReturnType<typeof setTimeout> | null = null; + +/** + * 检查并更新控制可见性 + * @param event 鼠标移动事件 + * @param stageState 场景状态 + * @param GUIState GUI状态 + * @param dispatch Redux dispatch函数 + */ +// eslint-disable-next-line max-params +function updateControlsVisibility( + event: React.MouseEvent, + stageState: IStageState, + GUIState: IGuiState, + dispatch: ReturnType<typeof useDispatch>, +) { + if (isTextboxHidden(stageState, GUIState)) { + // 当文本框被隐藏时 + // 逻辑:鼠标移动时显示,一段时间(默认:1秒)后隐藏 + if (timeoutEventHandle) { + clearTimeout(timeoutEventHandle); + } + + dispatch(setVisibility({ component: 'controlsVisibility', visibility: true })); + timeoutEventHandle = setTimeout(() => { + dispatch(setVisibility({ component: 'controlsVisibility', visibility: false })); + }, 1000); + } else { + // 当文本框正常显示时 + // 逻辑:鼠标位置在文本框内时显示 + checkMousePosition(event, GUIState, dispatch); + } +} + +export const Stage: FC = () => { + const stageState = useSelector((state: RootState) => state.stage); + const GUIState = useSelector((state: RootState) => state.GUI); + const dispatch = useDispatch(); + + useHotkey(); + + return ( + <div className={styles.MainStage_main}> + <FullScreenPerform /> + {/* 已弃用旧的立绘与背景舞台 */} + {/* <OldStage /> */} + <MainStage /> + <div id="pixiContianer" className={styles.pixiContainer} style={{ zIndex: isIOS ? '-5' : undefined }} /> + <div id="chooseContainer" className={styles.chooseContainer} /> + {GUIState.showTextBox && stageState.enableFilm === '' && !stageState.isDisableTextbox && <TextBox />} + {GUIState.showTextBox && stageState.enableFilm !== '' && <TextBoxFilm />} + <AudioContainer /> + <div + onClick={() => { + // 如果文本框没有显示,则显示文本框 + if (!GUIState.showTextBox) { + dispatch(setVisibility({ component: 'showTextBox', visibility: true })); + return; + } + stopAll(); + nextSentence(); + }} + onDoubleClick={() => { + WebGAL.events.fullscreenDbClick.emit(); + }} + id="FullScreenClick" + style={{ width: '100%', height: '100%', position: 'absolute', zIndex: '12', top: '0' }} + onMouseMove={(e) => !GUIState.showControls && updateControlsVisibility(e, stageState, GUIState, dispatch)} + /> + <IntroContainer /> + </div> + ); +}; diff --git a/packages/webgal/src/Stage/TextBox/IMSSTextbox.tsx b/packages/webgal/src/Stage/TextBox/IMSSTextbox.tsx new file mode 100644 index 000000000..9381649cc --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/IMSSTextbox.tsx @@ -0,0 +1,266 @@ +import styles from './textbox.module.scss'; +import { ReactNode, useEffect } from 'react'; +import { WebGAL } from '@/Core/WebGAL'; +import { ITextboxProps } from './types'; +import useApplyStyle from '@/hooks/useApplyStyle'; +import { css } from '@emotion/css'; +import { textSize } from '@/store/userDataInterface'; + +export default function IMSSTextbox(props: ITextboxProps) { + const { + textArray, + textDelay, + currentConcatDialogPrev, + currentDialogKey, + isText, + isSafari, + isFirefox: boolean, + fontSize, + miniAvatar, + isHasName, + showName, + font, + textDuration, + isUseStroke, + textboxOpacity, + textSizeState, + } = props; + + const applyStyle = useApplyStyle('Stage/TextBox/textbox.scss'); + + useEffect(() => { + function settleText() { + const textElements = document.querySelectorAll('.Textelement_start'); + const textArray = [...textElements]; + textArray.forEach((e) => { + e.className = applyStyle('TextBox_textElement_Settled', styles.TextBox_textElement_Settled); + }); + } + + WebGAL.events.textSettle.on(settleText); + return () => { + WebGAL.events.textSettle.off(settleText); + }; + }, []); + let allTextIndex = 0; + const nameElementList = showName.map((line, index) => { + const textline = line.map((en, index) => { + const e = en.reactNode; + let style = ''; + let tips = ''; + let style_alltext = ''; + let isEnhanced = false; + if (en.enhancedValue) { + isEnhanced = true; + const data = en.enhancedValue; + for (const dataElem of data) { + const { key, value } = dataElem; + switch (key) { + case 'style': + style = value; + break; + case 'tips': + tips = value; + break; + case 'style-alltext': + style_alltext = value; + break; + } + } + } + const styleClassName = ' ' + css(style, { label: 'showname' }); + const styleAllText = ' ' + css(style_alltext, { label: 'showname' }); + if (isEnhanced) { + return ( + <span key={index} style={{ position: 'relative' }}> + <span className={styles.zhanwei + styleAllText}> + {e} + <span className={applyStyle('outerName', styles.outerName) + styleClassName + styleAllText}>{e}</span> + {isUseStroke && <span className={applyStyle('innerName', styles.innerName) + styleAllText}>{e}</span>} + </span> + </span> + ); + } + return ( + <span key={index} style={{ position: 'relative' }}> + <span className={styles.zhanwei + styleAllText}> + {e} + <span className={applyStyle('outerName', styles.outerName) + styleClassName + styleAllText}>{e}</span> + {isUseStroke && <span className={applyStyle('innerName', styles.innerName) + styleAllText}>{e}</span>} + </span> + </span> + ); + }); + return ( + <div + style={{ + wordBreak: isSafari || props.isFirefox ? 'break-all' : undefined, + display: isSafari ? 'flex' : undefined, + flexWrap: isSafari ? 'wrap' : undefined, + }} + key={`text-line-${index}`} + > + {textline} + </div> + ); + }); + const textElementList = textArray.map((line, index) => { + const textLine = line.map((en, index) => { + const e = en.reactNode; + let style = ''; + let tips = ''; + let style_alltext = ''; + if (en.enhancedValue) { + const data = en.enhancedValue; + for (const dataElem of data) { + const { key, value } = dataElem; + switch (key) { + case 'style': + style = value; + break; + case 'tips': + tips = value; + break; + case 'style-alltext': + style_alltext = value; + break; + } + } + } + // if (e === '<br />') { + // return <br key={`br${index}`} />; + // } + let delay = allTextIndex * textDelay; + allTextIndex++; + let prevLength = currentConcatDialogPrev.length; + if (currentConcatDialogPrev !== '' && allTextIndex >= prevLength) { + delay = delay - prevLength * textDelay; + } + const styleClassName = ' ' + css(style); + const styleAllText = ' ' + css(style_alltext); + if (allTextIndex < prevLength) { + return ( + <span + // data-text={e} + id={`${delay}`} + className={applyStyle('TextBox_textElement_Settled', styles.TextBox_textElement_Settled)} + key={currentDialogKey + index} + style={{ animationDelay: `${delay}ms`, animationDuration: `${textDuration}ms` }} + > + <span className={styles.zhanwei + styleAllText}> + {e} + <span className={applyStyle('outer', styles.outer) + styleClassName + styleAllText}>{e}</span> + {isUseStroke && <span className={applyStyle('inner', styles.inner) + styleAllText}>{e}</span>} + </span> + </span> + ); + } + return ( + <span + // data-text={e} + id={`${delay}`} + className={`${applyStyle('TextBox_textElement_start', styles.TextBox_textElement_start)} Textelement_start`} + key={currentDialogKey + index} + style={{ animationDelay: `${delay}ms`, position: 'relative' }} + > + <span className={styles.zhanwei + styleAllText}> + {e} + <span className={applyStyle('outer', styles.outer) + styleClassName + styleAllText}>{e}</span> + {isUseStroke && <span className={applyStyle('inner', styles.inner) + styleAllText}>{e}</span>} + </span> + </span> + ); + }); + return ( + <div + style={{ + wordBreak: isSafari || props.isFirefox ? 'break-all' : undefined, + display: isSafari ? 'flex' : undefined, + flexWrap: isSafari ? 'wrap' : undefined, + }} + key={`text-line-${index}`} + > + {textLine} + </div> + ); + }); + + return ( + <> + {isText && ( + <div className={styles.TextBox_Container}> + <div + className={ + applyStyle('TextBox_main', styles.TextBox_main) + + ' ' + + applyStyle('TextBox_Background', styles.TextBox_Background) + + ' ' + + (miniAvatar === '' + ? applyStyle('TextBox_main_miniavatarOff', styles.TextBox_main_miniavatarOff) + : undefined) + } + style={{ + opacity: `${textboxOpacity / 100}`, + }} + /> + <div + id="textBoxMain" + className={ + applyStyle('TextBox_main', styles.TextBox_main) + + ' ' + + (miniAvatar === '' + ? applyStyle('TextBox_main_miniavatarOff', styles.TextBox_main_miniavatarOff) + : undefined) + } + style={{ + fontFamily: font, + }} + > + <div id="miniAvatar" className={applyStyle('miniAvatarContainer', styles.miniAvatarContainer)}> + {miniAvatar !== '' && ( + <img className={applyStyle('miniAvatarImg', styles.miniAvatarImg)} alt="miniAvatar" src={miniAvatar} /> + )} + </div> + {isHasName && ( + <> + <div + className={ + applyStyle('TextBox_showName', styles.TextBox_showName) + + ' ' + + applyStyle('TextBox_ShowName_Background', styles.TextBox_ShowName_Background) + } + style={{ + opacity: `${textboxOpacity / 100}`, + fontSize: '200%', + }} + > + <span style={{ opacity: 0 }}>{nameElementList}</span> + </div> + <div + className={applyStyle('TextBox_showName', styles.TextBox_showName)} + style={{ + fontSize: '200%', + }} + > + {nameElementList} + </div> + </> + )} + <div + className={applyStyle('text', styles.text)} + style={{ + fontSize, + flexFlow: 'column', + overflow: 'hidden', + paddingLeft: '0.1em', + lineHeight: textSizeState === textSize.medium ? '2.2em' : '2em', // 不加的话上半拼音可能会被截断,同时保持排版整齐 + }} + > + {textElementList} + </div> + </div> + </div> + )} + </> + ); +} diff --git a/packages/webgal/src/Stage/TextBox/TextBox.tsx b/packages/webgal/src/Stage/TextBox/TextBox.tsx new file mode 100644 index 000000000..9e33b072d --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/TextBox.tsx @@ -0,0 +1,277 @@ +import { ReactNode, useEffect, useState } from 'react'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { useFontFamily } from '@/hooks/useFontFamily'; +import { useTextAnimationDuration, useTextDelay } from '@/hooks/useTextOptions'; +import { getTextSize } from '@/UI/getTextSize'; +import { match } from '@/Core/util/match'; +import { textSize } from '@/store/userDataInterface'; +import IMSSTextbox from '@/Stage/TextBox/IMSSTextbox'; +import { SCREEN_CONSTANTS } from '@/Core/util/constants'; +import useEscape from '@/hooks/useEscape'; + +const userAgent = navigator.userAgent; +const isFirefox = /firefox/i.test(userAgent); +const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent); + +export interface EnhancedNode { + reactNode: ReactNode; + enhancedValue?: { key: string; value: string }[]; +} + +export const TextBox = () => { + const [isShowStroke, setIsShowStroke] = useState(true); + + useEffect(() => { + const handleResize = () => { + const targetHeight = SCREEN_CONSTANTS.height; + const targetWidth = SCREEN_CONSTANTS.width; + + const h = window.innerHeight; // 窗口高度 + const w = window.innerWidth; // 窗口宽度 + const zoomH = h / targetHeight; // 以窗口高度为基准的变换比 + const zoomW = w / targetWidth; // 以窗口宽度为基准的变换比 + const zoomH2 = w / targetHeight; // 竖屏时以窗口高度为基础的变换比 + const zoomW2 = h / targetWidth; // 竖屏时以窗口宽度为基础的变换比 + [zoomH, zoomW, zoomH2, zoomW2].forEach((e) => { + if (e <= 0.2) { + setIsShowStroke(false); + } else { + setIsShowStroke(true); + } + }); + }; + window.addEventListener('resize', handleResize); + handleResize(); + return () => { + window.removeEventListener('resize', handleResize); + }; + }, []); + + const stageState = useSelector((state: RootState) => state.stage); + const userDataState = useSelector((state: RootState) => state.userData); + const textDelay = useTextDelay(userDataState.optionData.textSpeed); + const textDuration = useTextAnimationDuration(userDataState.optionData.textSpeed); + let size = getTextSize(userDataState.optionData.textSize) + '%'; + const font = useFontFamily(); + const isText = stageState.showText !== '' || stageState.showName !== ''; + let textSizeState = userDataState.optionData.textSize; + if (isText && stageState.showTextSize !== -1) { + size = getTextSize(stageState.showTextSize) + '%'; + textSizeState = stageState.showTextSize; + } + const lineLimit = match(textSizeState) + .with(textSize.small, () => 3) + .with(textSize.medium, () => 2) + .with(textSize.large, () => 2) + .default(() => 2); + // 拆字 + const textArray = compileSentence(stageState.showText, lineLimit); + const isHasName = stageState.showName !== ''; + const showName = compileSentence(stageState.showName, lineLimit); + const currentConcatDialogPrev = stageState.currentConcatDialogPrev; + const currentDialogKey = stageState.currentDialogKey; + const miniAvatar = stageState.miniAvatar; + const textboxOpacity = userDataState.optionData.textboxOpacity; + const Textbox = IMSSTextbox; + return ( + <Textbox + textArray={textArray} + isText={isText} + textDelay={textDelay} + showName={showName} + isHasName={isHasName} + currentConcatDialogPrev={currentConcatDialogPrev} + fontSize={size} + currentDialogKey={currentDialogKey} + isSafari={isSafari} + isFirefox={isFirefox} + miniAvatar={miniAvatar} + textDuration={textDuration} + font={font} + textSizeState={textSizeState} + lineLimit={lineLimit} + isUseStroke={isShowStroke} + textboxOpacity={textboxOpacity} + /> + ); +}; + +function isCJK(character: string) { + return !!character.match(/[\u4e00-\u9fa5]|[\u0800-\u4e00]|[\uac00-\ud7ff]/); +} + +export function compileSentence(sentence: string, lineLimit: number, ignoreLineLimit?: boolean): EnhancedNode[][] { + // 先拆行 + const lines = sentence.split(/(?<!\\)\|/).map((val: string) => useEscape(val)); + // 对每一行进行注音处理 + const rubyLines = lines.map((line) => parseString(line)); + const nodeLines = rubyLines.map((line) => { + const ln: EnhancedNode[] = []; + line.forEach((node, index) => { + match(node.type) + .with(SegmentType.String, () => { + const chars = splitChars(node.value as string); + // eslint-disable-next-line max-nested-callbacks + ln.push(...chars.map((c) => ({ reactNode: c }))); + }) + .endsWith(SegmentType.Link, () => { + const val = node.value as EnhancedValue; + const enhancedNode = ( + <span className="__enhanced_text" key={val.text + `${index}`}> + <ruby key={index + val.text}> + {val.text} + <rt>{val.ruby}</rt> + </ruby> + </span> + ); + ln.push({ reactNode: enhancedNode, enhancedValue: val.values }); + }); + }); + return ln; + }); + return nodeLines.slice(0, ignoreLineLimit ? undefined : lineLimit); +} + +/** + * @param sentence + */ +export function splitChars(sentence: string) { + if (!sentence) return ['']; + const words: string[] = []; + let word = ''; + let cjkFlag = isCJK(sentence[0]); + + const isPunctuation = (ch: string): boolean => { + const regex = /[!-\/:-@\[-`{-~\u2000-\u206F\u3000-\u303F\uff00-\uffef]/g; + return regex.test(ch); + }; + + for (const character of sentence) { + // if (character === '|') { + // if (word) { + // words.push(word); + // word = ''; + // } + // words.push('<br />'); + // cjkFlag = false; + // continue; + // } + if (character === ' ') { + // Space + if (word) { + words.push(word); + word = ''; + } + words.push('\u00a0'); + cjkFlag = false; + } else if (isCJK(character) && !isPunctuation(character)) { + if (!cjkFlag && word) { + words.push(word); + word = ''; + } + words.push(character); + cjkFlag = true; + } else { + if (isPunctuation(character)) { + if (word) { + // If it is a punctuation and there is a preceding word, add it to the word + word += character; + words.push(word); + word = ''; + } else if (words.length > 0) { + // If no preceding word in the current iteration, but there are already words in the array, append to the last word + words[words.length - 1] += character; + } else { + // If no preceding word, still add the punctuation as a new word + words.push(character); + } + continue; + } + + if (cjkFlag && word) { + words.push(word); + word = ''; + } + word += character; + cjkFlag = false; + } + } + + if (word) { + words.push(word); + } + + return words; +} + +enum SegmentType { + String = 'SegmentType.String', + Link = 'SegmentType.Link', +} + +interface EnhancedValue { + text: string; + ruby: string; + values: { key: string; value: string }[]; +} + +interface Segment { + type: SegmentType; + value?: string | EnhancedValue; +} + +function parseString(input: string): Segment[] { + const regex = /(\[(.*?)\]\((.*?)\))|([^\[\]]+)/g; + const result: Segment[] = []; + let match: RegExpExecArray | null; + + while ((match = regex.exec(input)) !== null) { + if (match[1]) { + // 链接部分 + const text = match[2]; + const enhance = match[3]; + let parsedEnhanced: KeyValuePair[] = []; + let ruby = ''; + if (enhance.match(/style=|tips=|ruby=|style-alltext=/)) { + parsedEnhanced = parseEnhancedString(enhance); + const rubyKvPair = parsedEnhanced.find((e) => e.key === 'ruby'); + if (rubyKvPair) { + ruby = rubyKvPair.value; + } + } else { + ruby = enhance; + } + result.push({ type: SegmentType.Link, value: { text, ruby, values: parsedEnhanced } }); + } else { + // 普通文本 + const text = match[0]; + result.push({ type: SegmentType.String, value: text }); + } + } + + // 我也不知道为什么,不加这个就会导致在 Enhanced Value 处于行首时故障 + // 你可以认为这个代码不明所以,但是不要删除 + result.unshift({ type: SegmentType.String, value: '' }); + return result; +} + +interface KeyValuePair { + key: string; + value: string; +} + +function parseEnhancedString(enhanced: string): KeyValuePair[] { + const result: KeyValuePair[] = []; + const regex = /(\S+)=(.*?)(?=\s+\S+=|\s*$)/g; + let match: RegExpExecArray | null; + + while ((match = regex.exec(enhanced)) !== null) { + result.push({ + key: match[1], + value: match[2].replace(/~/g, ':').trim(), + }); + } + + return result; +} diff --git a/packages/webgal/src/Stage/TextBox/TextBoxFilm.tsx b/packages/webgal/src/Stage/TextBox/TextBoxFilm.tsx new file mode 100644 index 000000000..6d14d9921 --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/TextBoxFilm.tsx @@ -0,0 +1,57 @@ +import styles from './textboxFilm.module.scss'; +import { useEffect } from 'react'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; + +import { PERFORM_CONFIG } from '@/config'; + +export const TextBoxFilm = () => { + const stageState = useSelector((state: RootState) => state.stage); + const userDataState = useSelector((state: RootState) => state.userData); + useEffect(() => {}); + const textDelay = PERFORM_CONFIG.textInitialDelay - 20 * userDataState.optionData.textSpeed; + const size = userDataState.optionData.textSize * 50 + 200 + '%'; + + // 拆字 + const textArray: Array<string> = stageState.showText.split(''); + const textElementList = textArray.map((e, index) => { + let delay = index * textDelay; + let prevLength = stageState.currentConcatDialogPrev.length; + if (stageState.currentConcatDialogPrev !== '' && index >= prevLength) { + delay = delay - prevLength * textDelay; + } + if (index < prevLength) { + return ( + <span + id={`${delay}`} + className={styles.TextBox_textElement_Settled} + key={stageState.currentDialogKey + index} + style={{ animationDelay: `${delay}ms` }} + > + {e} + </span> + ); + } + return ( + <span + id={`${delay}`} + className={styles.TextBox_textElement_start} + key={stageState.currentDialogKey + index} + style={{ animationDelay: `${delay}ms` }} + > + {e} + </span> + ); + }); + return ( + <div id="textBoxMain" className={styles.TextBox_main}> + {/* <div id="miniAvatar" className={styles.miniAvatarContainer}> */} + {/* {stageState.miniAvatar !== '' && */} + {/* <img className={styles.miniAvatarImg} alt="miniAvatar" src={stageState.miniAvatar}/>} */} + {/* </div> */} + {/* {stageState.showName !== '' && */} + {/* <div className={styles.TextBox_showName} style={{fontSize: '200%'}}>{stageState.showName}</div>} */} + <div style={{ fontSize: size }}>{textElementList}</div> + </div> + ); +}; diff --git a/packages/webgal/src/Stage/TextBox/legacy-themes/legacy-standard/StandardTextbox.tsx b/packages/webgal/src/Stage/TextBox/legacy-themes/legacy-standard/StandardTextbox.tsx new file mode 100644 index 000000000..465b918bb --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/legacy-themes/legacy-standard/StandardTextbox.tsx @@ -0,0 +1,158 @@ +import styles from './standard.module.scss'; +import { textSize } from '@/store/userDataInterface'; +import { ReactNode, useEffect } from 'react'; +import { WebGAL } from '@/Core/WebGAL'; +import { ITextboxProps } from '@/Stage/TextBox/types'; + +export default function StandardTextbox(props: ITextboxProps) { + const { + textArray, + textDelay, + currentConcatDialogPrev, + currentDialogKey, + isText, + isSafari, + isFirefox, + fontSize, + miniAvatar, + isHasName, + showName, + font, + textDuration, + textSizeState, + isUseStroke, + textboxOpacity, + } = props; + + const isHasMiniAvatar = miniAvatar !== ''; + + useEffect(() => { + function settleText() { + const textElements = document.querySelectorAll('.Textelement_start'); + const textArray = [...textElements]; + textArray.forEach((e) => { + e.className = styles.TextBox_textElement_Settled; + }); + } + WebGAL.events.textSettle.on(settleText); + return () => { + WebGAL.events.textSettle.off(settleText); + }; + }, []); + const nameElementList = showName.map((e,index)=>{ + let prevLength = currentConcatDialogPrev.length; + if (index < prevLength) { + return ( + <span className={styles.zhanwei}> + {e} + <span className={styles.outer}>{e}</span> + {isUseStroke && <span className={styles.inner}>{e}</span>} + </span> + ); + } + return ( + <span className={styles.zhanwei}> + {e} + <span className={styles.outer}>{e}</span> + {isUseStroke && <span className={styles.inner}>{e}</span>} + </span> + ); + }); + const textElementList = textArray.map((e, index) => { + // if (e === '<br />') { + // return <br key={`br${index}`} />; + // } + let delay = index * textDelay; + let prevLength = currentConcatDialogPrev.length; + if (currentConcatDialogPrev !== '' && index >= prevLength) { + delay = delay - prevLength * textDelay; + } + if (index < prevLength) { + return ( + <span + // data-text={e} + id={`${delay}`} + className={styles.TextBox_textElement_Settled} + key={currentDialogKey + index} + style={{ animationDelay: `${delay}ms`, animationDuration: `${textDuration}ms` }} + > + <span className={styles.zhanwei}> + {e} + <span className={styles.outer}>{e}</span> + {isUseStroke && <span className={styles.inner}>{e}</span>} + </span> + </span> + ); + } + return ( + <span + // data-text={e} + id={`${delay}`} + className={`${styles.TextBox_textElement_start} Textelement_start`} + key={currentDialogKey + index} + style={{ animationDelay: `${delay}ms`, position: 'relative' }} + > + <span className={styles.zhanwei}> + {e} + <span className={styles.outer}>{e}</span> + {isUseStroke && <span className={styles.inner}>{e}</span>} + </span> + </span> + ); + }); + + const padding = isHasMiniAvatar ? 500 : undefined; + let paddingTop = isHasName ? undefined : 15; + if (textSizeState === textSize.small && !isHasName) { + paddingTop = 35; + } + + return ( + <> + {isText && ( + <div + id="textBoxMain" + className={styles.TextBox_main} + style={{ + fontFamily: font, + paddingLeft: padding, + paddingTop, + background: `linear-gradient( + transparent, + rgba(0, 0, 0, ${textboxOpacity / 100 / 2}) 25%, + rgba(0, 0, 0, ${textboxOpacity / 100 / 2}) 75%, + rgba(0, 0, 0, ${textboxOpacity / 100})), + linear-gradient( + 90deg, transparent 0, + rgba(0, 0, 0, ${textboxOpacity / 100 / 2}) 25%, + rgba(0, 0, 0, ${textboxOpacity / 100}) 75%, transparent)`, + }} + > + {/* <div className={styles.nameContainer}>{stageState.showName !== ''}</div> */} + <div id="miniAvatar" className={styles.miniAvatarContainer}> + {miniAvatar !== '' && <img className={styles.miniAvatarImg} alt="miniAvatar" src={miniAvatar} />} + </div> + {isHasName && ( + <div className={styles.TextBox_showName} style={{ fontSize: '170%', left: padding }}> + {nameElementList} + </div> + )} + <div + className={styles.text} + style={{ + fontSize, + wordBreak: isSafari || isFirefox ? 'break-all' : undefined, + display: isSafari ? 'flex' : undefined, + flexWrap: isSafari ? 'wrap' : undefined, + overflow: 'hidden', + paddingLeft: '0.1em', + WebkitLineClamp: props.lineLimit, + }} + > + {textElementList} + </div> + </div> + )} + </> + ); +} diff --git a/packages/webgal/src/Stage/TextBox/legacy-themes/legacy-standard/standard.module.scss b/packages/webgal/src/Stage/TextBox/legacy-themes/legacy-standard/standard.module.scss new file mode 100644 index 000000000..128271be0 --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/legacy-themes/legacy-standard/standard.module.scss @@ -0,0 +1,160 @@ +.TextBox_EventHandler { + position: absolute; + width: 100%; + height: 100%; + z-index: 6; + top: 0; +} + +@mixin text_shadow_textElement { + //text-shadow: 0 0 3px rgba(81,168,221,1); +} + +$height: 430px; + +.TextBox_main { + position: absolute; + z-index: 6; + right: 0; + bottom: 0; + left: 0; + min-height: $height; + max-height: $height; + // background: linear-gradient(transparent, rgba(0, 0, 0, .25) 25%, rgba(0, 0, 0, .35) 75%, rgba(0, 0, 0, .6)), + // linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .35) 25%, rgba(0, 0, 0, .35) 75%, transparent); + //background-blend-mode: darken; + font-weight: bold; + padding: 30px 50px 100px 200px; + box-sizing: border-box; + display: flex; + flex-flow: column; + align-items: flex-start; + animation: showSoftly 0.7s ease-out forwards; + letter-spacing: 0.2em; + //backdrop-filter: blur(2px); + transition: left 0.33s, padding-left 0.33s; +} + +.TextBox_showName { + @include text_shadow_textElement; + font-size: 85%; + min-width: 25%; + height: 70px; + //display: flex; + //align-items: center; + transition: left 0.33s; + border-bottom: 3px solid rgba(255, 255, 255, 0.8); +} + +@keyframes showSoftly { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.TextBox_textElement_start { + @include text_shadow_textElement; + position: relative; + animation: TextDelayShow 1000ms ease-out forwards; + opacity: 0; +} + +.outer { + position: absolute; + white-space: nowrap; + left: 0; + top: 0; + background-image: linear-gradient( //135deg, + #ffffff 0%, + #f5f7fa 45%, + #c3cfe2 100%); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + z-index: 2; +} + +.inner { + white-space: nowrap; + position: absolute; + left: 0; + top: 0; + -webkit-text-stroke: 0.085em rgba(0, 0, 0, 0.35); + z-index: 1; +} + +.zhanwei { + color: transparent; + white-space: nowrap; +} + + +.TextBox_textElement_Settled { + position: relative; + @include text_shadow_textElement; + opacity: 1; +} + +@keyframes TextDelayShow { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.miniAvatarContainer { + position: absolute; + height: 450px; + width: 450px; + bottom: 0; + left: 0; + //border-radius: 100% 0 0 100%; + overflow: hidden; +} + +.miniAvatarImg { + max-height: 100%; + max-width: 100%; + position: absolute; + bottom: 0; + filter: drop-shadow(15px 0 3px rgba(0, 0, 0, 0.5)); +} + +.nameContainer { + position: absolute; + left: 2em; + top: -3.5em; +} + +.outerName { + position: absolute; + left: 0; + top: 0; + background: linear-gradient(150deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 35%, rgb(165, 212, 228) 100%); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + z-index: 2; +} + +.innerName { + position: absolute; + left: 0; + top: 0; + z-index: 1; +} + +.text { + line-height: 1.9em; + display: -webkit-box; + -webkit-box-orient: vertical; + //-webkit-line-clamp: 2; + overflow: hidden; +} \ No newline at end of file diff --git a/packages/webgal/src/Stage/TextBox/textbox.module.scss b/packages/webgal/src/Stage/TextBox/textbox.module.scss new file mode 100644 index 000000000..392918d7a --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/textbox.module.scss @@ -0,0 +1,236 @@ +.TextBox_EventHandler { + position: absolute; + width: 100%; + height: 100%; + z-index: 6; + top: 0; +} + +@mixin text_shadow_textElement { + //text-shadow: 0 0 3px rgba(81,168,221,1); +} + +$height: 330px; + +.TextBox_Container { + position: absolute; + z-index: 6; + bottom: 0; + width: 100%; + animation: showSoftly 0.7s ease-out forwards; +} + +.TextBox_main { + z-index: 3; + position: absolute; + right: 25px; + min-height: $height; + max-height: $height; + background-blend-mode: darken; + border-radius: calc($height / 2) 20px 20px calc($height / 2); + bottom: 20px; + left: 275px; + font-weight: bold; + color: white; + padding: 1em 50px 70px 200px; + box-sizing: border-box; + display: flex; + flex-flow: column; + align-items: flex-start; + letter-spacing: 0.2em; + transition: left 0.33s; +} + +.TextBox_main_miniavatarOff { + left: 25px; +} + +.TextBox_Background { + z-index: 2; + background: linear-gradient(rgba(245, 247, 250, 1) 0%, rgba(189, 198, 222, 1) 100%); +} + +@keyframes showSoftly { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +//.TextBox_textElement { +// opacity: 0; +// animation: showSoftly 1000ms forwards; +//} + + +.TextBox_textElement_start { + @include text_shadow_textElement; + position: relative; + animation: TextDelayShow 1000ms ease-out forwards; + opacity: 0; + display: inline-flex; + align-content: space-between +} + + +.outer { + position: absolute; + left:0; + top:0; + white-space: nowrap; + //background-image: linear-gradient(rgba(255, 255, 255, 1) 0%, rgb(225, 237, 255) 100%); + background-image: linear-gradient(#0B346E 0%, + //#f5f7fa 45%, + #141423 100%); + //background: rgba(255, 255, 255, 1); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + z-index: 2; + display: inline-block; /* 与文本对齐 */ + vertical-align: middle; /* 确保注音整体的垂直居中 */ +} + +.inner { + white-space: nowrap; + position: absolute; + left:0; + top:0; + -webkit-text-stroke: 0.1em rgba(255, 255, 255, 1); + z-index: 1; + //text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.75); + display: inline-block; /* 内层元素同样行内块布局 */ + vertical-align: middle; /* 确保与外层的对齐一致 */ +} + +.zhanwei { + color: transparent; + white-space: nowrap; + display: inline-block; /* 保持行内块布局 */ + vertical-align: baseline; /* 确保文本基线对齐 */ + position: relative; /* 保持相对定位 */ +} + +// +//.TextBox_textElement_start::before{ +// animation: TextDelayShow 700ms ease-out forwards; +// opacity: 0; +// content:attr(data-text); +// position: absolute; +//} + +.TextBox_textElement_Settled { + position: relative; + @include text_shadow_textElement; + opacity: 1; + display: inline-flex; + align-content: space-between +} + +// +//.TextBox_textElement_Settled::before{ +// content:attr(data-text); +// position: absolute; +// opacity: 1; +// -webkit-text-stroke: 1px red; +// z-index: 1; +//} + +.TextBox_showName { + @include text_shadow_textElement; + font-size: 85%; + //border-bottom: 3px solid rgb(176, 176, 176); + //min-width: 25%; + padding: 0 2em 0 2em; + //margin: 0 0 0 0; + position: absolute; + left: 150px; + top: -68px; + height: 80px; + line-height: 68px; + //display: flex; + //align-items: center; + // background: rgba(11, 52, 110, 0.9); + border-radius: 40px; + // border: 4px solid rgba(255, 255, 255, 0.75); + // box-shadow: 3px 3px 10px rgba(100, 100, 100, 0.5); + z-index: 3; + border: 4px solid rgba(255, 255, 255, 0); +} + +.TextBox_ShowName_Background { + z-index: 2; + background: rgba(11, 52, 110, 1); + border: 4px solid rgba(255, 255, 255, 0.75); + box-shadow: 3px 3px 10px rgba(100, 100, 100, 0.5); +} + +@keyframes TextDelayShow { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.miniAvatarContainer { + position: absolute; + height: 450px; + width: 450px; + bottom: 0; + left: -250px; + border-radius: 100% 0 0 100%; + overflow: hidden; +} + +.miniAvatarImg { + max-height: 100%; + max-width: 100%; + position: absolute; + bottom: 0; + filter: drop-shadow(15px 0 3px rgba(0, 0, 0, 0.5)); +} + +.nameContainer { + position: absolute; + left: 2em; + top: -3.5em; +} + +.outerName { + position: absolute; + left: 0; + top: 0; + //background-image: linear-gradient(rgba(255, 255, 255, 1) 0%, rgb(225, 237, 255) 100%); + //background-image: linear-gradient( + // #bfd8ff 0%, + // //#f5f7fa 45%, + // #bfbfc7 100% + //); + background: linear-gradient(150deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 35%, rgb(165, 212, 228) 100%); + //background: rgba(255, 255, 255, 1); + background-clip: text; + -webkit-background-clip: text; + color: transparent; + z-index: 2; +} + +.innerName { + position: absolute; + left: 0; + top: 0; + //-webkit-text-stroke: 0.1em rgba(0, 0, 0, 0.25); + //-webkit-text-stroke: 0.1em rgba(255, 255, 255, 1); + z-index: 1; + //text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.75); +} + +.text { + line-height: 1.9em; + overflow: hidden; +} diff --git a/packages/webgal/src/Stage/TextBox/textboxFilm.module.scss b/packages/webgal/src/Stage/TextBox/textboxFilm.module.scss new file mode 100644 index 000000000..da3cac663 --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/textboxFilm.module.scss @@ -0,0 +1,91 @@ +.TextBox_EventHandler { + position: absolute; + width: 100%; + height: 100%; + z-index: 6; + top: 0; +} + +.TextBox_main { + font-family: "思源宋体", serif; + font-style: italic; + position: absolute; + z-index: 6; + width: 100%; + height: 12%; + //background: linear-gradient(transparent, + // rgba(0, 0, 0, .25) 25%, + // rgba(0, 0, 0, .35) 75%, + // rgba(0, 0, 0, .6)), + //linear-gradient(90deg, transparent 0, + // rgba(0, 0, 0, .35) 25%, + // rgba(0, 0, 0, .35) 75%, + // transparent); + background-color: black; + bottom: 0; + color: white; + //padding: 1em 18em 2em 18em; + box-sizing: border-box; + overflow: hidden; + display: flex; + flex-flow: column; + align-items: center; + animation: showSoftly 0.7s ease-out forwards; + letter-spacing: 0.2em; + justify-content: center; +} + +@keyframes showSoftly { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +.TextBox_textElement { + opacity: 0; + animation: showSoftly 1000ms forwards; +} + +.TextBox_textElement_start { + animation: TextDelayShow 700ms ease-out forwards; + opacity: 0; +} + +.TextBox_textElement_Settled { + opacity: 1; +} + +.TextBox_showName { + font-size: 85%; + border-bottom: 2px solid rgba(255, 255, 255, 0.3); + min-width: 50%; + padding: 0 0.2em 0.2em 0.3em; + margin: 0 0 0.2em 0; +} + +@keyframes TextDelayShow { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +.miniAvatarContainer { + position: absolute; + height: 80%; + width: 17%; + bottom: 0; + left: 0.5em; +} + +.miniAvatarImg { + max-height: 100%; + max-width: 100%; + position: absolute; + bottom: 0; +} diff --git a/packages/webgal/src/Stage/TextBox/types.ts b/packages/webgal/src/Stage/TextBox/types.ts new file mode 100644 index 000000000..59e41e126 --- /dev/null +++ b/packages/webgal/src/Stage/TextBox/types.ts @@ -0,0 +1,21 @@ +import { EnhancedNode } from '@/Stage/TextBox/TextBox'; + +export interface ITextboxProps { + textArray: EnhancedNode[][]; + textDelay: number; + currentConcatDialogPrev: string; + currentDialogKey: string; + isText: boolean; + isSafari: boolean; + isFirefox: boolean; + fontSize: string; + miniAvatar: string; + showName: EnhancedNode[][]; + isHasName: boolean; + font: string; + textDuration: number; + textSizeState: number; + lineLimit: number; + isUseStroke: boolean; + textboxOpacity: number; +} diff --git a/packages/webgal/src/Stage/introContainer/IntroContainer.tsx b/packages/webgal/src/Stage/introContainer/IntroContainer.tsx new file mode 100644 index 000000000..16b7dfb5b --- /dev/null +++ b/packages/webgal/src/Stage/introContainer/IntroContainer.tsx @@ -0,0 +1,5 @@ +import styles from './introContainer.module.scss'; + +export default function IntroContainer() { + return <div className={styles.introContainer} id="introContainer" />; +} diff --git a/packages/webgal/src/Stage/introContainer/introContainer.module.scss b/packages/webgal/src/Stage/introContainer/introContainer.module.scss new file mode 100644 index 000000000..034ae238f --- /dev/null +++ b/packages/webgal/src/Stage/introContainer/introContainer.module.scss @@ -0,0 +1,10 @@ +.introContainer { + box-sizing: border-box; + position: absolute; + z-index: 11; + width: 100%; + height: 100%; + color: white; + display: none; + //z-index: 13; +} diff --git a/packages/webgal/src/Stage/stage.module.scss b/packages/webgal/src/Stage/stage.module.scss new file mode 100644 index 000000000..ffa0e6db5 --- /dev/null +++ b/packages/webgal/src/Stage/stage.module.scss @@ -0,0 +1,82 @@ +.MainStage_main { + width: 100%; + height: 100%; + position: absolute; + z-index: 1; + //animation: MainStage_showBgSoftly 100ms forwards; + opacity: 1; + overflow: hidden; +} + +.MainStage_main_container { + width: 100%; + height: 100%; + position: absolute; + overflow: hidden; +} + +.MainStage_bgContainer { + top: 0; + position: absolute; + background-size: cover; + width: 100%; + height: 100%; + z-index: 1; + animation: MainStage_showBgSoftly 1s forwards ease-in-out; +} + +.MainStage_bgContainer_Settled { + top: 0; + position: absolute; + background-size: cover; + width: 100%; + height: 100%; + animation: MainStage_showBgSoftly 1ms forwards; + z-index: 1; +} + +.MainStage_oldBgContainer { + background-size: cover; + top: 0; + position: absolute; + width: 100%; + height: 100%; + z-index: 0; + animation: MainStage_oldBgFadeout 3s forwards; +} + +.MainStage_oldBgContainer_Settled { + background-size: cover; + top: 0; + position: absolute; + width: 100%; + height: 100%; + opacity: 0; +} + +@keyframes MainStage_showBgSoftly { + 0% { + opacity: 0.15; + } + 100% { + opacity: 1; + } +} + +@keyframes MainStage_oldBgFadeout { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +.pixiContainer{ + position: absolute; + z-index: 5; +} + +.chooseContainer{ + z-index: 8; +} diff --git a/packages/webgal/src/Stage/themeInterface.ts b/packages/webgal/src/Stage/themeInterface.ts new file mode 100644 index 000000000..f3e8d8733 --- /dev/null +++ b/packages/webgal/src/Stage/themeInterface.ts @@ -0,0 +1 @@ +export type IWebGalTextBoxTheme = 'standard' | 'imss'; diff --git a/packages/webgal/src/UI/Backlog/Backlog.tsx b/packages/webgal/src/UI/Backlog/Backlog.tsx new file mode 100644 index 000000000..c79093eaa --- /dev/null +++ b/packages/webgal/src/UI/Backlog/Backlog.tsx @@ -0,0 +1,224 @@ +import styles from './backlog.module.scss'; +import { CloseSmall, Return, VolumeNotice } from '@icon-park/react'; +import { jumpFromBacklog } from '@/Core/controller/storage/jumpFromBacklog'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState, webgalStore } from '@/store/store'; +import { setVisibility } from '@/store/GUIReducer'; +import { logger } from '@/Core/util/logger'; +import { ReactNode, useEffect, useMemo, useRef, useState } from 'react'; +import useTrans from '@/hooks/useTrans'; +import { compileSentence, EnhancedNode, splitChars } from '@/Stage/TextBox/TextBox'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import { WebGAL } from '@/Core/WebGAL'; + +export const Backlog = () => { + const t = useTrans('gaming.'); + // logger.info('Backlog render'); + const { playSeEnter, playSeClick } = useSoundEffect(); + const GUIStore = useSelector((state: RootState) => state.GUI); + const dispatch = useDispatch(); + const iconSize = '0.8em'; + const [indexHide, setIndexHide] = useState(false); + const [isDisableScroll, setIsDisableScroll] = useState(false); + let timeRef = useRef<ReturnType<typeof setTimeout>>(); + // 缓存一下vdom + const backlogList = useMemo<any>(() => { + let backlogs = []; + // logger.info('backlogList render'); + for (let i = 0; i < WebGAL.backlogManager.getBacklog().length; i++) { + const backlogItem = WebGAL.backlogManager.getBacklog()[i]; + const showTextArray = compileSentence(backlogItem.currentStageState.showText, 3, true); + const showTextArray2 = showTextArray.map((line) => { + return line.map((c) => { + return c.reactNode; + }); + }); + const showTextArrayReduced = mergeStringsAndKeepObjects(showTextArray2); + const showTextElementList = showTextArrayReduced.map((line, index) => { + return ( + <div key={`backlog-line-${index}`}> + {line.map((e, index) => { + if (e === '<br />') { + return <br key={`br${index}`} />; + } else { + return e; + } + })} + </div> + ); + }); + const showNameArray = compileSentence(backlogItem.currentStageState.showName, 3, true); + const showNameArray2 = showNameArray.map((line)=>{ + return line.map((c) => { + return c.reactNode; + }); + }); + const showNameArrayReduced = mergeStringsAndKeepObjects(showNameArray2); + const nameElementList = showNameArrayReduced.map((line,index)=>{ + return ( + <div key={`backlog-line-${index}`}> + {line.map((e, index) => { + if (e === '<br />') { + return <br key={`br${index}`} />; + } else { + return e; + } + })} + </div> + ); + }); + const singleBacklogView = ( + <div + className={styles.backlog_item} + style={{ animationDelay: `${20 * (WebGAL.backlogManager.getBacklog().length - i)}ms` }} + key={'backlogItem' + backlogItem.currentStageState.showText + backlogItem.saveScene.currentSentenceId} + > + <div className={styles.backlog_func_area}> + <div className={styles.backlog_item_button_list}> + <div + onClick={(e) => { + playSeClick(); + jumpFromBacklog(i); + e.preventDefault(); + e.stopPropagation(); + }} + onMouseEnter={playSeEnter} + className={styles.backlog_item_button_element} + > + <Return theme="outline" size={iconSize} fill="#ffffff" strokeWidth={3} /> + </div> + {backlogItem.currentStageState.vocal ? ( + <div + onClick={() => { + playSeClick(); + // 获取到播放 backlog 语音的元素 + const backlog_audio_element: any = document.getElementById('backlog_audio_play_element_' + i); + if (backlog_audio_element) { + backlog_audio_element.currentTime = 0; + const userDataStore = webgalStore.getState().userData; + const mainVol = userDataStore.optionData.volumeMain; + backlog_audio_element.volume = mainVol * 0.01 * userDataStore.optionData.vocalVolume * 0.01; + backlog_audio_element?.play(); + } + }} + onMouseEnter={playSeEnter} + className={styles.backlog_item_button_element} + > + <VolumeNotice theme="outline" size={iconSize} fill="#ffffff" strokeWidth={3} /> + </div> + ) : null} + </div> + <div className={styles.backlog_item_content_name}>{nameElementList}</div> + </div> + <div className={styles.backlog_item_content}> + <span className={styles.backlog_item_content_text}>{showTextElementList}</span> + </div> + <audio id={'backlog_audio_play_element_' + i} src={backlogItem.currentStageState.vocal} /> + </div> + ); + backlogs.unshift(singleBacklogView); + } + return backlogs; + }, [ + WebGAL.backlogManager.getBacklog()[WebGAL.backlogManager.getBacklog().length - 1]?.saveScene?.currentSentenceId ?? + 0, + ]); + useEffect(() => { + /* 切换为展示历史记录时触发 */ + if (GUIStore.showBacklog) { + // logger.info('展示backlog'); + // 立即清除 防止来回滚动时可能导致的错乱 + if (timeRef.current) { + clearTimeout(timeRef.current); + } + // setIsDisableScroll(false); + // 重新把index调回正数 + setIndexHide(false); + // 向上滑动触发回想时会带着backlog一起滑一下 我也不知道为什么,可能是我的鼠标问题 所以先ban掉滚动 + setIsDisableScroll(true); + // nextTick开启滚动 + setTimeout(() => { + setIsDisableScroll(false); + }, 0); + } else { + /* 隐藏历史记录触发 */ + // 这里是为了让backlog的z-index降低 + timeRef.current = setTimeout(() => { + setIndexHide(true); + // setIsDisableScroll(false); + // setIsDisableScroll(true); + timeRef.current = undefined; + // 700是和动画一样的延时 保险起见多个80ms + // 不加也没啥 问题不大 + }, 700 + 80); + } + }, [GUIStore.showBacklog]); + return ( + <> + { + // ${indexHide ? styles.Backlog_main_out_IndexHide : ''} + <div + className={` + ${GUIStore.showBacklog ? styles.Backlog_main : styles.Backlog_main_out} + ${indexHide ? styles.Backlog_main_out_IndexHide : ''} + `} + > + <div className={styles.backlog_top}> + <CloseSmall + className={styles.backlog_top_icon} + onClick={() => { + playSeClick(); + dispatch(setVisibility({ component: 'showBacklog', visibility: false })); + dispatch(setVisibility({ component: 'showTextBox', visibility: true })); + }} + onMouseEnter={playSeEnter} + theme="outline" + size="4em" + fill="#ffffff" + strokeWidth={3} + /> + <div + className={styles.backlog_title} + onClick={() => { + logger.info('Rua! Testing'); + }} + > + {t('buttons.backlog')} + </div> + </div> + {GUIStore.showBacklog && ( + <div className={`${styles.backlog_content} ${isDisableScroll ? styles.Backlog_main_DisableScroll : ''}`}> + {backlogList} + </div> + )} + </div> + } + </> + ); +}; + +function mergeStringsAndKeepObjects(arr: ReactNode[]): ReactNode[][] { + let result = []; + let currentString = ''; + + // eslint-disable-next-line @typescript-eslint/prefer-for-of + for (let i = 0; i < arr.length; i++) { + const currentItem = arr[i]; + + if (typeof currentItem === 'string') { + currentString += currentItem; + } else { + if (currentString !== '') { + result.push(currentString); + currentString = ''; + } + result.push(currentItem); + } + } + + if (currentString !== '') { + result.push(currentString); + } + + return result as ReactNode[][]; +} diff --git a/packages/webgal/src/UI/Backlog/backlog.module.scss b/packages/webgal/src/UI/Backlog/backlog.module.scss new file mode 100644 index 000000000..7d3f9a6dd --- /dev/null +++ b/packages/webgal/src/UI/Backlog/backlog.module.scss @@ -0,0 +1,220 @@ +.Backlog_main { + font-family: "思源宋体", serif; + position: absolute; + top: 0; + width: 100%; + height: 100%; + z-index: 10; + background: rgba(0, 0, 0, 0.7); + padding: 2em 0 2em 0; + animation: backlog_soft_in 0.7s ease-out forwards; + box-sizing: border-box; +} + +.Backlog_main_out { + font-family: "思源宋体", serif; + position: absolute; + top: 0; + width: 100%; + height: 100%; + z-index: 10; + background: rgba(0, 0, 0, 0.7); + padding: 2em 0 2em 0; + animation: backlog_soft_out 0.7s ease-out forwards; + box-sizing: border-box; +} + +// 把z-index置为负数 不然会挡住点击层 +.Backlog_main_out_IndexHide { + z-index: -10; +} + +// 暂时禁用滚动 +.Backlog_main_DisableScroll { + overflow: hidden !important; +} + + +.backlog_top { + padding: 0 0 0 1em; + display: flex; + height: 10%; +} + +.backlog_top_icon { + padding: 0.6em 0.6em 0 0.6em; + border-radius: 1000px; + transform: translate(0, -13px); + cursor: pointer; +} + +.backlog_top_icon:hover { + background: rgba(255, 255, 255, 0.25); + animation: backlog_icon_softin 0.25s ease-out forwards; +} + +@keyframes backlog_icon_softin { + 0% { + background: rgba(255, 255, 255, 0); + } + 100% { + background: rgba(255, 255, 255, 0.25); + } +} + + +.backlog_title { + height: 100%; + line-height: 100%; + font-size: 360%; + font-weight: bold; + color: transparent; + background: linear-gradient(150deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 35%, rgba(165, 212, 228, 1) 100%); + -webkit-background-clip: text; +} + +.backlog_content { + position: absolute; + height: 80%; + padding: 1em 10em 1em 10em; + overflow: auto; + display: flex; + flex-flow: column-reverse; + font-weight: normal; + width: 100%; + box-sizing: border-box; +} + + +.backlog_item { + display: flex; + color: white; + font-size: 165%; + opacity: 0; + animation: backlog_item_in 0.5s ease-out forwards; + margin: 1.25em 0 0 0; + width: 100%; +} + +.backlog_item_out { + display: flex; + color: white; + font-size: 165%; + opacity: 0; + animation: backlog_item_out 0.5s ease-out forwards; + margin: 1.25em 0 0 0; + width: 100%; +} + +.backlog_func_area { + display: flex; + flex-flow: row; + align-items: flex-start; + width: 30%; + max-width: 30%; + min-width: 30%; +} + +.backlog_item_content_name { + font-weight: bold; + color: transparent; + //background: linear-gradient(150deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 55%, rgb(210, 243, 255) 100%); + background: linear-gradient(150deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 35%, rgba(165, 212, 228, 1) 100%); + -webkit-background-clip: text; + //width: 20%; + margin: 0 0 0 auto; + overflow-wrap: break-word; + box-sizing: border-box; + //background: rgba(255, 255, 255, 0.175); + border-radius: 7px; + padding: 0.2em 0.5em 0.2em 0.5em; + font-size: 115%; + width: 50%; + text-align: left; + //font-family: WebgalUI, serif; + letter-spacing: 0.1em; +} + +.backlog_item_content { + //display: flex; + font-size: 115%; + width: 82.5%; + box-sizing: border-box; + padding: 0.2em 0 0 1em; + //font-family: WebgalUI, serif; + letter-spacing: 0.05em; +} + +.backlog_item_button_list { + display: flex; + //padding: 0 2em 0 0.3em; + flex-flow: row; + align-items: flex-start; + margin: 0.35em 0 0 0; +} + +.backlog_item_button_element { + cursor: pointer; + padding: 0.01em 0.75em 0 0.75em; + margin: 0 0 0 0.5em; + background: rgba(255, 255, 255, 0.075); + border-radius: 7px; + display: flex; + //border: 1px solid rgba(255, 255, 255, 0.15); + //box-shadow: 0 0 15px rgba(255, 255, 255, 0.25); +} + +.backlog_item_button_element:hover { + background: rgba(255, 255, 255, 0.25); + //border: 1px solid rgba(255, 255, 255, 0); + //box-shadow: 0 0 15px rgba(255, 255, 255, 0.3); +} + + +.backlog_item_content_text { + //width: 80%; + box-sizing: border-box; +} + + +@keyframes backlog_soft_in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes backlog_soft_out { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes backlog_item_in { + 0% { + opacity: 0; + transform: scale(1.05, 1.05) translate(-15px, 10px) rotateX(-5deg) rotateY(-5deg); + //background-color: rgba(255, 255, 255, 0.2); + } + 100% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } +} + +@keyframes backlog_item_out { + 0% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } + 100% { + opacity: 0; + transform: scale(1.05, 1.05) translate(-15px, 10px) rotateX(-5deg) rotateY(-5deg); + background-color: rgba(255, 255, 255, 0.2); + } +} diff --git a/packages/webgal/src/UI/BottomControlPanel/BottomControlPanel.tsx b/packages/webgal/src/UI/BottomControlPanel/BottomControlPanel.tsx new file mode 100644 index 000000000..d60325bb9 --- /dev/null +++ b/packages/webgal/src/UI/BottomControlPanel/BottomControlPanel.tsx @@ -0,0 +1,320 @@ +import { + AlignTextLeftOne, + DoubleRight, + FolderOpen, + Home, + PlayOne, + PreviewCloseOne, + PreviewOpen, + ReplayMusic, + Save, + SettingTwo, + DoubleDown, + DoubleUp, + Lock, + Unlock, +} from '@icon-park/react'; +import styles from './bottomControlPanel.module.scss'; +import { switchAuto } from '@/Core/controller/gamePlay/autoPlay'; +import { switchFast } from '@/Core/controller/gamePlay/fastSkip'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { setMenuPanelTag, setVisibility } from '@/store/GUIReducer'; +import { componentsVisibility, MenuPanelTag } from '@/store/guiInterface'; +import { backToTitle } from '@/Core/controller/gamePlay/backToTitle'; +import { saveGame } from '@/Core/controller/storage/saveGame'; +import { loadGame } from '@/Core/controller/storage/loadGame'; +import useTrans from '@/hooks/useTrans'; +import { useTranslation } from 'react-i18next'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import { showGlogalDialog, switchControls } from '@/UI/GlobalDialog/GlobalDialog'; +import { useEffect } from 'react'; +import { getSavesFromStorage } from '@/Core/controller/storage/savesController'; + +export const BottomControlPanel = () => { + const t = useTrans('gaming.'); + const strokeWidth = 2.5; + const { i18n } = useTranslation(); + const { playSeEnter, playSeClick, playSeDialogOpen } = useSoundEffect(); + const lang = i18n.language; + const isFr = lang === 'fr'; + let size = 42; + let fontSize = '150%'; + if (isFr) { + fontSize = '125%'; + size = 40; + } + const GUIStore = useSelector((state: RootState) => state.GUI); + const stageState = useSelector((state: RootState) => state.stage); + const dispatch = useDispatch(); + const setComponentVisibility = (component: keyof componentsVisibility, visibility: boolean) => { + dispatch(setVisibility({ component, visibility })); + }; + const setMenuPanel = (menuPanel: MenuPanelTag) => { + dispatch(setMenuPanelTag(menuPanel)); + }; + + const saveData = useSelector((state: RootState) => state.saveData.saveData); + let fastSlPreview = ( + <div style={{ height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' }}> + <div style={{ fontSize: '125%' }}>{t('noSaving')}</div> + </div> + ); + if (saveData[0]) { + const data = saveData[0]; + fastSlPreview = ( + <div className={styles.slPreviewMain}> + <div className={styles.imgContainer}> + <img style={{ height: '100%' }} alt="q-save-preview image" src={data.previewImage} /> + </div> + <div className={styles.textContainer}> + <div>{data.nowStageState.showName}</div> + <div style={{ fontSize: '75%', color: 'rgb(55,60,56)' }}>{data.nowStageState.showText}</div> + </div> + </div> + ); + } + + return ( + // <div className={styles.ToCenter}> + <> + {GUIStore.showTextBox && stageState.enableFilm === '' && ( + <div className={styles.main} style={{ visibility: GUIStore.controlsVisibility ? 'visible' : 'hidden' }}> + {GUIStore.showTextBox && ( + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + setComponentVisibility('showTextBox', false); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <PreviewCloseOne + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.hide')}</span> + </span> + )} + {!GUIStore.showTextBox && ( + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + setComponentVisibility('showTextBox', true); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <PreviewOpen + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.show')}</span> + </span> + )} + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + setComponentVisibility('showBacklog', true); + setComponentVisibility('showTextBox', false); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <AlignTextLeftOne + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.backlog')}</span> + </span> + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + let VocalControl: any = document.getElementById('currentVocal'); + if (VocalControl !== null) { + VocalControl.currentTime = 0; + VocalControl.pause(); + VocalControl?.play(); + } + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <ReplayMusic + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.replay')}</span> + </span> + <span + id="Button_ControlPanel_auto" + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + switchAuto(); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <PlayOne className={styles.button} theme="outline" size={size} fill="#f5f5f7" strokeWidth={strokeWidth} /> + <span className={styles.button_text}>{t('buttons.auto')}</span> + </span> + <span + id="Button_ControlPanel_fast" + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + switchFast(); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <DoubleRight + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.forward')}</span> + </span> + <span + className={styles.singleButton + ' ' + styles.fastsave} + style={{ fontSize }} + onClick={() => { + saveGame(0); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <DoubleDown + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.quicklySave')}</span> + <div className={styles.fastSlPreview + ' ' + styles.fastSPreview}>{fastSlPreview}</div> + </span> + <span + className={styles.singleButton + ' ' + styles.fastload} + style={{ fontSize }} + onClick={() => { + loadGame(0); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <DoubleUp className={styles.button} theme="outline" size={size} fill="#f5f5f7" strokeWidth={strokeWidth} /> + <span className={styles.button_text}>{t('buttons.quicklyLoad')}</span> + <div className={styles.fastSlPreview + ' ' + styles.fastLPreview}>{fastSlPreview}</div> + </span> + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + setMenuPanel(MenuPanelTag.Save); + setComponentVisibility('showMenuPanel', true); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <Save className={styles.button} theme="outline" size={size} fill="#f5f5f7" strokeWidth={strokeWidth} /> + <span className={styles.button_text}>{t('buttons.save')}</span> + </span> + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + setMenuPanel(MenuPanelTag.Load); + setComponentVisibility('showMenuPanel', true); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <FolderOpen + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.load')}</span> + </span> + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + setMenuPanel(MenuPanelTag.Option); + setComponentVisibility('showMenuPanel', true); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <SettingTwo + className={styles.button} + theme="outline" + size={size} + fill="#f5f5f7" + strokeWidth={strokeWidth} + /> + <span className={styles.button_text}>{t('buttons.options')}</span> + </span> + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + playSeDialogOpen(); + showGlogalDialog({ + title: t('buttons.titleTips'), + leftText: t('$common.yes'), + rightText: t('$common.no'), + leftFunc: () => { + backToTitle(); + }, + rightFunc: () => {}, + }); + }} + onMouseEnter={playSeEnter} + > + <Home className={styles.button} theme="outline" size={size} fill="#f5f5f7" strokeWidth={strokeWidth} /> + <span className={styles.button_text}>{t('buttons.title')}</span> + </span> + <span + className={styles.singleButton} + style={{ fontSize }} + onClick={() => { + switchControls(); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + {GUIStore.showControls ? ( + <Lock className={styles.button} theme="outline" size={size} fill="#f5f5f7" strokeWidth={strokeWidth} /> + ) : ( + <Unlock className={styles.button} theme="outline" size={size} fill="#f5f5f7" strokeWidth={strokeWidth} /> + )} + </span> + </div> + )} + </> + // </div> + ); +}; diff --git a/packages/webgal/src/UI/BottomControlPanel/BottomControlPanelFilm.tsx b/packages/webgal/src/UI/BottomControlPanel/BottomControlPanelFilm.tsx new file mode 100644 index 000000000..b6ed7b2e4 --- /dev/null +++ b/packages/webgal/src/UI/BottomControlPanel/BottomControlPanelFilm.tsx @@ -0,0 +1,125 @@ +import styles from './bottomControlPanelFilm.module.scss'; +import { switchAuto } from '@/Core/controller/gamePlay/autoPlay'; +import { switchFast } from '@/Core/controller/gamePlay/fastSkip'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { setMenuPanelTag, setVisibility } from '@/store/GUIReducer'; +import { componentsVisibility, MenuPanelTag } from '@/store/guiInterface'; +import { backToTitle } from '@/Core/controller/gamePlay/backToTitle'; +import { useValue } from '@/hooks/useValue'; +import { HamburgerButton } from '@icon-park/react'; + +export const BottomControlPanelFilm = () => { + const showPanel = useValue(false); + const stageState = useSelector((state: RootState) => state.stage); + const dispatch = useDispatch(); + const setComponentVisibility = (component: keyof componentsVisibility, visibility: boolean) => { + dispatch(setVisibility({ component, visibility })); + }; + const setMenuPanel = (menuPanel: MenuPanelTag) => { + dispatch(setMenuPanelTag(menuPanel)); + }; + return ( + <> + {stageState.enableFilm !== '' && ( + <> + <div + className={styles.tag} + onClick={() => { + showPanel.set(!showPanel.value); + }} + > + <HamburgerButton theme="outline" size="32" fill="#fff" /> + </div> + {showPanel.value && ( + <div className={styles.container}> + <span + className={styles.singleButton} + onClick={() => { + setComponentVisibility('showBacklog', true); + setComponentVisibility('showTextBox', false); + showPanel.set(!showPanel.value); + }} + > + <span className={styles.button_text}>剧情回想 / BACKLOG</span> + </span> + <span + className={styles.singleButton} + onClick={() => { + showPanel.set(!showPanel.value); + let VocalControl: any = document.getElementById('currentVocal'); + if (VocalControl !== null) { + VocalControl.currentTime = 0; + VocalControl.pause(); + VocalControl?.play(); + } + }} + > + <span className={styles.button_text}>重播语音 / REPLAY VOICE</span> + </span> + <span + id="Button_ControlPanel_auto" + className={styles.singleButton} + onClick={() => { + switchAuto(); + showPanel.set(!showPanel.value); + }} + > + <span className={styles.button_text}>自动模式 / AUTO</span> + </span> + <span + id="Button_ControlPanel_fast" + className={styles.singleButton} + onClick={() => { + switchFast(); + showPanel.set(!showPanel.value); + }} + > + <span className={styles.button_text}>快进 / FAST</span> + </span> + <span + className={styles.singleButton} + onClick={() => { + showPanel.set(!showPanel.value); + setMenuPanel(MenuPanelTag.Save); + setComponentVisibility('showMenuPanel', true); + }} + > + <span className={styles.button_text}>存档 / SAVE</span> + </span> + <span + className={styles.singleButton} + onClick={() => { + showPanel.set(!showPanel.value); + setMenuPanel(MenuPanelTag.Load); + setComponentVisibility('showMenuPanel', true); + }} + > + <span className={styles.button_text}>读档 / LOAD</span> + </span> + <span + className={styles.singleButton} + onClick={() => { + showPanel.set(!showPanel.value); + setMenuPanel(MenuPanelTag.Option); + setComponentVisibility('showMenuPanel', true); + }} + > + <span className={styles.button_text}>选项 / OPTIONS</span> + </span> + <span + className={styles.singleButton} + onClick={() => { + showPanel.set(!showPanel.value); + backToTitle(); + }} + > + <span className={styles.button_text}>标题 / TITLE</span> + </span> + </div> + )} + </> + )} + </> + ); +}; diff --git a/packages/webgal/src/UI/BottomControlPanel/bottomControlPanel.module.scss b/packages/webgal/src/UI/BottomControlPanel/bottomControlPanel.module.scss new file mode 100644 index 000000000..e790bc398 --- /dev/null +++ b/packages/webgal/src/UI/BottomControlPanel/bottomControlPanel.module.scss @@ -0,0 +1,128 @@ +//.ToCenter { +// display: flex; +// justify-content: center; +// position: absolute; +// bottom: 0; +// left: 0; +// width: 100%; +// z-index: 9; +//} + +.main { + //border-bottom: 2px solid rgba(255,255,255,0.25); + position: absolute; + bottom: 20px; + //will-change: z-index; + z-index: 9; + display: flex; + //background-image: linear-gradient(rgba(245, 247, 250, 0.7) 0%, rgba(195, 207, 226, 0.7) 100%); + flex-flow: row; + justify-content: center; + align-items: center; + //width: 100%; + height: 70px; + right: 20px; + border-radius: 35px; + //backdrop-filter: blur(5px); + padding: 0.15em 1.75em 0.15em 1.75em; + //background: linear-gradient(rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 100%); + //border-radius: 10px; + font-size: 80%; +} + +.button { + position: relative; + top: 2px; + padding: 0 0 0 0; + filter: drop-shadow(1px 1px 5px rgba(0, 0, 0, 1)); +} + +.button_text { + position: relative; + bottom: 8px; + color: white; + text-shadow: 1px 1px 5px rgba(0, 0, 0, 1); + padding-left: 3px; +} + +.button_on { + height: 100%; + display: inline-block; + font-size: 150%; + padding: 0.25em 0.3em 0 0.15em; + transition: background-color 0.5s; + background: rgba(255, 255, 255, 0.3); + border-radius: 4px; + margin: 0 0.1em 0 0.1em; +} + +.singleButton { + //border-bottom: 1px solid rgba(255, 255, 255, 0.5); + height: 100%; + display: inline-block; + color: white; + font-size: 150%; + padding: 0.3em 0.3em 0 0.15em; + transition: background-color 0.5s; + cursor: pointer; + border-radius: 4px; + margin: 0 0.1em 0 0.1em; + position: relative; +} + +.singleButton:hover { + background-color: rgba(255, 255, 255, 0.3); +} + +.fastSlPreview { + position: absolute; + top: -250px; + right: 0; + background: linear-gradient(315deg, rgba(253, 251, 251, 0.9) 0%, rgba(235, 237, 238, 0.85) 100%); + width: 900px; + height: 230px; + color: #005caf; + border-radius: 5px; + display: none; + animation: fastSlEnter 0.33s; + transition: opacity 0.33s; +} + +.fastsave:hover .fastSPreview { + display: block; +} + +.fastload:hover .fastLPreview { + display: block; +} + +@keyframes fastSlEnter { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +.slPreviewMain { + padding: 0.5em 0.5em 0.5em 0.5em; + display: flex; + box-sizing: border-box; + height: 100%; + width: 100%; +} + +.imgContainer { + display: flex; + overflow: hidden; + border-radius: 5px; + //outline: 4px solid #005caf; + flex-shrink: 0; + height: 100%; +} + +.textContainer { + overflow: hidden; + padding: 0 0 0 0.5em; +} diff --git a/packages/webgal/src/UI/BottomControlPanel/bottomControlPanelFilm.module.scss b/packages/webgal/src/UI/BottomControlPanel/bottomControlPanelFilm.module.scss new file mode 100644 index 000000000..541765e54 --- /dev/null +++ b/packages/webgal/src/UI/BottomControlPanel/bottomControlPanelFilm.module.scss @@ -0,0 +1,54 @@ +.tag { + position: absolute; + top: 2.5%; + left: 2.5%; + color: white; + z-index: 10; + padding: 10px 10px 5px 10px; + border-radius: 100px; + transition: background-color 0.33s; +} + +.tag:hover { + background-color: rgba(255, 255, 255, 0.5); +} + +.container { + color: white; + position: absolute; + top: 0; + width: 100%; + height: 100%; + display: flex; + flex-flow: column; + background-color: rgba(0, 0, 0, 0.7); + z-index: 9; + padding: 7em 5em 5em 10em; + opacity: 0; + animation: showContainer 1s forwards; + transition: background-color 0.33s; +} + +.singleButton { + padding: 0.5em 0 0.5em 0; +} + +.button_text { + font-family: "思源宋体", serif; + font-size: 250%; + letter-spacing: 0.07em; + transition: text-shadow 0.33s; +} + +.button_text:hover { + text-shadow: 0 0 15px rgba(255, 255, 255, 1); +} + +@keyframes showContainer { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/packages/webgal/src/UI/DevPanel/DevPanel.tsx b/packages/webgal/src/UI/DevPanel/DevPanel.tsx new file mode 100644 index 000000000..d47c2d112 --- /dev/null +++ b/packages/webgal/src/UI/DevPanel/DevPanel.tsx @@ -0,0 +1,61 @@ +import styles from './devPanel.module.scss'; +import { useValue } from '@/hooks/useValue'; +import { getPixiSscreenshot } from '@/UI/DevPanel/devFunctions/getPixiSscreenshot'; +import { useEffect } from 'react'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { useTranslation } from 'react-i18next'; + +import { WebGAL } from '@/Core/WebGAL'; + +export default function DevPanel() { + // 控制显隐 + function isShowDevPanel() { + const hash = window.location.hash; + return !!hash.match(/dev/); + } + const isOpenDevPanel = useValue(false); + const hash = useValue(window.location.hash); + const stageState = useSelector((state: RootState) => state.stage); + useEffect(() => { + window.onhashchange = () => { + hash.set(window.location.hash); + }; + }, []); + const isShow = isShowDevPanel(); + + const { t, i18n } = useTranslation(); + + const devMainArea = ( + <> + <div onClick={() => getPixiSscreenshot()}>Save PIXI Screenshot</div> + <div>Current Language:{i18n.language}</div> + <div onClick={() => WebGAL.gameplay.pixiStage?.removeAnimation('snow-Ticker')}>Remove Snow Ticker</div> + <div>Stage State</div> + <div>{JSON.stringify(stageState, null, ' ')}</div> + </> + ); + return ( + <> + {isShow && isOpenDevPanel.value && ( + <div className={styles.devPanelMain}> + <div style={{ display: 'flex', alignItems: 'center' }}> + <div + onClick={() => isOpenDevPanel.set(false)} + style={{ fontSize: '150%', padding: '0 0 0 15px', cursor: 'pointer' }} + > + × + </div> + <div style={{ padding: '0 0 0 15px', fontSize: '115%' }}>WebGAL DEV PANEL</div> + </div> + <div style={{ padding: '10px 10px 10px 10px', overflow: 'auto' }}>{devMainArea}</div> + </div> + )} + {!isOpenDevPanel.value && isShow && ( + <div onClick={() => isOpenDevPanel.set(true)} className={styles.devPanelOpener}> + Open Dev Panel + </div> + )} + </> + ); +} diff --git a/packages/webgal/src/UI/DevPanel/devFunctions/getPixiSscreenshot.ts b/packages/webgal/src/UI/DevPanel/devFunctions/getPixiSscreenshot.ts new file mode 100644 index 000000000..f1361c3a0 --- /dev/null +++ b/packages/webgal/src/UI/DevPanel/devFunctions/getPixiSscreenshot.ts @@ -0,0 +1,13 @@ +export function getPixiSscreenshot() { + const canvas: HTMLCanvasElement = document.getElementById('pixiCanvas')! as HTMLCanvasElement; + canvas.toBlob((b) => { + if (b) { + const a = document.createElement('a'); + document.body.append(a); + a.download = 'screenshot'; + a.href = URL.createObjectURL(b); + a.click(); + a.remove(); + } + }, 'image/png'); +} diff --git a/packages/webgal/src/UI/DevPanel/devPanel.module.scss b/packages/webgal/src/UI/DevPanel/devPanel.module.scss new file mode 100644 index 000000000..a5fa4d350 --- /dev/null +++ b/packages/webgal/src/UI/DevPanel/devPanel.module.scss @@ -0,0 +1,22 @@ +.devPanelMain { + font-size: 150%; + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 35%; + background: rgba(255, 255, 255, 0.75); + z-index: 99; + overflow: auto; +} + +.devPanelOpener { + position: absolute; + right: 5px; + top: 5px; + background: rgba(255, 255, 255, 0.75); + z-index: 100; + padding: 3px 7px 3px 7px; + border-radius: 4px; + cursor: pointer; +} diff --git a/packages/webgal/src/UI/Extra/Extra.tsx b/packages/webgal/src/UI/Extra/Extra.tsx new file mode 100644 index 000000000..8a544eb3b --- /dev/null +++ b/packages/webgal/src/UI/Extra/Extra.tsx @@ -0,0 +1,44 @@ +import styles from './extra.module.scss'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { setVisibility } from '@/store/GUIReducer'; +import { CloseSmall } from '@icon-park/react'; +import { ExtraBgm } from '@/UI/Extra/ExtraBgm'; +import { ExtraCg } from './ExtraCg'; +import useTrans from '@/hooks/useTrans'; +import useSoundEffect from '@/hooks/useSoundEffect'; + +export function Extra() { + const { playSeClick } = useSoundEffect(); + const showExtra = useSelector((state: RootState) => state.GUI.showExtra); + const dispatch = useDispatch(); + + const t = useTrans('extra.'); + return ( + <> + {showExtra && ( + <div className={styles.extra}> + <div className={styles.extra_top}> + <CloseSmall + className={styles.extra_top_icon} + onClick={() => { + dispatch(setVisibility({ component: 'showExtra', visibility: false })); + playSeClick(); + }} + onMouseEnter={playSeClick} + theme="outline" + size="4em" + fill="#fff" + strokeWidth={3} + /> + <div className={styles.extra_title}>{t('title')}</div> + </div> + <div className={styles.mainContainer}> + <ExtraCg /> + <ExtraBgm /> + </div> + </div> + )} + </> + ); +} diff --git a/packages/webgal/src/UI/Extra/ExtraBgm.tsx b/packages/webgal/src/UI/Extra/ExtraBgm.tsx new file mode 100644 index 000000000..49d189d73 --- /dev/null +++ b/packages/webgal/src/UI/Extra/ExtraBgm.tsx @@ -0,0 +1,134 @@ +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import React from 'react'; +import styles from '@/UI/Extra/extra.module.scss'; +import { useValue } from '@/hooks/useValue'; +import { setStage } from '@/store/stageReducer'; +import { GoEnd, GoStart, MusicList, PlayOne, SquareSmall } from '@icon-park/react'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import { setGuiAsset } from '@/store/GUIReducer'; + +export function ExtraBgm() { + const { playSeClick, playSeEnter } = useSoundEffect(); + // 检查当前正在播放的bgm是否在bgm列表内 + const currentBgmSrc = useSelector((state: RootState) => state.GUI.titleBgm); + const extraState = useSelector((state: RootState) => state.userData.appreciationData); + const initName = 'Title_BGM'; + // 是否展示 bgm 列表 + const isShowBgmList = useValue(false); + let foundCurrentBgmName = initName; + let foundCurrentBgmIndex = -1; + const iconSize = 39; + const bgmPlayerHeight = isShowBgmList.value ? '80%' : '10%'; + const bgmListLen = extraState.bgm.length; + extraState.bgm.forEach((e, i) => { + if (e.url === currentBgmSrc) { + foundCurrentBgmName = e.name; + foundCurrentBgmIndex = i; + } + }); + const currentPlayingBgmName = useValue(''); + if (foundCurrentBgmName !== initName && foundCurrentBgmName !== currentPlayingBgmName.value) { + currentPlayingBgmName.set(foundCurrentBgmName); + } + const dispatch = useDispatch(); + + function setBgmByIndex(index: number) { + const e = extraState.bgm[index]; + currentPlayingBgmName.set(e.name); + dispatch(setGuiAsset({ asset: 'titleBgm', value: e.url })); + } + + const showBgmList = extraState.bgm.map((e, i) => { + let className = styles.bgmElement; + if (e.name === currentPlayingBgmName.value) { + className = className + ' ' + styles.bgmElement_active; + } + return ( + <div + onClick={() => { + playSeClick(); + currentPlayingBgmName.set(e.name); + dispatch(setGuiAsset({ asset: 'titleBgm', value: e.url })); + }} + key={e.name} + className={className} + style={{ + animationDelay: `${i * 150}ms`, + }} + onMouseEnter={playSeEnter} + > + {e.name} + </div> + ); + }); + return ( + <div className={styles.bgmContainer} style={{ maxHeight: bgmPlayerHeight }}> + <div className={styles.bgmPlayerMain}> + <div + onClick={() => { + playSeClick(); + if (foundCurrentBgmIndex <= 0) { + setBgmByIndex(bgmListLen - 1); + } else { + setBgmByIndex(foundCurrentBgmIndex - 1); + } + }} + onMouseEnter={playSeEnter} + className={styles.bgmControlButton} + > + <GoStart theme="filled" size={iconSize} fill="#fff" strokeWidth={3} strokeLinejoin="miter" /> + </div> + <div + onClick={() => { + playSeClick(); + const bgmControl: HTMLAudioElement = document.getElementById('currentBgm') as HTMLAudioElement; + bgmControl?.play().then(); + }} + onMouseEnter={playSeEnter} + className={styles.bgmControlButton} + > + <PlayOne theme="filled" size={iconSize} fill="#fff" strokeWidth={3} strokeLinejoin="miter" /> + </div> + <div + onClick={() => { + playSeClick(); + if (foundCurrentBgmIndex >= bgmListLen - 1) { + setBgmByIndex(0); + } else { + setBgmByIndex(foundCurrentBgmIndex + 1); + } + }} + onMouseEnter={playSeEnter} + className={styles.bgmControlButton} + > + <GoEnd theme="filled" size={iconSize} fill="#fff" strokeWidth={3} strokeLinejoin="miter" /> + </div> + <div + onClick={() => { + playSeClick(); + const bgmControl: HTMLAudioElement = document.getElementById('currentBgm') as HTMLAudioElement; + bgmControl.pause(); + }} + onMouseEnter={playSeEnter} + className={styles.bgmControlButton} + > + <SquareSmall theme="filled" size={iconSize} fill="#fff" strokeWidth={3} strokeLinejoin="miter" /> + </div> + <div className={styles.bgmName}>{foundCurrentBgmName}</div> + <div + onClick={() => { + playSeClick(); + isShowBgmList.set(!isShowBgmList.value); + }} + onMouseEnter={playSeEnter} + className={styles.bgmControlButton} + style={{ marginLeft: 'auto' }} + > + <MusicList theme="filled" size={iconSize} fill="#fff" strokeWidth={3} strokeLinejoin="miter" /> + </div> + </div> + {isShowBgmList.value && <div className={styles.bgmListContainer}> {showBgmList}</div>} + </div> + ); +} diff --git a/packages/webgal/src/UI/Extra/ExtraCg.tsx b/packages/webgal/src/UI/Extra/ExtraCg.tsx new file mode 100644 index 000000000..3f1ebac5e --- /dev/null +++ b/packages/webgal/src/UI/Extra/ExtraCg.tsx @@ -0,0 +1,75 @@ +import styles from '@/UI/Extra/extra.module.scss'; +import React from 'react'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { useValue } from '@/hooks/useValue'; +import './extraCG_animation_List.scss'; +import { ExtraCgElement } from '@/UI/Extra/ExtraCgElement'; +import useSoundEffect from '@/hooks/useSoundEffect'; + +export function ExtraCg() { + const cgPerPage = 8; + const extraState = useSelector((state: RootState) => state.userData.appreciationData); + const pageNumber = Math.ceil(extraState.cg.length / cgPerPage); + // const pageNumber = 10; + const currentPage = useValue(1); + const { playSeEnter, playSeClick } = useSoundEffect(); + + // 开始生成立绘鉴赏的图片 + const showCgList = []; + const len = extraState.cg.length; + for ( + let i = (currentPage.value - 1) * cgPerPage; + i < Math.min(len, (currentPage.value - 1) * cgPerPage + cgPerPage); + i++ + ) { + const index = i - (currentPage.value - 1) * cgPerPage; + const deg = Random(-5, 5); + const temp = ( + <ExtraCgElement + name={extraState.cg[i].name} + imgUrl={extraState.cg[i].url} + transformDeg={deg} + index={index} + key={index.toString() + extraState.cg[i].url} + /> + ); + showCgList.push(temp); + } + + // 生成cg鉴赏的导航 + const showNav = []; + for (let i = 1; i <= pageNumber; i++) { + let className = styles.cgNav; + if (currentPage.value === i) { + className = className + ' ' + styles.cgNav_active; + } + const temp = ( + <div + onClick={() => { + currentPage.set(i); + playSeClick(); + }} + key={'nav' + i} + onMouseEnter={playSeEnter} + className={className} + > + {i} + </div> + ); + showNav.push(temp); + } + + return ( + <div className={styles.cgMain}> + <div className={styles.cgShowDiv}> + <div className={styles.cgShowDivWarpper}>{showNav}</div> + </div> + <div className={styles.cgContainer}>{showCgList}</div> + </div> + ); +} + +function Random(min: number, max: number) { + return Math.round(Math.random() * (max - min)) + min; +} diff --git a/packages/webgal/src/UI/Extra/ExtraCgElement.tsx b/packages/webgal/src/UI/Extra/ExtraCgElement.tsx new file mode 100644 index 000000000..473539e36 --- /dev/null +++ b/packages/webgal/src/UI/Extra/ExtraCgElement.tsx @@ -0,0 +1,65 @@ +import { useValue } from '@/hooks/useValue'; +import styles from '@/UI/Extra/extra.module.scss'; +import React from 'react'; +import useSoundEffect from '@/hooks/useSoundEffect'; + +interface IProps { + name: string; + imgUrl: string; + transformDeg: number; + index: number; +} + +export function ExtraCgElement(props: IProps) { + const showFull = useValue(false); + const { playSeEnter, playSeClick } = useSoundEffect(); + return ( + <> + {showFull.value && ( + <div + onClick={() => { + showFull.set(!showFull.value); + playSeClick(); + }} + className={styles.showFullContainer} + onMouseEnter={playSeEnter} + > + <div className={styles.showFullCgMain}> + <div + style={{ + backgroundImage: `url('${props.imgUrl}')`, + backgroundSize: `cover`, + backgroundPosition: 'center', + width: '100%', + height: '100%', + }} + /> + </div> + </div> + )} + <div + onClick={() => { + showFull.set(!showFull.value); + playSeClick(); + }} + onMouseEnter={playSeEnter} + style={{ + // transform: `rotate(${deg}deg)`, + animation: `cg_softIn_${props.transformDeg} 1.5s ease-out ${100 + props.index * 100}ms forwards `, + }} + key={props.name} + className={styles.cgElement} + > + <div + style={{ + backgroundImage: `url('${props.imgUrl}')`, + backgroundSize: `cover`, + backgroundPosition: 'center', + width: '100%', + height: '100%', + }} + /> + </div> + </> + ); +} diff --git a/packages/webgal/src/UI/Extra/extra.module.scss b/packages/webgal/src/UI/Extra/extra.module.scss new file mode 100644 index 000000000..c50c8c7eb --- /dev/null +++ b/packages/webgal/src/UI/Extra/extra.module.scss @@ -0,0 +1,279 @@ +.extra { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 14; + background-image: linear-gradient(135deg, #93a5cf 0%, #e4efe9 100%);; + padding: 2em 2em 2em 2em; + box-sizing: border-box; +} + +.extra_top { + padding: 0 0 0 0; + display: flex; + height: 10%; +} + +.extra_top_icon { + padding: 0.6em 0.6em 0 0.6em; + border-radius: 1000px; + transform: translate(0, -13px); + cursor: pointer; +} + +.extra_top_icon:hover { + background: rgba(255, 255, 255, 0.25); + animation: extra_icon_softin 0.25s ease-out forwards; +} + +@keyframes extra_icon_softin { + 0% { + background: rgba(255, 255, 255, 0); + } + 100% { + background: rgba(0, 0, 0, 0.25); + } +} + + +.extra_title { + font-family: "思源宋体", serif; + height: 100%; + line-height: 100%; + font-size: 325%; + font-weight: bold; + color: transparent; + background: linear-gradient(150deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 75%, #51A8DD 100%); + -webkit-background-clip: text; +} + +.mainContainer { + box-sizing: border-box; + padding: 0 2em 0 2em; + display: flex; + height: 92%; + flex-flow: column; +} + +.bgmContainer { + left: 50px; + right: 50px; + bottom: 30px; + position: absolute; + overflow: auto; + //width: 100%; + //height: 70%; + box-sizing: border-box; + display: flex; + flex-flow: column-reverse; + align-content: center; + background-image: linear-gradient(315deg, rgba(163, 189, 237, 0.95) 0%, rgba(105, 145, 199, 0.95) 100%); + padding: 1em 2em 1em 2em; + border-radius: 4px; + transition: max-height 0.5s; + z-index: 2; +} + +.bgmListContainer { + z-index: 2; + bottom: 0; + //overflow: hidden; + width: 100%; + box-sizing: border-box; + display: flex; + flex: 1; + flex-flow: row; + justify-content: flex-start; + align-items: flex-start; + margin: 0 0 15px 0; + flex-wrap: wrap; + overflow: auto; +} + +.bgmPlayerMain { + display: flex; +} + +.bgmControlButton { + padding: 0.6em 1.2em 0.2em 1.2em; + margin: 0 5px 0 5px; + box-sizing: border-box; + border-radius: 4px; + border: 1px solid rgba(255, 255, 255, 0.5); + cursor: pointer; + transition: background-color 0.33s, color 0.33s; + flex-shrink: 0; +} + +.bgmControlButton:hover { + box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.35); +} + +.bgmName { + color: rgba(255, 255, 255, 0.8); + font-family: "思源宋体", serif; + font-size: 155%; + margin: 5px 5px 0 15px; + overflow: hidden; +} + +.bgmElement { + font-family: "思源宋体", serif; + padding: 0.5em 1em 0.5em 1em; + overflow: hidden; + background-color: rgba(0, 0, 0, 0.1); + border-radius: 5px; + color: white; + font-size: 125%; + margin: 0.5em 1em 0.5em 0.5em; + transition: background-color 1s, color 1s; + opacity: 1; + //animation: bgmElement_In 0.5s forwards ease-out; + cursor: pointer; + width: 28%; + flex-shrink: 0; +} + +@keyframes bgmElement_In { + 0% { + opacity: 0.95; + //transform: translate(-50px, 0); + } + 100% { + opacity: 1; + } +} + +.bgmElement:hover { + background-color: rgba(255, 255, 255, 0.65); + color: #666; + transition: background-color 0.5s, color 0.5s; +} + +.bgmElement_active { + background-color: rgba(255, 255, 255, 0.85) !important; + color: #666; +} + +.cgMain { + width: 100%; + height: 88%; +} + +.cgContainer { + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: flex-start; + align-items: flex-start; + align-content: flex-start; + height: 90%; + box-sizing: border-box; + padding: 4em 0 0 2em; +} + +.cgElement { + width: 22.5%; + height: 37.5%; + background-color: rgba(255, 255, 255, 0.75); + box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.35); + box-sizing: border-box; + padding: 0.75em 0.75em 0.75em 0.75em; + opacity: 0; + margin: 1em 1em 1em 1em; + animation-delay: 100ms; + z-index: 1; + position: relative; + cursor: pointer; +} + +.cgShowDiv { + height: 8%; + width: 100%; + display: flex; + flex-flow: row; + justify-content: center; + align-items: flex-end; +} + +.cgShowDivWarpper { + display: flex; + flex-flow: row; + justify-content: center; + align-items: flex-end; + //background: rgba(255, 255, 255, 0.35); + border-radius: 7px; + padding: 12px 15px; +} + +.cgNav { + font-size: 170%; + //background-color: rgba(0, 0, 0, 0.2); + color: white; + padding: 0.12em 1em 0.12em 1em; + margin: 0 0.25em 0 0.25em; + //width: 20px; + text-align: center; + cursor: pointer; + transition: background-color 0.5s, color 0.5s, font-weight 0.5s; + border-radius: 7px; +} + +.cgNav:first-child { + margin-left: 0; +} + +.cgNav:last-child { + margin-right: 0; +} + +.cgNav_active { + background-color: rgba(0, 92, 175, 0.1) !important; + color: #005CAF; + font-weight: bold; +} + +.cgNav:hover { + background-color: rgba(0, 92, 175, 0.05); +} + + +.showFullContainer { + z-index: 13; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.1); + display: flex; + justify-content: center; + align-items: center; +} + +.showFullCgMain { + cursor: pointer; + width: 80%; + height: 80%; + box-sizing: border-box; + padding: 2em 2em 2em 2em; + background: rgba(255, 255, 255, 0.95); + animation: fullCgIn 0.5s ease-out forwards; + opacity: 0; +} + +$initialTransform: scale(1.05, 1.05) translate(-25px, -50px) rotateX(-10deg) rotateY(10deg); +$endTransform: scale(1, 1) translate3d(0, 0, 0); + +@keyframes fullCgIn { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform; + } +} diff --git a/packages/webgal/src/UI/Extra/extraCG_animation_List.scss b/packages/webgal/src/UI/Extra/extraCG_animation_List.scss new file mode 100644 index 000000000..21522f6a2 --- /dev/null +++ b/packages/webgal/src/UI/Extra/extraCG_animation_List.scss @@ -0,0 +1,123 @@ +$initialTransform: scale(1.15, 1.15) translate(-50px, -125px) rotateX(-25deg) rotateY(25deg); +$endTransform: scale(1, 1) translate3d(0, 0, 0); + +@keyframes cg_softIn_-5 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(-5deg); + } +} + +@keyframes cg_softIn_-4 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(-4deg); + } +} + +@keyframes cg_softIn_-3 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(-3deg); + } +} + +@keyframes cg_softIn_-2 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(-2deg); + } +} + +@keyframes cg_softIn_-1 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(-1deg); + } +} + +@keyframes cg_softIn_0 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(0); + } +} + +@keyframes cg_softIn_1 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(1deg); + } +} + +@keyframes cg_softIn_2 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(2deg); + } +} + +@keyframes cg_softIn_3 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(3deg); + } +} + +@keyframes cg_softIn_4 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(4deg); + } +} + +@keyframes cg_softIn_5 { + 0% { + opacity: 0; + transform: $initialTransform; + } + 100% { + opacity: 1; + transform: $endTransform + rotate(5deg); + } +} diff --git a/packages/webgal/src/UI/GlobalDialog/GlobalDialog.tsx b/packages/webgal/src/UI/GlobalDialog/GlobalDialog.tsx new file mode 100644 index 000000000..baaf12ac7 --- /dev/null +++ b/packages/webgal/src/UI/GlobalDialog/GlobalDialog.tsx @@ -0,0 +1,75 @@ +import styles from './globalDialog.module.scss'; +import ReactDOM from 'react-dom'; +import { useSelector } from 'react-redux'; +import { RootState, webgalStore } from '@/store/store'; +import { setVisibility } from '@/store/GUIReducer'; +import { useSEByWebgalStore } from '@/hooks/useSoundEffect'; + +export default function GlobalDialog() { + const isGlobalDialogShow = useSelector((state: RootState) => state.GUI.showGlobalDialog); + return <>{isGlobalDialogShow && <div id="globalDialogContainer" />}</>; +} + +interface IShowGlobalDialogProps { + title: string; + leftText: string; + rightText: string; + leftFunc: Function; + rightFunc: Function; +} + +export function showGlogalDialog(props: IShowGlobalDialogProps) { + const { playSeClick, playSeEnter } = useSEByWebgalStore(); + webgalStore.dispatch(setVisibility({ component: 'showGlobalDialog', visibility: true })); + const handleLeft = () => { + playSeClick(); + props.leftFunc(); + hideGlobalDialog(); + }; + const handleRight = () => { + playSeClick(); + props.rightFunc(); + hideGlobalDialog(); + }; + const renderElement = ( + <div className={styles.GlobalDialog_main}> + <div className={styles.glabalDialog_container}> + <div className={styles.glabalDialog_container_inner}> + <div className={styles.title}>{props.title}</div> + <div className={styles.button_list}> + <div className={styles.button} onClick={handleLeft} onMouseEnter={playSeEnter}> + {props.leftText} + </div> + <div className={styles.button} onClick={handleRight} onMouseEnter={playSeEnter}> + {props.rightText} + </div> + </div> + </div> + </div> + </div> + ); + setTimeout(() => { + // eslint-disable-next-line react/no-deprecated + ReactDOM.render(renderElement, document.getElementById('globalDialogContainer')); + }, 100); +} + +export function hideGlobalDialog() { + webgalStore.dispatch(setVisibility({ component: 'showGlobalDialog', visibility: false })); +} + +export function showControls() { + webgalStore.dispatch(setVisibility({ component: 'showControls', visibility: true })); +} + +export function hideControls() { + webgalStore.dispatch(setVisibility({ component: 'showControls', visibility: false })); +} + +export function switchControls() { + if (webgalStore.getState().GUI.showControls === true) { + hideControls(); + } else { + showControls(); + } +} diff --git a/packages/webgal/src/UI/GlobalDialog/globalDialog.module.scss b/packages/webgal/src/UI/GlobalDialog/globalDialog.module.scss new file mode 100644 index 000000000..206d4c785 --- /dev/null +++ b/packages/webgal/src/UI/GlobalDialog/globalDialog.module.scss @@ -0,0 +1,85 @@ +.GlobalDialog_main { + height: 100%; + width: 100%; + position: absolute; + z-index: 20; + background: rgba(15, 37, 64, 0.39); + color: white; + opacity: 0.5; + animation: showGlobalDialog 0.33s forwards; + display: flex; + justify-content: center; + align-items: center; + //font-family: "WebgalUI", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-family: "思源宋体", serif; +} + +.glabalDialog_container_inner { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-flow: column; + background: linear-gradient(to right, + rgba(0, 92, 175, 0) 0%, + rgba(0, 92, 175, 0.5) 33%, + rgba(0, 92, 175, 0.85) 50%, + rgba(0, 92, 175, 0.5) 66%, + rgba(0, 92, 175, 0) 100% + ); + padding: 1em 5em 1.5em 5em; +} + +.glabalDialog_container { + height: 20%; + width: 100%; + border-top: 4px solid; + border-bottom: 4px solid; + border-image: linear-gradient(to right, + rgba(255, 255, 255, 0.05) 0%, + rgba(255, 255, 255, 0.85) 33%, + rgba(255, 255, 255, 1) 50%, + rgba(255, 255, 255, 0.85) 66%, + rgba(255, 255, 255, 0.05) 100% + ) 1; + //padding: 1px 1px 1px 1px; +} + +.title { + font-size: 300%; + text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); +} + +.button_list { + display: flex; + margin: auto 0 0 0; +} + +.button { + font-size: 200%; + padding: 0.15em 1em 0.15em 1em; + margin: 0.2em 1em 0.2em 1em; + cursor: pointer; + transition: background-color 0.33s, color 0.33s, font-weight 0.33s, transform 0.33s; + text-shadow: 0 0 10px rgba(255, 255, 255, 1); + border-radius: 5px; + //background: rgba(0, 0, 0, 0.05); +} + +.button:hover { + font-weight: bold; + color: #005caf; + transform: scale(1.1, 1.1); + text-shadow: 0 0 15px rgba(0, 0, 0, 0); + background: rgba(255, 255, 255, 0.85); +} + +@keyframes showGlobalDialog { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/packages/webgal/src/UI/Logo/Logo.tsx b/packages/webgal/src/UI/Logo/Logo.tsx new file mode 100644 index 000000000..a1b3eb6b8 --- /dev/null +++ b/packages/webgal/src/UI/Logo/Logo.tsx @@ -0,0 +1,65 @@ +import { FC, useEffect, useRef } from 'react'; +import styles from './logo.module.scss'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { useValue } from '@/hooks/useValue'; + +/** + * 标识 + * @constructor + */ +const Logo: FC = () => { + const GUIState = useSelector((state: RootState) => state.GUI); + const logoImage = GUIState.logoImage; + const isEnterGame = GUIState.isEnterGame; + const currentLogoIndex = useValue(-1); + const currentTimeOutId = useValue<any>(-1); + const animationDuration = 5000; + + const nextImg = () => { + clearTimeout(currentTimeOutId.value); + if (currentLogoIndex.value < logoImage.length - 1) { + currentLogoIndex.set(currentLogoIndex.value + 1); + currentTimeOutId.set(setTimeout(nextImg, animationDuration)); + } else { + currentLogoIndex.set(-1); + } + }; + + useEffect(() => { + if (isEnterGame && logoImage.length > 0) { + /** + * 启动 Enter Logo + */ + currentLogoIndex.set(0); + currentTimeOutId.set(setTimeout(nextImg, animationDuration)); + } + }, [isEnterGame]); + + const currentLogoUrl = currentLogoIndex.value === -1 ? '' : logoImage[currentLogoIndex.value]; + return ( + <> + {currentLogoIndex.value !== -1 && ( + <div + key={currentLogoIndex.value + 'wh'} + className={ + styles.Logo_Back + ' ' + (currentLogoIndex.value === logoImage.length - 1 ? styles.animationActive : '') + } + style={{ + animationDuration: `${animationDuration}ms`, + }} + /> + )} + {currentLogoUrl !== '' && ( + <div + className={styles.Logo_main} + key={currentLogoIndex.value + 'bg'} + onClick={nextImg} + style={{ backgroundImage: `url("${currentLogoUrl}")`, animationDuration: `${animationDuration}ms` }} + /> + )} + </> + ); +}; + +export default Logo; diff --git a/packages/webgal/src/UI/Logo/logo.module.scss b/packages/webgal/src/UI/Logo/logo.module.scss new file mode 100644 index 000000000..4005385ee --- /dev/null +++ b/packages/webgal/src/UI/Logo/logo.module.scss @@ -0,0 +1,60 @@ +.Logo_main { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + animation: change-img-anim 5s forwards; + background-size: cover; + z-index: 14; +} +@keyframes change-img-anim { + 0%{ + opacity: 0; + } + 35%{ + opacity: 1; + } + 65%{ + opacity: 1; + } + 99%{ + opacity: 0; + } + 100%{ + opacity: 0; + display: none; + } +} +.Logo_Back { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + right: 0; + opacity: 1; + bottom: 0; + background-size: cover; + z-index: 14; + background: white; +} + +.animationActive{ + animation: fadeout 5s forwards; +} + +@keyframes fadeout { + 0%{ + opacity: 1; + } + 99%{ + opacity: 0; + } + 100%{ + opacity: 0; + display: none; + } +} diff --git a/packages/webgal/src/UI/Menu/Menu.tsx b/packages/webgal/src/UI/Menu/Menu.tsx new file mode 100644 index 000000000..70e329f54 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Menu.tsx @@ -0,0 +1,45 @@ +import { FC } from 'react'; +import styles from './menu.module.scss'; +import { MenuPanel } from './MenuPanel/MenuPanel'; +import { Save } from './SaveAndLoad/Save/Save'; +import { Load } from './SaveAndLoad/Load/Load'; +import { Options } from './Options/Options'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { MenuPanelTag } from '@/store/guiInterface'; + +/** + * Menu 页面,包括存读档、选项等 + * @constructor + */ +const Menu: FC = () => { + const GUIState = useSelector((state: RootState) => state.GUI); + let currentTag; + // let menuBgColor = 'linear-gradient(135deg, rgba(253,251,251,0.95) 0%, rgba(235,237,238,1) 100%)'; + switch (GUIState.currentMenuTag) { + case MenuPanelTag.Save: + currentTag = <Save />; + // menuBgColor = 'linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%)'; + break; + case MenuPanelTag.Load: + currentTag = <Load />; + // menuBgColor = 'linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%)'; + break; + case MenuPanelTag.Option: + currentTag = <Options />; + // menuBgColor = 'linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%)'; + break; + } + return ( + <> + {GUIState.showMenuPanel && ( + <div className={styles.Menu_main}> + <div className={styles.Menu_TagContent}>{currentTag}</div> + <MenuPanel /> + </div> + )} + </> + ); +}; + +export default Menu; diff --git a/packages/webgal/src/UI/Menu/MenuPanel/MenuIconMap.tsx b/packages/webgal/src/UI/Menu/MenuPanel/MenuIconMap.tsx new file mode 100644 index 000000000..460c2d2f2 --- /dev/null +++ b/packages/webgal/src/UI/Menu/MenuPanel/MenuIconMap.tsx @@ -0,0 +1,32 @@ +import { IMenuPanel } from '@/UI/Menu/MenuPanel/menuPanelInterface'; +import { FolderOpen, Home, Logout, Save, SettingTwo } from '@icon-park/react'; + +/** + * 通过图标名称返回正确的图标 + * @param props + * @constructor + */ +export const MenuIconMap = (props: IMenuPanel) => { + let returnIcon; + switch (props.iconName) { + case 'save': + returnIcon = <Save theme="outline" size="1.2em" fill={props.iconColor} strokeWidth={2} />; + break; + case 'load': + returnIcon = <FolderOpen theme="outline" size="1.2em" fill={props.iconColor} strokeWidth={2} />; + break; + case 'option': + returnIcon = <SettingTwo theme="outline" size="1.2em" fill={props.iconColor} strokeWidth={2} />; + break; + case 'title': + returnIcon = <Home theme="outline" size="1.2em" fill={props.iconColor} strokeWidth={2} />; + break; + case 'exit': + returnIcon = <Logout theme="outline" size="1.2em" fill={props.iconColor} strokeWidth={2} />; + break; + default: + returnIcon = <div />; + } + + return returnIcon; +}; diff --git a/packages/webgal/src/UI/Menu/MenuPanel/MenuPanel.tsx b/packages/webgal/src/UI/Menu/MenuPanel/MenuPanel.tsx new file mode 100644 index 000000000..85e1100d6 --- /dev/null +++ b/packages/webgal/src/UI/Menu/MenuPanel/MenuPanel.tsx @@ -0,0 +1,116 @@ +import styles from './menuPanel.module.scss'; +import { MenuPanelButton } from './MenuPanelButton'; +import { playBgm } from '@/Core/controller/stage/playBgm'; +import { MenuPanelTag } from '@/store/guiInterface'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { setMenuPanelTag, setVisibility } from '@/store/GUIReducer'; +import { backToTitle } from '@/Core/controller/gamePlay/backToTitle'; +import useTrans from '@/hooks/useTrans'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import { showGlogalDialog } from '@/UI/GlobalDialog/GlobalDialog'; + +/** + * Menu页的底栏 + * @constructor + */ +export const MenuPanel = () => { + // 国际化 + const t = useTrans('menu.'); + + const { playSeClick, playSeDialogOpen, playSePageChange } = useSoundEffect(); + const GUIState = useSelector((state: RootState) => state.GUI); + const dispatch = useDispatch(); + // 设置Menu按钮的高亮 + const SaveTagOn = GUIState.currentMenuTag === MenuPanelTag.Save ? ` ${styles.MenuPanel_button_hl}` : ``; + const LoadTagOn = GUIState.currentMenuTag === MenuPanelTag.Load ? ` ${styles.MenuPanel_button_hl}` : ``; + const OptionTagOn = GUIState.currentMenuTag === MenuPanelTag.Option ? ` ${styles.MenuPanel_button_hl}` : ``; + + // 设置Menu按钮的颜色 + const SaveTagColor = GUIState.currentMenuTag === MenuPanelTag.Save ? `rgba(74, 34, 93, 0.9)` : `rgba(123,144,169,1)`; + const LoadTagColor = GUIState.currentMenuTag === MenuPanelTag.Load ? `rgba(11, 52, 110, 0.9)` : `rgba(123,144,169,1)`; + const OptionTagColor = + GUIState.currentMenuTag === MenuPanelTag.Option ? `rgba(81, 110, 65, 0.9)` : `rgba(123,144,169,1)`; + + // 设置Menu图标的颜色 + const SaveIconColor = GUIState.currentMenuTag === MenuPanelTag.Save ? `rgba(74, 34, 93, 0.9)` : `rgba(123,144,169,1)`; + const LoadIconColor = + GUIState.currentMenuTag === MenuPanelTag.Load ? `rgba(11, 52, 110, 0.9)` : `rgba(123,144,169,1)`; + const OptionIconColor = + GUIState.currentMenuTag === MenuPanelTag.Option ? `rgba(81, 110, 65, 0.9)` : `rgba(123,144,169,1)`; + + return ( + <div className={styles.MenuPanel_main}> + <MenuPanelButton + iconName="save" + buttonOnClassName={SaveTagOn} + iconColor={SaveIconColor} + tagColor={SaveTagColor} + clickFunc={() => { + playSePageChange(); + if (GUIState.showTitle) return; + dispatch(setMenuPanelTag(MenuPanelTag.Save)); + }} + tagName={t('saving.title')} + key="saveButton" + /> + <MenuPanelButton + iconName="load" + buttonOnClassName={LoadTagOn} + iconColor={LoadIconColor} + tagColor={LoadTagColor} + clickFunc={() => { + playSePageChange(); + dispatch(setMenuPanelTag(MenuPanelTag.Load)); + }} + tagName={t('loadSaving.title')} + key="loadButton" + /> + <MenuPanelButton + iconName="title" + iconColor="rgba(123,144,169,1)" + tagColor="rgba(123,144,169,1)" + clickFunc={() => { + playSeDialogOpen(); + showGlogalDialog({ + title: t('$gaming.buttons.titleTips'), + leftText: t('$common.yes'), + rightText: t('$common.no'), + leftFunc: () => { + backToTitle(); + dispatch(setVisibility({ component: 'showMenuPanel', visibility: false })); + }, + rightFunc: () => {}, + }); + }} + tagName={t('title.title')} + key="titleIcon" + /> + <MenuPanelButton + iconName="option" + style={{ marginLeft: 'auto' }} + buttonOnClassName={OptionTagOn} + iconColor={OptionIconColor} + tagColor={OptionTagColor} + clickFunc={() => { + playSePageChange(); + dispatch(setMenuPanelTag(MenuPanelTag.Option)); + }} + tagName={t('options.title')} + key="optionButton" + /> + + <MenuPanelButton + iconName="exit" + iconColor="rgba(123,144,169,1)" + tagColor="rgba(123,144,169,1)" + clickFunc={() => { + playSeClick(); + dispatch(setVisibility({ component: 'showMenuPanel', visibility: false })); + }} + tagName={t('exit.title')} + key="exitIcon" + /> + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/MenuPanel/MenuPanelButton.tsx b/packages/webgal/src/UI/Menu/MenuPanel/MenuPanelButton.tsx new file mode 100644 index 000000000..a8d47c11c --- /dev/null +++ b/packages/webgal/src/UI/Menu/MenuPanel/MenuPanelButton.tsx @@ -0,0 +1,33 @@ +import styles from './menuPanel.module.scss'; +import { MenuIconMap } from './MenuIconMap'; +import { IMenuPanel } from '@/UI/Menu/MenuPanel/menuPanelInterface'; +import useSoundEffect from '@/hooks/useSoundEffect'; + +/** + * 菜单标签页切换按钮 + * @param props + * @constructor + */ +export const MenuPanelButton = (props: IMenuPanel) => { + const { playSePageChange, playSeEnter } = useSoundEffect(); + let buttonClassName = styles.MenuPanel_button; + if (props.hasOwnProperty('buttonOnClassName')) { + buttonClassName = buttonClassName + props.buttonOnClassName; + } + return ( + <div + className={buttonClassName} + onClick={() => { + props.clickFunc(); + // playSePageChange(); + }} + onMouseEnter={playSeEnter} + style={{ ...props.style, color: props.tagColor }} + > + <div className={styles.MenuPanel_button_icon}> + <MenuIconMap iconName={props.iconName} iconColor={props.iconColor} /> + </div> + {props.tagName} + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/MenuPanel/menuPanel.module.scss b/packages/webgal/src/UI/Menu/MenuPanel/menuPanel.module.scss new file mode 100644 index 000000000..fc879cbc0 --- /dev/null +++ b/packages/webgal/src/UI/Menu/MenuPanel/menuPanel.module.scss @@ -0,0 +1,51 @@ +.MenuPanel_main { + width: 100%; + height: 10%; + display: flex; + justify-content: center; + align-items: center; + //background-color: rgba(255, 255, 255, 1); + //box-shadow: 0 0 45px 15px rgba(0, 0, 0, 0.05); + padding: 0 55px; +} + +.MenuPanel_button { + padding: 0.25em 15px 0 15px; + margin-right: 15px; + display: flex; + justify-content: center; + font-size: 200%; + text-align: center; + //font-weight: bold; + border-radius: 6px; + //width: 20%; + min-width: 12.5%; + cursor: pointer; + color: rgba(123,144,169, 1); + background: rgba(0, 0, 0, 0); + overflow: hidden; + //border-right: 1.5px solid rgba(0, 0, 0, 0.15); + transition: text-shadow 0.7s, background-color 0.7s; +} + +.MenuPanel_button:last-child{ + margin-right: 0; +} + +.MenuPanel_button:hover { + background-color: rgba(245, 246, 247, 0.15); +} + +.MenuPanel_button:last-child { + border-right: none; +} + +.MenuPanel_button_icon { + transform: translate(0, 0.125em); + padding: 0 0.15em 0 0; + margin: 0 0.15em 0 0; +} + +.MenuPanel_button_hl{ + background-color: rgba(245, 246, 247, 0.35) !important; +} diff --git a/packages/webgal/src/UI/Menu/MenuPanel/menuPanelInterface.ts b/packages/webgal/src/UI/Menu/MenuPanel/menuPanelInterface.ts new file mode 100644 index 000000000..9a38371cb --- /dev/null +++ b/packages/webgal/src/UI/Menu/MenuPanel/menuPanelInterface.ts @@ -0,0 +1,14 @@ +import { CSSProperties } from 'react'; + +/** + * @interface IMenuPanel Menu页面的按钮的参数接口 + */ +export interface IMenuPanel { + clickFunc?: any; // 点击事件触发的函数 + buttonOnClassName?: string; // 按钮激活(在当前按钮对应页面)时的className + tagColor?: string; // 标签颜色 + iconColor?: string; // 图标颜色 + tagName?: string; // 标签显示名称 + iconName: string; // 图标名称 + style?: CSSProperties; +} diff --git a/packages/webgal/src/UI/Menu/Options/Display/Display.tsx b/packages/webgal/src/UI/Menu/Options/Display/Display.tsx new file mode 100644 index 000000000..b7bc13045 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/Display/Display.tsx @@ -0,0 +1,113 @@ +import styles from '@/UI/Menu/Options/options.module.scss'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { NormalOption } from '@/UI/Menu/Options/NormalOption'; +import { NormalButton } from '@/UI/Menu/Options/NormalButton'; +import { setOptionData } from '@/store/userDataReducer'; +import { fullScreenOption, playSpeed, textFont, textSize } from '@/store/userDataInterface'; +import { setStorage } from '@/Core/controller/storage/storageController'; +import { TextPreview } from '@/UI/Menu/Options/TextPreview/TextPreview'; +import useTrans from '@/hooks/useTrans'; +import { OptionSlider } from '../OptionSlider'; + +export function Display() { + const userDataState = useSelector((state: RootState) => state.userData); + const dispatch = useDispatch(); + const t = useTrans('menu.options.pages.display.options.'); + + return ( + <div className={styles.Options_main_content_half}> + <NormalOption key="fullScreen" title={t('fullScreen.title')}> + <NormalButton + textList={t('fullScreen.options.on', 'fullScreen.options.off')} + functionList={[ + () => { + dispatch(setOptionData({ key: 'fullScreen', value: fullScreenOption.on })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'fullScreen', value: fullScreenOption.off })); + setStorage(); + }, + ]} + currentChecked={userDataState.optionData.fullScreen} + /> + </NormalOption> + <NormalOption key="textSpeed" title={t('textSpeed.title')}> + <NormalButton + textList={t('textSpeed.options.slow', 'textSpeed.options.medium', 'textSpeed.options.fast')} + functionList={[ + () => { + dispatch(setOptionData({ key: 'textSpeed', value: playSpeed.slow })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'textSpeed', value: playSpeed.normal })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'textSpeed', value: playSpeed.fast })); + setStorage(); + }, + ]} + currentChecked={userDataState.optionData.textSpeed} + /> + </NormalOption> + <NormalOption key="textSize" title={t('textSize.title')}> + <NormalButton + textList={t('textSize.options.small', 'textSize.options.medium', 'textSize.options.large')} + functionList={[ + () => { + dispatch(setOptionData({ key: 'textSize', value: textSize.small })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'textSize', value: textSize.medium })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'textSize', value: textSize.large })); + setStorage(); + }, + ]} + currentChecked={userDataState.optionData.textSize} + /> + </NormalOption> + <NormalOption key="textFont" title={t('textFont.title')}> + <NormalButton + textList={t('textFont.options.siYuanSimSun', 'textFont.options.SimHei', 'textFont.options.lxgw')} + functionList={[ + () => { + dispatch(setOptionData({ key: 'textboxFont', value: textFont.song })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'textboxFont', value: textFont.hei })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'textboxFont', value: textFont.lxgw })); + setStorage(); + }, + ]} + currentChecked={userDataState.optionData.textboxFont} + /> + </NormalOption> + <NormalOption key="textboxOpacity" title={t('textboxOpacity.title')}> + <OptionSlider + initValue={userDataState.optionData.textboxOpacity} + uniqueID={t('textboxOpacity.title')} + onChange={(event) => { + const newValue = event.target.value; + dispatch(setOptionData({ key: 'textboxOpacity', value: Number(newValue) })); + setStorage(); + }} + /> + </NormalOption> + <NormalOption full key="textPreview" title={t('textPreview.title')}> + {/* 这是一个临时的组件,用于模拟文本预览的效果 */} + <TextPreview /> + </NormalOption> + </div> + ); +} diff --git a/packages/webgal/src/UI/Menu/Options/NormalButton.tsx b/packages/webgal/src/UI/Menu/Options/NormalButton.tsx new file mode 100644 index 000000000..9a3e313c0 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/NormalButton.tsx @@ -0,0 +1,44 @@ +import { ReactElement } from 'react'; +import { INormalButton } from '@/UI/Menu/Options/OptionInterface'; +import styles from './normalButton.module.scss'; +import useSoundEffect from '@/hooks/useSoundEffect'; + +export const NormalButton = (props: INormalButton) => { + const len: number = props.textList.length; + const buttonList: Array<ReactElement> = []; + const { playSeEnter, playSeSwitch } = useSoundEffect(); + for (let i = 0; i < len; i++) { + if (i === props.currentChecked) { + const t = ( + <div + key={props.textList[i] + i + props} + className={styles.NormalButton + ' ' + styles.NormalButtonChecked} + onClick={() => { + playSeSwitch(); + props.functionList[i](); + }} + onMouseEnter={playSeEnter} + > + {props.textList[i]} + </div> + ); + buttonList.push(t); + } else { + const t = ( + <div + key={props.textList[i] + i} + className={styles.NormalButton} + onClick={() => { + playSeSwitch(); + props.functionList[i](); + }} + onMouseEnter={playSeEnter} + > + {props.textList[i]} + </div> + ); + buttonList.push(t); + } + } + return <>{buttonList}</>; +}; diff --git a/packages/webgal/src/UI/Menu/Options/NormalOption.tsx b/packages/webgal/src/UI/Menu/Options/NormalOption.tsx new file mode 100644 index 000000000..9954820bf --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/NormalOption.tsx @@ -0,0 +1,14 @@ +import styles from './normalOption.module.scss'; + +export const NormalOption = (props: any) => { + return ( + <div className={styles.NormalOption} style={{ width: props.full ? '100%' : 'auto' }}> + {/* <div className={styles.NormalOption_title_sd}>{props.title}</div> */} + {/* <div className={styles.NormalOption_title_bef}>{props.title}</div> */} + <div className={styles.NormalOption_title}>{props.title}</div> + <div className={styles.NormalOption_buttonList} style={{ width: props.full ? '100%' : 'auto' }}> + {props.children} + </div> + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/Options/OptionInterface.ts b/packages/webgal/src/UI/Menu/Options/OptionInterface.ts new file mode 100644 index 000000000..504ff5cc3 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/OptionInterface.ts @@ -0,0 +1,16 @@ +/** + * @interface INormalButton 普通按钮的参数 + */ +import { ChangeEvent } from 'react'; + +export interface INormalButton { + textList: Array<string>; + functionList: Array<any>; + currentChecked: number; +} + +export interface ISlider { + uniqueID: string; + onChange: (event: ChangeEvent<HTMLInputElement>) => void; + initValue: number; +} diff --git a/packages/webgal/src/UI/Menu/Options/OptionSlider.tsx b/packages/webgal/src/UI/Menu/Options/OptionSlider.tsx new file mode 100644 index 000000000..668e2273c --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/OptionSlider.tsx @@ -0,0 +1,25 @@ +import './slider.css'; +import { ISlider } from '@/UI/Menu/Options/OptionInterface'; +import { useEffect } from 'react'; +import useSoundEffect from '@/hooks/useSoundEffect'; + +export const OptionSlider = (props: ISlider) => { + const { playSeEnter } = useSoundEffect(); + useEffect(() => { + setTimeout(() => { + const input = document.getElementById(props.uniqueID); + if (input !== null) input.setAttribute('value', props.initValue.toString()); + }, 1); + }, []); + return ( + <div className="Option_WebGAL_slider"> + <input + id={props.uniqueID} + type="range" + onChange={props.onChange} + onFocus={playSeEnter} + onMouseEnter={playSeEnter} + /> + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/Options/Options.tsx b/packages/webgal/src/UI/Menu/Options/Options.tsx new file mode 100644 index 000000000..f2db09af3 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/Options.tsx @@ -0,0 +1,78 @@ +import { FC, useEffect } from 'react'; +import styles from './options.module.scss'; +import { getStorage } from '@/Core/controller/storage/storageController'; +import { useValue } from '@/hooks/useValue'; +import { System } from '@/UI/Menu/Options/System/System'; +import { Display } from '@/UI/Menu/Options/Display/Display'; +import { Sound } from '@/UI/Menu/Options/Sound/Sound'; +import useTrans from '@/hooks/useTrans'; +import useSoundEffect from '@/hooks/useSoundEffect'; + +enum optionPage { + 'System', + 'Display', + 'Sound', +} + +export const Options: FC = () => { + const { playSeEnter, playSeSwitch } = useSoundEffect(); + const currentOptionPage = useValue(optionPage.System); + useEffect(getStorage, []); + + function getClassName(page: optionPage) { + if (page === currentOptionPage.value) { + return styles.Options_page_button + ' ' + styles.Options_page_button_active; + } else return styles.Options_page_button; + } + + const t = useTrans('menu.options.'); + + return ( + <div className={styles.Options_main}> + <div className={styles.Options_top}> + <div className={styles.Options_title}> + <div className={styles.Option_title_text}>{t('title')}</div> + </div> + </div> + <div className={styles.Options_page_container}> + <div className={styles.Options_button_list}> + <div + onClick={() => { + currentOptionPage.set(optionPage.System); + playSeSwitch(); + }} + className={getClassName(optionPage.System)} + onMouseEnter={playSeEnter} + > + {t('pages.system.title')} + </div> + <div + onClick={() => { + currentOptionPage.set(optionPage.Display); + playSeSwitch(); + }} + className={getClassName(optionPage.Display)} + onMouseEnter={playSeEnter} + > + {t('pages.display.title')} + </div> + <div + onClick={() => { + currentOptionPage.set(optionPage.Sound); + playSeSwitch(); + }} + className={getClassName(optionPage.Sound)} + onMouseEnter={playSeEnter} + > + {t('pages.sound.title')} + </div> + </div> + <div className={styles.Options_main_content}> + {currentOptionPage.value === optionPage.Display && <Display />} + {currentOptionPage.value === optionPage.System && <System />} + {currentOptionPage.value === optionPage.Sound && <Sound />} + </div> + </div> + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/Options/Sound/Sound.tsx b/packages/webgal/src/UI/Menu/Options/Sound/Sound.tsx new file mode 100644 index 000000000..99f2898a8 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/Sound/Sound.tsx @@ -0,0 +1,92 @@ +import styles from '@/UI/Menu/Options/options.module.scss'; +import { NormalOption } from '@/UI/Menu/Options/NormalOption'; +import { OptionSlider } from '@/UI/Menu/Options/OptionSlider'; +import { NormalButton } from '@/UI/Menu/Options//NormalButton'; +import { setOptionData } from '@/store/userDataReducer'; +import { setStorage } from '@/Core/controller/storage/storageController'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import useTrans from '@/hooks/useTrans'; +import { voiceOption } from '@/store/userDataInterface'; + +export function Sound() { + const userDataState = useSelector((state: RootState) => state.userData); + const dispatch = useDispatch(); + const t = useTrans('menu.options.pages.sound.options.'); + + return ( + <div className={styles.Options_main_content_half}> + <NormalOption key="option4" title={t('volumeMain.title')}> + <OptionSlider + initValue={userDataState.optionData.volumeMain} + uniqueID={t('volumeMain.title')} + onChange={(event) => { + const newValue = event.target.value; + dispatch(setOptionData({ key: 'volumeMain', value: Number(newValue) })); + setStorage(); + }} + /> + </NormalOption> + <NormalOption key="option5" title={t('vocalVolume.title')}> + <OptionSlider + initValue={userDataState.optionData.vocalVolume} + uniqueID={t('vocalVolume.title')} + onChange={(event) => { + const newValue = event.target.value; + dispatch(setOptionData({ key: 'vocalVolume', value: Number(newValue) })); + setStorage(); + }} + /> + </NormalOption> + <NormalOption key="option6" title={t('bgmVolume.title')}> + <OptionSlider + initValue={userDataState.optionData.bgmVolume} + uniqueID={t('bgmVolume.title')} + onChange={(event) => { + const newValue = event.target.value; + dispatch(setOptionData({ key: 'bgmVolume', value: Number(newValue) })); + setStorage(); + }} + /> + </NormalOption> + <NormalOption key="option7" title={t('seVolume.title')}> + <OptionSlider + initValue={userDataState.optionData.seVolume} + uniqueID={t('seVolume.title')} + onChange={(event) => { + const newValue = event.target.value; + dispatch(setOptionData({ key: 'seVolume', value: Number(newValue) })); + setStorage(); + }} + /> + </NormalOption> + <NormalOption key="option8" title={t('uiSeVolume.title')}> + <OptionSlider + initValue={userDataState.optionData.uiSeVolume} + uniqueID={t('uiSeVolume.title')} + onChange={(event) => { + const newValue = event.target.value; + dispatch(setOptionData({ key: 'uiSeVolume', value: Number(newValue) })); + setStorage(); + }} + /> + </NormalOption> + <NormalOption key="option9" title={t('voiceOption.title')}> + <NormalButton + textList={t('voiceStop.title', 'voiceContinue.title')} + functionList={[ + () => { + dispatch(setOptionData({ key: 'voiceInterruption', value: voiceOption.yes })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'voiceInterruption', value: voiceOption.no })); + setStorage(); + }, + ]} + currentChecked={userDataState.optionData.voiceInterruption} + /> + </NormalOption> + </div> + ); +} diff --git a/packages/webgal/src/UI/Menu/Options/System/About.tsx b/packages/webgal/src/UI/Menu/Options/System/About.tsx new file mode 100644 index 000000000..f0c2fc5bf --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/System/About.tsx @@ -0,0 +1,36 @@ +import useTrans from '@/hooks/useTrans'; +import { Left } from '@icon-park/react'; +import s from './about.module.scss'; +import { __INFO } from '@/config/info'; + +export default function About(props: { onClose: () => void }) { + const t = useTrans('menu.options.pages.system.options.about.'); + return ( + <div className={s.about}> + <div className={s.backButton} onClick={props.onClose}> + <Left className={s.icon} theme="outline" size="35" strokeWidth={3} fill="#333" /> + </div> + <div className={s.title}>{t('subTitle')}</div> + <div className={s.title}>{t('version')}</div> + <div className={s.text}>{__INFO.version}</div> + <div className={s.title}>{t('source')}</div> + <div className={s.text}> + <a target="_blank" href="https://github.com/OpenWebGAL/WebGAL"> + https://github.com/OpenWebGAL/WebGAL + </a> + </div> + <div className={s.title}>{t('contributors')}</div> + <div className={s.text}> + <a target="_blank" href="https://github.com/OpenWebGAL/WebGAL/graphs/contributors"> + https://github.com/OpenWebGAL/WebGAL/graphs/contributors + </a> + </div> + <div className={s.title}>{t('website')}</div> + <div className={s.text}> + <a target="_blank" href="https://openwebgal.com/"> + https://openwebgal.com/ + </a> + </div> + </div> + ); +} diff --git a/packages/webgal/src/UI/Menu/Options/System/System.tsx b/packages/webgal/src/UI/Menu/Options/System/System.tsx new file mode 100644 index 000000000..6d48e0011 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/System/System.tsx @@ -0,0 +1,204 @@ +import styles from '@/UI/Menu/Options/options.module.scss'; +import { NormalOption } from '@/UI/Menu/Options/NormalOption'; +import { NormalButton } from '@/UI/Menu/Options/NormalButton'; +import { resetAllData, resetOptionSet, setOptionData } from '@/store/userDataReducer'; +import { IUserData, playSpeed } from '@/store/userDataInterface'; +import { getStorage, setStorage, dumpToStorageFast } from '@/Core/controller/storage/storageController'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState, webgalStore } from '@/store/store'; +import { showGlogalDialog } from '@/UI/GlobalDialog/GlobalDialog'; +import localforage from 'localforage'; +import { logger } from '@/Core/util/logger'; +import useTrans from '@/hooks/useTrans'; +import useLanguage from '@/hooks/useLanguage'; +import languages, { language } from '@/config/language'; +import { useState } from 'react'; +import About from '@/UI/Menu/Options/System/About'; +import { WebGAL } from '@/Core/WebGAL'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import savesReducer, { ISavesData, saveActions } from '@/store/savesReducer'; +import { dumpFastSaveToStorage, dumpSavesToStorage } from '@/Core/controller/storage/savesController'; + +interface IExportGameData { + userData: IUserData; + saves: ISavesData; +} + +export function System() { + const userDataState = useSelector((state: RootState) => state.userData); + const userSavesState = useSelector((state: RootState) => state.saveData); + const dispatch = useDispatch(); + const setLanguage = useLanguage(); + const t = useTrans('menu.options.pages.system.options.'); + const { playSeDialogOpen } = useSoundEffect(); + + function exportSaves() { + const gameData: IExportGameData = { + userData: userDataState, + saves: userSavesState, + }; + + const saves = JSON.stringify(gameData); + if (saves !== null) { + // @ts-ignore + const blob = new Blob([saves], { type: 'application/json' }); + const blobUrl = URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = blobUrl; + a.download = 'saves.json'; + a.click(); + a.remove(); + } + } + + function importSavesEventHandler(ev: any) { + // const t = useTrans('menu.options.pages.system.options.'); + + const file = ev.target.files[0]; + const reader = new FileReader(); + reader.onload = (evR) => { + const saves = evR!.target!.result as string; + try { + const saveAsObj: IExportGameData = JSON.parse(saves); + playSeDialogOpen(); + showGlogalDialog({ + title: t('gameSave.dialogs.import.title'), + leftText: t('$common.yes'), + rightText: t('$common.no'), + leftFunc: async () => { + await localforage.setItem(WebGAL.gameKey, saveAsObj.userData).then(() => { + logger.info(t('gameSave.dialogs.import.tip')); + }); + getStorage(); + webgalStore.dispatch(saveActions.replaceSaveGame(saveAsObj.saves.saveData)); + webgalStore.dispatch(saveActions.setFastSave(saveAsObj.saves.quickSaveData)); + dumpFastSaveToStorage(); + dumpSavesToStorage(0, 200); + }, + rightFunc: () => {}, + }); + } catch (e) { + logger.error(t('gameSave.dialogs.import.error'), e); + } + // window.location.reload(); // dirty: 强制刷新 UI + }; + reader.readAsText(file, 'UTF-8'); + } + + function importSaves() { + const inputElement = document.createElement('input'); + inputElement.type = 'file'; + inputElement.onchange = importSavesEventHandler; + inputElement.click(); + } + + const [showAbout, setShowAbout] = useState(false); + + function toggleAbout() { + setShowAbout(!showAbout); + } + + return ( + <div className={styles.Options_main_content_half}> + {showAbout && <About onClose={toggleAbout} />} + {!showAbout && ( + <> + <NormalOption key="option1" title={t('autoSpeed.title')}> + <NormalButton + textList={t('autoSpeed.options.slow', 'autoSpeed.options.medium', 'autoSpeed.options.fast')} + functionList={[ + () => { + dispatch(setOptionData({ key: 'autoSpeed', value: playSpeed.slow })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'autoSpeed', value: playSpeed.normal })); + setStorage(); + }, + () => { + dispatch(setOptionData({ key: 'autoSpeed', value: playSpeed.fast })); + setStorage(); + }, + ]} + currentChecked={userDataState.optionData.autoSpeed} + /> + </NormalOption> + <NormalOption key="option7" title={t('language.title')}> + <NormalButton + currentChecked={userDataState.optionData.language} + textList={Object.values(languages)} + functionList={Object.keys(languages).map( + (k) => () => setLanguage(language[k as unknown as number] as unknown as language), + )} + /> + </NormalOption> + <NormalOption key="option2" title={t('resetData.title')}> + <NormalButton + textList={t( + 'resetData.options.clearGameSave', + 'resetData.options.resetSettings', + 'resetData.options.clearAll', + )} + functionList={[ + () => { + playSeDialogOpen(); + showGlogalDialog({ + title: t('resetData.dialogs.clearGameSave'), + leftText: t('$common.yes'), + rightText: t('$common.no'), + leftFunc: () => { + dispatch(saveActions.resetSaves()); + dumpSavesToStorage(0, 200); + dumpFastSaveToStorage(); + }, + rightFunc: () => {}, + }); + }, + () => { + playSeDialogOpen(); + showGlogalDialog({ + title: t('resetData.dialogs.resetSettings'), + leftText: t('$common.yes'), + rightText: t('$common.no'), + leftFunc: () => { + dispatch(resetOptionSet()); + dumpToStorageFast(); + }, + rightFunc: () => {}, + }); + }, + () => { + playSeDialogOpen(); + showGlogalDialog({ + title: t('resetData.dialogs.clearAll'), + leftText: t('$common.yes'), + rightText: t('$common.no'), + leftFunc: () => { + dispatch(resetAllData()); + dumpToStorageFast(); + dispatch(saveActions.resetSaves()); + dumpSavesToStorage(0, 200); + dumpFastSaveToStorage(); + }, + rightFunc: () => {}, + }); + }, + ]} + currentChecked={3} + /> + </NormalOption> + <NormalOption key="option3" title={t('gameSave.title')}> + <NormalButton + textList={t('gameSave.options.export', 'gameSave.options.import')} + functionList={[exportSaves, importSaves]} + currentChecked={2} + /> + </NormalOption> + <div className={styles.About_title_text} onClick={toggleAbout}> + <span className={styles.About_text}>{t('about.title')}</span> + </div> + </> + )} + </div> + ); +} diff --git a/packages/webgal/src/UI/Menu/Options/System/about.module.scss b/packages/webgal/src/UI/Menu/Options/System/about.module.scss new file mode 100644 index 000000000..7cdee3bc9 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/System/about.module.scss @@ -0,0 +1,46 @@ +.backButton{ + display: flex; + justify-content: center; + align-items: center; + width: 50px; + height: 50px; + background: rgba(0,0,0,0.1); + border-radius: 4px; + cursor: pointer; +} + +.backButton:hover{ + background: rgba(0,0,0,0.2); +} + +.about{ + padding: 10px 0 0 0; +} + +.icon{ + display: inline-flex; +} + +.title{ + color: transparent; + background: linear-gradient(to left, #227D51, rgba(81, 110, 65, 1)); + -webkit-background-clip: text; + font-size: 200%; + //border-bottom: 2px solid rgba(81, 110, 65, 0.9); + padding: 0.15em 0.5em 0.15em 0.1em; + font-weight: bold; + margin-top: 20px; +} + +.text{ + color: rgba(81, 110, 65, 1); + padding: 0 0 0 10px; + font-size: 135%; + a{ + color: rgba(81, 110, 65, 1); + } +} + +.contributor{ + padding: 0 10px 0 0; +} diff --git a/packages/webgal/src/UI/Menu/Options/TextPreview/TextPreview.tsx b/packages/webgal/src/UI/Menu/Options/TextPreview/TextPreview.tsx new file mode 100644 index 000000000..4e8bbc4d3 --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/TextPreview/TextPreview.tsx @@ -0,0 +1,64 @@ +import styles from './textPreview.module.scss'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { useFontFamily } from '@/hooks/useFontFamily'; +import { useTextAnimationDuration, useTextDelay } from '@/hooks/useTextOptions'; +import useTrans from '@/hooks/useTrans'; +import { getTextSize } from '@/UI/getTextSize'; +import IMSSTextbox from '@/Stage/TextBox/IMSSTextbox'; +import { compileSentence } from '@/Stage/TextBox/TextBox'; + +export const TextPreview = (props: any) => { + const t = useTrans('menu.options.pages.display.options.'); + const userDataState = useSelector((state: RootState) => state.userData); + const stageState = useSelector((state: RootState) => state.stage); + const previewBackground = stageState.bgName; + const textDelay = useTextDelay(userDataState.optionData.textSpeed); + const textDuration = useTextAnimationDuration(userDataState.optionData.textSpeed); + const textboxOpacity = userDataState.optionData.textboxOpacity; + const size = getTextSize(userDataState.optionData.textSize) + '%'; + const font = useFontFamily(); + const userAgent = navigator.userAgent; + const isFirefox = /firefox/i.test(userAgent); + const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent); + const previewText = t('textPreview.text'); + const previewTextArray = compileSentence(previewText, 3); + const showNameText = t('textPreview.title'); + const showNameArray = compileSentence(showNameText, 3); + const isHasName = showNameText !== ''; + + const Textbox = IMSSTextbox; + + const textboxProps = { + textArray: previewTextArray, + isText: true, + textDelay: textDelay, + isHasName: isHasName, + showName: showNameArray, + currentConcatDialogPrev: '', + fontSize: size, + currentDialogKey: '', + isSafari: isSafari, + isFirefox: isFirefox, + miniAvatar: '', + textDuration: textDuration, + font: font, + textSizeState: size as unknown as number, + lineLimit: 3, + isUseStroke: true, + textboxOpacity: textboxOpacity, + }; + + return ( + <div + className={styles.textPreviewMain} + style={{ + background: previewBackground ? `bottom / cover no-repeat url(${previewBackground})` : 'rgba(0, 0, 0, 0.1)', + }} + > + <div key={`previewTextbox-${textDelay}`} className={styles.textbox}> + <Textbox {...textboxProps} /> + </div> + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/Options/TextPreview/textPreview.module.scss b/packages/webgal/src/UI/Menu/Options/TextPreview/textPreview.module.scss new file mode 100644 index 000000000..420b3bd6d --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/TextPreview/textPreview.module.scss @@ -0,0 +1,12 @@ +.textPreviewMain { + z-index: 1; + padding: 1em; + min-height: 480px; + width: 100%; +} + +.textbox { + width: 100%; + height: 100%; + position: relative; +} \ No newline at end of file diff --git a/packages/webgal/src/UI/Menu/Options/normalButton.module.scss b/packages/webgal/src/UI/Menu/Options/normalButton.module.scss new file mode 100644 index 000000000..2f48b267e --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/normalButton.module.scss @@ -0,0 +1,23 @@ +.NormalButton { + font-size: 150%; + box-sizing: border-box; + padding: 0.2em 1em 0.2em 1em; + background-color: rgba(50, 50, 50, 0.05); + margin: 0 0.4em 0 0; + color: rgba(160, 170, 160, 1); + cursor: pointer; + border-bottom: 2px solid transparent; +} + +.NormalButton:hover { + border-bottom: 2px solid rgba(81, 110, 65, 0.9); + color: rgba(81, 110, 65, 0.9); + font-weight: bold; +} + +.NormalButtonChecked { + background-color: rgba(81, 110, 65, 0.15); + border-bottom: 2px solid rgba(81, 110, 65, 0.9); + color: rgba(81, 110, 65, 0.9); + font-weight: bold; +} diff --git a/packages/webgal/src/UI/Menu/Options/normalOption.module.scss b/packages/webgal/src/UI/Menu/Options/normalOption.module.scss new file mode 100644 index 000000000..8f368f6fc --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/normalOption.module.scss @@ -0,0 +1,64 @@ +.NormalOption { + margin: 0.2em 1em 0.2em 1em; + padding: 0.2em 0.2em 0.2em 0.2em; + display: flex; + flex-flow: column; + align-items: flex-start; + animation: Elements_in ease-out 0.7s forwards; +} + +.NormalOption_title { + //color: rgba(81, 110, 65, 0.9); + color: transparent; + background: linear-gradient(to left, #227D51, rgba(81, 110, 65, 1)); + -webkit-background-clip: text; + font-size: 200%; + //border-bottom: 2px solid rgba(81, 110, 65, 0.9); + padding: 0.15em 0.5em 0.15em 0.1em; + font-weight: bold; +} + +.NormalOption_title_bef { + font-weight: bold; + font-size: 200%; + content: attr(data-text); + position: absolute; + -webkit-text-stroke: 3px rgba(0, 0, 0, 1); + z-index: -1; + padding: 0.15em 0.5em 0.15em 0.1em; +} + +.NormalOption_title_sd { + font-weight: bold; + color: rgba(0, 0, 0, 0); + font-size: 200%; + position: absolute; + z-index: -1; + padding: 0.15em 0.5em 0.15em 0.1em; + text-shadow: 0.04em 0.04em rgba(81, 110, 65, 0.9), + 0.05em 0.05em rgba(81, 110, 65, 0.9), + 0.06em 0.06em rgba(81, 110, 65, 0.9), + 0.07em 0.07em rgba(81, 110, 65, 0.9), + 0.08em 0.08em rgba(81, 110, 65, 0.9), + 0.09em 0.09em rgba(81, 110, 65, 0.9), + 0.10em 0.10em rgba(81, 110, 65, 0.9); + //0.11em 0.11em rgba(81, 110, 65, 0.9), + //0.12em 0.12em rgba(81, 110, 65, 0.9); +} + +.NormalOption_buttonList { + padding: 0.5em 0 0.5em 0; + display: flex; +} + +@keyframes Elements_in { + 0% { + opacity: 0; + transform: scale(1.03, 1.03) translate(-25px, -20px); + } + + 100% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } +} \ No newline at end of file diff --git a/packages/webgal/src/UI/Menu/Options/options.module.scss b/packages/webgal/src/UI/Menu/Options/options.module.scss new file mode 100644 index 000000000..bc3a7622e --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/options.module.scss @@ -0,0 +1,136 @@ +.Options_main { + position: absolute; + cursor: default; + height: 90%; + width: 100%; + //background: rgba(255, 255, 255, 0.65); +} + +.Options_top { + height: 15%; + width: 100%; + display: flex; + align-items: flex-start; +} + +.Options_title { + font-family: "思源宋体", serif; + letter-spacing: 0.1em; + font-size: 225%; + margin: 0.5em 0 0.5em 0; + padding: 0.2em 2em 0.2em 1.1em; + box-sizing: border-box; + //background-color: rgba(255, 255, 255, 0.99); + //border-right: .2em solid rgba(81, 110, 65, 0.9); + //box-shadow: .1em .1em .8em .2em rgba(0, 0, 0, 0.07); +} + +.Option_title_text { + font-size: 165%; + font-weight: bold; + color: transparent; + background: linear-gradient(to left, #227D51, rgba(81, 110, 65, 1)); + -webkit-background-clip: text; + animation: Elements_in ease-out 0.7s forwards; +} + +.Option_title_text_shadow { + position: absolute; + color: rgba(0, 0, 0, 0); + -webkit-text-stroke: 3px rgba(0, 0, 0, 1); + z-index: -1; +} + +.Option_title_text_ts { + position: absolute; + color: rgba(0, 0, 0, 0); + text-shadow: 0.04em 0.04em rgba(81, 110, 65, 0.9), + 0.05em 0.05em rgba(81, 110, 65, 0.9), + 0.06em 0.06em rgba(81, 110, 65, 0.9), + 0.07em 0.07em rgba(81, 110, 65, 0.9); + //0.08em 0.08em rgba(81, 110, 65, 0.9), + //0.09em 0.09em rgba(81, 110, 65, 0.9), + //0.10em 0.10em rgba(81, 110, 65, 0.9), + //0.11em 0.11em rgba(81, 110, 65, 0.9), + //0.12em 0.12em rgba(81, 110, 65, 0.9); + z-index: -1; +} + +.Options_main_content { + display: flex; + flex: 1; + padding: 0 0 0 3em; + overflow: auto; +} + +.Options_main_content_half { + width: 95%; + display: flex; + flex-flow: row; + align-items: flex-start; + align-content: flex-start; + flex-wrap: wrap; + padding: 0 1em 0 1em; +} + +.About_title_text { + margin: 0.2em 1em 0.2em 1em; + padding: 0.2em 0.2em 0.2em 0.2em; + width: 100%; + animation: Elements_in ease-out 0.7s forwards; + cursor: pointer; +} + +.About_text { + font-weight: bold; + color: transparent; + background: linear-gradient(to left, rgba(34, 125, 81, 0.65), rgba(81, 110, 65, 0.65)); + -webkit-background-clip: text; + font-size: 135%; + text-decoration: underline; + +} + +@keyframes Elements_in { + 0% { + opacity: 0; + transform: scale(1.03, 1.03) translate(-25px, -20px); + } + + 100% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } +} + +.Options_page_container { + height: 85%; + display: flex; + padding: 1em 3.75em 1em 3.75em; +} + +.Options_button_list { + animation: Elements_in ease-out 0.7s forwards; +} + +.Options_page_button { + font-family: "思源宋体", serif; + font-size: 300%; + font-weight: bold; + color: transparent; + background: linear-gradient(to left, #227D51, rgba(81, 110, 65, 1)); + opacity: 0.35; + -webkit-background-clip: text; + transition: color 0.33s, background-image 0.33s, opacity 0.33s; + cursor: pointer; +} + +.Options_page_button_active { + background-image: linear-gradient(to left, #227D51, rgba(81, 110, 65, 1)); + -webkit-background-clip: text; + opacity: 1; +} + +.Options_page_button:hover { + opacity: 1; +} diff --git a/packages/webgal/src/UI/Menu/Options/slider.css b/packages/webgal/src/UI/Menu/Options/slider.css new file mode 100644 index 000000000..b9115229c --- /dev/null +++ b/packages/webgal/src/UI/Menu/Options/slider.css @@ -0,0 +1,65 @@ +input[type=range] { + -webkit-appearance: none; /* 去掉底部的 track 默认样式,就是整个灰条 */ + width: 500px; /* Firefox 需要指定明确的宽度 */ + height: 50px; + background: transparent; /* 否则在 Chrome 中是白色背景 */ + font-size: 100%; +} + +/* 去掉 webkit 内核 滑块 的样式 */ +input[type=range]::-webkit-slider-thumb { + -webkit-appearance: none; +} + +input[type=range]:focus { + outline: none; /* 去除获取焦点时蓝色的外边框,你也可以自己定制其他你想要的效果 */ +} + +/*以下是自定义样式*/ + +/*滑块样式*/ +input[type=range]::-webkit-slider-thumb { + -webkit-appearance: none; + /*border: 1px solid #000000;*/ + height: 375%; + width: 7.2%; + border-radius: 5em; + background: #ffffff; + cursor: pointer; + margin-top: -14px; /* 在 Chrome 中你需要给定一个明确的 margin,但是在 Firefox 和 IE 中这个是固定的 */ + box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* 添加一条炫酷的效果为你的 thumb */ +} + +/*轨道样式*/ +input[type=range]::-webkit-slider-runnable-track { + width: 100%; + height: 20%; + cursor: pointer; + box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3); + background: rgba(81, 110, 65, 0.9); + border-radius: 2em; +} + +input[type=range]:focus::-webkit-slider-runnable-track { + background: rgba(81, 110, 65, 0.9); +} + +/* Firefox 同上 */ +input[type=range]::-moz-range-thumb { + height: 36px; + width: 7.2%; + border-radius: 5em; + background: #ffffff; + cursor: pointer; + /*margin-top: -14px; !* 在 Chrome 中你需要给定一个明确的 margin,但是在 Firefox 和 IE 中这个是固定的 *!*/ + box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); /* 添加一条炫酷的效果为你的 thumb */ +} + +input[type=range]::-moz-range-track { + width: 100%; + height: 20%; + cursor: pointer; + box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.3); + background: rgba(81, 110, 65, 0.9); + border-radius: 2em; +} diff --git a/packages/webgal/src/UI/Menu/SaveAndLoad/Load/Load.tsx b/packages/webgal/src/UI/Menu/SaveAndLoad/Load/Load.tsx new file mode 100644 index 000000000..bc0d30479 --- /dev/null +++ b/packages/webgal/src/UI/Menu/SaveAndLoad/Load/Load.tsx @@ -0,0 +1,113 @@ +import { CSSProperties, FC, useEffect } from 'react'; +import { loadGame } from '@/Core/controller/storage/loadGame'; +import styles from '../SaveAndLoad.module.scss'; +// import {saveGame} from '@/Core/controller/storage/saveGame'; +import { setStorage } from '@/Core/controller/storage/storageController'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { setSlPage } from '@/store/userDataReducer'; +import useTrans from '@/hooks/useTrans'; +import { useTranslation } from 'react-i18next'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import { getSavesFromStorage } from '@/Core/controller/storage/savesController'; + +export const Load: FC = () => { + const { playSeClick, playSeEnter, playSePageChange } = useSoundEffect(); + const userDataState = useSelector((state: RootState) => state.userData); + const saveDataState = useSelector((state: RootState) => state.saveData); + const dispatch = useDispatch(); + const page = []; + for (let i = 1; i <= 20; i++) { + let classNameOfElement = styles.Save_Load_top_button + ' ' + styles.Load_top_button; + if (i === userDataState.optionData.slPage) { + classNameOfElement = classNameOfElement + ' ' + styles.Save_Load_top_button_on + ' ' + styles.Load_top_button_on; + } + const element = ( + <div + onClick={() => { + dispatch(setSlPage(i)); + setStorage(); + playSePageChange(); + }} + onMouseEnter={playSeEnter} + key={'Load_element_page' + i} + className={classNameOfElement} + > + <div className={styles.Save_Load_top_button_text}>{i}</div> + </div> + ); + page.push(element); + } + + const showSaves = []; + // 现在尝试设置10个存档每页 + const start = (userDataState.optionData.slPage - 1) * 10 + 1; + const end = start + 9; + + useEffect(() => { + getSavesFromStorage(start, end); + }, [start, end]); + + let animationIndex = 0; + for (let i = start; i <= end; i++) { + animationIndex++; + const saveData = saveDataState.saveData[i]; + let saveElementContent = <div />; + if (saveData) { + const speaker = saveData.nowStageState.showName === '' ? '\u00A0' : `${saveData.nowStageState.showName}`; + saveElementContent = ( + <> + <div className={styles.Save_Load_content_element_top}> + <div className={styles.Save_Load_content_element_top_index + ' ' + styles.Load_content_elememt_top_index}> + {saveData.index} + </div> + <div className={styles.Save_Load_content_element_top_date + ' ' + styles.Load_content_element_top_date}> + {saveData.saveTime} + </div> + </div> + <div className={styles.Save_Load_content_miniRen}> + <img className={styles.Save_Load_content_miniRen_bg} alt="Save_img_preview" src={saveData.previewImage} /> + </div> + <div className={styles.Save_Load_content_text}> + <div className={styles.Save_Load_content_speaker + ' ' + styles.Load_content_speaker}>{speaker}</div> + <div className={styles.Save_Load_content_text_padding}>{saveData.nowStageState.showText}</div> + </div> + </> + ); + } + // else { + + // } + const saveElement = ( + <div + onClick={() => { + loadGame(i); + playSeClick(); + }} + onMouseEnter={playSeEnter} + key={'loadElement_' + i} + className={styles.Save_Load_content_element} + style={{ animationDelay: `${animationIndex * 30}ms` }} + > + {saveElementContent} + </div> + ); + showSaves.push(saveElement); + } + + const t = useTrans('menu.'); + + return ( + <div className={styles.Save_Load_main}> + <div className={styles.Save_Load_top}> + <div className={styles.Save_Load_title}> + <div className={styles.Load_title_text}>{t('loadSaving.title')}</div> + </div> + <div className={styles.Save_Load_top_buttonList}>{page}</div> + </div> + <div className={styles.Save_Load_content} id={'Load_content_page_' + userDataState.optionData.slPage}> + {showSaves} + </div> + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/SaveAndLoad/Save/Save.tsx b/packages/webgal/src/UI/Menu/SaveAndLoad/Save/Save.tsx new file mode 100644 index 000000000..2f3dce088 --- /dev/null +++ b/packages/webgal/src/UI/Menu/SaveAndLoad/Save/Save.tsx @@ -0,0 +1,125 @@ +import { CSSProperties, FC, useEffect } from 'react'; +import styles from '../SaveAndLoad.module.scss'; +import { saveGame } from '@/Core/controller/storage/saveGame'; +import { setStorage } from '@/Core/controller/storage/storageController'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { setSlPage } from '@/store/userDataReducer'; +import { showGlogalDialog } from '@/UI/GlobalDialog/GlobalDialog'; +import useTrans from '@/hooks/useTrans'; +import { useTranslation } from 'react-i18next'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import { getSavesFromStorage } from '@/Core/controller/storage/savesController'; + +export const Save: FC = () => { + const { playSePageChange, playSeEnter, playSeDialogOpen } = useSoundEffect(); + const userDataState = useSelector((state: RootState) => state.userData); + const savesDataState = useSelector((state: RootState) => state.saveData); + const dispatch = useDispatch(); + const page = []; + for (let i = 1; i <= 20; i++) { + let classNameOfElement = styles.Save_Load_top_button; + if (i === userDataState.optionData.slPage) { + classNameOfElement = classNameOfElement + ' ' + styles.Save_Load_top_button_on; + } + const element = ( + <div + onClick={() => { + dispatch(setSlPage(i)); + setStorage(); + playSePageChange(); + }} + onMouseEnter={playSeEnter} + key={'Save_element_page' + i} + className={classNameOfElement} + > + <div className={styles.Save_Load_top_button_text}>{i}</div> + </div> + ); + page.push(element); + } + + const tCommon = useTrans('common.'); + + const showSaves = []; + // 现在尝试设置10个存档每页 + const start = (userDataState.optionData.slPage - 1) * 10 + 1; + const end = start + 9; + + useEffect(() => { + getSavesFromStorage(start, end); + }, [start, end]); + + let animationIndex = 0; + for (let i = start; i <= end; i++) { + animationIndex++; + const saveData = savesDataState.saveData[i]; + let saveElementContent = <div />; + if (saveData) { + const speaker = saveData.nowStageState.showName === '' ? '\u00A0' : `${saveData.nowStageState.showName}`; + saveElementContent = ( + <> + <div className={styles.Save_Load_content_element_top}> + <div className={styles.Save_Load_content_element_top_index}>{saveData.index}</div> + <div className={styles.Save_Load_content_element_top_date}>{saveData.saveTime}</div> + </div> + <div className={styles.Save_Load_content_miniRen}> + <img className={styles.Save_Load_content_miniRen_bg} alt="Save_img_preview" src={saveData.previewImage} /> + </div> + <div className={styles.Save_Load_content_text}> + <div className={styles.Save_Load_content_speaker}>{speaker}</div> + <div className={styles.Save_Load_content_text_padding}>{saveData.nowStageState.showText}</div> + </div> + </> + ); + } + // else { + + // } + const saveElement = ( + <div + onClick={() => { + if (savesDataState.saveData[i]) { + playSeDialogOpen(); + showGlogalDialog({ + title: t('saving.isOverwrite'), + leftText: tCommon('yes'), + rightText: tCommon('no'), + leftFunc: () => { + saveGame(i); + setStorage(); + }, + rightFunc: () => {}, + }); + } else { + playSePageChange(); + saveGame(i); + } + }} + onMouseEnter={playSeEnter} + key={'saveElement_' + i} + className={styles.Save_Load_content_element} + style={{ animationDelay: `${animationIndex * 30}ms` }} + > + {saveElementContent} + </div> + ); + showSaves.push(saveElement); + } + + const t = useTrans('menu.'); + + return ( + <div className={styles.Save_Load_main}> + <div className={styles.Save_Load_top}> + <div className={styles.Save_Load_title}> + <div className={styles.Save_title_text}>{t('saving.title')}</div> + </div> + <div className={styles.Save_Load_top_buttonList}>{page}</div> + </div> + <div className={styles.Save_Load_content} id={'Save_content_page_' + userDataState.optionData.slPage}> + {showSaves} + </div> + </div> + ); +}; diff --git a/packages/webgal/src/UI/Menu/SaveAndLoad/SaveAndLoad.module.scss b/packages/webgal/src/UI/Menu/SaveAndLoad/SaveAndLoad.module.scss new file mode 100644 index 000000000..a0f623ed2 --- /dev/null +++ b/packages/webgal/src/UI/Menu/SaveAndLoad/SaveAndLoad.module.scss @@ -0,0 +1,267 @@ +.Save_Load_main { + height: 90%; + width: 100%; + position: absolute; + cursor: default; +} + +.Save_Load_top { + height: 10%; + width: 100%; + display: flex; + //background-color: rgba(255, 255, 255, 1); + //box-shadow: 0 0 1.5em 0.1em rgba(0, 0, 0, 0.05); + animation: Elements_in ease-out 1s forwards; + //border-bottom: 1px solid rgba(0, 0, 0, 0.1); + justify-content: center; +} + +.Save_Load_title { + font-family: "思源宋体", serif; + letter-spacing: 0.1em; + width: auto; + font-size: 500%; + min-width: 350px; + //margin: 0 0 0 0.8em; + //padding: 0 0.8em 0 0.8em; + box-sizing: border-box; + //border-bottom: 4px solid #77428D; + display: flex; + justify-content: center; + align-items: center; + position: absolute; + left: 20px; + top:0; + z-index: -1; + opacity: 0.2; + transform: translateY(-10px); +} + +.Save_title_text { + font-weight: bold; + color: transparent; + background: linear-gradient(135deg, #77428D 0%, #B28FCE 100%); + text-shadow: 2px 2px 15px rgba(255, 255, 255, 0.5); + -webkit-background-clip: text; +} + + +.Load_title_text { + font-weight: bold; + color: transparent; + background: linear-gradient(135deg, #005CAF 0%, #2EA9DF 100%); + text-shadow: 2px 2px 15px rgba(255, 255, 255, 0.5); + -webkit-background-clip: text; +} + +.Save_Load_top_buttonList { + height: 100%; + display: flex; + //padding: 0 0 0 2em; +} + +.Save_Load_top_button { + cursor: pointer; + font-size: 200%; + width: 2.05em; + text-align: center; + color: rgba(0, 0, 0, 0.5); + box-sizing: border-box; + display: flex; + align-items: center; + border-bottom: 4px solid rgba(0, 0, 0, 0); + transition: background-color 0.7s, border-bottom-width 0.7s; +} + +.Save_Load_top_button_text { + text-align: center; + width: 100%; + padding: 0 0 3px 0; + border-left: 2px solid rgba(0, 0, 0, 0.1); +} + +.Save_Load_top_button:first-child > div { + border-left: 2px solid rgba(0, 0, 0, 0); +} + +.Save_Load_top_button_on { + font-weight: bold; + border-bottom: 4px solid #77428D; + color: #77428D; + background-color: rgba(119, 66, 141, 0.05); +} + +.Save_Load_top_button:hover { + color: #77428D; + font-weight: bold; + border-bottom: 4px solid #77428D; +} + +.Load_top_button_on { + font-weight: bold; + border-bottom: 5px solid #005CAF; + color: #005CAF; + background-color: rgba(0, 92, 175, 0.1); +} + +.Load_top_button:hover { + color: #005CAF; + font-weight: bold; + border-bottom: 5px solid #005CAF; +} + +.Save_Load_content { + height: 90%; + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: center; +} + +.Save_Load_content_element { + //background: linear-gradient(-45deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 100%); + background: linear-gradient(-45deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.075)); + overflow: hidden; + //border: 1px solid rgba(255, 255, 255, 1); + width: 17.5%; + height: 45%; + //box-shadow: 0 0 15px rgba(0, 0, 0, 0.1); + animation: Elements_in 1s ease-out forwards, Elements_in_transform 1s ease-out; + opacity: 0; + border-radius: 4px; + transition: transform 0.25s, box-shadow 0.25s; + cursor: pointer; +} + +.Save_Load_content_element:hover { + //box-shadow: 0 0 25px 8px rgba(0, 0, 0, 0.1); + transform: scale(1.05, 1.05) translate(-0.2em, -0.2em); +} + + +.Save_Load_content_element_top { + font-family: "思源宋体", serif; + width: 100%; + height: 12%; + display: flex; +} + +.Save_Load_content_element_top_index { + color: rgba(255, 255, 255, 1); + text-align: center; + font-size: 155%; + height: 100%; + width: 20%; + background-color: #B28FCE; +} + +.Load_content_elememt_top_index { + background-color: #51A8DD; +} + +.Save_Load_content_element_top_date { + padding: 0.425em 0 0 0.5em; + background-color: #77428D; + color: rgba(255, 255, 255, 1); + font-size: 115%; + height: 100%; + width: 80%; + font-family: WebgalUI, serif; + letter-spacing: 0.1em; +} + +.Load_content_element_top_date { + background-color: #005CAF; +} + +.Save_Load_content_text { + font-family: "WebgalUI", sans-serif; + letter-spacing: 0.05em; + color: #373C38; + background: linear-gradient(-45deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 1) 100%); + //background: rgba(255,255,255,1); + font-size: 120%; + height: 40%; + width: 100%; + //box-sizing: border-box; + display: flex; + flex-flow: column; + justify-content: flex-start; + align-items: flex-start; +} + +.Save_Load_content_text_padding { + padding: 0.2em 0.75em 0.2em 0.75em; +} + +.Save_Load_content_speaker { + box-sizing: border-box; + //margin: 0.35em 0 0 0; + //background: rgba(0, 0, 0, 0.04); + font-weight: bold; + color: #77428D; + padding: 0.35em 0.8em 0.25em 0.8em; + width: 100%; + //border-radius: 4px; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); +} + +.Load_content_speaker { + color: #005caf; +} + + +.Load_content_text { + background-color: rgba(0, 92, 175, 0.75); +} + +.Save_Load_content_miniRen { + width: 100%; + height: 48%; + position: relative; + background-size: cover; +} + +.Save_Load_content_miniRen_bg { + background-size: cover; + height: 100%; + width: 100%; + background-position: center; +} + +.Save_Load_content_miniRen_figure { + height: 100%; + max-height: 100%; + max-width: 100%; + position: absolute; + bottom: 0; +} + +.Save_Load_content_miniRen_figLeft { + bottom: 0; + left: 0; +} + +.Save_Load_content_miniRen_figRight { + bottom: 0; + right: 0; +} + +@keyframes Elements_in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes Elements_in_transform { + 0% { + transform: scale(1.05, 1.05) translate(-25px, -20px) rotateY(15deg) rotateX(-15deg); + } + 100% { + transform: scale(1, 1) translate(0, 0); + } +} diff --git a/packages/webgal/src/UI/Menu/menu.module.scss b/packages/webgal/src/UI/Menu/menu.module.scss new file mode 100644 index 000000000..143af6a87 --- /dev/null +++ b/packages/webgal/src/UI/Menu/menu.module.scss @@ -0,0 +1,24 @@ +.Menu_main { + width: 100%; + height: 100%; + position: absolute; + z-index: 16; + //backdrop-filter: blur(1px); + animation: Menu_ShowSoftly 0.5s forwards; + background-image: linear-gradient(to top, #accbee 0%, #e7f0fd 100%); +} + +.Menu_TagContent { + width: 100%; + height: 90%; +} + + +@keyframes Menu_ShowSoftly { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} diff --git a/packages/webgal/src/UI/PanicOverlay/PanicImage/PanicImage.tsx b/packages/webgal/src/UI/PanicOverlay/PanicImage/PanicImage.tsx new file mode 100644 index 000000000..f658637b7 --- /dev/null +++ b/packages/webgal/src/UI/PanicOverlay/PanicImage/PanicImage.tsx @@ -0,0 +1,13 @@ +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; + +/** + * @todo Allow custom panic image from config + */ +export const PanicImage = () => { + return ( + <div> + <img alt="Panic Image" /> + </div> + ); +}; diff --git a/packages/webgal/src/UI/PanicOverlay/PanicImage/panicImage.module.scss b/packages/webgal/src/UI/PanicOverlay/PanicImage/panicImage.module.scss new file mode 100644 index 000000000..e69de29bb diff --git a/packages/webgal/src/UI/PanicOverlay/PanicOverlay.tsx b/packages/webgal/src/UI/PanicOverlay/PanicOverlay.tsx new file mode 100644 index 000000000..59ea5f08f --- /dev/null +++ b/packages/webgal/src/UI/PanicOverlay/PanicOverlay.tsx @@ -0,0 +1,22 @@ +import styles from './panicOverlay.module.scss'; +import { useEffect, useState } from 'react'; +import ReactDOM from 'react-dom'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { PanicYoozle } from '@/UI/PanicOverlay/PanicYoozle/PanicYoozle'; + +export const PanicOverlay = () => { + const GUIStore = useSelector((state: RootState) => state.GUI); + const [showOverlay, setShowOverlay] = useState(false); + const globalVars = useSelector((state: RootState) => state.userData.globalGameVar); + const panic = globalVars['Show_panic']; + const hidePanic = panic === false; + useEffect(() => { + const isShowOverlay = GUIStore.showPanicOverlay && !hidePanic; + setShowOverlay(isShowOverlay); + }, [GUIStore.showPanicOverlay, hidePanic]); + return ReactDOM.createPortal( + <div className={showOverlay ? styles.panic_overlay_main : ''}>{showOverlay && <PanicYoozle />}</div>, + document.querySelector('div#panic-overlay')!, + ); +}; diff --git a/packages/webgal/src/UI/PanicOverlay/PanicYoozle/PanicYoozle.tsx b/packages/webgal/src/UI/PanicOverlay/PanicYoozle/PanicYoozle.tsx new file mode 100644 index 000000000..4d2960f20 --- /dev/null +++ b/packages/webgal/src/UI/PanicOverlay/PanicYoozle/PanicYoozle.tsx @@ -0,0 +1,36 @@ +import styles from './panicYoozle.module.scss'; +import { useEffect } from 'react'; + +export const PanicYoozle = () => { + useEffect(() => { + const panicTitle = 'Yoozle Search'; + const originalTitle = document.title; + document.title = panicTitle; + return () => { + document.title = originalTitle; + }; + }, []); + return ( + <div className={styles.yoozle_container}> + <div className={styles.yoozle_title}> + <span> + <span className={styles.yoozle_blue} style={{ marginRight: '1px' }}> + Y + </span> + <span className={styles.yoozle_red}>o</span> + <span className={styles.yoozle_yellow}>o</span> + <span className={styles.yoozle_blue}>z</span> + <span className={styles.yoozle_green}>l</span> + <span className={`${styles.yoozle_red} ${styles.yoozle_e_rotate}`}>e</span> + </span> + </div> + <div className={styles.yoozle_search}> + <input className={styles.yoozle_search_bar} type="text" defaultValue="" /> + <div className={styles.yoozle_search_buttons}> + <input className={styles.yoozle_button} type="submit" value="Yoozle Search" /> + <input className={styles.yoozle_button} type="submit" value="Feeling Lucky" /> + </div> + </div> + </div> + ); +}; diff --git a/packages/webgal/src/UI/PanicOverlay/PanicYoozle/panicYoozle.module.scss b/packages/webgal/src/UI/PanicOverlay/PanicYoozle/panicYoozle.module.scss new file mode 100644 index 000000000..696d0d628 --- /dev/null +++ b/packages/webgal/src/UI/PanicOverlay/PanicYoozle/panicYoozle.module.scss @@ -0,0 +1,81 @@ +.yoozle_blue { + color: #4285f4; +} + +.yoozle_red { + color: #db4437; +} + +.yoozle_yellow { + color: #f4b400; +} + +.yoozle_green { + color: #0f9d58; +} + +.yoozle_e_rotate { + display: inline-block; + transform: rotate(-12deg); +} + +.yoozle_container { + display: flex; + flex-direction: column; + height: 100%; +} + +.yoozle_title { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 80px; + font-family: arial, sans-serif; + font-size: 90px; +} + +.yoozle_search { + display: flex; + flex-direction: column; + align-items: center; + padding: 20px 10px; +} + +.yoozle_search_bar { + width: 40%; + line-height: 32px; + font-family: arial, sans-serif; + font-size: 18px; +} + +.yoozle_search_buttons { + padding-top: 13px; +} + +.yoozle_button { + background-color: #f8f9fa; + border: 1px solid #f8f9fa; + border-radius: 4px; + color: #3c4043; + font-family: arial, sans-serif; + font-size: 14px; + margin: 11px 4px; + padding: 0 16px; + line-height: 27px; + height: 36px; + min-width: 54px; + text-align: center; + cursor: pointer; + user-select: none; +} + +.yoozle_button:hover { + box-shadow: 0 1px 1px rgba(0, 0, 0, .1); + border: 1px solid #dadce0; + color: #202124; +} + +.yoozle_button:focus { + border: 1px solid #4285f4; + outline: none; +} diff --git a/packages/webgal/src/UI/PanicOverlay/panicOverlay.module.scss b/packages/webgal/src/UI/PanicOverlay/panicOverlay.module.scss new file mode 100644 index 000000000..7619d39d1 --- /dev/null +++ b/packages/webgal/src/UI/PanicOverlay/panicOverlay.module.scss @@ -0,0 +1,9 @@ +.panic_overlay_main { + margin: 0; + position: fixed; + //display: none; + width: 100%; + height: 100%; + background-color: white; + z-index: 256; +} diff --git a/packages/webgal/src/UI/Title/Title.tsx b/packages/webgal/src/UI/Title/Title.tsx new file mode 100644 index 000000000..15bc0eb4f --- /dev/null +++ b/packages/webgal/src/UI/Title/Title.tsx @@ -0,0 +1,117 @@ +import { FC, useEffect } from 'react'; +import styles from './title.module.scss'; +import { playBgm } from '@/Core/controller/stage/playBgm'; +import { continueGame, startGame } from '@/Core/controller/gamePlay/startContinueGame'; +import { useDispatch, useSelector } from 'react-redux'; +import { RootState, webgalStore } from '@/store/store'; +import { setMenuPanelTag, setVisibility } from '@/store/GUIReducer'; +import { MenuPanelTag } from '@/store/guiInterface'; +import useTrans from '@/hooks/useTrans'; +// import { resize } from '@/Core/util/resize'; +import { hasFastSaveRecord, loadFastSaveGame } from '@/Core/controller/storage/fastSaveLoad'; +import useSoundEffect from '@/hooks/useSoundEffect'; +import useApplyStyle from '@/hooks/useApplyStyle'; +import { fullScreenOption } from '@/store/userDataInterface'; +import { keyboard } from '@/hooks/useHotkey'; +import useConfigData from '@/hooks/useConfigData'; +/** + * 标题页 + * @constructor + */ +const Title: FC = () => { + const userDataState = useSelector((state: RootState) => state.userData); + const GUIState = useSelector((state: RootState) => state.GUI); + const dispatch = useDispatch(); + const fullScreen = userDataState.optionData.fullScreen; + const background = GUIState.titleBg; + const showBackground = background === '' ? 'rgba(0,0,0,1)' : `url("${background}")`; + const t = useTrans('title.'); + const { playSeEnter, playSeClick } = useSoundEffect(); + + const applyStyle = useApplyStyle('UI/Title/title.scss'); + useConfigData(); // 监听基础ConfigData变化 + return ( + <> + {GUIState.showTitle && <div className={applyStyle('Title_backup_background', styles.Title_backup_background)} />} + <div + id="enter_game_target" + onClick={() => { + playBgm(GUIState.titleBgm); + dispatch(setVisibility({ component: 'isEnterGame', visibility: true })); + if (fullScreen === fullScreenOption.on) { + document.documentElement.requestFullscreen(); + if (keyboard) keyboard.lock(['Escape', 'F11']); + } + }} + onMouseEnter={playSeEnter} + /> + {GUIState.showTitle && ( + <div + className={applyStyle('Title_main', styles.Title_main)} + style={{ + backgroundImage: showBackground, + backgroundSize: 'cover', + }} + > + <div className={applyStyle('Title_buttonList', styles.Title_buttonList)}> + <div + className={applyStyle('Title_button', styles.Title_button)} + onClick={() => { + startGame(); + playSeClick(); + }} + onMouseEnter={playSeEnter} + > + <div className={applyStyle('Title_button_text', styles.Title_button_text)}>{t('start.title')}</div> + </div> + <div + className={applyStyle('Title_button', styles.Title_button)} + onClick={async () => { + playSeClick(); + dispatch(setVisibility({ component: 'showTitle', visibility: false })); + continueGame(); + }} + onMouseEnter={playSeEnter} + > + <div className={applyStyle('Title_button_text', styles.Title_button_text)}>{t('continue.title')}</div> + </div> + <div + className={applyStyle('Title_button', styles.Title_button)} + onClick={() => { + playSeClick(); + dispatch(setVisibility({ component: 'showMenuPanel', visibility: true })); + dispatch(setMenuPanelTag(MenuPanelTag.Option)); + }} + onMouseEnter={playSeEnter} + > + <div className={applyStyle('Title_button_text', styles.Title_button_text)}>{t('options.title')}</div> + </div> + <div + className={applyStyle('Title_button', styles.Title_button)} + onClick={() => { + playSeClick(); + dispatch(setVisibility({ component: 'showMenuPanel', visibility: true })); + dispatch(setMenuPanelTag(MenuPanelTag.Load)); + }} + onMouseEnter={playSeEnter} + > + <div className={applyStyle('Title_button_text', styles.Title_button_text)}>{t('load.title')}</div> + </div> + <div + className={applyStyle('Title_button', styles.Title_button)} + onClick={() => { + playSeClick(); + dispatch(setVisibility({ component: 'showExtra', visibility: true })); + }} + onMouseEnter={playSeEnter} + > + <div className={applyStyle('Title_button_text', styles.Title_button_text)}>{t('extra.title')}</div> + </div> + </div> + </div> + )} + </> + ); +}; + +export default Title; diff --git a/packages/webgal/src/UI/Title/title.module.scss b/packages/webgal/src/UI/Title/title.module.scss new file mode 100644 index 000000000..c10fe2a60 --- /dev/null +++ b/packages/webgal/src/UI/Title/title.module.scss @@ -0,0 +1,54 @@ +.Title_main { + width: 100%; + height: 100%; + position: absolute; + z-index: 13; +} + +.Title_buttonList { + display: flex; + position: absolute; + left: 0; + min-width: 25%; + height: 100%; + justify-content: center; + align-items: flex-start; + flex-flow: column; + transition: background 0.75s; + padding-left: 120px; +} + +.Title_button { + font-weight: bold; + text-align: center; + flex: 0 1 auto; + cursor: pointer; + padding: 1em 2em 1em 2em; + margin: 20px 0; + transition: all 0.33s; + background: rgba(255, 255, 255, 0.15); + backdrop-filter: blur(5px); + border-radius: 4px; + transform: skewX(-10deg); + background: linear-gradient(to right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1)); +} + +.Title_button:hover { + text-shadow: 0 0 10px rgba(255, 255, 255, 1); + padding: 1em 6em 1em 3em; +} + +.Title_button_text { + font-size: 165%; + color: #fbfbfb; + padding: 0 0.5em 0 0.5em; + letter-spacing: 0.2em; +} + +.Title_backup_background { + width: 100%; + height: 100%; + position: absolute; + z-index: 13; + background: linear-gradient(135deg, #fdfbfb 0%, #dcddde 100%); +} diff --git a/packages/webgal/src/UI/Translation/Translation.tsx b/packages/webgal/src/UI/Translation/Translation.tsx new file mode 100644 index 000000000..17c13197f --- /dev/null +++ b/packages/webgal/src/UI/Translation/Translation.tsx @@ -0,0 +1,47 @@ +import useLanguage from '@/hooks/useLanguage'; +import { useEffect, useState } from 'react'; +import s from './translation.module.scss'; +import languages, { language } from '@/config/language'; + +export default function Translation() { + const setLanguage = useLanguage(); + + const [isShowSelectLanguage, setIsShowSelectLanguage] = useState(false); + + useEffect(() => { + const lang = window?.localStorage.getItem('lang'); + if (!lang) { + setIsShowSelectLanguage(true); + } else { + setLanguage(Number(window?.localStorage.getItem('lang')), false); + } + }, []); + + const setLang = (langId: language) => { + setIsShowSelectLanguage(false); + setLanguage(langId); + }; + + return ( + <> + {isShowSelectLanguage && ( + <div className={s.trans}> + <div className={s.langWrapper}> + <div className={s.lang}>LANGUAGE SELECT</div> + <div className={s.langSelect}> + {Object.keys(languages).map((key) => ( + <div + key={key} + className={s.langSelectButton} + onClick={() => setLang(language[key as unknown as language] as unknown as language)} + > + {languages[key]} + </div> + ))} + </div> + </div> + </div> + )} + </> + ); +} diff --git a/packages/webgal/src/UI/Translation/translation.module.scss b/packages/webgal/src/UI/Translation/translation.module.scss new file mode 100644 index 000000000..cc95b696d --- /dev/null +++ b/packages/webgal/src/UI/Translation/translation.module.scss @@ -0,0 +1,48 @@ +.trans { + height: 100%; + width: 100%; + background-image: linear-gradient(225deg, #a3bded 0%, #6991c7 100%); + position: absolute; + z-index: 20; +} + +.langWrapper{ + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + flex-flow: column; +} + +.lang { + width: 100%; + text-align: center; + font-family: "思源宋体", serif; + color: transparent; + font-size: 300%; + background: linear-gradient(150deg, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 75%, #51A8DD 100%); + -webkit-background-clip: text; +} + +.langSelect{ + display: flex; + gap: 50px; + padding: 50px; +} + +.langSelectButton{ + font-family: "思源宋体", serif; + cursor: pointer; + font-size: 200%; + color: #FFFFFF; + border-radius: 4px; + border: 1px solid rgba(255,255,255,0.8); + padding: 10px 50px; + transition: color 0.33s, background-color 0.33s; +} + +.langSelectButton:hover{ + background: white; + color: #93a5cf; +} diff --git a/packages/webgal/src/UI/etc/QuickSL.tsx b/packages/webgal/src/UI/etc/QuickSL.tsx new file mode 100644 index 000000000..db846ec66 --- /dev/null +++ b/packages/webgal/src/UI/etc/QuickSL.tsx @@ -0,0 +1,3 @@ +export const QuickSL = () => { + return <div />; +}; diff --git a/packages/webgal/src/UI/getTextSize.ts b/packages/webgal/src/UI/getTextSize.ts new file mode 100644 index 000000000..85824bc0b --- /dev/null +++ b/packages/webgal/src/UI/getTextSize.ts @@ -0,0 +1,12 @@ +export function getTextSize(size: number) { + switch (size) { + case 0: + return 155; + case 1: + return 205; + case 2: + return 230; + default: + return 205; + } +} diff --git a/packages/webgal/src/assets/fonts/LXGWWenKai-Regular.ttf b/packages/webgal/src/assets/fonts/LXGWWenKai-Regular.ttf new file mode 100644 index 000000000..a99443f5e Binary files /dev/null and b/packages/webgal/src/assets/fonts/LXGWWenKai-Regular.ttf differ diff --git a/packages/webgal/src/assets/fonts/OPPOSans-R.ttf b/packages/webgal/src/assets/fonts/OPPOSans-R.ttf new file mode 100644 index 000000000..ddadfba63 Binary files /dev/null and b/packages/webgal/src/assets/fonts/OPPOSans-R.ttf differ diff --git a/packages/webgal/src/assets/fonts/SourceHanSerifCN-Regular.ttf b/packages/webgal/src/assets/fonts/SourceHanSerifCN-Regular.ttf new file mode 100644 index 000000000..dbafe4eab Binary files /dev/null and b/packages/webgal/src/assets/fonts/SourceHanSerifCN-Regular.ttf differ diff --git a/packages/webgal/src/assets/se/click.mp3 b/packages/webgal/src/assets/se/click.mp3 new file mode 100644 index 000000000..4ded50414 Binary files /dev/null and b/packages/webgal/src/assets/se/click.mp3 differ diff --git a/packages/webgal/src/assets/se/dialog.mp3 b/packages/webgal/src/assets/se/dialog.mp3 new file mode 100644 index 000000000..12274b6ed Binary files /dev/null and b/packages/webgal/src/assets/se/dialog.mp3 differ diff --git a/packages/webgal/src/assets/se/license.txt b/packages/webgal/src/assets/se/license.txt new file mode 100644 index 000000000..b736a141b --- /dev/null +++ b/packages/webgal/src/assets/se/license.txt @@ -0,0 +1,13 @@ +mouse-enter.mp3 +协议:CC0 作者:deadsillyrabbit 来源:https://www.aigei.com + +dialog.mp3 +协议:CC0 作者:wobbleboxx 来源:https://www.aigei.com + +click.mp3 +协议:CC0 作者:OwlishMedia 来源:https://www.aigei.com + +page-flip-1.mp3 +switch-1.wav +This work has been identified as being free of known restrictions under copyright law, including all related and neighboring rights. +You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. diff --git a/packages/webgal/src/assets/se/mouse-enter.mp3 b/packages/webgal/src/assets/se/mouse-enter.mp3 new file mode 100644 index 000000000..74aa4fa12 Binary files /dev/null and b/packages/webgal/src/assets/se/mouse-enter.mp3 differ diff --git a/packages/webgal/src/assets/se/page-flip-1.mp3 b/packages/webgal/src/assets/se/page-flip-1.mp3 new file mode 100644 index 000000000..06063a3e3 Binary files /dev/null and b/packages/webgal/src/assets/se/page-flip-1.mp3 differ diff --git a/packages/webgal/src/assets/se/switch-1.mp3 b/packages/webgal/src/assets/se/switch-1.mp3 new file mode 100644 index 000000000..d6ebab655 Binary files /dev/null and b/packages/webgal/src/assets/se/switch-1.mp3 differ diff --git a/packages/webgal/src/assets/style/animation.scss b/packages/webgal/src/assets/style/animation.scss new file mode 100644 index 000000000..d69a2aab5 --- /dev/null +++ b/packages/webgal/src/assets/style/animation.scss @@ -0,0 +1,329 @@ +@keyframes centerIn { + 0% { + opacity: 0; + transform: scale(1, 1); + } + + 100% { + opacity: 1; + transform: scale(1, 1); + } +} + +@keyframes upIn { + 0% { + opacity: 0; + transform: scale(1, 1) translate(0, 3%); + } + + 100% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } +} + +@keyframes leftIn { + 0% { + opacity: 0; + transform: scale(1, 1) translate(-3%, 0); + } + + 100% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } +} + +@keyframes rightIn { + 0% { + opacity: 0; + transform: scale(1, 1) translate(3%, 0); + } + + 100% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } +} + +@keyframes bg_down { + 0% { + opacity: 0; + transform: scale(1.1, 1.1) translate(0, -3%); + } + + 100% { + opacity: 1; + transform: scale(1, 1) translate(0, 0); + } +} + +@keyframes bg_softIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes hideBG { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +@keyframes shake { + 0% { + transform: translate(0, 0); + } + + 25% { + transform: translate(-2%, 0); + } + + 75% { + transform: translate(2%, 0); + } + + 100% { + transform: translate(0, 0); + } +} + +@keyframes moveBaF { + 0% { + transform: scale(1, 1); + } + + 50% { + transform: scale(1.1, 1.1); + } + + 100% { + transform: scale(1, 1); + } +} + +@keyframes showSoftly /* Safari 与 Chrome */ +{ + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes elementFadeIn { + 0% { + transform: translate(-15px, -20px) scale(1.03, 1.03); + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes controlButtonHover { + 0% { + background-color: rgba(0, 0, 0, 0); + box-shadow: none; + } + 100% { + background-color: rgba(255, 255, 255, 0.25); + box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.65); + } +} + +@keyframes controlButtonHoverBack { + 0% { + /*background-color: rgba(255, 255, 255, 0.25);*/ + /*box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.65);*/ + } + 100% { + + } +} + +@keyframes TitleButtonOnChoose { + 0% { + transform: scale(1, 1); + /*background-color: rgba(255,255,255,0.8);*/ + } + + 100% { + /*box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.5);*/ + transform: scale(1.1, 1.1); + /*background-color: rgba(0,0,0,0.15);*/ + } +} + +@keyframes TitleButtonNoneChoose { + 0% { + /*box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.5);*/ + transform: scale(1.1, 1.1); + /*background-color: rgba(0,0,0,0.15);*/ + } + + 100% { + + } +} + +@keyframes TitleModelHover { + 0% { + background-color: rgba(0, 0, 0, 0.35); + } + 100% { + background-color: rgba(0, 0, 0, 0.65); + } +} + +@keyframes TitleModelNoneHover { + 0% { + background-color: rgba(0, 0, 0, 0.65); + } + 100% { + background-color: rgba(0, 0, 0, 0.35); + } +} + + +/*背景的演出效果*/ +@keyframes bg_focusLeft { + 0% { + transform: scale(1, 1) translate(0, 0); + filter: blur(0); + } + 100% { + transform: scale(1.15, 1.15) translate(5%, 0); + filter: blur(1px); + } +} + +@keyframes bg_focusRight { + 0% { + transform: scale(1, 1) translate(0, 0); + filter: blur(0); + } + 100% { + transform: scale(1.15, 1.15) translate(-5%, 0); + filter: blur(1px); + } +} + +@keyframes bg_LtoR { + 0% { + transform: scale(1.15, 1.15) translate(5%, 0); + filter: blur(1px); + } + 100% { + transform: scale(1.15, 1.15) translate(-5%, 0); + filter: blur(1px); + } +} + +@keyframes bg_RtoL { + 0% { + transform: scale(1.15, 1.15) translate(-5%, 0); + filter: blur(1px); + } + 100% { + transform: scale(1.15, 1.15) translate(5%, 0); + filter: blur(1px); + } +} + +@keyframes bg_LtoC { + 0% { + transform: scale(1.15, 1.15) translate(5%, 0); + filter: blur(1px); + } + 100% { + transform: scale(1, 1) translate(0, 0); + filter: blur(0); + } +} + +@keyframes bg_RtoC { + 0% { + transform: scale(1.15, 1.15) translate(-5%, 0); + filter: blur(1px); + } + 100% { + transform: scale(1, 1) translate(0, 0); + filter: blur(0); + } +} + +@keyframes bg_focus { + 0% { + transform: scale(1, 1) translate(0, 0); + filter: blur(0); + } + 100% { + transform: scale(1.15, 1.15); + filter: blur(1px); + } +} + +@keyframes bg_LtoF { + 0% { + transform: scale(1.15, 1.15) translate(5%, 0); + filter: blur(1px); + } + 100% { + transform: scale(1.15, 1.15); + filter: blur(1px); + } +} + +@keyframes bg_RtoF { + 0% { + transform: scale(1.15, 1.15) translate(-5%, 0); + filter: blur(1px); + } + 100% { + transform: scale(1.15, 1.15); + filter: blur(1px); + } +} + +@keyframes bg_FtoL { + 0% { + transform: scale(1.15, 1.15); + filter: blur(1px); + } + 100% { + transform: scale(1.15, 1.15) translate(5%, 0); + filter: blur(1px); + } +} + +@keyframes bg_FtoR { + 0% { + transform: scale(1.15, 1.15); + filter: blur(1px); + } + 100% { + transform: scale(1.15, 1.15) translate(-5%, 0); + filter: blur(1px); + } +} + +@keyframes bg_FtoC { + 0% { + transform: scale(1.15, 1.15); + filter: blur(1px); + } + 100% { + transform: scale(1, 1) translate(0, 0); + filter: blur(0); + } +} diff --git a/packages/webgal/src/config/index.ts b/packages/webgal/src/config/index.ts new file mode 100644 index 000000000..a45247feb --- /dev/null +++ b/packages/webgal/src/config/index.ts @@ -0,0 +1,8 @@ +export const SYSTEM_CONFIG = { + backlog_size: 200, + fast_timeout: 50, +}; +export const PERFORM_CONFIG = { + // 不能小于50 + textInitialDelay: 80, +}; diff --git a/packages/webgal/src/config/info.ts b/packages/webgal/src/config/info.ts new file mode 100644 index 000000000..8fd76da0f --- /dev/null +++ b/packages/webgal/src/config/info.ts @@ -0,0 +1,6 @@ +export const __INFO = { + version: 'WebGAL 4.5.9', + contributors: [ + // 现在改为跳转到 GitHub 了 + ], +}; diff --git a/packages/webgal/src/config/language.ts b/packages/webgal/src/config/language.ts new file mode 100644 index 000000000..c5ad0a146 --- /dev/null +++ b/packages/webgal/src/config/language.ts @@ -0,0 +1,49 @@ +/** + * You can config the languages display in this file. + * If you want close someone, please add "//" forward that line. + * If you want to add language, please add the language English abbreviation name into language and languages, + * also you need to code the name of it show. + */ + +import en from '@/translations/en'; +import jp from '@/translations/jp'; +import zhCn from '@/translations/zh-cn'; +import fr from '@/translations/fr'; +import de from '@/translations/de'; +import zhTw from '@/translations/zh-tw'; +/* + Import your translation configs here; + example: + import myLang from '@/translations/filename of your config file'; +*/ + +export enum language { + zhCn, + en, + jp, + fr, + de, + zhTw, +} + +const languages: Record<string, string> = { + zhCn: '中文', + en: 'English', + jp: '日本語', + fr: 'Français', + de: 'Deutsch', + zhTw: '繁體中文', +}; + +export const i18nTranslationResources: Record<string, { translation: Record<string, any> }> = { + en: { translation: en }, + zhCn: { translation: zhCn }, + jp: { translation: jp }, + fr: { translation: fr }, + de: { translation: de }, + zhTw: { translation: zhTw }, +}; + +export const defaultLanguage: language = language.zhCn; + +export default languages; diff --git a/packages/webgal/src/hooks/useApplyStyle.ts b/packages/webgal/src/hooks/useApplyStyle.ts new file mode 100644 index 000000000..ad25477b1 --- /dev/null +++ b/packages/webgal/src/hooks/useApplyStyle.ts @@ -0,0 +1,54 @@ +import { useEffect } from 'react'; +import { WebGAL } from '@/Core/WebGAL'; +import axios from 'axios'; +import { scss2cssinjsParser } from '@/Core/controller/customUI/scss2cssinjsParser'; +import { useValue } from '@/hooks/useValue'; +import { css, injectGlobal } from '@emotion/css'; +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { IWebGALStyleObj } from 'webgal-parser/build/types/styleParser'; +import { logger } from '@/Core/util/logger'; + +export default function useApplyStyle(url: string) { + const styleObject = useValue<IWebGALStyleObj>({ classNameStyles: {}, others: '' }); + const replaced = useSelector((state: RootState) => state.stage.replacedUIlable); + + const applyStyle = (classNameLable: string, fallbackClassName: string) => { + // 先看看是否被用户用 applyStyle 指令替换了类名 + const className = replaced?.[classNameLable] ?? classNameLable; + if (Object.keys(styleObject.value.classNameStyles).includes(className)) { + const cijClassName = css(styleObject.value.classNameStyles?.[className] ?? ''); + return `${fallbackClassName} ${cijClassName}`; + } + return fallbackClassName; + }; + + const updateStyleFile = async () => { + logger.debug('更新 Scss 文件', url); + const resp = await axios.get(`game/template/${url}`); + const scssStr = resp.data; + styleObject.set(scss2cssinjsParser(scssStr)); + }; + + useEffect(() => { + updateStyleFile(); + }, []); + + useEffect(() => { + injectGlobal(styleObject.value.others); + }, [styleObject.value.others]); + + useRigisterStyleUpdate(updateStyleFile); + + return applyStyle; +} + +function useRigisterStyleUpdate(callback: Function) { + const handler = () => { + callback(); + }; + useEffect(() => { + WebGAL.events.styleUpdate.on(handler); + return () => WebGAL.events.styleUpdate.off(handler); + }, []); +} diff --git a/packages/webgal/src/hooks/useConfigData.ts b/packages/webgal/src/hooks/useConfigData.ts new file mode 100644 index 000000000..830976794 --- /dev/null +++ b/packages/webgal/src/hooks/useConfigData.ts @@ -0,0 +1,60 @@ +import { getFastSaveFromStorage, getSavesFromStorage } from '@/Core/controller/storage/savesController'; +import { getStorage } from '@/Core/controller/storage/storageController'; +import { setEbg } from '@/Core/gameScripts/changeBg/setEbg'; +import { assetSetter, fileType } from '@/Core/util/gameAssetsAccess/assetSetter'; +import { WebGAL } from '@/Core/WebGAL'; +import { setGuiAsset, setLogoImage } from '@/store/GUIReducer'; +import { RootState, webgalStore } from '@/store/store'; +import { useEffect } from 'react'; +import { useSelector } from 'react-redux'; + +const useConfigData = () => { + const _map = ['Title_img', 'Game_Logo', 'Title_bgm', 'Game_name', 'Game_key']; + const configData = useSelector((state: RootState) => state.userData.globalGameVar); + return useEffect(() => { + // configData发生变化 + for (let i in configData) { + if (!_map.includes(i)) { + continue; + } + const val = configData[i] as string; + switch (i) { + case 'Title_img': { + const titleUrl = assetSetter(val, fileType.background); + webgalStore.dispatch(setGuiAsset({ asset: 'titleBg', value: titleUrl })); + setEbg(titleUrl); + break; + } + + case 'Game_Logo': { + const logos = val.split('|'); + const logoUrlList = logos.map((val) => assetSetter(val, fileType.background)); + webgalStore.dispatch(setLogoImage(logoUrlList)); + break; + } + + case 'Title_bgm': { + const bgmUrl = assetSetter(val, fileType.bgm); + webgalStore.dispatch(setGuiAsset({ asset: 'titleBgm', value: bgmUrl })); + break; + } + + case 'Game_name': { + WebGAL.gameName = val; + document.title = val; + break; + } + + case 'Game_key': { + WebGAL.gameKey = val; + getStorage(); + getFastSaveFromStorage(); + getSavesFromStorage(0, 0); + break; + } + } + } + return () => {}; + }, [configData.Game_Logo, configData.Game_key, configData.Game_name, configData.Title_bgm, configData.Title_img]); +}; +export default useConfigData; diff --git a/packages/webgal/src/hooks/useEscape.ts b/packages/webgal/src/hooks/useEscape.ts new file mode 100644 index 000000000..3e54c99ef --- /dev/null +++ b/packages/webgal/src/hooks/useEscape.ts @@ -0,0 +1,34 @@ +const escapeMap = [ + { + reg: /\\\\/g, + val: '\\', + }, + { + reg: /\\\|/g, + val: '|', + }, + { + reg: /\\:/g, + val: ':', + }, + { + reg: /\\,/g, + val: ',', + }, + { + reg: /\\;/g, + val: ';', + }, + { + reg: /\\./g, + val: '.', + }, +]; +const useEscape = (val: string): string => { + let _res = val; + for (let i of escapeMap) { + _res = _res.replaceAll(i.reg, i.val); + } + return _res; +}; +export default useEscape; diff --git a/packages/webgal/src/hooks/useFontFamily.ts b/packages/webgal/src/hooks/useFontFamily.ts new file mode 100644 index 000000000..54c315ae9 --- /dev/null +++ b/packages/webgal/src/hooks/useFontFamily.ts @@ -0,0 +1,18 @@ +import { useSelector } from 'react-redux'; +import { RootState } from '@/store/store'; +import { textFont } from '@/store/userDataInterface'; +import { match } from '@/Core/util/match'; + +export function useFontFamily() { + const fontFamily = useSelector((state: RootState) => state.userData.optionData.textboxFont); + + function getFont() { + return match(fontFamily) + .with(textFont.song, () => '"思源宋体", serif') + .with(textFont.lxgw, () => '"LXGW", serif') + .with(textFont.hei, () => '"WebgalUI", serif') + .default(() => '"WebgalUI", serif'); + } + + return getFont(); +} diff --git a/packages/webgal/src/hooks/useFullScreen.ts b/packages/webgal/src/hooks/useFullScreen.ts new file mode 100644 index 000000000..228ce4fb3 --- /dev/null +++ b/packages/webgal/src/hooks/useFullScreen.ts @@ -0,0 +1,34 @@ +import { setStorage } from '@/Core/controller/storage/storageController'; +import { RootState } from '@/store/store'; +import { fullScreenOption } from '@/store/userDataInterface'; +import { setOptionData } from '@/store/userDataReducer'; +import { useEffect } from 'react'; +import { useDispatch, useSelector } from 'react-redux'; +import { keyboard } from './useHotkey'; + +export function useFullScreen() { + const userDataState = useSelector((state: RootState) => state.userData); + const GUIState = useSelector((state: RootState) => state.GUI); + const dispatch = useDispatch(); + const fullScreen = userDataState.optionData.fullScreen; + const isEnterGame = GUIState.isEnterGame; + + useEffect(() => { + switch (fullScreen) { + case fullScreenOption.on: { + if (isEnterGame) { + document.documentElement.requestFullscreen(); + if (keyboard) keyboard.lock(['Escape', 'F11']); + } + break; + } + case fullScreenOption.off: { + if (document.fullscreenElement) { + document.exitFullscreen(); + if (keyboard) keyboard.unlock(); + } + break; + } + } + }, [fullScreen]); +} diff --git a/packages/webgal/src/hooks/useGenSyncRef.ts b/packages/webgal/src/hooks/useGenSyncRef.ts new file mode 100644 index 000000000..f1f689d8d --- /dev/null +++ b/packages/webgal/src/hooks/useGenSyncRef.ts @@ -0,0 +1,16 @@ +import { useSelector } from 'react-redux'; +import { useEffect, useRef } from 'react'; + +/** + * 生成一个和redux自动同步的Ref对象 + */ +export function useGenSyncRef<TState = unknown, Selected = unknown>( + selector: (state: TState) => Selected, +): { readonly current: Selected } { + const Store = useSelector(selector); + const Ref = useRef(Store); + useEffect(() => { + Ref.current = Store; + }, [Store]); + return Ref; +} diff --git a/packages/webgal/src/hooks/useHotkey.tsx b/packages/webgal/src/hooks/useHotkey.tsx new file mode 100644 index 000000000..2e8ebb41f --- /dev/null +++ b/packages/webgal/src/hooks/useHotkey.tsx @@ -0,0 +1,404 @@ +import { useGenSyncRef } from '@/hooks/useGenSyncRef'; +import { RootState } from '@/store/store'; +import { useMounted, useUnMounted, useUpdated } from '@/hooks/useLifeCycle'; +import { useCallback, useEffect, useRef } from 'react'; +import { componentsVisibility, MenuPanelTag } from '@/store/guiInterface'; +import { setVisibility } from '@/store/GUIReducer'; +import { useDispatch, useSelector } from 'react-redux'; +import { startFast, stopAll, stopFast } from '@/Core/controller/gamePlay/fastSkip'; +import { nextSentence } from '@/Core/controller/gamePlay/nextSentence'; +import styles from '@/UI/Backlog/backlog.module.scss'; +import throttle from 'lodash/throttle'; +import { fastSaveGame } from '@/Core/controller/storage/fastSaveLoad'; +import { WebGAL } from '@/Core/WebGAL'; +import { setOptionData } from '@/store/userDataReducer'; +import { setStorage } from '@/Core/controller/storage/storageController'; +import { fullScreenOption } from '@/store/userDataInterface'; + +// options备用 +export interface HotKeyType { + MouseRight: {} | boolean; + MouseWheel: {} | boolean; + Ctrl: boolean; + Esc: + | { + href: string; + nav: 'replace' | 'push'; + } + | boolean; + AutoSave: {} | boolean; +} + +export interface Keyboard { + lock: (keys: string[]) => Promise<void>; + unlock: () => Promise<void>; +} + +export const keyboard: Keyboard | undefined = 'keyboard' in navigator && (navigator.keyboard as any); // FireFox and Safari not support + +// export const fastSaveGameKey = `FastSaveKey`; +// export const isFastSaveKey = `FastSaveActive`; + +export function useHotkey(opt?: HotKeyType) { + useMouseRightClickHotKey(); + useMouseWheel(); + useSkip(); + usePanic(); + useFastSaveBeforeUnloadPage(); + useSpaceAndEnter(); + useToggleFullScreen(); +} + +/** + * 右键关闭 & 打开 菜单栏 + */ +export function useMouseRightClickHotKey() { + const GUIStore = useGenSyncRef((state: RootState) => state.GUI); + const setComponentVisibility = useSetComponentVisibility(); + const isGameActive = useGameActive<typeof GUIStore>(GUIStore); + const isInBackLog = useIsInBackLog<typeof GUIStore>(GUIStore); + const isOpenedDialog = useIsOpenedDialog<typeof GUIStore>(GUIStore); + const validMenuPanelTag = useValidMenuPanelTag<typeof GUIStore>(GUIStore); + const isShowExtra = useIsOpenedExtra<typeof GUIStore>(GUIStore); + const handleContextMenu = useCallback((ev: MouseEvent) => { + if (isOpenedDialog()) { + setComponentVisibility('showGlobalDialog', false); + ev.preventDefault(); + return false; + } + if (isShowExtra()) { + setComponentVisibility('showExtra', false); + } + if (isGameActive()) { + setComponentVisibility('showTextBox', !GUIStore.current.showTextBox); + } + if (isInBackLog()) { + setComponentVisibility('showBacklog', false); + setComponentVisibility('showTextBox', true); + } + if (validMenuPanelTag()) { + setComponentVisibility('showMenuPanel', false); + } + ev.preventDefault(); + return false; + }, []); + useMounted(() => { + document.addEventListener('contextmenu', handleContextMenu); + }); + useUnMounted(() => { + document.removeEventListener('contextmenu', handleContextMenu); + }); +} + +let wheelTimeout = setTimeout(() => { + // 初始化,什么也不干 +}, 0); + +/** + * 滚轮向上打开历史记录 + * 滚轮向下关闭历史记录 + * 滚轮向下下一句 + */ +export function useMouseWheel() { + const GUIStore = useGenSyncRef((state: RootState) => state.GUI); + const setComponentVisibility = useSetComponentVisibility(); + const isGameActive = useGameActive(GUIStore); + const isInBackLog = useIsInBackLog(GUIStore); + const isPanicOverlayOpen = useIsPanicOverlayOpen(GUIStore); + const next = useCallback( + throttle(() => { + nextSentence(); + }, 100), + [], + ); + // 防止一直往下滚的时候顺着滚出历史记录 + // 问就是抄的999 + const prevDownWheelTimeRef = useRef(0); + const handleMouseWheel = useCallback((ev) => { + if (isPanicOverlayOpen()) return; + const direction = + (ev.wheelDelta && (ev.wheelDelta > 0 ? 'up' : 'down')) || + (ev.detail && (ev.detail < 0 ? 'up' : 'down')) || + 'down'; + const ctrlKey = ev.ctrlKey; + const dom = document.querySelector(`.${styles.backlog_content}`); + if (isGameActive() && direction === 'up' && !ctrlKey) { + setComponentVisibility('showBacklog', true); + setComponentVisibility('showTextBox', false); + } else if (isInBackLog() && direction === 'down' && !ctrlKey) { + if (dom) { + let flag = hasScrollToBottom(dom); + let curTime = new Date().getTime(); + // 滚动到底部 & 非连续滚动 + if (flag && curTime - prevDownWheelTimeRef.current > 100) { + setComponentVisibility('showBacklog', false); + setComponentVisibility('showTextBox', true); + } + prevDownWheelTimeRef.current = curTime; + } + // setComponentVisibility('showBacklog', false); + } else if (isGameActive() && direction === 'down' && !ctrlKey) { + clearTimeout(wheelTimeout); + WebGAL.gameplay.isFast = true; + // 滚轮视作快进 + setTimeout(() => { + WebGAL.gameplay.isFast = false; + }, 150); + next(); + } + }, []); + useMounted(() => { + document.addEventListener('wheel', handleMouseWheel); + }); + useUnMounted(() => { + document.removeEventListener('wheel', handleMouseWheel); + }); +} + +/** + * Panic Button, use Esc and Backquote + */ +export function usePanic() { + const panicButtonList = ['Escape', 'Backquote']; + const isPanicButton = (ev: KeyboardEvent) => + !ev.isComposing && !ev.defaultPrevented && panicButtonList.includes(ev.code); + const GUIStore = useGenSyncRef((state: RootState) => state.GUI); + const isTitleShown = useCallback(() => GUIStore.current.showTitle, [GUIStore]); + const isPanicOverlayOpen = useIsPanicOverlayOpen(GUIStore); + const setComponentVisibility = useSetComponentVisibility(); + const handlePressPanicButton = useCallback((ev: KeyboardEvent) => { + if (!isPanicButton(ev) || isTitleShown()) return; + if (isPanicOverlayOpen()) { + setComponentVisibility('showPanicOverlay', false); + // todo: resume + } else { + setComponentVisibility('showPanicOverlay', true); + stopAll(); // despite the name, it only disables fast mode and auto mode + // todo: pause music & animation for better performance + } + }, []); + useMounted(() => { + document.addEventListener('keyup', handlePressPanicButton); + }); + useUnMounted(() => { + document.removeEventListener('keyup', handlePressPanicButton); + }); +} + +/** + * ctrl控制快进 + */ +export function useSkip() { + // 因为document事件只绑定一次 为了防止之后更新GUIStore时取不到最新值 + // 使用Ref共享GUIStore + const GUIStore = useGenSyncRef((state: RootState) => state.GUI); + // 判断是否位于标题 & 存读档,选项 & 回想等页面 + const isGameActive = useGameActive(GUIStore); + // 判断按键是否为ctrl + const isCtrlKey = useCallback((e) => e.keyCode === 17, []); + const handleCtrlKeydown = useCallback((e) => { + if (isCtrlKey(e) && isGameActive()) { + startFast(); + } + }, []); + const handleCtrlKeyup = useCallback((e) => { + if (isCtrlKey(e) && isGameActive()) { + stopFast(); + } + }, []); + const handleWindowBlur = useCallback((e) => { + // 停止快进 + stopFast(); + }, []); + // mounted时绑定事件 + useMounted(() => { + document.addEventListener('keydown', handleCtrlKeydown); + document.addEventListener('keyup', handleCtrlKeyup); + window.addEventListener('blur', handleWindowBlur); + }); + // unmounted解绑 + useUnMounted(() => { + document.removeEventListener('keydown', handleCtrlKeydown); + document.removeEventListener('keyup', handleCtrlKeyup); + window.removeEventListener('blur', handleWindowBlur); + }); + // updated时验证状态 + useUpdated(() => { + if (!isGameActive()) { + stopFast(); + } + }); +} + +/** + * F5刷新 & 其他情况下导致页面卸载时快速保存 + */ +export function useFastSaveBeforeUnloadPage() { + const validMenuGameStart = useValidMenuGameStart(); + const handleWindowUnload = useCallback(async (e: BeforeUnloadEvent) => { + if (validMenuGameStart()) { + // 游戏启动了才保存数据 防止无效数据覆盖现在的数据 + await fastSaveGame(); + } + }, []); + useMounted(() => { + window.addEventListener('beforeunload', handleWindowUnload); + }); + useUnMounted(() => { + window.removeEventListener('beforeunload', handleWindowUnload); + }); +} + +// 判断游戏是否激活 +function useGameActive<T = any>(GUIStore: T & any): () => boolean { + return useCallback(() => { + return ( + !GUIStore.current.showTitle && + !GUIStore.current.showMenuPanel && + !GUIStore.current.showBacklog && + !GUIStore.current.showPanicOverlay + ); + }, [GUIStore]); +} + +// 判断是否打开backlog +function useIsInBackLog<T = any>(GUIStore: T & any): () => boolean { + return useCallback(() => { + return GUIStore.current.showBacklog; + }, [GUIStore]); +} + +// 判断是否打开了全局对话框 +function useIsOpenedDialog<T = any>(GUIStore: T & any): () => boolean { + return useCallback(() => { + return GUIStore.current.showGlobalDialog; + }, [GUIStore]); +} + +// 判断是否打开了鉴赏模式 +function useIsOpenedExtra<T = any>(GUIStore: T & any): () => boolean { + return useCallback(() => { + return GUIStore.current.showExtra; + }, [GUIStore]); +} + +function useIsPanicOverlayOpen<T = any>(GUIStore: T & any): () => boolean { + return useCallback(() => { + return GUIStore.current.showPanicOverlay; + }, [GUIStore]); +} + +// 验证是否在存档 / 读档 / 选项页面 +function useValidMenuPanelTag<T = any>(GUIStore: T & any): () => boolean { + return useCallback(() => { + return [MenuPanelTag.Save, MenuPanelTag.Load, MenuPanelTag.Option].includes(GUIStore.current.currentMenuTag); + }, [GUIStore]); +} + +function useValidMenuGameStart() { + return useCallback(() => { + // return !(runtime_currentSceneData.currentSentenceId === 0 && + // runtime_currentSceneData.currentScene.sceneName === 'start.txt'); + return !(WebGAL.sceneManager.sceneData.currentSentenceId === 0); + }, [WebGAL.sceneManager.sceneData]); +} + +function useSetComponentVisibility(): (component: keyof componentsVisibility, visibility: boolean) => void { + const dispatch = useDispatch(); + return (component: keyof componentsVisibility, visibility: boolean) => { + dispatch(setVisibility({ component, visibility })); + }; +} + +function nextTick(callback: () => void) { + // 具体实现根据浏览器的兼容实现微任务 + if (typeof Promise !== 'undefined') { + const p = Promise.resolve(); + p.then(callback); + } else { + // 兼容IE + setTimeout(callback, 0); + } +} + +/** + * 空格 & 回车 跳转到下一条 + */ +export function useSpaceAndEnter() { + const GUIStore = useGenSyncRef((state: RootState) => state.GUI); + const isGameActive = useGameActive(GUIStore); + const setComponentVisibility = useSetComponentVisibility(); + // 防止一直触发keydown导致快进 + const lockRef = useRef(false); + // 判断按键是否为空格 & 回车 + const isSpaceOrEnter = useCallback((e) => { + return e.keyCode === 32 || e.keyCode === 13; + }, []); + const handleKeydown = useCallback((e) => { + if (isSpaceOrEnter(e) && isGameActive() && !lockRef.current) { + if (!GUIStore.current.showTextBox) { + setComponentVisibility('showTextBox', true); + return; + } + stopAll(); + nextSentence(); + lockRef.current = true; + } + }, []); + const handleKeyup = useCallback((e) => { + if (isSpaceOrEnter(e) && isGameActive()) { + lockRef.current = false; + } + }, []); + const handleWindowBlur = useCallback((e) => { + lockRef.current = false; + }, []); + // mounted时绑定事件 + useMounted(() => { + document.addEventListener('keydown', handleKeydown); + document.addEventListener('keyup', handleKeyup); + document.addEventListener('blur', handleWindowBlur); + }); + // unmounted解绑 + useUnMounted(() => { + document.removeEventListener('keydown', handleKeydown); + document.removeEventListener('keyup', handleKeyup); + document.removeEventListener('blur', handleWindowBlur); + }); +} + +/** + * 是否滚动到底部 + * @param dom + */ +function hasScrollToBottom(dom: Element) { + const { scrollTop, clientHeight, scrollHeight } = dom; + return scrollTop === 0; +} + +/** + * F11 进入全屏 + */ +function useToggleFullScreen() { + const userDataState = useSelector((state: RootState) => state.userData); + const dispatch = useDispatch(); + const fullScreen = userDataState.optionData.fullScreen; + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + if (e.code === 'F11') { + e.preventDefault(); + if (fullScreen !== fullScreenOption.on) { + dispatch(setOptionData({ key: 'fullScreen', value: fullScreenOption.on })); + setStorage(); + } else { + dispatch(setOptionData({ key: 'fullScreen', value: fullScreenOption.off })); + setStorage(); + } + } + }; + document.addEventListener('keydown', handleKeyDown); + return () => { + document.removeEventListener('keydown', handleKeyDown); + }; + }, [fullScreen]); +} diff --git a/packages/webgal/src/hooks/useLanguage.ts b/packages/webgal/src/hooks/useLanguage.ts new file mode 100644 index 000000000..7abf88974 --- /dev/null +++ b/packages/webgal/src/hooks/useLanguage.ts @@ -0,0 +1,32 @@ +import { RootState } from '@/store/store'; +import { setOptionData } from '@/store/userDataReducer'; +import { useTranslation } from 'react-i18next'; +import { useDispatch } from 'react-redux'; +import { useGenSyncRef } from './useGenSyncRef'; +import { logger } from '@/Core/util/logger'; +import { setStorage } from '@/Core/controller/storage/storageController'; +import { language } from '@/config/language'; + +export function getLanguageName(lang: language): string { + return language[lang]; +} + +export default function useLanguage() { + const { i18n } = useTranslation(); + const userDataRef = useGenSyncRef((state: RootState) => state.userData); + const dispatch = useDispatch(); + + return (_lang?: language, isSyncStorage = true) => { + const lang = _lang ?? userDataRef.current?.optionData.language ?? language.zhCn; + + const languageName = getLanguageName(lang); + i18n.changeLanguage(languageName); + + dispatch(setOptionData({ key: 'language', value: lang })); + logger.info('设置语言: ' + languageName); + window?.localStorage.setItem('lang', lang.toString()); + if (isSyncStorage) { + setStorage(); + } + }; +} diff --git a/packages/webgal/src/hooks/useLifeCycle.ts b/packages/webgal/src/hooks/useLifeCycle.ts new file mode 100644 index 000000000..e902981b3 --- /dev/null +++ b/packages/webgal/src/hooks/useLifeCycle.ts @@ -0,0 +1,24 @@ +import { useEffect } from 'react'; + +// 挂载 +export function useMounted(callback: Function) { + useEffect(() => { + callback(); + }, []); +} + +// 卸载 +export function useUnMounted(callback: Function) { + useEffect(() => { + return function () { + callback(); + }; + }, []); +} + +// 更新 +export function useUpdated(callback: Function) { + useEffect(() => { + callback(); + }); +} diff --git a/packages/webgal/src/hooks/useNotFirstEffect.ts b/packages/webgal/src/hooks/useNotFirstEffect.ts new file mode 100644 index 000000000..a8baa9bda --- /dev/null +++ b/packages/webgal/src/hooks/useNotFirstEffect.ts @@ -0,0 +1,10 @@ +import { DependencyList, useEffect, useState } from 'react'; + +export default function useNotFirstEffect(callback: () => void, deps: DependencyList) { + const [firstly, setFirstly] = useState<boolean>(false); + + useEffect(() => { + setFirstly(true); + if (firstly) callback(); + }, deps); +} diff --git a/packages/webgal/src/hooks/useSoundEffect.ts b/packages/webgal/src/hooks/useSoundEffect.ts new file mode 100644 index 000000000..f17cab4b8 --- /dev/null +++ b/packages/webgal/src/hooks/useSoundEffect.ts @@ -0,0 +1,59 @@ +import { setStage } from '@/store/stageReducer'; + +import page_flip_1 from '@/assets/se/page-flip-1.mp3'; +import switch_1 from '@/assets/se/switch-1.mp3'; +import mouse_enter from '@/assets/se/mouse-enter.mp3'; +import dialog_se from '@/assets/se/dialog.mp3'; +import click_se from '@/assets/se/click.mp3'; +import { useDispatch } from 'react-redux'; +import { webgalStore } from '@/store/store'; + +/** + * 调用音效 + */ +const useSoundEffect = () => { + const dispatch = useDispatch(); + + const playSeEnter = () => { + dispatch(setStage({ key: 'uiSe', value: mouse_enter })); + }; + const playSeClick = () => { + dispatch(setStage({ key: 'uiSe', value: click_se })); + }; + const playSeSwitch = () => { + dispatch(setStage({ key: 'uiSe', value: switch_1 })); + }; + const playSePageChange = () => { + dispatch(setStage({ key: 'uiSe', value: page_flip_1 })); + }; + + const playSeDialogOpen = () => { + dispatch(setStage({ key: 'uiSe', value: dialog_se })); + }; + + return { + playSeEnter, + playSeClick, + playSePageChange, + playSeDialogOpen, + playSeSwitch, + }; +}; + +/** + * 调用音效(只供 choose.tsx 使用) + */ +export const useSEByWebgalStore = () => { + const playSeEnter = () => { + webgalStore.dispatch(setStage({ key: 'uiSe', value: mouse_enter })); + }; + const playSeClick = () => { + webgalStore.dispatch(setStage({ key: 'uiSe', value: click_se })); + }; + return { + playSeEnter, // 鼠标进入 + playSeClick, // 鼠标点击 + }; +}; + +export default useSoundEffect; diff --git a/packages/webgal/src/hooks/useTextOptions.ts b/packages/webgal/src/hooks/useTextOptions.ts new file mode 100644 index 000000000..b388d0564 --- /dev/null +++ b/packages/webgal/src/hooks/useTextOptions.ts @@ -0,0 +1,23 @@ +import { playSpeed } from '@/store/userDataInterface'; + +export function useTextDelay(type: playSpeed) { + switch (type) { + case playSpeed.slow: + return 80; + case playSpeed.normal: + return 35; + case playSpeed.fast: + return 3; + } +} + +export function useTextAnimationDuration(type: playSpeed) { + switch (type) { + case playSpeed.slow: + return 800; + case playSpeed.normal: + return 350; + case playSpeed.fast: + return 200; + } +} diff --git a/packages/webgal/src/hooks/useTrans.ts b/packages/webgal/src/hooks/useTrans.ts new file mode 100644 index 000000000..85ad09112 --- /dev/null +++ b/packages/webgal/src/hooks/useTrans.ts @@ -0,0 +1,19 @@ +import { useTranslation } from 'react-i18next'; + +/** + * @param prefix 翻译时自动添加的前缀 + * @returns 翻译函数, 输入key时会自动添加前缀, "$" 开头则不填加. 输入多个 key 则会返回翻译数组. + */ +export default function useTrans(prefix?: string) { + const { t } = useTranslation(); + const trans = (key: string) => t(key[0] === '$' ? key.slice(1) : prefix + key); + + function translation(key: string): string; + function translation(key: string, ...keys: string[]): string[]; + function translation(key: string, ...keys: string[]) { + if (keys.length) return [trans(key), ...keys.map((v) => trans(v))]; + return trans(key); + } + + return translation; +} diff --git a/packages/webgal/src/hooks/useValue.ts b/packages/webgal/src/hooks/useValue.ts new file mode 100644 index 000000000..89002fb7b --- /dev/null +++ b/packages/webgal/src/hooks/useValue.ts @@ -0,0 +1,18 @@ +import { useState } from 'react'; + +export function useValue<T>(initialState: T) { + const [value, setValue] = useState<T>(initialState); + return { + _value: value, + set: function (newValue: T) { + this._value = newValue; + setValue(newValue); + }, + get value() { + return this._value; + }, + set value(newValue) { + this.set(newValue); + }, + }; +} diff --git a/packages/webgal/src/index.scss b/packages/webgal/src/index.scss new file mode 100644 index 000000000..475ab2533 --- /dev/null +++ b/packages/webgal/src/index.scss @@ -0,0 +1,177 @@ +@charset "UTF-8"; + +@import "Core/util/constants"; + +@font-face { + font-family: "思源宋体"; + /*noinspection CssUnknownTarget*/ + src: url("assets/fonts/SourceHanSerifCN-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "LXGW"; + /*noinspection CssUnknownTarget*/ + src: url("assets/fonts/LXGWWenKai-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "WebgalUI"; + /*noinspection CssUnknownTarget*/ + src: url("assets/fonts/OPPOSans-R.ttf") format("truetype"); +} + +.StartButton { + animation: StartButton_blink 4s infinite; +} + +@keyframes StartButton_blink { + 0% { + text-shadow: 0 0 15px rgba(0, 0, 0, 0.65); + } + 50% { + text-shadow: 0 0 15px rgba(255, 255, 255, 0.5); + } + 100% { + text-shadow: 0 0 15px rgba(0, 0, 0, 0.65); + } +} + +a { + transition: color 1s; +} + +a:link { + color: #434343; +} + +a:visited { + color: #434343; +} + +a:hover { + color: #434343; +} + +a:active { + color: #434343; +} + +body { + background-color: #000; + font-size: 16px; + margin: 0; + font-family: "WebgalUI", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + overflow: hidden; + user-select: none; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} + +#root { + width: $screenWidth; + height: $screenHeight; + overflow: hidden; + /*position: absolute;*/ + /*top: 0;*/ + font-size: 160%; +} + +/* 设置滚动条的样式 */ +::-webkit-scrollbar { + width: 12px; +} + +/* 滚动槽 */ +::-webkit-scrollbar-track { + box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); + -webkit-box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); + background: rgba(255, 255, 255, 0.2); + border-radius: 10px; +} + +/* 滚动条滑块 */ +::-webkit-scrollbar-thumb { + border-radius: 10px; + background: rgba(255, 255, 255, 0.5); + box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); +} + +#ebg { + height: 100vh; + width: 100vw; + filter: blur(50px); + background-position: center; + background-repeat: no-repeat; + background-size: cover; + position: absolute; + top: 0; + left: 0; +} + +/* ::-webkit-scrollbar-thumb:window-inactive { + background:rgba(255,0,0,0.4); +} */ + +/*@media screen and (orientation: portrait) {*/ +/* !*竖屏 css*!*/ +/* #root {*/ +/* !*transform-origin: calc(100vw / 2) calc(100vw / 2);*!*/ +/* transform: rotate(90deg);*/ +/* width: 1600px;*/ +/* height: 900px;*/ +/* overflow: hidden;*/ +/* }*/ +/*}*/ + +/*@media screen and (orientation: landscape) {*/ +/* !*横屏 css*!*/ +/* #root {*/ +/* width: 1600px;*/ +/* height: 900px;*/ +/* overflow: hidden;*/ +/* }*/ +/*}*/ + + +/*@media screen and (max-width: 1100px) {*/ +/* !*手机端视图*!*/ +/* #root {*/ +/* font-size: 50%;*/ +/* }*/ +/*}*/ + +/*@media screen and (max-height: 650px) {*/ +/* !*手机端视图*!*/ +/* #root {*/ +/* font-size: 50%;*/ +/* }*/ +/*}*/ + +.App { + height: 100%; + width: 100%; + background: rgba(0, 0, 0, 1); + overflow: hidden; + perspective: 0; + -webkit-overflow-scrolling: auto; +} + +*{ + /*-webkit-overflow-scrolling: auto;*/ +} + +#pixiCanvas{ + z-index: 5; +} + +#root{ + /*will-change: transform;*/ +} diff --git a/packages/webgal/src/main.tsx b/packages/webgal/src/main.tsx new file mode 100644 index 000000000..78d0b4e25 --- /dev/null +++ b/packages/webgal/src/main.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.scss'; +import App from './App'; +import './assets/style/animation.scss'; +import 'modern-css-reset/dist/reset.min.css'; + +/** + * i18n + */ +import i18n from 'i18next'; +import { initReactI18next, Trans } from 'react-i18next'; +import { defaultLanguage, i18nTranslationResources, language } from './config/language'; +import { webgalStore } from './store/store'; +import { Provider } from 'react-redux'; + +i18n + .use(initReactI18next) // passes i18n down to react-i18next + .init({ + // the translations + // (tip move them in a JSON file and import them, + // or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui) + resources: i18nTranslationResources || {}, + lng: language[defaultLanguage] || 'zhCn', // if you're using a language detector, do not define the lng option + fallbackLng: 'zhCn', + + interpolation: { + escapeValue: false, // react already safes from xss => https://www.i18next.com/translation-function/interpolation#unescape + }, + }) + .then(() => console.log('WebGAL i18n Ready!')); + +// eslint-disable-next-line react/no-deprecated +ReactDOM.render( + <React.StrictMode> + <Trans> + <Provider store={webgalStore}> + <App /> + </Provider> + </Trans> + </React.StrictMode>, + document.getElementById('root'), +); diff --git a/packages/webgal/src/store/GUIReducer.ts b/packages/webgal/src/store/GUIReducer.ts new file mode 100644 index 000000000..8eb91875c --- /dev/null +++ b/packages/webgal/src/store/GUIReducer.ts @@ -0,0 +1,130 @@ +/** + * @file 记录当前GUI的状态信息,引擎初始化时会重置。 + * @author Mahiru + */ +import { getStorage } from '@/Core/controller/storage/storageController'; +import { GuiAsset, IGuiState, MenuPanelTag, setAssetPayload, setVisibilityPayload } from '@/store/guiInterface'; +import { createSlice, PayloadAction } from '@reduxjs/toolkit'; +import { key } from 'localforage'; + +/** + * 初始GUI状态表 + */ +const initState: IGuiState = { + showBacklog: false, + showStarter: true, + showTitle: true, + showMenuPanel: false, + showTextBox: true, + showControls: true, + controlsVisibility: true, + currentMenuTag: MenuPanelTag.Option, + titleBg: '', + titleBgm: '', + logoImage: [], + showExtra: false, + showGlobalDialog: false, + showPanicOverlay: false, + isEnterGame: false, + isShowLogo: true, +}; + +/** + * GUI状态的Reducer + */ +const GUISlice = createSlice({ + name: 'gui', + initialState: initState, + reducers: { + /** + * 设置GUI的各组件的显示状态 + * @param state 当前GUI状态 + * @param action 改变显示状态的Action + */ + setVisibility: (state, action: PayloadAction<setVisibilityPayload>) => { + getStorage(); + const { component, visibility } = action.payload; + state[component] = visibility; + }, + /** + * 设置MenuPanel的当前选中项 + * @param state 当前GUI状态 + * @param action 改变当前选中项的Action + */ + setMenuPanelTag: (state, action: PayloadAction<MenuPanelTag>) => { + getStorage(); + state.currentMenuTag = action.payload; + }, + /** + * 设置GUI资源的值 + * @param state 当前GUI状态 + * @param action 改变资源的Action + */ + setGuiAsset: (state, action: PayloadAction<setAssetPayload>) => { + const { asset, value } = action.payload; + state[asset] = value; + }, + setLogoImage: (state, action: PayloadAction<string[]>) => { + state.logoImage = [...action.payload]; + }, + }, +}); + +export const { setVisibility, setMenuPanelTag, setGuiAsset, setLogoImage } = GUISlice.actions; +export default GUISlice.reducer; + +// export function GuiStateStore(): GuiStore { +// const [GuiState, setGuiState] = useState(initState); +// /** +// * 设置各组件的可见性 +// * @param key 设置的组件 +// * @param value 可见性,true or false +// */ +// const setVisibility = <K extends keyof componentsVisibility>(key: K, value: boolean) => { +// +// setGuiState(state => { +// getStorage(); +// state[key] = value; +// if (key === 'showMenuPanel' || key === 'showBacklog') { +// state['showTextBox'] = !value; +// } +// return {...state}; +// }); +// +// }; +// +// /** +// * 设置Menu组件显示的标签页 +// * @param value 标签页 +// */ +// const setMenuPanelTag = (value: MenuPanelTag) => { +// +// setGuiState(state => { +// getStorage(); +// state.currentMenuTag = value; +// return {...state}; +// }); +// +// }; +// +// /** +// * 设置标题页的资源路径 +// * @param key 资源名 +// * @param value 资源路径 +// */ +// const setGuiAsset = <K extends keyof GuiAsset>(key: K, value: string) => { +// +// setGuiState(state => { +// state[key] = value; +// return {...state}; +// }); +// +// }; +// +// return { +// GuiState, +// setGuiAsset, +// setVisibility, +// setMenuPanelTag, +// }; +// } diff --git a/packages/webgal/src/store/guiInterface.ts b/packages/webgal/src/store/guiInterface.ts new file mode 100644 index 000000000..845c7e652 --- /dev/null +++ b/packages/webgal/src/store/guiInterface.ts @@ -0,0 +1,58 @@ +import { IWebGalTextBoxTheme } from '@/Stage/themeInterface'; + +/** + * 当前Menu页面显示的Tag + */ +export enum MenuPanelTag { + Save, // “保存”选项卡 + Load, // “读取”选项卡 + Option, // “设置”选项卡 +} + +/** + * @interface IGuiState GUI状态接口 + */ +export interface IGuiState { + showStarter: boolean; // 是否显示初始界面(用于使得bgm可以播放) + showTitle: boolean; // 是否显示标题界面 + showMenuPanel: boolean; // 是否显示Menu界面 + showTextBox: boolean; + showControls: boolean; + controlsVisibility: boolean; + currentMenuTag: MenuPanelTag; // 当前Menu界面的选项卡 + showBacklog: boolean; + titleBgm: string; // 标题背景音乐 + titleBg: string; // 标题背景图片 + logoImage: string[]; + showExtra: boolean; + showGlobalDialog: boolean; + showPanicOverlay: boolean; + isEnterGame: boolean; + isShowLogo: boolean; +} + +export type componentsVisibility = Pick< + IGuiState, + Exclude<keyof IGuiState, 'currentMenuTag' | 'titleBg' | 'titleBgm' | 'logoImage' | 'theme'> +>; +// 标题资源 +export type GuiAsset = Pick<IGuiState, 'titleBgm' | 'titleBg'>; + +export interface IGuiStore { + GuiState: IGuiState; + setGuiAsset: <K extends keyof GuiAsset>(key: K, value: string) => void; + setVisibility: <K extends keyof componentsVisibility>(key: K, value: boolean) => void; + setMenuPanelTag: (value: MenuPanelTag) => void; +} + +export interface setVisibilityPayload { + component: keyof componentsVisibility; + visibility: boolean; +} + +export interface setAssetPayload { + asset: keyof GuiAsset; + value: string; +} + +export type GuiStore = IGuiStore; diff --git a/packages/webgal/src/store/savesReducer.ts b/packages/webgal/src/store/savesReducer.ts new file mode 100644 index 000000000..e4e4f4b0e --- /dev/null +++ b/packages/webgal/src/store/savesReducer.ts @@ -0,0 +1,45 @@ +import { ISaveData } from './userDataInterface'; +import { createSlice, PayloadAction } from '@reduxjs/toolkit'; +import cloneDeep from 'lodash/cloneDeep'; + +export interface ISavesData { + saveData: Array<ISaveData>; // 用户存档数据 + quickSaveData: ISaveData | null; +} + +const initState: ISavesData = { + saveData: [], + quickSaveData: null, +}; + +interface SaveAction { + saveData: ISaveData; + index: number; +} + +const saveDataSlice = createSlice({ + name: 'saveData', + initialState: cloneDeep(initState), + reducers: { + setFastSave: (state, action: PayloadAction<ISaveData | null>) => { + state.quickSaveData = action.payload; + }, + resetFastSave: (state) => { + state.quickSaveData = null; + }, + resetSaves: (state) => { + state.quickSaveData = null; + state.saveData = []; + }, + saveGame: (state, action: PayloadAction<SaveAction>) => { + state.saveData[action.payload.index] = action.payload.saveData; + }, + replaceSaveGame: (state, action: PayloadAction<ISaveData[]>) => { + state.saveData = action.payload; + }, + }, +}); + +export const saveActions = saveDataSlice.actions; + +export default saveDataSlice.reducer; diff --git a/packages/webgal/src/store/stageInterface.ts b/packages/webgal/src/store/stageInterface.ts new file mode 100644 index 000000000..e1f7633b7 --- /dev/null +++ b/packages/webgal/src/store/stageInterface.ts @@ -0,0 +1,186 @@ +import { ISentence } from '@/Core/controller/scene/sceneInterface'; + +/** + * 游戏内变量 + * @interface IGameVar + */ +export interface IGameVar { + [propName: string]: string | boolean | number | Array<string | boolean | number>; +} + +export interface ISetGameVar { + key: string; + value: string | boolean | number; +} + +/** + * 单个选项 + * @interface IChooseItem + */ +export interface IChooseItem { + key: string; // 选项名称 + targetScene: string; // 选项target + isSubScene: boolean; // 是否是子场景调用 +} + +export interface ITransform { + alpha: number; + scale: { + x: number; + y: number; + }; + // pivot: { + // x: number; + // y: number; + // }; + position: { + x: number; + y: number; + }; + rotation: number; + blur: number; +} + +/** + * 基本效果接口 + * @interface IEffect + */ +export interface IEffect { + target: string; // 作用目标 + transform?: ITransform; // 变换 +} + +/** + * 基本变换预设 + */ +export const baseTransform: ITransform = { + alpha: 1, + scale: { + x: 1, + y: 1, + }, + // pivot: { + // x: 0.5, + // y: 0.5, + // }, + position: { + x: 0, + y: 0, + }, + rotation: 0, + blur: 0, +}; + +export interface IFreeFigure { + basePosition: 'left' | 'center' | 'right'; + name: string; + key: string; +} + +export interface IFigureAssociatedAnimation { + mouthAnimation: IMouthAnimationFile; + blinkAnimation: IEyesAnimationFile; + targetId: string; + animationFlag: string; +} + +export interface IMouthAnimationFile { + open: string; + close: string; + halfOpen: string; +} + +export interface IEyesAnimationFile { + open: string; + close: string; +} + +/** + * 启动演出接口 + * @interface IRunPerform + */ +export interface IRunPerform { + id: string; + isHoldOn: boolean; // 演出类型 + script: ISentence; // 演出脚本 +} + +export interface ILive2DMotion { + target: string; + motion: string; + overrideBounds?: [number, number, number, number]; +} + +export interface ILive2DExpression { + target: string; + expression: string; +} + +export interface IFigureMetadata { + zIndex?: number; +} + +type figureMetaData = Record<string, IFigureMetadata>; + +/** + * @interface IStageState 游戏舞台数据接口 + */ +export interface IStageState { + oldBgName: string; // 旧背景的文件路径 + bgName: string; // 背景文件地址(相对或绝对) + figName: string; // 立绘_中 文件地址(相对或绝对) + figNameLeft: string; // 立绘_左 文件地址(相对或绝对) + figNameRight: string; // 立绘_右 文件地址(相对或绝对) + // 自由立绘 + freeFigure: Array<IFreeFigure>; + figureAssociatedAnimation: Array<IFigureAssociatedAnimation>; + showText: string; // 文字 + showTextSize: number; // 文字 + showName: string; // 人物名 + command: string; // 语句指令 + choose: Array<IChooseItem>; // 选项列表 + vocal: string; // 语音 文件地址(相对或绝对) + playVocal: string; // 真实播放语音 + vocalVolume: number; // 语音 音量调整(0 - 100) + bgm: { + // 背景音乐 + src: string; // 背景音乐 文件地址(相对或绝对) + enter: number; // 背景音乐 淡入或淡出的毫秒数 + volume: number; // 背景音乐 音量调整(0 - 100) + }; + uiSe: string; // 用户界面音效 文件地址(相对或绝对) + miniAvatar: string; // 小头像 文件地址(相对或绝对) + GameVar: IGameVar; // 游戏内变量 + effects: Array<IEffect>; // 应用的变换 + bgTransform: string; + bgFilter: string; + PerformList: Array<IRunPerform>; // 要启动的演出列表 + currentDialogKey: string; // 当前对话的key + live2dMotion: ILive2DMotion[]; + live2dExpression: ILive2DExpression[]; + // 当前演出的延迟,用于做对话插演出! + // currentPerformDelay:number + currentConcatDialogPrev: string; + // 测试:电影叙事 + enableFilm: string; + isDisableTextbox: boolean; + replacedUIlable: Record<string, string>; + figureMetaData: figureMetaData; +} + +/** + * @interface ISetStagePayload 设置舞台状态的Action的Payload的数据接口 + */ +export interface ISetStagePayload { + key: keyof IStageState; + value: any; +} + +export interface IStageStore { + stageState: IStageState; + setStage: <K extends keyof IStageState>(key: K, value: any) => void; + getStageState: () => IStageState; + restoreStage: (newState: IStageState) => void; +} + +export type StageStore = IStageStore; diff --git a/packages/webgal/src/store/stageReducer.ts b/packages/webgal/src/store/stageReducer.ts new file mode 100644 index 000000000..beb7f6cca --- /dev/null +++ b/packages/webgal/src/store/stageReducer.ts @@ -0,0 +1,274 @@ +/** + * 所有会被Save和Backlog记录下的信息,构成当前的舞台状态(也包括游戏运行时变量) + * 舞台状态是演出结束后的“终态”,在读档时不发生演出,只是将舞台状态替换为读取的状态。 + */ + +import { + IEffect, + IFigureMetadata, + IFreeFigure, + ILive2DExpression, + ILive2DMotion, + IRunPerform, + ISetGameVar, + ISetStagePayload, + IStageState, +} from '@/store/stageInterface'; +import { createSlice, PayloadAction } from '@reduxjs/toolkit'; +import cloneDeep from 'lodash/cloneDeep'; +import { commandType } from '@/Core/controller/scene/sceneInterface'; +import { STAGE_KEYS } from '@/Core/constants'; + +// 初始化舞台数据 + +export const initState: IStageState = { + oldBgName: '', + bgName: '', // 背景文件地址(相对或绝对) + figName: '', // 立绘_中 文件地址(相对或绝对) + figNameLeft: '', // 立绘_左 文件地址(相对或绝对) + figNameRight: '', // 立绘_右 文件地址(相对或绝对) + freeFigure: [], + figureAssociatedAnimation: [], + showText: '', // 文字 + showTextSize: -1, + showName: '', // 人物名 + command: '', // 语句指令 + choose: [], // 选项列表,现在不用,先预留 + vocal: '', // 语音 文件地址(相对或绝对) + playVocal: '', // 语音,真实的播放音频 + vocalVolume: 100, // 语音 音量调整(0 - 100) + bgm: { + // 背景音乐 + src: '', // 背景音乐 文件地址(相对或绝对) + enter: 0, // 背景音乐 淡入或淡出的毫秒数 + volume: 100, // 背景音乐 音量调整(0 - 100) + }, + uiSe: '', // 用户界面音效 文件地址(相对或绝对) + miniAvatar: '', // 小头像 文件地址(相对或绝对) + GameVar: {}, // 游戏内变量 + effects: [], // 应用的效果 + bgFilter: '', // 现在不用,先预留 + bgTransform: '', // 现在不用,先预留 + PerformList: [], // 要启动的演出列表 + currentDialogKey: 'initial', + live2dMotion: [], + live2dExpression: [], + // currentPerformDelay: 0 + currentConcatDialogPrev: '', + enableFilm: '', + isDisableTextbox: false, + replacedUIlable: {}, + figureMetaData: {}, +}; + +/** + * 创建舞台的状态管理 + */ +const stageSlice = createSlice({ + name: 'stage', + initialState: cloneDeep(initState), + reducers: { + /** + * 替换舞台状态 + * @param state 当前状态 + * @param action 替换的状态 + */ + resetStageState: (state, action: PayloadAction<IStageState>) => { + Object.assign(state, action.payload); + }, + /** + * 设置舞台状态 + * @param state 当前状态 + * @param action 要替换的键值对 + */ + setStage: (state, action: PayloadAction<ISetStagePayload>) => { + // @ts-ignore + state[action.payload.key] = action.payload.value; + }, + /** + * 修改舞台状态变量 + * @param state 当前状态 + * @param action 要改变或添加的变量 + */ + setStageVar: (state, action: PayloadAction<ISetGameVar>) => { + state.GameVar[action.payload.key] = action.payload.value; + }, + updateEffect: (state, action: PayloadAction<IEffect>) => { + const { target, transform } = action.payload; + // 如果找不到目标,不能设置 transform + const activeTargets = [ + STAGE_KEYS.BGMAIN, + STAGE_KEYS.FIG_C, + STAGE_KEYS.FIG_L, + STAGE_KEYS.FIG_R, + ...state.freeFigure.map((figure) => figure.key), + ]; + if (!activeTargets.includes(target)) return; + // 尝试找到待修改的 Effect + const effectIndex = state.effects.findIndex((e) => e.target === target); + if (effectIndex >= 0) { + // Update the existing effect + state.effects[effectIndex].transform = transform; + } else { + // Add a new effect + state.effects.push({ + target, + transform, + }); + } + }, + removeEffectByTargetId: (state, action: PayloadAction<string>) => { + const index = state.effects.findIndex((e) => e.target === action.payload); + if (index >= 0) { + state.effects.splice(index, 1); + } + }, + addPerform: (state, action: PayloadAction<IRunPerform>) => { + // 先检查是否有重复的,全部干掉 + const dupPerformIndex = state.PerformList.findIndex((p) => p.id === action.payload.id); + if (dupPerformIndex > -1) { + const dupId = action.payload.id; + // 删除全部重复演出 + for (let i = 0; i < state.PerformList.length; i++) { + const performItem: IRunPerform = state.PerformList[i]; + if (performItem.id === dupId) { + state.PerformList.splice(i, 1); + i--; + } + } + } + state.PerformList.push(action.payload); + }, + removePerformByName: (state, action: PayloadAction<string>) => { + for (let i = 0; i < state.PerformList.length; i++) { + const performItem: IRunPerform = state.PerformList[i]; + if (performItem.id === action.payload) { + state.PerformList.splice(i, 1); + i--; + } + } + }, + removeAllPerform: (state) => { + state.PerformList.splice(0, state.PerformList.length); + }, + removeAllPixiPerforms: (state, action: PayloadAction<undefined>) => { + for (let i = 0; i < state.PerformList.length; i++) { + const performItem: IRunPerform = state.PerformList[i]; + if (performItem.script.command === commandType.pixi) { + state.PerformList.splice(i, 1); + i--; + } + } + }, + setFreeFigureByKey: (state, action: PayloadAction<IFreeFigure>) => { + const currentFreeFigures = state.freeFigure; + const newFigure = action.payload; + const index = currentFreeFigures.findIndex((figure) => figure.key === newFigure.key); + if (index >= 0) { + if (newFigure.name === '') { + // 删掉立绘和相关的动画 + currentFreeFigures.splice(index, 1); + const figureAssociatedAnimationIndex = state.figureAssociatedAnimation.findIndex( + (a) => a.targetId === newFigure.key, + ); + state.figureAssociatedAnimation.splice(figureAssociatedAnimationIndex, 1); + } else { + currentFreeFigures[index].basePosition = newFigure.basePosition; + currentFreeFigures[index].name = newFigure.name; + } + } else { + // 新加 + if (newFigure.name !== '') currentFreeFigures.push(newFigure); + } + }, + setLive2dMotion: (state, action: PayloadAction<ILive2DMotion>) => { + const { target, motion, overrideBounds } = action.payload; + + const index = state.live2dMotion.findIndex((e) => e.target === target); + + if (index < 0) { + // Add a new motion + state.live2dMotion.push({ target, motion, overrideBounds }); + } else { + // Update the existing motion + state.live2dMotion[index].motion = motion; + state.live2dMotion[index].overrideBounds = overrideBounds; + } + }, + setLive2dExpression: (state, action: PayloadAction<ILive2DExpression>) => { + const { target, expression } = action.payload; + + const index = state.live2dExpression.findIndex((e) => e.target === target); + + if (index < 0) { + // Add a new expression + state.live2dExpression.push({ target, expression }); + } else { + // Update the existing expression + state.live2dExpression[index].expression = expression; + } + }, + replaceUIlable: (state, action: PayloadAction<[string, string]>) => { + state.replacedUIlable[action.payload[0]] = action.payload[1]; + }, + /** + * 设置 figure 元数据 [立绘 key, metadata key, 值, 是否重设] + * @param state + * @param action + */ + setFigureMetaData: (state, action: PayloadAction<[string, keyof IFigureMetadata, any, undefined | boolean]>) => { + // 立绘退出,重设 + if (action.payload[3]) { + if (state.figureMetaData[action.payload[0]]) delete state.figureMetaData[action.payload[0]]; + } else { + // 初始化对象 + if (!state.figureMetaData[action.payload[0]]) { + state.figureMetaData[action.payload[0]] = {}; + } + state.figureMetaData[action.payload[0]][action.payload[1]] = action.payload[2]; + } + }, + }, +}); + +export const { resetStageState, setStage, setStageVar } = stageSlice.actions; +export const stageActions = stageSlice.actions; +export default stageSlice.reducer; + +// /** +// * 创建舞台的状态管理 +// * @return {IStageState} 舞台状态 +// * @return {function} 改变舞台状态 +// */ +// export function stageStateStore():StageStore { +// const [stageState, setStageState] = useState(_.cloneDeep(initState)); +// +// /** +// * 设置舞台状态,以后会改 +// * @param key +// * @param value +// */ +// const setStage = <K extends keyof IStageState>(key: K, value: any) => { +// +// setStageState(state => { +// state[key] = value; +// return {...state}; +// }); +// +// }; +// +// const getStageState = () => { +// return stageState; +// }; +// +// const restoreStage = (newState: IStageState) => { +// setStageState((state) => ({ ...state, ...newState })); +// }; +// +// return { +// stageState, +// setStage, +// getStageState, +// restoreStage, +// }; +// } diff --git a/packages/webgal/src/store/store.ts b/packages/webgal/src/store/store.ts new file mode 100644 index 000000000..e31b9d900 --- /dev/null +++ b/packages/webgal/src/store/store.ts @@ -0,0 +1,23 @@ +import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit'; +import stageReducer from '@/store/stageReducer'; +import GUIReducer from '@/store/GUIReducer'; +import userDataReducer from '@/store/userDataReducer'; +import savesReducer from '@/store/savesReducer'; + +/** + * WebGAL 全局状态管理 + */ +export const webgalStore = configureStore({ + reducer: { + stage: stageReducer, + GUI: GUIReducer, + userData: userDataReducer, + saveData: savesReducer, + }, + middleware: getDefaultMiddleware({ + serializableCheck: false, + }), +}); + +// 在 TS 中的类型声明 +export type RootState = ReturnType<typeof webgalStore.getState>; diff --git a/packages/webgal/src/store/userDataInterface.ts b/packages/webgal/src/store/userDataInterface.ts new file mode 100644 index 000000000..626544ded --- /dev/null +++ b/packages/webgal/src/store/userDataInterface.ts @@ -0,0 +1,119 @@ +import { IGameVar, IStageState } from './stageInterface'; +import { language } from '@/config/language'; +import { IBacklogItem } from '@/Core/Modules/backlog'; +import { ISceneEntry } from '@/Core/Modules/scene'; + +/** + * 播放速度的枚举类型 + */ +export enum playSpeed { + slow, // 慢 + normal, // 中 + fast, // 快 +} + +export enum textSize { + small, + medium, + large, +} + +export enum textFont { + song, + hei, + lxgw, +} + +export enum voiceOption { + yes, + no, +} + +export enum fullScreenOption { + on, + off, +} + +/** + * @interface IOptionData 用户设置数据接口 + */ +export interface IOptionData { + volumeMain: number; // 主音量 + textSpeed: playSpeed; // 文字速度 + autoSpeed: playSpeed; // 自动播放速度 + textSize: textSize; + vocalVolume: number; // 语音音量 + bgmVolume: number; // 背景音乐音量 + seVolume: number; // 音效音量 + uiSeVolume: number; // 用户界面音效音量 + slPage: number; // 存读档界面所在页面 + textboxFont: textFont; + textboxOpacity: number; + language: language; + voiceInterruption: voiceOption; // 是否中断语音 + fullScreen: fullScreenOption; +} + +/** + * 场景存档接口 + * @interface ISaveScene + */ +export interface ISaveScene { + currentSentenceId: number; // 当前语句ID + sceneStack: Array<ISceneEntry>; // 场景栈 + sceneName: string; // 场景名称 + sceneUrl: string; // 场景url +} + +/** + * @interface ISaveData 存档文件接口 + */ +export interface ISaveData { + nowStageState: IStageState; + backlog: Array<IBacklogItem>; // 舞台数据 + index: number; // 存档的序号 + saveTime: string; // 保存时间 + sceneData: ISaveScene; // 场景数据 + previewImage: string; +} + +export interface IAppreciationAsset { + name: string; + url: string; + series: string; +} + +export interface IAppreciation { + bgm: Array<IAppreciationAsset>; + cg: Array<IAppreciationAsset>; +} + +/** + * @interface IUserData 用户数据接口 + */ +export interface IUserData { + scriptManagedGlobalVar: string[]; + globalGameVar: IGameVar; // 不跟随存档的全局变量 + optionData: IOptionData; // 用户设置选项数据 + appreciationData: IAppreciation; +} + +export interface ISetUserDataPayload { + key: keyof IUserData; + value: any; +} + +export interface ISetOptionDataPayload { + key: keyof IOptionData; + value: any; +} + +export interface IUserDataStore { + userDataState: IUserData; + setUserData: <K extends keyof IUserData>(key: K, value: any) => void; + replaceUserData: (newUserData: IUserData) => void; + setOptionData: <K extends keyof IOptionData>(key: K, value: any) => void; + setSlPage: (index: number) => void; +} + +export type UserDataStore = IUserDataStore; diff --git a/packages/webgal/src/store/userDataReducer.ts b/packages/webgal/src/store/userDataReducer.ts new file mode 100644 index 000000000..a70827073 --- /dev/null +++ b/packages/webgal/src/store/userDataReducer.ts @@ -0,0 +1,207 @@ +/** + * 用于存储与本地存储交换的状态信息。 + * 这些状态会在指定的生命周期与本地存储发生交换,比如打开存档界面、存档、修改设置时。 + * 在引擎初始化时会将这些状态从本地存储加载到运行时状态。 + */ +import { language } from '@/config/language'; +import { + IAppreciationAsset, + IOptionData, + ISaveData, + ISetOptionDataPayload, + ISetUserDataPayload, + IUserData, + fullScreenOption, + playSpeed, + textFont, + textSize, + voiceOption, +} from '@/store/userDataInterface'; +import { createSlice, PayloadAction } from '@reduxjs/toolkit'; +import cloneDeep from 'lodash/cloneDeep'; +import { ISetGameVar } from './stageInterface'; + +const initialOptionSet: IOptionData = { + slPage: 1, + volumeMain: 100, // 主音量 + textSpeed: playSpeed.normal, // 文字速度 + autoSpeed: playSpeed.normal, // 自动播放速度 + textSize: textSize.medium, + vocalVolume: 100, // 语音音量 + bgmVolume: 25, // 背景音乐音量 + seVolume: 100, // 音效音量 + uiSeVolume: 50, // UI音效音量 + textboxFont: textFont.song, + textboxOpacity: 75, + language: language.zhCn, + voiceInterruption: voiceOption.yes, + fullScreen: fullScreenOption.off, +}; + +// 初始化用户数据 +export const initState: IUserData = { + optionData: initialOptionSet, + scriptManagedGlobalVar: [], + globalGameVar: {}, + appreciationData: { + bgm: [], + cg: [], + }, +}; + +const userDataSlice = createSlice({ + name: 'userData', + initialState: cloneDeep(initState), + reducers: { + /** + * 设置用户数据 + * @param state + * @param action + */ + setUserData: (state, action: PayloadAction<ISetUserDataPayload>) => { + const { key, value } = action.payload; + state[key] = value; + }, + unlockCgInUserData: (state, action: PayloadAction<IAppreciationAsset>) => { + const { name, url, series } = action.payload; + // 检查是否存在 + let isExist = false; + state.appreciationData.cg.forEach((e) => { + if (url === e.url) { + isExist = true; + e.url = url; + e.series = series; + } + }); + if (!isExist) { + state.appreciationData.cg.push(action.payload); + } + }, + unlockBgmInUserData: (state, action: PayloadAction<IAppreciationAsset>) => { + const { name, url, series } = action.payload; + // 检查是否存在 + let isExist = false; + state.appreciationData.bgm.forEach((e) => { + if (url === e.url) { + isExist = true; + e.url = url; + e.series = series; + } + }); + if (!isExist) { + state.appreciationData.bgm.push(action.payload); + } + }, + /** + * 替换用户数据 + * @param state + * @param action + */ + resetUserData: (state, action: PayloadAction<IUserData>) => { + Object.assign(state, action.payload); + }, + /** + * 设置选项数据 + * @param state + * @param action + */ + setOptionData: (state, action: PayloadAction<ISetOptionDataPayload>) => { + const { key, value } = action.payload; + (state.optionData as any)[key] = value; + }, + /** + * 修改不跟随存档的全局变量 + * @param state 当前状态 + * @param action 要改变或添加的变量 + */ + setGlobalVar: (state, action: PayloadAction<ISetGameVar>) => { + const isRegistedInUserData = state.scriptManagedGlobalVar.findIndex((key) => key === action.payload.key) >= 0; + if (!isRegistedInUserData) { + state.globalGameVar[action.payload.key] = action.payload.value; + } + }, + setScriptManagedGlobalVar: (state, action: PayloadAction<ISetGameVar>) => { + const isRegistedInUserData = state.scriptManagedGlobalVar.findIndex((key) => key === action.payload.key) >= 0; + state.globalGameVar[action.payload.key] = action.payload.value; + if (!isRegistedInUserData) { + state.scriptManagedGlobalVar.push(action.payload.key); + } + }, + /** + * 设置存档/读档页面 + * @param state + * @param action + */ + setSlPage: (state, action: PayloadAction<number>) => { + state.optionData.slPage = action.payload; + }, + resetOptionSet(state) { + Object.assign(state.optionData, initialOptionSet); + }, + resetAllData(state) { + Object.assign(state, cloneDeep(initState)); + }, + }, +}); + +export const { + setUserData, + resetUserData, + setOptionData, + setGlobalVar, + setScriptManagedGlobalVar, + setSlPage, + unlockCgInUserData, + unlockBgmInUserData, + resetOptionSet, + resetAllData, +} = userDataSlice.actions; +export default userDataSlice.reducer; + +// /** +// * 创建用户数据的状态管理 +// * @return {IUserData} 用户数据 +// * @return {function} 改变用户数据 +// */ +// export function userDataStateStore():UserDataStore { +// const [userDataState, setUserDataState] = useState(initState); +// +// // 设置用户数据 +// const setUserData = <K extends keyof IUserData>(key: K, value: any) => { +// +// setUserDataState(state => { +// state[key] = value; +// return {...state}; +// }); +// +// }; +// +// // 替换用户数据(多用于与本地存储交互) +// const replaceUserData = (newUserData: IUserData) => { +// +// setUserDataState(state => ({...state, ...newUserData})); +// }; +// +// const setOptionData = <K extends keyof IOptionData>(key: K, value: any) => { +// setUserDataState(state => { +// state.optionData[key] = value; +// return {...state}; +// }); +// }; +// +// const setSlPage = (index: number) => { +// setUserDataState(state => { +// state.optionData.slPage = index; +// return {...state}; +// }); +// +// }; +// +// return { +// userDataState, +// setUserData, +// replaceUserData, +// setOptionData, +// setSlPage, +// }; +// } diff --git a/packages/webgal/src/translations/de.ts b/packages/webgal/src/translations/de.ts new file mode 100644 index 000000000..06295bade --- /dev/null +++ b/packages/webgal/src/translations/de.ts @@ -0,0 +1,177 @@ +const de = { + // 通用 + common: { + yes: 'Ja', + no: 'Nein', + }, + + menu: { + options: { + title: 'OPTIONEN', + pages: { + system: { + title: 'System', + options: { + autoSpeed: { + title: 'Auto-Geschwindigkeit', + options: { + slow: 'Langsam', + medium: 'Normal', + fast: 'Schnell', + }, + }, + language: { + title: 'Sprache', + }, + resetData: { + title: 'Daten löschen oder zurücksetzen', + options: { + clearGameSave: 'Alle Spielstände löschen', + resetSettings: 'Alle Einstellungen zurücksetzen', + clearAll: 'Alle Daten löschen', + }, + dialogs: { + clearGameSave: 'Sind Sie sicher, dass Sie den Spielstand löschen möchten?', + resetSettings: 'Sind Sie sicher, dass Sie alle Einstellungen zurücksetzen möchten?', + clearAll: 'Sind Sie sicher, dass Sie alle Daten löschen möchten?', + }, + }, + gameSave: { + title: 'Spielstand und Optionen importieren oder exportieren', + options: { + export: 'Spielstand und Optionen exportieren', + import: 'Spielstand und Optionen importieren', + }, + dialogs: { + import: { + title: 'Sind Sie sicher, dass Sie den Spielstand und die Optionen importieren möchten?', + tip: 'Spielstand importieren', + error: 'Ein Fehler ist beim Analysieren des Spielstands aufgetreten', + }, + }, + }, + about: { + title: 'Über WebGAL', + subTitle: 'WebGAL: Eine Open-Source Web-Based Visual Novel Engine', + version: 'Version', + source: 'Source Code Repository', + contributors: 'Contributors', + website: 'Website', + }, + }, + }, + display: { + title: 'Darstellung', + options: { + textSpeed: { + title: 'Geschwindigkeit der Textanzeige', + options: { + slow: 'Langsam', + medium: 'Normal', + fast: 'Schnell', + }, + }, + textSize: { + title: 'Textgröße', + options: { + small: 'Klein', + medium: 'Normal', + large: 'Groß', + }, + }, + textFont: { + title: 'Schriftart', + options: { + siYuanSimSun: 'Source Han Serif', + SimHei: 'Sans', + lxgw: 'LXGW WenKai', + }, + }, + textboxOpacity: { + title: 'Textbox Opacity', + }, + textPreview: { + title: 'Vorschautext wird angezeigt', + text: 'Sie können jederzeit die Schriftart, Größe und Wiedergabegeschwindigkeit des Textes nach Ihrer Vorliebe anpassen.', + }, + }, + }, + sound: { + title: 'Ton', + options: { + volumeMain: { title: 'Hauptlautstärke' }, + vocalVolume: { title: 'Stimmlautstärke' }, + bgmVolume: { title: 'Musiklautstärke' }, + seVolume: { title: 'Soundeffektlautstärke' }, + uiSeVolume: { title: 'UI Soundeffektlautstärke' }, + }, + }, + // language: { + // title: 'Sprache', + // options: { + // }, + // }, + }, + }, + saving: { + title: 'SPEICHERN', + isOverwrite: 'Sind Sie sicher, dass Sie diesen Spielstand überschreiben möchten?', + }, + loadSaving: { + title: 'LADEN', + }, + title: { + title: 'TITEL', + }, + exit: { + title: 'ZURÜCK', + }, + }, + + title: { + start: { + title: 'STARTEN', + subtitle: '', + }, + continue: { + title: 'WEITERLESEN', + subtitle: '', + }, + options: { + title: 'OPTIONEN', + subtitle: '', + }, + load: { + title: 'LADEN', + subtitle: '', + }, + extra: { + title: 'EXTRA', + subtitle: '', + }, + }, + + gaming: { + noSaving: 'Keine Speicherung', + buttons: { + hide: 'Verstecken', + show: 'Anzeigen', + backlog: 'Verlauf', + replay: 'Wiedergabe', + auto: 'Auto', + forward: 'Überspringen', + quicklySave: 'Quickly Save', + quicklyLoad: 'Quickly Load', + save: 'Speichern', + load: 'Laden', + options: 'Optionen', + title: 'Titel', + }, + }, + + extra: { + title: 'EXTRA', + }, +}; + +export default de; diff --git a/packages/webgal/src/translations/en.ts b/packages/webgal/src/translations/en.ts new file mode 100644 index 000000000..c4b98f739 --- /dev/null +++ b/packages/webgal/src/translations/en.ts @@ -0,0 +1,185 @@ +const en = { + // 通用 + common: { + yes: 'OK', + no: 'Cancel', + }, + + menu: { + options: { + title: 'OPTIONS', + pages: { + system: { + title: 'System', + options: { + autoSpeed: { + title: 'Autoplay Speed', + options: { + slow: 'Slow', + medium: 'Medium', + fast: 'Fast', + }, + }, + language: { + title: 'Language', + }, + resetData: { + title: 'Clear or Reset Data', + options: { + clearGameSave: 'Clear game saving', + resetSettings: 'Reset settings', + clearAll: 'Clear all data', + }, + dialogs: { + clearGameSave: 'Are you sure you want to clear game saving', + resetSettings: 'Are you sure you want to reset all settings', + clearAll: 'Are you sure you want to clear all data', + }, + }, + gameSave: { + title: 'Import or Export Game Saving and Options', + options: { + export: 'Export game saving and options', + import: 'Import game saving and options', + }, + dialogs: { + import: { + title: 'Are you sure you want to import game saving and options', + tip: 'Import game saving', + error: 'Parse game saving failed', + }, + }, + }, + about: { + title: 'About WebGAL', + subTitle: 'WebGAL: An Open-Source Web-Based Visual Novel Engine', + version: 'Version', + source: 'Source Code Repository', + contributors: 'Contributors', + website: 'Website', + }, + }, + }, + display: { + title: 'Display', + options: { + fullScreen: { + title: 'Full Screen', + options: { + on: 'ON', + off: 'OFF', + }, + }, + textSpeed: { + title: 'Text Speed', + options: { + slow: 'Slow', + medium: 'Medium', + fast: 'Fast', + }, + }, + textSize: { + title: 'Text Size', + options: { + small: 'Small', + medium: 'Medium', + large: 'Large', + }, + }, + textFont: { + title: 'Text Font', + options: { + siYuanSimSun: 'Source Han Serif', + SimHei: 'Sans', + lxgw: 'LXGW WenKai', + }, + }, + textboxOpacity: { + title: 'Textbox Opacity', + }, + textPreview: { + title: 'Preview Text Showing', + text: "You are previewing the text's font, size and playback speed, now. You can adjust the above options according to your perception.", + }, + }, + }, + sound: { + title: 'Sound', + options: { + volumeMain: { title: 'Main Volume' }, + vocalVolume: { title: 'Vocal Volume' }, + bgmVolume: { title: 'BGM Volume' }, + seVolume: { title: 'Sound Effects Volume' }, + uiSeVolume: { title: 'UI Sound Effects Volume' }, + }, + }, + // language: { + // title: '语言', + // options: { + // }, + // }, + }, + }, + saving: { + title: 'SAVE', + isOverwrite: 'Are you sure you want to overwrite this save?', + }, + loadSaving: { + title: 'LOAD', + }, + title: { + title: 'TITLE', + }, + exit: { + title: 'BACK', + }, + }, + + title: { + start: { + title: 'START', + subtitle: '', + }, + continue: { + title: 'CONTINUE', + subtitle: '', + }, + options: { + title: 'OPTIONS', + subtitle: '', + }, + load: { + title: 'LOAD', + subtitle: '', + }, + extra: { + title: 'EXTRA', + subtitle: '', + }, + }, + + gaming: { + noSaving: 'No saving', + buttons: { + hide: 'Hide', + show: 'Show', + backlog: 'Backlog', + replay: 'Replay', + auto: 'Auto', + forward: 'Forward', + quicklySave: 'Quickly Save', + quicklyLoad: 'Quickly Load', + save: 'Save', + load: 'Load', + options: 'Options', + title: 'Title', + titleTips: 'Confirm return to the title screen', + }, + }, + + extra: { + title: 'EXTRA', + }, +}; + +export default en; diff --git a/packages/webgal/src/translations/fr.ts b/packages/webgal/src/translations/fr.ts new file mode 100644 index 000000000..b157cd071 --- /dev/null +++ b/packages/webgal/src/translations/fr.ts @@ -0,0 +1,178 @@ +const fr = { + // 通用 + common: { + yes: 'OK', + no: 'Annuler', + }, + + menu: { + options: { + title: 'OPTIONS', + pages: { + system: { + title: 'Système', + options: { + autoSpeed: { + title: 'Vitesse de lecture automatique', + options: { + slow: 'Lente', + medium: 'Moyenne', + fast: 'Rapide', + }, + }, + language: { + title: 'Langue', + }, + resetData: { + title: 'Effacer ou réinitialiser les données', + options: { + clearGameSave: 'Effacer la sauvegarde du jeu', + resetSettings: 'Réinitialiser les paramètres', + clearAll: 'Tout effacer', + }, + dialogs: { + clearGameSave: 'Êtes-vous sûr de vouloir effacer la sauvegarde du jeu', + resetSettings: 'Êtes-vous sûr de vouloir réinitialiser tous les paramètres', + clearAll: 'Êtes-vous sûr de vouloir tout effacer', + }, + }, + gameSave: { + title: 'Importer ou exporter la sauvegarde du jeu et les options', + options: { + export: 'Exporter la sauvegarde du jeu et les options', + import: 'Importer la sauvegarde du jeu et les options', + }, + dialogs: { + import: { + title: 'Êtes-vous sûr de vouloir importer la sauvegarde du jeu et les options', + tip: 'Importer la sauvegarde du jeu', + error: "Impossible d'analyser la sauvegarde du jeu", + }, + }, + }, + about: { + title: 'À propos de WebGAL', + subTitle: 'WebGAL: Un moteur de visual novel basé sur le web en open-source', + version: 'Version', + source: 'Dépôt de code source', + contributors: 'Contributeurs', + website: 'Site web', + }, + }, + }, + display: { + title: 'Affichage', + options: { + textSpeed: { + title: "Vitesse d'affichage du texte", + options: { + slow: 'Lente', + medium: 'Moyenne', + fast: 'Rapide', + }, + }, + textSize: { + title: 'Taille du texte', + options: { + small: 'Petite', + medium: 'Moyenne', + large: 'Grande', + }, + }, + textFont: { + title: 'Police du texte', + options: { + siYuanSimSun: 'Source Han Serif', + SimHei: 'Sans', + lxgw: 'LXGW WenKai', + }, + }, + textboxOpacity: { + title: 'Textbox Opacity', + }, + textPreview: { + title: "Aperçu de l'affichage du texte", + text: 'Vous prévisualisez la police, la taille et la vitesse de lecture du texte, maintenant. Vous pouvez ajuster les options ci-dessus selon votre perception.', + }, + }, + }, + sound: { + title: 'Son', + options: { + volumeMain: { title: 'Volume principal' }, + vocalVolume: { title: 'Volume des voix' }, + bgmVolume: { title: 'Volume de la musique de fond' }, + seVolume: { title: 'Volume des effets sonores' }, + uiSeVolume: { title: 'Volume de l’interface utilisateur' }, + }, + }, + // language: { + // title: 'Langue', + // options: { + // }, + // }, + }, + }, + saving: { + title: 'SAUVEGARDER', + isOverwrite: 'Êtes-vous sûr de vouloir écraser cette sauvegarde ?', + }, + loadSaving: { + title: 'CHARGER', + }, + title: { + title: 'TITRE', + }, + exit: { + title: 'RETOUR', + }, + }, + + title: { + start: { + title: 'COMMENCER', + subtitle: '', + }, + continue: { + title: 'CONTINUER', + subtitle: '', + }, + options: { + title: 'OPTIONS', + subtitle: '', + }, + load: { + title: 'CHARGER', + subtitle: '', + }, + extra: { + title: 'EXTRA', + subtitle: '', + }, + }, + + gaming: { + noSaving: 'Aucune sauvegarde', + buttons: { + hide: 'Masquer', + show: 'Afficher', + backlog: 'Journal', + replay: 'Rejouer', + auto: 'Automatique', + forward: 'Avancer', + quicklySave: 'Sauvegarde rapide', + quicklyLoad: 'Chargement rapide', + save: 'Sauvegarder', + load: 'Charger', + options: 'Options', + title: 'Titre', + titleTips: "Confirmer le retour à l'écran titre", + }, + }, + + extra: { + title: 'EXTRA', + }, +}; + +export default fr; diff --git a/packages/webgal/src/translations/jp.ts b/packages/webgal/src/translations/jp.ts new file mode 100644 index 000000000..f720af7b3 --- /dev/null +++ b/packages/webgal/src/translations/jp.ts @@ -0,0 +1,188 @@ +const jp = { + // 通用 + common: { + yes: 'はい', + no: 'いいえ', + }, + + menu: { + options: { + title: 'CONFIG', + pages: { + system: { + title: 'システム', + options: { + autoSpeed: { + title: '自動再生速度', + options: { + slow: '遅く', + medium: '標準', + fast: '速く', + }, + }, + language: { + title: '言語', + }, + resetData: { + title: 'データの復元と削除', + options: { + clearGameSave: 'すべてのセーブデータを削除', + resetSettings: '設定を元に戻す', + clearAll: 'すべてのデータを削除', + }, + dialogs: { + clearGameSave: 'すべてのセーブデータを削除しますか?', + resetSettings: '設定を元に戻しますか?', + clearAll: 'すべてのデータを削除しますか?', + }, + }, + gameSave: { + title: 'セーブデータと設定のインポートとエクスポート', + options: { + export: 'セーブデータと設定のエクスポート', + import: 'セーブデータと設定のインポート', + }, + dialogs: { + import: { + title: 'セーブデータと設定をインポートしますか?', + tip: 'セーブデータのインポート', + error: 'セーブデータの読み込みに失敗しました', + }, + }, + }, + about: { + title: 'WebGAL について', + subTitle: 'WebGAL: オープンソースのウェブベースビジュアルノベルエンジン', + version: 'バージョン', + source: 'ソースコードリポジトリ', + contributors: '貢献者', + website: 'ウェブサイト', + }, + }, + }, + display: { + title: 'ウィンドウ', + options: { + fullScreen: { + title: 'フルスクリーン', + options: { + on: 'オン', + off: 'オフ', + }, + }, + textSpeed: { + title: 'テキスト表示速度', + options: { + slow: '遅く', + medium: '標準', + fast: '速く', + }, + }, + textSize: { + title: 'テキストサイズ', + options: { + small: '小', + medium: '中', + large: '大', + }, + }, + textFont: { + title: 'フォント', + options: { + siYuanSimSun: '源ノ明朝(中国語)', + SimHei: 'OPPO Sans', + lxgw: 'LXGW WenKai', + }, + }, + textboxOpacity: { + title: 'テキストボックスの不透明度', + }, + textPreview: { + title: 'テキスト表示プレビュー', + text: 'これはテキストボックスのフォントとサイズ、表示速度のプレビューです。上にある設定で変更できます。', + }, + }, + }, + sound: { + title: 'サウンド', + options: { + volumeMain: { title: 'メイン音量' }, + vocalVolume: { title: 'ボイス音量' }, + bgmVolume: { title: 'BGM 音量' }, + seVolume: { title: '効果音音量' }, + uiSeVolume: { title: 'UI 効果音音量' }, + voiceOption: { title: 'ボイスの中断' }, + voiceStop: { title: '中断する' }, + voiceContinue: { title: '中断しない' }, + }, + }, + // language: { + // title: '言語', + // options: { + // }, + // }, + }, + }, + saving: { + title: 'SAVE', + isOverwrite: 'セーブデータを上書きしますか?', + }, + loadSaving: { + title: 'LOAD', + }, + title: { + title: 'HOME', + }, + exit: { + title: 'BACK', + }, + }, + + title: { + start: { + title: '初めから', + subtitle: 'START', + }, + continue: { + title: '続きから', + subtitle: 'CONTINUE', + }, + options: { + title: '設定', + subtitle: 'CONFIG', + }, + load: { + title: 'ロード', + subtitle: 'LOAD', + }, + extra: { + title: '鑑賞モード', + subtitle: 'EXTRA', + }, + }, + + gaming: { + noSaving: 'クイックセーブなし', + buttons: { + hide: 'CLOSE', + show: 'SHOW', + backlog: 'LOG', + replay: 'REPLAY', + auto: 'AUTO', + forward: 'SKIP', + quicklySave: 'QUICK SAVE', + quicklyLoad: 'QUICK LOAD', + save: 'SAVE', + load: 'LOAD', + options: 'CONFIG', + title: 'HOME', + titleTips: 'タイトル画面に戻りますか?', + }, + }, + + extra: { + title: '鑑賞モード', + }, +}; + +export default jp; diff --git a/packages/webgal/src/translations/zh-cn.ts b/packages/webgal/src/translations/zh-cn.ts new file mode 100644 index 000000000..471b2a547 --- /dev/null +++ b/packages/webgal/src/translations/zh-cn.ts @@ -0,0 +1,192 @@ +const zhCn = { + // 通用 + common: { + yes: '是', + no: '否', + }, + + menu: { + options: { + title: '选项', + pages: { + system: { + title: '系统', + options: { + autoSpeed: { + title: '自动播放速度', + options: { + slow: '慢', + medium: '中', + fast: '快', + }, + }, + language: { + title: '语言', + }, + resetData: { + title: '清除或还原数据', + options: { + clearGameSave: '清除所有存档', + resetSettings: '还原默认设置', + clearAll: '清除所有数据', + }, + dialogs: { + clearGameSave: '确定要清除存档吗', + resetSettings: '确定要还原默认设置吗', + clearAll: '确定要清除所有数据吗', + }, + }, + gameSave: { + title: '导入或导出存档与选项', + options: { + export: '导出存档与选项', + import: '导入存档与选项', + }, + dialogs: { + import: { + title: '确定要导入存档与选项吗', + tip: '导入存档', + error: '存档解析失败', + }, + }, + }, + about: { + title: '关于 WebGAL', + subTitle: 'WebGAL:开源的网页端视觉小说引擎', + version: '版本号', + source: '源代码仓库', + contributors: '贡献者', + website: '网站', + }, + }, + }, + display: { + title: '显示', + options: { + fullScreen: { + title: '全屏模式', + options: { + on: '开启', + off: '关闭', + }, + }, + textSpeed: { + title: '文字显示速度', + options: { + slow: '慢', + medium: '中', + fast: '快', + }, + }, + textSize: { + title: '文本大小', + options: { + small: '小', + medium: '中', + large: '大', + }, + }, + textFont: { + title: '文本字体', + options: { + siYuanSimSun: '思源宋体', + SimHei: '黑体', + lxgw: '霞鹜文楷', + }, + }, + textboxOpacity: { + title: '文本框不透明度', + }, + textPreview: { + title: '文本显示预览', + text: '现在预览的是文本框字体大小和播放速度的情况,您可以根据您的观感调整上面的选项。', + }, + }, + }, + sound: { + title: '音频', + options: { + volumeMain: { title: '主音量' }, + vocalVolume: { title: '语音音量' }, + bgmVolume: { title: '背景音乐音量' }, + seVolume: { title: '音效音量' }, + uiSeVolume: { title: '用户界面音效音量' }, + voiceOption: { title: '是否中断语音' }, + voiceStop: { title: '停止语音' }, + voiceContinue: { title: '继续语音' }, + }, + }, + // language: { + // title: '语言', + // options: { + // }, + // }, + }, + }, + saving: { + title: '存档', + isOverwrite: '是否覆盖存档?', + }, + loadSaving: { + title: '读档', + }, + title: { + title: '标题', + options: { + load: '', + extra: '鉴赏模式', + }, + }, + exit: { + title: '返回', + }, + }, + + title: { + start: { + title: '开始游戏', + subtitle: 'START', + }, + continue: { + title: '继续游戏', + subtitle: 'CONTINUE', + }, + options: { + title: '游戏选项', + subtitle: 'OPTIONS', + }, + load: { + title: '读取存档', + subtitle: 'LOAD', + }, + extra: { + title: '鉴赏模式', + subtitle: 'EXTRA', + }, + }, + + gaming: { + noSaving: '暂无存档', + buttons: { + hide: '隐藏', + show: '显示', + backlog: '回想', + replay: '重播', + auto: '自动', + forward: '快进', + quicklySave: '快速存档', + quicklyLoad: '快速读档', + save: '存档', + load: '读档', + options: '选项', + title: '标题', + titleTips: '确认返回到标题界面吗', + }, + }, + + extra: { + title: '鉴赏模式', + }, +}; + +export default zhCn; diff --git a/packages/webgal/src/translations/zh-tw.ts b/packages/webgal/src/translations/zh-tw.ts new file mode 100644 index 000000000..986bf23d0 --- /dev/null +++ b/packages/webgal/src/translations/zh-tw.ts @@ -0,0 +1,181 @@ +const zhTw = { + // 通用 + common: { + yes: '是', + no: '否', + }, + + menu: { + options: { + title: '選項', + pages: { + system: { + title: '系統', + options: { + autoSpeed: { + title: '自動播放速度', + options: { + slow: '慢', + medium: '中', + fast: '快', + }, + }, + language: { + title: '語言', + }, + resetData: { + title: '清除或還原數據', + options: { + clearGameSave: '清除所有存檔', + resetSettings: '還原默認設定', + clearAll: '清除所有數據', + }, + dialogs: { + clearGameSave: '確定要清除存檔嗎', + resetSettings: '確定要還原默認設定嗎', + clearAll: '確定要清除所有數據嗎', + }, + }, + gameSave: { + title: '導入或導出存檔與選項', + options: { + export: '導出存檔與選項', + import: '導入存檔與選項', + }, + dialogs: { + import: { + title: '確定要導入存檔與選項嗎', + tip: '導入存檔', + error: '存檔解析失敗', + }, + }, + }, + about: { + title: '關於 WebGAL', + subTitle: 'WebGAL:開源的線上視覺小說製作引擎', + version: '版本號', + source: '源代碼倉庫', + contributors: '貢獻者', + website: '網站', + }, + }, + }, + display: { + title: '顯示', + options: { + textSpeed: { + title: '文字顯示速度', + options: { + slow: '慢', + medium: '中', + fast: '快', + }, + }, + textSize: { + title: '文字大小', + options: { + small: '小', + medium: '中', + large: '大', + }, + }, + textFont: { + title: '文字字體', + options: { + siYuanSimSun: '霞鹜文楷', + SimHei: '黑體', + }, + }, + textboxOpacity: { + title: '文本框不透明度', + }, + textPreview: { + title: '文字顯示預覽', + text: '現在預覽的是文字框字體大小和播放速度的情況,您可以根據您的觀感調整上面的選項。', + }, + }, + }, + sound: { + title: '音量', + options: { + volumeMain: { title: '主音量' }, + vocalVolume: { title: '語音音量' }, + bgmVolume: { title: '背景音樂音量' }, + seVolume: { title: '音效音量' }, + uiSeVolume: { title: '用戶界面音效音量' }, + }, + }, + // language: { + // title: '語言', + // options: { + // }, + // }, + }, + }, + saving: { + title: '存檔', + isOverwrite: '是否要覆蓋存檔?', + }, + loadSaving: { + title: '讀檔', + }, + title: { + title: '標題', + options: { + load: '', + extra: 'CG模式', + }, + }, + exit: { + title: '返回', + }, + }, + + title: { + start: { + title: '開始遊戲', + subtitle: 'START', + }, + continue: { + title: '繼續遊戲', + subtitle: 'CONTINUE', + }, + options: { + title: '遊戲選項', + subtitle: 'OPTIONS', + }, + load: { + title: '讀取存檔', + subtitle: 'LOAD', + }, + extra: { + title: 'CG模式', + subtitle: 'EXTRA', + }, + }, + + gaming: { + noSaving: '暫無存檔', + buttons: { + hide: '隱藏', + show: '顯示', + backlog: '回想', + replay: '重播', + auto: '自動', + forward: '加速', + quicklySave: '快速存檔', + quicklyLoad: '快速讀檔', + save: '存檔', + load: '讀檔', + options: '選項', + title: '標題', + titleTips: '確認返回到標題界面嗎', + }, + }, + + extra: { + title: 'CG模式', + }, +}; + +export default zhTw; diff --git a/packages/webgal/src/types/angular-expressions.d.ts b/packages/webgal/src/types/angular-expressions.d.ts new file mode 100644 index 000000000..b5518d2a3 --- /dev/null +++ b/packages/webgal/src/types/angular-expressions.d.ts @@ -0,0 +1,4 @@ +import { EvaluatorFunc } from 'angular-expressions'; +declare module 'angular-expressions' { + export function compile(src: string, lexerOptions?: any): () => number | boolean | EvaluatorFunc; +} diff --git a/packages/webgal/src/types/debugProtocol.ts b/packages/webgal/src/types/debugProtocol.ts new file mode 100644 index 000000000..267f67a18 --- /dev/null +++ b/packages/webgal/src/types/debugProtocol.ts @@ -0,0 +1,27 @@ +import { IStageState } from '@/store/stageInterface'; + +export enum DebugCommand { + // 跳转 + JUMP, + // 同步自客户端 + SYNCFC, + // 同步自编辑器 + SYNCFE, + // 执行指令 + EXE_COMMAND, + // 重新拉取模板样式文件 + REFETCH_TEMPLATE_FILES, +} + +export interface IDebugMessage { + event: string; + data: { + command: DebugCommand; + sceneMsg: { + sentence: number; + scene: string; + }; + message: string; + stageSyncMsg: IStageState; + }; +} diff --git a/packages/webgal/src/vite-env.d.ts b/packages/webgal/src/vite-env.d.ts new file mode 100644 index 000000000..11f02fe2a --- /dev/null +++ b/packages/webgal/src/vite-env.d.ts @@ -0,0 +1 @@ +/// <reference types="vite/client" /> diff --git a/packages/webgal/tsconfig.json b/packages/webgal/tsconfig.json new file mode 100644 index 000000000..e46b697af --- /dev/null +++ b/packages/webgal/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "ESNext", + "useDefineForClassFields": true, + "lib": ["DOM", "DOM.Iterable", "ESNext"], + "allowJs": false, + "skipLibCheck": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "ESNext", + "moduleResolution": "Node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + "paths": { + "@/*": ["./src/*"] + } + }, + "include": [ + "src" + ], + "references": [{ "path": "./tsconfig.node.json"}] +} diff --git a/packages/webgal/tsconfig.node.json b/packages/webgal/tsconfig.node.json new file mode 100644 index 000000000..99b8d5789 --- /dev/null +++ b/packages/webgal/tsconfig.node.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ES2017", + "lib": ["ES2021.String"], + "composite": true, + "module": "esnext", + "moduleResolution": "node" + }, + "include": [ + "vite.config.ts" + ] +} diff --git a/packages/webgal/vite.config.ts b/packages/webgal/vite.config.ts new file mode 100644 index 000000000..0fb7f4bbe --- /dev/null +++ b/packages/webgal/vite.config.ts @@ -0,0 +1,63 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import loadVersion from 'vite-plugin-package-version'; +import { resolve, relative } from 'path'; +import { visualizer } from 'rollup-plugin-visualizer'; +import { readdirSync, watch, writeFileSync } from 'fs'; +import { isEqual } from 'lodash'; +// https://vitejs.dev/config/ + +// @ts-ignore +const env = process.env.NODE_ENV; +console.log(env); +(() => { + const pixiPerformScriptDirPath = './src/Core/gameScripts/pixi/performs/'; + const pixiPerformManagerDirPath = './src/Core/util/pixiPerformManager/'; + const relativePath = relative(pixiPerformManagerDirPath, pixiPerformScriptDirPath).replaceAll('\\', '/'); + let lastFiles: string[] = []; + + function setInitFile() { + console.log('正在自动编写pixi特效依赖注入'); + writeFileSync( + resolve(pixiPerformManagerDirPath, 'initRegister.ts'), + lastFiles + .map((v) => { + const filePath = relativePath + '/' + v.slice(0, v.lastIndexOf('.')); + return `import '${filePath}';`; + }) + .join('\n') + '\n', + { encoding: 'utf-8' }, + ); + } + + function getPixiPerformScriptFiles() { + const pixiPerformScriptFiles = readdirSync(pixiPerformScriptDirPath, { encoding: 'utf-8' }).filter((v) => + ['ts', 'js', 'tsx', 'jsx'].includes(v.slice(v.indexOf('.') + 1, v.length)), + ); + if (!isEqual(pixiPerformScriptFiles, lastFiles)) { + lastFiles = pixiPerformScriptFiles; + setInitFile(); + } + } + + getPixiPerformScriptFiles(); + + if (env !== 'production') watch(pixiPerformScriptDirPath, { encoding: 'utf-8' }, getPixiPerformScriptFiles); +})(); + +export default defineConfig({ + plugins: [ + react(), + loadVersion(), + // @ts-ignore + visualizer(), + ], + resolve: { + alias: { + '@': resolve('src'), + }, + }, + build: { + // sourcemap: true, + }, +}); diff --git a/packages/yukimi/libwebgal-base.ykm b/packages/yukimi/libwebgal-base.ykm new file mode 100644 index 000000000..b145e2d88 --- /dev/null +++ b/packages/yukimi/libwebgal-base.ykm @@ -0,0 +1,41 @@ +# Dialog +- extern say content speaker vocal % +@__type content string +@__type speaker string +@__type vocal string +^ + + +# Background and figure +-extern changeBg content % +@__type content string +^ + +-extern changeFigure content left center right id % +@__type conetnt string +@__type left boolean +@__type center boolean +@__type right boolean +@__type id string +^ + + +#bgm, effect sound, video +-extern bgm conetnt % +@__type conetnt string +^ + +-extern playVideo conetnt % +@__type content string +^ + +-extern playEffects conetnt % +@__type conetnt string +^ + +# + + +# Demo +- scene "main" +@say "你好" "WebGAL" "v1.ogg" \ No newline at end of file diff --git a/packages/yukimi/ykmc.exe b/packages/yukimi/ykmc.exe new file mode 100644 index 000000000..f307dbfd2 Binary files /dev/null and b/packages/yukimi/ykmc.exe differ diff --git a/release-to-server.sh b/release-to-server.sh new file mode 100644 index 000000000..c87eb5bda --- /dev/null +++ b/release-to-server.sh @@ -0,0 +1,13 @@ +# 安装依赖并构建 +yarn +yarn build + +# 进入 WebGAL 构建目录 +cd packages || exit +rm -r server/WebGAL/* +cd webgal || exit +# 复制 +cp -r dist/index.html ../server/WebGAL +cp -r dist/assets ../server/WebGAL +cp -r dist/game ../server/WebGAL +cp -r dist/webgal-serviceworker.js ../server/WebGAL diff --git a/release-to-terre.sh b/release-to-terre.sh new file mode 100644 index 000000000..d0ede3b16 --- /dev/null +++ b/release-to-terre.sh @@ -0,0 +1,17 @@ +# 安装依赖并构建 +yarn +yarn build + +# 进入 Terre 目录 +cd ../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template || exit +# 删除其他文件 +rm -r assets +rm -r index.html +rm -r webgal-serviceworker.js + +# 进入 WebGAL 构建目录 +cd ../../../../../../WebGAL/packages/webgal || exit +# 复制 +cp -r dist/index.html ../../../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template +cp -r dist/assets ../../../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template +cp -r dist/webgal-serviceworker.js ../../../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template diff --git a/releasenote.md b/releasenote.md new file mode 100644 index 000000000..28f366fa2 --- /dev/null +++ b/releasenote.md @@ -0,0 +1,62 @@ +## 发布日志 + +**本仓库只发布源代码** + +**如果你想要体验使用便捷的图形化编辑器创建、制作并实时预览 WebGAL 游戏,请 [下载 WebGAL 图形化编辑器](https://github.com/MakinoharaShoko/WebGAL_Terre/releases)** + +### 在此版本中 + +#### 新功能 + +对话内容支持不间断的连续空格 + +#### 修复 + +读取存档时意外在状态表中存储了多份演出记录的问题 + +带有 id 的效果音播放在停止后演出未完全清除的问题 + +对状态表和演出控制器中的演出列表在插入时去重 + +<!-- English Translation --> +## Release Notes + +**Only source code is released in this repository** + +**If you want to experience creating, making, and real-time previewing WebGAL games using a user-friendly graphical editor, please [download the WebGAL graphical editor](https://github.com/MakinoharaShoko/WebGAL_Terre/releases)** + +### In this version + +#### New Features + +Dialogue content now supports continuous spaces. + +#### Fixes + +Fixed an issue where multiple performance records were unexpectedly stored in the state table when loading a save. + +Fixed an issue where performances with IDs were not completely cleared after stopping sound effects playback. + +Deduplicated performance lists in the state table and performance controller upon insertion. + +<!-- Japanese Translation --> +## リリースノート + +**このリポジトリはソースコードのみを公開しています** + +**もしあなたが使いやすいグラフィカルエディタでWebGALゲームを作成、制作、リアルタイムプレビューしたい場合は、[WebGALグラフィカルエディタをダウンロードしてください](https://github.com/MakinoharaShoko/WebGAL_Terre/releases)** + +### このバージョンについて + +#### 新機能 + +会話内容で連続するスペースが正しく表示されるようになりました。 + +#### 修正 + +セーブデータ読み込み時に、ステータステーブルに複数の演出記録が重複して保存される問題を修正しました。 + +IDを持つ効果音が停止した後、演出が完全にクリアされない問題を修正しました。 + +ステータステーブルと演出コントローラーの演出リストにおいて、重複した項目が挿入されるのを防ぐように修正しました。 + diff --git a/res/script/WG_main.js b/res/script/WG_main.js deleted file mode 100644 index c7637b52d..000000000 --- a/res/script/WG_main.js +++ /dev/null @@ -1,41 +0,0 @@ -var currentScene =''; -var currentSceneIndex = 0; -var currentSentence = 0; -function getScene() { - let getScReq = null; - getScReq = new XMLHttpRequest(); - - if (getScReq != null) { - getScReq.open("get", "game/scene/start.sce", true); - getScReq.send(); - getScReq.onreadystatechange = doResult; //设置回调函数 - } - function doResult() { - if (getScReq.readyState === 4) { //4表示执行完成 - if (getScReq.status === 200) { //200表示执行成功 - currentScene = getScReq.responseText; - currentScene = currentScene.split('\n'); - for (let i = 0;i<currentScene.length;i++){ - currentScene[i] = currentScene[i].split(":"); - } - console.log('Read scene complete.'); - console.log(currentScene); - } - } - } -} - -window.onload = function (){ - getScene(); -} - -function processSentence(i){ - if(i<currentScene.length) - return currentScene[i][0]+": "+currentScene[i][1]; -} - -function nextSentenceProcessor(){ - let changedText = <p>{processSentence(currentSentence)}</p> - ReactDOM.render(changedText,document.getElementById('SceneText')); - currentSentence = currentSentence+1; -} \ No newline at end of file diff --git a/res/script/babel.min.js b/res/script/babel.min.js deleted file mode 100644 index 10757768a..000000000 --- a/res/script/babel.min.js +++ /dev/null @@ -1,25 +0,0 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,i){n.apply(this,[e,t,i].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function n(e,t){return g(t)&&"string"==typeof t[0]?e.hasOwnProperty(t[0])?[e[t[0]]].concat(t.slice(1)):void 0:"string"==typeof t?e[t]:t}function i(e){var t=(e.presets||[]).map(function(e){var t=n(E,e);if(!t)throw new Error('Invalid preset specified in Babel options: "'+e+'"');return g(t)&&"object"===h(t[0])&&t[0].hasOwnProperty("buildPreset")&&(t[0]=d({},t[0],{buildPreset:t[0].buildPreset})),t}),r=(e.plugins||[]).map(function(e){var t=n(b,e);if(!t)throw new Error('Invalid plugin specified in Babel options: "'+e+'"');return t});return d({babelrc:!1},e,{presets:t,plugins:r})}function s(e,t){return y.transform(e,i(t))}function a(e,t,r){return y.transformFromAst(e,t,i(r))}function o(e,t){b.hasOwnProperty(e)&&console.warn('A plugin named "'+e+'" is already registered, it will be overridden'),b[e]=t}function u(e){Object.keys(e).forEach(function(t){return o(t,e[t])})}function l(e,t){E.hasOwnProperty(e)&&console.warn('A preset named "'+e+'" is already registered, it will be overridden'),E[e]=t}function c(e){Object.keys(e).forEach(function(t){return l(t,e[t])})}function f(e){(0,v.runScripts)(s,e)}function p(){window.removeEventListener("DOMContentLoaded",f)}Object.defineProperty(t,"__esModule",{value:!0}),t.version=t.buildExternalHelpers=t.availablePresets=t.availablePlugins=void 0;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.transform=s,t.transformFromAst=a,t.registerPlugin=o,t.registerPlugins=u,t.registerPreset=l,t.registerPresets=c,t.transformScriptTags=f,t.disableScriptTags=p;var m=r(290),y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(m),v=r(629),g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},b=t.availablePlugins={},E=t.availablePresets={};t.buildExternalHelpers=y.buildExternalHelpers;u({"check-es2015-constants":r(66),"external-helpers":r(322),"inline-replace-variables":r(323),"syntax-async-functions":r(67),"syntax-async-generators":r(195),"syntax-class-constructor-call":r(196),"syntax-class-properties":r(197),"syntax-decorators":r(125),"syntax-do-expressions":r(198),"syntax-exponentiation-operator":r(199),"syntax-export-extensions":r(200),"syntax-flow":r(126),"syntax-function-bind":r(201),"syntax-function-sent":r(325),"syntax-jsx":r(127),"syntax-object-rest-spread":r(202),"syntax-trailing-function-commas":r(128),"transform-async-functions":r(326),"transform-async-to-generator":r(129),"transform-async-to-module-method":r(328),"transform-class-constructor-call":r(203),"transform-class-properties":r(204),"transform-decorators":r(205),"transform-decorators-legacy":r(329).default,"transform-do-expressions":r(206),"transform-es2015-arrow-functions":r(68),"transform-es2015-block-scoped-functions":r(69),"transform-es2015-block-scoping":r(70),"transform-es2015-classes":r(71),"transform-es2015-computed-properties":r(72),"transform-es2015-destructuring":r(73),"transform-es2015-duplicate-keys":r(130),"transform-es2015-for-of":r(74),"transform-es2015-function-name":r(75),"transform-es2015-instanceof":r(332),"transform-es2015-literals":r(76),"transform-es2015-modules-amd":r(131),"transform-es2015-modules-commonjs":r(77),"transform-es2015-modules-systemjs":r(208),"transform-es2015-modules-umd":r(209),"transform-es2015-object-super":r(78),"transform-es2015-parameters":r(79),"transform-es2015-shorthand-properties":r(80),"transform-es2015-spread":r(81),"transform-es2015-sticky-regex":r(82),"transform-es2015-template-literals":r(83),"transform-es2015-typeof-symbol":r(84),"transform-es2015-unicode-regex":r(85),"transform-es3-member-expression-literals":r(336),"transform-es3-property-literals":r(337),"transform-es5-property-mutators":r(338),"transform-eval":r(339),"transform-exponentiation-operator":r(132),"transform-export-extensions":r(210),"transform-flow-comments":r(340),"transform-flow-strip-types":r(211),"transform-function-bind":r(212),"transform-jscript":r(341),"transform-object-assign":r(342),"transform-object-rest-spread":r(213),"transform-object-set-prototype-of-to-assign":r(343),"transform-proto-to-assign":r(344),"transform-react-constant-elements":r(345),"transform-react-display-name":r(214),"transform-react-inline-elements":r(346),"transform-react-jsx":r(215),"transform-react-jsx-compat":r(347),"transform-react-jsx-self":r(349),"transform-react-jsx-source":r(350),"transform-regenerator":r(86),"transform-runtime":r(353),"transform-strict-mode":r(216),"undeclared-variables-check":r(354)}),c({es2015:r(217),es2016:r(218),es2017:r(219),latest:r(356),react:r(357),"stage-0":r(358),"stage-1":r(220),"stage-2":r(221),"stage-3":r(222),"es2015-no-commonjs":{plugins:[r(83),r(76),r(75),r(68),r(69),r(71),r(78),r(80),r(72),r(74),r(82),r(85),r(66),r(81),r(79),r(73),r(70),r(84),[r(86),{async:!1,asyncGenerators:!1}]]},"es2015-loose":{plugins:[[r(83),{loose:!0}],r(76),r(75),r(68),r(69),[r(71),{loose:!0}],r(78),r(80),r(130),[r(72),{loose:!0}],[r(74),{loose:!0}],r(82),r(85),r(66),[r(81),{loose:!0}],r(79),[r(73),{loose:!0}],r(70),r(84),[r(77),{loose:!0}],[r(86),{async:!1,asyncGenerators:!1}]]}});t.version="6.26.0";"undefined"!=typeof window&&window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",function(){return f()},!1)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=z["is"+e];t||(t=z["is"+e]=function(t,r){return z.is(e,t,r)}),z["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,I.default)(e)+" with option "+(0,I.default)(n))}}function s(e,t,r){return!!t&&(!!a(t.type,e)&&(void 0===r||z.shallowEqual(t,r)))}function a(e,t){if(e===t)return!0;if(z.ALIAS_KEYS[t])return!1;var r=z.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,T.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(e===a)return!0}}return!1}function o(e,t,r){if(e){var n=z.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function u(e,t){for(var r=(0,B.default)(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,T.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(e[o]!==t[o])return!1}return!0}function l(e,t,r){return e.object=z.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function c(e,t){return e.object=z.memberExpression(t,e.object),e}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=z.toBlock(e[t],e)}function p(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function d(e){var t=p(e);return delete t.loc,t}function h(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=z.cloneDeep(n):Array.isArray(n)&&(n=n.map(z.cloneDeep))),t[r]=n}return t}function m(e,t){var r=e.split(".");return function(e){if(!z.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(z.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!z.isStringLiteral(s)){if(z.isMemberExpression(s)){if(s.computed&&!z.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}}function y(e){for(var t=z.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,T.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}delete e[i]}return e}function v(e,t){return g(e,t),b(e,t),E(e,t),e}function g(e,t){x("trailingComments",e,t)}function b(e,t){x("leadingComments",e,t)}function E(e,t){x("innerComments",e,t)}function x(e,t,r){t&&r&&(t[e]=(0,K.default)([].concat(t[e],r[e]).filter(Boolean)))}function A(e,t){if(!e||!t)return e;for(var r=z.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,T.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=z.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,T.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;e[p]=t[p]}return z.inheritsComments(e,t),e}function S(e){if(!_(e))throw new TypeError("Not a valid node "+(e&&e.type))}function _(e){return!(!e||!H.VISITOR_KEYS[e.type])}function D(e,t,r){if(e){var n=z.VISITOR_KEYS[e.type];if(n){r=r||{},t(e,r);for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,T.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var c=l,f=Array.isArray(c),p=0,c=f?c:(0,T.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;D(h,t,r)}else D(l,t,r)}}}}function C(e,t){t=t||{};for(var r=t.preserveComments?Z:ee,n=r,i=Array.isArray(n),s=0,n=i?n:(0,T.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,k.default)(e),c=l,f=Array.isArray(c),p=0,c=f?c:(0,T.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}e[d]=null}}function w(e,t){return D(e,C,t),e}t.__esModule=!0,t.createTypeAnnotationBasedOnTypeof=t.removeTypeDuplicates=t.createUnionTypeAnnotation=t.valueToNode=t.toBlock=t.toExpression=t.toStatement=t.toBindingIdentifierName=t.toIdentifier=t.toKeyAlias=t.toSequenceExpression=t.toComputedKey=t.isNodesEquivalent=t.isImmutable=t.isScope=t.isSpecifierDefault=t.isVar=t.isBlockScoped=t.isLet=t.isValidIdentifier=t.isReferenced=t.isBinding=t.getOuterBindingIdentifiers=t.getBindingIdentifiers=t.TYPES=t.react=t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var P=r(360),k=n(P),F=r(2),T=n(F),O=r(14),B=n(O),R=r(35),I=n(R),M=r(135);Object.defineProperty(t,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return M.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(t,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return M.FLATTENABLE_KEYS}}),Object.defineProperty(t,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return M.FOR_INIT_KEYS}}),Object.defineProperty(t,"COMMENT_KEYS",{enumerable:!0,get:function(){return M.COMMENT_KEYS}}),Object.defineProperty(t,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return M.LOGICAL_OPERATORS}}),Object.defineProperty(t,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return M.UPDATE_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(t,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return M.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(t,"BINARY_OPERATORS",{enumerable:!0,get:function(){return M.BINARY_OPERATORS}}),Object.defineProperty(t,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return M.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(t,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return M.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(t,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return M.STRING_UNARY_OPERATORS}}),Object.defineProperty(t,"UNARY_OPERATORS",{enumerable:!0,get:function(){return M.UNARY_OPERATORS}}),Object.defineProperty(t,"INHERIT_KEYS",{enumerable:!0,get:function(){return M.INHERIT_KEYS}}),Object.defineProperty(t,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return M.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(t,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return M.NOT_LOCAL_BINDING}}),t.is=s,t.isType=a,t.validate=o,t.shallowEqual=u,t.appendToMemberExpression=l,t.prependToMemberExpression=c,t.ensureBlock=f,t.clone=p,t.cloneWithoutLoc=d,t.cloneDeep=h,t.buildMatchMemberExpression=m,t.removeComments=y,t.inheritsComments=v,t.inheritTrailingComments=g,t.inheritLeadingComments=b,t.inheritInnerComments=E,t.inherits=A,t.assertNode=S,t.isNode=_,t.traverseFast=D,t.removeProperties=C,t.removePropertiesDeep=w;var N=r(226);Object.defineProperty(t,"getBindingIdentifiers",{enumerable:!0,get:function(){return N.getBindingIdentifiers}}),Object.defineProperty(t,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return N.getOuterBindingIdentifiers}});var L=r(395);Object.defineProperty(t,"isBinding",{enumerable:!0,get:function(){return L.isBinding}}),Object.defineProperty(t,"isReferenced",{enumerable:!0,get:function(){return L.isReferenced}}),Object.defineProperty(t,"isValidIdentifier",{enumerable:!0,get:function(){return L.isValidIdentifier}}),Object.defineProperty(t,"isLet",{enumerable:!0,get:function(){return L.isLet}}),Object.defineProperty(t,"isBlockScoped",{enumerable:!0,get:function(){return L.isBlockScoped}}),Object.defineProperty(t,"isVar",{enumerable:!0,get:function(){return L.isVar}}),Object.defineProperty(t,"isSpecifierDefault",{enumerable:!0,get:function(){return L.isSpecifierDefault}}),Object.defineProperty(t,"isScope",{enumerable:!0,get:function(){return L.isScope}}),Object.defineProperty(t,"isImmutable",{enumerable:!0,get:function(){return L.isImmutable}}),Object.defineProperty(t,"isNodesEquivalent",{enumerable:!0,get:function(){return L.isNodesEquivalent}});var j=r(385);Object.defineProperty(t,"toComputedKey",{enumerable:!0,get:function(){return j.toComputedKey}}),Object.defineProperty(t,"toSequenceExpression",{enumerable:!0,get:function(){return j.toSequenceExpression}}),Object.defineProperty(t,"toKeyAlias",{enumerable:!0,get:function(){return j.toKeyAlias}}),Object.defineProperty(t,"toIdentifier",{enumerable:!0,get:function(){return j.toIdentifier}}),Object.defineProperty(t,"toBindingIdentifierName",{enumerable:!0,get:function(){return j.toBindingIdentifierName}}),Object.defineProperty(t,"toStatement",{enumerable:!0,get:function(){return j.toStatement}}),Object.defineProperty(t,"toExpression",{enumerable:!0,get:function(){return j.toExpression}}),Object.defineProperty(t,"toBlock",{enumerable:!0,get:function(){return j.toBlock}}),Object.defineProperty(t,"valueToNode",{enumerable:!0,get:function(){return j.valueToNode}});var U=r(393);Object.defineProperty(t,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return U.createUnionTypeAnnotation}}),Object.defineProperty(t,"removeTypeDuplicates",{enumerable:!0,get:function(){return U.removeTypeDuplicates}}),Object.defineProperty(t,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return U.createTypeAnnotationBasedOnTypeof}});var V=r(624),G=n(V),W=r(109),Y=n(W),q=r(600),K=n(q);r(390);var H=r(26),J=r(394),X=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(J),z=t;t.VISITOR_KEYS=H.VISITOR_KEYS,t.ALIAS_KEYS=H.ALIAS_KEYS,t.NODE_FIELDS=H.NODE_FIELDS,t.BUILDER_KEYS=H.BUILDER_KEYS,t.DEPRECATED_KEYS=H.DEPRECATED_KEYS,t.react=X;for(var $ in z.VISITOR_KEYS)i($);z.FLIPPED_ALIAS_KEYS={},(0,B.default)(z.ALIAS_KEYS).forEach(function(e){z.ALIAS_KEYS[e].forEach(function(t){(z.FLIPPED_ALIAS_KEYS[t]=z.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,B.default)(z.FLIPPED_ALIAS_KEYS).forEach(function(e){z[e.toUpperCase()+"_TYPES"]=z.FLIPPED_ALIAS_KEYS[e],i(e)});t.TYPES=(0,B.default)(z.VISITOR_KEYS).concat((0,B.default)(z.FLIPPED_ALIAS_KEYS)).concat((0,B.default)(z.DEPRECATED_KEYS));(0,B.default)(z.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;for(var n=0,i=r,s=Array.isArray(i),a=0,i=s?i:(0,T.default)(i);;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if(a=i.next(),a.done)break;u=a.value}var l=u,c=z.NODE_FIELDS[e][l],f=arguments[n++];void 0===f&&(f=(0,Y.default)(c.default)),t[l]=f}for(var p in t)o(t,p,t[p]);return t}var r=z.BUILDER_KEYS[e];z[e]=t,z[e[0].toLowerCase()+e.slice(1)]=t});for(var Q in z.DEPRECATED_KEYS)!function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=z.DEPRECATED_KEYS[e];z[e]=z[e[0].toLowerCase()+e.slice(1)]=t(z[r]),z["is"+e]=t(z["is"+r]),z["assert"+e]=t(z["assert"+r])}(Q);(0,G.default)(z),(0,G.default)(z.VISITOR_KEYS);var Z=["tokens","start","end","loc","raw","rawValue"],ee=z.COMMENT_KEYS.concat(["comments"]).concat(Z)},function(e,t,r){"use strict";e.exports={default:r(404),__esModule:!0}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){e=(0,l.default)(e);var r=e,n=r.program;return t.length&&(0,m.default)(e,A,null,t),n.body.length>1?n.body:n.body[0]}t.__esModule=!0;var a=r(10),o=i(a);t.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,f.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=v.parse(e,t),i=m.default.removeProperties(i,{preserveComments:t.preserveComments}),m.default.cheap(i,function(e){e[E]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return s(n(),t)}};var u=r(574),l=i(u),c=r(174),f=i(c),p=r(274),d=i(p),h=r(7),m=i(h),y=r(89),v=n(y),g=r(1),b=n(g),E="_fromTemplate",x=(0,o.default)(),A={noScope:!0,enter:function(e,t){var r=e.node;if(r[x])return e.skip();b.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(b.isIdentifier(r)&&r[E])if((0,d.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[x]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||m.default.clearNode(t)}};e.exports=t.default},function(e,t){"use strict";var r=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=r)},function(e,t){"use strict";var r=Array.isArray;e.exports=r},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(v.get("traverseNeedsParent",e.type));m.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}t.__esModule=!0,t.visitors=t.Hub=t.Scope=t.NodePath=void 0;var o=r(2),u=i(o),l=r(36);Object.defineProperty(t,"NodePath",{enumerable:!0,get:function(){return i(l).default}});var c=r(134);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return i(c).default}});var f=r(223);Object.defineProperty(t,"Hub",{enumerable:!0,get:function(){return i(f).default}}),t.default=s;var p=r(367),d=i(p),h=r(384),m=n(h),y=r(20),v=n(y),g=r(111),b=i(g),E=r(1),x=n(E),A=r(88),S=n(A);t.visitors=m,s.visitors=m,s.verify=m.verify,s.explode=m.explode,s.NodePath=r(36),s.Scope=r(134),s.Hub=r(223),s.cheap=function(e,t){return x.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=x.VISITOR_KEYS[e.type];if(a)for(var o=new d.default(r,t,n,i),l=a,c=Array.isArray(l),f=0,l=c?l:(0,u.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var h=p;if((!s||!s[h])&&o.visit(e,h))return}},s.clearNode=function(e,t){x.removeProperties(e,t),S.path.delete(e)},s.removeProperties=function(e,t){return x.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,b.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},s.clearCache=function(){S.clear()},s.clearCache.clearPath=S.clearPath,s.clearCache.clearScope=S.clearScope,s.copyCache=function(e,t){S.path.has(e)&&S.path.set(t,S.path.get(e))}},function(e,t){"use strict";function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function s(e){if(f===clearTimeout)return clearTimeout(e);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){m&&d&&(m=!1,d.length?h=d.concat(h):y=-1,h.length&&o())}function o(){if(!m){var e=i(a);m=!0;for(var t=h.length;t;){for(d=h,h=[];++y<t;)d&&d[y].run();y=-1,t=h.length}d=null,m=!1,s(e)}}function u(e,t){this.fun=e,this.array=t}function l(){}var c,f,p=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(e){f=n}}();var d,h=[],m=!1,y=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];h.push(new u(e,t)),1!==h.length||m||i(o)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=l,p.addListener=l,p.once=l,p.off=l,p.removeListener=l,p.removeAllListeners=l,p.emit=l,p.prependListener=l,p.prependOnceListener=l,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,r){"use strict";e.exports={default:r(409),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(414),__esModule:!0}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.__esModule=!0;var s=r(363),a=n(s),o=r(10),u=n(o),l="function"==typeof u.default&&"symbol"===i(a.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof u.default&&e.constructor===u.default&&e!==u.default.prototype?"symbol":void 0===e?"undefined":i(e)};t.default="function"==typeof u.default&&"symbol"===l(a.default)?function(e){return void 0===e?"undefined":l(e)}:function(e){return e&&"function"==typeof u.default&&e.constructor===u.default&&e!==u.default.prototype?"symbol":void 0===e?"undefined":l(e)}},function(e,t,r){"use strict";var n=r(15),i=r(5),s=r(43),a=r(29),o=function e(t,r,o){var u,l,c,f=t&e.F,p=t&e.G,d=t&e.S,h=t&e.P,m=t&e.B,y=t&e.W,v=p?i:i[r]||(i[r]={}),g=v.prototype,b=p?n:d?n[r]:(n[r]||{}).prototype;p&&(o=r);for(u in o)(l=!f&&b&&void 0!==b[u])&&u in v||(c=l?b[u]:o[u],v[u]=p&&"function"!=typeof b[u]?o[u]:m&&l?s(c,n):y&&b[u]==c?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):h&&"function"==typeof c?s(Function.call,c):c,h&&((v.virtual||(v.virtual={}))[u]=c,t&e.R&&g&&!g[u]&&a(g,u,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,e.exports=o},function(e,t,r){"use strict";var n=r(151)("wks"),i=r(95),s=r(15).Symbol,a="function"==typeof s;(e.exports=function(e){return n[e]||(n[e]=a&&s[e]||(a?s:i)("Symbol."+e))}).store=n},function(e,t,r){"use strict";e.exports={default:r(411),__esModule:!0}},function(e,t){"use strict";var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return"object"===(void 0===e?"undefined":r(e))?null!==e:"function"==typeof e}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(261),s="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,a=i||s||Function("return this")();e.exports=a},function(e,t){"use strict";function r(e){var t=void 0===e?"undefined":n(e);return null!=e&&("object"==t||"function"==t)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t,r){(function(e){"use strict";function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(e){return i.exec(e).slice(1)};t.resolve=function(){for(var t="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,i="/"===a.charAt(0))}return t=r(n(t.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(e){var i=t.isAbsolute(e),s="/"===a(e,-1);return e=r(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),s=n(r.split("/")),a=Math.min(i.length,s.length),o=a,u=0;u<a;u++)if(i[u]!==s[u]){o=u;break}for(var l=[],u=o;u<i.length;u++)l.push("..");return l=l.concat(s.slice(o)),l.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=s(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},t.basename=function(e,t){var r=s(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){return s(e)[3]};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(t,r(8))},function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var s=l[e];if(!s)throw new ReferenceError("Unknown message "+(0,a.default)(e));return r=i(r),s.replace(/\$(\d+)/g,function(e,t){return r[t-1]})}function i(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,a.default)(e)||e+""}catch(t){return u.inspect(e)}})}t.__esModule=!0,t.MESSAGES=void 0;var s=r(35),a=function(e){return e&&e.__esModule?e:{default:e}}(s);t.get=n,t.parseArgs=i;var o=r(117),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o),l=t.MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this node's position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginNotObject:"Plugin $2 specified in $1 was expected to return an object when invoked but returned $3",pluginNotFunction:"Plugin $2 specified in $1 was expected to return a function but returned $3", -pluginUnknown:"Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4",pluginInvalidProperty:"Plugin $2 specified in $1 provided an invalid property of $3"}},function(e,t,r){"use strict";var n=r(16);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){"use strict";e.exports=!r(27)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(21),i=r(231),s=r(154),a=Object.defineProperty;t.f=r(22)?Object.defineProperty:function(e,t,r){if(n(e),t=s(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";function n(e){return null!=e&&s(e.length)&&!i(e)}var i=r(175),s=r(176);e.exports=n},function(e,t){"use strict";function r(e){return null!=e&&"object"==(void 0===e?"undefined":n(e))}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,v.default)(e)}function s(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i<n.length;i++)e(t,r+"["+i+"]",n[i])}return t.each=e,t}function a(){function e(e,t,n){if(r.indexOf(n)<0)throw new TypeError("Property "+t+" expected value to be one of "+(0,m.default)(r)+" but got "+(0,m.default)(n))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOf=r,e}function o(){function e(e,t,n){for(var i=!1,s=r,a=Array.isArray(s),o=0,s=a?s:(0,d.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(b.is(l,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeTypes=r,e}function u(){function e(e,t,n){for(var s=!1,a=r,o=Array.isArray(a),u=0,a=o?a:(0,d.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(i(n)===c||b.is(c,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.oneOfNodeOrValueTypes=r,e}function l(e){function t(t,r,n){if(i(n)!==e)throw new TypeError("Property "+r+" expected type of "+e+" but got "+i(n))}return t.type=e,t}function c(){function e(){for(var e=r,t=Array.isArray(e),n=0,e=t?e:(0,d.default)(e);;){var i;if(t){if(n>=e.length)break;i=e[n++]}else{if(n=e.next(),n.done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.chainOf=r,e}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&D[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(_[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),s=Array.isArray(n),a=0,n=s?n:(0,d.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;t.fields[u]=t.fields[u]||{}}for(var c in t.fields){var f=t.fields[c];-1===t.builder.indexOf(c)&&(f.optional=!0),void 0===f.default?f.default=null:f.validate||(f.validate=l(i(f.default)))}E[e]=t.visitor,S[e]=t.builder,A[e]=t.fields,x[e]=t.aliases,D[e]=t}t.__esModule=!0,t.DEPRECATED_KEYS=t.BUILDER_KEYS=t.NODE_FIELDS=t.ALIAS_KEYS=t.VISITOR_KEYS=void 0;var p=r(2),d=n(p),h=r(35),m=n(h),y=r(11),v=n(y);t.assertEach=s,t.assertOneOf=a,t.assertNodeType=o,t.assertNodeOrValueType=u,t.assertValueType=l,t.chain=c,t.default=f;var g=r(1),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(g),E=t.VISITOR_KEYS={},x=t.ALIAS_KEYS={},A=t.NODE_FIELDS={},S=t.BUILDER_KEYS={},_=t.DEPRECATED_KEYS={},D={}},function(e,t){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";var n=r(23),i=r(92);e.exports=r(22)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";function n(e){return null==e?void 0===e?u:o:l&&l in Object(e)?s(e):a(e)}var i=r(45),s=r(534),a=r(559),o="[object Null]",u="[object Undefined]",l=i?i.toStringTag:void 0;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n){var a=!r;r||(r={});for(var o=-1,u=t.length;++o<u;){var l=t[o],c=n?n(r[l],e[l],l,r,e):void 0;void 0===c&&(c=e[l]),a?s(r,l,c):i(r,l,c)}return r}var i=r(162),s=r(163);e.exports=n},function(e,t,r){"use strict";function n(e){return a(e)?i(e):s(e)}var i=r(245),s=r(500),a=r(24);e.exports=n},function(e,t){"use strict";e.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var a=r(366),o=s(a),u=r(35),l=s(u),c=r(87),f=s(c),p=r(2),d=s(p),h=r(11),m=s(h),y=r(3),v=s(y),g=r(182),b=i(g),E=r(65),x=s(E),A=r(20),S=i(A),_=r(52),D=r(184),C=s(D),w=r(185),P=s(w),k=r(575),F=s(k),T=r(109),O=s(T),B=r(293),R=s(B),I=r(33),M=s(I),N=r(54),L=s(N),j=r(51),U=s(j),V=r(19),G=s(V),W=function(){function e(t){(0,v.default)(this,e),this.resolvedConfigs=[],this.options=e.createBareOptions(),this.log=t}return e.memoisePluginContainer=function(t,r,n,i){for(var s=e.memoisedPlugins,a=Array.isArray(s),o=0,s=a?s:(0,d.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.container===t)return l.plugin}var c=void 0;if(c="function"==typeof t?t(b):t,"object"===(void 0===c?"undefined":(0,m.default)(c))){var f=new x.default(c,i);return e.memoisedPlugins.push({container:t,plugin:f}),f}throw new TypeError(S.get("pluginNotObject",r,n,void 0===c?"undefined":(0,m.default)(c))+r+n)},e.createBareOptions=function(){var e={};for(var t in M.default){var r=M.default[t];e[t]=(0,O.default)(r.default)}return e},e.normalisePlugin=function(t,r,n,i){if(!((t=t.__esModule?t.default:t)instanceof x.default)){if("function"!=typeof t&&"object"!==(void 0===t?"undefined":(0,m.default)(t)))throw new TypeError(S.get("pluginNotFunction",r,n,void 0===t?"undefined":(0,m.default)(t)));t=e.memoisePluginContainer(t,r,n,i)}return t.init(r,n),t},e.normalisePlugins=function(t,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:t+"$"+s;if("string"==typeof a){var l=(0,C.default)(a,n);if(!l)throw new ReferenceError(S.get("pluginUnknown",a,t,s,n));a=r(179)(l)}return a=e.normalisePlugin(a,t,s,u),[a,o]})},e.prototype.mergeOptions=function(t){var r=this,i=t.options,s=t.extending,a=t.alias,o=t.loc,u=t.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,m.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var l=(0,F.default)(i,function(e){if(e instanceof x.default)return e});u=u||n.cwd(),o=o||a;for(var c in l){if(!M.default[c]&&this.log)if(L.default[c])this.log.error("Using removed Babel 5 option: "+a+"."+c+" - "+L.default[c].message,ReferenceError);else{var p="Unknown option: "+a+"."+c+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(p+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,_.normaliseOptions)(l),l.plugins&&(l.plugins=e.normalisePlugins(o,u,l.plugins)),l.presets&&(l.passPerPreset?l.presets=this.resolvePresets(l.presets,u,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:u})}):(this.mergePresets(l.presets,u),delete l.presets)),i===s?(0,f.default)(s,l):(0,R.default)(s||this.options,l)}},e.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:G.default.dirname(t||"")})})},e.prototype.resolvePresets=function(e,t,n){return e.map(function(e){var i=void 0;if(Array.isArray(e)){if(e.length>2)throw new Error("Unexpected extra options "+(0,l.default)(e.slice(2))+" passed to preset.");var s=e;e=s[0],i=s[1]}var a=void 0;try{if("string"==typeof e){if(!(a=(0,P.default)(e,t)))throw new Error("Couldn't find preset "+(0,l.default)(e)+" relative to directory "+(0,l.default)(t));e=r(179)(a)}if("object"===(void 0===e?"undefined":(0,m.default)(e))&&e.__esModule)if(e.default)e=e.default;else{var u=e,c=(u.__esModule,(0,o.default)(u,["__esModule"]));e=c}if("object"===(void 0===e?"undefined":(0,m.default)(e))&&e.buildPreset&&(e=e.buildPreset),"function"!=typeof e&&void 0!==i)throw new Error("Options "+(0,l.default)(i)+" passed to "+(a||"a preset")+" which does not accept options.");if("function"==typeof e&&(e=e(b,i,{dirname:t})),"object"!==(void 0===e?"undefined":(0,m.default)(e)))throw new Error("Unsupported preset format: "+e+".");n&&n(e,a)}catch(e){throw a&&(e.message+=" (While processing preset: "+(0,l.default)(a)+")"),e}return e})},e.prototype.normaliseOptions=function(){var e=this.options;for(var t in M.default){var r=M.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},e.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,U.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,d.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},e}();t.default=W,W.memoisedPlugins=[],e.exports=t.default}).call(t,r(8))},function(e,t,r){"use strict";e.exports={default:r(405),__esModule:!0}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s),o=r(3),u=i(o),l=r(224),c=n(l),f=r(239),p=i(f),d=r(466),h=i(d),m=r(7),y=i(m),v=r(174),g=i(v),b=r(134),E=i(b),x=r(1),A=n(x),S=r(88),_=(0,p.default)("babel"),D=function(){function e(t,r){(0,u.default)(this,e),this.parent=r,this.hub=t,this.contexts=[],this.data={},this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.state=null,this.opts=null,this.skipKeys=null,this.parentPath=null,this.context=null,this.container=null,this.listKey=null,this.inList=!1,this.parentKey=null,this.key=null,this.node=null,this.scope=null,this.type=null,this.typeAnnotation=null}return e.get=function(t){var r=t.hub,n=t.parentPath,i=t.parent,s=t.container,a=t.listKey,o=t.key;!r&&n&&(r=n.hub),(0,h.default)(i,"To get a node path the parent needs to exist");var u=s[o],l=S.path.get(i)||[];S.path.has(i)||S.path.set(i,l);for(var c=void 0,f=0;f<l.length;f++){var p=l[f];if(p.node===u){c=p;break}}return c||(c=new e(r,i),l.push(c)),c.setup(n,s,a,o),c},e.prototype.getScope=function(e){var t=e;return this.isScope()&&(t=new E.default(this,e)),t},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e,t){var r=this.data[e];return!r&&t&&(r=this.data[e]=t),r},e.prototype.buildCodeFrameError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,y.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){A.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){_.enabled&&_(this.getPathLocation()+" "+this.type+": "+e())},e}();t.default=D,(0,g.default)(D.prototype,r(368)),(0,g.default)(D.prototype,r(374)),(0,g.default)(D.prototype,r(382)),(0,g.default)(D.prototype,r(372)),(0,g.default)(D.prototype,r(371)),(0,g.default)(D.prototype,r(377)),(0,g.default)(D.prototype,r(370)),(0,g.default)(D.prototype,r(381)),(0,g.default)(D.prototype,r(380)),(0,g.default)(D.prototype,r(373)),(0,g.default)(D.prototype,r(369));for(var C=A.TYPES,w=Array.isArray(C),P=0,C=w?C:(0,a.default)(C);;){var k;if("break"===function(){if(w){if(P>=C.length)return"break";k=C[P++]}else{if(P=C.next(),P.done)return"break";k=P.value}var e=k,t="is"+e;D.prototype[t]=function(e){return A[t](this.node,e)},D.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}}())break}for(var F in c){(function(e){if("_"===e[0])return"continue";A.TYPES.indexOf(e)<0&&A.TYPES.push(e);var t=c[e];D.prototype["is"+e]=function(e){return t.checkPath(this,e)}})(F)}e.exports=t.default},function(e,t,r){"use strict";var n=r(142),i=r(140);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";function n(e,t){var r=s(e,t);return i(r)?r:void 0}var i=r(497),s=r(535);e.exports=n},function(e,t){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r,n){if(e.selfReference){if(!n.hasBinding(r.name)||n.hasGlobal(r.name)){if(!f.isFunction(t))return;var i=p;t.generator&&(i=d);var s=i({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:n.generateUidIdentifier(r.name)}).expression;s.callee._skipModulesRemap=!0;for(var a=s.callee.body.body[0].params,u=0,l=(0,o.default)(t);u<l;u++)a.push(n.generateUidIdentifier("x"));return s}n.rename(r.name)}t.id=r,n.getProgramParent().references[r.name]=!0}function s(e,t,r){var n={selfAssignment:!1,selfReference:!1,outerDeclar:r.getBindingIdentifier(t),references:[],name:t},i=r.getOwnBinding(t);return i?"param"===i.kind&&(n.selfReference=!0):(n.outerDeclar||r.hasGlobal(t))&&r.traverse(e,h,n),n}t.__esModule=!0,t.default=function(e){var t=e.node,r=e.parent,n=e.scope,a=e.id;if(!t.id){if(!f.isObjectProperty(r)&&!f.isObjectMethod(r,{kind:"method"})||r.computed&&!f.isLiteral(r.key)){if(f.isVariableDeclarator(r)){if(a=r.id,f.isIdentifier(a)){var o=n.parent.getBinding(a.name);if(o&&o.constant&&n.getBinding(a.name)===o)return t.id=a,void(t.id[f.NOT_LOCAL_BINDING]=!0)}}else if(f.isAssignmentExpression(r))a=r.left;else if(!a)return}else a=r.key;var u=void 0;if(a&&f.isLiteral(a))u=a.value;else{if(!a||!f.isIdentifier(a))return;u=a.name}u=f.toBindingIdentifierName(u),a=f.identifier(u),a[f.NOT_LOCAL_BINDING]=!0;return i(s(t,u,n),t,a,n)||t}};var a=r(189),o=n(a),u=r(4),l=n(u),c=r(1),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),p=(0,l.default)("\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),d=(0,l.default)("\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n"),h={"ReferencedIdentifier|BindingIdentifier":function(e,t){if(e.node.name===t.name){e.scope.getBindingIdentifier(t.name)===t.outerDeclar&&(t.selfReference=!0,e.stop())}}};e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(361),s=n(i),a=r(9),o=n(a),u=r(11),l=n(u);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,l.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.default?(0,s.default)(e,t):e.__proto__=t)}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(11),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,r){"use strict";var n=r(227);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){"use strict";var n=r(237),i=r(141);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(17),i=n.Symbol;e.exports=i},function(e,t){"use strict";function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},function(e,t,r){"use strict";function n(e){return a(e)?i(e,!0):s(e)}var i=r(245),s=r(501),a=r(24);e.exports=n},function(e,t,r){"use strict";function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=r(597);e.exports=n},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,r){(function(e){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.File=void 0;var s=r(2),a=i(s),o=r(9),u=i(o),l=r(87),c=i(l),f=r(3),p=i(f),d=r(42),h=i(d),m=r(41),y=i(m),v=r(194),g=i(v),b=r(121),E=n(b),x=r(403),A=i(x),S=r(34),_=i(S),D=r(299),C=i(D),w=r(7),P=i(w),k=r(288),F=i(k),T=r(186),O=i(T),B=r(181),R=i(B),I=r(273),M=i(I),N=r(120),L=i(N),j=r(119),U=i(j),V=r(89),G=r(122),W=n(G),Y=r(19),q=i(Y),K=r(1),H=n(K),J=r(118),X=i(J),z=r(296),$=i(z),Q=r(297),Z=i(Q),ee=/^#!.*/,te=[[$.default],[Z.default]],re={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},ne=function(t){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[1];(0,p.default)(this,n);var i=(0,h.default)(this,t.call(this));return i.pipeline=r,i.log=new L.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,c.default)((0,u.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new w.Hub(i),i}return(0,y.default)(n,t),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(H.isModuleDeclaration(s)){e=!0;break}}e&&this.path.traverse(E,this)},n.prototype.initOptions=function(e){e=new _.default(this.log,this.pipeline).init(e),e.inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=q.default.basename(e.filename,q.default.extname(e.filename)),e.ignore=W.arrayify(e.ignore,W.regexify),e.only&&(e.only=W.arrayify(e.only,W.regexify)),(0,M.default)(e,{moduleRoot:e.sourceRoot}),(0,M.default)(e,{sourceRoot:e.moduleRoot}),(0,M.default)(e,{filenameRelative:e.filename});var t=q.default.basename(e.filenameRelative);return(0,M.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=e.plugins.concat(te),r=[],n=[],i=t,s=Array.isArray(i),o=0,i=s?i:(0,a.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,c=l[0],f=l[1];r.push(c.visitor),n.push(new C.default(this,c,f)),c.manipulateOptions&&c.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(r),this.pluginPasses.push(n)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(H.importNamespaceSpecifier(i)):"default"===t?s.push(H.importDefaultSpecifier(i)):s.push(H.importSpecifier(i,H.identifier(t)));var a=H.importDeclaration(s,H.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return H.memberExpression(n,H.identifier(e));var s=(0,g.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return H.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=H.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,P.default)(e,re,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new F.default.SourceMapConsumer(t),n=new F.default.SourceMapConsumer(e),i=new F.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(t){var n=V.parse,i=this.opts.parserOpts;if(i&&(i=(0,c.default)({},this.parserOpts,i),i.parser)){if("string"==typeof i.parser){var s=q.default.dirname(this.opts.filename)||e.cwd(),a=(0,X.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=r(178)(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,V.parse)(e,i)}}}this.log.debug("Parse start");var o=n(t,i||this.parserOpts);return this.log.debug("Parse stop"),o},n.prototype._addAst=function(e){this.path=w.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e<this.pluginPasses.length;e++){var t=this.pluginPasses[e];this.call("pre",t),this.log.debug("Start transform traverse");var r=P.default.visitors.merge(this.pluginVisitors[e],t,this.opts.wrapPluginVisitorMethod);(0,P.default)(this.ast,r,this.scope),this.log.debug("End transform traverse"),this.call("post",t)}return this.generate()},n.prototype.wrap=function(t,r){t+="";try{return this.shouldIgnore()?this.makeResult({code:t,ignored:!0}):r()}catch(r){if(r._babel)throw r;r._babel=!0;var n=r.message=this.opts.filename+": "+r.message,i=r.loc;if(i&&(r.codeFrame=(0,R.default)(t,i.line,i.column+1,this.opts),n+="\n"+r.codeFrame),e.browser&&(r.message=n),r.stack){var s=r.stack.replace(r.message,n);r.stack=s}throw r}},n.prototype.addCode=function(e){e=(e||"")+"",e=this.parseInputSourceMap(e),this.code=e},n.prototype.parseCode=function(){this.parseShebang();var e=this.parse(this.code);this.addAst(e)},n.prototype.shouldIgnore=function(){var e=this.opts;return W.shouldIgnore(e.filename,e.ignore,e.only)},n.prototype.call=function(e,t){for(var r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s,u=o.plugin,l=u[e];l&&l.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=A.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=A.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=ee.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(ee,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var t=this.opts,n=this.ast,i={ast:n};if(!t.code)return this.makeResult(i);var s=O.default;if(t.generatorOpts.generator&&"string"==typeof(s=t.generatorOpts.generator)){var a=q.default.dirname(this.opts.filename)||e.cwd(),o=(0,X.default)(s,a);if(!o)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=r(178)(o).print}this.log.debug("Generation start");var u=s(n,t.generatorOpts?(0,c.default)(t,t.generatorOpts):t,this.code);return i.code=u.code,i.map=u.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==t.sourceMaps&&"both"!==t.sourceMaps||(i.code+="\n"+A.default.fromObject(i.map).toComment()),"inline"===t.sourceMaps&&(i.map=null),this.makeResult(i)},n}(U.default);t.default=ne,t.File=ne}).call(t,r(8))},function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=x[e];return null==t?x[e]=E.default.existsSync(e):t}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new S(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&g.default.dirname(r)}),n.configs}t.__esModule=!0;var o=r(87),u=i(o),l=r(3),c=i(l);t.default=a;var f=r(118),p=i(f),d=r(470),h=i(d),m=r(604),y=i(m),v=r(19),g=i(v),b=r(115),E=i(b),x={},A={},S=function(){function e(t){(0,c.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,y.default)(e)||(e=g.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=g.default.dirname(e));){if(!t){var i=g.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=g.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=g.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=E.default.readFileSync(e,"utf8"),r=t.split("\n");r=r.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),r.length&&this.mergeConfig({options:{ignore:r},alias:e,dirname:g.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1 -;this.resolvedConfigs.push(e);var n=E.default.readFileSync(e,"utf8"),i=void 0;try{i=A[n]=A[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:g.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,u.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var a=(0,p.default)(t.extends,s);a?this.addConfig(a):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var o=void 0,l=n.env.BABEL_ENV||"production"||"development";t.env&&(o=t.env[l],delete t.env),this.mergeConfig({options:o,alias:r+".env."+l,dirname:s})},e}();e.exports=t.default}).call(t,r(8))},function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var n=o.default[t];if(n&&n.alias&&(n=o.default[n.alias]),n){var i=s[n.type];i&&(r=i(r)),e[t]=r}}}return e}t.__esModule=!0,t.config=void 0,t.normaliseOptions=n;var i=r(53),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i),a=r(33),o=function(e){return e&&e.__esModule?e:{default:e}}(a);t.config=o.default},function(e,t,r){"use strict";function n(e){return!!e}function i(e){return l.booleanify(e)}function s(e){return l.list(e)}t.__esModule=!0,t.filename=void 0,t.boolean=n,t.booleanString=i,t.list=s;var a=r(284),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=r(122),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);t.filename=o.default},function(e,t){"use strict";e.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},function(e,t,r){"use strict";var n=r(43),i=r(428),s=r(427),a=r(21),o=r(153),u=r(238),l={},c={},f=e.exports=function(e,t,r,f,p){var d,h,m,y,v=p?function(){return e}:u(e),g=n(r,f,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(s(v)){for(d=o(e.length);d>b;b++)if((y=t?g(a(h=e[b])[0],h[1]):g(e[b]))===l||y===c)return y}else for(m=v.call(e);!(h=m.next()).done;)if((y=i(m,g,h.value,t))===l||y===c)return y};f.BREAK=l,f.RETURN=c},function(e,t){"use strict";e.exports={}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(95)("meta"),s=r(16),a=r(28),o=r(23).f,u=0,l=Object.isExtensible||function(){return!0},c=!r(27)(function(){return l(Object.preventExtensions({}))}),f=function(e){o(e,i,{value:{i:"O"+ ++u,w:{}}})},p=function(e,t){if(!s(e))return"symbol"==(void 0===e?"undefined":n(e))?e:("string"==typeof e?"S":"P")+e;if(!a(e,i)){if(!l(e))return"F";if(!t)return"E";f(e)}return e[i].i},d=function(e,t){if(!a(e,i)){if(!l(e))return!0;if(!t)return!1;f(e)}return e[i].w},h=function(e){return c&&m.NEED&&l(e)&&!a(e,i)&&f(e),e},m=e.exports={KEY:i,NEED:!1,fastKey:p,getWeak:d,onFreeze:h}},function(e,t,r){"use strict";var n=r(16);e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,r){"use strict";r(440);for(var n=r(15),i=r(29),s=r(56),a=r(13)("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<o.length;u++){var l=o[u],c=n[l],f=c&&c.prototype;f&&!f[a]&&i(f,a,l),s[l]=s.Array}},function(e,t){"use strict";function r(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}e.exports=r},function(e,t,r){"use strict";function n(e){return"function"==typeof e?e:null==e?o:"object"==(void 0===e?"undefined":i(e))?u(e)?a(e[0],e[1]):s(e):l(e)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(502),a=r(503),o=r(110),u=r(6),l=r(592);e.exports=n},function(e,t,r){"use strict";function n(e){return"symbol"==(void 0===e?"undefined":i(e))||a(e)&&s(e)==o}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(30),a=r(25),o="[object Symbol]";e.exports=n},function(e,t){"use strict";function r(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}function n(e){var t=e.match(y);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function s(e){var r=e,s=n(e);if(s){if(!s.path)return e;r=s.path}for(var a,o=t.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)a=u[c],"."===a?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=o?"/":"."),s?(s.path=r,i(s)):r}function a(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(v))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=o,i(a)):o}function o(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function u(e){return e}function l(e){return f(e)?"$"+e:e}function c(e){return f(e)?e.slice(1):e}function f(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,t,r){var n=e.source-t.source;return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name)}function d(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=e.source-t.source)?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name)}function h(e,t){return e===t?0:e>t?1:-1}function m(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=h(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:h(e.name,t.name))}t.getArg=r;var y=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;t.urlParse=n,t.urlGenerate=i,t.normalize=s,t.join=a,t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(y)},t.relative=o;var g=function(){return!("__proto__"in Object.create(null))}();t.toSetString=g?u:l,t.fromSetString=g?u:c,t.compareByOriginalPositions=p,t.compareByGeneratedPositionsDeflated=d,t.compareByGeneratedPositionsInflated=m},function(e,t,r){(function(t){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function s(e){return Object.prototype.toString.call(e)}function a(e){return!i(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}function o(e){if(x.isFunction(e)){if(_)return e.name;var t=e.toString(),r=t.match(C);return r&&r[1]}}function u(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function l(e){if(_||!x.isFunction(e))return x.inspect(e);var t=o(e);return"[Function"+(t?": "+t:"")+"]"}function c(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}function f(e,t,r,n,i){throw new D.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function p(e,t){e||f(e,!0,t,"==",D.ok)}function d(e,t,r,o){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(x.isDate(e)&&x.isDate(t))return e.getTime()===t.getTime();if(x.isRegExp(e)&&x.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"===(void 0===e?"undefined":E(e))||null!==t&&"object"===(void 0===t?"undefined":E(t))){if(a(e)&&a(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;o=o||{actual:[],expected:[]};var u=o.actual.indexOf(e);return-1!==u&&u===o.expected.indexOf(t)||(o.actual.push(e),o.expected.push(t),m(e,t,r,o))}return r?e===t:e==t}function h(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function m(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(x.isPrimitive(e)||x.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=h(e),s=h(t);if(i&&!s||!i&&s)return!1;if(i)return e=S.call(e),t=S.call(t),d(e,t,r);var a,o,u=w(e),l=w(t);if(u.length!==l.length)return!1;for(u.sort(),l.sort(),o=u.length-1;o>=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!d(e[a],t[a],r,n))return!1;return!0}function y(e,t,r){d(e,t,!0)&&f(e,t,r,"notDeepStrictEqual",y)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function g(e){var t;try{e()}catch(e){t=e}return t}function b(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=g(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&f(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&x.isError(i),o=!e&&i&&!r;if((a&&s&&v(i,r)||o)&&f(i,r,"Got unwanted exception"+n),e&&i&&r&&!v(i,r)||!e&&i)throw i}var E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x=r(117),A=Object.prototype.hasOwnProperty,S=Array.prototype.slice,_=function(){return"foo"===function(){}.name}(),D=e.exports=p,C=/\s*function\s+([^\(\s]*)\s*/;D.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},x.inherits(D.AssertionError,Error),D.fail=f,D.ok=p,D.equal=function(e,t,r){e!=t&&f(e,t,r,"==",D.equal)},D.notEqual=function(e,t,r){e==t&&f(e,t,r,"!=",D.notEqual)},D.deepEqual=function(e,t,r){d(e,t,!1)||f(e,t,r,"deepEqual",D.deepEqual)},D.deepStrictEqual=function(e,t,r){d(e,t,!0)||f(e,t,r,"deepStrictEqual",D.deepStrictEqual)},D.notDeepEqual=function(e,t,r){d(e,t,!1)&&f(e,t,r,"notDeepEqual",D.notDeepEqual)},D.notDeepStrictEqual=y,D.strictEqual=function(e,t,r){e!==t&&f(e,t,r,"===",D.strictEqual)},D.notStrictEqual=function(e,t,r){e===t&&f(e,t,r,"!==",D.notStrictEqual)},D.throws=function(e,t,r){b(!0,e,t,r)},D.doesNotThrow=function(e,t,r){b(!1,e,t,r)},D.ifError=function(e){if(e)throw e};var w=Object.keys||function(e){var t=[];for(var r in e)A.call(e,r)&&t.push(r);return t}}).call(t,function(){return this}())},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(3),o=n(a),u=r(42),l=n(u),c=r(41),f=n(c),p=r(34),d=n(p),h=r(20),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(h),y=r(119),v=n(y),g=r(7),b=n(g),E=r(174),x=n(E),A=r(109),S=n(A),_=["enter","exit"],D=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,l.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,x.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,S.default)(i.take("visitor"))||{}),i}return(0,f.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var a=r,o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(c){var f=c.apply(this,n);null!=f&&(e=f)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=d.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=b.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(m.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=_,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}if(e[i])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return b.default.explode(e),e},t}(v.default);t.default=D,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){var t=e.messages;return{visitor:{Scope:function(e){var r=e.scope;for(var n in r.bindings){var s=r.bindings[n];if("const"===s.kind||"module"===s.kind)for(var a=s.constantViolations,o=Array.isArray(a),u=0,a=o?a:(0,i.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;throw c.buildCodeFrameError(t.get("readOnly",n))}}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncFunctions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ArrowFunctionExpression:function(e,r){if(r.opts.spec){var n=e.node;if(n.shadow)return;n.shadow={this:!1},n.type="FunctionExpression";var i=t.thisExpression();i._forceShadow=e,e.ensureBlock(),e.get("body").unshiftContainer("body",t.expressionStatement(t.callExpression(r.addHelper("newArrowCheck"),[t.thisExpression(),i]))),e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("bind")),[t.thisExpression()]))}else e.arrowFunctionToShadowed()}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e,t){for(var n=t.get(e),s=n,a=Array.isArray(s),o=0,s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,c=l.node;if(l.isFunctionDeclaration()){var f=r.variableDeclaration("let",[r.variableDeclarator(c.id,r.toExpression(c))]);f._blockHoist=2,c.id=null,l.replaceWith(f)}}}var r=e.types;return{visitor:{BlockStatement:function(e){var n=e.node,i=e.parent;r.isFunction(i,{body:n})||r.isExportDeclaration(i)||t("body",e)},SwitchCase:function(e){t("consequent",e)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return b.isLoop(e.parent)||b.isCatchClause(e.parent)}function s(e){return!!b.isVariableDeclaration(e)&&(!!e[b.BLOCK_SCOPED_SYMBOL]||("let"===e.kind||"const"===e.kind))}function a(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!b.isFor(r))for(var s=0;s<t.declarations.length;s++){var a=t.declarations[s];a.init=a.init||n.buildUndefinedNode()}if(t[b.BLOCK_SCOPED_SYMBOL]=!0,t.kind="var",i){var o=n.getFunctionParent(),u=e.getBindingIdentifiers();for(var l in u){var c=n.getOwnBinding(l);c&&(c.kind="var"),n.moveBindingTo(l,o)}}}function o(e){return b.isVariableDeclaration(e,{kind:"var"})&&!s(e)}function u(e){return b.isBreakStatement(e)?"break":b.isContinueStatement(e)?"continue":void 0}t.__esModule=!0;var l=r(10),c=n(l),f=r(9),p=n(f),d=r(3),h=n(d);t.default=function(){return{visitor:{VariableDeclaration:function(e,t){var r=e.node,n=e.parent,i=e.scope;if(s(r)&&(a(e,null,n,i,!0),r._tdzThis)){for(var o=[r],u=0;u<r.declarations.length;u++){var l=r.declarations[u];if(l.init){var c=b.assignmentExpression("=",l.id,l.init);c._ignoreBlockScopingTDZ=!0,o.push(b.expressionStatement(c))}l.init=t.addHelper("temporalUndefined")}r._blockHoist=2,e.isCompletionRecord()&&o.push(b.expressionStatement(i.buildUndefinedNode())),e.replaceWithMultiple(o)}},Loop:function(e,t){var r=e.node,n=e.parent,i=e.scope;b.ensureBlock(r);var s=new B(e,e.get("body"),n,i,t),a=s.run();a&&e.replaceWith(a)},CatchClause:function(e,t){var r=e.parent,n=e.scope;new B(null,e.get("body"),r,n,t).run()},"BlockStatement|SwitchStatement|Program":function(e,t){if(!i(e)){new B(null,e,e.parent,e.scope,t).run()}}}}};var m=r(7),y=n(m),v=r(330),g=r(1),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(g),E=r(280),x=n(E),A=r(578),S=n(A),_=r(4),D=n(_),C=(0,D.default)('\n if (typeof RETURN === "object") return RETURN.v;\n'),w=y.default.visitors.merge([{Loop:{enter:function(e,t){t.loopDepth++},exit:function(e,t){t.loopDepth--}},Function:function(e,t){return t.loopDepth>0&&e.traverse(P,t),e.skip()}},v.visitor]),P=y.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},v.visitor]),k={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(o(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=b.sequenceExpression(n)}}else if(e.isFor())o(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(o(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return b.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},F={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},T={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},O={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(O,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(O,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=u(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(b.isBreakStatement(r)&&b.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=b.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=b.objectExpression([b.objectProperty(b.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&(s=b.returnStatement(s),s[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(b.inherits(s,r)))}}},B=function(){function e(t,r,n,i,s){(0,h.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,p.default)(null),this.hasLetReferences=!1,this.letReferences=(0,p.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=b.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(b.isFunction(this.parent)||b.isProgram(this.block))return void this.updateScopeInfo();if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!b.isLabeledStatement(this.loopParent)?b.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,x.default)(t),s=(0,x.default)(t),a=this.blockPath.isSwitchStatement(),o=b.functionExpression(null,i,b.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(b.variableDeclaration("var",[b.variableDeclarator(u,o)])));var l=b.callExpression(u,s),c=this.scope.generateUidIdentifier("ret");y.default.hasType(o.body,this.scope,"YieldExpression",b.FUNCTION_TYPES)&&(o.generator=!0,l=b.yieldExpression(l,!0)),y.default.hasType(o.body,this.scope,"AwaitExpression",b.FUNCTION_TYPES)&&(o.async=!0,l=b.awaitExpression(l)),this.buildClosure(c,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(b.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,T,t);for(var r=0;r<e.params.length;r++){var n=e.params[r];if(t.reassignments[n.name]){var i=this.scope.generateUidIdentifier(n.name);e.params[r]=i,this.scope.rename(n.name,i.name,e),e.body.body.push(b.expressionStatement(b.assignmentExpression("=",n,i)))}}},e.prototype.getLetReferences=function(){var e=this,t=this.block,r=[];if(this.loop){var n=this.loop.left||this.loop.init;s(n)&&(r.push(n),(0,S.default)(this.outsideLetReferences,b.getBindingIdentifiers(n)))}var i=function n(i,o){o=o||i.node,(b.isClassDeclaration(o)||b.isFunctionDeclaration(o)||s(o))&&(s(o)&&a(i,o,t,e.scope),r=r.concat(o.declarations||o)),b.isLabeledStatement(o)&&n(i.get("body"),o.body)};if(t.body)for(var o=0;o<t.body.length;o++){var u=this.blockPath.get("body")[o];i(u)}if(t.cases)for(var l=0;l<t.cases.length;l++)for(var c=t.cases[l].consequent,f=0;f<c.length;f++){var p=this.blockPath.get("cases")[l],d=c[f];i(p,d)}for(var h=0;h<r.length;h++){var m=r[h],y=b.getBindingIdentifiers(m,!1,!0);(0,S.default)(this.letReferences,y),this.hasLetReferences=!0}if(this.hasLetReferences){var v={letReferences:this.letReferences,closurify:!1,file:this.file,loopDepth:0},g=this.blockPath.find(function(e){return e.isLoop()||e.isFunction()});return g&&g.isLoop()&&v.loopDepth++,this.blockPath.traverse(w,v),v.closurify}},e.prototype.checkLoop=function(){var e={hasBreakContinue:!1,ignoreLabeless:!1,inSwitchCase:!1,innerLabels:[],hasReturn:!1,isLoop:!!this.loop,map:{},LOOP_IGNORE:(0,c.default)()};return this.blockPath.traverse(F,e),this.blockPath.traverse(O,e),e},e.prototype.hoistVarDeclarations=function(){this.blockPath.traverse(k,this)},e.prototype.pushDeclar=function(e){var t=[],r=b.getBindingIdentifiers(e);for(var n in r)t.push(b.variableDeclarator(r[n]));this.body.push(b.variableDeclaration(e.kind,t));for(var i=[],s=0;s<e.declarations.length;s++){var a=e.declarations[s];if(a.init){var o=b.assignmentExpression("=",a.id,a.init);i.push(b.inherits(o,a))}}return i},e.prototype.buildHas=function(e,t){var r=this.body;r.push(b.variableDeclaration("var",[b.variableDeclarator(e,t)]));var n=void 0,i=this.has,s=[];if(i.hasReturn&&(n=C({RETURN:e})),i.hasBreakContinue){for(var a in i.map)s.push(b.switchCase(b.stringLiteral(a),[i.map[a]]));if(i.hasReturn&&s.push(b.switchCase(null,[n])),1===s.length){var o=s[0];r.push(b.ifStatement(b.binaryExpression("===",e,o.test),o.consequent[0]))}else{if(this.loop)for(var u=0;u<s.length;u++){var l=s[u].consequent[0];b.isBreakStatement(l)&&!l.label&&(l.label=this.loopLabel=this.loopLabel||this.scope.generateUidIdentifier("loop"))}r.push(b.switchStatement(e,s))}}else i.hasReturn&&r.push(n)},e}();e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(10),s=n(i);t.default=function(e){var t=e.types,r=(0,s.default)();return{visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var r=e.node,n=r.declaration.id||e.scope.generateUidIdentifier("class");r.declaration.id=n,e.replaceWith(r.declaration),e.insertAfter(t.exportDefaultDeclaration(n))}},ClassDeclaration:function(e){var r=e.node,n=r.id||e.scope.generateUidIdentifier("class");e.replaceWith(t.variableDeclaration("let",[t.variableDeclarator(n,t.toExpression(r))]))},ClassExpression:function(e,t){var n=e.node;if(!n[r]){var i=(0,f.default)(e);if(i&&i!==n)return e.replaceWith(i);n[r]=!0;var s=l.default;t.opts.loose&&(s=o.default),e.replaceWith(new s(e,t.file).run())}}}}};var a=r(331),o=n(a),u=r(207),l=n(u),c=r(40),f=n(c);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e){return o.isObjectProperty(e)?e.value:o.isObjectMethod(e)?o.functionExpression(null,e.params,e.body,e.generator,e.async):void 0}function r(e,r,i){"get"===r.kind&&"set"===r.kind?n(e,r,i):i.push(o.expressionStatement(o.assignmentExpression("=",o.memberExpression(e,r.key,r.computed||o.isLiteral(r.key)),t(r))))}function n(e,r){var n=(e.objId,e.body),i=e.getMutatorId,s=e.scope,a=!r.computed&&o.isIdentifier(r.key)?o.stringLiteral(r.key.name):r.key,u=s.maybeGenerateMemoised(a);u&&(n.push(o.expressionStatement(o.assignmentExpression("=",u,a))),a=u),n.push.apply(n,l({MUTATOR_MAP_REF:i(),KEY:a,VALUE:t(r),KIND:o.identifier(r.kind)}))}function s(e){for(var t=e.computedProps,s=Array.isArray(t),a=0,t=s?t:(0,i.default)(t);;){var o;if(s){if(a>=t.length)break;o=t[a++]}else{if(a=t.next(),a.done)break;o=a.value}var u=o;"get"===u.kind||"set"===u.kind?n(e,u):r(e.objId,u,e.body)}}function a(e){for(var s=e.objId,a=e.body,u=e.computedProps,l=e.state,c=u,f=Array.isArray(c),p=0,c=f?c:(0,i.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d,m=o.toComputedKey(h);if("get"===h.kind||"set"===h.kind)n(e,h);else if(o.isStringLiteral(m,{value:"__proto__"}))r(s,h,a);else{if(1===u.length)return o.callExpression(l.addHelper("defineProperty"),[e.initPropExpression,m,t(h)]);a.push(o.expressionStatement(o.callExpression(l.addHelper("defineProperty"),[s,m,t(h)])))}}}var o=e.types,u=e.template,l=u("\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n ");return{visitor:{ObjectExpression:{exit:function(e,t){for(var r=e.node,n=e.parent,u=e.scope,l=!1,c=r.properties,f=Array.isArray(c),p=0,c=f?c:(0,i.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}if(l=!0===d.computed)break}if(l){for(var h=[],m=[],y=!1,v=r.properties,g=Array.isArray(v),b=0,v=g?v:(0,i.default)(v);;){var E;if(g){if(b>=v.length)break;E=v[b++]}else{if(b=v.next(),b.done)break;E=b.value}var x=E;x.computed&&(y=!0),y?m.push(x):h.push(x)}var A=u.generateUidIdentifierBasedOnNode(n),S=o.objectExpression(h),_=[];_.push(o.variableDeclaration("var",[o.variableDeclarator(A,S)]));var D=a;t.opts.loose&&(D=s);var C=void 0,w=function(){return C||(C=u.generateUidIdentifier("mutatorMap"),_.push(o.variableDeclaration("var",[o.variableDeclarator(C,o.objectExpression([]))]))),C},P=D({scope:u,objId:A,body:_,computedProps:m,initPropExpression:S,getMutatorId:w,state:t});C&&_.push(o.expressionStatement(o.callExpression(t.addHelper("defineEnumerableProperties"),[A,C]))),P?e.replaceWith(P):(_.push(o.expressionStatement(A)),e.replaceWithMultiple(_))}}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(2),o=n(a);t.default=function(e){function t(e){for(var t=e.declarations,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var s;if(r){if(i>=t.length)break;s=t[i++]}else{if(i=t.next(),i.done)break;s=i.value}var a=s;if(n.isPattern(a.id))return!0}return!1}function r(e){for(var t=e.elements,r=Array.isArray(t),i=0,t=r?t:(0,o.default)(t);;){var s;if(r){if(i>=t.length)break;s=t[i++]}else{if(i=t.next(),i.done)break;s=i.value}var a=s;if(n.isRestElement(a))return!0}return!1}var n=e.types,i={ReferencedIdentifier:function(e,t){t.bindings[e.node.name]&&(t.deopt=!0,e.stop())}},a=function(){function e(t){(0,s.default)(this,e),this.blockHoist=t.blockHoist,this.operator=t.operator,this.arrays={},this.nodes=t.nodes||[],this.scope=t.scope,this.file=t.file,this.kind=t.kind} -return e.prototype.buildVariableAssignment=function(e,t){var r=this.operator;n.isMemberExpression(e)&&(r="=");var i=void 0;return i=r?n.expressionStatement(n.assignmentExpression(r,e,t)):n.variableDeclaration(this.kind,[n.variableDeclarator(e,t)]),i._blockHoist=this.blockHoist,i},e.prototype.buildVariableDeclaration=function(e,t){var r=n.variableDeclaration("var",[n.variableDeclarator(e,t)]);return r._blockHoist=this.blockHoist,r},e.prototype.push=function(e,t){n.isObjectPattern(e)?this.pushObjectPattern(e,t):n.isArrayPattern(e)?this.pushArrayPattern(e,t):n.isAssignmentPattern(e)?this.pushAssignmentPattern(e,t):this.nodes.push(this.buildVariableAssignment(e,t))},e.prototype.toArray=function(e,t){return this.file.opts.loose||n.isIdentifier(e)&&this.arrays[e.name]?e:this.scope.toArray(e,t)},e.prototype.pushAssignmentPattern=function(e,t){var r=this.scope.generateUidIdentifierBasedOnNode(t),i=n.variableDeclaration("var",[n.variableDeclarator(r,t)]);i._blockHoist=this.blockHoist,this.nodes.push(i);var s=n.conditionalExpression(n.binaryExpression("===",r,n.identifier("undefined")),e.right,r),a=e.left;if(n.isPattern(a)){var o=n.expressionStatement(n.assignmentExpression("=",r,s));o._blockHoist=this.blockHoist,this.nodes.push(o),this.push(a,r)}else this.nodes.push(this.buildVariableAssignment(a,s))},e.prototype.pushObjectRest=function(e,t,r,i){for(var s=[],a=0;a<e.properties.length;a++){var o=e.properties[a];if(a>=i)break;if(!n.isRestProperty(o)){var u=o.key;n.isIdentifier(u)&&!o.computed&&(u=n.stringLiteral(o.key.name)),s.push(u)}}s=n.arrayExpression(s);var l=n.callExpression(this.file.addHelper("objectWithoutProperties"),[t,s]);this.nodes.push(this.buildVariableAssignment(r.argument,l))},e.prototype.pushObjectProperty=function(e,t){n.isLiteral(e.key)&&(e.computed=!0);var r=e.value,i=n.memberExpression(t,e.key,e.computed);n.isPattern(r)?this.push(r,i):this.nodes.push(this.buildVariableAssignment(r,i))},e.prototype.pushObjectPattern=function(e,t){if(e.properties.length||this.nodes.push(n.expressionStatement(n.callExpression(this.file.addHelper("objectDestructuringEmpty"),[t]))),e.properties.length>1&&!this.scope.isStatic(t)){var r=this.scope.generateUidIdentifierBasedOnNode(t);this.nodes.push(this.buildVariableDeclaration(r,t)),t=r}for(var i=0;i<e.properties.length;i++){var s=e.properties[i];n.isRestProperty(s)?this.pushObjectRest(e,t,s,i):this.pushObjectProperty(s,t)}},e.prototype.canUnpackArrayPattern=function(e,t){if(!n.isArrayExpression(t))return!1;if(!(e.elements.length>t.elements.length)){if(e.elements.length<t.elements.length&&!r(e))return!1;for(var s=e.elements,a=Array.isArray(s),u=0,s=a?s:(0,o.default)(s);;){var l;if(a){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l;if(!c)return!1;if(n.isMemberExpression(c))return!1}for(var f=t.elements,p=Array.isArray(f),d=0,f=p?f:(0,o.default)(f);;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h;if(n.isSpreadElement(m))return!1;if(n.isCallExpression(m))return!1;if(n.isMemberExpression(m))return!1}var y=n.getBindingIdentifiers(e),v={deopt:!1,bindings:y};return this.scope.traverse(t,i,v),!v.deopt}},e.prototype.pushUnpackedArrayPattern=function(e,t){for(var r=0;r<e.elements.length;r++){var i=e.elements[r];n.isRestElement(i)?this.push(i.argument,n.arrayExpression(t.elements.slice(r))):this.push(i,t.elements[r])}},e.prototype.pushArrayPattern=function(e,t){if(e.elements){if(this.canUnpackArrayPattern(e,t))return this.pushUnpackedArrayPattern(e,t);var i=!r(e)&&e.elements.length,s=this.toArray(t,i);n.isIdentifier(s)?t=s:(t=this.scope.generateUidIdentifierBasedOnNode(t),this.arrays[t.name]=!0,this.nodes.push(this.buildVariableDeclaration(t,s)));for(var a=0;a<e.elements.length;a++){var o=e.elements[a];if(o){var u=void 0;n.isRestElement(o)?(u=this.toArray(t),u=n.callExpression(n.memberExpression(u,n.identifier("slice")),[n.numericLiteral(a)]),o=o.argument):u=n.memberExpression(t,n.numericLiteral(a),!0),this.push(o,u)}}}},e.prototype.init=function(e,t){if(!n.isArrayExpression(t)&&!n.isMemberExpression(t)){var r=this.scope.maybeGenerateMemoised(t,!0);r&&(this.nodes.push(this.buildVariableDeclaration(r,t)),t=r)}return this.push(e,t),this.nodes},e}();return{visitor:{ExportNamedDeclaration:function(e){var r=e.get("declaration");if(r.isVariableDeclaration()&&t(r.node)){var i=[];for(var s in e.getOuterBindingIdentifiers(e)){var a=n.identifier(s);i.push(n.exportSpecifier(a,a))}e.replaceWith(r.node),e.insertAfter(n.exportNamedDeclaration(null,i))}},ForXStatement:function(e,t){var r=e.node,i=e.scope,s=r.left;if(n.isPattern(s)){var o=i.generateUidIdentifier("ref");return r.left=n.variableDeclaration("var",[n.variableDeclarator(o)]),e.ensureBlock(),void r.body.body.unshift(n.variableDeclaration("var",[n.variableDeclarator(s,o)]))}if(n.isVariableDeclaration(s)){var u=s.declarations[0].id;if(n.isPattern(u)){var l=i.generateUidIdentifier("ref");r.left=n.variableDeclaration(s.kind,[n.variableDeclarator(l,null)]);var c=[];new a({kind:s.kind,file:t,scope:i,nodes:c}).init(u,l),e.ensureBlock();var f=r.body;f.body=c.concat(f.body)}}},CatchClause:function(e,t){var r=e.node,i=e.scope,s=r.param;if(n.isPattern(s)){var o=i.generateUidIdentifier("ref");r.param=o;var u=[];new a({kind:"let",file:t,scope:i,nodes:u}).init(s,o),r.body.body=u.concat(r.body.body)}},AssignmentExpression:function(e,t){var r=e.node,i=e.scope;if(n.isPattern(r.left)){var s=[],o=new a({operator:r.operator,file:t,scope:i,nodes:s}),u=void 0;!e.isCompletionRecord()&&e.parentPath.isExpressionStatement()||(u=i.generateUidIdentifierBasedOnNode(r.right,"ref"),s.push(n.variableDeclaration("var",[n.variableDeclarator(u,r.right)])),n.isArrayExpression(r.right)&&(o.arrays[u.name]=!0)),o.init(r.left,u||r.right),u&&s.push(n.expressionStatement(u)),e.replaceWithMultiple(s)}},VariableDeclaration:function(e,r){var i=e.node,s=e.scope,u=e.parent;if(!n.isForXStatement(u)&&u&&e.container&&t(i)){for(var l=[],c=void 0,f=0;f<i.declarations.length;f++){c=i.declarations[f];var p=c.init,d=c.id,h=new a({blockHoist:i._blockHoist,nodes:l,scope:s,kind:i.kind,file:r});n.isPattern(d)?(h.init(d,p),+f!=i.declarations.length-1&&n.inherits(l[l.length-1],c)):l.push(n.inherits(h.buildVariableAssignment(c.id,c.init),c))}for(var m=[],y=l,v=Array.isArray(y),g=0,y=v?y:(0,o.default)(y);;){var b;if(v){if(g>=y.length)break;b=y[g++]}else{if(g=y.next(),g.done)break;b=g.value}var E=b,x=m[m.length-1];if(x&&n.isVariableDeclaration(x)&&n.isVariableDeclaration(E)&&x.kind===E.kind){var A;(A=x.declarations).push.apply(A,E.declarations)}else m.push(E)}for(var S=m,_=Array.isArray(S),D=0,S=_?S:(0,o.default)(S);;){var C;if(_){if(D>=S.length)break;C=S[D++]}else{if(D=S.next(),D.done)break;C=D.value}var w=C;if(w.declarations)for(var P=w.declarations,k=Array.isArray(P),F=0,P=k?P:(0,o.default)(P);;){var T;if(k){if(F>=P.length)break;T=P[F++]}else{if(F=P.next(),F.done)break;T=F.value}var O=T,B=O.id.name;s.bindings[B]&&(s.bindings[B].kind=w.kind)}}1===m.length?e.replaceWith(m[0]):e.replaceWithMultiple(m)}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),f=t.left;return a.isVariableDeclaration(f)?(f.declarations[0].init=c,l.body.body.unshift(f)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",f,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var f=n.generateUidIdentifier("iterator"),p=n.generateUidIdentifier("isArray"),d=u({LOOP_OBJECT:f,IS_ARRAY:p,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||d.body.body.shift();var h=a.isLabeledStatement(s),m=void 0;return h&&(m=a.labeledStatement(s.label,d)),{replaceParent:h,declar:l,node:m||d,loop:d}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),f=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,f));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,f)])}var p=n.generateUidIdentifier("iterator"),d=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:p,STEP_KEY:c,OBJECT:r.right,BODY:null}),h=a.isLabeledStatement(s),m=d[3].block.body,y=m[0];return h&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:h,declar:u,loop:y,node:d}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,f=c.body;e.ensureBlock(),l&&f.body.push(l),f.body=f.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{FunctionExpression:{exit:function(e){if("value"!==e.key&&!e.parentPath.isObjectProperty()){var t=(0,i.default)(e);t&&e.replaceWith(t)}}},ObjectProperty:function(e){var t=e.get("value");if(t.isFunction()){var r=(0,i.default)(t);r&&t.replaceWith(r)}}}}};var n=r(40),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{NumericLiteral:function(e){var t=e.node;t.extra&&/^0[ob]/i.test(t.extra.raw)&&(t.extra=void 0)},StringLiteral:function(e){var t=e.node;t.extra&&/\\[u]/gi.test(t.extra.raw)&&(t.extra=void 0)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(14),s=n(i),a=r(9),o=n(a),u=r(2),l=n(u),c=r(10),f=n(c);t.default=function(){var e=(0,f.default)(),t={ReferencedIdentifier:function(e){var t=e.node.name,r=this.remaps[t];if(r&&this.scope.getBinding(t)===e.scope.getBinding(t)){if(e.parentPath.isCallExpression({callee:e.node}))e.replaceWith(g.sequenceExpression([g.numericLiteral(0),r]));else if(e.isJSXIdentifier()&&g.isMemberExpression(r)){var n=r.object,i=r.property;e.replaceWith(g.JSXMemberExpression(g.JSXIdentifier(n.name),g.JSXIdentifier(i.name)))}else e.replaceWith(r);this.requeueInParent(e)}},AssignmentExpression:function(t){var r=t.node;if(!r[e]){var n=t.get("left");if(n.isIdentifier()){var i=n.node.name,s=this.exports[i];if(!s)return;if(this.scope.getBinding(i)!==t.scope.getBinding(i))return;r[e]=!0;for(var a=s,o=Array.isArray(a),u=0,a=o?a:(0,l.default)(a);;){var c;if(o){if(u>=a.length)break;c=a[u++]}else{if(u=a.next(),u.done)break;c=u.value}r=S(c,r).expression}t.replaceWith(r),this.requeueInParent(t)}else if(n.isObjectPattern())for(var f=n.node.properties,p=Array.isArray(f),d=0,f=p?f:(0,l.default)(f);;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h,y=m.value.name,v=this.exports[y];if(v){if(this.scope.getBinding(y)!==t.scope.getBinding(y))return;r[e]=!0,t.insertAfter(S(g.identifier(y),g.identifier(y)))}}else if(n.isArrayPattern())for(var b=n.node.elements,E=Array.isArray(b),x=0,b=E?b:(0,l.default)(b);;){var A;if(E){if(x>=b.length)break;A=b[x++]}else{if(x=b.next(),x.done)break;A=x.value}var _=A;if(_){var D=_.name,C=this.exports[D];if(C){if(this.scope.getBinding(D)!==t.scope.getBinding(D))return;r[e]=!0,t.insertAfter(S(g.identifier(D),g.identifier(D)))}}}}},UpdateExpression:function(e){var t=e.get("argument");if(t.isIdentifier()){var r=t.node.name;if(this.exports[r]&&this.scope.getBinding(r)===e.scope.getBinding(r)){var n=g.assignmentExpression(e.node.operator[0]+"=",t.node,g.numericLiteral(1));if(e.parentPath.isExpressionStatement()&&!e.isCompletionRecord()||e.node.prefix)return e.replaceWith(n),void this.requeueInParent(e);var i=[];i.push(n);var s=void 0;s="--"===e.node.operator?"+":"-",i.push(g.binaryExpression(s,t.node,g.numericLiteral(1))),e.replaceWithMultiple(g.sequenceExpression(i))}}}};return{inherits:y.default,visitor:{ThisExpression:function(e,t){this.ranCommonJS||!0===t.opts.allowTopLevelThis||e.findParent(function(e){return!e.is("shadow")&&D.indexOf(e.type)>=0})||e.replaceWith(g.identifier("undefined"))},Program:{exit:function(e){function r(t,r){var n=C[t];if(n)return n;var i=e.scope.generateUidIdentifier((0,p.basename)(t,(0,p.extname)(t))),s=g.variableDeclaration("var",[g.variableDeclarator(i,b(g.stringLiteral(t)).expression)]);return h[t]&&(s.loc=h[t].loc),"number"==typeof r&&r>0&&(s._blockHoist=r),v.push(s),C[t]=i}function n(e,t,r){var n=e[t]||[];e[t]=n.concat(r)}this.ranCommonJS=!0;var i=!!this.opts.strict,a=!!this.opts.noInterop,u=e.scope;u.rename("module"),u.rename("exports"),u.rename("require");for(var c=!1,f=!1,d=e.get("body"),h=(0,o.default)(null),m=(0,o.default)(null),y=(0,o.default)(null),v=[],D=(0,o.default)(null),C=(0,o.default)(null),w=d,P=Array.isArray(w),k=0,w=P?w:(0,l.default)(w);;){var F;if(P){if(k>=w.length)break;F=w[k++]}else{if(k=w.next(),k.done)break;F=k.value}var T=F;if(T.isExportDeclaration()){c=!0;for(var O=[].concat(T.get("declaration"),T.get("specifiers")),B=O,R=Array.isArray(B),I=0,B=R?B:(0,l.default)(B);;){var M;if(R){if(I>=B.length)break;M=B[I++]}else{if(I=B.next(),I.done)break;M=I.value}var N=M;if(N.getBindingIdentifiers().__esModule)throw N.buildCodeFrameError('Illegal export "__esModule"')}}if(T.isImportDeclaration()){var L;f=!0;var j=T.node.source.value,U=h[j]||{specifiers:[],maxBlockHoist:0,loc:T.node.loc};(L=U.specifiers).push.apply(L,T.node.specifiers),"number"==typeof T.node._blockHoist&&(U.maxBlockHoist=Math.max(T.node._blockHoist,U.maxBlockHoist)),h[j]=U,T.remove()}else if(T.isExportDefaultDeclaration()){var V=T.get("declaration");if(V.isFunctionDeclaration()){var G=V.node.id,W=g.identifier("default");G?(n(m,G.name,W),v.push(S(W,G)),T.replaceWith(V.node)):(v.push(S(W,g.toExpression(V.node))),T.remove())}else if(V.isClassDeclaration()){var Y=V.node.id,q=g.identifier("default");Y?(n(m,Y.name,q),T.replaceWithMultiple([V.node,S(q,Y)])):(T.replaceWith(S(q,g.toExpression(V.node))),T.parentPath.requeue(T.get("expression.left")))}else T.replaceWith(S(g.identifier("default"),V.node)),T.parentPath.requeue(T.get("expression.left"))}else if(T.isExportNamedDeclaration()){var K=T.get("declaration");if(K.node){if(K.isFunctionDeclaration()){var H=K.node.id;n(m,H.name,H),v.push(S(H,H)),T.replaceWith(K.node)}else if(K.isClassDeclaration()){var J=K.node.id;n(m,J.name,J),T.replaceWithMultiple([K.node,S(J,J)]),y[J.name]=!0}else if(K.isVariableDeclaration()){for(var X=K.get("declarations"),z=X,$=Array.isArray(z),Q=0,z=$?z:(0,l.default)(z);;){var Z;if($){if(Q>=z.length)break;Z=z[Q++]}else{if(Q=z.next(),Q.done)break;Z=Q.value}var ee=Z,te=ee.get("id"),re=ee.get("init"),ne=[];if(re.node||re.replaceWith(g.identifier("undefined")),te.isIdentifier())n(m,te.node.name,te.node),re.replaceWith(S(te.node,re.node).expression),y[te.node.name]=!0;else if(te.isObjectPattern())for(var ie=0;ie<te.node.properties.length;ie++){var se=te.node.properties[ie],ae=se.value;g.isAssignmentPattern(ae)?ae=ae.left:g.isRestProperty(se)&&(ae=se.argument),n(m,ae.name,ae),ne.push(S(ae,ae)),y[ae.name]=!0}else if(te.isArrayPattern()&&te.node.elements)for(var oe=0;oe<te.node.elements.length;oe++){var ue=te.node.elements[oe];if(ue){g.isAssignmentPattern(ue)?ue=ue.left:g.isRestElement(ue)&&(ue=ue.argument);var le=ue.name;n(m,le,ue),ne.push(S(ue,ue)),y[le]=!0}}T.insertAfter(ne)}T.replaceWith(K.node)}continue}var ce=T.get("specifiers"),fe=[],pe=T.node.source;if(pe)for(var de=r(pe.value,T.node._blockHoist),he=ce,me=Array.isArray(he),ye=0,he=me?he:(0,l.default)(he);;){var ve;if(me){if(ye>=he.length)break;ve=he[ye++]}else{if(ye=he.next(),ye.done)break;ve=ye.value}var ge=ve;ge.isExportNamespaceSpecifier()||ge.isExportDefaultSpecifier()||ge.isExportSpecifier()&&(a||"default"!==ge.node.local.name?v.push(x(g.stringLiteral(ge.node.exported.name),g.memberExpression(de,ge.node.local))):v.push(x(g.stringLiteral(ge.node.exported.name),g.memberExpression(g.callExpression(this.addHelper("interopRequireDefault"),[de]),ge.node.local))),y[ge.node.exported.name]=!0)}else for(var be=ce,Ee=Array.isArray(be),xe=0,be=Ee?be:(0,l.default)(be);;){var Ae;if(Ee){if(xe>=be.length)break;Ae=be[xe++]}else{if(xe=be.next(),xe.done)break;Ae=xe.value}var Se=Ae;Se.isExportSpecifier()&&(n(m,Se.node.local.name,Se.node.exported),y[Se.node.exported.name]=!0,fe.push(S(Se.node.exported,Se.node.local)))}T.replaceWithMultiple(fe)}else if(T.isExportAllDeclaration()){var _e=_({OBJECT:r(T.node.source.value,T.node._blockHoist)});_e.loc=T.node.loc,v.push(_e),T.remove()}}for(var De in h){var Ce=h[De],O=Ce.specifiers,we=Ce.maxBlockHoist;if(O.length){for(var Pe=r(De,we),ke=void 0,Fe=0;Fe<O.length;Fe++){var Te=O[Fe];if(g.isImportNamespaceSpecifier(Te)){if(i||a)D[Te.local.name]=Pe;else{var Oe=g.variableDeclaration("var",[g.variableDeclarator(Te.local,g.callExpression(this.addHelper("interopRequireWildcard"),[Pe]))]);we>0&&(Oe._blockHoist=we),v.push(Oe)}ke=Te.local}else g.isImportDefaultSpecifier(Te)&&(O[Fe]=g.importSpecifier(Te.local,g.identifier("default")))}for(var Be=O,Re=Array.isArray(Be),Ie=0,Be=Re?Be:(0,l.default)(Be);;){var Me;if(Re){if(Ie>=Be.length)break;Me=Be[Ie++]}else{if(Ie=Be.next(),Ie.done)break;Me=Ie.value}var Ne=Me;if(g.isImportSpecifier(Ne)){var Le=Pe;if("default"===Ne.imported.name)if(ke)Le=ke;else if(!a){Le=ke=e.scope.generateUidIdentifier(Pe.name);var je=g.variableDeclaration("var",[g.variableDeclarator(Le,g.callExpression(this.addHelper("interopRequireDefault"),[Pe]))]);we>0&&(je._blockHoist=we),v.push(je)}D[Ne.local.name]=g.memberExpression(Le,g.cloneWithoutLoc(Ne.imported))}}}else{var Ue=b(g.stringLiteral(De));Ue.loc=h[De].loc,v.push(Ue)}}if(f&&(0,s.default)(y).length)for(var Ve=(0,s.default)(y),Ge=0;Ge<Ve.length;Ge+=100)!function(e){var t=Ve.slice(e,e+100),r=g.identifier("undefined");t.forEach(function(e){r=S(g.identifier(e),r).expression});var n=g.expressionStatement(r);n._blockHoist=3,v.unshift(n)}(Ge);if(c&&!i){var We=E;this.opts.loose&&(We=A);var Ye=We();Ye._blockHoist=3,v.unshift(Ye)}e.unshiftContainer("body",v),e.traverse(t,{remaps:D,scope:u,exports:m,requeueInParent:function(t){return e.requeue(t)}})}}}}};var p=r(19),d=r(4),h=n(d),m=r(216),y=n(m),v=r(1),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(v),b=(0,h.default)("\n require($0);\n"),E=(0,h.default)('\n Object.defineProperty(exports, "__esModule", {\n value: true\n });\n'),x=(0,h.default)("\n Object.defineProperty(exports, $0, {\n enumerable: true,\n get: function () {\n return $1;\n }\n });\n"),A=(0,h.default)("\n exports.__esModule = true;\n"),S=(0,h.default)("\n exports.$0 = $1;\n"),_=(0,h.default)('\n Object.keys(OBJECT).forEach(function (key) {\n if (key === "default" || key === "__esModule") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return OBJECT[key];\n }\n });\n });\n'),D=["FunctionExpression","FunctionDeclaration","ClassProperty","ClassMethod","ObjectMethod"];e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(10),o=n(a);t.default=function(e){function t(e,t,r,n,i){new l.default({getObjectRef:n,methodNode:t,methodPath:e,isStatic:!0,scope:r,file:i}).replace()}var r=e.types,n=(0,o.default)();return{visitor:{Super:function(e){var t=e.findParent(function(e){return e.isObjectExpression()});t&&(t.node[n]=!0)},ObjectExpression:{exit:function(e,i){if(e.node[n]){for(var a=void 0,o=function(){return a=a||e.scope.generateUidIdentifier("obj")},u=e.get("properties"),l=u,c=Array.isArray(l),f=0,l=c?l:(0,s.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;d.isObjectProperty()&&(d=d.get("value")),t(d,d.node,e.scope,o,i)}a&&(e.scope.push({id:a}),e.replaceWith(r.assignmentExpression("=",a,e.node)))}}}}}};var u=r(193),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0;var i=r(2),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=function(){return{visitor:a.visitors.merge([{ArrowFunctionExpression:function(e){for(var t=e.get("params"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,s.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if(i=r.next(),i.done)break;a=i.value}var o=a;if(o.isRestElement()||o.isAssignmentPattern()){e.arrowFunctionToShadowed();break}}}},u.visitor,p.visitor,c.visitor])}};var a=r(7),o=r(334),u=n(o),l=r(333),c=n(l),f=r(335),p=n(f);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{ObjectMethod:function(e){var t=e.node;if("method"===t.kind){var r=i.functionExpression(null,t.params,t.body,t.generator,t.async);r.returnType=t.returnType,e.replaceWith(i.objectProperty(t.key,r,t.computed))}},ObjectProperty:function(e){var t=e.node;t.shorthand&&(t.shorthand=!1)}}}};var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e,t,r){return r.opts.loose&&!s.isIdentifier(e.argument,{name:"arguments"})?e.argument:t.toArray(e.argument,!0)}function r(e){for(var t=0;t<e.length;t++)if(s.isSpreadElement(e[t]))return!0;return!1}function n(e,r,n){function a(){u.length&&(o.push(s.arrayExpression(u)),u=[])}for(var o=[],u=[],l=e,c=Array.isArray(l),f=0,l=c?l:(0,i.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;s.isSpreadElement(d)?(a(),o.push(t(d,r,n))):u.push(d)}return a(),o}var s=e.types;return{visitor:{ArrayExpression:function(e,t){var i=e.node,a=e.scope,o=i.elements;if(r(o)){var u=n(o,a,t),l=u.shift();s.isArrayExpression(l)||(u.unshift(l),l=s.arrayExpression([])),e.replaceWith(s.callExpression(s.memberExpression(l,s.identifier("concat")),u))}},CallExpression:function(e,t){var i=e.node,a=e.scope,o=i.arguments;if(r(o)){var u=e.get("callee");if(!u.isSuper()){var l=s.identifier("undefined");i.arguments=[];var c=void 0;c=1===o.length&&"arguments"===o[0].argument.name?[o[0].argument]:n(o,a,t);var f=c.shift();c.length?i.arguments.push(s.callExpression(s.memberExpression(f,s.identifier("concat")),c)):i.arguments.push(f);var p=i.callee;if(u.isMemberExpression()){var d=a.maybeGenerateMemoised(p.object);d?(p.object=s.assignmentExpression("=",d,p.object),l=d):l=p.object,s.appendToMemberExpression(p,s.identifier("apply"))}else i.callee=s.memberExpression(i.callee,s.identifier("apply"));s.isSuper(l)&&(l=s.thisExpression()),i.arguments.unshift(l)}}},NewExpression:function(e,t){var i=e.node,a=e.scope,o=i.arguments;if(r(o)){var u=n(o,a,t),l=s.arrayExpression([s.nullLiteral()]);o=s.callExpression(s.memberExpression(l,s.identifier("concat")),u),e.replaceWith(s.newExpression(s.callExpression(s.memberExpression(s.memberExpression(s.memberExpression(s.identifier("Function"),s.identifier("prototype")),s.identifier("bind")),s.identifier("apply")),[i.callee,o]),[]))}}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.__esModule=!0,t.default=function(){return{visitor:{RegExpLiteral:function(e){var t=e.node;s.is(t,"y")&&e.replaceWith(o.newExpression(o.identifier("RegExp"),[o.stringLiteral(t.pattern),o.stringLiteral(t.flags)]))}}}};var i=r(192),s=n(i),a=r(1),o=n(a);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e){return n.isLiteral(e)&&"string"==typeof e.value}function r(e,t){return n.binaryExpression("+",e,t)}var n=e.types;return{visitor:{TaggedTemplateExpression:function(e,t){for(var r=e.node,s=r.quasi,a=[],o=[],u=[],l=s.quasis,c=Array.isArray(l),f=0,l=c?l:(0,i.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;o.push(n.stringLiteral(d.value.cooked)),u.push(n.stringLiteral(d.value.raw))}o=n.arrayExpression(o),u=n.arrayExpression(u);var h="taggedTemplateLiteral";t.opts.loose&&(h+="Loose");var m=t.file.addTemplateObject(h,o,u);a.push(m),a=a.concat(s.expressions),e.replaceWith(n.callExpression(r.tag,a))},TemplateLiteral:function(e,s){for(var a=[],o=e.get("expressions"),u=e.node.quasis,l=Array.isArray(u),c=0,u=l?u:(0,i.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;a.push(n.stringLiteral(p.value.cooked));var d=o.shift();d&&(!s.opts.spec||d.isBaseType("string")||d.isBaseType("number")?a.push(d.node):a.push(n.callExpression(n.identifier("String"),[d.node])))}if(a=a.filter(function(e){return!n.isLiteral(e,{value:""})}),t(a[0])||t(a[1])||a.unshift(n.stringLiteral("")),a.length>1){for(var h=r(a.shift(),a.shift()),m=a,y=Array.isArray(m),v=0,m=y?m:(0,i.default)(m);;){var g;if(y){if(v>=m.length)break;g=m[v++]}else{if(v=m.next(),v.done)break;g=v.value}h=r(h,g)}e.replaceWith(h)}else e.replaceWith(a[0])}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(10),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){var t=e.types,r=(0,i.default)();return{visitor:{Scope:function(e){var t=e.scope;t.getBinding("Symbol")&&t.rename("Symbol")},UnaryExpression:function(e){var n=e.node,i=e.parent;if(!n[r]&&!e.find(function(e){return e.node&&!!e.node._generated})){if(e.parentPath.isBinaryExpression()&&t.EQUALITY_BINARY_OPERATORS.indexOf(i.operator)>=0){var s=e.getOpposite();if(s.isLiteral()&&"symbol"!==s.node.value&&"object"!==s.node.value)return}if("typeof"===n.operator){var a=t.callExpression(this.addHelper("typeof"),[n.argument]);if(e.get("argument").isIdentifier()){var o=t.stringLiteral("undefined"),u=t.unaryExpression("typeof",n.argument);u[r]=!0,e.replaceWith(t.conditionalExpression(t.binaryExpression("===",u,o),o,a))}else e.replaceWith(a)}}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{RegExpLiteral:function(e){var t=e.node;a.is(t,"u")&&(t.pattern=(0,i.default)(t.pattern,t.flags),a.pullFlag(t,"u"))}}}};var n=r(612),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=r(192),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s);e.exports=t.default},function(e,t,r){"use strict";e.exports=r(606)},function(e,t,r){"use strict";e.exports={default:r(408),__esModule:!0}},function(e,t,r){"use strict";function n(){i(),s()}function i(){t.path=u=new o.default}function s(){t.scope=l=new o.default}t.__esModule=!0,t.scope=t.path=void 0;var a=r(364),o=function(e){return e&&e.__esModule?e:{default:e}}(a);t.clear=n,t.clearPath=i,t.clearScope=s;var u=t.path=new o.default,l=t.scope=new o.default},function(e,t){"use strict";function r(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function n(e,t){for(var r=65536,n=0;n<t.length;n+=2){if((r+=t[n])>e)return!1;if((r+=t[n+1])>=e)return!0}}function i(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&x.test(String.fromCharCode(e)):n(e,S)))}function s(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):n(e,S)||n(e,_))))}function a(e){var t={};for(var r in D)t[r]=e&&r in e?e[r]:D[r];return t}function o(e){return 10===e||13===e||8232===e||8233===e}function u(e,t){for(var r=1,n=0;;){N.lastIndex=n;var i=N.exec(e);if(!(i&&i.index<t))return new V(r,t-n);++r,n=i.index+i[0].length}}function l(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function c(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function f(e){return e[e.length-1]}function p(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function d(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?d(e.object)+"."+d(e.property):void 0}function h(e,t){return new J(t,e).parse()}function m(e,t){var r=new J(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var v={6:r("enum await"),strict:r("implements interface let package private protected public static yield"),strictBind:r("eval arguments") -},g=r("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),b="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",E="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",x=new RegExp("["+b+"]"),A=new RegExp("["+b+E+"]");b=E=null;var S=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],_=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],D={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},C="function"==typeof Symbol&&"symbol"===y(Symbol.iterator)?function(e){return void 0===e?"undefined":y(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":y(e)},w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},P=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":y(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},k=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":y(t))&&"function"!=typeof t?e:t},F=!0,T=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},O=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,t),n.keyword=r,k(this,e.call(this,r,n))}return P(t,e),t}(T),B=function(e){function t(r,n){return w(this,t),k(this,e.call(this,r,{beforeExpr:F,binop:n}))}return P(t,e),t}(T),R={num:new T("num",{startsExpr:!0}),regexp:new T("regexp",{startsExpr:!0}),string:new T("string",{startsExpr:!0}),name:new T("name",{startsExpr:!0}),eof:new T("eof"),bracketL:new T("[",{beforeExpr:F,startsExpr:!0}),bracketR:new T("]"),braceL:new T("{",{beforeExpr:F,startsExpr:!0}),braceBarL:new T("{|",{beforeExpr:F,startsExpr:!0}),braceR:new T("}"),braceBarR:new T("|}"),parenL:new T("(",{beforeExpr:F,startsExpr:!0}),parenR:new T(")"),comma:new T(",",{beforeExpr:F}),semi:new T(";",{beforeExpr:F}),colon:new T(":",{beforeExpr:F}),doubleColon:new T("::",{beforeExpr:F}),dot:new T("."),question:new T("?",{beforeExpr:F}),arrow:new T("=>",{beforeExpr:F}),template:new T("template"),ellipsis:new T("...",{beforeExpr:F}),backQuote:new T("`",{startsExpr:!0}),dollarBraceL:new T("${",{beforeExpr:F,startsExpr:!0}),at:new T("@"),eq:new T("=",{beforeExpr:F,isAssign:!0}),assign:new T("_=",{beforeExpr:F,isAssign:!0}),incDec:new T("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new T("prefix",{beforeExpr:F,prefix:!0,startsExpr:!0}),logicalOR:new B("||",1),logicalAND:new B("&&",2),bitwiseOR:new B("|",3),bitwiseXOR:new B("^",4),bitwiseAND:new B("&",5),equality:new B("==/!=",6),relational:new B("</>",7),bitShift:new B("<</>>",8),plusMin:new T("+/-",{beforeExpr:F,binop:9,prefix:!0,startsExpr:!0}),modulo:new B("%",10),star:new B("*",10),slash:new B("/",10),exponent:new T("**",{beforeExpr:F,binop:11,rightAssociative:!0})},I={break:new O("break"),case:new O("case",{beforeExpr:F}),catch:new O("catch"),continue:new O("continue"),debugger:new O("debugger"),default:new O("default",{beforeExpr:F}),do:new O("do",{isLoop:!0,beforeExpr:F}),else:new O("else",{beforeExpr:F}),finally:new O("finally"),for:new O("for",{isLoop:!0}),function:new O("function",{startsExpr:!0}),if:new O("if"),return:new O("return",{beforeExpr:F}),switch:new O("switch"),throw:new O("throw",{beforeExpr:F}),try:new O("try"),var:new O("var"),let:new O("let"),const:new O("const"),while:new O("while",{isLoop:!0}),with:new O("with"),new:new O("new",{beforeExpr:F,startsExpr:!0}),this:new O("this",{startsExpr:!0}),super:new O("super",{startsExpr:!0}),class:new O("class"),extends:new O("extends",{beforeExpr:F}),export:new O("export"),import:new O("import",{startsExpr:!0}),yield:new O("yield",{beforeExpr:F,startsExpr:!0}),null:new O("null",{startsExpr:!0}),true:new O("true",{startsExpr:!0}),false:new O("false",{startsExpr:!0}),in:new O("in",{beforeExpr:F,binop:7}),instanceof:new O("instanceof",{beforeExpr:F,binop:7}),typeof:new O("typeof",{beforeExpr:F,prefix:!0,startsExpr:!0}),void:new O("void",{beforeExpr:F,prefix:!0,startsExpr:!0}),delete:new O("delete",{beforeExpr:F,prefix:!0,startsExpr:!0})};Object.keys(I).forEach(function(e){R["_"+e]=I[e]});var M=/\r\n?|\n|\u2028|\u2029/,N=new RegExp(M.source,"g"),L=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,j=function e(t,r,n,i){w(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},U={braceStatement:new j("{",!1),braceExpression:new j("{",!0),templateQuasi:new j("${",!0),parenStatement:new j("(",!1),parenExpression:new j("(",!0),template:new j("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new j("function",!0)};R.parenR.updateContext=R.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var e=this.state.context.pop();e===U.braceStatement&&this.curContext()===U.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===U.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr},R.name.updateContext=function(e){this.state.exprAllowed=!1,e!==R._let&&e!==R._const&&e!==R._var||M.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},R.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?U.braceStatement:U.braceExpression),this.state.exprAllowed=!0},R.dollarBraceL.updateContext=function(){this.state.context.push(U.templateQuasi),this.state.exprAllowed=!0},R.parenL.updateContext=function(e){var t=e===R._if||e===R._for||e===R._with||e===R._while;this.state.context.push(t?U.parenStatement:U.parenExpression),this.state.exprAllowed=!0},R.incDec.updateContext=function(){},R._function.updateContext=function(){this.curContext()!==U.braceStatement&&this.state.context.push(U.functionExpression),this.state.exprAllowed=!1},R.backQuote.updateContext=function(){this.curContext()===U.template?this.state.context.pop():this.state.context.push(U.template),this.state.exprAllowed=!1};var V=function e(t,r){w(this,e),this.line=t,this.column=r},G=function e(t,r){w(this,e),this.start=t,this.end=r},W=function(){function e(){w(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=R.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[U.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new V(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),Y=function e(t){w(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new G(t.startLoc,t.endLoc)},q=function(){function e(t,r){w(this,e),this.state=new W,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new Y(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return g(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(R.num)||this.match(R.string)){for(this.state.pos=this.state.start;this.state.pos<this.state.lineStart;)this.state.lineStart=this.input.lastIndexOf("\n",this.state.lineStart-2)+1,--this.state.curLine;this.nextToken()}},e.prototype.curContext=function(){return this.state.context[this.state.context.length-1]},e.prototype.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.state.containsOctal=!1,this.state.octalPosition=null,this.state.start=this.state.pos,this.state.startLoc=this.state.curPosition(),this.state.pos>=this.input.length?this.finishToken(R.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return i(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new G(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,N.lastIndex=t;for(var n=void 0;(n=N.exec(this.input))&&n.index<this.state.pos;)++this.state.curLine,this.state.lineStart=n.index+n[0].length;this.pushComment(!0,this.input.slice(t+2,r),t,this.state.pos,e,this.state.curPosition())},e.prototype.skipLineComment=function(e){for(var t=this.state.pos,r=this.state.curPosition(),n=this.input.charCodeAt(this.state.pos+=e);this.state.pos<this.input.length&&10!==n&&13!==n&&8232!==n&&8233!==n;)++this.state.pos,n=this.input.charCodeAt(this.state.pos);this.pushComment(!1,this.input.slice(t+e,this.state.pos),t,this.state.pos,r,this.state.curPosition())},e.prototype.skipSpace=function(){e:for(;this.state.pos<this.input.length;){var e=this.input.charCodeAt(this.state.pos);switch(e){case 32:case 160:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&L.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(R.ellipsis)):(++this.state.pos,this.finishToken(R.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.assign,2):this.finishOp(R.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?R.star:R.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=R.exponent),61===n&&(r++,t=R.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?R.logicalOR:R.logicalAND,2):61===t?this.finishOp(R.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(R.braceBarR,2):this.finishOp(124===e?R.bitwiseOR:R.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.assign,2):this.finishOp(R.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&M.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(R.incDec,2):61===t?this.finishOp(R.assign,2):this.finishOp(R.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(R.assign,r+1):this.finishOp(R.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(R.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(R.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(R.arrow)):this.finishOp(61===e?R.eq:R.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(R.parenL);case 41:return++this.state.pos,this.finishToken(R.parenR);case 59:return++this.state.pos,this.finishToken(R.semi);case 44:return++this.state.pos,this.finishToken(R.comma);case 91:return++this.state.pos,this.finishToken(R.bracketL);case 93:return++this.state.pos,this.finishToken(R.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.braceBarL,2):(++this.state.pos,this.finishToken(R.braceL));case 125:return++this.state.pos,this.finishToken(R.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(R.doubleColon,2):(++this.state.pos,this.finishToken(R.colon));case 63:return++this.state.pos,this.finishToken(R.question);case 64:return++this.state.pos,this.finishToken(R.at);case 96:return++this.state.pos,this.finishToken(R.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(R.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+l(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(M.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(R.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i<s;++i){var a=this.input.charCodeAt(this.state.pos),o=void 0;if((o=a>=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),i(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(R.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var s=this.input.charCodeAt(this.state.pos);46!==s||r||(++this.state.pos,this.readInt(10),n=!0,s=this.input.charCodeAt(this.state.pos)),69!==s&&101!==s||r||(s=this.input.charCodeAt(++this.state.pos),43!==s&&45!==s||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),i(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(R.num,o)},e.prototype.readCodePoint=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;if(123===t){var n=++this.state.pos;if(r=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===r)--this.state.invalidTemplateEscapePosition;else if(r>1114111){if(!e)return this.state.invalidTemplateEscapePosition=n-2,null;this.raise(n,"Code point out of bounds")}}else r=this.readHexChar(4,e);return r},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(o(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(R.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(R.template)?36===n?(this.state.pos+=2,this.finishToken(R.dollarBraceL)):(++this.state.pos,this.finishToken(R.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(R.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(o(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:l(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(a,8);if(o>255&&(a=a.slice(0,-1),o=parseInt(a,8)),o>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=a.length-1,String.fromCharCode(o)}return String.fromCharCode(r)}},e.prototype.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos<this.input.length;){var n=this.fullCharCodeAtPos();if(s(n))this.state.pos+=n<=65535?1:2;else{if(92!==n)break;this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);var a=this.state.pos;117!==this.input.charCodeAt(++this.state.pos)&&this.raise(this.state.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.state.pos;var o=this.readCodePoint(!0);(t?i:s)(o,!0)||this.raise(a,"Invalid Unicode escape"),e+=l(o),r=this.state.pos}t=!1}return e+this.input.slice(r,this.state.pos)},e.prototype.readWord=function(){var e=this.readWord1(),t=R.name;return!this.state.containsEsc&&this.isKeyword(e)&&(t=I[e]),this.finishToken(t,e)},e.prototype.braceIsBlock=function(e){if(e===R.colon){var t=this.curContext();if(t===U.braceStatement||t===U.braceExpression)return!t.isExpr}return e===R._return?M.test(this.input.slice(this.state.lastTokEnd,this.state.start)):e===R._else||e===R.semi||e===R.eof||e===R.parenR||(e===R.braceL?this.curContext()===U.braceStatement:!this.state.exprAllowed)},e.prototype.updateContext=function(e){var t=this.state.type,r=void 0;t.keyword&&e===R.dot?this.state.exprAllowed=!1:(r=t.updateContext)?r.call(this,e):this.state.exprAllowed=t.beforeExpr},e}(),K={},H=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],J=function(e){function t(r,n){w(this,t),r=a(r);var i=k(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return P(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:v[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&H.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(K).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=K[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow")),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e}),e.unshift("estree"));for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=K[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(q),X=J.prototype;X.addExtra=function(e,t,r){if(e){(e.extra=e.extra||{})[t]=r}},X.isRelational=function(e){return this.match(R.relational)&&this.state.value===e},X.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,R.relational)},X.isContextual=function(e){return this.match(R.name)&&this.state.value===e},X.eatContextual=function(e){return this.state.value===e&&this.eat(R.name)},X.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},X.canInsertSemicolon=function(){return this.match(R.eof)||this.match(R.braceR)||M.test(this.input.slice(this.state.lastTokEnd,this.state.start))},X.isLineTerminator=function(){return this.eat(R.semi)||this.canInsertSemicolon()},X.semicolon=function(){this.isLineTerminator()||this.unexpected(null,R.semi)},X.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},X.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":C(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var z=J.prototype;z.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,R.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var $={kind:"loop"},Q={kind:"switch"};z.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},z.parseStatement=function(e,t){this.match(R.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case R._break:case R._continue:return this.parseBreakContinueStatement(n,r.keyword);case R._debugger:return this.parseDebuggerStatement(n);case R._do:return this.parseDoStatement(n);case R._for:return this.parseForStatement(n);case R._function:return e||this.unexpected(),this.parseFunctionStatement(n);case R._class:return e||this.unexpected(),this.parseClass(n,!0);case R._if:return this.parseIfStatement(n);case R._return:return this.parseReturnStatement(n);case R._switch:return this.parseSwitchStatement(n);case R._throw:return this.parseThrowStatement(n);case R._try:return this.parseTryStatement(n);case R._let:case R._const:e||this.unexpected();case R._var:return this.parseVarStatement(n,r);case R._while:return this.parseWhileStatement(n);case R._with:return this.parseWithStatement(n);case R.braceL:return this.parseBlock();case R.semi:return this.parseEmptyStatement(n);case R._export:case R._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===R.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'")),r===R._import?this.parseImport(n):this.parseExport(n);case R.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(R._function)&&!this.canInsertSemicolon())return this.expect(R._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===R.name&&"Identifier"===a.type&&this.eat(R.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},z.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},z.parseDecorators=function(e){for(;this.match(R.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(R._export)||this.match(R._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},z.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},z.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(R.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n<this.state.labels.length;++n){var i=this.state.labels[n];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return n===this.state.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},z.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},z.parseDoStatement=function(e){return this.next(),this.state.labels.push($),e.body=this.parseStatement(!1),this.state.labels.pop(),this.expect(R._while),e.test=this.parseParenExpression(),this.eat(R.semi),this.finishNode(e,"DoWhileStatement")},z.parseForStatement=function(e){this.next(),this.state.labels.push($);var t=!1;if(this.hasPlugin("asyncGenerators")&&this.state.inAsync&&this.isContextual("await")&&(t=!0,this.next()),this.expect(R.parenL),this.match(R.semi))return t&&this.unexpected(),this.parseFor(e,null);if(this.match(R._var)||this.match(R._let)||this.match(R._const)){var r=this.startNode(),n=this.state.type;return this.next(),(this.parseVar(r,!0,n),this.finishNode(r,"VariableDeclaration"),!this.match(R._in)&&!this.isContextual("of")||1!==r.declarations.length||r.declarations[0].init)?(t&&this.unexpected(), -this.parseFor(e,r)):this.parseForIn(e,r,t)}var i={start:0},s=this.parseExpression(!0,i);if(this.match(R._in)||this.isContextual("of")){var a=this.isContextual("of")?"for-of statement":"for-in statement";return this.toAssignable(s,void 0,a),this.checkLVal(s,void 0,void 0,a),this.parseForIn(e,s,t)}return i.start&&this.unexpected(i.start),t&&this.unexpected(),this.parseFor(e,s)},z.parseFunctionStatement=function(e){return this.next(),this.parseFunction(e,!0)},z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!1),e.alternate=this.eat(R._else)?this.parseStatement(!1):null,this.finishNode(e,"IfStatement")},z.parseReturnStatement=function(e){return this.state.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.state.start,"'return' outside of function"),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(R.braceL),this.state.labels.push(Q);for(var t,r=void 0;!this.match(R.braceR);)if(this.match(R._case)||this.match(R._default)){var n=this.match(R._case);r&&this.finishNode(r,"SwitchCase"),e.cases.push(r=this.startNode()),r.consequent=[],this.next(),n?r.test=this.parseExpression():(t&&this.raise(this.state.lastTokStart,"Multiple default clauses"),t=!0,r.test=null),this.expect(R.colon)}else r?r.consequent.push(this.parseStatement(!0)):this.unexpected();return r&&this.finishNode(r,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")},z.parseThrowStatement=function(e){return this.next(),M.test(this.input.slice(this.state.lastTokEnd,this.state.start))&&this.raise(this.state.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Z=[];z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(R._catch)){var t=this.startNode();this.next(),this.expect(R.parenL),t.param=this.parseBindingAtom(),this.checkLVal(t.param,!0,Object.create(null),"catch clause"),this.expect(R.parenR),t.body=this.parseBlock(),e.handler=this.finishNode(t,"CatchClause")}return e.guardedHandlers=Z,e.finalizer=this.eat(R._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},z.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.state.labels.push($),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"WhileStatement")},z.parseWithStatement=function(e){return this.state.strict&&this.raise(this.state.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},z.parseLabeledStatement=function(e,t,r){for(var n=this.state.labels,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(R._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},z.parseBlock=function(e){var t=this.startNode();return this.expect(R.braceL),this.parseBlockBody(t,e,!1,R.braceR),this.finishNode(t,"BlockStatement")},z.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},z.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},z.parseFor=function(e,t){return e.init=t,this.expect(R.semi),e.test=this.match(R.semi)?null:this.parseExpression(),this.expect(R.semi),e.update=this.match(R.parenR)?null:this.parseExpression(),this.expect(R.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},z.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(R._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(R.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},z.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(R.eq)?n.init=this.parseMaybeAssign(t):r!==R._const||this.match(R._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(R._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(R.comma))break}return e},z.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},z.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(R.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(R.name)||this.match(R._yield)||this.unexpected(),(this.match(R.name)||this.match(R._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},z.parseFunctionParams=function(e){this.expect(R.parenL),e.params=this.parseBindingList(R.parenR)},z.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},z.isClassProperty=function(){return this.match(R.eq)||this.match(R.semi)||this.match(R.braceR)},z.isClassMethod=function(){return this.match(R.parenL)},z.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},z.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(R.braceL);!this.eat(R.braceR);)if(this.eat(R.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(R.at))i.push(this.parseDecorator());else{var a=this.startNode();if(i.length&&(a.decorators=i,i=[]),a.static=!1,this.match(R.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){a.kind="method",a.computed=!1,a.key=o,this.parseClassMethod(s,a,!1,!1);continue}if(this.isClassProperty()){a.computed=!1,a.key=o,s.body.push(this.parseClassProperty(a));continue}a.static=!0}if(this.eat(R.star))a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(s,a,!0,!1);else{var u=this.match(R.name),l=this.parsePropertyName(a);if(a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(n?this.raise(l.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),n=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(s,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a));else if(u&&"async"===l.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(R.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(s,a,c,!0)}else!u||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(R.star)?this.hasPlugin("classConstructorCall")&&u&&"call"===l.name&&this.match(R.name)&&"constructor"===this.state.value?(r?this.raise(a.start,"Duplicate constructor call in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),r=!0,a.kind="constructorCall",this.parsePropertyName(a),this.parseClassMethod(s,a,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a))):this.unexpected():(a.kind=l.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(s,a,!1,!1),this.checkGetterSetterParamCount(a))}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},z.parseClassProperty=function(e){return this.state.inClassProperty=!0,this.match(R.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(e,"ClassProperty")},z.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},z.parseClassId=function(e,t,r){this.match(R.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},z.parseClassSuper=function(e){e.superClass=this.eat(R._extends)?this.parseExprSubscripts():null},z.parseExport=function(e){if(this.next(),this.match(R.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(R.comma)&&this.lookahead().type===R.star){this.expect(R.comma);var n=this.startNode();this.expect(R.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(R._default)){var i=this.startNode(),s=!1;return this.eat(R._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(R._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},z.parseExportDeclaration=function(){return this.parseStatement(!0)},z.isExportDefaultSpecifier=function(){if(this.match(R.name))return"async"!==this.state.value;if(!this.match(R._default))return!1;var e=this.lookahead();return e.type===R.comma||e.type===R.name&&"from"===e.value},z.parseExportSpecifiersMaybe=function(e){this.eat(R.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},z.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(R.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},z.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},z.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;this.checkDeclaration(p.id)}if(this.state.decorators.length){var d=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&d||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},z.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},z.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},z.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},z.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(R.braceL);!this.eat(R.braceR);){if(t)t=!1;else if(this.expect(R.comma),this.eat(R.braceR))break;var n=this.match(R._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},z.parseImport=function(e){return this.eat(R._import),this.match(R.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(R.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},z.parseImportSpecifiers=function(e){var t=!0;if(this.match(R.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(R.comma))return}if(this.match(R.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(R.braceL);!this.eat(R.braceR);){if(t)t=!1;else if(this.eat(R.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(R.comma),this.eat(R.braceR))break;this.parseImportSpecifier(e)}},z.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},z.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var ee=J.prototype;ee.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";var u=e.argument;this.toAssignable(u,t,r);break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var l="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,l)}return e},ee.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a<n;a++){var o=e[a];o&&this.toAssignable(o,t,r)}return e},ee.toReferencedList=function(e){return e},ee.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},ee.parseRest=function(){var e=this.startNode();return this.next(),e.argument=this.parseBindingIdentifier(),this.finishNode(e,"RestElement")},ee.shouldAllowYieldIdentifier=function(){return this.match(R._yield)&&!this.state.strict&&!this.state.inGenerator},ee.parseBindingIdentifier=function(){return this.parseIdentifier(this.shouldAllowYieldIdentifier())},ee.parseBindingAtom=function(){switch(this.state.type){case R._yield:(this.state.strict||this.state.inGenerator)&&this.unexpected();case R.name:return this.parseIdentifier(!0);case R.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(R.bracketR,!0),this.finishNode(e,"ArrayPattern");case R.braceL:return this.parseObj(!0);default:this.unexpected()}},ee.parseBindingList=function(e,t){for(var r=[],n=!0;!this.eat(e);)if(n?n=!1:this.expect(R.comma),t&&this.match(R.comma))r.push(null);else{if(this.eat(e))break;if(this.match(R.ellipsis)){r.push(this.parseAssignableListItemTypes(this.parseRest())),this.expect(e);break}for(var i=[];this.match(R.at);)i.push(this.parseDecorator());var s=this.parseMaybeDefault();i.length&&(s.decorators=i),this.parseAssignableListItemTypes(s),r.push(this.parseMaybeDefault(s.start,s.loc.start,s))}return r},ee.parseAssignableListItemTypes=function(e){return e},ee.parseMaybeDefault=function(e,t,r){if(t=t||this.state.startLoc,e=e||this.state.start,r=r||this.parseBindingAtom(),!this.eat(R.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},ee.checkLVal=function(e,t,r,n){switch(e.type){case"Identifier":if(this.checkReservedWord(e.name,e.start,!1,!0),r){var i="_"+e.name;r[i]?this.raise(e.start,"Argument name clash in strict mode"):r[i]=!0}break;case"MemberExpression":t&&this.raise(e.start,(t?"Binding":"Assigning to")+" member expression");break;case"ObjectPattern":for(var s=e.properties,a=Array.isArray(s),o=0,s=a?s:s[Symbol.iterator]();;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,f=Array.isArray(c),p=0,c=f?c:c[Symbol.iterator]();;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;h&&this.checkLVal(h,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var te=J.prototype;te.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},te.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(R.eof)||this.unexpected(),e},te.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(R.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(R.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},te.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(R._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(R.parenL)||this.match(R.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(R.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},te.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},te.parseConditional=function(e,t,r,n){if(this.eat(R.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(R.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},te.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},te.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(R._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===R.logicalOR||o===R.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},te.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(R.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==R.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},te.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},te.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(R.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(R.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(R.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(R.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(R.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(R.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(R.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(!0),e=this.finishNode(l,"TaggedTemplateExpression")}}},te.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(R.comma),this.eat(e))break;this.match(R.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},te.shouldParseAsyncArrow=function(){return this.match(R.arrow)},te.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(R.arrow),this.parseArrowExpression(e,t.arguments,!0)},te.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},te.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case R._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(R.parenL)||this.match(R.bracketL)||this.match(R.dot)||this.unexpected(),this.match(R.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case R._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(R.parenL)||this.unexpected(null,R.parenL),this.finishNode(r,"Import");case R._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case R._yield:this.state.inGenerator&&this.unexpected();case R.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(R._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(R.name)){var a=[this.parseIdentifier()];return this.expect(R.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(R.arrow)?this.parseArrowExpression(r,[s]):s;case R._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case R.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case R.num:return this.parseLiteral(this.state.value,"NumericLiteral");case R.string:return this.parseLiteral(this.state.value,"StringLiteral");case R._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case R._true:case R._false:return r=this.startNode(),r.value=this.match(R._true),this.next(),this.finishNode(r,"BooleanLiteral");case R.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case R.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(R.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case R.braceL:return this.parseObj(!1,e);case R._function:return this.parseFunctionExpression();case R.at:this.parseDecorators();case R._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case R._new:return this.parseNew();case R.backQuote:return this.parseTemplate(!1);case R.doubleColon:r=this.startNode(),this.next(),r.object=null;var f=r.callee=this.parseNoCallExpr();if("MemberExpression"===f.type)return this.finishNode(r,"BindExpression");this.raise(f.start,"Binding should be performed on object property.");default:this.unexpected()}},te.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(R.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},te.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},te.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},te.parseParenExpression=function(){this.expect(R.parenL);var e=this.parseExpression();return this.expect(R.parenR),e},te.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(R.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,f=void 0;!this.match(R.parenR);){if(l)l=!1;else if(this.expect(R.comma,u.start||null),this.match(R.parenR)){f=this.state.start;break} -if(this.match(R.ellipsis)){var p=this.state.start,d=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),p,d));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var h=this.state.start,m=this.state.startLoc;this.expect(R.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){for(var v=a,g=Array.isArray(v),b=0,v=g?v:v[Symbol.iterator]();;){var E;if(g){if(b>=v.length)break;E=v[b++]}else{if(b=v.next(),b.done)break;E=b.value}var x=E;x.extra&&x.extra.parenthesized&&this.unexpected(x.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),f&&this.unexpected(f),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?(n=this.startNodeAt(i,s),n.expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",h,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},te.shouldParseArrow=function(){return!this.canInsertSemicolon()},te.parseArrow=function(e){if(this.eat(R.arrow))return e},te.parseParenItem=function(e){return e},te.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(R.dot)){var r=this.parseMetaProperty(e,t,"target");return this.state.inFunction||this.raise(r.property.start,"new.target can only be used in functions"),r}return e.callee=this.parseNoCallExpr(),this.eat(R.parenL)?(e.arguments=this.parseExprList(R.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression")},te.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e&&this.hasPlugin("templateInvalidEscapes")?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(R.backQuote),this.finishNode(t,"TemplateElement")},te.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(R.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(R.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},te.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(R.braceR);){if(i)i=!1;else if(this.expect(R.comma),this.eat(R.braceR))break;for(;this.match(R.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,f=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(R.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var p=this.state.start;if(null===a){if(this.eat(R.braceR))break;if(this.match(R.comma)&&this.lookahead().type===R.braceR)continue;a=p;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,f=this.state.startLoc),e||(u=this.eat(R.star)),!e&&this.isContextual("async")){u&&this.unexpected();var d=this.parseIdentifier();this.match(R.colon)||this.match(R.parenL)||this.match(R.braceR)||this.match(R.eq)||this.match(R.comma)?(o.key=d,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(R.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,f,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},te.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(R.string)||this.match(R.num)||this.match(R.bracketL)||this.match(R.name)||this.state.type.keyword)},te.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},te.parseObjectMethod=function(e,t,r,n){return r||t||this.match(R.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},te.parseObjectProperty=function(e,t,r,n,i){return this.eat(R.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(R.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},te.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},te.parsePropertyName=function(e){if(this.eat(R.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(R.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(R.num)||this.match(R.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},te.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},te.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(R.parenL),e.params=this.parseBindingList(R.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},te.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},te.isStrictBody=function(e,t){if(!t&&e.body.directives.length)for(var r=e.body.directives,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("use strict"===a.value.value)return!0}return!1},te.parseFunctionBody=function(e,t){var r=t&&!this.match(R.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var f=e.params,p=Array.isArray(f),d=0,f=p?f:f[Symbol.iterator]();;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},te.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(R.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},te.parseExprListItem=function(e,t,r){return e&&this.match(R.comma)?null:this.match(R.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},te.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(R.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},te.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(v.strict(e)||n&&v.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},te.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(R.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},te.parseYield=function(){var e=this.startNode();return this.next(),this.match(R.semi)||this.canInsertSemicolon()||!this.match(R.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(R.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var re=J.prototype,ne=["leadingComments","trailingComments","innerComments"],ie=function(){function e(t,r,n){w(this,e),this.type="",this.start=t,this.end=0,this.loc=new G(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)ne.indexOf(r)<0&&(t[r]=this[r]);return t},e}();re.startNode=function(){return new ie(this.state.start,this.state.startLoc,this.filename)},re.startNodeAt=function(e,t){return new ie(e,t,this.filename)},re.finishNode=function(e,t){return c.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},re.finishNodeAt=function(e,t,r,n){return c.call(this,e,t,r,n)},J.prototype.raise=function(e,t){var r=u(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var se=J.prototype;se.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},se.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0,a=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=f(t);t.length>0&&o.trailingComments&&o.trailingComments[0].start>=e.end&&(i=o.trailingComments,o.trailingComments=null)}for(t.length>0&&f(t).start>=e.start&&(r=t.pop());t.length>0&&f(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r&&this.state.leadingComments.length>0){var u=f(this.state.leadingComments);if("ObjectProperty"===r.type){if(u.start>=e.start&&this.state.commentPreviousNode){for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(r.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var l=f(e.arguments);l&&u.start>=l.start&&u.end<=e.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(l.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(n){if(n.leadingComments)if(n!==e&&f(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=e.start){e.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(f(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a<this.state.leadingComments.length;a++)this.state.leadingComments[a].end<this.state.commentPreviousNode.end&&(this.state.leadingComments.splice(a,1),a--);this.state.leadingComments.length>0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(s=0;s<this.state.leadingComments.length&&!(this.state.leadingComments[s].end>e.start);s++);e.leadingComments=this.state.leadingComments.slice(0,s),0===e.leadingComments.length&&(e.leadingComments=null),i=this.state.leadingComments.slice(s),0===i.length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&f(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}};var ae=J.prototype;ae.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ae.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ae.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var oe=function(e){e.extend("checkDeclaration",function(e){return function(t){p(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o<s;o++)a[o-3]=arguments[o];e.call.apply(e,[this,t,r,n].concat(a))}}}),e.extend("checkPropClash",function(){return function(e,t){if(!e.computed&&p(e)){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}}}),e.extend("isStrictBody",function(){return function(e,t){if(!t&&e.body.body.length>0)for(var r=e.body.body,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("stmtToDirective",function(e){return function(t){var r=e.call(this,t),n=t.expression.value;return r.value.value=n,r}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];e.call.apply(e,[this,t].concat(i)),t.directives.reverse().forEach(function(e){t.body.unshift(r.directiveToStmt(e))}),delete t.directives}}),e.extend("parseClassMethod",function(){return function(e,t,r,n){this.parseMethod(t,r,n),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(this.finishNode(t,"MethodDefinition"))}}),e.extend("parseExprAtom",function(e){return function(){switch(this.state.type){case R.regexp:return this.estreeParseRegExpLiteral(this.state.value);case R.num:case R.string:return this.estreeParseLiteral(this.state.value);case R._null:return this.estreeParseLiteral(null);case R._true:return this.estreeParseLiteral(!0);case R._false:return this.estreeParseLiteral(!1);default:for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.call.apply(e,[this].concat(r))}}}),e.extend("parseLiteral",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i.raw=i.extra.raw,delete i.extra,i}}),e.extend("parseMethod",function(e){return function(t){var r=this.startNode();r.kind=t.kind;for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r=e.call.apply(e,[this,r].concat(i)),delete r.kind,t.value=this.finishNode(r,"FunctionExpression"),t}}),e.extend("parseObjectMethod",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&("method"===i.kind&&(i.kind="init"),i.type="Property"),i}}),e.extend("parseObjectProperty",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.call.apply(e,[this].concat(r));return i&&(i.kind="init",i.type="Property"),i}}),e.extend("toAssignable",function(e){return function(t,r){for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];if(p(t))return this.toAssignable.apply(this,[t.value,r].concat(i)),t;if("ObjectExpression"===t.type){t.type="ObjectPattern";for(var a=t.properties,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},ue=["any","mixed","empty","bool","boolean","number","string","void","null"],le=J.prototype;le.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||R.colon);var r=this.flowParseType();return this.state.inType=t,r},le.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(R.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(R.parenL)?(e.expression=this.parseExpression(),this.expect(R.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},le.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(R.colon);var t=null,r=null;return this.match(R.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(R.modulo)&&(r=this.flowParsePredicate())),[t,r]},le.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},le.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(R.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(R.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},le.flowParseDeclare=function(e){return this.match(R._class)?this.flowParseDeclareClass(e):this.match(R._function)?this.flowParseDeclareFunction(e):this.match(R._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===R.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("opaque")?this.flowParseDeclareOpaqueType(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):this.match(R._export)?this.flowParseDeclareExportDeclaration(e):void this.unexpected()},le.flowParseDeclareExportDeclaration=function(e){if(this.expect(R._export),this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");throw this.unexpected()},le.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},le.flowParseDeclareModule=function(e){this.next(),this.match(R.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(R.braceL);!this.match(R.braceR);){var n=this.startNode();if(this.match(R._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(R.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},le.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(R.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},le.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},le.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},le.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},le.flowParseInterfaceish=function(e){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(R._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(R.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(R.comma))}e.body=this.flowParseObjectType(!0,!1,!1)},le.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},le.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},le.flowParseRestrictedIdentifier=function(e){return ue.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},le.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(R.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},le.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(R.colon)&&(e.supertype=this.flowParseTypeInitialiser(R.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(R.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},le.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(R.eq)&&(this.eat(R.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},le.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(R.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(R.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},le.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(R.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},le.flowParseObjectPropertyKey=function(){return this.match(R.num)||this.match(R.string)?this.parseExprAtom():this.parseIdentifier(!0)},le.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(R.bracketL),this.lookahead().type===R.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(R.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},le.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(R.parenL);!this.match(R.parenR)&&!this.match(R.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(R.parenR)||this.expect(R.comma);return this.eat(R.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(R.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},le.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},le.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},le.flowParseObjectType=function(e,t,r){var n=this.state.inType;this.state.inType=!0;var i=this.startNode(),s=void 0,a=void 0,o=!1;i.callProperties=[],i.properties=[],i.indexers=[];var u=void 0,l=void 0;for(t&&this.match(R.braceBarL)?(this.expect(R.braceBarL),u=R.braceBarR,l=!0):(this.expect(R.braceL),u=R.braceR,l=!1),i.exact=l;!this.match(u);){var c=!1,f=this.state.start,p=this.state.startLoc;s=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==R.colon&&(this.next(),o=!0);var d=this.state.start,h=this.flowParseVariance();this.match(R.bracketL)?i.indexers.push(this.flowParseObjectTypeIndexer(s,o,h)):this.match(R.parenL)||this.isRelational("<")?(h&&this.unexpected(d),i.callProperties.push(this.flowParseObjectTypeCallProperty(s,o))):this.match(R.ellipsis)?(r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),h&&this.unexpected(h.start,"Spread properties cannot have variance"),this.expect(R.ellipsis),s.argument=this.flowParseType(),this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeSpreadProperty"))):(a=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(R.parenL)?(h&&this.unexpected(h.start),i.properties.push(this.flowParseObjectTypeMethod(f,p,o,a))):(this.eat(R.question)&&(c=!0),s.key=a,s.value=this.flowParseTypeInitialiser(),s.optional=c,s.static=o,s.variance=h,this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeProperty")))),o=!1}this.expect(u);var m=this.finishNode(i,"ObjectTypeAnnotation");return this.state.inType=n,m},le.flowObjectTypeSemicolon=function(){this.eat(R.semi)||this.eat(R.comma)||this.match(R.braceR)||this.match(R.braceBarR)||this.unexpected()},le.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(R.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},le.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},le.flowParseTypeofType=function(){var e=this.startNode();return this.expect(R._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},le.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(R.bracketL);this.state.pos<this.input.length&&!this.match(R.bracketR)&&(e.types.push(this.flowParseType()),!this.match(R.bracketR));)this.expect(R.comma);return this.expect(R.bracketR),this.finishNode(e,"TupleTypeAnnotation")},le.flowParseFunctionTypeParam=function(){var e=null,t=!1,r=null,n=this.startNode(),i=this.lookahead();return i.type===R.colon||i.type===R.question?(e=this.parseIdentifier(),this.eat(R.question)&&(t=!0),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),n.name=e,n.optional=t,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")},le.reinterpretTypeAsFunctionTypeParam=function(e){var t=this.startNodeAt(e.start,e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")},le.flowParseFunctionTypeParams=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t={params:e,rest:null};!this.match(R.parenR)&&!this.match(R.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(R.parenR)||this.expect(R.comma);return this.eat(R.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),t},le.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},le.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case R.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case R.braceL:return this.flowParseObjectType(!1,!1,!0);case R.braceBarL:return this.flowParseObjectType(!1,!0,!0);case R.bracketL:return this.flowParseTupleType();case R.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(R.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(R.parenR),this.expect(R.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case R.parenL:if(this.next(),!this.match(R.parenR)&&!this.match(R.ellipsis))if(this.match(R.name)){var o=this.lookahead().type;s=o!==R.question&&o!==R.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(R.comma)||this.match(R.parenR)&&this.lookahead().type===R.arrow))return this.expect(R.parenR),i;this.eat(R.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(R.parenR),this.expect(R.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case R.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case R._true:case R._false:return r.value=this.match(R._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case R.plusMin:if("-"===this.state.value)return this.next(), -this.match(R.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case R.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case R._null:return r.value=this.match(R._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case R._this:return r.value=this.match(R._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case R.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},le.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(R.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(R.bracketL),this.expect(R.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},le.flowParsePrefixType=function(){var e=this.startNode();return this.eat(R.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},le.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(R.arrow)){var t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},le.flowParseIntersectionType=function(){var e=this.startNode();this.eat(R.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(R.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},le.flowParseUnionType=function(){var e=this.startNode();this.eat(R.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(R.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},le.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},le.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(R.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},le.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},le.flowParseVariance=function(){var e=null;return this.match(R.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ce=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(R.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(R.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(R._class)||this.match(R.name)||this.match(R._function)||this.match(R._var)||this.match(R._export))return this.flowParseDeclare(t)}else if(this.match(R.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t);if("opaque"===r.name)return this.flowParseOpaqueType(t,!1)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||e.call(this)}}),e.extend("isExportDefaultSpecifier",function(e){return function(){return(!this.match(R.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!==this.state.value)&&e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(R.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(R.question)&&(t.optional=!0),this.match(R.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(R.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("opaque")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(R.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i<t.length;i++){var s=t[i];s&&"TypeCastExpression"===s.type&&(t[i]=this.typeCastToParameter(s))}return e.call(this,t,r,n)}}),e.extend("toReferencedList",function(){return function(e){for(var t=0;t<e.length;t++){var r=e[t];r&&r._exprListItem&&"TypeCastExpression"===r.type&&this.raise(r.start,"Unexpected type cast")}return e}}),e.extend("parseExprListItem",function(e){return function(){for(var t=this.startNode(),r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];var s=e.call.apply(e,[this].concat(n));return this.match(R.colon)?(t._exprListItem=!0,t.expression=s,t.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t,"TypeCastExpression")):s}}),e.extend("checkLVal",function(e){return function(t){if("TypeCastExpression"!==t.type)return e.apply(this,arguments)}}),e.extend("parseClassProperty",function(e){return function(t){return delete t.variancePos,this.match(R.colon)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),e.call(this,t)}}),e.extend("isClassMethod",function(e){return function(){return this.isRelational("<")||e.call(this)}}),e.extend("isClassProperty",function(e){return function(){return this.match(R.colon)||e.call(this)}}),e.extend("isNonstaticConstructor",function(e){return function(t){return!this.match(R.colon)&&e.call(this,t)}}),e.extend("parseClassMethod",function(e){return function(t,r){r.variance&&this.unexpected(r.variancePos),delete r.variance,delete r.variancePos,this.isRelational("<")&&(r.typeParameters=this.flowParseTypeParameterDeclaration());for(var n=arguments.length,i=Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];e.call.apply(e,[this,t,r].concat(i))}}),e.extend("parseClassSuper",function(e){return function(t,r){if(e.call(this,t,r),t.superClass&&this.isRelational("<")&&(t.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual("implements")){this.next();var n=t.implements=[];do{var i=this.startNode();i.id=this.parseIdentifier(),this.isRelational("<")?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(R.comma))}}}),e.extend("parsePropertyName",function(e){return function(t){var r=this.state.start,n=this.flowParseVariance(),i=e.call(this,t);return t.variance=n,t.variancePos=r,i}}),e.extend("parseObjPropValue",function(e){return function(t){t.variance&&this.unexpected(t.variancePos),delete t.variance,delete t.variancePos;var r=void 0;this.isRelational("<")&&(r=this.flowParseTypeParameterDeclaration(),this.match(R.parenL)||this.unexpected()),e.apply(this,arguments),r&&((t.value||t).typeParameters=r)}}),e.extend("parseAssignableListItemTypes",function(){return function(e){return this.eat(R.question)&&(e.optional=!0),this.match(R.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.finishNode(e,e.type),e}}),e.extend("parseMaybeDefault",function(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=e.apply(this,r);return"AssignmentPattern"===i.type&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(i.typeAnnotation.start,"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`"),i}}),e.extend("parseImportSpecifiers",function(e){return function(t){t.importKind="value";var r=null;if(this.match(R._typeof)?r="typeof":this.isContextual("type")&&(r="type"),r){var n=this.lookahead();(n.type===R.name&&"from"!==n.value||n.type===R.braceL||n.type===R.star)&&(this.next(),t.importKind=r)}e.call(this,t)}}),e.extend("parseImportSpecifier",function(){return function(e){var t=this.startNode(),r=this.state.start,n=this.parseIdentifier(!0),i=null;"type"===n.name?i="type":"typeof"===n.name&&(i="typeof");var s=!1;if(this.isContextual("as")){var a=this.parseIdentifier(!0);null===i||this.match(R.name)||this.state.type.keyword?(t.imported=n,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=a,t.importKind=i,t.local=a.__clone())}else null!==i&&(this.match(R.name)||this.state.type.keyword)?(t.imported=this.parseIdentifier(!0),t.importKind=i,this.eatContextual("as")?t.local=this.parseIdentifier():(s=!0,t.local=t.imported.__clone())):(s=!0,t.imported=n,t.importKind=null,t.local=t.imported.__clone());"type"!==e.importKind&&"typeof"!==e.importKind||"type"!==t.importKind&&"typeof"!==t.importKind||this.raise(r,"`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`"),s&&this.checkReservedWord(t.local.name,t.start,!0,!0),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))}}),e.extend("parseFunctionParams",function(e){return function(t){this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),e.call(this,t)}}),e.extend("parseVarHead",function(e){return function(t){e.call(this,t),this.match(R.colon)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t.id,t.id.type))}}),e.extend("parseAsyncArrowFromCallExpression",function(e){return function(t,r){if(this.match(R.colon)){var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=n}return e.call(this,t,r)}}),e.extend("shouldParseAsyncArrow",function(e){return function(){return this.match(R.colon)||e.call(this)}}),e.extend("parseMaybeAssign",function(e){return function(){for(var t=null,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];if(R.jsxTagStart&&this.match(R.jsxTagStart)){var s=this.state.clone();try{return e.apply(this,n)}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=s,this.state.context.length-=2,t=e}}if(null!=t||this.isRelational("<")){var a=void 0,o=void 0;try{o=this.flowParseTypeParameterDeclaration(),a=e.apply(this,n),a.typeParameters=o,a.start=o.start,a.loc.start=o.loc.start}catch(e){throw t||e}if("ArrowFunctionExpression"===a.type)return a;if(null!=t)throw t;this.raise(o.start,"Expected an arrow function after this type parameter declaration")}return e.apply(this,n)}}),e.extend("parseArrow",function(e){return function(t){if(this.match(R.colon)){var r=this.state.clone();try{var n=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;var i=this.flowParseTypeAndPredicateAnnotation();this.state.noAnonFunctionType=n,this.canInsertSemicolon()&&this.unexpected(),this.match(R.arrow)||this.unexpected(),t.returnType=i}catch(e){if(!(e instanceof SyntaxError))throw e;this.state=r}}return e.call(this,t)}}),e.extend("shouldParseArrow",function(e){return function(){return this.match(R.colon)||e.call(this)}})},fe=String.fromCodePoint;if(!fe){var pe=String.fromCharCode,de=Math.floor;fe=function(){var e=[],t=void 0,r=void 0,n=-1,i=arguments.length;if(!i)return"";for(var s="";++n<i;){var a=Number(arguments[n]);if(!isFinite(a)||a<0||a>1114111||de(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(a-=65536,t=55296+(a>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=pe.apply(null,e),e.length=0)}return s}}var he=fe,me={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ye=/^[\da-fA-F]+$/,ve=/^\d+$/;U.j_oTag=new j("<tag",!1),U.j_cTag=new j("</tag",!1),U.j_expr=new j("<tag>...</tag>",!0,!0),R.jsxName=new T("jsxName"),R.jsxText=new T("jsxText",{beforeExpr:!0}),R.jsxTagStart=new T("jsxTagStart",{startsExpr:!0}),R.jsxTagEnd=new T("jsxTagEnd"),R.jsxTagStart.updateContext=function(){this.state.context.push(U.j_expr),this.state.context.push(U.j_oTag),this.state.exprAllowed=!1},R.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===U.j_oTag&&e===R.slash||t===U.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===U.j_expr):this.state.exprAllowed=!0};var ge=J.prototype;ge.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(R.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(R.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:o(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ge.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ge.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):o(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(R.string,t)},ge.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos<this.input.length&&t++<10;){if(";"===(n=this.input[this.state.pos++])){"#"===e[0]?"x"===e[1]?(e=e.substr(2),ye.test(e)&&(r=he(parseInt(e,16)))):(e=e.substr(1),ve.test(e)&&(r=he(parseInt(e,10)))):r=me[e];break}e+=n}return r||(this.state.pos=i,"&")},ge.jsxReadWord=function(){var e=void 0,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(s(e)||45===e);return this.finishToken(R.jsxName,this.input.slice(t,this.state.pos))},ge.jsxParseIdentifier=function(){var e=this.startNode();return this.match(R.jsxName)?e.name=this.state.value:this.state.type.keyword?e.name=this.state.type.keyword:this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")},ge.jsxParseNamespacedName=function(){var e=this.state.start,t=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(R.colon))return r;var n=this.startNodeAt(e,t);return n.namespace=r,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")},ge.jsxParseElementName=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.jsxParseNamespacedName();this.eat(R.dot);){var n=this.startNodeAt(e,t);n.object=r,n.property=this.jsxParseIdentifier(),r=this.finishNode(n,"JSXMemberExpression")}return r},ge.jsxParseAttributeValue=function(){var e=void 0;switch(this.state.type){case R.braceL:if(e=this.jsxParseExpressionContainer(),"JSXEmptyExpression"!==e.expression.type)return e;this.raise(e.start,"JSX attributes must only be assigned a non-empty expression");case R.jsxTagStart:case R.string:return e=this.parseExprAtom(),e.extra=null,e;default:this.raise(this.state.start,"JSX value should be either an expression or a quoted JSX text")}},ge.jsxParseEmptyExpression=function(){var e=this.startNodeAt(this.state.lastTokEnd,this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.start,this.state.startLoc)},ge.jsxParseSpreadChild=function(){var e=this.startNode();return this.expect(R.braceL),this.expect(R.ellipsis),e.expression=this.parseExpression(),this.expect(R.braceR),this.finishNode(e,"JSXSpreadChild")},ge.jsxParseExpressionContainer=function(){var e=this.startNode();return this.next(),this.match(R.braceR)?e.expression=this.jsxParseEmptyExpression():e.expression=this.parseExpression(),this.expect(R.braceR),this.finishNode(e,"JSXExpressionContainer")},ge.jsxParseAttribute=function(){var e=this.startNode();return this.eat(R.braceL)?(this.expect(R.ellipsis),e.argument=this.parseMaybeAssign(),this.expect(R.braceR),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(R.eq)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))},ge.jsxParseOpeningElementAt=function(e,t){var r=this.startNodeAt(e,t);for(r.attributes=[],r.name=this.jsxParseElementName();!this.match(R.slash)&&!this.match(R.jsxTagEnd);)r.attributes.push(this.jsxParseAttribute());return r.selfClosing=this.eat(R.slash),this.expect(R.jsxTagEnd),this.finishNode(r,"JSXOpeningElement")},ge.jsxParseClosingElementAt=function(e,t){var r=this.startNodeAt(e,t);return r.name=this.jsxParseElementName(),this.expect(R.jsxTagEnd),this.finishNode(r,"JSXClosingElement")},ge.jsxParseElementAt=function(e,t){var r=this.startNodeAt(e,t),n=[],i=this.jsxParseOpeningElementAt(e,t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case R.jsxTagStart:if(e=this.state.start,t=this.state.startLoc,this.next(),this.eat(R.slash)){s=this.jsxParseClosingElementAt(e,t);break e}n.push(this.jsxParseElementAt(e,t));break;case R.jsxText:n.push(this.parseExprAtom());break;case R.braceL:this.lookahead().type===R.ellipsis?n.push(this.jsxParseSpreadChild()):n.push(this.jsxParseExpressionContainer());break;default:this.unexpected()}d(s.name)!==d(i.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+d(i.name)+">")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(R.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ge.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};var be=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(R.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(R.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===U.j_expr)return this.jsxReadToken();if(r===U.j_oTag||r===U.j_cTag){if(i(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(R.jsxTagEnd);if((34===t||39===t)&&r===U.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(R.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(R.braceL)){var r=this.curContext();r===U.j_oTag?this.state.context.push(U.braceExpression):r===U.j_expr?this.state.context.push(U.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(R.slash)||t!==R.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(U.j_cTag),this.state.exprAllowed=!1}}})};K.estree=oe,K.flow=ce,K.jsx=be,t.parse=h,t.parseExpression=m,t.tokTypes=R},function(e,t,r){"use strict";var n=r(21),i=r(431),s=r(141),a=r(150)("IE_PROTO"),o=function(){},u=function(){var e,t=r(230)("iframe"),n=s.length;for(t.style.display="none",r(426).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;n--;)delete u.prototype[s[n]];return u()};e.exports=Object.create||function(e,t){var r;return null!==e?(o.prototype=n(e),r=new o,o.prototype=null,r[a]=e):r=u(),void 0===t?r:i(r,t)}},function(e,t){"use strict";t.f={}.propertyIsEnumerable},function(e,t){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(23).f,i=r(28),s=r(13)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},function(e,t,r){"use strict";var n=r(140);e.exports=function(e){return Object(n(e))}},function(e,t){"use strict";var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t){"use strict"},function(e,t,r){"use strict";!function(){t.ast=r(461),t.code=r(240),t.keyword=r(462)}()},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=r(546),s=r(547),a=r(548),o=r(549),u=r(550);n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,e.exports=n},function(e,t,r){"use strict";function n(e){var t=this.__data__=new i(e);this.size=t.size}var i=r(98),s=r(565),a=r(566),o=r(567),u=r(568),l=r(569);n.prototype.clear=s,n.prototype.delete=a,n.prototype.get=o,n.prototype.has=u,n.prototype.set=l,e.exports=n},function(e,t,r){"use strict";function n(e,t){for(var r=e.length;r--;)if(i(e[r][0],t))return r;return-1}var i=r(46);e.exports=n},function(e,t,r){"use strict";function n(e,t){return a(s(e,t,i),e+"")}var i=r(110),s=r(560),a=r(563);e.exports=n},function(e,t){"use strict";function r(e){return function(t){return e(t)}}e.exports=r},function(e,t,r){"use strict";function n(e){return i(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&s(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t})}var i=r(101),s=r(172);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=e.__data__;return i(t)?r["string"==typeof t?"string":"hash"]:r.map}var i=r(544);e.exports=n},function(e,t){"use strict";function r(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}var n=Object.prototype;e.exports=r},function(e,t,r){"use strict";var n=r(38),i=n(Object,"create");e.exports=i},function(e,t){"use strict";function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}e.exports=r},function(e,t,r){"use strict";function n(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}var i=r(62),s=1/0;e.exports=n},function(e,t,r){"use strict";function n(e){return i(e,s)}var i=r(164),s=4;e.exports=n},function(e,t){"use strict";function r(e){return e}e.exports=r},function(e,t,r){"use strict";function n(e,t,r,n){e=s(e)?e:u(e),r=r&&!n?o(r):0;var c=e.length;return r<0&&(r=l(c+r,0)),a(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&i(e,t,r)>-1}var i=r(166),s=r(24),a=r(587),o=r(48),u=r(280),l=Math.max;e.exports=n},function(e,t,r){"use strict";var n=r(493),i=r(25),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};e.exports=u},function(e,t,r){(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(17),s=r(596),a="object"==n(t)&&t&&!t.nodeType&&t,o=a&&"object"==n(e)&&e&&!e.nodeType&&e,u=o&&o.exports===a,l=u?i.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||s;e.exports=f}).call(t,r(39)(e))},function(e,t,r){"use strict";function n(e){return null==e?"":i(e)}var i=r(253);e.exports=n},96,function(e,t,r){"use strict";function n(e){return o.memberExpression(o.identifier("regeneratorRuntime"),o.identifier(e),!1)}function i(e){return e.isReferenced()||e.parentPath.isAssignmentExpression({left:e.node})}function s(e,t){t?e.replaceWith(t):e.remove()}t.__esModule=!0,t.runtimeProperty=n,t.isReference=i,t.replaceWithOrRemove=s;var a=r(1),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},function(e,t,r){(function(e,n){"use strict";function i(e,r){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,r,n){if(e.customInspect&&r&&C(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=u(e,i,n)),i}var s=l(e,r);if(s)return s;var a=Object.keys(r),m=o(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),D(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(C(r)){var y=r.name?": "+r.name:"";return e.stylize("[Function"+y+"]","special")}if(A(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(D(r))return c(r)}var v="",g=!1,E=["{","}"];if(h(r)&&(g=!0,E=["[","]"]),C(r)){v=" [Function"+(r.name?": "+r.name:"")+"]"}if(A(r)&&(v=" "+RegExp.prototype.toString.call(r)),_(r)&&(v=" "+Date.prototype.toUTCString.call(r)),D(r)&&(v=" "+c(r)),0===a.length&&(!g||0==r.length))return E[0]+v+E[1];if(n<0)return A(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var x;return x=g?f(e,r,n,m,a):a.map(function(t){return p(e,r,n,m,t,g)}),e.seen.pop(),d(x,v,E)}function l(e,t){if(x(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,i){for(var s=[],a=0,o=t.length;a<o;++a)T(t,String(a))?s.push(p(e,t,r,n,String(a),!0)):s.push("");return i.forEach(function(i){i.match(/^\d+$/)||s.push(p(e,t,r,n,i,!0))}),s}function p(e,t,r,n,i,s){var a,o,l;if(l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},l.get?o=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(o=e.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),o||(e.seen.indexOf(l.value)<0?(o=y(r)?u(e,l.value,null):u(e,l.value,r-1),o.indexOf("\n")>-1&&(o=s?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),x(a)){if(s&&i.match(/^\d+$/))return o;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function d(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return null==e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function E(e){return"symbol"===(void 0===e?"undefined":O(e))}function x(e){return void 0===e}function A(e){return S(e)&&"[object RegExp]"===P(e)}function S(e){return"object"===(void 0===e?"undefined":O(e))&&null!==e}function _(e){return S(e)&&"[object Date]"===P(e)}function D(e){return S(e)&&("[object Error]"===P(e)||e instanceof Error)}function C(e){return"function"==typeof e}function w(e){ -return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(void 0===e?"undefined":O(e))||void 0===e}function P(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}function F(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,s=n.length,a=String(e).replace(B,function(e){if("%%"===e)return"%";if(r>=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<s;o=n[++r])y(o)||!S(o)?a+=" "+o:a+=" "+i(o);return a},t.deprecate=function(r,i){function s(){if(!a){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),a=!0}return r.apply(this,arguments)}if(x(e.process))return function(){return t.deprecate(r,i).apply(this,arguments)};if(!0===n.noDeprecation)return r;var a=!1;return s};var R,I={};t.debuglog=function(e){if(x(R)&&(R=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!I[e])if(new RegExp("\\b"+e+"\\b","i").test(R)){var r=n.pid;I[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else I[e]=function(){};return I[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=m,t.isNull=y,t.isNullOrUndefined=v,t.isNumber=g,t.isString=b,t.isSymbol=E,t.isUndefined=x,t.isRegExp=A,t.isObject=S,t.isDate=_,t.isError=D,t.isFunction=C,t.isPrimitive=w,t.isBuffer=r(627);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",F(),t.format.apply(t,arguments))},t.inherits=r(626),t._extend=function(e,t){if(!t||!S(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(t,function(){return this}(),r(8))},function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(11),a=i(s);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===u.default?"undefined":(0,a.default)(u.default)))return null;var r=f[t];if(!r){r=new u.default;var i=c.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=u.default._nodeModulePaths(t),f[t]=r}try{return u.default._resolveFilename(e,r)}catch(e){return null}};var o=r(115),u=i(o),l=r(19),c=i(l),f={};e.exports=t.default}).call(t,r(8))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(133),s=n(i),a=r(3),o=n(a),u=r(42),l=n(u),c=r(41),f=n(c),p=function(e){function t(){(0,o.default)(this,t);var r=(0,l.default)(this,e.call(this));return r.dynamicData={},r}return(0,f.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(s.default);t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(239),o=n(a),u=(0,o.default)("babel:verbose"),l=(0,o.default)("babel"),c=[],f=function(){function e(t,r){(0,s.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),c.indexOf(e)>=0||(c.push(e),console.error(e)))},e.prototype.verbose=function(e){u.enabled&&u(this._buildMessage(e))},e.prototype.debug=function(e){l.enabled&&l(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function n(e,t){var r=e.node,n=r.source?r.source.value:null,i=t.metadata.modules.exports,s=e.get("declaration");if(s.isStatement()){var o=s.getBindingIdentifiers();for(var l in o)i.exported.push(l),i.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers)for(var c=r.specifiers,f=Array.isArray(c),p=0,c=f?c:(0,a.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d,m=h.exported.name;i.exported.push(m),u.isExportDefaultSpecifier(h)&&i.specifiers.push({kind:"external",local:m,exported:m,source:n}),u.isExportNamespaceSpecifier(h)&&i.specifiers.push({kind:"external-namespace",exported:m,source:n});var y=h.local;y&&(n&&i.specifiers.push({kind:"external",local:y.name,exported:m,source:n}),n||i.specifiers.push({kind:"local",local:y.name,exported:m}))}e.isExportAllDeclaration()&&i.specifiers.push({kind:"external-all",source:n})}function i(e){e.skip()}t.__esModule=!0,t.ImportDeclaration=t.ModuleDeclaration=void 0;var s=r(2),a=function(e){return e&&e.__esModule?e:{default:e}}(s);t.ExportDeclaration=n,t.Scope=i;var o=r(1),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o);t.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},t.ImportDeclaration={exit:function(e,t){var r=e.node,n=[],i=[];t.metadata.modules.imports.push({source:r.source.value,imported:i,specifiers:n});for(var s=e.get("specifiers"),o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l,f=c.node.local.name;if(c.isImportDefaultSpecifier()&&(i.push("default"),n.push({kind:"named",imported:"default",local:f})),c.isImportSpecifier()){var p=c.node.imported.name;i.push(p),n.push({kind:"named",imported:p,local:f})}c.isImportNamespaceSpecifier()&&(i.push("*"),n.push({kind:"namespace",local:f}))}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=D.default.extname(e);return(0,x.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(m.default).join("|"),"i")),"string"==typeof e){e=(0,w.default)(e),((0,v.default)(e,"./")||(0,v.default)(e,"*/"))&&(e=e.slice(2)),(0,v.default)(e,"**/")&&(e=e.slice(3));var t=b.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,S.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?"boolean"==typeof e?o([e],t):"string"==typeof e?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,p.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(c(a,e))return!1}return!0}if(t.length)for(var o=t,u=Array.isArray(o),l=0,o=u?o:(0,p.default)(o);;){var f;if(u){if(l>=o.length)break;f=o[l++]}else{if(l=o.next(),l.done)break;f=l.value}var d=f;if(c(d,e))return!0}return!1}function c(e,t){return"function"==typeof e?e(t):e.test(t)}t.__esModule=!0,t.inspect=t.inherits=void 0;var f=r(2),p=n(f),d=r(117);Object.defineProperty(t,"inherits",{enumerable:!0,get:function(){return d.inherits}}),Object.defineProperty(t,"inspect",{enumerable:!0,get:function(){return d.inspect}}),t.canCompile=i,t.list=s,t.regexify=a,t.arrayify=o,t.booleanify=u,t.shouldIgnore=l;var h=r(577),m=n(h),y=r(595),v=n(y),g=r(601),b=n(g),E=r(111),x=n(E),A=r(276),S=n(A),_=r(19),D=n(_),C=r(284),w=n(C);i.EXTENSIONS=[".js",".jsx",".es6",".es"]},function(e,t,r){"use strict";function n(e){e.variance&&("plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")),this.word(e.name)}function i(e){this.token("..."),this.print(e.argument,e)}function s(e){var t=e.properties;this.token("{"),this.printInnerComments(e),t.length&&(this.space(),this.printList(t,e,{indent:!0,statement:!0}),this.space()),this.token("}")}function a(e){this.printJoin(e.decorators,e),this._method(e)}function o(e){if(this.printJoin(e.decorators,e),e.computed)this.token("["),this.print(e.key,e),this.token("]");else{if(m.isAssignmentPattern(e.value)&&m.isIdentifier(e.key)&&e.key.name===e.value.left.name)return void this.print(e.value,e);if(this.print(e.key,e),e.shorthand&&m.isIdentifier(e.key)&&m.isIdentifier(e.value)&&e.key.name===e.value.name)return}this.token(":"),this.space(),this.print(e.value,e)}function u(e){var t=e.elements,r=t.length;this.token("["),this.printInnerComments(e);for(var n=0;n<t.length;n++){var i=t[n];i?(n>0&&this.space(),this.print(i,e),n<r-1&&this.token(",")):this.token(",")}this.token("]")}function l(e){this.word("/"+e.pattern+"/"+e.flags)}function c(e){this.word(e.value?"true":"false")}function f(){this.word("null")}function p(e){var t=this.getPossibleRaw(e),r=e.value+"";null==t?this.number(r):this.format.minified?this.number(t.length<r.length?t:r):this.number(t)}function d(e,t){var r=this.getPossibleRaw(e);if(!this.format.minified&&null!=r)return void this.token(r);var n={quotes:m.isJSX(t)?"double":this.format.quotes,wrap:!0};this.format.jsonCompatibleStrings&&(n.json=!0);var i=(0,v.default)(e.value,n);return this.token(i)}t.__esModule=!0,t.ArrayPattern=t.ObjectPattern=t.RestProperty=t.SpreadProperty=t.SpreadElement=void 0,t.Identifier=n,t.RestElement=i,t.ObjectExpression=s,t.ObjectMethod=a,t.ObjectProperty=o,t.ArrayExpression=u,t.RegExpLiteral=l,t.BooleanLiteral=c,t.NullLiteral=f,t.NumericLiteral=p,t.StringLiteral=d;var h=r(1),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(h),y=r(469),v=function(e){return e&&e.__esModule?e:{default:e}}(y);t.SpreadElement=i,t.SpreadProperty=i,t.RestProperty=i,t.ObjectPattern=s,t.ArrayPattern=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=e.node,n=r.body;r.async=!1;var i=f.functionExpression(null,[],f.blockStatement(n.body),!0);i.shadow=!0,n.body=[f.returnStatement(f.callExpression(f.callExpression(t,[i]),[]))],r.generator=!1}function s(e,t){var r=e.node,n=e.isFunctionDeclaration(),i=r.id,s=h;e.isArrowFunctionExpression()?e.arrowFunctionToShadowed():!n&&i&&(s=m),r.async=!1,r.generator=!0,r.id=null,n&&(r.type="FunctionExpression");var a=f.callExpression(t,[r]),u=s({NAME:i,REF:e.scope.generateUidIdentifier("ref"),FUNCTION:a,PARAMS:r.params.reduce(function(t,r){return t.done=t.done||f.isAssignmentPattern(r)||f.isRestElement(r),t.done||t.params.push(e.scope.generateUidIdentifier("x")),t},{params:[],done:!1}).params}).expression;if(n){var l=f.variableDeclaration("let",[f.variableDeclarator(f.identifier(i.name),f.callExpression(u,[]))]);l._blockHoist=!0,e.replaceWith(l)}else{var c=u.body.body[1].argument;i||(0,o.default)({node:c,parent:e.parent,scope:e.scope}),!c||c.id||r.params.length?e.replaceWith(f.callExpression(u,[])):e.replaceWith(a)}}t.__esModule=!0,t.default=function(e,t,r){r||(r={wrapAsync:t},t=null),e.traverse(y,{file:t,wrapAwait:r.wrapAwait}),e.isClassMethod()||e.isObjectMethod()?i(e,r.wrapAsync):s(e,r.wrapAsync)};var a=r(40),o=n(a),u=r(4),l=n(u),c=r(1),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),p=r(320),d=n(p),h=(0,l.default)("\n (() => {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })\n"),m=(0,l.default)("\n (() => {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })\n"),y={Function:function(e){if(e.isArrowFunctionExpression()&&!e.node.async)return void e.arrowFunctionToShadowed();e.skip()},AwaitExpression:function(e,t){var r=e.node,n=t.wrapAwait;r.type="YieldExpression",n&&(r.argument=f.callExpression(n,[r.argument]))},ForAwaitStatement:function(e,t){var r=t.file,n=t.wrapAwait,i=e.node,s=(0,d.default)(e,{getAsyncIterator:r.addHelper("asyncIterator"),wrapAwait:n}),a=s.declar,o=s.loop,u=o.body;e.ensureBlock(),a&&u.body.push(a),u.body=u.body.concat(i.body.body),f.inherits(o,i),f.inherits(o.body,i.body),s.replaceParent?(e.parentPath.replaceWithMultiple(s.node),e.remove()):e.replaceWithMultiple(s.node)}};e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("decorators")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("flow")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("jsx")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("trailingFunctionCommas")}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(67),visitor:{Function:function(e,t){e.node.async&&!e.node.generator&&(0,i.default)(e,t.file,{wrapAsync:t.addHelper("asyncToGenerator")})}}}};var n=r(124),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return c.isIdentifier(e)?e.name:e.value.toString()}t.__esModule=!0;var s=r(2),a=n(s),o=r(9),u=n(o);t.default=function(){return{visitor:{ObjectExpression:function(e){for(var t=e.node,r=t.properties.filter(function(e){return!c.isSpreadProperty(e)&&!e.computed}),n=(0,u.default)(null),s=(0,u.default)(null),o=(0,u.default)(null),l=r,f=Array.isArray(l),p=0,l=f?l:(0,a.default)(l);;){var d;if(f){if(p>=l.length)break;d=l[p++]}else{if(p=l.next(),p.done)break;d=p.value}var h=d,m=i(h.key),y=!1;switch(h.kind){case"get":(n[m]||s[m])&&(y=!0),s[m]=!0;break;case"set":(n[m]||o[m])&&(y=!0),o[m]=!0;break;default:(n[m]||s[m]||o[m])&&(y=!0),n[m]=!0}y&&(h.computed=!0,h.key=c.stringLiteral(m))}}}}};var l=r(1),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(l);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(9),s=n(i);t.default=function(e){function t(e){if(!e.isCallExpression())return!1;if(!e.get("callee").isIdentifier({name:"require"}))return!1;if(e.scope.getBinding("require"))return!1;var t=e.get("arguments");return 1===t.length&&!!t[0].isStringLiteral()}var n=e.types,i={ReferencedIdentifier:function(e){var t=e.node,r=e.scope;"exports"!==t.name||r.getBinding("exports")||(this.hasExports=!0),"module"!==t.name||r.getBinding("module")||(this.hasModule=!0)},CallExpression:function(e){t(e)&&(this.bareSources.push(e.node.arguments[0]),e.remove())},VariableDeclarator:function(e){var r=e.get("id");if(r.isIdentifier()){var n=e.get("init");if(t(n)){var i=n.node.arguments[0];this.sourceNames[i.value]=!0,this.sources.push([r.node,i]),e.remove()}}}};return{inherits:r(77),pre:function(){this.sources=[],this.sourceNames=(0,s.default)(null),this.bareSources=[],this.hasExports=!1,this.hasModule=!1},visitor:{Program:{exit:function(e){var t=this;if(!this.ran){this.ran=!0,e.traverse(i,this);var r=this.sources.map(function(e){return e[0]}),s=this.sources.map(function(e){return e[1]});s=s.concat(this.bareSources.filter(function(e){return!t.sourceNames[e.value]}));var a=this.getModuleName();a&&(a=n.stringLiteral(a)),this.hasExports&&(s.unshift(n.stringLiteral("exports")),r.unshift(n.identifier("exports"))),this.hasModule&&(s.unshift(n.stringLiteral("module")),r.unshift(n.identifier("module")));var o=e.node,c=l({PARAMS:r,BODY:o.body});c.expression.body.directives=o.directives,o.directives=[],o.body=[u({MODULE_NAME:a,SOURCES:s,FACTORY:c})]}}}}}};var a=r(4),o=n(a),u=(0,o.default)("\n define(MODULE_NAME, [SOURCES], FACTORY);\n"),l=(0,o.default)("\n (function (PARAMS) {\n BODY;\n })\n");e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{inherits:r(199),visitor:(0,i.default)({operator:"**",build:function(e,r){return t.callExpression(t.memberExpression(t.identifier("Math"),t.identifier("pow")),[e,r])}})}};var n=r(316),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t,r){"use strict";e.exports={default:r(406),__esModule:!0}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var n=I.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),I.scope.has(e.node)||I.scope.set(e.node,n)}function a(e,t){if(R.isModuleDeclaration(e))if(e.source)a(e.source,t);else if(e.specifiers&&e.specifiers.length)for(var r=e.specifiers,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;a(o,t)}else e.declaration&&a(e.declaration,t);else if(R.isModuleSpecifier(e))a(e.local,t);else if(R.isMemberExpression(e))a(e.object,t),a(e.property,t);else if(R.isIdentifier(e))t.push(e.name);else if(R.isLiteral(e))t.push(e.value);else if(R.isCallExpression(e))a(e.callee,t);else if(R.isObjectExpression(e)||R.isObjectPattern(e))for(var u=e.properties,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;a(p.key||p.argument,t)}}t.__esModule=!0;var o=r(14),u=i(o),l=r(9),c=i(l),f=r(133),p=i(f),d=r(3),h=i(d),m=r(2),y=i(m),v=r(111),g=i(v),b=r(278),E=i(b),x=r(383),A=i(x),S=r(7),_=i(S),D=r(273),C=i(D),w=r(20),P=n(w),k=r(225),F=i(k),T=r(463),O=i(T),B=r(1),R=n(B),I=r(88),M=0,N={For:function(e){for(var t=R.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(R.isClassDeclaration(n)||R.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(R.isVariableDeclaration(n))for(var a=n.declarations,o=Array.isArray(a),u=0,a=o?a:(0,y.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l,f=R.getBindingIdentifiers(c);for(var p in f){var d=r.getBinding(p);d&&d.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},L=0,j=function(){function e(t,r){if((0,h.default)(this,e),r&&r.block===t.node)return r;var n=s(t,r,this);if(n)return n;this.uid=L++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new p.default}return e.prototype.traverse=function(e,t,r){(0,_.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return R.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=R.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;R.isAssignmentExpression(e)?r=e.left:R.isVariableDeclarator(e)?r=e.id:(R.isObjectProperty(r)||R.isObjectMethod(r))&&(r=r.key);var n=[];a(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(R.isThisExpression(e)||R.isSuper(e))return!0;if(R.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,P.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new A.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,E.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(R.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(R.isArrayExpression(e))return e;if(R.isIdentifier(e,{name:"arguments"}))return R.callExpression(R.memberExpression(R.memberExpression(R.memberExpression(R.identifier("Array"),R.identifier("prototype")),R.identifier("slice")),R.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(R.numericLiteral(t)),i="slicedToArray"),R.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;this.registerBinding("module",p)}else if(e.isExportDeclaration()){var d=e.get("declaration");(d.isClassDeclaration()||d.isFunctionDeclaration()||d.isVariableDeclaration())&&this.registerDeclaration(d)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?R.unaryExpression("void",R.numericLiteral(0),!0):R.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var n=t.get("declarations"),i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;this.registerBinding(e,u)}else{var l=this.getProgramParent(),c=t.getBindingIdentifiers(!0);for(var f in c)for(var p=c[f],d=Array.isArray(p),h=0,p=d?p:(0,y.default)(p);;){var m;if(d){if(h>=p.length)break;m=p[h++]}else{if(h=p.next(),h.done)break;m=h.value}var v=m,g=this.getOwnBinding(f);if(g){if(g.identifier===v)continue;this.checkBlockScopedCollisions(g,e,f,v)}g&&g.path.isFlow()&&(g=null),l.references[f]=!0,this.bindings[f]=new F.default({identifier:v,existing:g,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(R.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(R.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(R.isClassBody(e)){for(var n=e.body,i=Array.isArray(n),s=0,n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(R.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(R.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;if(!this.isPure(p,t))return!1}return!0}if(R.isObjectExpression(e)){for(var d=e.properties,h=Array.isArray(d),m=0,d=h?d:(0,y.default)(d);;){var v;if(h){if(m>=d.length)break;v=d[m++]}else{if(m=d.next(),m.done)break;v=m.value}var g=v;if(!this.isPure(g,t))return!1}return!0}return R.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):R.isClassProperty(e)||R.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):R.isUnaryExpression(e)?this.isPure(e.argument,t):R.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){M++,this._crawl(),M--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,c.default)(null),this.bindings=(0,c.default)(null),this.globals=(0,c.default)(null),this.uids=(0,c.default)(null),this.data=(0,c.default)(null),e.isLoop())for(var t=R.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[R.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[R.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),f=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(f>=u.length)break;p=u[f++]}else{if(f=u.next(),f.done)break;p=f.value}var d=p;this.registerBinding("param",d)}if(e.isCatchClause()&&this.registerBinding("let",e),!this.getProgramParent().crawling){var h={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(N,h),this.crawling=!1;for(var m=h.assignments,v=Array.isArray(m),g=0,m=v?m:(0,y.default)(m);;){var b;if(v){if(g>=m.length)break;b=m[g++]}else{if(g=m.next(),g.done)break;b=g.value}var E=b,x=E.getBindingIdentifiers(),A=void 0;for(var S in x)E.scope.getBinding(S)||(A=A||E.scope.getProgramParent(),A.addGlobal(x[S]));E.scope.registerConstantViolation(E)}for(var _=h.references,D=Array.isArray(_),C=0,_=D?_:(0,y.default)(_);;){var w;if(D){if(C>=_.length)break;w=_[C++]}else{if(C=_.next(),C.done)break;w=C.value}var P=w,k=P.scope.getBinding(P.node.name);k?k.reference(P):P.scope.getProgramParent().addGlobal(P.node)}for(var F=h.constantViolations,T=Array.isArray(F),O=0,F=T?F:(0,y.default)(F);;){var B;if(T){if(O>=F.length)break;B=F[O++]}else{if(O=F.next(),O.done)break;B=O.value}var I=B;I.scope.registerConstantViolation(I)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(R.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=R.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=R.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,c.default)(null),t=this;do{(0,C.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=(0,c.default)(null),t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=this;do{for(var o in a.bindings){var u=a.bindings[o];u.kind===s&&(e[o]=u)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){ -return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===M&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,g.default)(e.globals,t))||!(r||!(0,g.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();j.globals=(0,u.default)(O.default.builtin),j.contextVariables=["arguments","undefined","Infinity","NaN"],t.default=j,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.NOT_LOCAL_BINDING=t.BLOCK_SCOPED_SYMBOL=t.INHERIT_KEYS=t.UNARY_OPERATORS=t.STRING_UNARY_OPERATORS=t.NUMBER_UNARY_OPERATORS=t.BOOLEAN_UNARY_OPERATORS=t.BINARY_OPERATORS=t.NUMBER_BINARY_OPERATORS=t.BOOLEAN_BINARY_OPERATORS=t.COMPARISON_BINARY_OPERATORS=t.EQUALITY_BINARY_OPERATORS=t.BOOLEAN_NUMBER_BINARY_OPERATORS=t.UPDATE_OPERATORS=t.LOGICAL_OPERATORS=t.COMMENT_KEYS=t.FOR_INIT_KEYS=t.FLATTENABLE_KEYS=t.STATEMENT_OR_BLOCK_KEYS=void 0;var n=r(362),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=(t.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],t.FLATTENABLE_KEYS=["body","expressions"],t.FOR_INIT_KEYS=["left","init"],t.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],t.LOGICAL_OPERATORS=["||","&&"],t.UPDATE_OPERATORS=["++","--"],t.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),a=t.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],o=t.COMPARISON_BINARY_OPERATORS=[].concat(a,["in","instanceof"]),u=t.BOOLEAN_BINARY_OPERATORS=[].concat(o,s),l=t.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],c=(t.BINARY_OPERATORS=["+"].concat(l,u),t.BOOLEAN_UNARY_OPERATORS=["delete","!"]),f=t.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],p=t.STRING_UNARY_OPERATORS=["typeof"];t.UNARY_OPERATORS=["void"].concat(c,f,p),t.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},t.BLOCK_SCOPED_SYMBOL=(0,i.default)("var used to be block scoped"),t.NOT_LOCAL_BINDING=(0,i.default)("should not be considered a local binding")},function(e,t){"use strict";e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){"use strict";var n=r(43),i=r(142),s=r(94),a=r(153),o=r(422);e.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,f=6==e,p=5==e||f,d=t||o;return function(t,o,h){for(var m,y,v=s(t),g=i(v),b=n(o,h,3),E=a(g.length),x=0,A=r?d(t,E):u?d(t,0):void 0;E>x;x++)if((p||x in g)&&(m=g[x],y=b(m,x,v),e))if(r)A[x]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return x;case 2:A.push(m)}else if(c)return!1;return f?-1:l||c?c:A}}},function(e,t){"use strict";var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,r){"use strict";var n=r(15),i=r(12),s=r(57),a=r(27),o=r(29),u=r(146),l=r(55),c=r(136),f=r(16),p=r(93),d=r(23).f,h=r(137)(0),m=r(22);e.exports=function(e,t,r,y,v,g){var b=n[e],E=b,x=v?"set":"add",A=E&&E.prototype,S={};return m&&"function"==typeof E&&(g||A.forEach&&!a(function(){(new E).entries().next()}))?(E=t(function(t,r){c(t,E,e,"_c"),t._c=new b,void 0!=r&&l(r,v,t[x],t)}),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!g||"clear"!=e)&&o(E.prototype,e,function(r,n){if(c(this,E,e),!t&&g&&!f(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),g||d(E.prototype,"size",{get:function(){return this._c.size}})):(E=y.getConstructor(t,e,v,x),u(E.prototype,r),s.NEED=!0),p(E,e),S[e]=E,i(i.G+i.W+i.F,S),g||y.setStrong(E,e,v),E}},function(e,t){"use strict";e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){"use strict";e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){"use strict";var n=r(138);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){"use strict";var n=r(144),i=r(12),s=r(147),a=r(29),o=r(28),u=r(56),l=r(429),c=r(93),f=r(433),p=r(13)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,r,m,y,v,g){l(r,t,m);var b,E,x,A=function(e){if(!d&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},S=t+" Iterator",_="values"==y,D=!1,C=e.prototype,w=C[p]||C["@@iterator"]||y&&C[y],P=w||A(y),k=y?_?A("entries"):P:void 0,F="Array"==t?C.entries||w:w;if(F&&(x=f(F.call(new e)))!==Object.prototype&&x.next&&(c(x,S,!0),n||o(x,p)||a(x,p,h)),_&&w&&"values"!==w.name&&(D=!0,P=function(){return w.call(this)}),n&&!g||!d&&!D&&C[p]||a(C,p,P),u[t]=P,u[S]=h,y)if(b={values:_?P:A("values"),keys:v?P:A("keys"),entries:k},g)for(E in b)E in C||s(C,E,b[E]);else i(i.P+i.F*(d||D),t,b);return b}},function(e,t){"use strict";e.exports=!0},function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,r){"use strict";var n=r(29);e.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},function(e,t,r){"use strict";e.exports=r(29)},function(e,t,r){"use strict";var n=r(12),i=r(227),s=r(43),a=r(55);e.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,o,u=arguments[1];return i(this),t=void 0!==u,t&&i(u),void 0==e?new this:(r=[],t?(n=0,o=s(u,arguments[2],2),a(e,!1,function(e){r.push(o(e,n++))})):a(e,!1,r.push,r),new this(r))}})}},function(e,t,r){"use strict";var n=r(12);e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},function(e,t,r){"use strict";var n=r(151)("keys"),i=r(95);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){"use strict";var n=r(15),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){"use strict";var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){"use strict";var n=r(152),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){"use strict";var n=r(16);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){"use strict";var n=r(15),i=r(5),s=r(144),a=r(156),o=r(23).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},function(e,t,r){"use strict";t.f=r(13)},function(e,t,r){"use strict";var n=r(437)(!0);r(143)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(15),s=r(28),a=r(22),o=r(12),u=r(147),l=r(57).KEY,c=r(27),f=r(151),p=r(93),d=r(95),h=r(13),m=r(156),y=r(155),v=r(430),g=r(425),b=r(232),E=r(21),x=r(37),A=r(154),S=r(92),_=r(90),D=r(432),C=r(235),w=r(23),P=r(44),k=C.f,F=w.f,T=D.f,O=i.Symbol,B=i.JSON,R=B&&B.stringify,I=h("_hidden"),M=h("toPrimitive"),N={}.propertyIsEnumerable,L=f("symbol-registry"),j=f("symbols"),U=f("op-symbols"),V=Object.prototype,G="function"==typeof O,W=i.QObject,Y=!W||!W.prototype||!W.prototype.findChild,q=a&&c(function(){return 7!=_(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=k(V,t);n&&delete V[t],F(e,t,r),n&&e!==V&&F(V,t,n)}:F,K=function(e){var t=j[e]=_(O.prototype);return t._k=e,t},H=G&&"symbol"==n(O.iterator)?function(e){return"symbol"==(void 0===e?"undefined":n(e))}:function(e){return e instanceof O},J=function(e,t,r){return e===V&&J(U,t,r),E(e),t=A(t,!0),E(r),s(j,t)?(r.enumerable?(s(e,I)&&e[I][t]&&(e[I][t]=!1),r=_(r,{enumerable:S(0,!1)})):(s(e,I)||F(e,I,S(1,{})),e[I][t]=!0),q(e,t,r)):F(e,t,r)},X=function(e,t){E(e);for(var r,n=g(t=x(t)),i=0,s=n.length;s>i;)J(e,r=n[i++],t[r]);return e},z=function(e,t){return void 0===t?_(e):X(_(e),t)},$=function(e){var t=N.call(this,e=A(e,!0));return!(this===V&&s(j,e)&&!s(U,e))&&(!(t||!s(this,e)||!s(j,e)||s(this,I)&&this[I][e])||t)},Q=function(e,t){if(e=x(e),t=A(t,!0),e!==V||!s(j,t)||s(U,t)){var r=k(e,t);return!r||!s(j,t)||s(e,I)&&e[I][t]||(r.enumerable=!0),r}},Z=function(e){for(var t,r=T(x(e)),n=[],i=0;r.length>i;)s(j,t=r[i++])||t==I||t==l||n.push(t);return n},ee=function(e){for(var t,r=e===V,n=T(r?U:x(e)),i=[],a=0;n.length>a;)!s(j,t=n[a++])||r&&!s(V,t)||i.push(j[t]);return i};G||(O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function t(r){this===V&&t.call(U,r),s(this,I)&&s(this[I],e)&&(this[I][e]=!1),q(this,e,S(1,r))};return a&&Y&&q(V,e,{configurable:!0,set:t}),K(e)},u(O.prototype,"toString",function(){return this._k}),C.f=Q,w.f=J,r(236).f=D.f=Z,r(91).f=$,r(145).f=ee,a&&!r(144)&&u(V,"propertyIsEnumerable",$,!0),m.f=function(e){return K(h(e))}),o(o.G+o.W+o.F*!G,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),re=0;te.length>re;)h(te[re++]);for(var ne=P(h.store),ie=0;ne.length>ie;)y(ne[ie++]);o(o.S+o.F*!G,"Symbol",{for:function(e){return s(L,e+="")?L[e]:L[e]=O(e)},keyFor:function(e){if(H(e))return v(L,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),o(o.S+o.F*!G,"Object",{create:z,defineProperty:J,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee}),B&&o(o.S+o.F*(!G||c(function(){var e=O();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!H(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return t=n[1],"function"==typeof t&&(r=t),!r&&b(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!H(t))return t}),n[1]=t,R.apply(B,n)}}}),O.prototype[M]||r(29)(O.prototype,M,O.prototype.valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(i.JSON,"JSON",!0)},function(e,t,r){"use strict";var n=r(38),i=r(17),s=n(i,"Map");e.exports=s},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=r(551),s=r(552),a=r(553),o=r(554),u=r(555);n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,e.exports=n},function(e,t){"use strict";function r(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}e.exports=r},function(e,t,r){"use strict";function n(e,t,r){var n=e[t];o.call(e,t)&&s(n,r)&&(void 0!==r||t in e)||i(e,t,r)}var i=r(163),s=r(46),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var i=r(259);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,T,O,B){var R,I=t&S,M=t&_,N=t&D;if(r&&(R=O?r(e,T,O,B):r(e)),void 0!==R)return R;if(!x(e))return e;var L=b(e);if(L){if(R=y(e),!I)return c(e,R)}else{var j=m(e),U=j==w||j==P;if(E(e))return l(e,I);if(j==k||j==C||U&&!O){if(R=M||U?{}:g(e),!I)return M?p(e,u(R,e)):f(e,o(R,e))}else{if(!F[j])return O?e:{};R=v(e,j,n,I)}}B||(B=new i);var V=B.get(e);if(V)return V;B.set(e,R);var G=N?M?h:d:M?keysIn:A,W=L?void 0:G(e);return s(W||e,function(i,s){W&&(s=i,i=e[s]),a(R,s,n(i,t,r,s,e,B))}),R}var i=r(99),s=r(478),a=r(162),o=r(483),u=r(484),l=r(256),c=r(168),f=r(523),p=r(524),d=r(262),h=r(532),m=r(264),y=r(541),v=r(542),g=r(266),b=r(6),E=r(113),x=r(18),A=r(32),S=1,_=2,D=4,C="[object Arguments]",w="[object Function]",P="[object GeneratorFunction]",k="[object Object]",F={};F[C]=F["[object Array]"]=F["[object ArrayBuffer]"]=F["[object DataView]"]=F["[object Boolean]"]=F["[object Date]"]=F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Map]"]=F["[object Number]"]=F[k]=F["[object RegExp]"]=F["[object Set]"]=F["[object String]"]=F["[object Symbol]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F["[object Error]"]=F[w]=F["[object WeakMap]"]=!1,e.exports=n},function(e,t){"use strict";function r(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}e.exports=r},function(e,t,r){"use strict";function n(e,t,r){return t===t?a(e,t,r):i(e,s,r)}var i=r(165),s=r(496),a=r(570);e.exports=n},function(e,t,r){"use strict";function n(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}var i=r(243);e.exports=n},function(e,t){"use strict";function r(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}e.exports=r},function(e,t,r){"use strict";var n=r(271),i=n(Object.getPrototypeOf,Object);e.exports=i},function(e,t,r){"use strict";var n=r(479),i=r(279),s=Object.prototype,a=s.propertyIsEnumerable,o=Object.getOwnPropertySymbols,u=o?function(e){return null==e?[]:(e=Object(e),n(o(e),function(t){return a.call(e,t)}))}:i;e.exports=u},function(e,t){"use strict";function r(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}var n=9007199254740991,i=/^(?:0|[1-9]\d*)$/;e.exports=r},function(e,t,r){"use strict";function n(e,t,r){if(!u(r))return!1;var n=void 0===t?"undefined":i(t);return!!("number"==n?a(r)&&o(t,r.length):"string"==n&&t in r)&&s(r[t],e)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(46),a=r(24),o=r(171),u=r(18);e.exports=n},function(e,t,r){"use strict";function n(e,t){if(s(e))return!1;var r=void 0===e?"undefined":i(e);return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!a(e))||(u.test(e)||!o.test(e)||null!=t&&e in Object(t))}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(6),a=r(62),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;e.exports=n},function(e,t,r){"use strict";var n=r(162),i=r(31),s=r(103),a=r(24),o=r(105),u=r(32),l=Object.prototype,c=l.hasOwnProperty,f=s(function(e,t){if(o(t)||a(t))return void i(t,u(t),e);for(var r in t)c.call(t,r)&&n(e,r,t[r])});e.exports=f},function(e,t,r){"use strict";function n(e){if(!s(e))return!1;var t=i(e);return t==o||t==u||t==a||t==l}var i=r(30),s=r(18),a="[object AsyncFunction]",o="[object Function]",u="[object GeneratorFunction]",l="[object Proxy]";e.exports=n},function(e,t){"use strict";function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},function(e,t,r){"use strict";var n=r(499),i=r(102),s=r(270),a=s&&s.isTypedArray,o=a?i(a):n;e.exports=o},function(e,t,r){function n(e){return r(i(e))}function i(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./index":50,"./index.js":50,"./logger":120,"./logger.js":120,"./metadata":121,"./metadata.js":121,"./options/build-config-chain":51,"./options/build-config-chain.js":51,"./options/config":33,"./options/config.js":33,"./options/index":52,"./options/index.js":52,"./options/option-manager":34,"./options/option-manager.js":34,"./options/parsers":53,"./options/parsers.js":53,"./options/removed":54,"./options/removed.js":54};n.keys=function(){return Object.keys(s)},n.resolve=i,e.exports=n,n.id=178},function(e,t,r){function n(e){return r(i(e))}function i(e){return s[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var s={"./build-config-chain":51,"./build-config-chain.js":51,"./config":33,"./config.js":33,"./index":52,"./index.js":52,"./option-manager":34,"./option-manager.js":34,"./parsers":53,"./parsers.js":53,"./removed":54,"./removed.js":54};n.keys=function(){return Object.keys(s)},n.resolve=i,e.exports=n,n.id=179},function(e,t){"use strict";e.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function s(e){var t=e.slice(-2),r=t[0],n=t[1],i=(0,o.matchToToken)(e);if("name"===i.type){if(c.default.keyword.isReservedWordES6(i.value))return"keyword";if(h.test(i.value)&&("<"===n[r-1]||"</"==n.substr(r-2,2)))return"jsx_tag";if(i.value[0]!==i.value[0].toLowerCase())return"capitalized"}return"punctuator"===i.type&&m.test(i.value)?"bracket":i.type}function a(e,t){return t.replace(u.default,function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=s(r),a=e[i];return a?r[0].split(d).map(function(e){return a(e)}).join("\n"):r[0]})}t.__esModule=!0,t.default=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&p.default.supportsColor||n.forceColor,o=p.default;n.forceColor&&(o=new p.default.constructor({enabled:!0}));var u=function(e,t){return s?e(t):t},l=i(o);s&&(e=a(l,e));var c=n.linesAbove||2,f=n.linesBelow||3,h=e.split(d),m=Math.max(t-(c+1),0),y=Math.min(h.length,t+f);t||r||(m=0,y=h.length);var v=String(y).length,g=h.slice(m,y).map(function(e,n){var i=m+1+n,s=(" "+i).slice(-v),a=" "+s+" | ";if(i===t){var o="";if(r){var c=e.slice(0,r-1).replace(/[^\t]/g," ");o=["\n ",u(l.gutter,a.replace(/\d/g," ")),c,u(l.marker,"^")].join("")}return[u(l.marker,">"),u(l.gutter,a),e,o].join("")}return" "+u(l.gutter,a)+e}).join("\n");return s?o.reset(g):g};var o=r(468),u=n(o),l=r(97),c=n(l),f=r(401),p=n(f),d=/\r\n|[\n\r\u2028\u2029]/,h=/^[a-z][\w-]*$/i,m=/^[()\[\]{}]$/;e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")}function a(e,t,r){"function"==typeof t&&(r=t,t={}),t.filename=e,y.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=F(n,t)}catch(t){e=t}e?r(e):r(null,i)})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,F(y.default.readFileSync(e,"utf8"),t)}t.__esModule=!0,t.transformFromAst=t.transform=t.analyse=t.Pipeline=t.OptionManager=t.traverse=t.types=t.messages=t.util=t.version=t.resolvePreset=t.resolvePlugin=t.template=t.buildExternalHelpers=t.options=t.File=void 0;var u=r(50);Object.defineProperty(t,"File",{enumerable:!0,get:function(){return i(u).default}});var l=r(33);Object.defineProperty(t,"options",{enumerable:!0,get:function(){return i(l).default}});var c=r(295);Object.defineProperty(t,"buildExternalHelpers",{enumerable:!0,get:function(){return i(c).default}});var f=r(4);Object.defineProperty(t,"template",{enumerable:!0,get:function(){return i(f).default}});var p=r(184);Object.defineProperty(t,"resolvePlugin",{enumerable:!0,get:function(){return i(p).default}});var d=r(185);Object.defineProperty(t,"resolvePreset",{enumerable:!0,get:function(){return i(d).default}});var h=r(628);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return h.version}}),t.Plugin=s,t.transformFile=a,t.transformFileSync=o;var m=r(115),y=i(m),v=r(122),g=n(v),b=r(20),E=n(b),x=r(1),A=n(x),S=r(7),_=i(S),D=r(34),C=i(D),w=r(298),P=i(w);t.util=g,t.messages=E,t.types=A,t.traverse=_.default,t.OptionManager=C.default,t.Pipeline=P.default;var k=new P.default,F=(t.analyse=k.analyse.bind(k),t.transform=k.transform.bind(k));t.transformFromAst=k.transformFromAst.bind(k)},function(e,t,r){"use strict";function n(e,t){return e.reduce(function(e,r){return e||(0,s.default)(r,t)},null)}t.__esModule=!0,t.default=n;var i=r(118),s=function(e){return e&&e.__esModule?e:{default:e}}(i);e.exports=t.default},function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}t.__esModule=!0,t.default=s;var a=r(183),o=i(a),u=r(291),l=i(u);e.exports=t.default}).call(t,r(8))},function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}t.__esModule=!0,t.default=s;var a=r(183),o=i(a),u=r(292),l=i(u);e.exports=t.default}).call(t,r(8))},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,d.default)(e).indent;i&&" "!==i&&(n=i)}var a={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||s(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return a.minified?(a.compact=!0,a.shouldPrintComment=a.shouldPrintComment||function(){return a.comments}):a.shouldPrintComment=a.shouldPrintComment||function(e){return a.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===a.compact&&(a.compact=e.length>5e5,a.compact&&console.error("[BABEL] "+v.get("codeGeneratorDeopt",t.filename,"500KB"))),a.compact&&(a.indent.adjustMultilineComment=!1),a}function s(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i<t.length;i++){var s=t[i];if("string"===s.type.label){if("'"===e.slice(s.start,s.end)[0]?r.single++:r.double++,++n>=3)break}}return r.single>r.double?"single":"double"}t.__esModule=!0,t.CodeGenerator=void 0;var a=r(3),o=n(a),u=r(42),l=n(u),c=r(41),f=n(c);t.default=function(e,t,r){return new E(e,t,r).generate()};var p=r(459),d=n(p),h=r(313),m=n(h),y=r(20),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(y),g=r(312),b=n(g),E=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments[2];(0,o.default)(this,t);var a=r.tokens||[],u=i(s,n,a),c=n.sourceMaps?new m.default(n,s):null,f=(0,l.default)(this,e.call(this,u,c,a));return f.ast=r,f}return(0,f.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(b.default);t.CodeGenerator=function(){function e(t,r,n){(0,o.default)(this,e),this._generator=new E(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}for(var r={},n=(0,m.default)(e),i=Array.isArray(n),s=0,n=i?n:(0,d.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a,u=x.FLIPPED_ALIAS_KEYS[o];if(u)for(var l=u,c=Array.isArray(l),f=0,l=c?l:(0,d.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var h=p;t(h,e[o])}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!x.isCallExpression(e)||!!x.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;x.isExpressionStatement(e)&&(e=e.expression);var n=a(S,e,t);if(!n){var i=a(_,e,t);if(i)for(var s=0;s<i.length&&!(n=u(i[s],e,r));s++);}return n&&n[r]||0}function l(e,t){return u(e,t,"before")}function c(e,t){return u(e,t,"after")}function f(e,t,r){return!!t&&(!(!x.isNewExpression(t)||t.callee!==e||!o(e))||a(A,e,t,r))}t.__esModule=!0;var p=r(2),d=i(p),h=r(14),m=i(h);t.needsWhitespace=u,t.needsWhitespaceBefore=l,t.needsWhitespaceAfter=c,t.needsParens=f;var y=r(311),v=i(y),g=r(310),b=n(g),E=r(1),x=n(E),A=s(b),S=s(v.default.nodes),_=s(v.default.list)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return!v.isClassMethod(e)&&!v.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}function s(e,t,r,n,s){var a=v.toKeyAlias(t),o={};if((0,m.default)(e,a)&&(o=e[a]),e[a]=o,o._inherits=o._inherits||[],o._inherits.push(t),o._key=t.key,t.computed&&(o._computed=!0),t.decorators){var u=o.decorators=o.decorators||v.arrayExpression([]);u.elements=u.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(o.value||o.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var l=void 0,c=void 0;(v.isObjectProperty(t)||v.isObjectMethod(t)||v.isClassMethod(t))&&(l=v.toComputedKey(t,t.key)),v.isObjectProperty(t)||v.isClassProperty(t)?c=t.value:(v.isObjectMethod(t)||v.isClassMethod(t))&&(c=v.functionExpression(null,t.params,t.body,t.generator,t.async),c.returnType=t.returnType);var f=i(t);return r&&"value"===f||(r=f),s&&v.isStringLiteral(l)&&("value"===r||"initializer"===r)&&v.isFunctionExpression(c)&&(c=(0,d.default)({id:l,node:c,scope:s})),c&&(v.inheritsComments(c,t),o[r]=c),o}function a(e){for(var t in e)if(e[t]._computed)return!0;return!1}function o(e){for(var t=v.arrayExpression([]),r=0;r<e.properties.length;r++){var n=e.properties[r],i=n.value;i.properties.unshift(v.objectProperty(v.identifier("key"),v.toComputedKey(n))),t.elements.push(i)}return t}function u(e){var t=v.objectExpression([]);return(0,f.default)(e).forEach(function(r){var n=e[r],i=v.objectExpression([]),s=v.objectProperty(n._key,i,n._computed);(0,f.default)(n).forEach(function(e){var t=n[e];if("_"!==e[0]){var r=t;(v.isClassMethod(t)||v.isClassProperty(t))&&(t=t.value);var s=v.objectProperty(v.identifier(e),t);v.inheritsComments(s,r),v.removeComments(r),i.properties.push(s)}}),t.properties.push(s)}),t}function l(e){return(0,f.default)(e).forEach(function(t){var r=e[t];r.value&&(r.writable=v.booleanLiteral(!0)),r.configurable=v.booleanLiteral(!0),r.enumerable=v.booleanLiteral(!0)}),u(e)}t.__esModule=!0;var c=r(14),f=n(c);t.push=s,t.hasComputed=a,t.toComputedObjectFromClass=o,t.toClassObject=u,t.toDefineObject=l;var p=r(40),d=n(p),h=r(274),m=n(h),y=r(1),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(y)},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){for(var t=e.params,r=0;r<t.length;r++){var n=t[r];if(i.isAssignmentPattern(n)||i.isRestElement(n))return r}return t.length};var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"var";e.traverse(o,{kind:r,emit:t})};var s=r(1),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s),o={Scope:function(e,t){"let"===t.kind&&e.skip()},Function:function(e){e.skip()},VariableDeclaration:function(e,t){if(!t.kind||e.node.kind===t.kind){for(var r=[],n=e.get("declarations"),s=void 0,o=n,u=Array.isArray(o),l=0,o=u?o:(0,i.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var f=c;s=f.node.id,f.node.init&&r.push(a.expressionStatement(a.assignmentExpression("=",f.node.id,f.node.init)));for(var p in f.getBindingIdentifiers())t.emit(a.identifier(p),p)}e.parentPath.isFor({left:e.node})?e.replaceWith(s):e.replaceWithMultiple(r)}}};e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t,r){return 1===r.length&&i.isSpreadElement(r[0])&&i.isIdentifier(r[0].argument,{name:"arguments"})?i.callExpression(i.memberExpression(e,i.identifier("apply")),[t,r[0].argument]):i.callExpression(i.memberExpression(e,i.identifier("call")),[t].concat(r))};var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);e.exports=t.default},function(e,t,r){"use strict";function n(e,t){return u.isRegExpLiteral(e)&&e.flags.indexOf(t)>=0}function i(e,t){var r=e.flags.split("");e.flags.indexOf(t)<0||((0,a.default)(r,t),e.flags=r.join(""))}t.__esModule=!0,t.is=n,t.pullFlag=i;var s=r(277),a=function(e){return e&&e.__esModule?e:{default:e}}(s),o=r(1),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){return!!v.isSuper(e)&&(!v.isMemberExpression(t,{computed:!1})&&!v.isCallExpression(t,{callee:e}))}function a(e){return v.isMemberExpression(e)&&v.isSuper(e.object)}function o(e,t){var r=t?e:v.memberExpression(e,v.identifier("prototype"));return v.logicalExpression("||",v.memberExpression(r,v.identifier("__proto__")),v.callExpression(v.memberExpression(v.identifier("Object"),v.identifier("getPrototypeOf")),[r]))}t.__esModule=!0;var u=r(3),l=i(u),c=r(10),f=i(c),p=r(191),d=i(p),h=r(20),m=n(h),y=r(1),v=n(y),g=(0,f.default)(),b={Function:function(e){e.inShadow("this")||e.skip()},ReturnStatement:function(e,t){e.inShadow("this")||t.returns.push(e)},ThisExpression:function(e,t){e.node[g]||t.thises.push(e)},enter:function(e,t){var r=t.specHandle;t.isLoose&&(r=t.looseHandle);var n=e.isCallExpression()&&e.get("callee").isSuper(),i=r.call(t,e);i&&(t.hasSuper=!0),n&&t.bareSupers.push(e),!0===i&&e.requeue(),!0!==i&&i&&(Array.isArray(i)?e.replaceWithMultiple(i):e.replaceWith(i))}},E=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,l.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath, -this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return v.callExpression(this.file.addHelper("set"),[o(this.getObjectRef(),this.isStatic),r?e:v.stringLiteral(e.name),t,v.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return v.callExpression(this.file.addHelper("get"),[o(this.getObjectRef(),this.isStatic),t?e:v.stringLiteral(e.name),v.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(b,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||v.identifier("Function");return t.property===e?void 0:v.isCallExpression(t,{callee:e})?void 0:v.isMemberExpression(t)&&!r.static?v.memberExpression(n,v.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!v.isMemberExpression(r))return;if(!v.isSuper(r.object))return;return v.appendToMemberExpression(r,v.identifier("call")),t.arguments.unshift(v.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[v.variableDeclaration("var",[v.variableDeclarator(e,r.left)]),v.expressionStatement(v.assignmentExpression("=",r.left,v.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,o=e.node;if(s(o,i))throw e.buildCodeFrameError(m.get("classesIllegalBareSuper"));if(v.isCallExpression(o)){var u=o.callee;if(v.isSuper(u))return;a(u)&&(t=u.property,r=u.computed,n=o.arguments)}else if(v.isMemberExpression(o)&&v.isSuper(o.object))t=o.property,r=o.computed;else{if(v.isUpdateExpression(o)&&a(o.argument)){var l=v.binaryExpression(o.operator[0],o.argument,v.numericLiteral(1));if(o.prefix)return this.specHandleAssignmentExpression(null,e,l);var c=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(c,e,l).concat(v.expressionStatement(c))}if(v.isAssignmentExpression(o)&&a(o.left))return this.specHandleAssignmentExpression(null,e,o)}if(t){var f=this.getSuperProperty(t,r);return n?this.optimiseCall(f,n):f}},e.prototype.optimiseCall=function(e,t){var r=v.thisExpression();return r[g]=!0,(0,d.default)(e,r,t)},e}();t.default=E,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}t.__esModule=!0,t.list=void 0;var s=r(14),a=n(s);t.get=i;var o=r(321),u=n(o);t.list=(0,a.default)(u.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});t.default=i},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("asyncGenerators")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("classConstructorCall")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("classProperties")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("doExpressions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("exponentiationOperator")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("exportExtensions")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("functionBind")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("objectRestSpread")}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(10),o=n(a);t.default=function(e){function t(e){for(var t=e.get("body.body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,s.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if(i=r.next(),i.done)break;a=i.value}var o=a;if("constructorCall"===o.node.kind)return o}return null}function n(e,t){var r=t,n=r.node,s=n.id||t.scope.generateUidIdentifier("class");t.parentPath.isExportDefaultDeclaration()&&(t=t.parentPath,t.insertAfter(i.exportDefaultDeclaration(s))),t.replaceWithMultiple(c({CLASS_REF:t.scope.generateUidIdentifier(s.name),CALL_REF:t.scope.generateUidIdentifier(s.name+"Call"),CALL:i.functionExpression(null,e.node.params,e.node.body),CLASS:i.toExpression(n),WRAPPER_REF:s})),e.remove()}var i=e.types,a=(0,o.default)();return{inherits:r(196),visitor:{Class:function(e){if(!e.node[a]){e.node[a]=!0;var r=t(e);r&&n(r,e)}}}}};var u=r(4),l=n(u),c=(0,l.default)("\n let CLASS_REF = CLASS;\n var CALL_REF = CALL;\n var WRAPPER_REF = function (...args) {\n if (this instanceof WRAPPER_REF) {\n return Reflect.construct(CLASS_REF, args);\n } else {\n return CALL_REF.apply(this, args);\n }\n };\n WRAPPER_REF.__proto__ = CLASS_REF;\n WRAPPER_REF;\n");e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){var t=e.types,n={Super:function(e){e.parentPath.isCallExpression({callee:e.node})&&this.push(e.parentPath)}},i={ReferencedIdentifier:function(e){this.scope.hasOwnBinding(e.node.name)&&(this.collision=!0,e.skip())}},a=(0,l.default)("\n Object.defineProperty(REF, KEY, {\n // configurable is false by default\n enumerable: true,\n writable: true,\n value: VALUE\n });\n "),u=function(e,r){var n=r.key,i=r.value,s=r.computed;return a({REF:e,KEY:t.isIdentifier(n)&&!s?t.stringLiteral(n.name):n,VALUE:i||t.identifier("undefined")})},c=function(e,r){var n=r.key,i=r.value,s=r.computed;return t.expressionStatement(t.assignmentExpression("=",t.memberExpression(e,n,s||t.isLiteral(n)),i))};return{inherits:r(197),visitor:{Class:function(e,r){for(var a=r.opts.spec?u:c,l=!!e.node.superClass,f=void 0,p=[],d=e.get("body"),h=d.get("body"),m=Array.isArray(h),y=0,h=m?h:(0,s.default)(h);;){var v;if(m){if(y>=h.length)break;v=h[y++]}else{if(y=h.next(),y.done)break;v=y.value}var g=v;g.isClassProperty()?p.push(g):g.isClassMethod({kind:"constructor"})&&(f=g)}if(p.length){var b=[],E=void 0;e.isClassExpression()||!e.node.id?((0,o.default)(e),E=e.scope.generateUidIdentifier("class")):E=e.node.id;for(var x=[],A=p,S=Array.isArray(A),_=0,A=S?A:(0,s.default)(A);;){var D;if(S){if(_>=A.length)break;D=A[_++]}else{if(_=A.next(),_.done)break;D=_.value}var C=D,w=C.node;if(!(w.decorators&&w.decorators.length>0)&&(r.opts.spec||w.value)){if(w.static)b.push(a(E,w));else{if(!w.value)continue;x.push(a(t.thisExpression(),w))}}}if(x.length){if(!f){var P=t.classMethod("constructor",t.identifier("constructor"),[],t.blockStatement([]));l&&(P.params=[t.restElement(t.identifier("args"))],P.body.body.push(t.returnStatement(t.callExpression(t.super(),[t.spreadElement(t.identifier("args"))]))));f=d.unshiftContainer("body",P)[0]}for(var k={collision:!1,scope:f.scope},F=p,T=Array.isArray(F),O=0,F=T?F:(0,s.default)(F);;){var B;if(T){if(O>=F.length)break;B=F[O++]}else{if(O=F.next(),O.done)break;B=O.value}if(B.traverse(i,k),k.collision)break}if(k.collision){var R=e.scope.generateUidIdentifier("initialiseProps");b.push(t.variableDeclaration("var",[t.variableDeclarator(R,t.functionExpression(null,[],t.blockStatement(x)))])),x=[t.expressionStatement(t.callExpression(t.memberExpression(R,t.identifier("call")),[t.thisExpression()]))]}if(l){var I=[];f.traverse(n,I);for(var M=I,N=Array.isArray(M),L=0,M=N?M:(0,s.default)(M);;){var j;if(N){if(L>=M.length)break;j=M[L++]}else{if(L=M.next(),L.done)break;j=L.value}j.insertAfter(x)}}else f.get("body").unshiftContainer("body",x)}for(var U=p,V=Array.isArray(U),G=0,U=V?U:(0,s.default)(U);;){var W;if(V){if(G>=U.length)break;W=U[G++]}else{if(G=U.next(),G.done)break;W=G.value}W.remove()}b.length&&(e.isClassExpression()?(e.scope.push({id:E}),e.replaceWith(t.assignmentExpression("=",E,e.node))):(e.node.id||(e.node.id=E),e.parentPath.isExportDeclaration()&&(e=e.parentPath)),e.insertAfter(b))}},ArrowFunctionExpression:function(e){var t=e.get("body");if(t.isClassExpression()){t.get("body").get("body").some(function(e){return e.isClassProperty()})&&e.ensureBlock()}}}}};var a=r(40),o=n(a),u=r(4),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(9),s=n(i),a=r(2),o=n(a);t.default=function(e){function t(e){return e.reverse().map(function(e){return e.expression})}function n(e,r,n){var i=[],a=e.node.decorators;if(a){e.node.decorators=null,a=t(a);for(var l=a,c=Array.isArray(l),f=0,l=c?l:(0,o.default)(l);;){var d;if(c){if(f>=l.length)break;d=l[f++]}else{if(f=l.next(),f.done)break;d=f.value}var h=d;i.push(p({CLASS_REF:r,DECORATOR:h}))}}for(var m=(0,s.default)(null),y=e.get("body.body"),v=Array.isArray(y),g=0,y=v?y:(0,o.default)(y);;){var b;if(v){if(g>=y.length)break;b=y[g++]}else{if(g=y.next(),g.done)break;b=g.value}var E=b;if(E.node.decorators){var x=u.toKeyAlias(E.node);m[x]=m[x]||[],m[x].push(E.node),E.remove()}}for(var A in m){m[A]}return i}function i(e){if(e.isClass()){if(e.node.decorators)return!0;for(var t=e.node.body.body,r=Array.isArray(t),n=0,t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}if(i.decorators)return!0}}else if(e.isObjectExpression())for(var s=e.node.properties,a=Array.isArray(s),u=0,s=a?s:(0,o.default)(s);;){var l;if(a){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l;if(c.decorators)return!0}return!1}function a(e){throw e.buildCodeFrameError('Decorators are not officially supported yet in 6.x pending a proposal update.\nHowever, if you need to use them you can install the legacy decorators transform with:\n\nnpm install babel-plugin-transform-decorators-legacy --save-dev\n\nand add the following line to your .babelrc file:\n\n{\n "plugins": ["transform-decorators-legacy"]\n}\n\nThe repo url is: https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy.\n ')}var u=e.types;return{inherits:r(125),visitor:{ClassExpression:function(e){if(i(e)){a(e),(0,f.default)(e);var t=e.scope.generateDeclaredUidIdentifier("ref"),r=[];r.push(u.assignmentExpression("=",t,e.node)),r=r.concat(n(e,t,this)),r.push(t),e.replaceWith(u.sequenceExpression(r))}},ClassDeclaration:function(e){if(i(e)){a(e),(0,f.default)(e);var t=e.node.id,r=[];r=r.concat(n(e,t,this).map(function(e){return u.expressionStatement(e)})),r.push(u.expressionStatement(t)),e.insertAfter(r)}},ObjectExpression:function(e){i(e)&&a(e)}}}};var u=r(4),l=n(u),c=r(319),f=n(c),p=(0,l.default)("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n");e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(198),visitor:{DoExpression:function(e){var t=e.node.body.body;t.length?e.replaceWithMultiple(t):e.replaceWith(e.scope.buildUndefinedNode())}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var s=r(2),a=i(s),o=r(3),u=i(o),l=r(7),c=r(193),f=i(c),p=r(191),d=i(p),h=r(188),m=n(h),y=r(4),v=i(y),g=r(1),b=n(g),E=(0,v.default)("\n (function () {\n super(...arguments);\n })\n"),x={"FunctionExpression|FunctionDeclaration":function(e){e.is("shadow")||e.skip()},Method:function(e){e.skip()}},A=l.visitors.merge([x,{Super:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.parentPath.isCallExpression({callee:e.node}))throw e.buildCodeFrameError("'super.*' is not allowed before super()")},CallExpression:{exit:function(e){if(e.get("callee").isSuper()&&(this.hasBareSuper=!0,!this.isDerived))throw e.buildCodeFrameError("super() is only allowed in a derived constructor")}},ThisExpression:function(e){if(this.isDerived&&!this.hasBareSuper&&!e.inShadow("this"))throw e.buildCodeFrameError("'this' is not allowed before super()")}}]),S=l.visitors.merge([x,{ThisExpression:function(e){this.superThises.push(e)}}]),_=function(){function e(t,r){(0,u.default)(this,e),this.parent=t.parent,this.scope=t.scope,this.node=t.node,this.path=t,this.file=r,this.clearDescriptors(),this.instancePropBody=[],this.instancePropRefs={},this.staticPropBody=[],this.body=[],this.bareSuperAfter=[],this.bareSupers=[],this.pushedConstructor=!1,this.pushedInherits=!1,this.isLoose=!1,this.superThises=[],this.classId=this.node.id,this.classRef=this.node.id?b.identifier(this.node.id.name):this.scope.generateUidIdentifier("class"),this.superName=this.node.superClass||b.identifier("Function"),this.isDerived=!!this.node.superClass}return e.prototype.run=function(){var e=this,t=this.superName,r=this.file,n=this.body,i=this.constructorBody=b.blockStatement([]);this.constructor=this.buildConstructor();var s=[],a=[];if(this.isDerived&&(a.push(t),t=this.scope.generateUidIdentifierBasedOnNode(t),s.push(t),this.superName=t),this.buildBody(),i.body.unshift(b.expressionStatement(b.callExpression(r.addHelper("classCallCheck"),[b.thisExpression(),this.classRef]))),n=n.concat(this.staticPropBody.map(function(t){return t(e.classRef)})),this.classId&&1===n.length)return b.toExpression(n[0]);n.push(b.returnStatement(this.classRef));var o=b.functionExpression(null,s,b.blockStatement(n));return o.shadow=!0,b.callExpression(o,a)},e.prototype.buildConstructor=function(){var e=b.functionDeclaration(this.classRef,[],this.constructorBody);return b.inherits(e,this.node),e},e.prototype.pushToMap=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=m.push(i,e,r,this.file,n);return t&&(s.enumerable=b.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(e=s.equals("kind","constructor"))break}if(!e){var o=void 0,u=void 0;if(this.isDerived){var l=E().expression;o=l.params,u=l.body}else o=[],u=b.blockStatement([]);this.path.get("body").unshiftContainer("body",b.classMethod("constructor",b.identifier("constructor"),o,u))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),b.inherits(this.constructor,this.userConstructor),b.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=e,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,o=s.node;if(s.isClassProperty())throw s.buildCodeFrameError("Missing class properties transform.");if(o.decorators)throw s.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(b.isClassMethod(o)){var u="constructor"===o.kind;if(u&&(s.traverse(A,this),!this.hasBareSuper&&this.isDerived))throw s.buildCodeFrameError("missing super() call in constructor");var l=new f.default({forceSuperMemoisation:u,methodPath:s,methodNode:o,objectRef:this.classRef,superRef:this.superName,isStatic:o.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),u?this.pushConstructor(l,o,s):this.pushMethod(o,s)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=m.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=m.toClassObject(this.staticMutatorMap)),t||r){t&&(t=m.toComputedObjectFromClass(t)),r&&(r=m.toComputedObjectFromClass(r));var n=b.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a<i.length;a++)i[a]!==n&&(s=a);i=i.slice(0,s+1),e.push(b.expressionStatement(b.callExpression(this.file.addHelper("createClass"),i)))}this.clearDescriptors()},e.prototype.buildObjectAssignment=function(e){return b.variableDeclaration("var",[b.variableDeclarator(e,b.objectExpression([]))])},e.prototype.wrapSuperCall=function(e,t,r,n){var i=e.node;this.isLoose?(i.arguments.unshift(b.thisExpression()),2===i.arguments.length&&b.isSpreadElement(i.arguments[1])&&b.isIdentifier(i.arguments[1].argument,{name:"arguments"})?(i.arguments[1]=i.arguments[1].argument,i.callee=b.memberExpression(t,b.identifier("apply"))):i.callee=b.memberExpression(t,b.identifier("call"))):i=(0,d.default)(b.logicalExpression("||",b.memberExpression(this.classRef,b.identifier("__proto__")),b.callExpression(b.memberExpression(b.identifier("Object"),b.identifier("getPrototypeOf")),[this.classRef])),b.thisExpression(),i.arguments);var s=b.callExpression(this.file.addHelper("possibleConstructorReturn"),[b.thisExpression(),i]),a=this.bareSuperAfter.map(function(e){return e(r)});e.parentPath.isExpressionStatement()&&e.parentPath.container===n.node.body&&n.node.body.length-1===e.parentPath.key?((this.superThises.length||a.length)&&(e.scope.push({id:r}),s=b.assignmentExpression("=",r,s)),a.length&&(s=b.toSequenceExpression([s].concat(a,[r]))),e.parentPath.replaceWith(b.returnStatement(s))):e.replaceWithMultiple([b.variableDeclaration("var",[b.variableDeclarator(r,s)])].concat(a,[b.expressionStatement(r)]))},e.prototype.verifyConstructor=function(){var e=this;if(this.isDerived){var t=this.userConstructorPath,r=t.get("body");t.traverse(S,this);for(var n=!!this.bareSupers.length,i=this.superName||b.identifier("Function"),s=t.scope.generateUidIdentifier("this"),o=this.bareSupers,u=Array.isArray(o),l=0,o=u?o:(0,a.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var f=c;this.wrapSuperCall(f,i,s,r),n&&f.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}for(var p=this.superThises,d=Array.isArray(p),h=0,p=d?p:(0,a.default)(p);;){var m;if(d){if(h>=p.length)break;m=p[h++]}else{if(h=p.next(),h.done)break;m=h.value}m.replaceWith(s)}var y=function(t){return b.callExpression(e.file.addHelper("possibleConstructorReturn"),[s].concat(t||[]))},v=r.get("body");v.length&&!v.pop().isReturnStatement()&&r.pushContainer("body",b.returnStatement(n?s:y()));for(var g=this.superReturns,E=Array.isArray(g),x=0,g=E?g:(0,a.default)(g);;){var A;if(E){if(x>=g.length)break;A=g[x++]}else{if(x=g.next(),x.done)break;A=x.value}var _=A;if(_.node.argument){var D=_.scope.generateDeclaredUidIdentifier("ret");_.get("argument").replaceWithMultiple([b.assignmentExpression("=",D,_.node.argument),y(D)])}else _.get("argument").replaceWith(y())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,b.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,b.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(b.expressionStatement(b.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();t.default=_,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(9),s=n(i),a=r(2),o=n(a),u=r(10),l=n(u);t.default=function(e){var t=e.types,r=(0,l.default)(),n={"AssignmentExpression|UpdateExpression":function(e){if(!e.node[r]){e.node[r]=!0;var n=e.get(e.isAssignmentExpression()?"left":"argument");if(n.isIdentifier()){var i=n.node.name;if(this.scope.getBinding(i)===e.scope.getBinding(i)){var s=this.exports[i];if(s){var a=e.node,u=e.isUpdateExpression()&&!a.prefix;u&&("++"===a.operator?a=t.binaryExpression("+",a.argument,t.numericLiteral(1)):"--"===a.operator?a=t.binaryExpression("-",a.argument,t.numericLiteral(1)):u=!1);for(var l=s,c=Array.isArray(l),f=0,l=c?l:(0,o.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;a=this.buildCall(d,a).expression}u&&(a=t.sequenceExpression([a,e.node])),e.replaceWith(a)}}}}}};return{visitor:{CallExpression:function(e,r){if(e.node.callee.type===y){var n=r.contextIdent;e.replaceWith(t.callExpression(t.memberExpression(n,t.identifier("import")),e.node.arguments))}},ReferencedIdentifier:function(e,r){"__moduleName"!=e.node.name||e.scope.hasBinding("__moduleName")||e.replaceWith(t.memberExpression(r.contextIdent,t.identifier("id")))},Program:{enter:function(e,t){t.contextIdent=e.scope.generateUidIdentifier("context")},exit:function(e,r){function i(e,t){p[e]=p[e]||[],p[e].push(t)}function a(e,t,r){var n=void 0;d.forEach(function(t){t.key===e&&(n=t)}),n||d.push(n={key:e,imports:[],exports:[]}),n[t]=n[t].concat(r)}function u(e,r){return t.expressionStatement(t.callExpression(l,[t.stringLiteral(e),r]))}for(var l=e.scope.generateUidIdentifier("export"),c=r.contextIdent,p=(0,s.default)(null),d=[],y=[],v=[],g=[],b=[],E=[],x=e.get("body"),A=!0,S=x,_=Array.isArray(S),D=0,S=_?S:(0,o.default)(S);;){var C;if(_){if(D>=S.length)break;C=S[D++]}else{if(D=S.next(),D.done)break;C=D.value}var w=C;if(w.isExportDeclaration()&&(w=w.get("declaration")),w.isVariableDeclaration()&&"var"!==w.node.kind){A=!1;break}}for(var P=x,k=Array.isArray(P),F=0,P=k?P:(0,o.default)(P);;){var T;if(k){if(F>=P.length)break;T=P[F++]}else{if(F=P.next(),F.done)break;T=F.value}var O=T;if(A&&O.isFunctionDeclaration())y.push(O.node),E.push(O);else if(O.isImportDeclaration()){var B=O.node.source.value;a(B,"imports",O.node.specifiers);for(var R in O.getBindingIdentifiers())O.scope.removeBinding(R),b.push(t.identifier(R));O.remove()}else if(O.isExportAllDeclaration())a(O.node.source.value,"exports",O.node),O.remove();else if(O.isExportDefaultDeclaration()){var I=O.get("declaration");if(I.isClassDeclaration()||I.isFunctionDeclaration()){var M=I.node.id,N=[];M?(N.push(I.node),N.push(u("default",M)),i(M.name,"default")):N.push(u("default",t.toExpression(I.node))),!A||I.isClassDeclaration()?O.replaceWithMultiple(N):(y=y.concat(N),E.push(O))}else O.replaceWith(u("default",I.node))}else if(O.isExportNamedDeclaration()){var L=O.get("declaration");if(L.node){O.replaceWith(L);var j=[],U=void 0;if(O.isFunction()){var V=L.node,G=V.id.name;if(A)i(G,G),y.push(V),y.push(u(G,V.id)),E.push(O);else{var W;W={},W[G]=V.id,U=W}}else U=L.getBindingIdentifiers();for(var Y in U)i(Y,Y),j.push(u(Y,t.identifier(Y)));O.insertAfter(j)}else{var q=O.node.specifiers;if(q&&q.length)if(O.node.source)a(O.node.source.value,"exports",q),O.remove();else{for(var K=[],H=q,J=Array.isArray(H),X=0,H=J?H:(0,o.default)(H);;){var z;if(J){if(X>=H.length)break;z=H[X++]}else{if(X=H.next(),X.done)break;z=X.value}var $=z;K.push(u($.exported.name,$.local)),i($.local.name,$.exported.name)}O.replaceWithMultiple(K)}}}}d.forEach(function(r){for(var n=[],i=e.scope.generateUidIdentifier(r.key),s=r.imports,a=Array.isArray(s),u=0,s=a?s:(0,o.default)(s);;){var c;if(a){if(u>=s.length)break;c=s[u++]}else{if(u=s.next(),u.done)break;c=u.value}var f=c;t.isImportNamespaceSpecifier(f)?n.push(t.expressionStatement(t.assignmentExpression("=",f.local,i))):t.isImportDefaultSpecifier(f)&&(f=t.importSpecifier(f.local,t.identifier("default"))),t.isImportSpecifier(f)&&n.push(t.expressionStatement(t.assignmentExpression("=",f.local,t.memberExpression(i,f.imported))))}if(r.exports.length){var p=e.scope.generateUidIdentifier("exportObj");n.push(t.variableDeclaration("var",[t.variableDeclarator(p,t.objectExpression([]))]));for(var d=r.exports,h=Array.isArray(d),y=0,d=h?d:(0,o.default)(d);;){var b;if(h){if(y>=d.length)break;b=d[y++]}else{if(y=d.next(),y.done)break;b=y.value}var E=b;t.isExportAllDeclaration(E)?n.push(m({KEY:e.scope.generateUidIdentifier("key"),EXPORT_OBJ:p,TARGET:i})):t.isExportSpecifier(E)&&n.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(p,E.exported),t.memberExpression(i,E.local))))}n.push(t.expressionStatement(t.callExpression(l,[p])))}g.push(t.stringLiteral(r.key)),v.push(t.functionExpression(null,[i],t.blockStatement(n)))});var Q=this.getModuleName();Q&&(Q=t.stringLiteral(Q)),A&&(0,f.default)(e,function(e){return b.push(e)}),b.length&&y.unshift(t.variableDeclaration("var",b.map(function(e){return t.variableDeclarator(e)}))),e.traverse(n,{exports:p,buildCall:u,scope:e.scope});for(var Z=E,ee=Array.isArray(Z),te=0,Z=ee?Z:(0,o.default)(Z);;){var re;if(ee){if(te>=Z.length)break;re=Z[te++]}else{if(te=Z.next(),te.done)break;re=te.value}re.remove()}e.node.body=[h({SYSTEM_REGISTER:t.memberExpression(t.identifier(r.opts.systemGlobal||"System"),t.identifier("register")),BEFORE_BODY:y,MODULE_NAME:Q,SETTERS:v,SOURCES:g,BODY:e.node.body,EXPORT_IDENTIFIER:l,CONTEXT_IDENTIFIER:c})]}}}}};var c=r(190),f=n(c),p=r(4),d=n(p),h=(0,d.default)('\n SYSTEM_REGISTER(MODULE_NAME, [SOURCES], function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n "use strict";\n BEFORE_BODY;\n return {\n setters: [SETTERS],\n execute: function () {\n BODY;\n }\n };\n });\n'),m=(0,d.default)('\n for (var KEY in TARGET) {\n if (KEY !== "default" && KEY !== "__esModule") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n'),y="Import";e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e){if(e.isExpressionStatement()){var t=e.get("expression");if(!t.isCallExpression())return!1;if(!t.get("callee").isIdentifier({name:"define"}))return!1;var r=t.get("arguments");return!(3===r.length&&!r.shift().isStringLiteral())&&(2===r.length&&(!!r.shift().isArrayExpression()&&!!r.shift().isFunctionExpression()))}}var i=e.types;return{inherits:r(131),visitor:{Program:{exit:function(e,r){var s=e.get("body").pop();if(t(s)){var l=s.node.expression,c=l.arguments,f=3===c.length?c.shift():null,p=l.arguments[0],d=l.arguments[1],h=r.opts.globals||{},m=p.elements.map(function(e){return"module"===e.value||"exports"===e.value?i.identifier(e.value):i.callExpression(i.identifier("require"),[e])}),y=p.elements.map(function(e){if("module"===e.value)return i.identifier("mod");if("exports"===e.value)return i.memberExpression(i.identifier("mod"),i.identifier("exports"));var t=void 0;if(r.opts.exactGlobals){var s=h[e.value];t=s?s.split(".").reduce(function(e,t){return i.memberExpression(e,i.identifier(t))},i.identifier("global")):i.memberExpression(i.identifier("global"),i.identifier(i.toIdentifier(e.value)))}else{var a=(0,n.basename)(e.value,(0,n.extname)(e.value)),o=h[a]||a;t=i.memberExpression(i.identifier("global"),i.identifier(i.toIdentifier(o)))}return t}),v=f?f.value:this.file.opts.basename,g=i.memberExpression(i.identifier("global"),i.identifier(i.toIdentifier(v))),b=null;if(r.opts.exactGlobals){var E=h[v];if(E){b=[];var x=E.split(".");g=x.slice(1).reduce(function(e,t){return b.push(a({GLOBAL_REFERENCE:e})),i.memberExpression(e,i.identifier(t))},i.memberExpression(i.identifier("global"),i.identifier(x[0])))}}var A=o({BROWSER_ARGUMENTS:y,PREREQUISITE_ASSIGNMENTS:b,GLOBAL_TO_ASSIGN:g});s.replaceWith(u({MODULE_NAME:f,AMD_ARGUMENTS:p,COMMON_ARGUMENTS:m,GLOBAL_EXPORT:A,FUNC:d}))}}}}}};var n=r(19),i=r(4),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=(0,s.default)("\n GLOBAL_REFERENCE = GLOBAL_REFERENCE || {}\n"),o=(0,s.default)("\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n PREREQUISITE_ASSIGNMENTS\n GLOBAL_TO_ASSIGN = mod.exports;\n"),u=(0,s.default)('\n (function (global, factory) {\n if (typeof define === "function" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== "undefined") {\n factory(COMMON_ARGUMENTS);\n } else {\n GLOBAL_EXPORT\n }\n })(this, FUNC);\n');e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e,r,i){var s=e.specifiers[0];if(n.isExportNamespaceSpecifier(s)||n.isExportDefaultSpecifier(s)){var a=e.specifiers.shift(),o=i.generateUidIdentifier(a.exported.name),u=void 0;u=n.isExportNamespaceSpecifier(a)?n.importNamespaceSpecifier(o):n.importDefaultSpecifier(o),r.push(n.importDeclaration([u],e.source)),r.push(n.exportNamedDeclaration(null,[n.exportSpecifier(o,a.exported)])),t(e,r,i)}}var n=e.types;return{inherits:r(200),visitor:{ExportNamedDeclaration:function(e){var r=e.node,n=e.scope,i=[];t(r,i,n),i.length&&(r.specifiers.length>=1&&i.push(r),e.replaceWithMultiple(i))}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){var t=e.types;return{inherits:r(126),visitor:{Program:function(e,t){for(var r=t.file.ast.comments,n=r,s=Array.isArray(n),a=0,n=s?n:(0,i.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;u.value.indexOf("@flow")>=0&&(u.value=u.value.replace("@flow",""),u.value.replace(/\*/g,"").trim()||(u.ignore=!0))}},Flow:function(e){e.remove()},ClassProperty:function(e){e.node.variance=null,e.node.typeAnnotation=null,e.node.value||e.remove()},Class:function(e){e.node.implements=null,e.get("body.body").forEach(function(e){e.isClassProperty()&&(e.node.typeAnnotation=null,e.node.value||e.remove())})},AssignmentPattern:function(e){e.node.left.optional=!1},Function:function(e){for(var t=e.node,r=0;r<t.params.length;r++){t.params[r].optional=!1}},TypeCastExpression:function(e){var r=e.node;do{r=r.expression}while(t.isTypeCastExpression(r));e.replaceWith(r)}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e){var t=e.path.getData("functionBind");return t||(t=e.generateDeclaredUidIdentifier("context"),e.path.setData("functionBind",t))}function n(e,t){var r=e.object||e.callee.object;return t.isStatic(r)&&r}function i(e,r){var i=n(e,r);if(i)return i;var a=t(r);return e.object?e.callee=s.sequenceExpression([s.assignmentExpression("=",a,e.object),e.callee]):e.callee.object=s.assignmentExpression("=",a,e.callee.object),a}var s=e.types;return{inherits:r(201),visitor:{CallExpression:function(e){var t=e.node,r=e.scope,n=t.callee;if(s.isBindExpression(n)){var a=i(n,r);t.callee=s.memberExpression(n.callee,s.identifier("call")),t.arguments.unshift(a)}},BindExpression:function(e){ -var t=e.node,r=e.scope,n=i(t,r);e.replaceWith(s.callExpression(s.memberExpression(t.callee,s.identifier("bind")),[n]))}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e){var t=!1;return e.traverse({RestProperty:function(){t=!0,e.stop()}}),t}function n(e){for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if(n=t.next(),n.done)break;s=n.value}var a=s;if(o.isSpreadProperty(a))return!0}return!1}function s(e,t,r){for(var n=t.pop(),s=[],a=t,u=Array.isArray(a),l=0,a=u?a:(0,i.default)(a);;){var c;if(u){if(l>=a.length)break;c=a[l++]}else{if(l=a.next(),l.done)break;c=l.value}var f=c,p=f.key;o.isIdentifier(p)&&!f.computed&&(p=o.stringLiteral(f.key.name)),s.push(p)}return[n.argument,o.callExpression(e.addHelper("objectWithoutProperties"),[r,o.arrayExpression(s)])]}function a(e,r,n,i){if(r.isAssignmentPattern())return void a(e,r.get("left"),n,i);if(r.isObjectPattern()&&t(r)){var s=e.scope.generateUidIdentifier("ref"),u=o.variableDeclaration("let",[o.variableDeclarator(r.node,s)]);u._blockHoist=n?i-n:1,e.ensureBlock(),e.get("body").unshiftContainer("body",u),r.replaceWith(s)}}var o=e.types;return{inherits:r(202),visitor:{Function:function(e){for(var t=e.get("params"),r=0;r<t.length;r++)a(t[r].parentPath,t[r],r,t.length)},VariableDeclarator:function(e,t){if(e.get("id").isObjectPattern()){var r=e;e.get("id").traverse({RestProperty:function(e){if(this.originalPath.node.id.properties.length>1&&!o.isIdentifier(this.originalPath.node.init)){var n=e.scope.generateUidIdentifierBasedOnNode(this.originalPath.node.init,"ref");return this.originalPath.insertBefore(o.variableDeclarator(n,this.originalPath.node.init)),void this.originalPath.replaceWith(o.variableDeclarator(this.originalPath.node.id,n))}var i=this.originalPath.node.init,a=[];e.findParent(function(e){if(e.isObjectProperty())a.unshift(e.node.key.name);else if(e.isVariableDeclarator())return!0}),a.length&&a.forEach(function(e){i=o.memberExpression(i,o.identifier(e))});var u=s(t,e.parentPath.node.properties,i),l=u[0],c=u[1];r.insertAfter(o.variableDeclarator(l,c)),r=r.getSibling(r.key+1),0===e.parentPath.node.properties.length&&e.findParent(function(e){return e.isObjectProperty()||e.isVariableDeclarator()}).remove()}},{originalPath:e})}},ExportNamedDeclaration:function(e){var r=e.get("declaration");if(r.isVariableDeclaration()&&t(r)){var n=[];for(var i in e.getOuterBindingIdentifiers(e)){var s=o.identifier(i);n.push(o.exportSpecifier(s,s))}e.replaceWith(r.node),e.insertAfter(o.exportNamedDeclaration(null,n))}},CatchClause:function(e){var t=e.get("param");a(t.parentPath,t)},AssignmentExpression:function(e,r){var n=e.get("left");if(n.isObjectPattern()&&t(n)){var i=[],a=void 0;(e.isCompletionRecord()||e.parentPath.isExpressionStatement())&&(a=e.scope.generateUidIdentifierBasedOnNode(e.node.right,"ref"),i.push(o.variableDeclaration("var",[o.variableDeclarator(a,e.node.right)])));var u=s(r,e.node.left.properties,a),l=u[0],c=u[1],f=o.clone(e.node);f.right=a,i.push(o.expressionStatement(f)),i.push(o.toStatement(o.assignmentExpression("=",l,c))),a&&i.push(o.expressionStatement(a)),e.replaceWithMultiple(i)}},ForXStatement:function(e){var r=e.node,n=e.scope,i=e.get("left"),s=r.left;if(o.isObjectPattern(s)&&t(i)){var a=n.generateUidIdentifier("ref");return r.left=o.variableDeclaration("var",[o.variableDeclarator(a)]),e.ensureBlock(),void r.body.body.unshift(o.variableDeclaration("var",[o.variableDeclarator(s,a)]))}if(o.isVariableDeclaration(s)){var u=s.declarations[0].id;if(o.isObjectPattern(u)){var l=n.generateUidIdentifier("ref");r.left=o.variableDeclaration(s.kind,[o.variableDeclarator(l,null)]),e.ensureBlock(),r.body.body.unshift(o.variableDeclaration(r.left.kind,[o.variableDeclarator(u,l)]))}}},ObjectExpression:function(e,t){function r(){u.length&&(a.push(o.objectExpression(u)),u=[])}if(n(e.node)){var s=t.opts.useBuiltIns||!1;if("boolean"!=typeof s)throw new Error("transform-object-rest-spread currently only accepts a boolean option for useBuiltIns (defaults to false)");for(var a=[],u=[],l=e.node.properties,c=Array.isArray(l),f=0,l=c?l:(0,i.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}var d=p;o.isSpreadProperty(d)?(r(),a.push(d.argument)):u.push(d)}r(),o.isObjectExpression(a[0])||a.unshift(o.objectExpression([]));var h=s?o.memberExpression(o.identifier("Object"),o.identifier("assign")):t.addHelper("extends");e.replaceWith(o.callExpression(h,a))}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){for(var r=t.arguments[0].properties,i=!0,s=0;s<r.length;s++){var a=r[s],o=n.toComputedKey(a);if(n.isLiteral(o,{value:"displayName"})){i=!1;break}}i&&r.unshift(n.objectProperty(n.identifier("displayName"),n.stringLiteral(e)))}function r(e){if(!e||!n.isCallExpression(e))return!1;if(!s(e.callee)&&!a(e.callee))return!1;var t=e.arguments;if(1!==t.length)return!1;var r=t[0];return!!n.isObjectExpression(r)}var n=e.types,s=n.buildMatchMemberExpression("React.createClass"),a=function(e){return"createReactClass"===e.name};return{visitor:{ExportDefaultDeclaration:function(e,n){var s=e.node;if(r(s.declaration)){var a=n.file.opts.basename;"index"===a&&(a=i.default.basename(i.default.dirname(n.file.opts.filename))),t(a,s.declaration)}},CallExpression:function(e){var i=e.node;if(r(i)){var s=void 0;e.find(function(e){if(e.isAssignmentExpression())s=e.node.left;else if(e.isObjectProperty())s=e.node.key;else if(e.isVariableDeclarator())s=e.node.id;else if(e.isStatement())return!0;if(s)return!0}),s&&(n.isMemberExpression(s)&&(s=s.property),n.isIdentifier(s)&&t(s.name,i))}}}}};var n=r(19),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){var t=e.types,r=/\*?\s*@jsx\s+([^\s]+)/,n=(0,l.default)({pre:function(e){var r=e.tagName,n=e.args;t.react.isCompatTag(r)?n.push(t.stringLiteral(r)):n.push(e.tagExpr)},post:function(e,t){e.callee=t.get("jsxIdentifier")()}});return n.Program=function(e,n){for(var i=n.file,a=n.opts.pragma||"React.createElement",o=i.ast.comments,u=Array.isArray(o),l=0,o=u?o:(0,s.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var f=c,p=r.exec(f.value);if(p){if("React.DOM"===(a=p[1]))throw i.buildCodeFrameError(f,"The @jsx React.DOM pragma has been deprecated as of React 0.12");break}}n.set("jsxIdentifier",function(){return a.split(".").map(function(e){return t.identifier(e)}).reduce(function(e,r){return t.memberExpression(e,r)})})},{inherits:o.default,visitor:n}};var a=r(127),o=n(a),u=r(351),l=n(u);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(){return{visitor:{Program:function(e,t){if(!1!==t.opts.strict&&!1!==t.opts.strictMode){for(var r=e.node,n=r.directives,s=Array.isArray(n),o=0,n=s?n:(0,i.default)(n);;){var u;if(s){if(o>=n.length)break;u=n[o++]}else{if(o=n.next(),o.done)break;u=o.value}if("use strict"===u.value.value)return}e.unshiftContainer("directives",a.directive(a.directiveLiteral("use strict")))}}}}};var s=r(1),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=["commonjs","amd","umd","systemjs"],n=!1,i="commonjs",s=!1;if(void 0!==t&&(void 0!==t.loose&&(n=t.loose),void 0!==t.modules&&(i=t.modules),void 0!==t.spec&&(s=t.spec)),"boolean"!=typeof n)throw new Error("Preset es2015 'loose' option must be a boolean.");if("boolean"!=typeof s)throw new Error("Preset es2015 'spec' option must be a boolean.");if(!1!==i&&-1===r.indexOf(i))throw new Error("Preset es2015 'modules' option must be 'false' to indicate no modules\nor a module type which be be one of: 'commonjs' (default), 'amd', 'umd', 'systemjs'");var o={loose:n};return{plugins:[[a.default,{loose:n,spec:s}],u.default,c.default,[p.default,{spec:s}],h.default,[y.default,o],g.default,E.default,A.default,[_.default,o],[C.default,o],P.default,F.default,O.default,[R.default,o],M.default,[L.default,o],U.default,G.default,"commonjs"===i&&[Y.default,o],"systemjs"===i&&[K.default,o],"amd"===i&&[J.default,o],"umd"===i&&[z.default,o],[Q.default,{async:!1,asyncGenerators:!1}]].filter(Boolean)}}t.__esModule=!0;var s=r(83),a=n(s),o=r(76),u=n(o),l=r(75),c=n(l),f=r(68),p=n(f),d=r(69),h=n(d),m=r(71),y=n(m),v=r(78),g=n(v),b=r(80),E=n(b),x=r(130),A=n(x),S=r(72),_=n(S),D=r(74),C=n(D),w=r(82),P=n(w),k=r(85),F=n(k),T=r(66),O=n(T),B=r(81),R=n(B),I=r(79),M=n(I),N=r(73),L=n(N),j=r(70),U=n(j),V=r(84),G=n(V),W=r(77),Y=n(W),q=r(208),K=n(q),H=r(131),J=n(H),X=r(209),z=n(X),$=r(86),Q=n($),Z=i({});t.default=Z,Object.defineProperty(Z,"buildPreset",{configurable:!0,writable:!0,enumerable:!1,value:i}),e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(132),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={plugins:[i.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(128),s=n(i),a=r(129),o=n(a);t.default={plugins:[s.default,o.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(221),s=n(i),a=r(203),o=n(a),u=r(210),l=n(u);t.default={presets:[s.default],plugins:[o.default,l.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(222),s=n(i),a=r(204),o=n(a),u=r(205),l=n(u),c=r(324),f=n(c);t.default={presets:[s.default],plugins:[f.default,o.default,l.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(128),s=n(i),a=r(129),o=n(a),u=r(132),l=n(u),c=r(213),f=n(c),p=r(327),d=n(p);t.default={plugins:[s.default,o.default,l.default,d.default,f.default]},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(3),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function e(t,r){(0,i.default)(this,e),this.file=t,this.options=r};t.default=s,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.Flow=t.Pure=t.Generated=t.User=t.Var=t.BlockScoped=t.Referenced=t.Scope=t.Expression=t.Statement=t.BindingIdentifier=t.ReferencedMemberExpression=t.ReferencedIdentifier=void 0;var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},t.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},t.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},t.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},t.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},t.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},t.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},t.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},t.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},t.User={checkPath:function(e){return e.node&&!!e.node.loc}},t.Generated={checkPath:function(e){return!e.isUser()}},t.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},t.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},function(e,t,r){"use strict";t.__esModule=!0;var n=r(3),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(){function e(t){var r=t.existing,n=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,i.default)(this,e),this.identifier=n,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();t.default=s,e.exports=t.default},function(e,t,r){"use strict";function n(e,t,r){for(var n=[].concat(e),i=(0,a.default)(null);n.length;){var s=n.shift();if(s){var o=u.getBindingIdentifiers.keys[s.type];if(u.isIdentifier(s))if(t){var l=i[s.name]=i[s.name]||[];l.push(s)}else i[s.name]=s;else if(u.isExportDeclaration(s))u.isDeclaration(s.declaration)&&n.push(s.declaration);else{if(r){if(u.isFunctionDeclaration(s)){n.push(s.id);continue}if(u.isFunctionExpression(s))continue}if(o)for(var c=0;c<o.length;c++){var f=o[c];s[f]&&(n=n.concat(s[f]))}}}}return i}function i(e,t){return n(e,t,!0)}t.__esModule=!0;var s=r(9),a=function(e){return e&&e.__esModule?e:{default:e}}(s);t.getBindingIdentifiers=n,t.getOuterBindingIdentifiers=i;var o=r(1),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o);n.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],RestProperty:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";var n=r(138),i=r(13)("toStringTag"),s="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),i))?r:s?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,r){"use strict";var n=r(146),i=r(57).getWeak,s=r(21),a=r(16),o=r(136),u=r(55),l=r(137),c=r(28),f=r(58),p=l(5),d=l(6),h=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},v=function(e,t){return p(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var r=v(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=d(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._t=t,e._i=h++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(f(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(f(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?m(e).set(t,r):n[e._i]=r,e},ufstore:m}},function(e,t,r){"use strict";var n=r(16),i=r(15).document,s=n(i)&&n(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},function(e,t,r){"use strict";e.exports=!r(22)&&!r(27)(function(){return 7!=Object.defineProperty(r(230)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(138);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t){"use strict";e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){"use strict";var n=r(44),i=r(145),s=r(91),a=r(94),o=r(142),u=Object.assign;e.exports=!u||r(27)(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,f=s.f;u>l;)for(var p,d=o(arguments[l++]),h=c?n(d).concat(c(d)):n(d),m=h.length,y=0;m>y;)f.call(d,p=h[y++])&&(r[p]=d[p]);return r}:u},function(e,t,r){"use strict";var n=r(91),i=r(92),s=r(37),a=r(154),o=r(28),u=r(231),l=Object.getOwnPropertyDescriptor;t.f=r(22)?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(o(e,t))return i(!n.f.call(e,t),e[t])}},function(e,t,r){"use strict";var n=r(237),i=r(141).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(28),i=r(37),s=r(420)(!1),a=r(150)("IE_PROTO");e.exports=function(e,t){var r,o=i(e),u=0,l=[];for(r in o)r!=a&&n(o,r)&&l.push(r);for(;t.length>u;)n(o,r=t[u++])&&(~s(l,r)||l.push(r));return l}},function(e,t,r){"use strict";var n=r(228),i=r(13)("iterator"),s=r(56);e.exports=r(5).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||s[n(e)]}},function(e,t,r){(function(n){"use strict";function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))}),e.splice(s,0,n)}}function a(){return"object"===("undefined"==typeof console?"undefined":l(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t=e.exports=r(458),t.log=a,t.formatArgs=s,t.save=o,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(t,r(8))},function(e,t){"use strict";!function(){function t(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function n(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&d.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}function o(e){return e<128?h[e]:p.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?h[e]:f.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?m[e]:f.NonAsciiIdentifierPart.test(a(e))}var f,p,d,h,m,y;for(p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},f={ -NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},d=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],h=new Array(128),y=0;y<128;++y)h[y]=y>=97&&y<=122||y>=65&&y<=90||36===y||95===y;for(m=new Array(128),y=0;y<128;++y)m[y]=y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||36===y||95===y;e.exports={isDecimalDigit:t,isHexDigit:r,isOctalDigit:n,isWhiteSpace:i,isLineTerminator:s,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:l,isIdentifierPartES6:c}}()},function(e,t,r){"use strict";var n=r(38),i=r(17),s=n(i,"Set");e.exports=s},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new i;++t<r;)this.add(e[t])}var i=r(160),s=r(561),a=r(562);n.prototype.add=n.prototype.push=s,n.prototype.has=a,e.exports=n},function(e,t,r){"use strict";var n=r(17),i=n.Uint8Array;e.exports=i},function(e,t){"use strict";function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=r},function(e,t,r){"use strict";function n(e,t){var r=a(e),n=!r&&s(e),c=!r&&!n&&o(e),p=!r&&!n&&!c&&l(e),d=r||n||c||p,h=d?i(e.length,String):[],m=h.length;for(var y in e)!t&&!f.call(e,y)||d&&("length"==y||c&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,m))||h.push(y);return h}var i=r(513),s=r(112),a=r(6),o=r(113),u=r(171),l=r(177),c=Object.prototype,f=c.hasOwnProperty;e.exports=n},function(e,t){"use strict";function r(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}e.exports=r},function(e,t,r){"use strict";function n(e,t,r){(void 0===r||s(e[t],r))&&(void 0!==r||t in e)||i(e,t,r)}var i=r(163),s=r(46);e.exports=n},function(e,t,r){"use strict";var n=r(527),i=n();e.exports=i},function(e,t,r){"use strict";function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[s(t[r++])];return r&&r==n?e:void 0}var i=r(255),s=r(108);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=t(e);return s(e)?n:i(n,r(e))}var i=r(161),s=r(6);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,a,o){return e===t||(null==e||null==t||!s(e)&&!s(t)?e!==e&&t!==t:i(e,t,r,a,n,o))}var i=r(494),s=r(25);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=-1,n=s(e)?Array(e.length):[];return i(e,function(e,i,s){n[++r]=t(e,i,s)}),n}var i=r(487),s=r(24);e.exports=n},function(e,t,r){"use strict";function n(e){if("string"==typeof e)return e;if(a(e))return s(e,n)+"";if(o(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=r(45),s=r(60),a=r(6),o=r(62),u=1/0,l=i?i.prototype:void 0,c=l?l.toString:void 0;e.exports=n},function(e,t){"use strict";function r(e,t){return e.has(t)}e.exports=r},function(e,t,r){"use strict";function n(e,t){return i(e)?e:s(e,t)?[e]:a(o(e))}var i=r(6),s=r(173),a=r(571),o=r(114);e.exports=n},function(e,t,r){(function(e){"use strict";function n(e,t){if(t)return e.slice();var r=e.length,n=c?c(r):new e.constructor(r);return e.copy(n),n}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=r(17),a="object"==i(t)&&t&&!t.nodeType&&t,o=a&&"object"==i(e)&&e&&!e.nodeType&&e,u=o&&o.exports===a,l=u?s.Buffer:void 0,c=l?l.allocUnsafe:void 0;e.exports=n}).call(t,r(39)(e))},function(e,t,r){"use strict";function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var i=r(167);e.exports=n},function(e,t,r){"use strict";function n(e){return function(t,r,n){var o=Object(t);if(!s(t)){var u=i(r,3);t=a(t),r=function(e){return u(o[e],e,o)}}var l=e(t,r,n);return l>-1?o[u?t[l]:l]:void 0}}var i=r(61),s=r(24),a=r(32);e.exports=n},function(e,t,r){"use strict";var n=r(38),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t,r){"use strict";function n(e,t,r,n,l,c){var f=r&o,p=e.length,d=t.length;if(p!=d&&!(f&&d>p))return!1;var h=c.get(e);if(h&&c.get(t))return h==t;var m=-1,y=!0,v=r&u?new i:void 0;for(c.set(e,t),c.set(t,e);++m<p;){var g=e[m],b=t[m];if(n)var E=f?n(b,g,m,t,e,c):n(g,b,m,e,t,c);if(void 0!==E){if(E)continue;y=!1;break}if(v){if(!s(t,function(e,t){if(!a(v,t)&&(g===e||l(g,e,r,n,c)))return v.push(t)})){y=!1;break}}else if(g!==b&&!l(g,b,r,n,c)){y=!1;break}}return c.delete(e),c.delete(t),y}var i=r(242),s=r(482),a=r(254),o=1,u=2;e.exports=n},function(e,t){(function(t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"==(void 0===t?"undefined":r(t))&&t&&t.Object===Object&&t;e.exports=n}).call(t,function(){return this}())},function(e,t,r){"use strict";function n(e){return i(e,a,s)}var i=r(250),s=r(170),a=r(32);e.exports=n},function(e,t,r){"use strict";var n=r(161),i=r(169),s=r(170),a=r(279),o=Object.getOwnPropertySymbols,u=o?function(e){for(var t=[];e;)n(t,s(e)),e=i(e);return t}:a;e.exports=u},function(e,t,r){"use strict";var n=r(472),i=r(159),s=r(474),a=r(241),o=r(475),u=r(30),l=r(272),c=l(n),f=l(i),p=l(s),d=l(a),h=l(o),m=u;(n&&"[object DataView]"!=m(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||s&&"[object Promise]"!=m(s.resolve())||a&&"[object Set]"!=m(new a)||o&&"[object WeakMap]"!=m(new o))&&(m=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case c:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,r){"use strict";function n(e,t,r){t=i(t,e);for(var n=-1,c=t.length,f=!1;++n<c;){var p=l(t[n]);if(!(f=null!=e&&r(e,p)))break;e=e[p]}return f||++n!=c?f:!!(c=null==e?0:e.length)&&u(c)&&o(p,c)&&(a(e)||s(e))}var i=r(255),s=r(112),a=r(6),o=r(171),u=r(176),l=r(108);e.exports=n},function(e,t,r){"use strict";function n(e){return"function"!=typeof e.constructor||a(e)?{}:i(s(e))}var i=r(486),s=r(169),a=r(105);e.exports=n},function(e,t,r){"use strict";function n(e){return e===e&&!i(e)}var i=r(18);e.exports=n},function(e,t){"use strict";function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}e.exports=r},function(e,t){"use strict";function r(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}e.exports=r},function(e,t,r){(function(e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(261),s="object"==n(t)&&t&&!t.nodeType&&t,a=s&&"object"==n(e)&&e&&!e.nodeType&&e,o=a&&a.exports===s,u=o&&i.process,l=function(){try{return u&&u.binding&&u.binding("util")}catch(e){}}();e.exports=l}).call(t,r(39)(e))},function(e,t){"use strict";function r(e,t){return function(r){return e(t(r))}}e.exports=r},function(e,t){"use strict";function r(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var n=Function.prototype,i=n.toString;e.exports=r},function(e,t,r){"use strict";var n=r(244),i=r(573),s=r(101),a=r(529),o=s(function(e){return e.push(void 0,a),n(i,void 0,e)});e.exports=o},function(e,t,r){"use strict";function n(e,t){return null!=e&&s(e,t,i)}var i=r(490),s=r(265);e.exports=n},function(e,t,r){"use strict";function n(e){if(!a(e)||i(e)!=o)return!1;var t=s(e);if(null===t)return!0;var r=f.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==p}var i=r(30),s=r(169),a=r(25),o="[object Object]",u=Function.prototype,l=Object.prototype,c=u.toString,f=l.hasOwnProperty,p=c.call(Object);e.exports=n},function(e,t,r){"use strict";var n=r(498),i=r(102),s=r(270),a=s&&s.isRegExp,o=a?i(a):n;e.exports=o},function(e,t,r){"use strict";var n=r(101),i=r(593),s=n(i);e.exports=s},function(e,t,r){"use strict";function n(e,t,r){return t=(r?s(e,t,r):void 0===t)?1:a(t),i(o(e),t)}var i=r(510),s=r(172),a=r(48),o=r(114);e.exports=n},function(e,t){"use strict";function r(){return[]}e.exports=r},function(e,t,r){"use strict";function n(e){return null==e?[]:i(e,s(e))}var i=r(515),s=r(32);e.exports=n},function(e,t){"use strict";function r(e,t,r){if(c)try{c.call(l,e,t,{value:r})}catch(n){e[t]=r}else e[t]=r}function n(e){return e&&(r(e,"call",e.call),r(e,"apply",e.apply)),e}function i(e){return f?f.call(l,e):(m.prototype=e||null,new m)}function s(){do{var e=a(h.call(d.call(y(),36),2))}while(p.call(v,e));return v[e]=e}function a(e){var t={};return t[e]=!0,Object.keys(t)[0]}function o(e){return i(null)}function u(e){function t(t){function n(r,n){if(r===u)return n?i=null:i||(i=e(t))}var i;r(t,a,n)}function n(e){return p.call(e,a)||t(e),e[a](u)}var a=s(),u=i(null);return e=e||o,n.forget=function(e){p.call(e,a)&&e[a](u,!0)},n}var l=Object,c=Object.defineProperty,f=Object.create;n(c),n(f);var p=n(Object.prototype.hasOwnProperty),d=n(Number.prototype.toString),h=n(String.prototype.slice),m=function(){},y=Math.random,v=i(null);t.makeUniqueKey=s;var g=Object.getOwnPropertyNames;Object.getOwnPropertyNames=function(e){for(var t=g(e),r=0,n=0,i=t.length;r<i;++r)p.call(v,t[r])||(r>n&&(t[n]=t[r]),++n);return t.length=n,t},t.makeAccessor=u},function(e,t,r){var n;(function(e,i){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a){var o="object"==s(t)&&t,u="object"==s(e)&&e&&e.exports==o&&e,l="object"==(void 0===i?"undefined":s(i))&&i;l.global!==l&&l.window!==l||(a=l);var c={rangeOrder:"A range’s `stop` value must be greater than or equal to the `start` value.",codePointRange:"Invalid code point value. Code points range from U+000000 to U+10FFFF."},f=/\\x00([^0123456789]|$)/g,p={},d=p.hasOwnProperty,h=function(e,t){for(var r=-1,n=e.length;++r<n;)t(e[r],r)},m=p.toString,y=function(e){return"[object Array]"==m.call(e)},v=function(e){return"number"==typeof e||"[object Number]"==m.call(e)},g=function(e,t){var r=String(e);return r.length<t?("0000"+r).slice(-t):r},b=function(e){return Number(e).toString(16).toUpperCase()},E=[].slice,x=function(e){for(var t,r=-1,n=e.length,i=n-1,s=[],a=!0,o=0;++r<n;)if(t=e[r],a)s.push(t),o=t,a=!1;else if(t==o+1){if(r!=i){o=t;continue}a=!0,s.push(t+1)}else s.push(o+1,t),o=t;return a||s.push(t+1),s},A=function(e,t){for(var r,n,i=0,s=e.length;i<s;){if(r=e[i],n=e[i+1],t>=r&&t<n)return t==r?n==r+1?(e.splice(i,2),e):(e[i]=t+1,e):t==n-1?(e[i+1]=t,e):(e.splice(i,2,r,t,t+1,n),e);i+=2}return e},S=function(e,t,r){if(r<t)throw Error(c.rangeOrder);for(var n,i,s=0;s<e.length;){if(n=e[s],i=e[s+1]-1,n>r)return e;if(t<=n&&r>=i)e.splice(s,2);else{if(t>=n&&r<i)return t==n?(e[s]=r+1,e[s+1]=i+1,e):(e.splice(s,2,n,t,r+1,i+1),e);if(t>=n&&t<=i)e[s+1]=t;else if(r>=n&&r<=i)return e[s]=r+1,e;s+=2}}return e},_=function(e,t){var r,n,i=0,s=null,a=e.length;if(t<0||t>1114111)throw RangeError(c.codePointRange);for(;i<a;){if(r=e[i],n=e[i+1],t>=r&&t<n)return e;if(t==r-1)return e[i]=t,e;if(r>t)return e.splice(null!=s?s+2:0,0,t,t+1),e;if(t==n)return t+1==e[i+2]?(e.splice(i,4,r,e[i+3]),e):(e[i+1]=t+1,e);s=i,i+=2}return e.push(t,t+1),e},D=function(e,t){for(var r,n,i=0,s=e.slice(),a=t.length;i<a;)r=t[i],n=t[i+1]-1,s=r==n?_(s,r):w(s,r,n),i+=2;return s},C=function(e,t){for(var r,n,i=0,s=e.slice(),a=t.length;i<a;)r=t[i],n=t[i+1]-1,s=r==n?A(s,r):S(s,r,n),i+=2;return s},w=function(e,t,r){if(r<t)throw Error(c.rangeOrder);if(t<0||t>1114111||r<0||r>1114111)throw RangeError(c.codePointRange);for(var n,i,s=0,a=!1,o=e.length;s<o;){if(n=e[s],i=e[s+1],a){if(n==r+1)return e.splice(s-1,2),e;if(n>r)return e;n>=t&&n<=r&&(i>t&&i-1<=r?(e.splice(s,2),s-=2):(e.splice(s-1,2),s-=2))}else{if(n==r+1)return e[s]=t,e;if(n>r)return e.splice(s,0,t,r+1),e;if(t>=n&&t<i&&r+1<=i)return e;t>=n&&t<i||i==t?(e[s+1]=r+1,a=!0):t<=n&&r+1>=i&&(e[s]=t,e[s+1]=r+1,a=!0)}s+=2}return a||e.push(t,r+1),e},P=function(e,t){var r=0,n=e.length,i=e[r],s=e[n-1];if(n>=2&&(t<i||t>s))return!1;for(;r<n;){if(i=e[r],s=e[r+1],t>=i&&t<s)return!0;r+=2}return!1},k=function(e,t){for(var r,n=0,i=t.length,s=[];n<i;)r=t[n],P(e,r)&&s.push(r),++n;return x(s)},F=function(e){return!e.length},T=function(e){return 2==e.length&&e[0]+1==e[1]},O=function(e){for(var t,r,n=0,i=[],s=e.length;n<s;){for(t=e[n],r=e[n+1];t<r;)i.push(t),++t;n+=2}return i},B=Math.floor,R=function(e){return parseInt(B((e-65536)/1024)+55296,10)},I=function(e){return parseInt((e-65536)%1024+56320,10)},M=String.fromCharCode,N=function(e){return 9==e?"\\t":10==e?"\\n":12==e?"\\f":13==e?"\\r":92==e?"\\\\":36==e||e>=40&&e<=43||45==e||46==e||63==e||e>=91&&e<=94||e>=123&&e<=125?"\\"+M(e):e>=32&&e<=126?M(e):e<=255?"\\x"+g(b(e),2):"\\u"+g(b(e),4)},L=function(e){return e<=65535?N(e):"\\u{"+e.toString(16).toUpperCase()+"}"},j=function(e){var t,r=e.length,n=e.charCodeAt(0);return n>=55296&&n<=56319&&r>1?(t=e.charCodeAt(1),1024*(n-55296)+t-56320+65536):n},U=function(e){var t,r,n="",i=0,s=e.length;if(T(e))return N(e[0]);for(;i<s;)t=e[i],r=e[i+1]-1,n+=t==r?N(t):t+1==r?N(t)+N(r):N(t)+"-"+N(r),i+=2;return"["+n+"]"},V=function(e){var t,r,n="",i=0,s=e.length;if(T(e))return L(e[0]);for(;i<s;)t=e[i],r=e[i+1]-1,n+=t==r?L(t):t+1==r?L(t)+L(r):L(t)+"-"+L(r),i+=2;return"["+n+"]"},G=function(e){for(var t,r,n=[],i=[],s=[],a=[],o=0,u=e.length;o<u;)t=e[o],r=e[o+1]-1,t<55296?(r<55296&&s.push(t,r+1),r>=55296&&r<=56319&&(s.push(t,55296),n.push(55296,r+1)),r>=56320&&r<=57343&&(s.push(t,55296),n.push(55296,56320),i.push(56320,r+1)),r>57343&&(s.push(t,55296),n.push(55296,56320),i.push(56320,57344),r<=65535?s.push(57344,r+1):(s.push(57344,65536),a.push(65536,r+1)))):t>=55296&&t<=56319?(r>=55296&&r<=56319&&n.push(t,r+1),r>=56320&&r<=57343&&(n.push(t,56320),i.push(56320,r+1)),r>57343&&(n.push(t,56320),i.push(56320,57344),r<=65535?s.push(57344,r+1):(s.push(57344,65536),a.push(65536,r+1)))):t>=56320&&t<=57343?(r>=56320&&r<=57343&&i.push(t,r+1),r>57343&&(i.push(t,57344),r<=65535?s.push(57344,r+1):(s.push(57344,65536),a.push(65536,r+1)))):t>57343&&t<=65535?r<=65535?s.push(t,r+1):(s.push(t,65536),a.push(65536,r+1)):a.push(t,r+1),o+=2;return{loneHighSurrogates:n,loneLowSurrogates:i,bmp:s,astral:a}},W=function(e){for(var t,r,n,i,s,a,o=[],u=[],l=!1,c=-1,f=e.length;++c<f;)if(t=e[c],r=e[c+1]){for(n=t[0],i=t[1],s=r[0],a=r[1],u=i;s&&n[0]==s[0]&&n[1]==s[1];)u=T(a)?_(u,a[0]):w(u,a[0],a[1]-1),++c,t=e[c],n=t[0],i=t[1],r=e[c+1],s=r&&r[0],a=r&&r[1],l=!0;o.push([n,l?u:i]),l=!1}else o.push(t);return Y(o)},Y=function(e){if(1==e.length)return e;for(var t=-1,r=-1;++t<e.length;){var n=e[t],i=n[1],s=i[0],a=i[1];for(r=t;++r<e.length;){var o=e[r],u=o[1],l=u[0],c=u[1];s==l&&a==c&&(T(o[0])?n[0]=_(n[0],o[0][0]):n[0]=w(n[0],o[0][0],o[0][1]-1),e.splice(r,1),--r)}}return e},q=function(e){if(!e.length)return[];for(var t,r,n,i,s,a,o=0,u=[],l=e.length;o<l;){t=e[o],r=e[o+1]-1,n=R(t),i=I(t),s=R(r),a=I(r);var c=56320==i,f=57343==a,p=!1;n==s||c&&f?(u.push([[n,s+1],[i,a+1]]),p=!0):u.push([[n,n+1],[i,57344]]),!p&&n+1<s&&(f?(u.push([[n+1,s+1],[56320,a+1]]),p=!0):u.push([[n+1,s],[56320,57344]])),p||u.push([[s,s+1],[56320,a+1]]),o+=2}return W(u)},K=function(e){var t=[];return h(e,function(e){var r=e[0],n=e[1];t.push(U(r)+U(n))}),t.join("|")},H=function(e,t,r){if(r)return V(e);var n=[],i=G(e),s=i.loneHighSurrogates,a=i.loneLowSurrogates,o=i.bmp,u=i.astral,l=!F(s),c=!F(a),f=q(u);return t&&(o=D(o,s),l=!1,o=D(o,a),c=!1),F(o)||n.push(U(o)),f.length&&n.push(K(f)),l&&n.push(U(s)+"(?![\\uDC00-\\uDFFF])"),c&&n.push("(?:[^\\uD800-\\uDBFF]|^)"+U(a)),n.join("|")},J=function e(t){return arguments.length>1&&(t=E.call(arguments)),this instanceof e?(this.data=[],t?this.add(t):this):(new e).add(t)};J.version="1.3.2";var X=J.prototype;!function(e,t){var r;for(r in t)d.call(t,r)&&(e[r]=t[r])}(X,{add:function(e){var t=this;return null==e?t:e instanceof J?(t.data=D(t.data,e.data),t):(arguments.length>1&&(e=E.call(arguments)),y(e)?(h(e,function(e){t.add(e)}),t):(t.data=_(t.data,v(e)?e:j(e)),t))},remove:function(e){var t=this;return null==e?t:e instanceof J?(t.data=C(t.data,e.data),t):(arguments.length>1&&(e=E.call(arguments)),y(e)?(h(e,function(e){t.remove(e)}),t):(t.data=A(t.data,v(e)?e:j(e)),t))},addRange:function(e,t){var r=this;return r.data=w(r.data,v(e)?e:j(e),v(t)?t:j(t)),r},removeRange:function(e,t){var r=this,n=v(e)?e:j(e),i=v(t)?t:j(t);return r.data=S(r.data,n,i),r},intersection:function(e){var t=this,r=e instanceof J?O(e.data):e;return t.data=k(t.data,r),t},contains:function(e){return P(this.data,v(e)?e:j(e))},clone:function(){var e=new J;return e.data=this.data.slice(0),e},toString:function(e){var t=H(this.data,!!e&&e.bmpOnly,!!e&&e.hasUnicodeFlag);return t?t.replace(f,"\\0$1"):"[]"},toRegExp:function(e){var t=this.toString(e&&-1!=e.indexOf("u")?{hasUnicodeFlag:!0}:null);return RegExp(t,e||"")},valueOf:function(){return O(this.data)}}),X.toArray=X.valueOf,"object"==s(r(49))&&r(49)?void 0!==(n=function(){return J}.call(t,r,t,e))&&(e.exports=n):o&&!o.nodeType?u?u.exports=J:o.regenerate=J:a.regenerate=J}(void 0)}).call(t,r(39)(e),function(){return this}())},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){p.default.ok(this instanceof s),h.assertIdentifier(e),this.nextTempId=0,this.contextId=e,this.listing=[],this.marked=[!0],this.finalLoc=a(),this.tryEntries=[],this.leapManager=new y.LeapManager(this)}function a(){return h.numericLiteral(-1)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+(0,c.default)(e))}function u(e){var t=e.type -;return"normal"===t?!x.call(e,"target"):"break"===t||"continue"===t?!x.call(e,"value")&&h.isLiteral(e.target):("return"===t||"throw"===t)&&(x.call(e,"value")&&!x.call(e,"target"))}var l=r(35),c=i(l),f=r(64),p=i(f),d=r(1),h=n(d),m=r(607),y=n(m),v=r(608),g=n(v),b=r(116),E=n(b),x=Object.prototype.hasOwnProperty,A=s.prototype;t.Emitter=s,A.mark=function(e){h.assertLiteral(e);var t=this.listing.length;return-1===e.value?e.value=t:p.default.strictEqual(e.value,t),this.marked[t]=!0,e},A.emit=function(e){h.isExpression(e)&&(e=h.expressionStatement(e)),h.assertStatement(e),this.listing.push(e)},A.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},A.assign=function(e,t){return h.expressionStatement(h.assignmentExpression("=",e,t))},A.contextProperty=function(e,t){return h.memberExpression(this.contextId,t?h.stringLiteral(e):h.identifier(e),!!t)},A.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},A.setReturnValue=function(e){h.assertExpression(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},A.clearPendingException=function(e,t){h.assertLiteral(e);var r=h.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,r):this.emit(r)},A.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(h.breakStatement())},A.jumpIf=function(e,t){h.assertExpression(e),h.assertLiteral(t),this.emit(h.ifStatement(e,h.blockStatement([this.assign(this.contextProperty("next"),t),h.breakStatement()])))},A.jumpIfNot=function(e,t){h.assertExpression(e),h.assertLiteral(t);var r=void 0;r=h.isUnaryExpression(e)&&"!"===e.operator?e.argument:h.unaryExpression("!",e),this.emit(h.ifStatement(r,h.blockStatement([this.assign(this.contextProperty("next"),t),h.breakStatement()])))},A.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},A.getContextFunction=function(e){return h.functionExpression(e||null,[this.contextId],h.blockStatement([this.getDispatchLoop()]),!1,!1)},A.getDispatchLoop=function(){var e=this,t=[],r=void 0,n=!1;return e.listing.forEach(function(i,s){e.marked.hasOwnProperty(s)&&(t.push(h.switchCase(h.numericLiteral(s),r=[])),n=!1),n||(r.push(i),h.isCompletionStatement(i)&&(n=!0))}),this.finalLoc.value=this.listing.length,t.push(h.switchCase(this.finalLoc,[]),h.switchCase(h.stringLiteral("end"),[h.returnStatement(h.callExpression(this.contextProperty("stop"),[]))])),h.whileStatement(h.numericLiteral(1),h.switchStatement(h.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),t))},A.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return h.arrayExpression(this.tryEntries.map(function(t){var r=t.firstLoc.value;p.default.ok(r>=e,"try entries out of order"),e=r;var n=t.catchEntry,i=t.finallyEntry,s=[t.firstLoc,n?n.firstLoc:null];return i&&(s[2]=i.firstLoc,s[3]=i.afterLoc),h.arrayExpression(s)}))},A.explode=function(e,t){var r=e.node,n=this;if(h.assertNode(r),h.isDeclaration(r))throw o(r);if(h.isStatement(r))return n.explodeStatement(e);if(h.isExpression(r))return n.explodeExpression(e,t);switch(r.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw o(r);case"Property":case"SwitchCase":case"CatchClause":throw new Error(r.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+(0,c.default)(r.type))}},A.explodeStatement=function(e,t){var r=e.node,n=this,i=void 0,s=void 0,o=void 0;if(h.assertStatement(r),t?h.assertIdentifier(t):t=null,h.isBlockStatement(r))return void e.get("body").forEach(function(e){n.explodeStatement(e)});if(!g.containsLeap(r))return void n.emit(r);switch(r.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":s=a(),n.leapManager.withEntry(new y.LabeledEntry(s,r.label),function(){n.explodeStatement(e.get("body"),r.label)}),n.mark(s);break;case"WhileStatement":i=a(),s=a(),n.mark(i),n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,i,t),function(){n.explodeStatement(e.get("body"))}),n.jump(i),n.mark(s);break;case"DoWhileStatement":var u=a(),l=a();s=a(),n.mark(u),n.leapManager.withEntry(new y.LoopEntry(s,l,t),function(){n.explode(e.get("body"))}),n.mark(l),n.jumpIf(n.explodeExpression(e.get("test")),u),n.mark(s);break;case"ForStatement":o=a();var f=a();s=a(),r.init&&n.explode(e.get("init"),!0),n.mark(o),r.test&&n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,f,t),function(){n.explodeStatement(e.get("body"))}),n.mark(f),r.update&&n.explode(e.get("update"),!0),n.jump(o),n.mark(s);break;case"TypeCastExpression":return n.explodeExpression(e.get("expression"));case"ForInStatement":o=a(),s=a();var d=n.makeTempVar();n.emitAssign(d,h.callExpression(E.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))])),n.mark(o);var m=n.makeTempVar();n.jumpIf(h.memberExpression(h.assignmentExpression("=",m,h.callExpression(d,[])),h.identifier("done"),!1),s),n.emitAssign(r.left,h.memberExpression(m,h.identifier("value"),!1)),n.leapManager.withEntry(new y.LoopEntry(s,o,t),function(){n.explodeStatement(e.get("body"))}),n.jump(o),n.mark(s);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(r.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(r.label)});break;case"SwitchStatement":var v=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));s=a();for(var b=a(),x=b,A=[],_=r.cases||[],D=_.length-1;D>=0;--D){var C=_[D];h.assertSwitchCase(C),C.test?x=h.conditionalExpression(h.binaryExpression("===",v,C.test),A[D]=a(),x):A[D]=b}var w=e.get("discriminant");E.replaceWithOrRemove(w,x),n.jump(n.explodeExpression(w)),n.leapManager.withEntry(new y.SwitchEntry(s),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(A[t]),e.get("consequent").forEach(function(e){n.explodeStatement(e)})})}),n.mark(s),-1===b.value&&(n.mark(b),p.default.strictEqual(s.value,b.value));break;case"IfStatement":var P=r.alternate&&a();s=a(),n.jumpIfNot(n.explodeExpression(e.get("test")),P||s),n.explodeStatement(e.get("consequent")),P&&(n.jump(s),n.mark(P),n.explodeStatement(e.get("alternate"))),n.mark(s);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":s=a();var k=r.handler,F=k&&a(),T=F&&new y.CatchEntry(F,k.param),O=r.finalizer&&a(),B=O&&new y.FinallyEntry(O,s),R=new y.TryEntry(n.getUnmarkedCurrentLoc(),T,B);n.tryEntries.push(R),n.updateContextPrevLoc(R.firstLoc),n.leapManager.withEntry(R,function(){if(n.explodeStatement(e.get("block")),F){O?n.jump(O):n.jump(s),n.updateContextPrevLoc(n.mark(F));var t=e.get("handler.body"),r=n.makeTempVar();n.clearPendingException(R.firstLoc,r),t.traverse(S,{safeParam:r,catchParamName:k.param.name}),n.leapManager.withEntry(T,function(){n.explodeStatement(t)})}O&&(n.updateContextPrevLoc(n.mark(O)),n.leapManager.withEntry(B,function(){n.explodeStatement(e.get("finalizer"))}),n.emit(h.returnStatement(h.callExpression(n.contextProperty("finish"),[B.firstLoc]))))}),n.mark(s);break;case"ThrowStatement":n.emit(h.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+(0,c.default)(r.type))}};var S={Identifier:function(e,t){e.node.name===t.catchParamName&&E.isReference(e)&&E.replaceWithOrRemove(e,t.safeParam)},Scope:function(e,t){e.scope.hasOwnBinding(t.catchParamName)&&e.skip()}};A.emitAbruptCompletion=function(e){u(e)||p.default.ok(!1,"invalid completion record: "+(0,c.default)(e)),p.default.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[h.stringLiteral(e.type)];"break"===e.type||"continue"===e.type?(h.assertLiteral(e.target),t[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(h.assertExpression(e.value),t[1]=e.value),this.emit(h.returnStatement(h.callExpression(this.contextProperty("abrupt"),t)))},A.getUnmarkedCurrentLoc=function(){return h.numericLiteral(this.listing.length)},A.updateContextPrevLoc=function(e){e?(h.assertLiteral(e),-1===e.value?e.value=this.listing.length:p.default.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},A.explodeExpression=function(e,t){function r(e){if(h.assertExpression(e),!t)return e;s.emit(e)}function n(e,t,r){p.default.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=s.explodeExpression(t,r);return r||(e||l&&!h.isLiteral(n))&&(n=s.emitAssign(e||s.makeTempVar(),n)),n}var i=e.node;if(!i)return i;h.assertExpression(i);var s=this,o=void 0,u=void 0;if(!g.containsLeap(i))return r(i);var l=g.containsLeap.onlyChildren(i);switch(i.type){case"MemberExpression":return r(h.memberExpression(s.explodeExpression(e.get("object")),i.computed?n(null,e.get("property")):i.property,i.computed));case"CallExpression":var f=e.get("callee"),d=e.get("arguments"),m=void 0,y=[],v=!1;if(d.forEach(function(e){v=v||g.containsLeap(e.node)}),h.isMemberExpression(f.node))if(v){var b=n(s.makeTempVar(),f.get("object")),E=f.node.computed?n(null,f.get("property")):f.node.property;y.unshift(b),m=h.memberExpression(h.memberExpression(b,E,f.node.computed),h.identifier("call"),!1)}else m=s.explodeExpression(f);else m=n(null,f),h.isMemberExpression(m)&&(m=h.sequenceExpression([h.numericLiteral(0),m]));return d.forEach(function(e){y.push(n(null,e))}),r(h.callExpression(m,y));case"NewExpression":return r(h.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})));case"ObjectExpression":return r(h.objectExpression(e.get("properties").map(function(e){return e.isObjectProperty()?h.objectProperty(e.node.key,n(null,e.get("value")),e.node.computed):e.node})));case"ArrayExpression":return r(h.arrayExpression(e.get("elements").map(function(e){return n(null,e)})));case"SequenceExpression":var x=i.expressions.length-1;return e.get("expressions").forEach(function(e){e.key===x?o=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),o;case"LogicalExpression":u=a(),t||(o=s.makeTempVar());var A=n(o,e.get("left"));return"&&"===i.operator?s.jumpIfNot(A,u):(p.default.strictEqual(i.operator,"||"),s.jumpIf(A,u)),n(o,e.get("right"),t),s.mark(u),o;case"ConditionalExpression":var S=a();u=a();var _=s.explodeExpression(e.get("test"));return s.jumpIfNot(_,S),t||(o=s.makeTempVar()),n(o,e.get("consequent"),t),s.jump(u),s.mark(S),n(o,e.get("alternate"),t),s.mark(u),o;case"UnaryExpression":return r(h.unaryExpression(i.operator,s.explodeExpression(e.get("argument")),!!i.prefix));case"BinaryExpression":return r(h.binaryExpression(i.operator,n(null,e.get("left")),n(null,e.get("right"))));case"AssignmentExpression":return r(h.assignmentExpression(i.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))));case"UpdateExpression":return r(h.updateExpression(i.operator,s.explodeExpression(e.get("argument")),i.prefix));case"YieldExpression":u=a();var D=i.argument&&s.explodeExpression(e.get("argument"));if(D&&i.delegate){var C=s.makeTempVar();return s.emit(h.returnStatement(h.callExpression(s.contextProperty("delegateYield"),[D,h.stringLiteral(C.property.name),u]))),s.mark(u),C}return s.emitAssign(s.contextProperty("next"),u),s.emit(h.returnStatement(D||null)),s.mark(u),s.contextProperty("sent");default:throw new Error("unknown Expression of type "+(0,c.default)(i.type))}}},function(e,t){"use strict";e.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},function(e,t,r){"use strict";function n(){this._array=[],this._set=Object.create(null)}var i=r(63),s=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i<s;i++)r.add(e[i],t);return r},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(e,t){var r=i.toSetString(e),n=s.call(this._set,r),a=this._array.length;n&&!t||this._array.push(e),n||(this._set[r]=a)},n.prototype.has=function(e){var t=i.toSetString(e);return s.call(this._set,t)},n.prototype.indexOf=function(e){var t=i.toSetString(e);if(s.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},n.prototype.toArray=function(){return this._array.slice()},t.ArraySet=n},function(e,t,r){"use strict";function n(e){return e<0?1+(-e<<1):0+(e<<1)}function i(e){var t=1==(1&e),r=e>>1;return t?-r:r}var s=r(616);t.encode=function(e){var t,r="",i=n(e);do{t=31&i,i>>>=5,i>0&&(t|=32),r+=s.encode(t)}while(i>0);return r},t.decode=function(e,t,r){var n,a,o=e.length,u=0,l=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&a),a&=31,u+=a<<l,l+=5}while(n);r.value=i(u),r.rest=t}},function(e,t,r){"use strict";function n(e){e||(e={}),this._file=s.getArg(e,"file",null),this._sourceRoot=s.getArg(e,"sourceRoot",null),this._skipValidation=s.getArg(e,"skipValidation",!1),this._sources=new a,this._names=new a,this._mappings=new o,this._sourcesContents=null}var i=r(286),s=r(63),a=r(285).ArraySet,o=r(618).MappingList;n.prototype._version=3,n.fromSourceMap=function(e){var t=e.sourceRoot,r=new n({file:e.file,sourceRoot:t});return e.eachMapping(function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(n.source=e.source,null!=t&&(n.source=s.relative(t,n.source)),n.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(n.name=e.name)),r.addMapping(n)}),e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&r.setSourceContent(t,n)}),r},n.prototype.addMapping=function(e){var t=s.getArg(e,"generated"),r=s.getArg(e,"original",null),n=s.getArg(e,"source",null),i=s.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,i),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:i})},n.prototype.setSourceContent=function(e,t){var r=e;null!=this._sourceRoot&&(r=s.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[s.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[s.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},n.prototype.applySourceMap=function(e,t,r){var n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}var i=this._sourceRoot;null!=i&&(n=s.relative(i,n));var o=new a,u=new a;this._mappings.unsortedForEach(function(t){if(t.source===n&&null!=t.originalLine){var a=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=a.source&&(t.source=a.source,null!=r&&(t.source=s.join(r,t.source)),null!=i&&(t.source=s.relative(i,t.source)),t.originalLine=a.line,t.originalColumn=a.column,null!=a.name&&(t.name=a.name))}var l=t.source;null==l||o.has(l)||o.add(l);var c=t.name;null==c||u.has(c)||u.add(c)},this),this._sources=o,this._names=u,e.sources.forEach(function(t){var n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=s.join(r,t)),null!=i&&(t=s.relative(i,t)),this.setSourceContent(t,n))},this)},n.prototype._validateMapping=function(e,t,r,n){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,f=0,p="",d=this._mappings.toArray(),h=0,m=d.length;h<m;h++){if(t=d[h],e="",t.generatedLine!==o)for(a=0;t.generatedLine!==o;)e+=";",o++;else if(h>0){if(!s.compareByGeneratedPositionsInflated(t,d[h-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-f),f=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),p+=e}return p},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=n},function(e,t,r){"use strict";t.SourceMapGenerator=r(287).SourceMapGenerator,t.SourceMapConsumer=r(620).SourceMapConsumer,t.SourceNode=r(621).SourceNode},function(e,t,r){(function(e){"use strict";function t(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}Object.defineProperty(e,"exports",{enumerable:!0,get:t})}).call(t,r(39)(e))},function(e,t,r){"use strict";e.exports=r(182)},function(e,t){"use strict";function r(e){return["babel-plugin-"+e,e]}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t){"use strict";function r(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^\/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e,t){if(e&&t)return(0,o.default)(e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=t.slice(0),n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var a=r(590),o=n(a);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t,r){if(e){if("Program"===e.type)return i.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=g.functionExpression(null,[g.identifier("global")],g.blockStatement(r)),i=g.program([g.expressionStatement(g.callExpression(n,[c.get("selfGlobal")]))]);return r.push(g.variableDeclaration("var",[g.variableDeclarator(e,g.assignmentExpression("=",g.memberExpression(g.identifier("global"),e),g.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(g.variableDeclaration("var",[g.variableDeclarator(e,g.identifier("global"))])),t(r),g.program([b({FACTORY_PARAMETERS:g.identifier("global"),BROWSER_ARGUMENTS:g.assignmentExpression("=",g.memberExpression(g.identifier("root"),e),g.objectExpression([])),COMMON_ARGUMENTS:g.identifier("exports"),AMD_ARGUMENTS:g.arrayExpression([g.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:g.identifier("this")})])}function o(e,t){var r=[];return r.push(g.variableDeclaration("var",[g.variableDeclarator(e,g.objectExpression([]))])),t(r),r.push(g.expressionStatement(e)),g.program(r)}function u(e,t,r){c.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=g.identifier(n);e.push(g.expressionStatement(g.assignmentExpression("=",g.memberExpression(t,i),c.get(n))))}})}t.__esModule=!0,t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=g.identifier("babelHelpers"),n=function(t){return u(t,r,e)},i=void 0,l={global:s,umd:a,var:o}[t];if(!l)throw new Error(h.get("unsupportedOutputType",t));return i=l(r,n),(0,p.default)(i).code};var l=r(194),c=i(l),f=r(186),p=n(f),d=r(20),h=i(d),m=r(4),y=n(m),v=r(1),g=i(v),b=(0,y.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(65),s=n(i),a=r(594),o=n(a);t.default=new s.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n<t.body.length;n++){var i=t.body[n];if(i&&null!=i._blockHoist){r=!0;break}}r&&(t.body=(0,o.default)(t.body,function(e){var t=e&&e._blockHoist;return null==t&&(t=1),!0===t&&(t=2),-1*t}))}}}}),e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return!!e.is("_forceShadow")||t}function s(e,t){var r=e.inShadow(t);if(i(e,r)){var n=e.node._shadowedFunctionLiteral,s=void 0,a=!1,o=e.find(function(t){if(t.parentPath&&t.parentPath.isClassProperty()&&"value"===t.key)return!0;if(e===t)return!1;if((t.isProgram()||t.isFunction())&&(s=s||t),t.isProgram())return a=!0,!0;if(t.isFunction()&&!t.isArrowFunctionExpression()){if(n){if(t===n||t.node===n.node)return!0}else if(!t.is("shadow"))return!0;return a=!0,!1}return!1});if(n&&o.isProgram()&&!n.isProgram()&&(o=e.findParent(function(e){return e.isProgram()||e.isFunction()})),o!==s&&a){var u=o.getData(t);if(u)return e.replaceWith(u);var l=e.scope.generateUidIdentifier(t);o.setData(t,l);var c=o.findParent(function(e){return e.isClass()}),p=!!(c&&c.node&&c.node.superClass);if("this"===t&&o.isMethod({kind:"constructor"})&&p)o.scope.push({id:l}),o.traverse(d,{id:l});else{var h="this"===t?f.thisExpression():f.identifier(t);n&&(h._shadowedFunctionLiteral=n),o.scope.push({id:l,init:h})}return e.replaceWith(l)}}}t.__esModule=!0;var a=r(10),o=n(a),u=r(65),l=n(u),c=r(1),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),p=(0,o.default)("super this bound"),d={CallExpression:function(e){if(e.get("callee").isSuper()){var t=e.node;t[p]||(t[p]=!0,e.replaceWith(f.assignmentExpression("=",this.id,t)))}}};t.default=new l.default({name:"internal.shadowFunctions",visitor:{ThisExpression:function(e){s(e,"this")},ReferencedIdentifier:function(e){"arguments"===e.node.name&&s(e,"arguments")}}}),e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(294),o=n(a),u=r(65),l=n(u),c=r(50),f=n(c),p=function(){function e(){(0,s.default)(this,e)}return e.prototype.lint=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new f.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new f.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new l.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,o.default)(e);var n=new f.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(42),o=n(a),u=r(41),l=n(u),c=r(119),f=n(c),p=r(50),d=(n(p),function(e){function t(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,s.default)(this,t);var a=(0,o.default)(this,e.call(this));return a.plugin=n,a.key=n.key,a.file=r,a.opts=i,a}return(0,l.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(f.default));t.default=d,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(625),o=n(a),u=/^[ \t]+$/,l=function(){function e(t){(0,s.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,o.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&u.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s<e.length;s++)"\n"===e[s]?(this._position.line++,this._position.column=0):this._position.column++},e.prototype.removeTrailingNewline=function(){this._queue.length>0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r<e.length;r++)"\n"===e[r]&&t++;return this._position.line+t},e}();t.default=l,e.exports=t.default},function(e,t,r){"use strict";function n(e){this.print(e.program,e)}function i(e){this.printInnerComments(e,!1),this.printSequence(e.directives,e),e.directives&&e.directives.length&&this.newline(),this.printSequence(e.body,e)}function s(e){this.token("{"),this.printInnerComments(e);var t=e.directives&&e.directives.length;e.body.length||t?(this.newline(),this.printSequence(e.directives,e,{indent:!0}),t&&this.newline(),this.printSequence(e.body,e,{indent:!0}),this.removeTrailingNewline(),this.source("end",e.loc),this.endsWith("\n")||this.newline(),this.rightBrace()):(this.source("end",e.loc),this.token("}"))}function a(){}function o(e){this.print(e.value,e),this.semicolon()}t.__esModule=!0,t.File=n,t.Program=i,t.BlockStatement=s,t.Noop=a,t.Directive=o;var u=r(123);Object.defineProperty(t,"DirectiveLiteral",{enumerable:!0,get:function(){return u.StringLiteral}})},function(e,t){"use strict";function r(e){this.printJoin(e.decorators,e),this.word("class"),e.id&&(this.space(),this.print(e.id,e)),this.print(e.typeParameters,e),e.superClass&&(this.space(),this.word("extends"),this.space(),this.print(e.superClass,e),this.print(e.superTypeParameters,e)),e.implements&&(this.space(),this.word("implements"),this.space(),this.printList(e.implements,e)),this.space(),this.print(e.body,e)}function n(e){this.token("{"),this.printInnerComments(e),0===e.body.length?this.token("}"):(this.newline(),this.indent(),this.printSequence(e.body,e),this.dedent(),this.endsWith("\n")||this.newline(),this.rightBrace())}function i(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),e.computed?(this.token("["),this.print(e.key,e),this.token("]")):(this._variance(e),this.print(e.key,e)),this.print(e.typeAnnotation,e),e.value&&(this.space(),this.token("="),this.space(),this.print(e.value,e)),this.semicolon()}function s(e){this.printJoin(e.decorators,e),e.static&&(this.word("static"),this.space()),"constructorCall"===e.kind&&(this.word("call"),this.space()),this._method(e)}t.__esModule=!0,t.ClassDeclaration=r,t.ClassBody=n,t.ClassProperty=i,t.ClassMethod=s,t.ClassExpression=r},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){"void"===e.operator||"delete"===e.operator||"typeof"===e.operator?(this.word(e.operator),this.space()):this.token(e.operator),this.print(e.argument,e)}function s(e){this.word("do"),this.space(),this.print(e.body,e)}function a(e){this.token("("),this.print(e.expression,e),this.token(")")}function o(e){e.prefix?(this.token(e.operator),this.print(e.argument,e)):(this.print(e.argument,e),this.token(e.operator))}function u(e){this.print(e.test,e),this.space(),this.token("?"),this.space(),this.print(e.consequent,e),this.space(),this.token(":"),this.space(),this.print(e.alternate,e)}function l(e,t){this.word("new"),this.space(),this.print(e.callee,e),(0!==e.arguments.length||!this.format.minified||C.isCallExpression(t,{callee:e})||C.isMemberExpression(t)||C.isNewExpression(t))&&(this.token("("),this.printList(e.arguments,e),this.token(")"))}function c(e){this.printList(e.expressions,e)}function f(){ -this.word("this")}function p(){this.word("super")}function d(e){this.token("@"),this.print(e.expression,e),this.newline()}function h(){this.token(","),this.newline(),this.endsWith("\n")||this.space()}function m(e){this.print(e.callee,e),this.token("(");var t=e._prettyCall,r=void 0;t&&(r=h,this.newline(),this.indent()),this.printList(e.arguments,e,{separator:r}),t&&(this.newline(),this.dedent()),this.token(")")}function y(){this.word("import")}function v(e){return function(t){if(this.word(e),t.delegate&&this.token("*"),t.argument){this.space();var r=this.startTerminatorless();this.print(t.argument,t),this.endTerminatorless(r)}}}function g(){this.semicolon(!0)}function b(e){this.print(e.expression,e),this.semicolon()}function E(e){this.print(e.left,e),e.left.optional&&this.token("?"),this.print(e.left.typeAnnotation,e),this.space(),this.token("="),this.space(),this.print(e.right,e)}function x(e,t){var r=this.inForStatementInitCounter&&"in"===e.operator&&!P.needsParens(e,t);r&&this.token("("),this.print(e.left,e),this.space(),"in"===e.operator||"instanceof"===e.operator?this.word(e.operator):this.token(e.operator),this.space(),this.print(e.right,e),r&&this.token(")")}function A(e){this.print(e.object,e),this.token("::"),this.print(e.callee,e)}function S(e){if(this.print(e.object,e),!e.computed&&C.isMemberExpression(e.property))throw new TypeError("Got a MemberExpression for MemberExpression property");var t=e.computed;C.isLiteral(e.property)&&"number"==typeof e.property.value&&(t=!0),t?(this.token("["),this.print(e.property,e),this.token("]")):(this.token("."),this.print(e.property,e))}function _(e){this.print(e.meta,e),this.token("."),this.print(e.property,e)}t.__esModule=!0,t.LogicalExpression=t.BinaryExpression=t.AwaitExpression=t.YieldExpression=void 0,t.UnaryExpression=i,t.DoExpression=s,t.ParenthesizedExpression=a,t.UpdateExpression=o,t.ConditionalExpression=u,t.NewExpression=l,t.SequenceExpression=c,t.ThisExpression=f,t.Super=p,t.Decorator=d,t.CallExpression=m,t.Import=y,t.EmptyStatement=g,t.ExpressionStatement=b,t.AssignmentPattern=E,t.AssignmentExpression=x,t.BindExpression=A,t.MemberExpression=S,t.MetaProperty=_;var D=r(1),C=n(D),w=r(187),P=n(w);t.YieldExpression=v("yield"),t.AwaitExpression=v("await");t.BinaryExpression=x,t.LogicalExpression=x},function(e,t,r){"use strict";function n(){this.word("any")}function i(e){this.print(e.elementType,e),this.token("["),this.token("]")}function s(){this.word("boolean")}function a(e){this.word(e.value?"true":"false")}function o(){this.word("null")}function u(e,t){Q.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),this._interfaceish(e)}function l(e,t){Q.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()}function c(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)}function f(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)}function p(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)}function d(e){this.word("declare"),this.space(),this.TypeAlias(e)}function h(e,t){Q.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.OpaqueType(e)}function m(e,t){Q.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()}function y(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),v.apply(this,arguments)}function v(e){if(e.declaration){var t=e.declaration;this.print(t,e),Q.isStatement(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}function g(){this.token("*")}function b(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)}function E(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)}function x(e){this.print(e.id,e),this.print(e.typeParameters,e)}function A(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)}function S(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")}function _(e){this.word("interface"),this.space(),this._interfaceish(e)}function D(){this.space(),this.token("&"),this.space()}function C(e){this.printJoin(e.types,e,{separator:D})}function w(){this.word("mixed")}function P(){this.word("empty")}function k(e){this.token("?"),this.print(e.typeAnnotation,e)}function F(){this.word("number")}function T(){this.word("string")}function O(){this.word("this")}function B(e){this.token("["),this.printList(e.types,e),this.token("]")}function R(e){this.word("typeof"),this.space(),this.print(e.argument,e)}function I(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()}function M(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e)),e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e)),this.semicolon()}function N(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)}function L(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))}function j(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function U(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")}function V(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)}function G(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)}function W(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)}function Y(e){this.token("..."),this.print(e.argument,e)}function q(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)}function K(){this.space(),this.token("|"),this.space()}function H(e){this.printJoin(e.types,e,{separator:K})}function J(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")}function X(){this.word("void")}t.__esModule=!0,t.TypeParameterDeclaration=t.StringLiteralTypeAnnotation=t.NumericLiteralTypeAnnotation=t.GenericTypeAnnotation=t.ClassImplements=void 0,t.AnyTypeAnnotation=n,t.ArrayTypeAnnotation=i,t.BooleanTypeAnnotation=s,t.BooleanLiteralTypeAnnotation=a,t.NullLiteralTypeAnnotation=o,t.DeclareClass=u,t.DeclareFunction=l,t.DeclareInterface=c,t.DeclareModule=f,t.DeclareModuleExports=p,t.DeclareTypeAlias=d,t.DeclareOpaqueType=h,t.DeclareVariable=m,t.DeclareExportDeclaration=y,t.ExistentialTypeParam=g,t.FunctionTypeAnnotation=b,t.FunctionTypeParam=E,t.InterfaceExtends=x,t._interfaceish=A,t._variance=S,t.InterfaceDeclaration=_,t.IntersectionTypeAnnotation=C,t.MixedTypeAnnotation=w,t.EmptyTypeAnnotation=P,t.NullableTypeAnnotation=k;var z=r(123);Object.defineProperty(t,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return z.NumericLiteral}}),Object.defineProperty(t,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return z.StringLiteral}}),t.NumberTypeAnnotation=F,t.StringTypeAnnotation=T,t.ThisTypeAnnotation=O,t.TupleTypeAnnotation=B,t.TypeofTypeAnnotation=R,t.TypeAlias=I,t.OpaqueType=M,t.TypeAnnotation=N,t.TypeParameter=L,t.TypeParameterInstantiation=j,t.ObjectTypeAnnotation=U,t.ObjectTypeCallProperty=V,t.ObjectTypeIndexer=G,t.ObjectTypeProperty=W,t.ObjectTypeSpreadProperty=Y,t.QualifiedTypeIdentifier=q,t.UnionTypeAnnotation=H,t.TypeCastExpression=J,t.VoidTypeAnnotation=X;var $=r(1),Q=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}($);t.ClassImplements=x,t.GenericTypeAnnotation=x,t.TypeParameterDeclaration=j},function(e,t,r){"use strict";function n(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))}function i(e){this.word(e.name)}function s(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)}function a(e){this.print(e.object,e),this.token("."),this.print(e.property,e)}function o(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")}function u(e){this.token("{"),this.print(e.expression,e),this.token("}")}function l(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")}function c(e){this.token(e.value)}function f(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(var r=e.children,n=Array.isArray(r),i=0,r=n?r:(0,v.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.print(a,e)}this.dedent(),this.print(e.closingElement,e)}}function p(){this.space()}function d(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:p})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")}function h(e){this.token("</"),this.print(e.name,e),this.token(">")}function m(){}t.__esModule=!0;var y=r(2),v=function(e){return e&&e.__esModule?e:{default:e}}(y);t.JSXAttribute=n,t.JSXIdentifier=i,t.JSXNamespacedName=s,t.JSXMemberExpression=a,t.JSXSpreadAttribute=o,t.JSXExpressionContainer=u,t.JSXSpreadChild=l,t.JSXText=c,t.JSXElement=f,t.JSXOpeningElement=d,t.JSXClosingElement=h,t.JSXEmptyExpression=m},function(e,t,r){"use strict";function n(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)}function i(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)}function s(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}function a(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&l.isIdentifier(t)&&!o(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)}function o(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}t.__esModule=!0,t.FunctionDeclaration=void 0,t._params=n,t._method=i,t.FunctionExpression=s,t.ArrowFunctionExpression=a;var u=r(1),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);t.FunctionDeclaration=s},function(e,t,r){"use strict";function n(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function i(e){this.print(e.local,e)}function s(e){this.print(e.exported,e)}function a(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function o(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}function u(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()}function l(){this.word("export"),this.space(),f.apply(this,arguments)}function c(){this.word("export"),this.space(),this.word("default"),this.space(),f.apply(this,arguments)}function f(e){if(e.declaration){var t=e.declaration;this.print(t,e),m.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var i=r[0];if(!m.isExportDefaultSpecifier(i)&&!m.isExportNamespaceSpecifier(i))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}function p(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!m.isImportDefaultSpecifier(r)&&!m.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()}function d(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)}t.__esModule=!0,t.ImportSpecifier=n,t.ImportDefaultSpecifier=i,t.ExportDefaultSpecifier=s,t.ExportSpecifier=a,t.ExportNamespaceSpecifier=o,t.ExportAllDeclaration=u,t.ExportNamedDeclaration=l,t.ExportDefaultDeclaration=c,t.ImportDeclaration=p,t.ImportNamespaceSpecifier=d;var h=r(1),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(h)},function(e,t,r){"use strict";function n(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)}function i(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&S.isIfStatement(s(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))}function s(e){return S.isStatement(e.body)?s(e.body):e}function a(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)}function o(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)}function u(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function c(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)}function f(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))}function p(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)}function d(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")}function h(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))}function m(){this.word("debugger"),this.semicolon()}function y(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function v(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}function g(e,t){this.word(e.kind),this.space();var r=!1;if(!S.isFor(t))for(var n=e.declarations,i=Array.isArray(n),s=0,n=i?n:(0,x.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;o.init&&(r=!0)}var u=void 0;r&&(u="const"===e.kind?v:y),this.printList(e.declarations,e,{separator:u}),(!S.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()}function b(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))}t.__esModule=!0,t.ThrowStatement=t.BreakStatement=t.ReturnStatement=t.ContinueStatement=t.ForAwaitStatement=t.ForOfStatement=t.ForInStatement=void 0;var E=r(2),x=function(e){return e&&e.__esModule?e:{default:e}}(E);t.WithStatement=n,t.IfStatement=i,t.ForStatement=a,t.WhileStatement=o,t.DoWhileStatement=u,t.LabeledStatement=c,t.TryStatement=f,t.CatchClause=p,t.SwitchStatement=d,t.SwitchCase=h,t.DebuggerStatement=m,t.VariableDeclaration=g,t.VariableDeclarator=b;var A=r(1),S=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(A),_=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};t.ForInStatement=_("in"),t.ForOfStatement=_("of"),t.ForAwaitStatement=_("await"),t.ContinueStatement=l("continue"),t.ReturnStatement=l("return","argument"),t.BreakStatement=l("break"),t.ThrowStatement=l("throw","argument")},function(e,t){"use strict";function r(e){this.print(e.tag,e),this.print(e.quasi,e)}function n(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)}function i(e){for(var t=e.quasis,r=0;r<t.length;r++)this.print(t[r],e),r+1<t.length&&this.print(e.expressions[r],e)}t.__esModule=!0,t.TaggedTemplateExpression=r,t.TemplateElement=n,t.TemplateLiteral=i},function(e,t,r){"use strict";function n(e,t){return b.isArrayTypeAnnotation(t)}function i(e,t){return b.isMemberExpression(t)&&t.object===e}function s(e,t,r){return v(r,{considerArrow:!0})}function a(e,t,r){return v(r)}function o(e,t){if((b.isCallExpression(t)||b.isNewExpression(t))&&t.callee===e||b.isUnaryLike(t)||b.isMemberExpression(t)&&t.object===e||b.isAwaitExpression(t))return!0;if(b.isBinary(t)){var r=t.operator,n=E[r],i=e.operator,s=E[i];if(n===s&&t.right===e&&!b.isLogicalExpression(t)||n>s)return!0}return!1}function u(e,t){return"in"===e.operator&&(b.isVariableDeclarator(t)||b.isFor(t))}function l(e,t){return!(b.isForStatement(t)||b.isThrowStatement(t)||b.isReturnStatement(t)||b.isIfStatement(t)&&t.test===e||b.isWhileStatement(t)&&t.test===e||b.isForInStatement(t)&&t.right===e||b.isSwitchStatement(t)&&t.discriminant===e||b.isExpressionStatement(t)&&t.expression===e)}function c(e,t){return b.isBinary(t)||b.isUnaryLike(t)||b.isCallExpression(t)||b.isMemberExpression(t)||b.isNewExpression(t)||b.isConditionalExpression(t)&&e===t.test}function f(e,t,r){return v(r,{considerDefaultExports:!0})}function p(e,t){return b.isMemberExpression(t,{object:e})||b.isCallExpression(t,{callee:e})||b.isNewExpression(t,{callee:e})}function d(e,t,r){return v(r,{considerDefaultExports:!0})}function h(e,t){return!!(b.isExportDeclaration(t)||b.isBinaryExpression(t)||b.isLogicalExpression(t)||b.isUnaryExpression(t)||b.isTaggedTemplateExpression(t))||p(e,t)}function m(e,t){return!!(b.isUnaryLike(t)||b.isBinary(t)||b.isConditionalExpression(t,{test:e})||b.isAwaitExpression(t))||p(e,t)}function y(e){return!!b.isObjectPattern(e.left)||m.apply(void 0,arguments)}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a];a--;for(var u=e[a];a>0;){if(b.isExpressionStatement(u,{expression:o})||b.isTaggedTemplateExpression(u)||s&&b.isExportDefaultDeclaration(u,{declaration:o})||n&&b.isArrowFunctionExpression(u,{body:o}))return!0;if(!(b.isCallExpression(u,{callee:o})||b.isSequenceExpression(u)&&u.expressions[0]===o||b.isMemberExpression(u,{object:o})||b.isConditional(u,{test:o})||b.isBinary(u,{left:o})||b.isAssignmentExpression(u,{left:o})))return!1;o=u,a--,u=e[a]}return!1}t.__esModule=!0,t.AwaitExpression=t.FunctionTypeAnnotation=void 0,t.NullableTypeAnnotation=n,t.UpdateExpression=i,t.ObjectExpression=s,t.DoExpression=a,t.Binary=o,t.BinaryExpression=u,t.SequenceExpression=l,t.YieldExpression=c,t.ClassExpression=f,t.UnaryLike=p,t.FunctionExpression=d,t.ArrowFunctionExpression=h,t.ConditionalExpression=m,t.AssignmentExpression=y;var g=r(1),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(g),E={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};t.FunctionTypeAnnotation=n,t.AwaitExpression=c},function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):l.isBinary(e)||l.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):l.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):l.isFunction(e)?t.hasFunction=!0:l.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return l.isMemberExpression(e)?i(e.object)||i(e.property):l.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:l.isCallExpression(e)?i(e.callee):!(!l.isBinary(e)&&!l.isAssignmentExpression(e))&&(l.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return l.isLiteral(e)||l.isObjectExpression(e)||l.isArrayExpression(e)||l.isIdentifier(e)||l.isMemberExpression(e)}var a=r(588),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=r(1),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);t.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(l.isFunction(e.left)||l.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(l.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t<e.declarations.length;t++){var r=e.declarations[t],a=i(r.id)&&!s(r.init);if(!a){var o=n(r.init);a=i(r.init)&&o.hasCall||o.hasFunction}if(a)return{before:!0,after:!0}}},IfStatement:function(e){if(l.isBlockStatement(e.consequent))return{before:!0,after:!0}}},t.nodes.ObjectProperty=t.nodes.ObjectTypeProperty=t.nodes.ObjectMethod=t.nodes.SpreadProperty=function(e,t){if(t.properties[0]===e)return{before:!0}},t.list={VariableDeclaration:function(e){return(0,o.default)(e.declarations,"init")},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties}},[["Function",!0],["Class",!0],["Loop",!0],["LabeledStatement",!0],["SwitchStatement",!0],["TryStatement",!0]].forEach(function(e){var r=e[0],n=e[1];"boolean"==typeof n&&(n={after:n,before:n}),[r].concat(l.FLIPPED_ALIAS_KEYS[r]||[]).forEach(function(e){t.nodes[e]=function(){return n}})})},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(){this.token(","),this.space()}t.__esModule=!0;var a=r(87),o=i(a),u=r(2),l=i(u),c=r(35),f=i(c),p=r(365),d=i(p),h=r(3),m=i(h),y=r(579),v=i(y),g=r(581),b=i(g),E=r(586),x=i(E),A=r(278),S=i(A),_=r(300),D=i(_),C=r(187),w=n(C),P=r(314),k=i(P),F=r(1),T=n(F),O=/e/i,B=/\.0+$/,R=/^0[box]/,I=function(){function e(t,r,n){(0,m.default)(this,e),this.inForStatementInitCounter=0,this._printStack=[],this._indent=0,this._insideAux=!1,this._printedCommentStarts={},this._parenPushNewlineState=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new d.default,this._endsWithInteger=!1,this._endsWithWord=!1,this.format=t||{},this._buf=new D.default(r),this._whitespace=n.length>0?new k.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,x.default)(+e)&&!R.test(e)&&!O.test(e)&&!B.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t<e;t++)this._newline()}},e.prototype.endsWith=function(e){return this._buf.endsWith(e)},e.prototype.removeTrailingNewline=function(){this._buf.removeTrailingNewline()},e.prototype.source=function(e,t){this._catchUp(e,t),this._buf.source(e,t)},e.prototype.withSource=function(e,t,r){this._catchUp(e,t),this._buf.withSource(e,t,r)},e.prototype._space=function(){this._append(" ",!0)},e.prototype._newline=function(){this._append("\n",!0)},e.prototype._append=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r<e.length&&" "===e[r];r++);if(r!==e.length){var n=e[r];"\n"!==n&&"/"!==n||(this.token("("),this.indent(),t.printed=!0)}}},e.prototype._catchUp=function(e,t){if(this.format.retainLines){var r=t?t[e]:null;if(r&&null!==r.line)for(var n=r.line-this._buf.getCurrentLine(),i=0;i<n;i++)this._newline()}},e.prototype._getIndent=function(){return(0,S.default)(this.format.indent.style,this._indent)},e.prototype.startTerminatorless=function(){return this._parenPushNewlineState={printed:!1}},e.prototype.endTerminatorless=function(e){e.printed&&(this.dedent(),this.newline(),this.token(")"))},e.prototype.print=function(e,t){var r=this;if(e){var n=this.format.concise;e._compact&&(this.format.concise=!0);if(!this[e.type])throw new ReferenceError("unknown node of type "+(0,f.default)(e.type)+" with constructor "+(0,f.default)(e&&e.constructor.name));this._printStack.push(e);var i=this._insideAux;this._insideAux=!e.loc,this._maybeAddAuxComment(this._insideAux&&!i);var s=w.needsParens(e,t,this._printStack);this.format.retainFunctionParens&&"FunctionExpression"===e.type&&e.extra&&e.extra.parenthesized&&(s=!0),s&&this.token("("),this._printLeadingComments(e,t);var a=T.isProgram(e)||T.isFile(e)?null:e.loc;this.withSource("start",a,function(){r[e.type](e,t)}),this._printTrailingComments(e,t),s&&this.token(")"),this._printStack.pop(),this.format.concise=n,this._insideAux=i}},e.prototype._maybeAddAuxComment=function(e){e&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()},e.prototype._printAuxBeforeComment=function(){if(!this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!0;var e=this.format.auxiliaryCommentBefore;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype._printAuxAfterComment=function(){if(this._printAuxAfterOnNextUserNode){this._printAuxAfterOnNextUserNode=!1;var e=this.format.auxiliaryCommentAfter;e&&this._printComment({type:"CommentBlock",value:e})}},e.prototype.getPossibleRaw=function(e){var t=e.extra;if(t&&null!=t.raw&&null!=t.rawValue&&e.value===t.rawValue)return t.raw},e.prototype.printJoin=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i<e.length;i++){var s=e[i];s&&(r.statement&&this._printNewline(!0,s,t,n),this.print(s,t),r.iterator&&r.iterator(s,i),r.separator&&i<e.length-1&&r.separator.call(this),r.statement&&this._printNewline(!1,s,t,n))}r.indent&&this.dedent()}},e.prototype.printAndIndentOnComments=function(e,t){var r=!!e.leadingComments;r&&this.indent(),this.print(e,t),r&&this.dedent()},e.prototype.printBlock=function(e){var t=e.body;T.isEmptyStatement(t)||this.space(),this.print(t,e)},e.prototype._printTrailingComments=function(e,t){this._printComments(this._getComments(!1,e,t))},e.prototype._printLeadingComments=function(e,t){this._printComments(this._getComments(!0,e,t))},e.prototype.printInnerComments=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,v.default)(a,function(e){ -return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,b.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=w.needsWhitespaceAfter;e&&(c=w.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,S.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this._printComment(s)}},e}();t.default=I;for(var M=[r(309),r(303),r(308),r(302),r(306),r(307),r(123),r(304),r(301),r(305)],N=0;N<M.length;N++){var L=M[N];(0,o.default)(I.prototype,L)}e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(14),s=n(i),a=r(11),o=n(a),u=r(3),l=n(u),c=r(288),f=n(c),p=function(){function e(t,r){(0,l.default)(this,e),this._cachedMap=null,this._code=r,this._opts=t,this._rawMappings=[]}return e.prototype.get=function(){if(!this._cachedMap){var e=this._cachedMap=new f.default.SourceMapGenerator({file:this._opts.sourceMapTarget,sourceRoot:this._opts.sourceRoot}),t=this._code;"string"==typeof t?e.setSourceContent(this._opts.sourceFileName,t):"object"===(void 0===t?"undefined":(0,o.default)(t))&&(0,s.default)(t).forEach(function(r){e.setSourceContent(r,t[r])}),this._rawMappings.forEach(e.addMapping,e)}return this._cachedMap.toJSON()},e.prototype.getRawMappings=function(){return this._rawMappings.slice()},e.prototype.mark=function(e,t,r,n,i,s){this._lastGenLine!==e&&null===r||this._lastGenLine===e&&this._lastSourceLine===r&&this._lastSourceColumn===n||(this._cachedMap=null,this._lastGenLine=e,this._lastSourceLine=r,this._lastSourceColumn=n,this._rawMappings.push({name:i||void 0,generated:{line:e,column:t},source:null==r?void 0:s||this._opts.sourceFileName,original:null==r?void 0:{line:r,column:n}}))},e}();t.default=p,e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(3),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(){function e(t){(0,i.default)(this,e),this.tokens=t,this.used={}}return e.prototype.getNewlinesBefore=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.start-e.start},0,n.length);if(i>=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],r=n[i+1],","===r.type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s<n;s++)void 0===this.used[s]&&(this.used[s]=!0,i++);return i},e.prototype._findToken=function(e,t,r){if(t>=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();t.default=s,e.exports=t.default},function(e,t,r){"use strict";function n(e){for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var a=i,u=a.node,l=u.expression;if(o.isMemberExpression(l)){var c=a.scope.maybeGenerateMemoised(l.object),f=void 0,p=[];c?(f=c,p.push(o.assignmentExpression("=",c,l.object))):f=l.object,p.push(o.callExpression(o.memberExpression(o.memberExpression(f,l.property,l.computed),o.identifier("bind")),[f])),1===p.length?u.expression=p[0]:u.expression=o.sequenceExpression(p)}}}t.__esModule=!0;var i=r(2),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.default=n;var a=r(1),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(t){return t&&t.operator===e.operator+"="}function r(e,t){return a.assignmentExpression("=",e,t)}var n={};return n.ExpressionStatement=function(n,s){if(!n.isCompletionRecord()){var o=n.node.expression;if(t(o)){var u=[],l=(0,i.default)(o.left,u,s,n.scope,!0);u.push(a.expressionStatement(r(l.ref,e.build(l.uid,o.right)))),n.replaceWithMultiple(u)}}},n.AssignmentExpression=function(n,s){var a=n.node,o=n.scope;if(t(a)){var u=[],l=(0,i.default)(a.left,u,s,o);u.push(r(l.ref,e.build(l.uid,a.right))),n.replaceWithMultiple(u)}},n.BinaryExpression=function(t){var r=t.node;r.operator===e.operator&&t.replaceWith(e.build(r.left,r.right))},n};var n=r(318),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=r(1),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.scope,r=e.node,n=a.functionExpression(null,[],r.body,r.generator,r.async),s=n,u=[];(0,i.default)(e,function(e){return t.push({id:e})});var l={foundThis:!1,foundArguments:!1};e.traverse(o,l),l.foundArguments&&(s=a.memberExpression(n,a.identifier("apply")),u=[],l.foundThis&&u.push(a.thisExpression()),l.foundArguments&&(l.foundThis||u.push(a.nullLiteral()),u.push(a.identifier("arguments"))));var c=a.callExpression(s,u);return r.generator&&(c=a.yieldExpression(c,!0)),a.returnStatement(c)};var n=r(190),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=r(1),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s),o={enter:function(e,t){e.isThisExpression()&&(t.foundThis=!0),e.isReferencedIdentifier({name:"arguments"})&&(t.foundArguments=!0)},Function:function(e){e.skip()}};e.exports=t.default},function(e,t,r){"use strict";function n(e,t,r,n){var i=void 0;if(a.isSuper(e))return e;if(a.isIdentifier(e)){if(n.hasBinding(e.name))return e;i=e}else{if(!a.isMemberExpression(e))throw new Error("We can't explode this node type "+e.type);if(i=e.object,a.isSuper(i)||a.isIdentifier(i)&&n.hasBinding(i.name))return i}var s=n.generateUidIdentifierBasedOnNode(i);return t.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),s}function i(e,t,r,n){var i=e.property,s=a.toComputedKey(e,i);if(a.isLiteral(s)&&a.isPureish(s))return s;var o=n.generateUidIdentifierBasedOnNode(i);return t.push(a.variableDeclaration("var",[a.variableDeclarator(o,i)])),o}t.__esModule=!0,t.default=function(e,t,r,s,o){var u=void 0;u=a.isIdentifier(e)&&o?e:n(e,t,r,s);var l=void 0,c=void 0;if(a.isIdentifier(e))l=e,c=u;else{var f=i(e,t,r,s),p=e.computed||a.isLiteral(f);c=l=a.memberExpression(u,f,p)}return{uid:c,ref:l}};var s=r(1),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(t){if(t.node&&!t.isPure()){var r=e.scope.generateDeclaredUidIdentifier();n.push(l.assignmentExpression("=",r,t.node)),t.replaceWith(r)}}function r(e){if(Array.isArray(e)&&e.length){e=e.reverse(),(0,o.default)(e);for(var r=e,n=Array.isArray(r),i=0,r=n?r:(0,s.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if(i=r.next(),i.done)break;a=i.value}t(a)}}}e.assertClass();var n=[];t(e.get("superClass")),r(e.get("decorators"));for(var i=e.get("body.body"),a=i,u=Array.isArray(a),c=0,a=u?a:(0,s.default)(a);;){var f;if(u){if(c>=a.length)break;f=a[c++]}else{if(c=a.next(),c.done)break;f=c.value}var p=f;p.is("computed")&&t(p.get("key")),p.has("decorators")&&r(e.get("decorators"))}n&&e.insertBefore(n.map(function(e){return l.expressionStatement(e)}))};var a=r(315),o=n(a),u=r(1),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e,t){var r=e.node,n=e.scope,i=e.parent,a=n.generateUidIdentifier("step"),o=n.generateUidIdentifier("value"),u=r.left,p=void 0;s.isIdentifier(u)||s.isPattern(u)||s.isMemberExpression(u)?p=s.expressionStatement(s.assignmentExpression("=",u,o)):s.isVariableDeclaration(u)&&(p=s.variableDeclaration(u.kind,[s.variableDeclarator(u.declarations[0].id,o)]));var d=c();(0,l.default)(d,f,null,{ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:n.generateUidIdentifier("iterator"),GET_ITERATOR:t.getAsyncIterator,OBJECT:r.right,STEP_VALUE:o,STEP_KEY:a,AWAIT:t.wrapAwait}),d=d.body.body;var h=s.isLabeledStatement(i),m=d[3].block.body,y=m[0];return h&&(m[0]=s.labeledStatement(i.label,y)),{replaceParent:h,node:d,declar:p,loop:y}};var i=r(1),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i),a=r(4),o=n(a),u=r(7),l=n(u),c=(0,o.default)("\n function* wrapper() {\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY, STEP_VALUE;\n (\n STEP_KEY = yield AWAIT(ITERATOR_KEY.next()),\n ITERATOR_COMPLETION = STEP_KEY.done,\n STEP_VALUE = yield AWAIT(STEP_KEY.value),\n !ITERATOR_COMPLETION\n );\n ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n yield AWAIT(ITERATOR_KEY.return());\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n"),f={noScope:!0,Identifier:function(e,t){e.node.name in t&&e.replaceInline(t[e.node.name])},CallExpression:function(e,t){var r=e.node.callee;s.isIdentifier(r)&&"AWAIT"===r.name&&!t.AWAIT&&e.replaceWith(e.node.arguments[0])}};e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(4),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s={};t.default=s,s.typeof=(0,i.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),s.jsx=(0,i.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),s.asyncIterator=(0,i.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),s.asyncGenerator=(0,i.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),s.asyncGeneratorDelegate=(0,i.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),s.asyncToGenerator=(0,i.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),s.classCallCheck=(0,i.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),s.createClass=(0,i.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),s.defineEnumerableProperties=(0,i.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),s.defaults=(0,i.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),s.defineProperty=(0,i.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),s.extends=(0,i.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),s.get=(0,i.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),s.inherits=(0,i.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),s.instanceof=(0,i.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),s.interopRequireDefault=(0,i.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),s.interopRequireWildcard=(0,i.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),s.newArrowCheck=(0,i.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),s.objectDestructuringEmpty=(0,i.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),s.objectWithoutProperties=(0,i.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),s.possibleConstructorReturn=(0,i.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),s.selfGlobal=(0,i.default)('\n typeof global === "undefined" ? self : global\n'),s.set=(0,i.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),s.slicedToArray=(0,i.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),s.slicedToArrayLoose=(0,i.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),s.taggedTemplateLiteral=(0,i.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),s.taggedTemplateLiteralLoose=(0,i.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),s.temporalRef=(0,i.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),s.temporalUndefined=(0,i.default)("\n ({})\n"),s.toArray=(0,i.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),s.toConsumableArray=(0,i.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{pre:function(e){e.set("helpersNamespace",t.identifier("babelHelpers"))}}},e.exports=t.default},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(89);e.exports=function(e){var t=e.types,r={};return{visitor:{Identifier:function(e,s){if("MemberExpression"!==e.parent.type&&"ClassMethod"!==e.parent.type&&!e.isPure()&&s.opts.hasOwnProperty(e.node.name)){var a=s.opts[e.node.name];void 0!==a&&null!==a||(a=t.identifier(String(a)));var o=void 0===a?"undefined":n(a);"string"===o||"boolean"===o?a={type:o,replacement:a}:t.isNode(a)?a={type:"node",replacement:a}:"object"===o&&"node"===a.type&&"string"==typeof a.replacement&&(a.replacement=r[a.replacement]?r[a.replacement]:i.parseExpression(a.replacement));var u=a.replacement;switch(a.type){case"boolean":e.replaceWith(t.booleanLiteral(u));break;case"node":t.isNode(u)&&e.replaceWith(u);break;default:var l=String(u);e.replaceWith(t.stringLiteral(l))}}}}}}},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("dynamicImport")}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{manipulateOptions:function(e,t){t.plugins.push("functionSent")}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(67)}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types,n={Function:function(e){e.skip()},YieldExpression:function(e,r){var n=e.node;if(n.delegate){var i=r.addHelper("asyncGeneratorDelegate");n.argument=t.callExpression(i,[t.callExpression(r.addHelper("asyncIterator"),[n.argument]),t.memberExpression(r.addHelper("asyncGenerator"),t.identifier("await"))])}}};return{inherits:r(195),visitor:{Function:function(e,r){e.node.async&&e.node.generator&&(e.traverse(n,r),(0,i.default)(e,r.file,{wrapAsync:t.memberExpression(r.addHelper("asyncGenerator"),t.identifier("wrap")),wrapAwait:t.memberExpression(r.addHelper("asyncGenerator"),t.identifier("await"))}))}}}};var n=r(124),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return{inherits:r(67),visitor:{Function:function(e,t){e.node.async&&!e.node.generator&&(0,i.default)(e,t.file,{wrapAsync:t.addImport(t.opts.module,t.opts.method)})}}}};var n=r(124),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e,t){if(!t.applyDecoratedDescriptor){t.applyDecoratedDescriptor=e.scope.generateUidIdentifier("applyDecoratedDescriptor");var r=f({NAME:t.applyDecoratedDescriptor});e.scope.getProgramParent().path.unshiftContainer("body",r)}return t.applyDecoratedDescriptor}function n(e,t){if(!t.initializerDefineProp){t.initializerDefineProp=e.scope.generateUidIdentifier("initDefineProp");var r=c({NAME:t.initializerDefineProp});e.scope.getProgramParent().path.unshiftContainer("body",r)}return t.initializerDefineProp}function i(e,t){if(!t.initializerWarningHelper){t.initializerWarningHelper=e.scope.generateUidIdentifier("initializerWarningHelper");var r=l({NAME:t.initializerWarningHelper});e.scope.getProgramParent().path.unshiftContainer("body",r)}return t.initializerWarningHelper}function p(e){var t=(e.isClass()?[e].concat(e.get("body.body")):e.get("properties")).reduce(function(e,t){return e.concat(t.node.decorators||[])},[]),r=t.filter(function(e){return!v.isIdentifier(e.expression)});if(0!==r.length)return v.sequenceExpression(r.map(function(t){var r=t.expression,n=t.expression=e.scope.generateDeclaredUidIdentifier("dec");return v.assignmentExpression("=",n,r)}).concat([e.node]))}function d(e,t){var r=e.node.decorators||[];if(e.node.decorators=null,0!==r.length){var n=e.scope.generateDeclaredUidIdentifier("class");return r.map(function(e){return e.expression}).reverse().reduce(function(e,t){return s({CLASS_REF:n,DECORATOR:t,INNER:e}).expression},e.node)}}function h(e,t){if(e.node.body.body.some(function(e){return(e.decorators||[]).length>0}))return y(e,t,e.node.body.body)}function m(e,t){if(e.node.properties.some(function(e){return(e.decorators||[]).length>0}))return y(e,t,e.node.properties)}function y(e,r,n){var s=(e.scope.generateDeclaredUidIdentifier("desc"),e.scope.generateDeclaredUidIdentifier("value"), -e.scope.generateDeclaredUidIdentifier(e.isClass()?"class":"obj")),l=n.reduce(function(n,l){var c=l.decorators||[];if(l.decorators=null,0===c.length)return n;if(l.computed)throw e.buildCodeFrameError("Computed method/property decorators are not yet supported.");var f=v.isLiteral(l.key)?l.key:v.stringLiteral(l.key.name),p=e.isClass()&&!l.static?a({CLASS_REF:s}).expression:s;if(v.isClassProperty(l,{static:!1})){var d=e.scope.generateDeclaredUidIdentifier("descriptor"),h=l.value?v.functionExpression(null,[],v.blockStatement([v.returnStatement(l.value)])):v.nullLiteral();l.value=v.callExpression(i(e,r),[d,v.thisExpression()]),n=n.concat([v.assignmentExpression("=",d,v.callExpression(t(e,r),[p,f,v.arrayExpression(c.map(function(e){return e.expression})),v.objectExpression([v.objectProperty(v.identifier("enumerable"),v.booleanLiteral(!0)),v.objectProperty(v.identifier("initializer"),h)])]))])}else n=n.concat(v.callExpression(t(e,r),[p,f,v.arrayExpression(c.map(function(e){return e.expression})),v.isObjectProperty(l)||v.isClassProperty(l,{static:!0})?u({TEMP:e.scope.generateDeclaredUidIdentifier("init"),TARGET:p,PROPERTY:f}).expression:o({TARGET:p,PROPERTY:f}).expression,p]));return n},[]);return v.sequenceExpression([v.assignmentExpression("=",s,e.node),v.sequenceExpression(l),s])}var v=e.types;return{inherits:r(125),visitor:{ExportDefaultDeclaration:function(e){if(e.get("declaration").isClassDeclaration()){var t=e.node,r=t.declaration.id||e.scope.generateUidIdentifier("default");t.declaration.id=r,e.replaceWith(t.declaration),e.insertAfter(v.exportNamedDeclaration(null,[v.exportSpecifier(r,v.identifier("default"))]))}},ClassDeclaration:function(e){var t=e.node,r=t.id||e.scope.generateUidIdentifier("class");e.replaceWith(v.variableDeclaration("let",[v.variableDeclarator(r,v.toExpression(t))]))},ClassExpression:function(e,t){var r=p(e)||d(e,t)||h(e,t);r&&e.replaceWith(r)},ObjectExpression:function(e,t){var r=p(e)||m(e,t);r&&e.replaceWith(r)},AssignmentExpression:function(e,t){t.initializerWarningHelper&&e.get("left").isMemberExpression()&&e.get("left.property").isIdentifier()&&e.get("right").isCallExpression()&&e.get("right.callee").isIdentifier({name:t.initializerWarningHelper.name})&&e.replaceWith(v.callExpression(n(e,t),[e.get("left.object").node,v.stringLiteral(e.get("left.property").node.name),e.get("right.arguments")[0].node,e.get("right.arguments")[1].node]))}}}};var n=r(4),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=(0,i.default)("\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n"),a=(0,i.default)("\n CLASS_REF.prototype;\n"),o=(0,i.default)("\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n"),u=(0,i.default)("\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n"),l=(0,i.default)("\n function NAME(descriptor, context){\n throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');\n }\n"),c=(0,i.default)("\n function NAME(target, property, descriptor, context){\n if (!descriptor) return;\n\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n"),f=(0,i.default)("\n function NAME(target, property, decorators, descriptor, context){\n var desc = {};\n Object['ke' + 'ys'](descriptor).forEach(function(key){\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer){\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function(desc, decorator){\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0){\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0){\n // This is a hack to avoid this being processed by 'transform-runtime'.\n // See issue #9.\n Object['define' + 'Property'](target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n")},function(e,t,r){"use strict";function n(e,t){var r=t._guessExecutionStatusRelativeTo(e);return"before"===r?"inside":"after"===r?"outside":"maybe"}function i(e,t){return o.callExpression(t.addHelper("temporalRef"),[e,o.stringLiteral(e.name),t.addHelper("temporalUndefined")])}function s(e,t,r){var n=r.letReferences[e.name];return!!n&&t.getBindingIdentifier(e.name)===n}t.__esModule=!0,t.visitor=void 0;var a=r(1),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a);t.visitor={ReferencedIdentifier:function(e,t){if(this.file.opts.tdz){var r=e.node,a=e.parent,u=e.scope;if(!e.parentPath.isFor({left:r})&&s(r,u,t)){var l=u.getBinding(r.name).path,c=n(e,l);if("inside"!==c)if("maybe"===c){var f=i(r,t.file);if(l.parent._tdzThis=!0,e.skip(),e.parentPath.isUpdateExpression()){if(a._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(o.sequenceExpression([f,a]))}else e.replaceWith(f)}else"outside"===c&&e.replaceWith(o.throwStatement(o.inherits(o.newExpression(o.identifier("ReferenceError"),[o.stringLiteral(r.name+" is not defined - temporal dead zone")]),r)))}}},AssignmentExpression:{exit:function(e,t){if(this.file.opts.tdz){var r=e.node;if(!r._ignoreBlockScopingTDZ){var n=[],a=e.getBindingIdentifiers();for(var u in a){var l=a[u];s(l,e.scope,t)&&n.push(i(l,t.file))}n.length&&(r._ignoreBlockScopingTDZ=!0,n.push(r),e.replaceWithMultiple(n.map(o.expressionStatement)))}}}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(42),o=n(a),u=r(41),l=n(u),c=r(40),f=n(c),p=r(207),d=n(p),h=r(1),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(h),y=function(e){function t(){(0,s.default)(this,t);var r=(0,o.default)(this,e.apply(this,arguments));return r.isLoose=!0,r}return(0,l.default)(t,e),t.prototype._processMethod=function(e,t){if(!e.decorators){var r=this.classRef;e.static||(r=m.memberExpression(r,m.identifier("prototype")));var n=m.memberExpression(r,e.key,e.computed||m.isLiteral(e.key)),i=m.functionExpression(null,e.params,e.body,e.generator,e.async);i.returnType=e.returnType;var s=m.toComputedKey(e,e.key);m.isStringLiteral(s)&&(i=(0,f.default)({node:i,id:s,scope:t}));var a=m.expressionStatement(m.assignmentExpression("=",n,i));return m.inheritsComments(a,e),this.body.push(a),!0}},t}(d.default);t.default=y,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{BinaryExpression:function(e){var r=e.node;"instanceof"===r.operator&&e.replaceWith(t.callExpression(this.addHelper("instanceof"),[r.left,r.right]))}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=e.params,r=Array.isArray(t),n=0,t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(!m.isIdentifier(s))return!0}return!1}function s(e,t){if(!e.hasOwnBinding(t.name))return!0;var r=e.getOwnBinding(t.name),n=r.kind;return"param"===n||"local"===n}t.__esModule=!0,t.visitor=void 0;var a=r(2),o=n(a),u=r(189),l=n(u),c=r(317),f=n(c),p=r(4),d=n(p),h=r(1),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(h),y=(0,d.default)("\n let VARIABLE_NAME =\n ARGUMENTS.length > ARGUMENT_KEY && ARGUMENTS[ARGUMENT_KEY] !== undefined ?\n ARGUMENTS[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n"),v=(0,d.default)("\n let $0 = $1[$2];\n"),g={ReferencedIdentifier:function(e,t){var r=e.scope,n=e.node;"eval"!==n.name&&s(r,n)||(t.iife=!0,e.stop())},Scope:function(e){e.skip()}};t.visitor={Function:function(e){var t=e.node,r=e.scope;if(i(t)){e.ensureBlock();var n={iife:!1,scope:r},a=[],o=m.identifier("arguments");o._shadowedFunctionLiteral=e;for(var u=(0,l.default)(t),c=e.get("params"),p=0;p<c.length;p++){var d=c[p];if(d.isAssignmentPattern()){var h=d.get("left"),b=d.get("right");if(p>=u||h.isPattern()){var E=r.generateUidIdentifier("x");E._isDefaultPlaceholder=!0,t.params[p]=E}else t.params[p]=h.node;n.iife||(b.isIdentifier()&&!s(r,b.node)?n.iife=!0:b.traverse(g,n)),function(e,r,n){var i=y({VARIABLE_NAME:e,DEFAULT_VALUE:r,ARGUMENT_KEY:m.numericLiteral(n),ARGUMENTS:o});i._blockHoist=t.params.length-n,a.push(i)}(h.node,b.node,p)}else n.iife||d.isIdentifier()||d.traverse(g,n)}for(var x=u+1;x<t.params.length;x++){var A=t.params[x];if(!A._isDefaultPlaceholder){var S=v(A,o,m.numericLiteral(x));S._blockHoist=t.params.length-x,a.push(S)}}t.params=t.params.slice(0,u),n.iife?(a.push((0,f.default)(e,r)),e.set("body",m.blockStatement(a))):e.get("body").unshiftContainer("body",a)}}}},function(e,t,r){"use strict";t.__esModule=!0,t.visitor=void 0;var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.visitor={Function:function(e){for(var t=e.get("params"),r=i.isRestElement(t[t.length-1])?1:0,n=t.length-r,s=0;s<n;s++){var a=t[s];if(a.isArrayPattern()||a.isObjectPattern()){var o=e.scope.generateUidIdentifier("ref"),u=i.variableDeclaration("let",[i.variableDeclarator(a.node,o)]);u._blockHoist=n-s,e.ensureBlock(),e.get("body").unshiftContainer("body",u),a.replaceWith(o)}}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return p.isRestElement(e.params[e.params.length-1])}function s(e,t,r){var n=void 0;n=p.isNumericLiteral(e.parent.property)?p.numericLiteral(e.parent.property.value+r):0===r?e.parent.property:p.binaryExpression("+",e.parent.property,p.numericLiteral(r));var i=e.scope;if(i.isPure(n))e.parentPath.replaceWith(h({ARGUMENTS:t,INDEX:n}));else{var s=i.generateUidIdentifierBasedOnNode(n);i.push({id:s,kind:"var"}),e.parentPath.replaceWith(m({ARGUMENTS:t,INDEX:n,REF:s}))}}function a(e,t,r){r?e.parentPath.replaceWith(y({ARGUMENTS:t,OFFSET:p.numericLiteral(r)})):e.replaceWith(t)}t.__esModule=!0,t.visitor=void 0;var o=r(2),u=n(o),l=r(4),c=n(l),f=r(1),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(f),d=(0,c.default)("\n for (var LEN = ARGUMENTS.length,\n ARRAY = Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n"),h=(0,c.default)("\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n"),m=(0,c.default)("\n REF = INDEX, ARGUMENTS.length <= REF ? undefined : ARGUMENTS[REF]\n"),y=(0,c.default)("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n"),v={Scope:function(e,t){e.scope.bindingIdentifierEquals(t.name,t.outerBinding)||e.skip()},Flow:function(e){e.isTypeCastExpression()||e.skip()},"Function|ClassProperty":function(e,t){var r=t.noOptimise;t.noOptimise=!0,e.traverse(v,t),t.noOptimise=r,e.skip()},ReferencedIdentifier:function(e,t){var r=e.node;if("arguments"===r.name&&(t.deopted=!0),r.name===t.name)if(t.noOptimise)t.deopted=!0;else{var n=e.parentPath;if("params"===n.listKey&&n.key<t.offset)return;if(n.isMemberExpression({object:r})){var i=n.parentPath,s=!t.deopted&&!(i.isAssignmentExpression()&&n.node===i.node.left||i.isLVal()||i.isForXStatement()||i.isUpdateExpression()||i.isUnaryExpression({operator:"delete"})||(i.isCallExpression()||i.isNewExpression())&&n.node===i.node.callee);if(s)if(n.node.computed){if(n.get("property").isBaseType("number"))return void t.candidates.push({cause:"indexGetter",path:e})}else if("length"===n.node.property.name)return void t.candidates.push({cause:"lengthGetter",path:e})}if(0===t.offset&&n.isSpreadElement()){var a=n.parentPath;if(a.isCallExpression()&&1===a.node.arguments.length)return void t.candidates.push({cause:"argSpread",path:e})}t.references.push(e)}},BindingIdentifier:function(e,t){e.node.name===t.name&&(t.deopted=!0)}};t.visitor={Function:function(e){var t=e.node,r=e.scope;if(i(t)){var n=t.params.pop().argument,o=p.identifier("arguments");o._shadowedFunctionLiteral=e;var l={references:[],offset:t.params.length,argumentsNode:o,outerBinding:r.getBindingIdentifier(n.name),candidates:[],name:n.name,deopted:!1};if(e.traverse(v,l),l.deopted||l.references.length){l.references=l.references.concat(l.candidates.map(function(e){return e.path})),l.deopted=l.deopted||!!t.shadow;var c=p.numericLiteral(t.params.length),f=r.generateUidIdentifier("key"),h=r.generateUidIdentifier("len"),m=f,y=h;t.params.length&&(m=p.binaryExpression("-",f,c),y=p.conditionalExpression(p.binaryExpression(">",h,c),p.binaryExpression("-",h,c),p.numericLiteral(0)));var g=d({ARGUMENTS:o,ARRAY_KEY:m,ARRAY_LEN:y,START:c,ARRAY:n,KEY:f,LEN:h});if(l.deopted)g._blockHoist=t.params.length+1,t.body.body.unshift(g);else{g._blockHoist=1;var b=e.getEarliestCommonAncestorFrom(l.references).getStatementParent();b.findParent(function(e){if(!e.isLoop())return e.isFunction();b=e}),b.insertBefore(g)}}else for(var E=l.candidates,x=Array.isArray(E),A=0,E=x?E:(0,u.default)(E);;){var S;if(x){if(A>=E.length)break;S=E[A++]}else{if(A=E.next(),A.done)break;S=A.value}var _=S,D=_.path,C=_.cause;switch(C){case"indexGetter":s(D,o,l.offset);break;case"lengthGetter":a(D,o,l.offset);break;default:D.replaceWith(o)}}}}}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{MemberExpression:{exit:function(e){var r=e.node,n=r.property;r.computed||!t.isIdentifier(n)||t.isValidIdentifier(n.name)||(r.property=t.stringLiteral(n.name),r.computed=!0)}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{ObjectProperty:{exit:function(e){var r=e.node,n=r.key;r.computed||!t.isIdentifier(n)||t.isValidIdentifier(n.name)||(r.key=t.stringLiteral(n.name))}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){var t=e.types;return{visitor:{ObjectExpression:function(e,r){for(var n=e.node,s=!1,o=n.properties,u=Array.isArray(o),l=0,o=u?o:(0,i.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var f=c;if("get"===f.kind||"set"===f.kind){s=!0;break}}if(s){var p={};n.properties=n.properties.filter(function(e){return!!(e.computed||"get"!==e.kind&&"set"!==e.kind)||(a.push(p,e,null,r),!1)}),e.replaceWith(t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("defineProperties")),[n,a.toDefineObject(p)]))}}}}};var s=r(188),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s);e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.parse,r=e.traverse;return{visitor:{CallExpression:function(e){if(e.get("callee").isIdentifier({name:"eval"})&&1===e.node.arguments.length){var n=e.get("arguments")[0].evaluate();if(!n.confident)return;var i=n.value;if("string"!=typeof i)return;var s=t(i);return r.removeProperties(s),s.program}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){e.addComment("trailing",n(e,t)),e.replaceWith(i.noop())}function n(e,t){var r=e.getSource().replace(/\*-\//g,"*-ESCAPED/").replace(/\*\//g,"*-/");return t&&t.optional&&(r="?"+r),":"!==r[0]&&(r=":: "+r),r}var i=e.types;return{inherits:r(126),visitor:{TypeCastExpression:function(e){var t=e.node;e.get("expression").addComment("trailing",n(e.get("typeAnnotation"))),e.replaceWith(i.parenthesizedExpression(t.expression))},Identifier:function(e){var t=e.node;t.optional&&!t.typeAnnotation&&e.addComment("trailing",":: ?")},AssignmentPattern:{exit:function(e){e.node.left.optional=!1}},Function:{exit:function(e){e.node.params.forEach(function(e){return e.optional=!1})}},ClassProperty:function(e){var r=e.node,n=e.parent;r.value||t(e,n)},"ExportNamedDeclaration|Flow":function(e){var r=e.node,n=e.parent;i.isExportNamedDeclaration(r)&&!i.isFlow(r.declaration)||t(e,n)},ImportDeclaration:function(e){var r=e.node,n=e.parent;i.isImportDeclaration(r)&&"type"!==r.importKind&&"typeof"!==r.importKind||t(e,n)}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{FunctionExpression:{exit:function(e){var r=e.node;r.id&&(r._ignoreUserWhitespace=!0,e.replaceWith(t.callExpression(t.functionExpression(null,[],t.blockStatement([t.toStatement(r),t.returnStatement(r.id)])),[])))}}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.assign")&&(e.node.callee=t.addHelper("extends"))}}}},e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(){return{visitor:{CallExpression:function(e,t){e.get("callee").matchesPattern("Object.setPrototypeOf")&&(e.node.callee=t.addHelper("defaults"))}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i);t.default=function(e){function t(e){return i.isLiteral(i.toComputedKey(e,e.key),{value:"__proto__"})}function r(e){var t=e.left;return i.isMemberExpression(t)&&i.isLiteral(i.toComputedKey(t,t.property),{value:"__proto__"})}function n(e,t,r){return i.expressionStatement(i.callExpression(r.addHelper("defaults"),[t,e.right]))}var i=e.types;return{visitor:{AssignmentExpression:function(e,t){if(r(e.node)){var s=[],a=e.node.left.object,o=e.scope.maybeGenerateMemoised(a);o&&s.push(i.expressionStatement(i.assignmentExpression("=",o,a))),s.push(n(e.node,o||a,t)),o&&s.push(o),e.replaceWithMultiple(s)}},ExpressionStatement:function(e,t){var s=e.node.expression;i.isAssignmentExpression(s,{operator:"="})&&r(s)&&e.replaceWith(n(s,s.left.object,t))},ObjectExpression:function(e,r){for(var n=void 0,a=e.node,u=a.properties,l=Array.isArray(u),c=0,u=l?u:(0,s.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;t(p)&&(n=p.value,(0,o.default)(a.properties,p))}if(n){var d=[i.objectExpression([]),n];a.properties.length&&d.push(a),e.replaceWith(i.callExpression(r.addHelper("extends"),d))}}}}};var a=r(277),o=n(a);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(11),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){var t=e.types,r={enter:function(e,r){var n=function(){r.isImmutable=!1,e.stop()};if(e.isJSXClosingElement())return void e.skip();if(e.isJSXIdentifier({name:"ref"})&&e.parentPath.isJSXAttribute({name:e.node}))return n();if(!(e.isJSXIdentifier()||e.isIdentifier()||e.isJSXMemberExpression()||e.isImmutable())){if(e.isPure()){var s=e.evaluate();if(s.confident){var a=s.value;if(!(a&&"object"===(void 0===a?"undefined":(0,i.default)(a))||"function"==typeof a))return}else if(t.isIdentifier(s.deopt))return}n()}}};return{visitor:{JSXElement:function(e){if(!e.node._hoisted){var t={isImmutable:!0};e.traverse(r,t),t.isImmutable?e.hoist():e.node._hoisted=!0}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(2),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default=function(e){function t(e){for(var t=0;t<e.length;t++){var n=e[t];if(s.isJSXSpreadAttribute(n))return!0;if(r(n,"ref"))return!0}return!1}function r(e,t){return s.isJSXAttribute(e)&&s.isJSXIdentifier(e.name,{name:t})}function n(e){var t=e.value;return t?(s.isJSXExpressionContainer(t)&&(t=t.expression),t):s.identifier("true")}var s=e.types;return{visitor:{JSXElement:function(e,a){var o=e.node,u=o.openingElement;if(!t(u.attributes)){var l=s.objectExpression([]),c=null,f=u.name;s.isJSXIdentifier(f)&&s.react.isCompatTag(f.name)&&(f=s.stringLiteral(f.name));for(var p=u.attributes,d=Array.isArray(p),h=0,p=d?p:(0,i.default)(p);;){var m;if(d){if(h>=p.length)break;m=p[h++]}else{if(h=p.next(),h.done)break;m=h.value}var y=m;if(r(y,"key"))c=n(y);else{var v=y.name.name,g=s.isValidIdentifier(v)?s.identifier(v):s.stringLiteral(v);!function(e,t,r){e.push(s.objectProperty(t,r))}(l.properties,g,n(y))}}var b=[f,l];if(c||o.children.length){var E=s.react.buildChildren(o);b.push.apply(b,[c||s.unaryExpression("void",s.numericLiteral(0),!0)].concat(E))}var x=s.callExpression(a.addHelper("jsx"),b);e.replaceWith(x)}}}}},e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{manipulateOptions:function(e,t){t.plugins.push("jsx")},visitor:(0,i.default)({pre:function(e){e.callee=e.tagExpr},post:function(e){t.react.isCompatTag(e.tagName)&&(e.call=t.callExpression(t.memberExpression(t.memberExpression(t.identifier("React"),t.identifier("DOM")),e.tagExpr,t.isLiteral(e.tagExpr)),e.args))}})}};var n=r(348),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){function t(e,r){if(a.isJSXIdentifier(e)){if("this"===e.name&&a.isReferenced(e,r))return a.thisExpression();if(!i.default.keyword.isIdentifierNameES6(e.name))return a.stringLiteral(e.name);e.type="Identifier"}else if(a.isJSXMemberExpression(e))return a.memberExpression(t(e.object,e),t(e.property,e));return e}function r(e){return a.isJSXExpressionContainer(e)?e.expression:e}function n(e){var t=r(e.value||a.booleanLiteral(!0));return a.isStringLiteral(t)&&!a.isJSXExpressionContainer(e.value)&&(t.value=t.value.replace(/\n\s+/g," ")),a.isValidIdentifier(e.name.name)?e.name.type="Identifier":e.name=a.stringLiteral(e.name.name),a.inherits(a.objectProperty(e.name,t),e)}function s(r,n){r.parent.children=a.react.buildChildren(r.parent);var i=t(r.node.name,r.node),s=[],u=void 0;a.isIdentifier(i)?u=i.name:a.isLiteral(i)&&(u=i.value);var l={tagExpr:i,tagName:u,args:s};e.pre&&e.pre(l,n);var c=r.node.attributes;return c=c.length?o(c,n):a.nullLiteral(),s.push(c),e.post&&e.post(l,n),l.call||a.callExpression(l.callee,s)}function o(e,t){function r(){i.length&&(s.push(a.objectExpression(i)),i=[])}var i=[],s=[],o=t.opts.useBuiltIns||!1;if("boolean"!=typeof o)throw new Error("transform-react-jsx currently only accepts a boolean option for useBuiltIns (defaults to false)");for(;e.length;){var u=e.shift();a.isJSXSpreadAttribute(u)?(r(),s.push(u.argument)):i.push(n(u))}if(r(),1===s.length)e=s[0];else{a.isObjectExpression(s[0])||s.unshift(a.objectExpression([]));var l=o?a.memberExpression(a.identifier("Object"),a.identifier("assign")):t.addHelper("extends");e=a.callExpression(l,s)}return e}var u={};return u.JSXNamespacedName=function(e){throw e.buildCodeFrameError("Namespace tags are not supported. ReactJSX is not XML.")},u.JSXElement={exit:function(e,t){var r=s(e.get("openingElement"),t);r.arguments=r.arguments.concat(e.node.children),r.arguments.length>=3&&(r._prettyCall=!0),e.replaceWith(a.inherits(r,e.node))}},u};var n=r(97),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=r(1),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s);e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=e.types;return{visitor:{JSXOpeningElement:function(e){var n=e.node,i=t.jSXIdentifier(r),s=t.thisExpression();n.attributes.push(t.jSXAttribute(i,t.jSXExpressionContainer(s)))}}}};var r="__self";e.exports=t.default},function(e,t){"use strict";t.__esModule=!0,t.default=function(e){function t(e,t){var r=null!=t?i.numericLiteral(t):i.nullLiteral(),n=i.objectProperty(i.identifier("fileName"),e),s=i.objectProperty(i.identifier("lineNumber"),r);return i.objectExpression([n,s])}var i=e.types;return{visitor:{JSXOpeningElement:function(e,s){var a=i.jSXIdentifier(r),o=e.container.openingElement.loc;if(o){for(var u=e.container.openingElement.attributes,l=0;l<u.length;l++){var c=u[l].name;if(c&&c.name===r)return}if(!s.fileNameIdentifier){var f="unknown"!==s.file.log.filename?s.file.log.filename:null,p=e.scope.generateUidIdentifier(n);e.hub.file.scope.push({id:p,init:i.stringLiteral(f)}),s.fileNameIdentifier=p}var d=t(s.fileNameIdentifier,o.start.line);u.push(i.jSXAttribute(a,i.jSXExpressionContainer(d)))}}}}};var r="__source",n="_jsxFileName";e.exports=t.default},348,function(e,t){"use strict";e.exports={builtins:{Symbol:"symbol",Promise:"promise",Map:"map",WeakMap:"weak-map",Set:"set",WeakSet:"weak-set",Observable:"observable",setImmediate:"set-immediate",clearImmediate:"clear-immediate",asap:"asap"},methods:{Array:{concat:"array/concat",copyWithin:"array/copy-within",entries:"array/entries",every:"array/every",fill:"array/fill",filter:"array/filter",findIndex:"array/find-index",find:"array/find",forEach:"array/for-each",from:"array/from",includes:"array/includes",indexOf:"array/index-of",join:"array/join",keys:"array/keys",lastIndexOf:"array/last-index-of",map:"array/map",of:"array/of",pop:"array/pop",push:"array/push",reduceRight:"array/reduce-right",reduce:"array/reduce",reverse:"array/reverse",shift:"array/shift",slice:"array/slice",some:"array/some",sort:"array/sort",splice:"array/splice",unshift:"array/unshift",values:"array/values"},JSON:{stringify:"json/stringify"},Object:{assign:"object/assign",create:"object/create",defineProperties:"object/define-properties",defineProperty:"object/define-property",entries:"object/entries",freeze:"object/freeze",getOwnPropertyDescriptor:"object/get-own-property-descriptor",getOwnPropertyDescriptors:"object/get-own-property-descriptors",getOwnPropertyNames:"object/get-own-property-names",getOwnPropertySymbols:"object/get-own-property-symbols",getPrototypeOf:"object/get-prototype-of",isExtensible:"object/is-extensible",isFrozen:"object/is-frozen",isSealed:"object/is-sealed",is:"object/is",keys:"object/keys",preventExtensions:"object/prevent-extensions",seal:"object/seal",setPrototypeOf:"object/set-prototype-of",values:"object/values"},RegExp:{escape:"regexp/escape"},Math:{acosh:"math/acosh",asinh:"math/asinh",atanh:"math/atanh",cbrt:"math/cbrt",clz32:"math/clz32",cosh:"math/cosh",expm1:"math/expm1",fround:"math/fround",hypot:"math/hypot",imul:"math/imul",log10:"math/log10",log1p:"math/log1p",log2:"math/log2",sign:"math/sign",sinh:"math/sinh",tanh:"math/tanh",trunc:"math/trunc",iaddh:"math/iaddh",isubh:"math/isubh",imulh:"math/imulh",umulh:"math/umulh"},Symbol:{for:"symbol/for",hasInstance:"symbol/has-instance",isConcatSpreadable:"symbol/is-concat-spreadable",iterator:"symbol/iterator",keyFor:"symbol/key-for",match:"symbol/match",replace:"symbol/replace",search:"symbol/search",species:"symbol/species",split:"symbol/split",toPrimitive:"symbol/to-primitive",toStringTag:"symbol/to-string-tag",unscopables:"symbol/unscopables"},String:{at:"string/at",codePointAt:"string/code-point-at",endsWith:"string/ends-with",fromCodePoint:"string/from-code-point",includes:"string/includes",matchAll:"string/match-all",padLeft:"string/pad-left",padRight:"string/pad-right",padStart:"string/pad-start",padEnd:"string/pad-end",raw:"string/raw",repeat:"string/repeat",startsWith:"string/starts-with",trim:"string/trim",trimLeft:"string/trim-left",trimRight:"string/trim-right",trimStart:"string/trim-start",trimEnd:"string/trim-end"},Number:{EPSILON:"number/epsilon",isFinite:"number/is-finite",isInteger:"number/is-integer",isNaN:"number/is-nan",isSafeInteger:"number/is-safe-integer",MAX_SAFE_INTEGER:"number/max-safe-integer",MIN_SAFE_INTEGER:"number/min-safe-integer",parseFloat:"number/parse-float",parseInt:"number/parse-int"},Reflect:{apply:"reflect/apply",construct:"reflect/construct",defineProperty:"reflect/define-property",deleteProperty:"reflect/delete-property",enumerate:"reflect/enumerate",getOwnPropertyDescriptor:"reflect/get-own-property-descriptor",getPrototypeOf:"reflect/get-prototype-of",get:"reflect/get",has:"reflect/has",isExtensible:"reflect/is-extensible",ownKeys:"reflect/own-keys",preventExtensions:"reflect/prevent-extensions",setPrototypeOf:"reflect/set-prototype-of",set:"reflect/set",defineMetadata:"reflect/define-metadata",deleteMetadata:"reflect/delete-metadata",getMetadata:"reflect/get-metadata",getMetadataKeys:"reflect/get-metadata-keys",getOwnMetadata:"reflect/get-own-metadata",getOwnMetadataKeys:"reflect/get-own-metadata-keys",hasMetadata:"reflect/has-metadata",hasOwnMetadata:"reflect/has-own-metadata",metadata:"reflect/metadata"},System:{global:"system/global"},Error:{isError:"error/is-error"},Date:{},Function:{}}}},function(e,t,r){"use strict";t.__esModule=!0,t.definitions=void 0,t.default=function(e){function t(e){return e.moduleName||"babel-runtime"}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var n=e.types,s=["interopRequireWildcard","interopRequireDefault"];return{pre:function(e){var r=t(this.opts);!1!==this.opts.helpers&&e.set("helperGenerator",function(t){if(s.indexOf(t)<0)return e.addImport(r+"/helpers/"+t,"default",t)}),this.setDynamic("regeneratorIdentifier",function(){return e.addImport(r+"/regenerator","default","regeneratorRuntime")})},visitor:{ReferencedIdentifier:function(e,s){var a=e.node,o=e.parent,u=e.scope;if("regeneratorRuntime"===a.name&&!1!==s.opts.regenerator)return void e.replaceWith(s.get("regeneratorIdentifier"));if(!1!==s.opts.polyfill&&!n.isMemberExpression(o)&&r(i.default.builtins,a.name)&&!u.getBindingIdentifier(a.name)){var l=t(s.opts);e.replaceWith(s.addImport(l+"/core-js/"+i.default.builtins[a.name],"default",a.name))}},CallExpression:function(e,r){if(!1!==r.opts.polyfill&&!e.node.arguments.length){var i=e.node.callee;if(n.isMemberExpression(i)&&i.computed&&e.get("callee.property").matchesPattern("Symbol.iterator")){var s=t(r.opts);e.replaceWith(n.callExpression(r.addImport(s+"/core-js/get-iterator","default","getIterator"),[i.object]))}}},BinaryExpression:function(e,r){if(!1!==r.opts.polyfill&&"in"===e.node.operator&&e.get("left").matchesPattern("Symbol.iterator")){var i=t(r.opts);e.replaceWith(n.callExpression(r.addImport(i+"/core-js/is-iterable","default","isIterable"),[e.node.right]))}},MemberExpression:{enter:function(e,s){if(!1!==s.opts.polyfill&&e.isReferenced()){var a=e.node,o=a.object,u=a.property;if(n.isReferenced(o,a)&&!a.computed&&r(i.default.methods,o.name)){var l=i.default.methods[o.name];if(r(l,u.name)&&!e.scope.getBindingIdentifier(o.name)){if("Object"===o.name&&"defineProperty"===u.name&&e.parentPath.isCallExpression()){var c=e.parentPath.node;if(3===c.arguments.length&&n.isLiteral(c.arguments[1]))return}var f=t(s.opts);e.replaceWith(s.addImport(f+"/core-js/"+l[u.name],"default",o.name+"$"+u.name))}}}},exit:function(e,s){if(!1!==s.opts.polyfill&&e.isReferenced()){var a=e.node,o=a.object;if(r(i.default.builtins,o.name)&&!e.scope.getBindingIdentifier(o.name)){var u=t(s.opts);e.replaceWith(n.memberExpression(s.addImport(u+"/core-js/"+i.default.builtins[o.name],"default",o.name),a.property,a.computed))}}}}}}};var n=r(352),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.definitions=i.default},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e){var t=e.messages;return{visitor:{ReferencedIdentifier:function(e){var r=e.node,n=e.scope,s=n.getBinding(r.name) -;if(s&&"type"===s.kind&&!e.parentPath.isFlow())throw e.buildCodeFrameError(t.get("undeclaredVariableType",r.name),ReferenceError);if(!n.hasBinding(r.name)){var a=n.getAllBindings(),o=void 0,u=-1;for(var l in a){var c=(0,i.default)(r.name,l);c<=0||c>3||(c<=u||(o=l,u=c))}var f=void 0;throw f=o?t.get("undeclaredVariableSuggestion",r.name,o):t.get("undeclaredVariable",r.name),e.buildCodeFrameError(f,ReferenceError)}}}}};var n=r(471),i=function(e){return e&&e.__esModule?e:{default:e}}(n);e.exports=t.default},function(e,t,r){"use strict";t.__esModule=!0;var n=r(211),i=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={plugins:[i.default]},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{presets:[!1!==t.es2015&&[s.default.buildPreset,t.es2015],!1!==t.es2016&&o.default,!1!==t.es2017&&l.default].filter(Boolean)}};var i=r(217),s=n(i),a=r(218),o=n(a),u=r(219),l=n(u);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(355),s=n(i),a=r(215),o=n(a),u=r(127),l=n(u),c=r(214),f=n(c);t.default={presets:[s.default],plugins:[o.default,l.default,f.default],env:{development:{plugins:[]}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(220),s=n(i),a=r(206),o=n(a),u=r(212),l=n(u);t.default={presets:[s.default],plugins:[o.default,l.default]},e.exports=t.default},function(e,t,r){"use strict";e.exports={default:r(407),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(410),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(412),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(413),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(415),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(416),__esModule:!0}},function(e,t,r){"use strict";e.exports={default:r(417),__esModule:!0}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(3),o=n(a),u=r(36),l=n(u),c=r(1),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c),p=function(){function e(t,r,n,i){(0,o.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=f.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;for(var n=r,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return l.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i<e.length;i++){var s=e[i];s&&this.shouldVisit(s)&&n.push(this.create(t,e,i,r))}return this.visitQueue(n)},e.prototype.visitSingle=function(e,t){return!!this.shouldVisit(e[t])&&this.visitQueue([this.create(e,e,t)])},e.prototype.visitQueue=function(e){this.queue=e,this.priorityQueue=[];for(var t=[],r=!1,n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&!(t.indexOf(u.node)>=0)){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,c=Array.isArray(l),f=0,l=c?l:(0,s.default)(l);;){var p;if(c){if(f>=l.length)break;p=l[f++]}else{if(f=l.next(),f.done)break;p=f.value}p.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();t.default=p,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function s(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function a(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function o(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)}function u(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n=void 0,i=g.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,y.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,c=l[t+1];if(n)if(c.listKey&&n.listKey===c.listKey&&c.key<n.key)n=c;else{var f=i.indexOf(n.parentKey),p=i.indexOf(c.parentKey);f>p&&(n=c)}else n=c}return n})}function l(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,i=void 0,s=void 0,a=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length<n&&(n=t.length),t}),o=a[0];e:for(var u=0;u<n;u++){for(var l=o[u],c=a,f=Array.isArray(c),p=0,c=f?c:(0,y.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;if(h[u]!==l)break e}i=u,s=l}if(s)return t?t(s,i,a):s;throw new Error("Couldn't find intersection")}function c(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t}function f(e){return e.isDescendant(this)}function p(e){return!!this.findParent(function(t){return t===e})}function d(){for(var e=this;e;){for(var t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(e.node.type===s)return!0}e=e.parentPath}return!1}function h(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}}t.__esModule=!0;var m=r(2),y=n(m);t.findParent=i,t.find=s,t.getFunctionParent=a,t.getStatementParent=o,t.getEarliestCommonAncestorFrom=u,t.getDeepestCommonAncestorFrom=l,t.getAncestry=c,t.isAncestor=f,t.isDescendant=p,t.inType=d,t.inShadow=h;var v=r(1),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(v),b=r(36);n(b)},function(e,t){"use strict";function r(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}}function n(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])}function i(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}t.__esModule=!0,t.shareCommentsWithSiblings=r,t.addComment=n,t.addComments=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])}function s(e){if(!e)return!1;for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,D.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(s){var a=this.node;if(!a)return!0;if(s.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+s);if(this.node!==a)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1}function a(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1}function o(){return!!this.node&&(!this.isBlacklisted()&&((!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),w.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))))}function u(){this.shouldSkip=!0}function l(e){this.skipKeys[e]=!0}function c(){this.shouldStop=!0,this.shouldSkip=!0}function f(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}}function p(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this}function d(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function h(){this.parentPath&&(this.parent=this.parentPath.node)}function m(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e<this.container.length;e++)if(this.container[e]===this.node)return this.setKey(e)}else for(var t in this.container)if(this.container[t]===this.node)return this.setKey(t);this.key=null}}function y(){if(this.parent&&this.inList){var e=this.parent[this.listKey];this.container!==e&&(this.container=e||null)}}function v(){null!=this.key&&this.container&&this.container[this.key]===this.node||this._markRemoved()}function g(){this.contexts.pop(),this.setContext(this.contexts[this.contexts.length-1])}function b(e){this.contexts.push(e),this.setContext(e)}function E(e,t,r,n){this.inList=!!r,this.listKey=r,this.parentKey=r||n,this.container=t,this.parentPath=e||this.parentPath,this.setKey(n)}function x(e){this.key=e,this.node=this.container[this.key],this.type=this.node&&this.node.type}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed)for(var t=this.contexts,r=t,n=Array.isArray(r),i=0,r=n?r:(0,D.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.maybeQueue(e)}}function S(){for(var e=this,t=this.contexts;!t.length;)e=e.parentPath,t=e.contexts;return t}t.__esModule=!0;var _=r(2),D=n(_);t.call=i,t._call=s,t.isBlacklisted=a,t.visit=o,t.skip=u,t.skipKey=l,t.stop=c,t.setScope=f,t.setContext=p,t.resync=d,t._resyncParent=h,t._resyncKey=m,t._resyncList=y,t._resyncRemoved=v,t.popContext=g,t.pushContext=b,t.setup=E,t.setKey=x,t.requeue=A,t._getQueueContexts=S;var C=r(7),w=n(C)},function(e,t,r){"use strict";function n(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||o.isIdentifier(t)&&(t=o.stringLiteral(t.name)),t}function i(){return o.ensureBlock(this.node)}function s(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}}t.__esModule=!0,t.toComputedKey=n,t.ensureBlock=i,t.arrowFunctionToShadowed=s;var a=r(1),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this.evaluate();if(e.confident)return!!e.value}function s(){function t(e){i&&(s=e,i=!1)}function r(e){var r=e.node;if(a.has(r)){var s=a.get(r);return s.resolved?s.value:void t(e)}var o={resolved:!1};a.set(r,o);var u=n(e);return i&&(o.resolved=!0,o.value=u),u}function n(n){if(i){var s=n.node;if(n.isSequenceExpression()){var a=n.get("expressions");return r(a[a.length-1])}if(n.isStringLiteral()||n.isNumericLiteral()||n.isBooleanLiteral())return s.value;if(n.isNullLiteral())return null;if(n.isTemplateLiteral()){for(var u="",c=0,f=n.get("expressions"),h=s.quasis,m=Array.isArray(h),y=0,h=m?h:(0,l.default)(h);;){var v;if(m){if(y>=h.length)break;v=h[y++]}else{if(y=h.next(),y.done)break;v=y.value}var g=v;if(!i)break;u+=g.value.cooked;var b=f[c++];b&&(u+=String(r(b)))}if(!i)return;return u}if(n.isConditionalExpression()){var E=r(n.get("test"));if(!i)return;return r(E?n.get("consequent"):n.get("alternate"))}if(n.isExpressionWrapper())return r(n.get("expression"));if(n.isMemberExpression()&&!n.parentPath.isCallExpression({callee:s})){var x=n.get("property"),A=n.get("object");if(A.isLiteral()&&x.isIdentifier()){var S=A.node.value,_=void 0===S?"undefined":(0,o.default)(S);if("number"===_||"string"===_)return S[x.node.name]}}if(n.isReferencedIdentifier()){var D=n.scope.getBinding(s.name);if(D&&D.constantViolations.length>0)return t(D.path);if(D&&n.node.start<D.path.node.end)return t(D.path);if(D&&D.hasValue)return D.value;if("undefined"===s.name)return D?t(D.path):void 0;if("Infinity"===s.name)return D?t(D.path):1/0;if("NaN"===s.name)return D?t(D.path):NaN;var C=n.resolve();return C===n?t(n):r(C)}if(n.isUnaryExpression({prefix:!0})){if("void"===s.operator)return;var w=n.get("argument");if("typeof"===s.operator&&(w.isFunction()||w.isClass()))return"function";var P=r(w);if(!i)return;switch(s.operator){case"!":return!P;case"+":return+P;case"-":return-P;case"~":return~P;case"typeof":return void 0===P?"undefined":(0,o.default)(P)}}if(n.isArrayExpression()){for(var k=[],F=n.get("elements"),T=F,O=Array.isArray(T),B=0,T=O?T:(0,l.default)(T);;){var R;if(O){if(B>=T.length)break;R=T[B++]}else{if(B=T.next(),B.done)break;R=B.value}var I=R;if(I=I.evaluate(),!I.confident)return t(I);k.push(I.value)}return k}if(n.isObjectExpression()){for(var M={},N=n.get("properties"),L=N,j=Array.isArray(L),U=0,L=j?L:(0,l.default)(L);;){var V;if(j){if(U>=L.length)break;V=L[U++]}else{if(U=L.next(),U.done)break;V=U.value}var G=V;if(G.isObjectMethod()||G.isSpreadProperty())return t(G);var W=G.get("key"),Y=W;if(G.node.computed){if(Y=Y.evaluate(),!Y.confident)return t(W);Y=Y.value}else Y=Y.isIdentifier()?Y.node.name:Y.node.value;var q=G.get("value"),K=q.evaluate();if(!K.confident)return t(q);K=K.value,M[Y]=K}return M}if(n.isLogicalExpression()){var H=i,J=r(n.get("left")),X=i;i=H;var z=r(n.get("right")),$=i;switch(i=X&&$,s.operator){case"||":if(J&&X)return i=!0,J;if(!i)return;return J||z;case"&&":if((!J&&X||!z&&$)&&(i=!0),!i)return;return J&&z}}if(n.isBinaryExpression()){var Q=r(n.get("left"));if(!i)return;var Z=r(n.get("right"));if(!i)return;switch(s.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q<Z;case">":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<<Z;case">>":return Q>>Z;case">>>":return Q>>>Z}}if(n.isCallExpression()){var ee=n.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!n.scope.getBinding(ee.node.name,!0)&&p.indexOf(ee.node.name)>=0&&(re=e[s.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&p.indexOf(ne.node.name)>=0&&d.indexOf(ie.node.name)<0&&(te=e[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,o.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=n.get("arguments").map(r);if(!i)return;return re.apply(te,ae)}}t(n)}}var i=!0,s=void 0,a=new f.default,u=r(this);return i||(u=void 0),{confident:i,deopt:s,value:u}}t.__esModule=!0;var a=r(11),o=n(a),u=r(2),l=n(u),c=r(133),f=n(c);t.evaluateTruthy=i,t.evaluate=s;var p=["String","Number","Math"],d=["random"]}).call(t,function(){return this}())},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function s(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function a(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function o(e){return _.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function u(){return this.getSibling(this.key-1)}function l(){return this.getSibling(this.key+1)}function c(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r}function f(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r}function p(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function d(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,a){return _.default.get({listKey:e,parentPath:r,parent:n,container:i,key:a}).setContext(t)}):_.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)}function h(e,t){for(var r=this,n=e,i=Array.isArray(n),s=0,n=i?n:(0,A.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function m(e){return C.getBindingIdentifiers(this.node,e)}function y(e){return C.getOuterBindingIdentifiers(this.node,e)}function v(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this,n=[].concat(r),i=(0,E.default)(null);n.length;){var s=n.shift();if(s&&s.node){var a=C.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())if(e){var o=i[s.node.name]=i[s.node.name]||[];o.push(s)}else i[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&n.push(u)}else{if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l<a.length;l++){var c=a[l],f=s.get(c);(Array.isArray(f)||f.node)&&(n=n.concat(f))}}}}return i}function g(e){return this.getBindingIdentifierPaths(e,!0)}t.__esModule=!0;var b=r(9),E=n(b),x=r(2),A=n(x);t.getStatementParent=i,t.getOpposite=s,t.getCompletionRecords=a,t.getSibling=o,t.getPrevSibling=u,t.getNextSibling=l,t.getAllNextSiblings=c,t.getAllPrevSiblings=f,t.get=p,t._getKey=d,t._getPattern=h,t.getBindingIdentifiers=m,t.getOuterBindingIdentifiers=y,t.getBindingIdentifierPaths=v,t.getOuterBindingIdentifierPaths=g;var S=r(36),_=n(S),D=r(1),C=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(D)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||y.anyTypeAnnotation();return y.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e}function s(){var e=this.node;{if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=h[e.type];return t?t.call(this,e):(t=h[this.parentPath.type],t&&t.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?y.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?y.anyTypeAnnotation():y.voidTypeAnnotation()}}}function a(e,t){return o(e,this.getTypeAnnotation(),t)}function o(e,t,r){if("string"===e)return y.isStringTypeAnnotation(t);if("number"===e)return y.isNumberTypeAnnotation(t);if("boolean"===e)return y.isBooleanTypeAnnotation(t);if("any"===e)return y.isAnyTypeAnnotation(t);if("mixed"===e)return y.isMixedTypeAnnotation(t);if("empty"===e)return y.isEmptyTypeAnnotation(t);if("void"===e)return y.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}function u(e){var t=this.getTypeAnnotation();if(y.isAnyTypeAnnotation(t))return!0;if(y.isUnionTypeAnnotation(t)){for(var r=t.types,n=Array.isArray(r),i=0,r=n?r:(0,p.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(y.isAnyTypeAnnotation(a)||o(e,a,!0))return!0}return!1}return o(e,t,!0)}function l(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!y.isAnyTypeAnnotation(t)&&y.isFlowBaseAnnotation(t))return e.type===t.type}function c(e){var t=this.getTypeAnnotation();return y.isGenericTypeAnnotation(t)&&y.isIdentifier(t.id,{name:e})}t.__esModule=!0;var f=r(2),p=function(e){return e&&e.__esModule?e:{default:e}}(f);t.getTypeAnnotation=i,t._getTypeAnnotation=s,t.isBaseType=a,t.couldBeBaseType=u,t.baseTypeStrictlyMatches=l,t.isGenericType=c;var d=r(376),h=n(d),m=r(1),y=n(m)},function(e,t,r){"use strict";function n(e,t){var r=e.scope.getBinding(t),n=[];e.typeAnnotation=f.unionTypeAnnotation(n);var s=[],a=i(r,e,s),u=o(e,t);if(u){var c=i(r,u.ifStatement);a=a.filter(function(e){return c.indexOf(e)<0}),n.push(u.typeAnnotation)}if(a.length){a=a.concat(s);for(var p=a,d=Array.isArray(p),h=0,p=d?p:(0,l.default)(p);;){var m;if(d){if(h>=p.length)break;m=p[h++]}else{if(h=p.next(),h.done)break;m=h.value}var y=m;n.push(y.getTypeAnnotation())}}if(n.length)return f.createUnionTypeAnnotation(n)}function i(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){e=e.resolve();var n=e._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function s(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():f.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?f.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,o=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,o=i),(o||a)&&(o=o.resolve(),o.isLiteral())){if("string"==typeof o.node.value&&a.get("argument").isIdentifier({name:e}))return f.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function a(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function o(e,t){var r=a(e);if(r){var n=r.get("test"),i=[n],u=[];do{var l=i.shift().resolve();if(l.isLogicalExpression()&&(i.push(l.get("left")),i.push(l.get("right"))),l.isBinaryExpression()){var c=s(t,l);c&&u.push(c)}}while(i.length);return u.length?{typeAnnotation:f.createUnionTypeAnnotation(u),ifStatement:r}:o(r,t)}}t.__esModule=!0;var u=r(2),l=function(e){return e&&e.__esModule?e:{default:e}}(u);t.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:n(this,e.name):"undefined"===e.name?f.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?f.numberTypeAnnotation():void e.name}};var c=r(1),f=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c);e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0}function s(e){return e.typeAnnotation}function a(e){if(this.get("callee").isIdentifier())return k.genericTypeAnnotation(e.callee)}function o(){return k.stringTypeAnnotation()}function u(e){var t=e.operator;return"void"===t?k.voidTypeAnnotation():k.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?k.numberTypeAnnotation():k.STRING_UNARY_OPERATORS.indexOf(t)>=0?k.stringTypeAnnotation():k.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?k.booleanTypeAnnotation():void 0}function l(e){var t=e.operator;if(k.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return k.numberTypeAnnotation();if(k.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return k.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?k.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?k.stringTypeAnnotation():k.unionTypeAnnotation([k.stringTypeAnnotation(),k.numberTypeAnnotation()])}}function c(){return k.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function f(){return k.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function p(){return this.get("expressions").pop().getTypeAnnotation()}function d(){return this.get("right").getTypeAnnotation()}function h(e){var t=e.operator;if("++"===t||"--"===t)return k.numberTypeAnnotation()}function m(){return k.stringTypeAnnotation()}function y(){return k.numberTypeAnnotation()}function v(){return k.booleanTypeAnnotation()}function g(){return k.nullLiteralTypeAnnotation()}function b(){return k.genericTypeAnnotation(k.identifier("RegExp"))}function E(){return k.genericTypeAnnotation(k.identifier("Object"))}function x(){return k.genericTypeAnnotation(k.identifier("Array"))}function A(){return x()}function S(){return k.genericTypeAnnotation(k.identifier("Function"))}function _(){return C(this.get("callee"))}function D(){return C(this.get("tag"))}function C(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?k.genericTypeAnnotation(k.identifier("AsyncIterator")):k.genericTypeAnnotation(k.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}t.__esModule=!0,t.ClassDeclaration=t.ClassExpression=t.FunctionDeclaration=t.ArrowFunctionExpression=t.FunctionExpression=t.Identifier=void 0;var w=r(375);Object.defineProperty(t,"Identifier",{enumerable:!0,get:function(){return n(w).default}}),t.VariableDeclarator=i,t.TypeCastExpression=s,t.NewExpression=a,t.TemplateLiteral=o,t.UnaryExpression=u,t.BinaryExpression=l,t.LogicalExpression=c,t.ConditionalExpression=f,t.SequenceExpression=p,t.AssignmentExpression=d,t.UpdateExpression=h,t.StringLiteral=m,t.NumericLiteral=y,t.BooleanLiteral=v,t.NullLiteral=g,t.RegExpLiteral=b,t.ObjectExpression=E,t.ArrayExpression=x,t.RestElement=A,t.CallExpression=_,t.TaggedTemplateExpression=D;var P=r(1),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(P);s.validParent=!0,A.validParent=!0,t.FunctionExpression=S,t.ArrowFunctionExpression=S,t.FunctionDeclaration=S,t.ClassExpression=S,t.ClassDeclaration=S},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(C.isIdentifier(a)){if(!r(a.name))return!1}else if(C.isLiteral(a)){if(!r(a.value))return!1}else{if(C.isMemberExpression(a)){if(a.computed&&!C.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!C.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length}function s(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function a(){return this.scope.isStatic(this.node)}function o(e){return!this.has(e)}function u(e,t){return this.node[e]===t}function l(e){return C.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function f(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?C.isBlockStatement(e):!!this.isBlockStatement()&&C.isExpression(e))}function p(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function d(){return!this.parentPath.isLabeledStatement()&&!C.isBlockStatement(this.container)&&(0,_.default)(C.STATEMENT_OR_BLOCK_KEYS,this.key)}function h(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!!i.isImportDeclaration()&&(i.node.source.value===e&&(!t||(!(!n.isImportDefaultSpecifier()||"default"!==t)||(!(!n.isImportNamespaceSpecifier()||"*"!==t)||!(!n.isImportSpecifier()||n.node.imported.name!==t)))))}function m(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function v(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u<s.length;u++){var l=s[u];if((o=i.indexOf(l))>=0){a=l;break}}if(!a)return"before";var c=i[o-1],f=s[u-1];return c&&f?c.listKey&&c.container===f.container?c.key>f.key?"before":"after":C.VISITOR_KEYS[c.type].indexOf(c.key)>C.VISITOR_KEYS[f.type].indexOf(f.key)?"before":"after":"before"}function g(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var n=r.referencePaths,i=n,s=Array.isArray(i),a=0,i=s?i:(0,A.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,c=n,f=Array.isArray(c),p=0,c=f?c:(0,A.default)(c);;){var d;if(f){if(p>=c.length)break;d=c[p++]}else{if(p=c.next(),p.done)break;d=p.value}var h=d;if(!!!h.find(function(e){return e.node===t.node})){var m=this._guessExecutionStatusRelativeTo(h);if(l){if(l!==m)return}else l=m}}return l}}function b(e,t){return this._resolve(e,t)||this}function E(e,t){if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if("module"===r.kind)return;if(r.path!==this){var n=r.path.resolve(e,t);if(this.find(function(e){return e.node===n.node}))return;return n}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var i=this.toComputedKey();if(!C.isLiteral(i))return;var s=i.value,a=this.get("object").resolve(e,t);if(a.isObjectExpression())for(var o=a.get("properties"),u=o,l=Array.isArray(u),c=0,u=l?u:(0,A.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;if(p.isProperty()){var d=p.get("key"),h=p.isnt("computed")&&d.isIdentifier({name:s});if(h=h||d.isLiteral({value:s}))return p.get("value").resolve(e,t)}}else if(a.isArrayExpression()&&!isNaN(+s)){var m=a.get("elements"),y=m[s];if(y)return y.resolve(e,t)}}}}t.__esModule=!0,t.is=void 0;var x=r(2),A=n(x);t.matchesPattern=i,t.has=s,t.isStatic=a,t.isnt=o,t.equals=u,t.isNodeType=l,t.canHaveVariableDeclarationOrExpression=c,t.canSwapBetweenExpressionAndStatement=f,t.isCompletionRecord=p,t.isStatementOrBlock=d,t.referencesImport=h,t.getSource=m, -t.willIMaybeExecuteBefore=y,t._guessExecutionStatusRelativeTo=v,t._guessExecutionStatusRelativeToDifferentFunctions=g,t.resolve=b,t._resolve=E;var S=r(111),_=n(S),D=r(1),C=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(D);t.is=s},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(2),s=n(i),a=r(3),o=n(a),u=r(1),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!u.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},f=function(){function e(t,r){(0,o.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;for(var i=n.constantViolations,a=Array.isArray(i),o=0,i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e.parentPath.isExportDeclaration()&&(e=e.parentPath),e}},e.prototype._getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return t.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(c,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=l.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:l.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=l.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();t.default=f,e.exports=t.default},function(e,t){"use strict";t.__esModule=!0;t.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(D.blockStatement(e))}return[this]}function s(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n<t.length;n++){var i=e+n,s=t[n];if(this.container.splice(i,0,s),this.context){var a=this.context.create(this.parent,this.container,i,this.listKey);this.context.queue&&a.pushContext(this.context),r.push(a)}else r.push(S.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:i}))}for(var o=this._getQueueContexts(),u=r,l=Array.isArray(u),c=0,u=l?u:(0,g.default)(u);;){var f;if(l){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var p=f;p.setScope(),p.debug(function(){return"Inserted."});for(var d=o,h=Array.isArray(d),m=0,d=h?d:(0,g.default)(d);;){var y;if(h){if(m>=d.length)break;y=d[m++]}else{if(m=d.next(),m.done)break;y=m.value}y.maybeQueue(p,!0)}}return r}function a(e){return this._containerInsert(this.key,e)}function o(e){return this._containerInsert(this.key+1,e)}function u(e){var t=e[e.length-1];(D.isIdentifier(t)||D.isExpressionStatement(t)&&D.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()}function l(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(D.expressionStatement(D.assignmentExpression("=",t,this.node))),e.push(D.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(D.blockStatement(e))}return[this]}function c(e,t){if(this.parent)for(var r=b.path.get(this.parent),n=0;n<r.length;n++){var i=r[n];i.key>=e&&(i.key+=t)}}function f(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t<e.length;t++){var r=e[t],n=void 0;if(r?"object"!==(void 0===r?"undefined":(0,y.default)(r))?n="contains a non-object node":r.type?r instanceof S.default&&(n="has a NodePath when it expected a raw object"):n="without a type":n="has falsy node",n){var i=Array.isArray(r)?"array":void 0===r?"undefined":(0,y.default)(r);throw new Error("Node list "+n+" with the index of "+t+" and type of "+i)}}return e}function p(e,t){return this._assertUnremoved(),t=this._verifyNodeList(t),S.default.get({parentPath:this,parent:this.node,container:this.node[e],listKey:e,key:0}).insertBefore(t)}function d(e,t){this._assertUnremoved(),t=this._verifyNodeList(t);var r=this.node[e];return S.default.get({parentPath:this,parent:this.node,container:r,listKey:e,key:r.length}).replaceWithMultiple(t)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.scope;return new x.default(this,e).run()}t.__esModule=!0;var m=r(11),y=n(m),v=r(2),g=n(v);t.insertBefore=i,t._containerInsert=s,t._containerInsertBefore=a,t._containerInsertAfter=o,t._maybePopFromStatements=u,t.insertAfter=l,t.updateSiblingKeys=c,t._verifyNodeList=f,t.unshiftContainer=p,t.pushContainer=d,t.hoist=h;var b=r(88),E=r(378),x=n(E),A=r(36),S=n(A),_=r(1),D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(_)},function(e,t,r){"use strict";function n(){if(this._assertUnremoved(),this.resync(),this._callRemovalHooks())return void this._markRemoved();this.shareCommentsWithSiblings(),this._remove(),this._markRemoved()}function i(){for(var e=c.hooks,t=Array.isArray(e),r=0,e=t?e:(0,l.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if(r=e.next(),r.done)break;n=r.value}if(n(this,this.parentPath))return!0}}function s(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)}function a(){this.shouldSkip=!0,this.removed=!0,this.node=null}function o(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}t.__esModule=!0;var u=r(2),l=function(e){return e&&e.__esModule?e:{default:e}}(u);t.remove=n,t._callRemovalHooks=i,t._remove=s,t._markRemoved=a,t._assertUnremoved=o;var c=r(379)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){this.resync(),e=this._verifyNodeList(e),E.inheritLeadingComments(e[0],this.node),E.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()}function s(e){this.resync();try{e="("+e+")",e=(0,g.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,d.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,m.default.removeProperties(e),this.replaceWith(e)}function a(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof v.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!E.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&E.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=E.expressionStatement(e))),this.isNodeType("Expression")&&E.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(E.inheritsComments(e,t),E.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}}function o(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?E.validate(this.parent,this.key,[e]):E.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e}function u(e){this.resync();var t=E.toSequenceExpression(e,this.scope);if(E.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=E.functionExpression(null,[],E.blockStatement(e));n.shadow=!0,this.replaceWith(E.callExpression(n,[])),this.traverse(x);for(var i=this.get("callee").getCompletionRecords(),s=i,a=Array.isArray(s),o=0,s=a?s:(0,f.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.isExpressionStatement()){var c=l.findParent(function(e){return e.isLoop()});if(c){var p=c.getData("expressionReplacementReturnUid");if(p)p=E.identifier(p.name);else{var d=this.get("callee");p=d.scope.generateDeclaredUidIdentifier("ret"),d.get("body").pushContainer("body",E.returnStatement(p)),c.setData("expressionReplacementReturnUid",p)}l.get("expression").replaceWith(E.assignmentExpression("=",p,l.node.expression))}else l.replaceWith(E.returnStatement(l.node.expression))}}return this.node}this.replaceWith(t)}}function l(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)}t.__esModule=!0;var c=r(2),f=n(c);t.replaceWithMultiple=i,t.replaceWithSourceString=s,t.replaceWith=a,t._replaceWith=o,t.replaceExpressionWithStatements=u,t.replaceInline=l;var p=r(181),d=n(p),h=r(7),m=n(h),y=r(36),v=n(y),g=r(89),b=r(1),E=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});for(var n=[],i=e.node.declarations,s=Array.isArray(i),a=0,i=s?i:(0,f.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;u.init&&n.push(E.expressionStatement(E.assignmentExpression("=",u.id,u.init)))}e.replaceWithMultiple(n)}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=r(3),s=n(i),a=r(225),o=(n(a),r(1)),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o),l={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},c=function(){function e(t,r,n){(0,s.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var s in n){var a=s===this.oldName?this.newName:s,o=r?"default":s;i.push(u.exportSpecifier(u.identifier(a),u.identifier(o)))}if(i.length){var l=u.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path,a=s.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});a&&this.maybeConvertFromExportDeclaration(a),i.traverse(e||i.block,l,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type},e}();t.default=c,e.exports=t.default},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!d(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,s=Array.isArray(i),o=0,i=s?i:(0,E.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;e[l]=n}}}a(e),delete e.__esModule,c(e),f(e);for(var m=(0,g.default)(e),y=Array.isArray(m),v=0,m=y?m:(0,E.default)(m);;){var b;if(y){if(v>=m.length)break;b=m[v++]}else{if(v=m.next(),v.done)break;b=v.value}var x=b;if(!d(x)){var S=A[x];if(S){var _=e[x];for(var D in _)_[D]=p(S,_[D]);if(delete e[x],S.types)for(var w=S.types,k=Array.isArray(w),F=0,w=k?w:(0,E.default)(w);;){var T;if(k){if(F>=w.length)break;T=w[F++]}else{if(F=w.next(),F.done)break;T=F.value}var O=T;e[O]?h(e[O],_):e[O]=_}else h(e,_)}}}for(var B in e)if(!d(B)){var R=e[B],I=C.FLIPPED_ALIAS_KEYS[B],M=C.DEPRECATED_KEYS[B];if(M&&(console.trace("Visitor defined for "+B+" but it has been renamed to "+M),I=[M]),I){delete e[B];for(var N=I,L=Array.isArray(N),j=0,N=L?N:(0,E.default)(N);;){var U;if(L){if(j>=N.length)break;U=N[j++]}else{if(j=N.next(),j.done)break;U=j.value}var V=U,G=e[V];G?h(G,R):e[V]=(0,P.default)(R)}}}for(var W in e)d(W)||f(e[W]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(_.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!d(t)){if(C.TYPES.indexOf(t)<0)throw new Error(_.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,y.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(_.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){for(var r=[].concat(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,E.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===o?"undefined":(0,y.default)(o)))}}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i<e.length;i++){var a=e[i],o=t[i];s(a);for(var u in a){var c=a[u];(o||r)&&(c=l(c,o,r));h(n[u]=n[u]||{},c)}}return n}function l(e,t,r){var n={};for(var i in e){(function(i){var s=e[i];if(!Array.isArray(s))return"continue";s=s.map(function(e){var n=e;return t&&(n=function(r){return e.call(t,r,t)}),r&&(n=r(t.key,i,n)),n}),n[i]=s})(i)}return n}function c(e){for(var t in e)if(!d(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}function f(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function p(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}function d(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function h(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}t.__esModule=!0;var m=r(11),y=i(m),v=r(14),g=i(v),b=r(2),E=i(b);t.explode=s,t.verify=a,t.merge=u;var x=r(224),A=n(x),S=r(20),_=n(S),D=r(1),C=n(D),w=r(109),P=i(w)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||D.isIdentifier(t)&&(t=D.stringLiteral(t.name)),t}function s(e,t,r){for(var n=[],i=!0,a=e,o=Array.isArray(a),u=0,a=o?a:(0,b.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(i=!1,D.isExpression(c))n.push(c);else if(D.isExpressionStatement(c))n.push(c.expression);else if(D.isVariableDeclaration(c)){if("var"!==c.kind)return;for(var f=c.declarations,p=Array.isArray(f),d=0,f=p?f:(0,b.default)(f);;){var h;if(p){if(d>=f.length)break;h=f[d++]}else{if(d=f.next(),d.done)break;h=d.value}var m=h,y=D.getBindingIdentifiers(m);for(var v in y)r.push({kind:c.kind,id:y[v]});m.init&&n.push(D.assignmentExpression("=",m.id,m.init))}i=!0}else if(D.isIfStatement(c)){var g=c.consequent?s([c.consequent],t,r):t.buildUndefinedNode(),E=c.alternate?s([c.alternate],t,r):t.buildUndefinedNode();if(!g||!E)return;n.push(D.conditionalExpression(c.test,g,E))}else if(D.isBlockStatement(c)){var x=s(c.body,t,r);if(!x)return;n.push(x)}else{if(!D.isEmptyStatement(c))return;i=!0}}return i&&n.push(t.buildUndefinedNode()),1===n.length?n[0]:D.sequenceExpression(n)}function a(e,t){if(e&&e.length){var r=[],n=s(e,t,r);if(n){for(var i=r,a=Array.isArray(i),o=0,i=a?i:(0,b.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;t.push(l)}return n}}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?o.increment()+"":(r=D.isIdentifier(t)?t.name:D.isStringLiteral(t)?(0,v.default)(t.value):(0,v.default)(D.removePropertiesDeep(D.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function u(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),D.isValidIdentifier(e)||(e="_"+e),e||"_"}function l(e){return e=u(e),"eval"!==e&&"arguments"!==e||(e="_"+e),e}function c(e,t){if(D.isStatement(e))return e;var r=!1,n=void 0;if(D.isClass(e))r=!0,n="ClassDeclaration";else if(D.isFunction(e))r=!0,n="FunctionDeclaration";else if(D.isAssignmentExpression(e))return D.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e}function f(e){if(D.isExpressionStatement(e)&&(e=e.expression),D.isExpression(e))return e;if(D.isClass(e)?e.type="ClassExpression":D.isFunction(e)&&(e.type="FunctionExpression"),!D.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e}function p(e,t){return D.isBlockStatement(e)?e:(D.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(D.isStatement(e)||(e=D.isFunction(t)?D.returnStatement(e):D.expressionStatement(e)),e=[e]),D.blockStatement(e))}function d(e){if(void 0===e)return D.identifier("undefined");if(!0===e||!1===e)return D.booleanLiteral(e);if(null===e)return D.nullLiteral();if("string"==typeof e)return D.stringLiteral(e);if("number"==typeof e)return D.numericLiteral(e);if((0,S.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return D.regExpLiteral(t,r)}if(Array.isArray(e))return D.arrayExpression(e.map(D.valueToNode));if((0,x.default)(e)){var n=[];for(var i in e){var s=void 0;s=D.isValidIdentifier(i)?D.identifier(i):D.stringLiteral(i),n.push(D.objectProperty(s,D.valueToNode(e[i])))}return D.objectExpression(n)}throw new Error("don't know how to turn this value into a node")}t.__esModule=!0;var h=r(359),m=n(h),y=r(35),v=n(y),g=r(2),b=n(g);t.toComputedKey=i,t.toSequenceExpression=a,t.toKeyAlias=o,t.toIdentifier=u,t.toBindingIdentifierName=l,t.toStatement=c,t.toExpression=f,t.toBlock=p,t.valueToNode=d;var E=r(275),x=n(E),A=r(276),S=n(A),_=r(1),D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(_);o.uid=0,o.increment=function(){return o.uid>=m.default?o.uid=0:o.uid++}},function(e,t,r){"use strict";var n=r(1),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n),s=r(135),a=r(26),o=function(e){return e&&e.__esModule?e:{default:e}}(a);(0,o.default)("ArrayExpression",{fields:{elements:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,o.default)("AssignmentExpression",{fields:{operator:{validate:(0,a.assertValueType)("string")},left:{validate:(0,a.assertNodeType)("LVal")},right:{validate:(0,a.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,o.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.BINARY_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,o.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,a.assertNodeType)("DirectiveLiteral")}}}),(0,o.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),(0,o.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,o.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,o.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,o.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Expression")},alternate:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,o.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("DebuggerStatement",{aliases:["Statement"]}),(0,o.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,o.default)("EmptyStatement",{aliases:["Statement"]}),(0,o.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,o.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,a.assertNodeType)("Program")}}}),(0,o.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,a.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,a.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},update:{validate:(0,a.assertNodeType)("Expression"),optional:!0},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,a.assertNodeType)("Identifier")},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,o.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}}}),(0,o.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){i.isValidIdentifier(r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,a.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,a.assertValueType)("string")},flags:{validate:(0,a.assertValueType)("string"),default:""}}}),(0,o.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.LOGICAL_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,a.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,o.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}}}),(0,o.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,o.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,o.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}, -body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,o.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,a.assertNodeType)("Expression","Pattern","RestElement")},shorthand:{validate:(0,a.assertValueType)("boolean"),default:!1},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,o.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,a.assertNodeType)("LVal")},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),(0,o.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,o.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}}}),(0,o.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,a.assertNodeType)("Expression")},cases:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("SwitchCase")))}}}),(0,o.default)("ThisExpression",{aliases:["Expression"]}),(0,o.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,a.assertNodeType)("BlockStatement")},handler:{optional:!0,handler:(0,a.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,a.assertNodeType)("BlockStatement")}}}),(0,o.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,o.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,o.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("var","let","const"))},declarations:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("VariableDeclarator")))}}}),(0,o.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,a.assertNodeType)("LVal")},init:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}}),(0,o.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}})},function(e,t,r){"use strict";var n=r(26),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Identifier","Pattern","RestElement")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},function(e,t,r){"use strict";var n=r(26),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},function(e,t,r){"use strict";var n=r(26),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("OpaqueType",{visitor:["id","typeParameters","impltype","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},function(e,t,r){"use strict";r(26),r(386),r(387),r(389),r(391),r(392),r(388)},function(e,t,r){"use strict";var n=r(26),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},function(e,t,r){"use strict";var n=r(26),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},function(e,t,r){"use strict";function n(e){var t=i(e);return 1===t.length?t[0]:o.unionTypeAnnotation(t)}function i(e){for(var t={},r={},n=[],s=[],a=0;a<e.length;a++){var u=e[a];if(u&&!(s.indexOf(u)>=0)){if(o.isAnyTypeAnnotation(u))return[u];if(o.isFlowBaseAnnotation(u))r[u.type]=u;else if(o.isUnionTypeAnnotation(u))n.indexOf(u.types)<0&&(e=e.concat(u.types),n.push(u.types));else if(o.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=i(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else s.push(u)}}for(var f in r)s.push(r[f]);for(var p in t)s.push(t[p]);return s}function s(e){if("string"===e)return o.stringTypeAnnotation();if("number"===e)return o.numberTypeAnnotation();if("undefined"===e)return o.voidTypeAnnotation();if("boolean"===e)return o.booleanTypeAnnotation();if("function"===e)return o.genericTypeAnnotation(o.identifier("Function"));if("object"===e)return o.genericTypeAnnotation(o.identifier("Object"));if("symbol"===e)return o.genericTypeAnnotation(o.identifier("Symbol"));throw new Error("Invalid typeof value")}t.__esModule=!0,t.createUnionTypeAnnotation=n,t.removeTypeDuplicates=i,t.createTypeAnnotationBasedOnTypeof=s;var a=r(1),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},function(e,t,r){"use strict";function n(e){return!!e&&/^[a-z]|\-/.test(e)}function i(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,i=0;i<r.length;i++)r[i].match(/[^ \t]/)&&(n=i);for(var s="",a=0;a<r.length;a++){var u=r[a],l=0===a,c=a===r.length-1,f=a===n,p=u.replace(/\t/g," ");l||(p=p.replace(/^[ ]+/,"")),c||(p=p.replace(/[ ]+$/,"")),p&&(f||(p+=" "),s+=p)}s&&t.push(o.stringLiteral(s))}function s(e){for(var t=[],r=0;r<e.children.length;r++){var n=e.children[r];o.isJSXText(n)?i(n,t):(o.isJSXExpressionContainer(n)&&(n=n.expression),o.isJSXEmptyExpression(n)||t.push(n))}return t}t.__esModule=!0,t.isReactComponent=void 0,t.isCompatTag=n,t.buildChildren=s;var a=r(1),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a);t.isReactComponent=o.buildMatchMemberExpression("React.Component")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=E.getBindingIdentifiers.keys[t.type];if(r)for(var n=0;n<r.length;n++){var i=r[n],s=t[i];if(Array.isArray(s)){if(s.indexOf(e)>=0)return!0}else if(s===e)return!0}return!1}function s(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=Array.isArray(r),i=0,r=n?r:(0,b.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function a(e){return"string"==typeof e&&!A.default.keyword.isReservedWordES6(e,!0)&&("await"!==e&&A.default.keyword.isIdentifierNameES6(e))}function o(e){return _.isVariableDeclaration(e)&&("var"!==e.kind||e[D.BLOCK_SCOPED_SYMBOL])}function u(e){return _.isFunctionDeclaration(e)||_.isClassDeclaration(e)||_.isLet(e)}function l(e){return _.isVariableDeclaration(e,{kind:"var"})&&!e[D.BLOCK_SCOPED_SYMBOL]}function c(e){return _.isImportDefaultSpecifier(e)||_.isIdentifier(e.imported||e.exported,{name:"default"})}function f(e,t){return(!_.isBlockStatement(e)||!_.isFunction(t,{body:e}))&&_.isScopable(e)}function p(e){return!!_.isType(e.type,"Immutable")||!!_.isIdentifier(e)&&"undefined"===e.name}function d(e,t){if("object"!==(void 0===e?"undefined":(0,v.default)(e))||"object"!==(void 0===e?"undefined":(0,v.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=(0,m.default)(_.NODE_FIELDS[e.type]||e.type),n=r,i=Array.isArray(n),s=0,n=i?n:(0,b.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if((0,v.default)(e[o])!==(0,v.default)(t[o]))return!1;if(Array.isArray(e[o])){if(!Array.isArray(t[o]))return!1;if(e[o].length!==t[o].length)return!1;for(var u=0;u<e[o].length;u++)if(!d(e[o][u],t[o][u]))return!1}else if(!d(e[o],t[o]))return!1}return!0}t.__esModule=!0;var h=r(14),m=n(h),y=r(11),v=n(y),g=r(2),b=n(g);t.isBinding=i,t.isReferenced=s,t.isValidIdentifier=a,t.isLet=o,t.isBlockScoped=u,t.isVar=l,t.isSpecifierDefault=c,t.isScope=f,t.isImmutable=p,t.isNodesEquivalent=d;var E=r(226),x=r(97),A=n(x),S=r(1),_=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(S),D=r(135)},function(e,t){"use strict";function r(e,t,r){e instanceof RegExp&&(e=n(e,r)),t instanceof RegExp&&(t=n(t,r));var s=i(e,t,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+e.length,s[1]),post:r.slice(s[1]+t.length)}}function n(e,t){var r=t.match(e);return r?r[0]:null}function i(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:(i=n.pop(),i<s&&(s=i,a=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;n.length&&(o=[s,a])}return o}e.exports=r,r.range=i},function(e,t){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function n(e){return 3*e.length/4-r(e)}function i(e){var t,n,i,s,a,o=e.length;s=r(e),a=new c(3*o/4-s),n=s>0?o-4:o;var u=0;for(t=0;t<n;t+=4)i=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],a[u++]=i>>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===s?(i=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===s&&(i=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function s(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(s(n));return i.join("")}function o(e){for(var t,r=e.length,n=r%3,i="",s=[],o=0,l=r-n;o<l;o+=16383)s.push(a(e,o,o+16383>l?l:o+16383));return 1===n?(t=e[r-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),s.push(i),s.join("")}t.byteLength=n,t.toByteArray=i,t.fromByteArray=o;for(var u=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,d=f.length;p<d;++p)u[p]=f[p],l[f.charCodeAt(p)]=p;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},function(e,t,r){"use strict";function n(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function i(e){return e.split("\\\\").join(m).split("\\{").join(y).split("\\}").join(v).split("\\,").join(g).split("\\.").join(b)}function s(e){return e.split(m).join("\\").split(y).join("{").split(v).join("}").split(g).join(",").split(b).join(".")}function a(e){if(!e)return[""];var t=[],r=h("{","}",e);if(!r)return e.split(",");var n=r.pre,i=r.body,s=r.post,o=n.split(",");o[o.length-1]+="{"+i+"}";var u=a(s);return s.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),t.push.apply(t,o),t}function o(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),p(i(e),!0).map(s)):[]}function u(e){return"{"+e+"}"}function l(e){return/^-?0\d/.test(e)}function c(e,t){return e<=t}function f(e,t){return e>=t}function p(e,t){var r=[],i=h("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=s||o,y=i.body.indexOf(",")>=0;if(!m&&!y)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+v+i.post,p(e)):[e];var g;if(m)g=i.body.split(/\.\./);else if(g=a(i.body),1===g.length&&(g=p(g[0],!1).map(u),1===g.length)){var b=i.post.length?p(i.post,!1):[""];return b.map(function(e){return i.pre+g[0]+e})}var E,x=i.pre,b=i.post.length?p(i.post,!1):[""];if(m){var A=n(g[0]),S=n(g[1]),_=Math.max(g[0].length,g[1].length),D=3==g.length?Math.abs(n(g[2])):1,C=c;S<A&&(D*=-1,C=f);var w=g.some(l);E=[];for(var P=A;C(P,S);P+=D){var k;if(o)"\\"===(k=String.fromCharCode(P))&&(k="");else if(k=String(P),w){var F=_-k.length;if(F>0){var T=new Array(F+1).join("0");k=P<0?"-"+T+k.slice(1):T+k}}E.push(k)}}else E=d(g,function(e){return p(e,!1)});for(var O=0;O<E.length;O++)for(var B=0;B<b.length;B++){var R=x+E[O]+b[B];(!t||m||R)&&r.push(R)}return r}var d=r(402),h=r(396);e.exports=o;var m="\0SLASH"+Math.random()+"\0",y="\0OPEN"+Math.random()+"\0",v="\0CLOSE"+Math.random()+"\0",g="\0COMMA"+Math.random()+"\0",b="\0PERIOD"+Math.random()+"\0"},function(e,t,r){(function(e){"use strict";function n(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=s.prototype):(null===e&&(e=new s(t)),e.length=t),e}function s(e,t,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return a(this,e,t,r)}function a(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number') -;return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?p(e,t,r,n):"string"==typeof t?c(e,t,r):d(e,t)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,r,n){return o(t),t<=0?i(e,t):void 0!==r?"string"==typeof n?i(e,t).fill(r,n):i(e,t).fill(r):i(e,t)}function l(e,t){if(o(t),e=i(e,t<0?0:0|h(t)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function c(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(t,r);e=i(e,n);var a=e.write(t,r);return a!==n&&(e=e.slice(0,a)),e}function f(e,t){var r=t.length<0?0:0|h(t.length);e=i(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function p(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),s.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=s.prototype):e=f(e,t),e}function d(e,t){if(s.isBuffer(t)){var r=0|h(t.length);return e=i(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||X(t.length)?i(e,0):f(e,t);if("Buffer"===t.type&&Q(t.data))return f(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function h(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),s.alloc(+e)}function y(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return Y(e).length;t=(""+t).toLowerCase(),n=!0}}function v(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return w(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,i);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):E(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function E(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;l<o;l++)if(s(e,l)===s(t,-1===c?0:l-c)){if(-1===c&&(c=l),l-c+1===u)return c*a}else-1!==c&&(l-=l-c),c=-1}else for(r+u>o&&(r=o-u),l=r;l>=0;l--){for(var f=!0,p=0;p<u;p++)if(s(e,l+p)!==s(t,p)){f=!1;break}if(f)return l}return-1}function x(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[r+a]=o}return a}function A(e,t,r,n){return J(Y(t,e.length-r),e,r,n)}function S(e,t,r,n){return J(q(t),e,r,n)}function _(e,t,r,n){return S(e,t,r,n)}function D(e,t,r,n){return J(H(t),e,r,n)}function C(e,t,r,n){return J(K(t,e.length-r),e,r,n)}function w(e,t,r){return 0===t&&r===e.length?z.fromByteArray(e):z.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s=e[i],a=null,o=s>239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,f;switch(o){case 1:s<128&&(a=s);break;case 2:u=e[i+1],128==(192&u)&&(f=(31&s)<<6|63&u)>127&&(a=f);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(f=(15&s)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return k(n)}function k(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Z));return r}function F(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=W(e[s]);return i}function B(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}function R(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,i,a){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,s=Math.min(e.length-r,2);i<s;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,s=Math.min(e.length-r,4);i<s;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function L(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,i){return i||L(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,i){return i||L(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,r,n,52,8),r+8}function V(e){if(e=G(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function G(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function q(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function K(e,t){for(var r,n,i,s=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,s.push(i),s.push(n);return s}function H(e){return z.toByteArray(V(e))}function J(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e){return e!==e}var z=r(397),$=r(465),Q=r(400);t.Buffer=s,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=n(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,r){return a(null,e,t,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,r){return u(null,e,t,r)},s.allocUnsafe=function(e){return l(null,e)},s.allocUnsafeSlow=function(e){return l(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=s.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?P(this,0,e):v.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,t,r,n,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,u=Math.min(a,o),l=this.slice(n,i),c=e.slice(t,r),f=0;f<u;++f)if(l[f]!==c[f]){a=l[f],o=c[f];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},s.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},s.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},s.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return S(this,e,t,r);case"latin1":case"binary":return _(this,e,t,r);case"base64":return D(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n;if(s.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=s.prototype;else{var i=t-e;n=new s(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},s.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},s.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||R(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},s.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),$.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),$.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),$.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),$.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){I(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},s.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){I(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},s.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s<r&&(a*=256);)e<0&&0===o&&0!==this[t+s-1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},s.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},s.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=s.isBuffer(e)?e:Y(new s(e,n).toString()),u=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%u]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,function(){return this}())},function(e,t){"use strict";var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:c}function i(e){var t=function e(){return s.apply(e,arguments)};return t._styles=e,t.enabled=this.enabled,t.__proto__=h,t}function s(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||!r)return r;var i=this._styles,s=i.length,a=o.dim.open;for(!p||-1===i.indexOf("gray")&&-1===i.indexOf("grey")||(o.dim.open="");s--;){var u=o[i[s]];r=u.open+r.replace(u.closeRe,u.open)+u.close}return o.dim.open=a,r}var a=r(460),o=r(289),u=r(622),l=r(464),c=r(623),f=Object.defineProperties,p="win32"===t.platform&&!/^xterm/i.test(t.env.TERM);p&&(o.blue.open="");var d=function(){var e={};return Object.keys(o).forEach(function(t){o[t].closeRe=new RegExp(a(o[t].close),"g"),e[t]={get:function(){return i.call(this,this._styles.concat(t))}}}),e}(),h=f(function(){},d);f(n.prototype,function(){var e={};return Object.keys(d).forEach(function(t){e[t]={get:function(){return i.call(this,[t])}}}),e}()),e.exports=new n,e.exports.styles=o,e.exports.hasColor=l,e.exports.stripColor=u,e.exports.supportsColor=c}).call(t,r(8))},function(e,t){"use strict";e.exports=function(e,t){for(var n=[],i=0;i<e.length;i++){var s=t(e[i],i);r(s)?n.push.apply(n,s):n.push(s)}return n};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){(function(e){"use strict";function n(t){return new e(t,"base64").toString()}function i(e){return e.split(",").pop()}function s(e,r){var n=t.mapFileCommentRegex.exec(e),i=n[1]||n[2],s=u.resolve(r,i);try{return o.readFileSync(s,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+s+"\n"+e)}}function a(e,t){t=t||{},t.isFileComment&&(e=s(e,t.commentFileDir)),t.hasComment&&(e=i(e)),t.isEncoded&&(e=n(e)),(t.isJSON||t.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}var o=r(115),u=r(19);Object.defineProperty(t,"commentRegex",{get:function(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}}),Object.defineProperty(t,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}}),a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var t=this.toJSON();return new e(t).toString("base64")},a.prototype.toComment=function(e){var t=this.toBase64(),r="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},t.fromObject=function(e){return new a(e)},t.fromJSON=function(e){return new a(e,{isJSON:!0})},t.fromBase64=function(e){return new a(e,{isEncoded:!0})},t.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},t.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},t.fromSource=function(e){var r=e.match(t.commentRegex);return r?t.fromComment(r.pop()):null},t.fromMapFileSource=function(e,r){var n=e.match(t.mapFileCommentRegex);return n?t.fromMapFileComment(n.pop(),r):null},t.removeComments=function(e){return e.replace(t.commentRegex,"")},t.removeMapFileComments=function(e){return e.replace(t.mapFileCommentRegex,"")},t.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}}).call(t,r(399).Buffer)},function(e,t,r){"use strict";r(59),r(157),e.exports=r(439)},function(e,t,r){"use strict";var n=r(5),i=n.JSON||(n.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},function(e,t,r){"use strict";r(96),r(157),r(59),r(441),r(451),r(450),r(449),e.exports=r(5).Map},function(e,t,r){"use strict";r(442),e.exports=9007199254740991},function(e,t,r){"use strict";r(443),e.exports=r(5).Object.assign},function(e,t,r){"use strict";r(444);var n=r(5).Object;e.exports=function(e,t){return n.create(e,t)}},function(e,t,r){"use strict";r(158),e.exports=r(5).Object.getOwnPropertySymbols},function(e,t,r){"use strict";r(445),e.exports=r(5).Object.keys},function(e,t,r){"use strict";r(446),e.exports=r(5).Object.setPrototypeOf},function(e,t,r){"use strict";r(158),e.exports=r(5).Symbol.for},function(e,t,r){"use strict";r(158),r(96),r(452),r(453),e.exports=r(5).Symbol},function(e,t,r){"use strict";r(157),r(59),e.exports=r(156).f("iterator")},function(e,t,r){"use strict";r(96),r(59),r(447),r(455),r(454),e.exports=r(5).WeakMap},function(e,t,r){"use strict";r(96),r(59),r(448),r(457),r(456),e.exports=r(5).WeakSet},function(e,t){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(55);e.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},function(e,t,r){"use strict";var n=r(37),i=r(153),s=r(438);e.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){"use strict";var n=r(16),i=r(232),s=r(13)("species");e.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},function(e,t,r){"use strict";var n=r(421);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){"use strict";var n=r(23).f,i=r(90),s=r(146),a=r(43),o=r(136),u=r(55),l=r(143),c=r(233),f=r(436),p=r(22),d=r(57).fastKey,h=r(58),m=p?"_s":"size",y=function(e,t){var r,n=d(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};e.exports={getConstructor:function(e,t,r,l){var c=e(function(e,n){o(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&u(n,r,e[l],e)});return s(c.prototype,{clear:function(){for(var e=h(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var r=h(this,t),n=y(r,e);if(n){var i=n.n,s=n.p;delete r._i[n.i],n.r=!0,s&&(s.n=i),i&&(i.p=s),r._f==n&&(r._f=i),r._l==n&&(r._l=s),r[m]--}return!!n},forEach:function(e){h(this,t);for(var r,n=a(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!y(h(this,t),e)}}),p&&n(c.prototype,"size",{get:function(){return h(this,t)[m]}}),c},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=d(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){l(e,t,function(e,r){this._t=h(e,t),this._k=r,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?c(0,r.k):"values"==t?c(0,r.v):c(0,[r.k,r.v]):(e._t=void 0,c(1))},r?"entries":"values",!r,!0),f(t)}}},function(e,t,r){"use strict";var n=r(228),i=r(419);e.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,r){"use strict";var n=r(44),i=r(145),s=r(91);e.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},function(e,t,r){"use strict";var n=r(15).document;e.exports=n&&n.documentElement},function(e,t,r){"use strict";var n=r(56),i=r(13)("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},function(e,t,r){"use strict";var n=r(21);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},function(e,t,r){"use strict";var n=r(90),i=r(92),s=r(93),a={};r(29)(a,r(13)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},function(e,t,r){"use strict";var n=r(44),i=r(37);e.exports=function(e,t){for(var r,s=i(e),a=n(s),o=a.length,u=0;o>u;)if(s[r=a[u++]]===t)return r}},function(e,t,r){"use strict";var n=r(23),i=r(21),s=r(44);e.exports=r(22)?Object.defineProperties:function(e,t){i(e);for(var r,a=s(t),o=a.length,u=0;o>u;)n.f(e,r=a[u++],t[r]);return e}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=r(37),s=r(236).f,a={}.toString,o="object"==("undefined"==typeof window?"undefined":n(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return s(e)}catch(e){return o.slice()}};e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?u(e):s(i(e))}},function(e,t,r){"use strict";var n=r(28),i=r(94),s=r(150)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,r){"use strict";var n=r(12),i=r(5),s=r(27);e.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*s(function(){r(1)}),"Object",a)}},function(e,t,r){"use strict";var n=r(16),i=r(21),s=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,n){try{n=r(43)(Function.call,r(235).f(Object.prototype,"__proto__").set,2),n(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,r){return s(e,r),t?e.__proto__=r:n(e,r),e}}({},!1):void 0),check:s}},function(e,t,r){"use strict";var n=r(15),i=r(5),s=r(23),a=r(22),o=r(13)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:n[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var n=r(152),i=r(140);e.exports=function(e){return function(t,r){var s,a,o=String(i(t)),u=n(r),l=o.length;return u<0||u>=l?e?"":void 0:(s=o.charCodeAt(u),s<55296||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?e?o.charAt(u):s:e?o.slice(u,u+2):a-56320+(s-55296<<10)+65536)}}},function(e,t,r){"use strict";var n=r(152),i=Math.max,s=Math.min;e.exports=function(e,t){return e=n(e),e<0?i(e+t,0):s(e,t)}},function(e,t,r){"use strict";var n=r(21),i=r(238);e.exports=r(5).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,r){"use strict";var n=r(418),i=r(233),s=r(56),a=r(37);e.exports=r(143)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},function(e,t,r){"use strict";var n=r(423),i=r(58);e.exports=r(139)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return n.def(i(this,"Map"),0===e?0:e,t)}},n,!0)},function(e,t,r){"use strict";var n=r(12);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,r){"use strict";var n=r(12);n(n.S+n.F,"Object",{assign:r(234)})},function(e,t,r){"use strict";var n=r(12);n(n.S,"Object",{create:r(90)})},function(e,t,r){"use strict";var n=r(94),i=r(44);r(434)("keys",function(){return function(e){return i(n(e))}})},function(e,t,r){"use strict";var n=r(12);n(n.S,"Object",{setPrototypeOf:r(435).set})},function(e,t,r){"use strict";var n,i=r(137)(0),s=r(147),a=r(57),o=r(234),u=r(229),l=r(16),c=r(27),f=r(58),p=a.getWeak,d=Object.isExtensible,h=u.ufstore,m={},y=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(e){if(l(e)){var t=p(e);return!0===t?h(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(f(this,"WeakMap"),e,t)}},g=e.exports=r(139)("WeakMap",y,v,u,!0,!0);c(function(){return 7!=(new g).set((Object.freeze||Object)(m),7).get(m)})&&(n=u.getConstructor(y,"WeakMap"),o(n.prototype,v),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=g.prototype,r=t[e];s(t,e,function(t,i){if(l(t)&&!d(t)){this._f||(this._f=new n);var s=this._f[e](t,i);return"set"==e?this:s}return r.call(this,t,i)})}))},function(e,t,r){"use strict" -;var n=r(229),i=r(58);r(139)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(i(this,"WeakSet"),e,!0)}},n,!1,!0)},function(e,t,r){"use strict";r(148)("Map")},function(e,t,r){"use strict";r(149)("Map")},function(e,t,r){"use strict";var n=r(12);n(n.P+n.R,"Map",{toJSON:r(424)("Map")})},function(e,t,r){"use strict";r(155)("asyncIterator")},function(e,t,r){"use strict";r(155)("observable")},function(e,t,r){"use strict";r(148)("WeakMap")},function(e,t,r){"use strict";r(149)("WeakMap")},function(e,t,r){"use strict";r(148)("WeakSet")},function(e,t,r){"use strict";r(149)("WeakSet")},function(e,t,r){"use strict";function n(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}function i(e){function r(){if(r.enabled){var e=r,n=+new Date,i=n-(l||n);e.diff=i,e.prev=l,e.curr=n,l=n;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var o=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;o++;var i=t.formatters[n];if("function"==typeof i){var a=s[o];r=i.call(e,a),s.splice(o,1),o--}return r}),t.formatArgs.call(e,s);(r.log||t.log||console.log.bind(console)).apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=n(e),"function"==typeof t.init&&t.init(r),r}function s(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&(e=r[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function a(){t.enable("")}function o(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=u,t.disable=a,t.enable=s,t.enabled=o,t.humanize=r(602),t.names=[],t.skips=[],t.formatters={};var l},function(e,t,r){"use strict";function n(e){var t=0,r=0,n=0;for(var i in e){var s=e[i],a=s[0],o=s[1];(a>r||a===r&&o>n)&&(r=a,n=o,t=Number(i))}return t}var i=r(615),s=/^(?:( )+|\t+)/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,a=0,o=0,u=0,l={};e.split(/\n/g).forEach(function(e){if(e){var n,i=e.match(s);i?(n=i[0].length,i[1]?o++:a++):n=0;var c=n-u;u=n,c?(r=c>0,t=l[r?c:-c],t?t[0]++:t=l[c]=[1,0]):t&&(t[1]+=Number(r))}});var c,f,p=n(l);return p?o>=a?(c="space",f=i(" ",p)):(c="tab",f=i("\t",p)):(c=null,f=""),{amount:p,type:c,indent:f}}},function(e,t){"use strict";var r=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(r,"\\$&")}},function(e,t){"use strict";!function(){function t(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return n(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}e.exports={isExpression:t,isStatement:n,isIterationStatement:r,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:s}}()},function(e,t,r){"use strict";!function(){function t(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function n(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,r){if(r&&t(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function o(e){return"eval"===e||"arguments"===e}function u(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!d.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;t<r;++t)if(n=e.charCodeAt(t),!d.isIdentifierPartES5(n))return!1;return!0}function l(e,t){return 1024*(e-55296)+(t-56320)+65536}function c(e){var t,r,n,i,s;if(0===e.length)return!1;for(s=d.isIdentifierStartES6,t=0,r=e.length;t<r;++t){if(55296<=(n=e.charCodeAt(t))&&n<=56319){if(++t>=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=l(n,i)}if(!s(n))return!1;s=d.isIdentifierPartES6}return!0}function f(e,t){return u(e)&&!s(e,t)}function p(e,t){return c(e)&&!a(e,t)}var d=r(240);e.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:c,isIdentifierES5:f,isIdentifierES6:p}}()},function(e,t,r){"use strict";e.exports=r(630)},function(e,t,r){"use strict";var n=r(180),i=new RegExp(n().source);e.exports=i.test.bind(i)},function(e,t){"use strict";t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<<o)-1,l=u>>1,c=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,s=d&(1<<-c)-1,d>>=-c,c+=o;c>0;s=256*s+e[t+f],f+=p,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),s-=l}return(d?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,c=(1<<l)-1,f=c>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?p/u:p*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=c?(o=0,a=c):a+f>=1?(o=(t*u-1)*Math.pow(2,i),a+=f):(o=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&o,d+=h,o/=256,i-=8);for(a=a<<i|o,l+=i;l>0;e[r+d]=255&a,d+=h,a/=256,l-=8);e[r+d-h]|=128*m}},function(e,t,r){"use strict";var n=function(e,t,r,n,i,s,a,o){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,s,a,o],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=n},function(e,t,r){"use strict";var n=r(603);e.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-1/0)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,t.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},function(e,t,r){var n;(function(e,i){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a){var o="object"==s(t)&&t,u="object"==s(e)&&e&&e.exports==o&&e,l="object"==(void 0===i?"undefined":s(i))&&i;l.global!==l&&l.window!==l||(a=l);var c={},f=c.hasOwnProperty,p=function(e,t){var r;for(r in e)f.call(e,r)&&t(r,e[r])},d=function(e,t){return t?(p(t,function(t,r){e[t]=r}),e):e},h=function(e,t){for(var r=e.length,n=-1;++n<r;)t(e[n])},m=c.toString,y=function(e){return"[object Array]"==m.call(e)},v=function(e){return"[object Object]"==m.call(e)},g=function(e){return"string"==typeof e||"[object String]"==m.call(e)},b=function(e){return"number"==typeof e||"[object Number]"==m.call(e)},E=function(e){return"function"==typeof e||"[object Function]"==m.call(e)},x=function(e){return"[object Map]"==m.call(e)},A=function(e){return"[object Set]"==m.call(e)},S={'"':'\\"',"'":"\\'","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},_=/["'\\\b\f\n\r\t]/,D=/[0-9]/,C=/[ !#-&\(-\[\]-~]/,w=function e(t,r){var n={escapeEverything:!1,escapeEtago:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:"\t",__indent__:"",__inline1__:!1,__inline2__:!1},i=r&&r.json;i&&(n.quotes="double",n.wrap=!0),r=d(n,r),"single"!=r.quotes&&"double"!=r.quotes&&(r.quotes="single");var s,a="double"==r.quotes?'"':"'",o=r.compact,u=r.indent,l=r.lowercaseHex,c="",f=r.__inline1__,m=r.__inline2__,w=o?"":"\n",P=!0,k="binary"==r.numbers,F="octal"==r.numbers,T="decimal"==r.numbers,O="hexadecimal"==r.numbers;if(i&&t&&E(t.toJSON)&&(t=t.toJSON()),!g(t)){if(x(t))return 0==t.size?"new Map()":(o||(r.__inline1__=!0),"new Map("+e(Array.from(t),r)+")");if(A(t))return 0==t.size?"new Set()":"new Set("+e(Array.from(t),r)+")";if(y(t))return s=[],r.wrap=!0,f?(r.__inline1__=!1,r.__inline2__=!0):(c=r.__indent__,u+=c,r.__indent__=u),h(t,function(t){P=!1,m&&(r.__inline2__=!1),s.push((o||m?"":u)+e(t,r))}),P?"[]":m?"["+s.join(", ")+"]":"["+w+s.join(","+w)+w+(o?"":c)+"]";if(!b(t))return v(t)?(s=[],r.wrap=!0,c=r.__indent__,u+=c,r.__indent__=u,p(t,function(t,n){P=!1,s.push((o?"":u)+e(t,r)+":"+(o?"":" ")+e(n,r))}),P?"{}":"{"+w+s.join(","+w)+w+(o?"":c)+"}"):i?JSON.stringify(t)||"null":String(t);if(i)return JSON.stringify(t);if(T)return String(t);if(O){var B=t.toString(16);return l||(B=B.toUpperCase()),"0x"+B}if(k)return"0b"+t.toString(2);if(F)return"0o"+t.toString(8)}var R,I,M,N=t,L=-1,j=N.length;for(s="";++L<j;){var U=N.charAt(L);if(r.es6&&(R=N.charCodeAt(L))>=55296&&R<=56319&&j>L+1&&(I=N.charCodeAt(L+1))>=56320&&I<=57343){M=1024*(R-55296)+I-56320+65536;var V=M.toString(16);l||(V=V.toUpperCase()),s+="\\u{"+V+"}",L++}else{if(!r.escapeEverything){if(C.test(U)){s+=U;continue}if('"'==U){s+=a==U?'\\"':U;continue}if("'"==U){s+=a==U?"\\'":U;continue}}if("\0"!=U||i||D.test(N.charAt(L+1)))if(_.test(U))s+=S[U];else{var G=U.charCodeAt(0),V=G.toString(16);l||(V=V.toUpperCase());var W=V.length>2||i,Y="\\"+(W?"u":"x")+("0000"+V).slice(W?-4:-2);s+=Y}else s+="\\0"}}return r.wrap&&(s=a+s+a),r.escapeEtago?s.replace(/<\/(script|style)/gi,"<\\/$1"):s};w.version="1.3.0","object"==s(r(49))&&r(49)?void 0!==(n=function(){return w}.call(t,r,t,e))&&(e.exports=n):o&&!o.nodeType?u?u.exports=w:o.jsesc=w:a.jsesc=w}(void 0)}).call(t,r(39)(e),function(){return this}())},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i="object"===n(t)?t:{};i.parse=function(){var e,t,r,i,s,a,o={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],l=function(e){return""===e?"EOF":"'"+e+"'"},c=function(n){var i=new SyntaxError;throw i.message=n+" at line "+t+" column "+r+" of the JSON5 data. Still to read: "+JSON.stringify(s.substring(e-1,e+19)),i.at=e,i.lineNumber=t,i.columnNumber=r,i},f=function(n){return n&&n!==i&&c("Expected "+l(n)+" instead of "+l(i)),i=s.charAt(e),e++,r++,("\n"===i||"\r"===i&&"\n"!==p())&&(t++,r=0),i},p=function(){return s.charAt(e)},d=function(){var e=i;for("_"!==i&&"$"!==i&&(i<"a"||i>"z")&&(i<"A"||i>"Z")&&c("Bad identifier as unquoted key");f()&&("_"===i||"$"===i||i>="a"&&i<="z"||i>="A"&&i<="Z"||i>="0"&&i<="9");)e+=i;return e},h=function(){var e,t="",r="",n=10;if("-"!==i&&"+"!==i||(t=i,f(i)),"I"===i)return e=E(),("number"!=typeof e||isNaN(e))&&c("Unexpected word for number"),"-"===t?-e:e;if("N"===i)return e=E(),isNaN(e)||c("expected word to be NaN"),e;switch("0"===i&&(r+=i,f(),"x"===i||"X"===i?(r+=i,f(),n=16):i>="0"&&i<="9"&&c("Octal literal")),n){case 10:for(;i>="0"&&i<="9";)r+=i,f();if("."===i)for(r+=".";f()&&i>="0"&&i<="9";)r+=i;if("e"===i||"E"===i)for(r+=i,f(),"-"!==i&&"+"!==i||(r+=i,f());i>="0"&&i<="9";)r+=i,f();break;case 16:for(;i>="0"&&i<="9"||i>="A"&&i<="F"||i>="a"&&i<="f";)r+=i,f()}if(e="-"===t?-r:+r,isFinite(e))return e;c("Bad number")},m=function(){var e,t,r,n,s="";if('"'===i||"'"===i)for(r=i;f();){if(i===r)return f(),s;if("\\"===i)if(f(),"u"===i){for(n=0,t=0;t<4&&(e=parseInt(f(),16),isFinite(e));t+=1)n=16*n+e;s+=String.fromCharCode(n)}else if("\r"===i)"\n"===p()&&f();else{if("string"!=typeof o[i])break;s+=o[i]}else{if("\n"===i)break;s+=i}}c("Bad string")},y=function(){"/"!==i&&c("Not an inline comment");do{if(f(),"\n"===i||"\r"===i)return void f()}while(i)},v=function(){"*"!==i&&c("Not a block comment");do{for(f();"*"===i;)if(f("*"),"/"===i)return void f("/")}while(i);c("Unterminated block comment")},g=function(){"/"!==i&&c("Not a comment"),f("/"),"/"===i?y():"*"===i?v():c("Unrecognized comment")},b=function(){for(;i;)if("/"===i)g();else{if(!(u.indexOf(i)>=0))return;f()}},E=function(){switch(i){case"t":return f("t"),f("r"),f("u"),f("e"),!0;case"f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case"n":return f("n"),f("u"),f("l"),f("l"),null;case"I":return f("I"),f("n"),f("f"),f("i"),f("n"),f("i"),f("t"),f("y"),1/0;case"N":return f("N"),f("a"),f("N"),NaN}c("Unexpected "+l(i))},x=function(){var e=[];if("["===i)for(f("["),b();i;){if("]"===i)return f("]"),e;if(","===i?c("Missing array element"):e.push(a()),b(),","!==i)return f("]"),e;f(","),b()}c("Bad array")},A=function(){var e,t={};if("{"===i)for(f("{"),b();i;){if("}"===i)return f("}"),t;if(e='"'===i||"'"===i?m():d(),b(),f(":"),t[e]=a(),b(),","!==i)return f("}"),t;f(","),b()}c("Bad object")};return a=function(){switch(b(),i){case"{":return A();case"[":return x();case'"':case"'":return m();case"-":case"+":case".":return h();default:return i>="0"&&i<="9"?h():E()}},function(o,u){var l;return s=String(o),e=0,t=1,r=1,i=" ",l=a(),b(),i&&c("Syntax error"),"function"==typeof u?function e(t,r){var i,s,a=t[r];if(a&&"object"===(void 0===a?"undefined":n(a)))for(i in a)Object.prototype.hasOwnProperty.call(a,i)&&(s=e(a,i),void 0!==s?a[i]=s:delete a[i]);return u.call(t,r,a)}({"":l},""):l}}(),i.stringify=function(e,t,r){function s(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e}function a(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}function o(e){if("string"!=typeof e)return!1;if(!a(e[0]))return!1;for(var t=1,r=e.length;t<r;){if(!s(e[t]))return!1;t++}return!0}function u(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function l(e){return"[object Date]"===Object.prototype.toString.call(e)}function c(e){for(var t=0;t<y.length;t++)if(y[t]===e)throw new TypeError("Converting circular structure to JSON")}function f(e,t,r){if(!e)return"";e.length>10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;i<t;i++)n+=e;return n}function p(e){return v.lastIndex=0,v.test(e)?'"'+e.replace(v,function(e){var t=g[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function d(e,t,r){var i,s,a=h(e,t,r);switch(a&&!l(a)&&(a=a.valueOf()),void 0===a?"undefined":n(a)){case"boolean":return a.toString();case"number":return isNaN(a)||!isFinite(a)?"null":a.toString();case"string":return p(a.toString());case"object":if(null===a)return"null";if(u(a)){c(a),i="[",y.push(a);for(var v=0;v<a.length;v++)s=d(a,v,!1),i+=f(m,y.length),i+=null===s||void 0===s?"null":s,v<a.length-1?i+=",":m&&(i+="\n");y.pop(),a.length&&(i+=f(m,y.length,!0)),i+="]"}else{c(a),i="{";var g=!1;y.push(a);for(var b in a)if(a.hasOwnProperty(b)){var E=d(a,b,!1);r=!1,void 0!==E&&null!==E&&(i+=f(m,y.length),g=!0,t=o(b)?b:p(b),i+=t+":"+(m?" ":"")+E+",")}y.pop(),i=g?i.substring(0,i.length-1)+f(m,y.length)+"}":"{}"}return i;default:return}}if(t&&"function"!=typeof t&&!u(t))throw new Error("Replacer must be a function or an array");var h=function(e,r,n){var i=e[r];return i&&i.toJSON&&"function"==typeof i.toJSON&&(i=i.toJSON()),"function"==typeof t?t.call(e,r,i):t?n||u(e)||t.indexOf(r)>=0?i:void 0:i};i.isWord=o;var m,y=[];r&&("string"==typeof r?m=r:"number"==typeof r&&r>=0&&(m=f(" ",r,!0)));var v=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b={"":e};return void 0===e?h(b,"",!0):d(b,"",!0)}},function(e,t){"use strict";var r=[],n=[];e.exports=function(e,t){if(e===t)return 0;var i=e.length,s=t.length;if(0===i)return s;if(0===s)return i;for(var a,o,u,l,c=0,f=0;c<i;)n[c]=e.charCodeAt(c),r[c]=++c;for(;f<s;)for(a=t.charCodeAt(f),u=f++,o=f,c=0;c<i;c++)l=a===n[c]?u:u+1,u=r[c],o=r[c]=u>o?l>o?o+1:l:l>u?u+1:l;return o}},function(e,t,r){"use strict";var n=r(38),i=r(17),s=n(i,"DataView");e.exports=s},function(e,t,r){"use strict";function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var i=r(536),s=r(537),a=r(538),o=r(539),u=r(540);n.prototype.clear=i,n.prototype.delete=s,n.prototype.get=a,n.prototype.has=o,n.prototype.set=u,e.exports=n},function(e,t,r){"use strict";var n=r(38),i=r(17),s=n(i,"Promise");e.exports=s},function(e,t,r){"use strict";var n=r(38),i=r(17),s=n(i,"WeakMap");e.exports=s},function(e,t){"use strict";function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},function(e,t){"use strict";function r(e,t){return e.add(t),e}e.exports=r},function(e,t){"use strict";function r(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}e.exports=r},function(e,t){"use strict";function r(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}e.exports=r},function(e,t,r){"use strict";function n(e,t){return!!(null==e?0:e.length)&&i(e,t,0)>-1}var i=r(166);e.exports=n},function(e,t){"use strict";function r(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}e.exports=r},function(e,t){"use strict";function r(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}e.exports=r},function(e,t,r){"use strict";function n(e,t){return e&&i(t,s(t),e)}var i=r(31),s=r(32);e.exports=n},function(e,t,r){"use strict";function n(e,t){return e&&i(t,s(t),e)}var i=r(31),s=r(47);e.exports=n},function(e,t){"use strict";function r(e,t,r){return e===e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}e.exports=r},function(e,t,r){"use strict";var n=r(18),i=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=s},function(e,t,r){"use strict";var n=r(489),i=r(526),s=i(n);e.exports=s},function(e,t,r){"use strict";function n(e,t,r,a,o){var u=-1,l=e.length;for(r||(r=s),o||(o=[]);++u<l;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,a,o):i(o,c):a||(o[o.length]=c)}return o}var i=r(161),s=r(543);e.exports=n},function(e,t,r){"use strict";function n(e,t){return e&&i(e,t,s)}var i=r(248),s=r(32);e.exports=n},function(e,t){"use strict";function r(e,t){return null!=e&&i.call(e,t)}var n=Object.prototype,i=n.hasOwnProperty;e.exports=r},function(e,t){"use strict";function r(e,t){return null!=e&&t in Object(e)}e.exports=r},function(e,t){"use strict";function r(e,t,r,n){for(var i=r-1,s=e.length;++i<s;)if(n(e[i],t))return i;return-1}e.exports=r},function(e,t,r){"use strict";function n(e){return s(e)&&i(e)==a}var i=r(30),s=r(25),a="[object Arguments]";e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,y,g){var b=l(e),E=l(t),x=b?h:u(e),A=E?h:u(t);x=x==d?m:x,A=A==d?m:A;var S=x==m,_=A==m,D=x==A;if(D&&c(e)){if(!c(t))return!1;b=!0,S=!1}if(D&&!S)return g||(g=new i),b||f(e)?s(e,t,r,n,y,g):a(e,t,x,r,n,y,g);if(!(r&p)){var C=S&&v.call(e,"__wrapped__"),w=_&&v.call(t,"__wrapped__");if(C||w){var P=C?e.value():e,k=w?t.value():t;return g||(g=new i),y(P,k,r,n,g)}}return!!D&&(g||(g=new i),o(e,t,r,n,y,g))}var i=r(99),s=r(260),a=r(530),o=r(531),u=r(264),l=r(6),c=r(113),f=r(177),p=1,d="[object Arguments]",h="[object Array]",m="[object Object]",y=Object.prototype,v=y.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n){var u=r.length,l=u,c=!n;if(null==e)return!l;for(e=Object(e);u--;){var f=r[u];if(c&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<l;){f=r[u];var p=f[0],d=e[p],h=f[1];if(c&&f[2]){if(void 0===d&&!(p in e))return!1}else{var m=new i;if(n)var y=n(d,h,p,e,t,m);if(!(void 0===y?s(h,d,a|o,n,m):y))return!1}}return!0}var i=r(99),s=r(251),a=1,o=2;e.exports=n},function(e,t){"use strict";function r(e){return e!==e}e.exports=r},function(e,t,r){"use strict";function n(e){return!(!a(e)||s(e))&&(i(e)?h:l).test(o(e))}var i=r(175),s=r(545),a=r(18),o=r(272),u=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Function.prototype,f=Object.prototype,p=c.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},function(e,t,r){"use strict";function n(e){return s(e)&&i(e)==a}var i=r(30),s=r(25),a="[object RegExp]";e.exports=n},function(e,t,r){"use strict";function n(e){return a(e)&&s(e.length)&&!!o[i(e)]}var i=r(30),s=r(176),a=r(25),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=n},function(e,t,r){"use strict";function n(e){if(!i(e))return s(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}var i=r(105),s=r(557),a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e){if(!i(e))return a(e);var t=s(e),r=[];for(var n in e)("constructor"!=n||!t&&u.call(e,n))&&r.push(n);return r}var i=r(18),s=r(105),a=r(558),o=Object.prototype,u=o.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e){var t=s(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(r){return r===e||i(r,e,t)}}var i=r(495),s=r(533),a=r(269);e.exports=n},function(e,t,r){"use strict";function n(e,t){return o(e)&&u(t)?l(c(e),t):function(r){var n=s(r,e);return void 0===n&&n===t?a(r,e):i(t,n,f|p)}}var i=r(251),s=r(583),a=r(584),o=r(173),u=r(267),l=r(269),c=r(108),f=1,p=2;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,c,f){e!==t&&a(t,function(a,l){if(u(a))f||(f=new i),o(e,t,l,r,n,c,f);else{var p=c?c(e[l],a,l+"",e,t,f):void 0;void 0===p&&(p=a),s(e,l,p)}},l)}var i=r(99),s=r(247),a=r(248),o=r(505),u=r(18),l=r(47);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,g,b,E){var x=e[r],A=t[r],S=E.get(A);if(S)return void i(e,r,S);var _=b?b(x,A,r+"",e,t,E):void 0,D=void 0===_;if(D){var C=c(A),w=!C&&p(A),P=!C&&!w&&y(A);_=A,C||w||P?c(x)?_=x:f(x)?_=o(x):w?(D=!1,_=s(A,!0)):P?(D=!1,_=a(A,!0)):_=[]:m(A)||l(A)?(_=x,l(x)?_=v(x):(!h(x)||n&&d(x))&&(_=u(A))):D=!1}D&&(E.set(A,_),g(_,A,n,b,E),E.delete(A)),i(e,r,_)}var i=r(247),s=r(256),a=r(257),o=r(168),u=r(266),l=r(112),c=r(6),f=r(585),p=r(113),d=r(175),h=r(18),m=r(275),y=r(177),v=r(599);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=-1;t=i(t.length?t:[c],u(s));var f=a(e,function(e,r,s){return{criteria:i(t,function(t){return t(e)}),index:++n,value:e}});return o(f,function(e,t){return l(e,t,r)})}var i=r(60),s=r(61),a=r(252),o=r(512),u=r(102),l=r(522),c=r(110);e.exports=n},function(e,t){"use strict";function r(e){return function(t){return null==t?void 0:t[e]}}e.exports=r},function(e,t,r){"use strict";function n(e){return function(t){return i(t,e)}}var i=r(249);e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n){var l=n?a:s,f=-1,p=t.length,d=e;for(e===t&&(t=u(t)),r&&(d=i(e,o(r)));++f<p;)for(var h=0,m=t[f],y=r?r(m):m;(h=l(d,y,h,n))>-1;)d!==e&&c.call(d,h,1),c.call(e,h,1);return e}var i=r(60),s=r(166),a=r(492),o=r(102),u=r(168),l=Array.prototype,c=l.splice;e.exports=n},function(e,t){"use strict";function r(e,t){var r="";if(!e||t<1||t>n)return r;do{t%2&&(r+=e),(t=i(t/2))&&(e+=e)}while(t);return r}var n=9007199254740991,i=Math.floor;e.exports=r},function(e,t,r){"use strict";var n=r(576),i=r(259),s=r(110),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;e.exports=a},function(e,t){"use strict";function r(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}e.exports=r},function(e,t){"use strict";function r(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e.exports=r},function(e,t,r){"use strict";function n(e,t,r){var n=-1,f=s,p=e.length,d=!0,h=[],m=h;if(r)d=!1,f=a;else if(p>=c){var y=t?null:u(e);if(y)return l(y);d=!1,f=o,m=new i}else m=t?[]:h;e:for(;++n<p;){var v=e[n],g=t?t(v):v;if(v=r||0!==v?v:0,d&&g===g){for(var b=m.length;b--;)if(m[b]===g)continue e;t&&m.push(g),h.push(v)}else f(m,g,r)||(m!==h&&m.push(g),h.push(v))}return h}var i=r(242),s=r(480),a=r(481),o=r(254),u=r(528),l=r(107),c=200;e.exports=n},function(e,t,r){"use strict";function n(e,t){return i(t,function(t){return e[t]})}var i=r(60);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=t?i(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var i=r(167);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=r(476),s=r(246),a=r(268),o=1;e.exports=n},function(e,t){"use strict";function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}var n=/\w*$/;e.exports=r},function(e,t,r){"use strict";function n(e,t,r){var n=t?r(a(e),o):a(e);return s(n,i,new e.constructor)}var i=r(477),s=r(246),a=r(107),o=1;e.exports=n},function(e,t,r){"use strict";function n(e){return a?Object(a.call(e)):{}}var i=r(45),s=i?i.prototype:void 0,a=s?s.valueOf:void 0;e.exports=n},function(e,t,r){"use strict";function n(e,t){if(e!==t){var r=void 0!==e,n=null===e,s=e===e,a=i(e),o=void 0!==t,u=null===t,l=t===t,c=i(t);if(!u&&!c&&!a&&e>t||a&&o&&l&&!u&&!c||n&&o&&l||!r&&l||!s)return 1;if(!n&&!a&&!c&&e<t||c&&r&&s&&!n&&!a||u&&r&&s||!o&&s||!l)return-1}return 0}var i=r(62);e.exports=n},function(e,t,r){"use strict";function n(e,t,r){for(var n=-1,s=e.criteria,a=t.criteria,o=s.length,u=r.length;++n<o;){var l=i(s[n],a[n]);if(l){if(n>=u)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}var i=r(521);e.exports=n},function(e,t,r){"use strict";function n(e,t){return i(e,s(e),t)}var i=r(31),s=r(170);e.exports=n},function(e,t,r){"use strict";function n(e,t){return i(e,s(e),t)}var i=r(31),s=r(263);e.exports=n},function(e,t,r){"use strict";var n=r(17),i=n["__core-js_shared__"];e.exports=i},function(e,t,r){"use strict";function n(e,t){return function(r,n){if(null==r)return r;if(!i(r))return e(r,n);for(var s=r.length,a=t?s:-1,o=Object(r);(t?a--:++a<s)&&!1!==n(o[a],a,o););return r}}var i=r(24);e.exports=n},function(e,t){"use strict";function r(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[e?o:++i];if(!1===r(s[u],u,s))break}return t}}e.exports=r},function(e,t,r){"use strict";var n=r(241),i=r(591),s=r(107),a=n&&1/s(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;e.exports=a},function(e,t,r){"use strict";function n(e,t,r,n){return void 0===e||i(e,s[r])&&!a.call(n,r)?t:e}var i=r(46),s=Object.prototype,a=s.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,i,S,D){switch(r){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!S(new s(e),new s(t)));case p:case d:case y:return a(+e,+t);case h:return e.name==t.name&&e.message==t.message;case v:case b:return e==t+"";case m:var C=u;case g:var w=n&c;if(C||(C=l),e.size!=t.size&&!w)return!1;var P=D.get(e);if(P)return P==t;n|=f,D.set(e,t);var k=o(C(e),C(t),n,i,S,D);return D.delete(e),k;case E:if(_)return _.call(e)==_.call(t)}return!1}var i=r(45),s=r(243),a=r(46),o=r(260),u=r(268),l=r(107),c=1,f=2,p="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",y="[object Number]",v="[object RegExp]",g="[object Set]",b="[object String]",E="[object Symbol]",x="[object ArrayBuffer]",A="[object DataView]",S=i?i.prototype:void 0,_=S?S.valueOf:void 0;e.exports=n},function(e,t,r){"use strict";function n(e,t,r,n,a,u){var l=r&s,c=i(e),f=c.length;if(f!=i(t).length&&!l)return!1;for(var p=f;p--;){var d=c[p];if(!(l?d in t:o.call(t,d)))return!1}var h=u.get(e);if(h&&u.get(t))return h==t;var m=!0;u.set(e,t),u.set(t,e);for(var y=l;++p<f;){d=c[p];var v=e[d],g=t[d];if(n)var b=l?n(g,v,d,t,e,u):n(v,g,d,e,t,u);if(!(void 0===b?v===g||a(v,g,r,n,u):b)){m=!1;break}y||(y="constructor"==d)}if(m&&!y){var E=e.constructor,x=t.constructor;E!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof E&&E instanceof E&&"function"==typeof x&&x instanceof x)&&(m=!1)}return u.delete(e),u.delete(t),m}var i=r(262),s=1,a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e){return i(e,a,s)}var i=r(250),s=r(263),a=r(47);e.exports=n},function(e,t,r){"use strict";function n(e){for(var t=s(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,i(a)]}return t}var i=r(267),s=r(32);e.exports=n},function(e,t,r){"use strict";function n(e){var t=a.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var i=o.call(e);return n&&(t?e[u]=r:delete e[u]),i}var i=r(45),s=Object.prototype,a=s.hasOwnProperty,o=s.toString,u=i?i.toStringTag:void 0;e.exports=n},function(e,t){"use strict";function r(e,t){return null==e?void 0:e[t]}e.exports=r},function(e,t,r){"use strict";function n(){this.__data__=i?i(null):{},this.size=0}var i=r(106);e.exports=n},function(e,t){"use strict";function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=r},function(e,t,r){"use strict";function n(e){var t=this.__data__;if(i){var r=t[e];return r===s?void 0:r}return o.call(t,e)?t[e]:void 0}var i=r(106),s="__lodash_hash_undefined__",a=Object.prototype,o=a.hasOwnProperty;e.exports=n},function(e,t,r){"use strict" -;function n(e){var t=this.__data__;return i?void 0!==t[e]:a.call(t,e)}var i=r(106),s=Object.prototype,a=s.hasOwnProperty;e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=i&&void 0===t?s:t,this}var i=r(106),s="__lodash_hash_undefined__";e.exports=n},function(e,t){"use strict";function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var n=Object.prototype,i=n.hasOwnProperty;e.exports=r},function(e,t,r){"use strict";function n(e,t,r,n){var F=e.constructor;switch(t){case b:return i(e);case f:case p:return new F(+e);case E:return s(e,n);case x:case A:case S:case _:case D:case C:case w:case P:case k:return c(e,n);case d:return a(e,n,r);case h:case v:return new F(e);case m:return o(e);case y:return u(e,n,r);case g:return l(e)}}var i=r(167),s=r(516),a=r(517),o=r(518),u=r(519),l=r(520),c=r(257),f="[object Boolean]",p="[object Date]",d="[object Map]",h="[object Number]",m="[object RegExp]",y="[object Set]",v="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",E="[object DataView]",x="[object Float32Array]",A="[object Float64Array]",S="[object Int8Array]",_="[object Int16Array]",D="[object Int32Array]",C="[object Uint8Array]",w="[object Uint8ClampedArray]",P="[object Uint16Array]",k="[object Uint32Array]";e.exports=n},function(e,t,r){"use strict";function n(e){return a(e)||s(e)||!!(o&&e&&e[o])}var i=r(45),s=r(112),a=r(6),o=i?i.isConcatSpreadable:void 0;e.exports=n},function(e,t){"use strict";function r(e){var t=void 0===e?"undefined":n(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t,r){"use strict";function n(e){return!!s&&s in e}var i=r(525),s=function(){var e=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},function(e,t){"use strict";function r(){this.__data__=[],this.size=0}e.exports=r},function(e,t,r){"use strict";function n(e){var t=this.__data__,r=i(t,e);return!(r<0)&&(r==t.length-1?t.pop():a.call(t,r,1),--this.size,!0)}var i=r(100),s=Array.prototype,a=s.splice;e.exports=n},function(e,t,r){"use strict";function n(e){var t=this.__data__,r=i(t,e);return r<0?void 0:t[r][1]}var i=r(100);e.exports=n},function(e,t,r){"use strict";function n(e){return i(this.__data__,e)>-1}var i=r(100);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=r(100);e.exports=n},function(e,t,r){"use strict";function n(){this.size=0,this.__data__={hash:new i,map:new(a||s),string:new i}}var i=r(473),s=r(98),a=r(159);e.exports=n},function(e,t,r){"use strict";function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=r(104);e.exports=n},function(e,t,r){"use strict";function n(e){return i(this,e).get(e)}var i=r(104);e.exports=n},function(e,t,r){"use strict";function n(e){return i(this,e).has(e)}var i=r(104);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=r(104);e.exports=n},function(e,t,r){"use strict";function n(e){var t=i(e,function(e){return r.size===s&&r.clear(),e}),r=t.cache;return t}var i=r(589),s=500;e.exports=n},function(e,t,r){"use strict";var n=r(271),i=n(Object.keys,Object);e.exports=i},function(e,t){"use strict";function r(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}e.exports=r},function(e,t){"use strict";function r(e){return i.call(e)}var n=Object.prototype,i=n.toString;e.exports=r},function(e,t,r){"use strict";function n(e,t,r){return t=s(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,o=s(n.length-t,0),u=Array(o);++a<o;)u[a]=n[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=n[a];return l[t]=r(u),i(e,this,l)}}var i=r(244),s=Math.max;e.exports=n},function(e,t){"use strict";function r(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=r},function(e,t){"use strict";function r(e){return this.__data__.has(e)}e.exports=r},function(e,t,r){"use strict";var n=r(511),i=r(564),s=i(n);e.exports=s},function(e,t){"use strict";function r(e){var t=0,r=0;return function(){var a=s(),o=i-(a-r);if(r=a,o>0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,i=16,s=Date.now;e.exports=r},function(e,t,r){"use strict";function n(){this.__data__=new i,this.size=0}var i=r(98);e.exports=n},function(e,t){"use strict";function r(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}e.exports=r},function(e,t){"use strict";function r(e){return this.__data__.get(e)}e.exports=r},function(e,t){"use strict";function r(e){return this.__data__.has(e)}e.exports=r},function(e,t,r){"use strict";function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!s||n.length<o-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new a(n)}return r.set(e,t),this.size=r.size,this}var i=r(98),s=r(159),a=r(160),o=200;e.exports=n},function(e,t){"use strict";function r(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}e.exports=r},function(e,t,r){"use strict";var n=r(556),i=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=n(function(e){var t=[];return i.test(e)&&t.push(""),e.replace(s,function(e,r,n,i){t.push(n?i.replace(a,"$1"):r||e)}),t});e.exports=o},function(e,t,r){"use strict";var n=r(31),i=r(103),s=r(47),a=i(function(e,t){n(t,s(t),e)});e.exports=a},function(e,t,r){"use strict";var n=r(31),i=r(103),s=r(47),a=i(function(e,t,r,i){n(t,s(t),e,i)});e.exports=a},function(e,t,r){"use strict";function n(e){return i(e,s|a)}var i=r(164),s=1,a=4;e.exports=n},function(e,t,r){"use strict";function n(e,t){return t="function"==typeof t?t:void 0,i(e,s|a,t)}var i=r(164),s=1,a=4;e.exports=n},function(e,t){"use strict";function r(e){return function(){return e}}e.exports=r},function(e,t,r){"use strict";function n(e){return e=i(e),e&&a.test(e)?e.replace(s,"\\$&"):e}var i=r(114),s=/[\\^$.*+?()[\]{}|]/g,a=RegExp(s.source);e.exports=n},function(e,t,r){"use strict";e.exports=r(572)},function(e,t,r){"use strict";var n=r(258),i=r(580),s=n(i);e.exports=s},function(e,t,r){"use strict";function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var u=null==r?0:a(r);return u<0&&(u=o(n+u,0)),i(e,s(t,3),u)}var i=r(165),s=r(61),a=r(48),o=Math.max;e.exports=n},function(e,t,r){"use strict";var n=r(258),i=r(582),s=n(i);e.exports=s},function(e,t,r){"use strict";function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var l=n-1;return void 0!==r&&(l=a(r),l=r<0?o(n+l,0):u(l,n-1)),i(e,s(t,3),l,!0)}var i=r(165),s=r(61),a=r(48),o=Math.max,u=Math.min;e.exports=n},function(e,t,r){"use strict";function n(e,t,r){var n=null==e?void 0:i(e,t);return void 0===n?r:n}var i=r(249);e.exports=n},function(e,t,r){"use strict";function n(e,t){return null!=e&&s(e,t,i)}var i=r(491),s=r(265);e.exports=n},function(e,t,r){"use strict";function n(e){return s(e)&&i(e)}var i=r(24),s=r(25);e.exports=n},function(e,t,r){"use strict";function n(e){return"number"==typeof e&&e==i(e)}var i=r(48);e.exports=n},function(e,t,r){"use strict";function n(e){return"string"==typeof e||!s(e)&&a(e)&&i(e)==o}var i=r(30),s=r(6),a=r(25),o="[object String]";e.exports=n},function(e,t,r){"use strict";function n(e,t){return(o(e)?i:a)(e,s(t,3))}var i=r(60),s=r(61),a=r(252),o=r(6);e.exports=n},function(e,t,r){"use strict";function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var r=function r(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(n.Cache||i),r}var i=r(160),s="Expected a function";n.Cache=i,e.exports=n},function(e,t,r){"use strict";var n=r(504),i=r(103),s=i(function(e,t,r,i){n(e,t,r,i)});e.exports=s},function(e,t){"use strict";function r(){}e.exports=r},function(e,t,r){"use strict";function n(e){return a(e)?i(o(e)):s(e)}var i=r(507),s=r(508),a=r(173),o=r(108);e.exports=n},function(e,t,r){"use strict";function n(e,t){return e&&e.length&&t&&t.length?i(e,t):e}var i=r(509);e.exports=n},function(e,t,r){"use strict";var n=r(488),i=r(506),s=r(101),a=r(172),o=s(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});e.exports=o},function(e,t,r){"use strict";function n(e,t,r){return e=o(e),r=null==r?0:i(a(r),0,e.length),t=s(t),e.slice(r,r+t.length)==t}var i=r(485),s=r(253),a=r(48),o=r(114);e.exports=n},function(e,t){"use strict";function r(){return!1}e.exports=r},function(e,t,r){"use strict";function n(e){if(!e)return 0===e?e:0;if((e=i(e))===s||e===-s){return(e<0?-1:1)*a}return e===e?e:0}var i=r(598),s=1/0,a=1.7976931348623157e308;e.exports=n},function(e,t,r){"use strict";function n(e){if("number"==typeof e)return e;if(s(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=l.test(e);return r||c.test(e)?f(e.slice(2),r?2:8):u.test(e)?a:+e}var i=r(18),s=r(62),a=NaN,o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;e.exports=n},function(e,t,r){"use strict";function n(e){return i(e,s(e))}var i=r(31),s=r(47);e.exports=n},function(e,t,r){"use strict";function n(e){return e&&e.length?i(e):[]}var i=r(514);e.exports=n},function(e,t,r){"use strict";function n(e,t){return t=t||{},function(r,n,i){return s(r,e,t)}}function i(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function s(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new a(t,r).match(e))}function a(e,t){if(!(this instanceof a))return new a(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==m.sep&&(e=e.split(m.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function o(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(_)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}}function u(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i<s&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}}function l(e,t){if(t||(t=this instanceof a?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:v(e)}function c(e,t){function r(){if(i){switch(i){case"*":a+=E,o=!0;break;case"?":a+=b,o=!0;break;default:a+="\\"+i}v.debug("clearStateChar %j %j",i,a),i=!1}}if(e.length>65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return y;if(""===e)return"";for(var i,s,a="",o=!!n.nocase,u=!1,l=[],c=[],f=!1,p=-1,h=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",v=this,x=0,A=e.length;x<A&&(s=e.charAt(x));x++)if(this.debug("%s\t%s %s %j",e,x,a,s),u&&S[s])a+="\\"+s,u=!1;else switch(s){case"/":return!1;case"\\":r(),u=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,x,a,s),f){this.debug(" in class"),"!"===s&&x===h+1&&(s="^"),a+=s;continue}v.debug("call clearStateChar %j",i),r(),i=s,n.noext&&r();continue;case"(":if(f){a+="(";continue}if(!i){a+="\\(";continue}l.push({type:i,start:x-1,reStart:a.length,open:g[i].open,close:g[i].close}),a+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,a),i=!1;continue;case")":if(f||!l.length){a+="\\)";continue}r(),o=!0;var _=l.pop();a+=_.close,"!"===_.type&&c.push(_),_.reEnd=a.length;continue;case"|":if(f||!l.length||u){a+="\\|",u=!1;continue}r(),a+="|";continue;case"[":if(r(),f){a+="\\"+s;continue}f=!0,h=x,p=a.length,a+=s;continue;case"]":if(x===h+1||!f){a+="\\"+s,u=!1;continue}if(f){var C=e.substring(h+1,x);try{RegExp("["+C+"]")}catch(e){var w=this.parse(C,D);a=a.substr(0,p)+"\\["+w[0]+"\\]",o=o||w[1],f=!1;continue}}o=!0,f=!1,a+=s;continue;default:r(),u?u=!1:!S[s]||"^"===s&&f||(a+="\\"),a+=s}for(f&&(C=e.substr(h+1),w=this.parse(C,D),a=a.substr(0,p)+"\\["+w[0],o=o||w[1]),_=l.pop();_;_=l.pop()){var P=a.slice(_.reStart+_.open.length);this.debug("setting tail",a,_),P=P.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",P,P,_,a);var k="*"===_.type?E:"?"===_.type?b:"\\"+_.type;o=!0,a=a.slice(0,_.reStart)+k+"\\("+P}r(),u&&(a+="\\\\");var F=!1;switch(a.charAt(0)){case".":case"[":case"(":F=!0}for(var T=c.length-1;T>-1;T--){var O=c[T],B=a.slice(0,O.reStart),R=a.slice(O.reStart,O.reEnd-8),I=a.slice(O.reEnd-8,O.reEnd),M=a.slice(O.reEnd);I+=M;var N=B.split("(").length-1,L=M;for(x=0;x<N;x++)L=L.replace(/\)[+*?]?/,"");M=L;var j="";""===M&&t!==D&&(j="$");a=B+R+M+j+I}if(""!==a&&o&&(a="(?=.)"+a),F&&(a=m+a),t===D)return[a,o];if(!o)return d(e);var U=n.nocase?"i":"";try{var V=new RegExp("^"+a+"$",U)}catch(e){return new RegExp("$.")}return V._glob=e,V._src=a,V}function f(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?E:t.dot?x:A,n=t.nocase?"i":"",i=e.map(function(e){return e.map(function(e){return e===y?r:"string"==typeof e?h(e):e._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp}function p(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==m.sep&&(e=e.split(m.sep).join("/")),e=e.split(_),this.debug(this.pattern,"split",e);var n=this.set;this.debug(this.pattern,"set",n);var i,s;for(s=e.length-1;s>=0&&!(i=e[s]);s--);for(s=0;s<n.length;s++){var a=n[s],o=e;r.matchBase&&1===a.length&&(o=[i]);if(this.matchOne(o,a,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}function d(e){return e.replace(/\\(.)/g,"$1")}function h(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}e.exports=s,s.Minimatch=a;var m={sep:"/"};try{m=r(19)}catch(e){}var y=s.GLOBSTAR=a.GLOBSTAR={},v=r(398),g={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},b="[^/]",E=b+"*?",x="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",A="(?:(?!(?:\\/|^)\\.).)*?",S=function(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}("().*{}+?[]^$\\!"),_=/\/+/;s.filter=n,s.defaults=function(e){if(!e||!Object.keys(e).length)return s;var t=s,r=function(r,n,s){return t.minimatch(r,n,i(e,s))};return r.Minimatch=function(r,n){return new t.Minimatch(r,i(e,n))},r},a.defaults=function(e){return e&&Object.keys(e).length?s.defaults(e).Minimatch:a},a.prototype.debug=function(){},a.prototype.make=o,a.prototype.parseNegate=u,s.braceExpand=function(e,t){return l(e,t)},a.prototype.braceExpand=l,a.prototype.parse=c;var D={};s.makeRe=function(e,t){return new a(e,t||{}).makeRe()},a.prototype.makeRe=f,s.match=function(e,t,r){r=r||{};var n=new a(t,r);return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},a.prototype.match=p,a.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var i=0,s=0,a=e.length,o=t.length;i<a&&s<o;i++,s++){this.debug("matchOne loop");var u=t[s],l=e[i];if(this.debug(t,u,l),!1===u)return!1;if(u===y){this.debug("GLOBSTAR",[t,u,l]);var c=i,f=s+1;if(f===o){for(this.debug("** at the end");i<a;i++)if("."===e[i]||".."===e[i]||!n.dot&&"."===e[i].charAt(0))return!1;return!0}for(;c<a;){var p=e[c];if(this.debug("\nglobstar while",e,c,t,f,p),this.matchOne(e.slice(c),t.slice(f),r))return this.debug("globstar found match!",c,a,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,c,t,f);break}this.debug("globstar swallow a segment, and continue"),c++}return!(!r||(this.debug("\n>>> no match, partial?",e,c,t,f),c!==a))}var d;if("string"==typeof u?(d=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,d)):(d=l.match(u),this.debug("pattern match",u,l,d)),!d)return!1}if(i===a&&s===o)return!0;if(i===a)return r;if(s===o){return i===a-1&&""===e[i]}throw new Error("wtf?")}},function(e,t){"use strict";function r(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*f;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*l;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function n(e){return e>=c?Math.round(e/c)+"d":e>=l?Math.round(e/l)+"h":e>=u?Math.round(e/u)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function i(e){return s(e,c,"day")||s(e,l,"hour")||s(e,u,"minute")||s(e,o,"second")||e+" ms"}function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=1e3,u=60*o,l=60*u,c=24*l,f=365.25*c;e.exports=function(e,t){t=t||{};var s=void 0===e?"undefined":a(e);if("string"===s&&e.length>0)return r(e);if("number"===s&&!1===isNaN(e))return t.long?i(e):n(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t){"use strict";e.exports=Number.isNaN||function(e){return e!==e}},function(e,t,r){(function(t){"use strict";function r(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,r=t.exec(e),n=r[1]||"",i=Boolean(n&&":"!==n.charAt(1));return Boolean(r[2]||i)}e.exports="win32"===t.platform?n:r,e.exports.posix=r,e.exports.win32=n}).call(t,r(8))},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var i=r(14),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=r(1),o=n(a),u=r(116),l=n(u),c=Object.prototype.hasOwnProperty;t.hoist=function(e){function t(e,t){o.assertVariableDeclaration(e);var n=[];return e.declarations.forEach(function(e){r[e.id.name]=o.identifier(e.id.name),e.init?n.push(o.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:o.sequenceExpression(n)}o.assertFunction(e.node);var r={};e.get("body").traverse({VariableDeclaration:{exit:function(e){var r=t(e.node,!1);null===r?e.remove():l.replaceWithOrRemove(e,o.expressionStatement(r)),e.skip()}},ForStatement:function(e){var r=e.node.init;o.isVariableDeclaration(r)&&l.replaceWithOrRemove(e.get("init"),t(r,!1))},ForXStatement:function(e){var r=e.get("left");r.isVariableDeclaration()&&l.replaceWithOrRemove(r,t(r.node,!0))},FunctionDeclaration:function(e){var t=e.node;r[t.id.name]=t.id;var n=o.expressionStatement(o.assignmentExpression("=",t.id,o.functionExpression(t.id,t.params,t.body,t.generator,t.expression)));e.parentPath.isBlockStatement()?(e.parentPath.unshiftContainer("body",n),e.remove()):l.replaceWithOrRemove(e,n),e.skip()},FunctionExpression:function(e){e.skip()}});var n={};e.get("params").forEach(function(e){var t=e.node;o.isIdentifier(t)&&(n[t.name]=t)});var i=[];return(0,s.default)(r).forEach(function(e){c.call(n,e)||i.push(o.variableDeclarator(r[e],null))}),0===i.length?null:o.variableDeclaration("var",i)}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){return r(610)}},function(e,t,r){"use strict";function n(){d.default.ok(this instanceof n)}function i(e){n.call(this),m.assertLiteral(e),this.returnLoc=e}function s(e,t,r){n.call(this),m.assertLiteral(e),m.assertLiteral(t),r?m.assertIdentifier(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function a(e){n.call(this),m.assertLiteral(e),this.breakLoc=e}function o(e,t,r){n.call(this),m.assertLiteral(e),t?d.default.ok(t instanceof u):t=null,r?d.default.ok(r instanceof l):r=null,d.default.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function u(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.firstLoc=e,this.paramId=t}function l(e,t){n.call(this),m.assertLiteral(e),m.assertLiteral(t),this.firstLoc=e,this.afterLoc=t}function c(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.breakLoc=e,this.label=t}function f(e){d.default.ok(this instanceof f);var t=r(283).Emitter;d.default.ok(e instanceof t),this.emitter=e,this.entryStack=[new i(e.finalLoc)]}var p=r(64),d=function(e){return e&&e.__esModule?e:{default:e}}(p),h=r(1),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(h),y=r(117);(0,y.inherits)(i,n),t.FunctionEntry=i,(0,y.inherits)(s,n),t.LoopEntry=s,(0,y.inherits)(a,n),t.SwitchEntry=a,(0,y.inherits)(o,n),t.TryEntry=o,(0,y.inherits)(u,n),t.CatchEntry=u,(0,y.inherits)(l,n),t.FinallyEntry=l,(0,y.inherits)(c,n),t.LabeledEntry=c;var v=f.prototype;t.LeapManager=f,v.withEntry=function(e,t){d.default.ok(e instanceof n),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();d.default.strictEqual(r,e)}},v._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof c))return i}return null},v.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},v.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},function(e,t,r){"use strict";function n(e,t){function r(e){function t(e){return r||(Array.isArray(e)?e.some(t):o.isNode(e)&&(s.default.strictEqual(r,!1),r=n(e))),r}o.assertNode(e);var r=!1,i=o.VISITOR_KEYS[e.type];if(i)for(var a=0;a<i.length;a++){var u=i[a],l=e[u];t(l)}return r}function n(n){o.assertNode(n);var i=u(n);return l.call(i,e)?i[e]:l.call(c,n.type)?i[e]=!1:l.call(t,n.type)?i[e]=!0:i[e]=r(n)}return n.onlyChildren=r,n}var i=r(64),s=function(e){return e&&e.__esModule?e:{default:e}}(i),a=r(1),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u=r(281).makeAccessor(),l=Object.prototype.hasOwnProperty,c={FunctionExpression:!0,ArrowFunctionExpression:!0},f={CallExpression:!0,ForInStatement:!0,UnaryExpression:!0,BinaryExpression:!0,AssignmentExpression:!0,UpdateExpression:!0,NewExpression:!0},p={YieldExpression:!0,BreakStatement:!0,ContinueStatement:!0,ReturnStatement:!0,ThrowStatement:!0};for(var d in p)l.call(p,d)&&(f[d]=p[d]);t.hasSideEffects=n("hasSideEffects",f),t.containsLeap=n("containsLeap",p)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){if(!e.node||!a.isFunction(e.node))throw new Error("replaceShorthandObjectMethod can only be called on Function AST node paths.");if(!a.isObjectMethod(e.node))return e;if(!e.node.generator)return e;var t=e.node.params.map(function(e){return a.cloneDeep(e)}),r=a.functionExpression(null,t,a.cloneDeep(e.node.body),e.node.generator,e.node.async);return u.replaceWithOrRemove(e,a.objectProperty(a.cloneDeep(e.node.key),r,e.node.computed,!1)),e.get("value")}t.__esModule=!0,t.default=i;var s=r(1),a=n(s),o=r(116),u=n(o)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=e.node;return f.assertFunction(t),t.id||(t.id=e.scope.parent.generateUidIdentifier("callee")),t.generator&&f.isFunctionDeclaration(t)?a(e):t.id}function a(e){var t=e.node;f.assertIdentifier(t.id);var r=e.findParent(function(e){return e.isProgram()||e.isBlockStatement()});if(!r)return t.id;var n=r.node;l.default.ok(Array.isArray(n.body));var i=g(n);i.decl||(i.decl=f.variableDeclaration("var",[]),r.unshiftContainer("body",i.decl),i.declPath=r.get("body.0")),l.default.strictEqual(i.declPath.node,i.decl);var s=r.scope.generateUidIdentifier("marked"),a=f.callExpression(v.runtimeProperty("mark"),[t.id]),o=i.decl.declarations.push(f.variableDeclarator(s,a))-1,u=i.declPath.get("declarations."+o+".init");return l.default.strictEqual(u.node,a),u.addComment("leading","#__PURE__"),s}function o(e,t){var r={didRenameArguments:!1,argsId:t};return e.traverse(b,r),r.didRenameArguments}var u=r(64),l=i(u),c=r(1),f=n(c),p=r(605),d=r(283),h=r(609),m=i(h),y=r(116),v=n(y);t.name="regenerator-transform",t.visitor={Function:{exit:function(e,t){var r=e.node;if(r.generator){if(r.async){if(!1===t.opts.asyncGenerators)return}else if(!1===t.opts.generators)return}else{if(!r.async)return;if(!1===t.opts.async)return}e=(0,m.default)(e),r=e.node;var n=e.scope.generateUidIdentifier("context"),i=e.scope.generateUidIdentifier("args");e.ensureBlock();var a=e.get("body");r.async&&a.traverse(x),a.traverse(E,{context:n});var u=[],l=[];a.get("body").forEach(function(e){var t=e.node;f.isExpressionStatement(t)&&f.isStringLiteral(t.expression)?u.push(t):t&&null!=t._blockHoist?u.push(t):l.push(t)}),u.length>0&&(a.node.body=l);var c=s(e);f.assertIdentifier(r.id);var h=f.identifier(r.id.name+"$"),y=(0,p.hoist)(e);if(o(e,i)){y=y||f.variableDeclaration("var",[]);var g=f.identifier("arguments");g._shadowedFunctionLiteral=e,y.declarations.push(f.variableDeclarator(i,g))}var b=new d.Emitter(n);b.explode(e.get("body")),y&&y.declarations.length>0&&u.push(y);var A=[b.getContextFunction(h),r.generator?c:f.nullLiteral(),f.thisExpression()],S=b.getTryLocsList();S&&A.push(S);var _=f.callExpression(v.runtimeProperty(r.async?"async":"wrap"),A);u.push(f.returnStatement(_)),r.body=f.blockStatement(u);var D=a.node.directives;D&&(r.body.directives=D);var C=r.generator;C&&(r.generator=!1),r.async&&(r.async=!1),C&&f.isExpression(r)&&(v.replaceWithOrRemove(e,f.callExpression(v.runtimeProperty("mark"),[r])),e.addComment("leading","#__PURE__")),e.requeue()}}};var g=r(281).makeAccessor(),b={"FunctionExpression|FunctionDeclaration":function(e){e.skip()},Identifier:function(e,t){"arguments"===e.node.name&&v.isReference(e)&&(v.replaceWithOrRemove(e,t.argsId),t.didRenameArguments=!0)}},E={MetaProperty:function(e){var t=e.node;"function"===t.meta.name&&"sent"===t.property.name&&v.replaceWithOrRemove(e,f.memberExpression(this.context,f.identifier("_sent")))}},x={Function:function(e){e.skip()},AwaitExpression:function(e){var t=e.node.argument;v.replaceWithOrRemove(e,f.yieldExpression(f.callExpression(v.runtimeProperty("awrap"),[t]),!1))}}},function(e,t,r){"use strict";var n=r(282);t.REGULAR={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,65535),s:n(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:n(95).addRange(48,57).addRange(65,90).addRange(97,122),W:n(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)},t.UNICODE={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,1114111),s:n(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:n(95).addRange(48,57).addRange(65,90).addRange(97,122),W:n(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)},t.UNICODE_IGNORE_CASE={d:n().addRange(48,57),D:n().addRange(0,47).addRange(58,1114111),s:n(32,160,5760,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:n().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:n(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:n(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},function(e,t,r){"use strict";function n(e){return S?A?m.UNICODE_IGNORE_CASE[e]:m.UNICODE[e]:m.REGULAR[e]}function i(e,t){return v.call(e,t)}function s(e,t){for(var r in t)e[r]=t[r]}function a(e,t){if(t){var r=p(t,"");switch(r.type){case"characterClass":case"group":case"value":break;default:r=o(r,t)}s(e,r)}}function o(e,t){return{type:"group",behavior:"ignore",body:[e],raw:"(?:"+t+")"}}function u(e){return!!i(h,e)&&h[e]}function l(e){var t=d();e.body.forEach(function(e){switch(e.type){case"value":if(t.add(e.codePoint),A&&S){var r=u(e.codePoint);r&&t.add(r)}break;case"characterClassRange":var i=e.min.codePoint,s=e.max.codePoint;t.addRange(i,s),A&&S&&t.iuAddRange(i,s);break;case"characterClassEscape":t.add(n(e.value));break;default:throw Error("Unknown term type: "+e.type)}});return e.negative&&(t=(S?g:b).clone().remove(t)),a(e,t.toString()),e}function c(e){switch(e.type){case"dot":a(e,(S?E:x).toString());break;case"characterClass":e=l(e);break;case"characterClassEscape":a(e,n(e.value).toString());break;case"alternative":case"disjunction":case"group":case"quantifier":e.body=e.body.map(c);break;case"value":var t=e.codePoint,r=d(t);if(A&&S){var i=u(t);i&&r.add(i)}a(e,r.toString());break;case"anchor":case"empty":case"group":case"reference":break;default:throw Error("Unknown term type: "+e.type)}return e}var f=r(613).generate,p=r(614).parse,d=r(282),h=r(631),m=r(611),y={},v=y.hasOwnProperty,g=d().addRange(0,1114111),b=d().addRange(0,65535),E=g.clone().remove(10,13,8232,8233),x=E.clone().intersection(b);d.prototype.iuAddRange=function(e,t){var r=this;do{var n=u(e);n&&r.add(n)}while(++e<=t);return r};var A=!1,S=!1;e.exports=function(e,t){var r=p(e,t);return A=!!t&&t.indexOf("i")>-1,S=!!t&&t.indexOf("u")>-1,s(r,c(r)),f(r)}},function(e,t,r){var n;(function(e,i){"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};(function(){function a(){var e,t,r=[],n=-1,i=arguments.length;if(!i)return"";for(var s="";++n<i;){var a=Number(arguments[n]);if(!isFinite(a)||a<0||a>1114111||k(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?r.push(a):(a-=65536,e=55296+(a>>10),t=a%1024+56320,r.push(e,t)),(n+1==i||r.length>16384)&&(s+=P.apply(null,r),r.length=0)}return s}function o(e,t){if(-1==t.indexOf("|")){if(e==t)return;throw Error("Invalid node type: "+e)}if(t=o.hasOwnProperty(t)?o[t]:o[t]=RegExp("^(?:"+t+")$"),!t.test(e))throw Error("Invalid node type: "+e) -}function u(e){var t=e.type;if(u.hasOwnProperty(t)&&"function"==typeof u[t])return u[t](e);throw Error("Invalid node type: "+t)}function l(e){o(e.type,"alternative");var t=e.body,r=t?t.length:0;if(1==r)return x(t[0]);for(var n=-1,i="";++n<r;)i+=x(t[n]);return i}function c(e){switch(o(e.type,"anchor"),e.kind){case"start":return"^";case"end":return"$";case"boundary":return"\\b";case"not-boundary":return"\\B";default:throw Error("Invalid assertion")}}function f(e){return o(e.type,"anchor|characterClass|characterClassEscape|dot|group|reference|value"),u(e)}function p(e){o(e.type,"characterClass");var t=e.body,r=t?t.length:0,n=-1,i="[";for(e.negative&&(i+="^");++n<r;)i+=m(t[n]);return i+="]"}function d(e){return o(e.type,"characterClassEscape"),"\\"+e.value}function h(e){o(e.type,"characterClassRange");var t=e.min,r=e.max;if("characterClassRange"==t.type||"characterClassRange"==r.type)throw Error("Invalid character class range");return m(t)+"-"+m(r)}function m(e){return o(e.type,"anchor|characterClassEscape|characterClassRange|dot|value"),u(e)}function y(e){o(e.type,"disjunction");var t=e.body,r=t?t.length:0;if(0==r)throw Error("No body");if(1==r)return u(t[0]);for(var n=-1,i="";++n<r;)0!=n&&(i+="|"),i+=u(t[n]);return i}function v(e){return o(e.type,"dot"),"."}function g(e){o(e.type,"group");var t="(";switch(e.behavior){case"normal":break;case"ignore":t+="?:";break;case"lookahead":t+="?=";break;case"negativeLookahead":t+="?!";break;default:throw Error("Invalid behaviour: "+e.behaviour)}var r=e.body,n=r?r.length:0;if(1==n)t+=u(r[0]);else for(var i=-1;++i<n;)t+=u(r[i]);return t+=")"}function b(e){o(e.type,"quantifier");var t="",r=e.min,n=e.max;switch(n){case void 0:case null:switch(r){case 0:t="*";break;case 1:t="+";break;default:t="{"+r+",}"}break;default:t=r==n?"{"+r+"}":0==r&&1==n?"?":"{"+r+","+n+"}"}return e.greedy||(t+="?"),f(e.body[0])+t}function E(e){return o(e.type,"reference"),"\\"+e.matchIndex}function x(e){return o(e.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value"),u(e)}function A(e){o(e.type,"value");var t=e.kind,r=e.codePoint;switch(t){case"controlLetter":return"\\c"+a(r+64);case"hexadecimalEscape":return"\\x"+("00"+r.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+a(r);case"null":return"\\"+r;case"octal":return"\\"+r.toString(8);case"singleEscape":switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid codepoint: "+r)}case"symbol":return a(r);case"unicodeEscape":return"\\u"+("0000"+r.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+r.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+t)}}var S={function:!0,object:!0},_=S["undefined"==typeof window?"undefined":s(window)]&&window||this,D=S[s(t)]&&t,C=S[s(e)]&&e&&!e.nodeType&&e,w=D&&C&&"object"==(void 0===i?"undefined":s(i))&&i;!w||w.global!==w&&w.window!==w&&w.self!==w||(_=w);var P=String.fromCharCode,k=Math.floor;u.alternative=l,u.anchor=c,u.characterClass=p,u.characterClassEscape=d,u.characterClassRange=h,u.disjunction=y,u.dot=v,u.group=g,u.quantifier=b,u.reference=E,u.value=A,"object"==s(r(49))&&r(49)?void 0!==(n=function(){return{generate:u}}.call(t,r,t,e))&&(e.exports=n):D&&C?D.generate=u:_.regjsgen={generate:u}}).call(void 0)}).call(t,r(39)(e),function(){return this}())},function(e,t){"use strict";!function(){function t(e,t){function r(t){return t.raw=e.substring(t.range[0],t.range[1]),t}function n(e,t){return e.range[0]=t,r(e)}function i(e,t){return r({type:"anchor",kind:e,range:[$-t,$]})}function s(e,t,n,i){return r({type:"value",kind:e,codePoint:t,range:[n,i]})}function a(e,t,r,n){return n=n||0,s(e,t,$-(r.length+n),$)}function o(e){var t=e[0],r=t.charCodeAt(0);if(z){var n;if(1===t.length&&r>=55296&&r<=56319&&(n=x().charCodeAt(0))>=56320&&n<=57343)return $++,s("symbol",1024*(r-55296)+n-56320+65536,$-2,$)}return s("symbol",r,$-1,$)}function u(e,t,n){return r({type:"disjunction",body:e,range:[t,n]})}function l(){return r({type:"dot",range:[$-1,$]})}function c(e){return r({type:"characterClassEscape",value:e,range:[$-2,$]})}function f(e){return r({type:"reference",matchIndex:parseInt(e,10),range:[$-1-e.length,$]})}function p(e,t,n,i){return r({type:"group",behavior:e,body:t,range:[n,i]})}function d(e,t,n,i){return null==i&&(n=$-1,i=$),r({type:"quantifier",min:e,max:t,greedy:!0,body:null,range:[n,i]})}function h(e,t,n){return r({type:"alternative",body:e,range:[t,n]})}function m(e,t,n,i){return r({type:"characterClass",body:e,negative:t,range:[n,i]})}function y(e,t,n,i){return e.codePoint>t.codePoint&&K("invalid range in character class",e.raw+"-"+t.raw,n,i),r({type:"characterClassRange",min:e,max:t,range:[n,i]})}function v(e){return"alternative"===e.type?e.body:[e]}function g(t){t=t||1;var r=e.substring($,$+t);return $+=t||1,r}function b(e){E(e)||K("character",e)}function E(t){if(e.indexOf(t,$)===$)return g(t.length)}function x(){return e[$]}function A(t){return e.indexOf(t,$)===$}function S(t){return e[$+1]===t}function _(t){var r=e.substring($),n=r.match(t);return n&&(n.range=[],n.range[0]=$,g(n[0].length),n.range[1]=$),n}function D(){var e=[],t=$;for(e.push(C());E("|");)e.push(C());return 1===e.length?e[0]:u(e,t,$)}function C(){for(var e,t=[],r=$;e=w();)t.push(e);return 1===t.length?t[0]:h(t,r,$)}function w(){if($>=e.length||A("|")||A(")"))return null;var t=k();if(t)return t;var r=T();r||K("Expected atom");var i=F()||!1;return i?(i.body=v(r),n(i,r.range[0]),i):r}function P(e,t,r,n){var i=null,s=$;if(E(e))i=t;else{if(!E(r))return!1;i=n}var a=D();a||K("Expected disjunction"),b(")");var o=p(i,v(a),s,$);return"normal"==i&&X&&J++,o}function k(){return E("^")?i("start",1):E("$")?i("end",1):E("\\b")?i("boundary",2):E("\\B")?i("not-boundary",2):P("(?=","lookahead","(?!","negativeLookahead")}function F(){var e,t,r,n,i=$;return E("*")?t=d(0):E("+")?t=d(1):E("?")?t=d(0,1):(e=_(/^\{([0-9]+)\}/))?(r=parseInt(e[1],10),t=d(r,r,e.range[0],e.range[1])):(e=_(/^\{([0-9]+),\}/))?(r=parseInt(e[1],10),t=d(r,void 0,e.range[0],e.range[1])):(e=_(/^\{([0-9]+),([0-9]+)\}/))&&(r=parseInt(e[1],10),n=parseInt(e[2],10),r>n&&K("numbers out of order in {} quantifier","",i,$),t=d(r,n,e.range[0],e.range[1])),t&&E("?")&&(t.greedy=!1,t.range[1]+=1),t}function T(){var e;return(e=_(/^[^^$\\.*+?(){[|]/))?o(e):E(".")?l():E("\\")?(e=R(),e||K("atomEscape"),e):(e=j())?e:P("(?:","ignore","(","normal")}function O(e){if(z){var t,n;if("unicodeEscape"==e.kind&&(t=e.codePoint)>=55296&&t<=56319&&A("\\")&&S("u")){var i=$;$++;var s=B();"unicodeEscape"==s.kind&&(n=s.codePoint)>=56320&&n<=57343?(e.range[1]=s.range[1],e.codePoint=1024*(t-55296)+n-56320+65536,e.type="value",e.kind="unicodeCodePointEscape",r(e)):$=i}}return e}function B(){return R(!0)}function R(e){var t,r=$;if(t=I())return t;if(e){if(E("b"))return a("singleEscape",8,"\\b");E("B")&&K("\\B not possible inside of CharacterClass","",r)}return t=M()}function I(){var e,t;if(e=_(/^(?!0)\d+/)){t=e[0];var r=parseInt(e[0],10);return r<=J?f(e[0]):(H.push(r),g(-e[0].length),(e=_(/^[0-7]{1,3}/))?a("octal",parseInt(e[0],8),e[0],1):(e=o(_(/^[89]/)),n(e,e.range[0]-1)))}return(e=_(/^[0-7]{1,3}/))?(t=e[0],/^0{1,3}$/.test(t)?a("null",0,"0",t.length+1):a("octal",parseInt(t,8),t,1)):!!(e=_(/^[dDsSwW]/))&&c(e[0])}function M(){var e;if(e=_(/^[fnrtv]/)){var t=0;switch(e[0]){case"t":t=9;break;case"n":t=10;break;case"v":t=11;break;case"f":t=12;break;case"r":t=13}return a("singleEscape",t,"\\"+e[0])}return(e=_(/^c([a-zA-Z])/))?a("controlLetter",e[1].charCodeAt(0)%32,e[1],2):(e=_(/^x([0-9a-fA-F]{2})/))?a("hexadecimalEscape",parseInt(e[1],16),e[1],2):(e=_(/^u([0-9a-fA-F]{4})/))?O(a("unicodeEscape",parseInt(e[1],16),e[1],2)):z&&(e=_(/^u\{([0-9a-fA-F]+)\}/))?a("unicodeCodePointEscape",parseInt(e[1],16),e[1],4):L()}function N(e){var t=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&t.test(String.fromCharCode(e))}function L(){var e;return N(x())?E("‌")?a("identifier",8204,"‌"):E("‍")?a("identifier",8205,"‍"):null:(e=g(),a("identifier",e.charCodeAt(0),e,1))}function j(){var e,t=$;return(e=_(/^\[\^/))?(e=U(),b("]"),m(e,!0,t,$)):E("[")?(e=U(),b("]"),m(e,!1,t,$)):null}function U(){var e;return A("]")?[]:(e=G(),e||K("nonEmptyClassRanges"),e)}function V(e){var t,r,n;if(A("-")&&!S("]")){b("-"),n=Y(),n||K("classAtom"),r=$;var i=U();return i||K("classRanges"),t=e.range[0],"empty"===i.type?[y(e,n,t,r)]:[y(e,n,t,r)].concat(i)}return n=W(),n||K("nonEmptyClassRangesNoDash"),[e].concat(n)}function G(){var e=Y();return e||K("classAtom"),A("]")?[e]:V(e)}function W(){var e=Y();return e||K("classAtom"),A("]")?e:V(e)}function Y(){return E("-")?o("-"):q()}function q(){var e;return(e=_(/^[^\\\]-]/))?o(e[0]):E("\\")?(e=B(),e||K("classEscape"),O(e)):void 0}function K(t,r,n,i){n=null==n?$:n,i=null==i?n:i;var s=Math.max(0,n-10),a=Math.min(i+10,e.length),o=" "+e.substring(s,a),u=" "+new Array(n-s+1).join(" ")+"^";throw SyntaxError(t+" at position "+n+(r?": "+r:"")+"\n"+o+"\n"+u)}var H=[],J=0,X=!0,z=-1!==(t||"").indexOf("u"),$=0;""===(e=String(e))&&(e="(?:)");var Q=D();Q.range[1]!==e.length&&K("Could not parse entire input - got stuck","",Q.range[1]);for(var Z=0;Z<H.length;Z++)if(H[Z]<=J)return $=0,X=!1,D();return Q}var r={parse:t};void 0!==e&&e.exports?e.exports=r:window.regjsparser=r}()},function(e,t,r){"use strict";var n=r(467);e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected `input` to be a string");if(t<0||!n(t))throw new TypeError("Expected `count` to be a positive finite number");var r="";do{1&t&&(r+=e),e+=e}while(t>>=1);return r}},function(e,t){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},function(e,t){"use strict";function r(e,n,i,s,a,o){var u=Math.floor((n-e)/2)+e,l=a(i,s[u],!0);return 0===l?u:l>0?n-u>1?r(u,n,i,s,a,o):o==t.LEAST_UPPER_BOUND?n<s.length?n:-1:u:u-e>1?r(e,u,i,s,a,o):o==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,i,s){if(0===n.length)return-1;var a=r(-1,n.length,e,n,i,s||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(n[a],n[a-1],!0);)--a;return a}},function(e,t,r){"use strict";function n(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=r(63);i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t){"use strict";function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t){return Math.round(e+Math.random()*(t-e))}function i(e,t,s,a){if(s<a){var o=n(s,a),u=s-1;r(e,o,a);for(var l=e[a],c=s;c<a;c++)t(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var f=u+1;i(e,t,s,f-1),i(e,t,f+1,a)}}t.quickSort=function(e,t){i(e,t,0,e.length-1)}},function(e,t,r){"use strict";function n(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new a(t):new i(t)}function i(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),n=o.getArg(t,"sources"),i=o.getArg(t,"names",[]),s=o.getArg(t,"sourceRoot",null),a=o.getArg(t,"sourcesContent",null),u=o.getArg(t,"mappings"),c=o.getArg(t,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);n=n.map(String).map(o.normalize).map(function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}),this._names=l.fromArray(i.map(String),!0),this._sources=l.fromArray(n,!0),this.sourceRoot=s,this.sourcesContent=a,this._mappings=u,this.file=c}function s(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function a(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=o.getArg(t,"version"),i=o.getArg(t,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var s={line:-1,column:0};this._sections=i.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=o.getArg(e,"offset"),r=o.getArg(t,"line"),i=o.getArg(t,"column");if(r<s.line||r===s.line&&i<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=t,{generatedOffset:{generatedLine:r+1,generatedColumn:i+1},consumer:new n(o.getArg(e,"map"))}})}var o=r(63),u=r(617),l=r(285).ArraySet,c=r(286),f=r(619).quickSort;n.fromSourceMap=function(e){return i.fromSourceMap(e)},n.prototype._version=3,n.prototype.__generatedMappings=null,Object.defineProperty(n.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),n.prototype.__originalMappings=null,Object.defineProperty(n.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),n.prototype._charIsMappingSeparator=function(e,t){var r=e.charAt(t);return";"===r||","===r},n.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.prototype.eachMapping=function(e,t,r){var i,s=t||null,a=r||n.GENERATED_ORDER;switch(a){case n.GENERATED_ORDER:i=this._generatedMappings;break;case n.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;i.map(function(e){var t=null===e.source?null:this._sources.at(e.source);return null!=t&&null!=u&&(t=o.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,s)},n.prototype.allGeneratedPositionsFor=function(e){var t=o.getArg(e,"line"),r={source:o.getArg(e,"source"),originalLine:t,originalColumn:o.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=o.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var n=[],i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},t.SourceMapConsumer=n,i.prototype=Object.create(n.prototype),i.prototype.consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],p=0,d=a.length;p<d;p++){var h=a[p],m=new s;m.generatedLine=h.generatedLine,m.generatedColumn=h.generatedColumn,h.source&&(m.source=n.indexOf(h.source),m.originalLine=h.originalLine,m.originalColumn=h.originalColumn,h.name&&(m.name=r.indexOf(h.name)),c.push(m)),u.push(m)}return f(t.__originalMappings,o.compareByOriginalPositions),t},i.prototype._version=3,Object.defineProperty(i.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?o.join(this.sourceRoot,e):e},this)}}),i.prototype._parseMappings=function(e,t){for(var r,n,i,a,u,l=1,p=0,d=0,h=0,m=0,y=0,v=e.length,g=0,b={},E={},x=[],A=[];g<v;)if(";"===e.charAt(g))l++,g++,p=0;else if(","===e.charAt(g))g++;else{for(r=new s,r.generatedLine=l,a=g;a<v&&!this._charIsMappingSeparator(e,a);a++);if(n=e.slice(g,a),i=b[n])g+=n.length;else{for(i=[];g<a;)c.decode(e,g,E),u=E.value,g=E.rest,i.push(u);if(2===i.length)throw new Error("Found a source, but no line and column");if(3===i.length)throw new Error("Found a source and line, but no column");b[n]=i}r.generatedColumn=p+i[0],p=r.generatedColumn,i.length>1&&(r.source=m+i[1],m+=i[1],r.originalLine=d+i[2],d=r.originalLine,r.originalLine+=1,r.originalColumn=h+i[3],h=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&x.push(r)}f(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,f(x,o.compareByOriginalPositions),this.__originalMappings=x},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},i.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",o.compareByGeneratedPositionsDeflated,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var r={source:t,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=i,a.prototype=Object.create(n.prototype),a.prototype.constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}}),a.prototype.originalPositionFor=function(e){var t={generatedLine:o.getArg(e,"line"),generatedColumn:o.getArg(e,"column")},r=u.search(t,this._sections,function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;return r||e.generatedColumn-t.generatedOffset.generatedColumn}),n=this._sections[r];return n?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},a.prototype.sourceContentFor=function(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r],i=n.consumer.sourceContentFor(e,!0);if(i)return i}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},a.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(-1!==r.consumer.sources.indexOf(o.getArg(e,"source"))){var n=r.consumer.generatedPositionFor(e);if(n){return{line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)}}}}return{line:null,column:null}},a.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var n=this._sections[r],i=n.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],u=n.consumer._sources.at(a.source);null!==n.consumer.sourceRoot&&(u=o.join(n.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=n.consumer._names.at(a.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:a.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(n.generatedOffset.generatedLine===a.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}f(this.__generatedMappings,o.compareByGeneratedPositionsDeflated),f(this.__originalMappings,o.compareByOriginalPositions)},t.IndexedSourceMapConsumer=a},function(e,t,r){"use strict";function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=n&&this.add(n)}var i=r(287).SourceMapGenerator,s=r(63),a=/(\r?\n)/,o="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?s.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(a),l=function(){return u.shift()+(u.shift()||"")},c=1,f=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(c<e.generatedLine)){var t=u[0],r=t.substr(0,e.generatedColumn-f);return u[0]=t.substr(e.generatedColumn-f),f=e.generatedColumn,i(p,r),void(p=e)}i(p,l()),c++,f=0}for(;c<e.generatedLine;)o.add(l()),c++;if(f<e.generatedColumn){var t=u[0];o.add(t.substr(0,e.generatedColumn)),u[0]=t.substr(e.generatedColumn),f=e.generatedColumn}p=e},this),u.length>0&&(p&&i(p,l()),o.add(u.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),o.setSourceContent(e,n))}),o},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r<n;r++)t=this.children[r],t[o]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,r,n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r[o]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[s.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;t<r;t++)this.children[t][o]&&this.children[t].walkSourceContents(e);for(var n=Object.keys(this.sourceContents),t=0,r=n.length;t<r;t++)e(s.fromSetString(n[t]),this.sourceContents[n[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},r=new i(e),n=!1,s=null,a=null,o=null,u=null;return this.walk(function(e,i){t.code+=e,null!==i.source&&null!==i.line&&null!==i.column?(s===i.source&&a===i.line&&o===i.column&&u===i.name||r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name}),s=i.source,a=i.line,o=i.column,u=i.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),s=null,n=!1);for(var l=0,c=e.length;l<c;l++)10===e.charCodeAt(l)?(t.line++,t.column=0,l+1===c?(s=null,n=!1):n&&r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})):t.column++}),this.walkSourceContents(function(e,t){r.setSourceContent(e,t)}),{code:t.code,map:r}},t.SourceNode=n},function(e,t,r){"use strict";var n=r(180)();e.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},function(e,t,r){(function(t){"use strict";var r=t.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t<n)};e.exports=function(){return"FORCE_COLOR"in t.env||!(i("no-color")||i("no-colors")||i("color=false"))&&(!!(i("color")||i("colors")||i("color=true")||i("color=always"))||!(t.stdout&&!t.stdout.isTTY)&&("win32"===t.platform||("COLORTERM"in t.env||"dumb"!==t.env.TERM&&!!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM))))}()}).call(t,r(8))},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function e(t){function n(){}function i(){return r(s.foo)}n.prototype=t;var s=new n;return i(),i(),t}},function(e,t){"use strict";e.exports=function(e){for(var t=e.length;/[\s\uFEFF\u00A0]/.test(e[t-1]);)t--;return e.slice(0,t)}},function(e,t){"use strict";"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return e&&"object"===(void 0===e?"undefined":r(e))&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.version="6.26.0"},function(e,t){"use strict";function r(e,t){var r=void 0;return null!=t.url?r=t.url:(r="Inline Babel script",++p>1&&(r+=" ("+p+")")),e(t.content,l({filename:r},n(t))).code}function n(e){return{presets:e.presets||["react","es2015"],plugins:e.plugins||["transform-class-properties","transform-object-rest-spread","transform-flow-strip-types"],sourceMaps:"inline"}}function i(e,t){var n=document.createElement("script");n.text=r(e,t),f.appendChild(n)}function s(e,t,r){var n=new XMLHttpRequest;return n.open("GET",e,!0),"overrideMimeType"in n&&n.overrideMimeType("text/plain"),n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)throw r(),new Error("Could not load "+e);t(n.responseText)}},n.send(null)}function a(e,t){var r=e.getAttribute(t);return""===r?[]:r?r.split(",").map(function(e){return e.trim()}):null}function o(e,t){function r(){var t,r;for(r=0;r<o;r++)if(t=n[r],t.loaded&&!t.executed)t.executed=!0,i(e,t);else if(!t.loaded&&!t.error&&!t.async)break}var n=[],o=t.length;t.forEach(function(e,t){var i={async:e.hasAttribute("async"),error:!1,executed:!1,plugins:a(e,"data-plugins"),presets:a(e,"data-presets")};e.src?(n[t]=l({},i,{content:null,loaded:!1,url:e.src}),s(e.src,function(e){n[t].loaded=!0,n[t].content=e,r()},function(){n[t].error=!0,r()})):n[t]=l({},i,{content:e.innerHTML,loaded:!0,url:null})}),r()}function u(e,t){f=document.getElementsByTagName("head")[0],t||(t=document.getElementsByTagName("script"));for(var r=[],n=0;n<t.length;n++){var i=t.item(n),s=i.type.split(";")[0];-1!==c.indexOf(s)&&r.push(i)}0!==r.length&&(console.warn("You are using the in-browser Babel transformer. Be sure to precompile your scripts for production - https://babeljs.io/docs/setup/"),o(e,r))}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.runScripts=u;var c=["text/jsx","text/babel"],f=void 0,p=0},function(e,t){e.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1, -valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},function(e,t){e.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,68736:68800,68737:68801,68738:68802,68739:68803,68740:68804,68741:68805,68742:68806,68743:68807,68744:68808,68745:68809,68746:68810,68747:68811,68748:68812,68749:68813,68750:68814,68751:68815,68752:68816,68753:68817,68754:68818,68755:68819,68756:68820,68757:68821,68758:68822,68759:68823,68760:68824,68761:68825,68762:68826,68763:68827,68764:68828,68765:68829,68766:68830,68767:68831,68768:68832,68769:68833,68770:68834,68771:68835,68772:68836,68773:68837,68774:68838,68775:68839,68776:68840,68777:68841,68778:68842,68779:68843,68780:68844,68781:68845,68782:68846,68783:68847,68784:68848,68785:68849,68786:68850,68800:68736,68801:68737,68802:68738,68803:68739,68804:68740,68805:68741,68806:68742,68807:68743,68808:68744,68809:68745,68810:68746,68811:68747,68812:68748,68813:68749,68814:68750,68815:68751,68816:68752,68817:68753,68818:68754,68819:68755,68820:68756,68821:68757,68822:68758,68823:68759,68824:68760,68825:68761,68826:68762,68827:68763,68828:68764,68829:68765,68830:68766,68831:68767,68832:68768,68833:68769,68834:68770,68835:68771,68836:68772,68837:68773,68838:68774,68839:68775,68840:68776,68841:68777,68842:68778,68843:68779,68844:68780,68845:68781,68846:68782,68847:68783,68848:68784,68849:68785,68850:68786,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}}]))}); \ No newline at end of file diff --git a/res/script/react-dom.development.js b/res/script/react-dom.development.js deleted file mode 100644 index 45db5aa39..000000000 --- a/res/script/react-dom.development.js +++ /dev/null @@ -1,26292 +0,0 @@ -/** @license React v17.0.2 - * react-dom.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) : - typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) : - (global = global || self, factory(global.ReactDOM = {}, global.React)); -}(this, (function (exports, React) { 'use strict'; - - var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - - // by calls to these methods by a Babel plugin. - // - // In PROD (or in packages without access to React internals), - // they are left as they are instead. - - function warn(format) { - { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - printWarning('warn', format, args); - } - } - function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } - } - - function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } - - var argsWithFormat = args.map(function (item) { - return '' + item; - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - } - } - - if (!React) { - { - throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." ); - } - } - - var FunctionComponent = 0; - var ClassComponent = 1; - var IndeterminateComponent = 2; // Before we know whether it is function or class - - var HostRoot = 3; // Root of a host tree. Could be nested inside another node. - - var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. - - var HostComponent = 5; - var HostText = 6; - var Fragment = 7; - var Mode = 8; - var ContextConsumer = 9; - var ContextProvider = 10; - var ForwardRef = 11; - var Profiler = 12; - var SuspenseComponent = 13; - var MemoComponent = 14; - var SimpleMemoComponent = 15; - var LazyComponent = 16; - var IncompleteClassComponent = 17; - var DehydratedFragment = 18; - var SuspenseListComponent = 19; - var FundamentalComponent = 20; - var ScopeComponent = 21; - var Block = 22; - var OffscreenComponent = 23; - var LegacyHiddenComponent = 24; - - // Filter certain DOM attributes (e.g. src, href) if their values are empty strings. - - var enableProfilerTimer = true; // Record durations for commit and passive effects phases. - - var enableFundamentalAPI = false; // Experimental Scope support. - var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects) - var warnAboutStringRefs = false; - - var allNativeEvents = new Set(); - /** - * Mapping from registration name to event name - */ - - - var registrationNameDependencies = {}; - /** - * Mapping from lowercase registration names to the properly cased version, - * used to warn in the case of missing event handlers. Available - * only in true. - * @type {Object} - */ - - var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true - - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + 'Capture', dependencies); - } - function registerDirectEvent(registrationName, dependencies) { - { - if (registrationNameDependencies[registrationName]) { - error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName); - } - } - - registrationNameDependencies[registrationName] = dependencies; - - { - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - - if (registrationName === 'onDoubleClick') { - possibleRegistrationNames.ondblclick = registrationName; - } - } - - for (var i = 0; i < dependencies.length; i++) { - allNativeEvents.add(dependencies[i]); - } - } - - var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); - - // A reserved attribute. - // It is handled by React separately and shouldn't be written to the DOM. - var RESERVED = 0; // A simple string attribute. - // Attributes that aren't in the filter are presumed to have this type. - - var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called - // "enumerated" attributes with "true" and "false" as possible values. - // When true, it should be set to a "true" string. - // When false, it should be set to a "false" string. - - var BOOLEANISH_STRING = 2; // A real boolean attribute. - // When true, it should be present (set either to an empty string or its name). - // When false, it should be omitted. - - var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. - // When true, it should be present (set either to an empty string or its name). - // When false, it should be omitted. - // For any other value, should be present with that value. - - var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. - // When falsy, it should be removed. - - var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. - // When falsy, it should be removed. - - var POSITIVE_NUMERIC = 6; - - /* eslint-disable max-len */ - var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; - /* eslint-enable max-len */ - - var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; - var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; - var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); - var hasOwnProperty = Object.prototype.hasOwnProperty; - var illegalAttributeNameCache = {}; - var validatedAttributeNameCache = {}; - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { - return true; - } - - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { - return false; - } - - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { - validatedAttributeNameCache[attributeName] = true; - return true; - } - - illegalAttributeNameCache[attributeName] = true; - - { - error('Invalid attribute name: `%s`', attributeName); - } - - return false; - } - function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null) { - return propertyInfo.type === RESERVED; - } - - if (isCustomComponentTag) { - return false; - } - - if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return true; - } - - return false; - } - function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null && propertyInfo.type === RESERVED) { - return false; - } - - switch (typeof value) { - case 'function': // $FlowIssue symbol is perfectly valid here - - case 'symbol': - // eslint-disable-line - return true; - - case 'boolean': - { - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - return !propertyInfo.acceptsBooleans; - } else { - var prefix = name.toLowerCase().slice(0, 5); - return prefix !== 'data-' && prefix !== 'aria-'; - } - } - - default: - return false; - } - } - function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { - if (value === null || typeof value === 'undefined') { - return true; - } - - if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { - return true; - } - - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - - switch (propertyInfo.type) { - case BOOLEAN: - return !value; - - case OVERLOADED_BOOLEAN: - return value === false; - - case NUMERIC: - return isNaN(value); - - case POSITIVE_NUMERIC: - return isNaN(value) || value < 1; - } - } - - return false; - } - function getPropertyInfo(name) { - return properties.hasOwnProperty(name) ? properties[name] : null; - } - - function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) { - this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; - this.attributeName = attributeName; - this.attributeNamespace = attributeNamespace; - this.mustUseProperty = mustUseProperty; - this.propertyName = name; - this.type = type; - this.sanitizeURL = sanitizeURL; - this.removeEmptyString = removeEmptyString; - } // When adding attributes to this list, be sure to also add them to - // the `possibleStandardNames` module to ensure casing and incorrect - // name warnings. - - - var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. - - var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular - // elements (not just inputs). Now that ReactDOMInput assigns to the - // defaultValue property -- do we need this? - 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style']; - reservedProps.forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // A few React string attributes have a different name. - // This is a mapping from React prop names to the attribute names. - - [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) { - var name = _ref[0], - attributeName = _ref[1]; - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are "enumerated" HTML attributes that accept "true" and "false". - // In React, we let users pass `true` and `false` even though technically - // these aren't boolean attributes (they are coerced to strings). - - ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are "enumerated" SVG attributes that accept "true" and "false". - // In React, we let users pass `true` and `false` even though technically - // these aren't boolean attributes (they are coerced to strings). - // Since these are SVG attributes, their attribute names are case-sensitive. - - ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML boolean attributes. - - ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM - // on the client side because the browsers are inconsistent. Instead we call focus(). - 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata - 'itemScope'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are the few React props that we set as DOM properties - // rather than attributes. These are all booleans. - - ['checked', // Note: `option.selected` is not updated if `select.multiple` is - // disabled with `removeAttribute`. We have special logic for handling this. - 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML attributes that are "overloaded booleans": they behave like - // booleans, but can also accept a string value. - - ['capture', 'download' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML attributes that must be positive numbers. - - ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These are HTML attributes that must be numbers. - - ['rowSpan', 'start'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); - var CAMELIZE = /[\-\:]([a-z])/g; - - var capitalize = function (token) { - return token[1].toUpperCase(); - }; // This is a list of all SVG attributes that need special casing, namespacing, - // or boolean value assignment. Regular attributes that just accept strings - // and have the same names are omitted, just like in the HTML attribute filter. - // Some of these attributes can be hard to find. This list was created by - // scraping the MDN documentation. - - - ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, null, // attributeNamespace - false, // sanitizeURL - false); - }); // String SVG attributes with the xlink namespace. - - ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL - false); - }); // String SVG attributes with the xml namespace. - - ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. - ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL - false); - }); // These attribute exists both in HTML and SVG. - // The attribute name is case-sensitive in SVG so we can't just use - // the React name like we do for attributes that exist only in HTML. - - ['tabIndex', 'crossOrigin'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); - }); // These attributes accept URLs. These must not allow javascript: URLS. - // These will also need to accept Trusted Types object in the future. - - var xlinkHref = 'xlinkHref'; - properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty - 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL - false); - ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - true, // sanitizeURL - true); - }); - - // and any newline or tab are filtered out as if they're not part of the URL. - // https://url.spec.whatwg.org/#url-parsing - // Tab or newline are defined as \r\n\t: - // https://infra.spec.whatwg.org/#ascii-tab-or-newline - // A C0 control is a code point in the range \u0000 NULL to \u001F - // INFORMATION SEPARATOR ONE, inclusive: - // https://infra.spec.whatwg.org/#c0-control-or-space - - /* eslint-disable max-len */ - - var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; - var didWarn = false; - - function sanitizeURL(url) { - { - if (!didWarn && isJavaScriptProtocol.test(url)) { - didWarn = true; - - error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url)); - } - } - } - - /** - * Get the value for a property on a node. Only used in DEV for SSR validation. - * The "expected" argument is used as a hint of what the expected value is. - * Some properties have multiple equivalent values. - */ - function getValueForProperty(node, name, expected, propertyInfo) { - { - if (propertyInfo.mustUseProperty) { - var propertyName = propertyInfo.propertyName; - return node[propertyName]; - } else { - if ( propertyInfo.sanitizeURL) { - // If we haven't fully disabled javascript: URLs, and if - // the hydration is successful of a javascript: URL, we - // still want to warn on the client. - sanitizeURL('' + expected); - } - - var attributeName = propertyInfo.attributeName; - var stringValue = null; - - if (propertyInfo.type === OVERLOADED_BOOLEAN) { - if (node.hasAttribute(attributeName)) { - var value = node.getAttribute(attributeName); - - if (value === '') { - return true; - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return value; - } - - if (value === '' + expected) { - return expected; - } - - return value; - } - } else if (node.hasAttribute(attributeName)) { - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - // We had an attribute but shouldn't have had one, so read it - // for the error message. - return node.getAttribute(attributeName); - } - - if (propertyInfo.type === BOOLEAN) { - // If this was a boolean, it doesn't matter what the value is - // the fact that we have it is the same as the expected. - return expected; - } // Even if this property uses a namespace we use getAttribute - // because we assume its namespaced name is the same as our config. - // To use getAttributeNS we need the local name which we don't have - // in our config atm. - - - stringValue = node.getAttribute(attributeName); - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return stringValue === null ? expected : stringValue; - } else if (stringValue === '' + expected) { - return expected; - } else { - return stringValue; - } - } - } - } - /** - * Get the value for a attribute on a node. Only used in DEV for SSR validation. - * The third argument is used as a hint of what the expected value is. Some - * attributes have multiple equivalent values. - */ - - function getValueForAttribute(node, name, expected) { - { - if (!isAttributeNameSafe(name)) { - return; - } // If the object is an opaque reference ID, it's expected that - // the next prop is different than the server value, so just return - // expected - - - if (isOpaqueHydratingObject(expected)) { - return expected; - } - - if (!node.hasAttribute(name)) { - return expected === undefined ? undefined : null; - } - - var value = node.getAttribute(name); - - if (value === '' + expected) { - return expected; - } - - return value; - } - } - /** - * Sets the value for a property on a node. - * - * @param {DOMElement} node - * @param {string} name - * @param {*} value - */ - - function setValueForProperty(node, name, value, isCustomComponentTag) { - var propertyInfo = getPropertyInfo(name); - - if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { - return; - } - - if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { - value = null; - } // If the prop isn't in the special list, treat it as a simple attribute. - - - if (isCustomComponentTag || propertyInfo === null) { - if (isAttributeNameSafe(name)) { - var _attributeName = name; - - if (value === null) { - node.removeAttribute(_attributeName); - } else { - node.setAttribute(_attributeName, '' + value); - } - } - - return; - } - - var mustUseProperty = propertyInfo.mustUseProperty; - - if (mustUseProperty) { - var propertyName = propertyInfo.propertyName; - - if (value === null) { - var type = propertyInfo.type; - node[propertyName] = type === BOOLEAN ? false : ''; - } else { - // Contrary to `setAttribute`, object properties are properly - // `toString`ed by IE8/9. - node[propertyName] = value; - } - - return; - } // The rest are treated as attributes with special cases. - - - var attributeName = propertyInfo.attributeName, - attributeNamespace = propertyInfo.attributeNamespace; - - if (value === null) { - node.removeAttribute(attributeName); - } else { - var _type = propertyInfo.type; - var attributeValue; - - if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { - // If attribute type is boolean, we know for sure it won't be an execution sink - // and we won't require Trusted Type here. - attributeValue = ''; - } else { - // `setAttribute` with objects becomes only `[object]` in IE8/9, - // ('' + value) makes it output the correct toString()-value. - { - attributeValue = '' + value; - } - - if (propertyInfo.sanitizeURL) { - sanitizeURL(attributeValue.toString()); - } - } - - if (attributeNamespace) { - node.setAttributeNS(attributeNamespace, attributeName, attributeValue); - } else { - node.setAttribute(attributeName, attributeValue); - } - } - } - - var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - var _assign = ReactInternals.assign; - - // ATTENTION - // When adding new symbols to this file, - // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' - // The Symbol used to tag the ReactElement-like types. If there is no native Symbol - // nor polyfill, then a plain number is used for performance. - var REACT_ELEMENT_TYPE = 0xeac7; - var REACT_PORTAL_TYPE = 0xeaca; - var REACT_FRAGMENT_TYPE = 0xeacb; - var REACT_STRICT_MODE_TYPE = 0xeacc; - var REACT_PROFILER_TYPE = 0xead2; - var REACT_PROVIDER_TYPE = 0xeacd; - var REACT_CONTEXT_TYPE = 0xeace; - var REACT_FORWARD_REF_TYPE = 0xead0; - var REACT_SUSPENSE_TYPE = 0xead1; - var REACT_SUSPENSE_LIST_TYPE = 0xead8; - var REACT_MEMO_TYPE = 0xead3; - var REACT_LAZY_TYPE = 0xead4; - var REACT_BLOCK_TYPE = 0xead9; - var REACT_SERVER_BLOCK_TYPE = 0xeada; - var REACT_FUNDAMENTAL_TYPE = 0xead5; - var REACT_SCOPE_TYPE = 0xead7; - var REACT_OPAQUE_ID_TYPE = 0xeae0; - var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1; - var REACT_OFFSCREEN_TYPE = 0xeae2; - var REACT_LEGACY_HIDDEN_TYPE = 0xeae3; - - if (typeof Symbol === 'function' && Symbol.for) { - var symbolFor = Symbol.for; - REACT_ELEMENT_TYPE = symbolFor('react.element'); - REACT_PORTAL_TYPE = symbolFor('react.portal'); - REACT_FRAGMENT_TYPE = symbolFor('react.fragment'); - REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode'); - REACT_PROFILER_TYPE = symbolFor('react.profiler'); - REACT_PROVIDER_TYPE = symbolFor('react.provider'); - REACT_CONTEXT_TYPE = symbolFor('react.context'); - REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref'); - REACT_SUSPENSE_TYPE = symbolFor('react.suspense'); - REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list'); - REACT_MEMO_TYPE = symbolFor('react.memo'); - REACT_LAZY_TYPE = symbolFor('react.lazy'); - REACT_BLOCK_TYPE = symbolFor('react.block'); - REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block'); - REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental'); - REACT_SCOPE_TYPE = symbolFor('react.scope'); - REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); - REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode'); - REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen'); - REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); - } - - var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== 'object') { - return null; - } - - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - - return null; - } - - // Helpers to patch console.logs to avoid logging during side-effect free - // replaying on render function. This currently only patches the object - // lazily which won't cover if the log function was extracted eagerly. - // We could also eagerly patch the method. - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - - function disabledLog() {} - - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 - - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - /* eslint-enable react-internal/no-production-logging */ - } - - disabledDepth++; - } - } - function reenableLogs() { - { - disabledDepth--; - - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - var props = { - configurable: true, - enumerable: true, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - log: _assign({}, props, { - value: prevLog - }), - info: _assign({}, props, { - value: prevInfo - }), - warn: _assign({}, props, { - value: prevWarn - }), - error: _assign({}, props, { - value: prevError - }), - group: _assign({}, props, { - value: prevGroup - }), - groupCollapsed: _assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: _assign({}, props, { - value: prevGroupEnd - }) - }); - /* eslint-enable react-internal/no-production-logging */ - } - - if (disabledDepth < 0) { - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); - } - } - } - - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - var prefix; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === undefined) { - // Extract the VM specific prefix used by each line. - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ''; - } - } // We use the prefix to ensure our stacks line up with native stack frames. - - - return '\n' + prefix + name; - } - } - var reentry = false; - var componentFrameCache; - - { - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); - } - - function describeNativeComponentFrame(fn, construct) { - // If something asked for a stack inside a fake render, it should get ignored. - if (!fn || reentry) { - return ''; - } - - { - var frame = componentFrameCache.get(fn); - - if (frame !== undefined) { - return frame; - } - } - - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. - - Error.prepareStackTrace = undefined; - var previousDispatcher; - - { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function - // for warnings. - - ReactCurrentDispatcher.current = null; - disableLogs(); - } - - try { - // This should throw. - if (construct) { - // Something should be setting the props in the constructor. - var Fake = function () { - throw Error(); - }; // $FlowFixMe - - - Object.defineProperty(Fake.prototype, 'props', { - set: function () { - // We use a throwing setter instead of frozen or non-writable props - // because that won't throw in a non-strict mode function. - throw Error(); - } - }); - - if (typeof Reflect === 'object' && Reflect.construct) { - // We construct a different control for this case to include any extra - // frames added by the construct call. - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - - fn(); - } - } catch (sample) { - // This is inlined manually because closure doesn't do it for us. - if (sample && control && typeof sample.stack === 'string') { - // This extracts the first frame from the sample that isn't also in the control. - // Skipping one frame that we assume is the frame that calls the two. - var sampleLines = sample.stack.split('\n'); - var controlLines = control.stack.split('\n'); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - // We expect at least one stack frame to be shared. - // Typically this will be the root most one. However, stack frames may be - // cut off due to maximum stack limits. In this case, one maybe cut off - // earlier than the other. We assume that the sample is longer or the same - // and there for cut off earlier. So we should find the root most frame in - // the sample somewhere in the control. - c--; - } - - for (; s >= 1 && c >= 0; s--, c--) { - // Next we find the first one that isn't the same which should be the - // frame that called our sample function and the control. - if (sampleLines[s] !== controlLines[c]) { - // In V8, the first line is describing the message but other VMs don't. - // If we're about to return the first line, and the control is also on the same - // line, that's a pretty good indicator that our sample threw at same line as - // the control. I.e. before we entered the sample frame. So we ignore this result. - // This can happen if you passed a class to function component, or non-function. - if (s !== 1 || c !== 1) { - do { - s--; - c--; // We may still have similar intermediate frames from the construct call. - // The next one that isn't the same should be our match though. - - if (c < 0 || sampleLines[s] !== controlLines[c]) { - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, _frame); - } - } // Return the line we found. - - - return _frame; - } - } while (s >= 1 && c >= 0); - } - - break; - } - } - } - } finally { - reentry = false; - - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - - Error.prepareStackTrace = previousPrepareStackTrace; - } // Fallback to just using the name if we couldn't make it throw. - - - var name = fn ? fn.displayName || fn.name : ''; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, syntheticFrame); - } - } - - return syntheticFrame; - } - - function describeClassComponentFrame(ctor, source, ownerFn) { - { - return describeNativeComponentFrame(ctor, true); - } - } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } - } - - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - - if (type == null) { - return ''; - } - - if (typeof type === 'function') { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - - if (typeof type === 'string') { - return describeBuiltInComponentFrame(type); - } - - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame('Suspense'); - - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame('SuspenseList'); - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - - case REACT_MEMO_TYPE: - // Memo may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - - case REACT_BLOCK_TYPE: - return describeFunctionComponentFrame(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - // Lazy may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) {} - } - } - } - - return ''; - } - - function describeFiber(fiber) { - var owner = fiber._debugOwner ? fiber._debugOwner.type : null ; - var source = fiber._debugSource ; - - switch (fiber.tag) { - case HostComponent: - return describeBuiltInComponentFrame(fiber.type); - - case LazyComponent: - return describeBuiltInComponentFrame('Lazy'); - - case SuspenseComponent: - return describeBuiltInComponentFrame('Suspense'); - - case SuspenseListComponent: - return describeBuiltInComponentFrame('SuspenseList'); - - case FunctionComponent: - case IndeterminateComponent: - case SimpleMemoComponent: - return describeFunctionComponentFrame(fiber.type); - - case ForwardRef: - return describeFunctionComponentFrame(fiber.type.render); - - case Block: - return describeFunctionComponentFrame(fiber.type._render); - - case ClassComponent: - return describeClassComponentFrame(fiber.type); - - default: - return ''; - } - } - - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ''; - var node = workInProgress; - - do { - info += describeFiber(node); - node = node.return; - } while (node); - - return info; - } catch (x) { - return '\nError generating stack: ' + x.message + '\n' + x.stack; - } - } - - function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ''; - return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); - } - - function getContextName(type) { - return type.displayName || 'Context'; - } - - function getComponentName(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case REACT_FRAGMENT_TYPE: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case REACT_PROFILER_TYPE: - return 'Profiler'; - - case REACT_STRICT_MODE_TYPE: - return 'StrictMode'; - - case REACT_SUSPENSE_TYPE: - return 'Suspense'; - - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + '.Consumer'; - - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + '.Provider'; - - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - - case REACT_MEMO_TYPE: - return getComponentName(type.type); - - case REACT_BLOCK_TYPE: - return getComponentName(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - return getComponentName(init(payload)); - } catch (x) { - return null; - } - } - } - } - - return null; - } - - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var current = null; - var isRendering = false; - function getCurrentFiberOwnerNameInDevOrNull() { - { - if (current === null) { - return null; - } - - var owner = current._debugOwner; - - if (owner !== null && typeof owner !== 'undefined') { - return getComponentName(owner.type); - } - } - - return null; - } - - function getCurrentFiberStackInDev() { - { - if (current === null) { - return ''; - } // Safe because if current fiber exists, we are reconciling, - // and it is guaranteed to be the work-in-progress version. - - - return getStackByFiberInDevAndProd(current); - } - } - - function resetCurrentFiber() { - { - ReactDebugCurrentFrame.getCurrentStack = null; - current = null; - isRendering = false; - } - } - function setCurrentFiber(fiber) { - { - ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; - current = fiber; - isRendering = false; - } - } - function setIsRendering(rendering) { - { - isRendering = rendering; - } - } - function getIsRendering() { - { - return isRendering; - } - } - - // Flow does not allow string concatenation of most non-string types. To work - // around this limitation, we use an opaque type that can only be obtained by - // passing the value through getToStringValue first. - function toString(value) { - return '' + value; - } - function getToStringValue(value) { - switch (typeof value) { - case 'boolean': - case 'number': - case 'object': - case 'string': - case 'undefined': - return value; - - default: - // function, symbol are assigned as empty strings - return ''; - } - } - - var hasReadOnlyValue = { - button: true, - checkbox: true, - image: true, - hidden: true, - radio: true, - reset: true, - submit: true - }; - function checkControlledValueProps(tagName, props) { - { - if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { - error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - } - - if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { - error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - } - } - } - - function isCheckable(elem) { - var type = elem.type; - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); - } - - function getTracker(node) { - return node._valueTracker; - } - - function detachTracker(node) { - node._valueTracker = null; - } - - function getValueFromNode(node) { - var value = ''; - - if (!node) { - return value; - } - - if (isCheckable(node)) { - value = node.checked ? 'true' : 'false'; - } else { - value = node.value; - } - - return value; - } - - function trackValueOnNode(node) { - var valueField = isCheckable(node) ? 'checked' : 'value'; - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail - // and don't track value will cause over reporting of changes, - // but it's better then a hard failure - // (needed for certain tests that spyOn input values and Safari) - - if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { - return; - } - - var get = descriptor.get, - set = descriptor.set; - Object.defineProperty(node, valueField, { - configurable: true, - get: function () { - return get.call(this); - }, - set: function (value) { - currentValue = '' + value; - set.call(this, value); - } - }); // We could've passed this the first time - // but it triggers a bug in IE11 and Edge 14/15. - // Calling defineProperty() again should be equivalent. - // https://github.com/facebook/react/issues/11768 - - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable - }); - var tracker = { - getValue: function () { - return currentValue; - }, - setValue: function (value) { - currentValue = '' + value; - }, - stopTracking: function () { - detachTracker(node); - delete node[valueField]; - } - }; - return tracker; - } - - function track(node) { - if (getTracker(node)) { - return; - } // TODO: Once it's just Fiber we can move this to node._wrapperState - - - node._valueTracker = trackValueOnNode(node); - } - function updateValueIfChanged(node) { - if (!node) { - return false; - } - - var tracker = getTracker(node); // if there is no tracker at this point it's unlikely - // that trying again will succeed - - if (!tracker) { - return true; - } - - var lastValue = tracker.getValue(); - var nextValue = getValueFromNode(node); - - if (nextValue !== lastValue) { - tracker.setValue(nextValue); - return true; - } - - return false; - } - - function getActiveElement(doc) { - doc = doc || (typeof document !== 'undefined' ? document : undefined); - - if (typeof doc === 'undefined') { - return null; - } - - try { - return doc.activeElement || doc.body; - } catch (e) { - return doc.body; - } - } - - var didWarnValueDefaultValue = false; - var didWarnCheckedDefaultChecked = false; - var didWarnControlledToUncontrolled = false; - var didWarnUncontrolledToControlled = false; - - function isControlled(props) { - var usesChecked = props.type === 'checkbox' || props.type === 'radio'; - return usesChecked ? props.checked != null : props.value != null; - } - /** - * Implements an <input> host component that allows setting these optional - * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. - * - * If `checked` or `value` are not supplied (or null/undefined), user actions - * that affect the checked state or value will trigger updates to the element. - * - * If they are supplied (and not null/undefined), the rendered element will not - * trigger updates to the element. Instead, the props must change in order for - * the rendered element to be updated. - * - * The rendered element will be initialized as unchecked (or `defaultChecked`) - * with an empty value (or `defaultValue`). - * - * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html - */ - - - function getHostProps(element, props) { - var node = element; - var checked = props.checked; - - var hostProps = _assign({}, props, { - defaultChecked: undefined, - defaultValue: undefined, - value: undefined, - checked: checked != null ? checked : node._wrapperState.initialChecked - }); - - return hostProps; - } - function initWrapperState(element, props) { - { - checkControlledValueProps('input', props); - - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { - error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnCheckedDefaultChecked = true; - } - - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { - error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnValueDefaultValue = true; - } - } - - var node = element; - var defaultValue = props.defaultValue == null ? '' : props.defaultValue; - node._wrapperState = { - initialChecked: props.checked != null ? props.checked : props.defaultChecked, - initialValue: getToStringValue(props.value != null ? props.value : defaultValue), - controlled: isControlled(props) - }; - } - function updateChecked(element, props) { - var node = element; - var checked = props.checked; - - if (checked != null) { - setValueForProperty(node, 'checked', checked, false); - } - } - function updateWrapper(element, props) { - var node = element; - - { - var controlled = isControlled(props); - - if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { - error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); - - didWarnUncontrolledToControlled = true; - } - - if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { - error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); - - didWarnControlledToUncontrolled = true; - } - } - - updateChecked(element, props); - var value = getToStringValue(props.value); - var type = props.type; - - if (value != null) { - if (type === 'number') { - if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible. - // eslint-disable-next-line - node.value != value) { - node.value = toString(value); - } - } else if (node.value !== toString(value)) { - node.value = toString(value); - } - } else if (type === 'submit' || type === 'reset') { - // Submit/reset inputs need the attribute removed completely to avoid - // blank-text buttons. - node.removeAttribute('value'); - return; - } - - { - // When syncing the value attribute, the value comes from a cascade of - // properties: - // 1. The value React property - // 2. The defaultValue React property - // 3. Otherwise there should be no change - if (props.hasOwnProperty('value')) { - setDefaultValue(node, props.type, value); - } else if (props.hasOwnProperty('defaultValue')) { - setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); - } - } - - { - // When syncing the checked attribute, it only changes when it needs - // to be removed, such as transitioning from a checkbox into a text input - if (props.checked == null && props.defaultChecked != null) { - node.defaultChecked = !!props.defaultChecked; - } - } - } - function postMountWrapper(element, props, isHydrating) { - var node = element; // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { - var type = props.type; - var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the - // default value provided by the browser. See: #12872 - - if (isButton && (props.value === undefined || props.value === null)) { - return; - } - - var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (!isHydrating) { - { - // When syncing the value attribute, the value property should use - // the wrapperState._initialValue property. This uses: - // - // 1. The value React property when present - // 2. The defaultValue React property when present - // 3. An empty string - if (initialValue !== node.value) { - node.value = initialValue; - } - } - } - - { - // Otherwise, the value attribute is synchronized to the property, - // so we assign defaultValue to the same thing as the value property - // assignment step above. - node.defaultValue = initialValue; - } - } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug - // this is needed to work around a chrome bug where setting defaultChecked - // will sometimes influence the value of checked (even after detachment). - // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 - // We need to temporarily unset name to avoid disrupting radio button groups. - - - var name = node.name; - - if (name !== '') { - node.name = ''; - } - - { - // When syncing the checked attribute, both the checked property and - // attribute are assigned at the same time using defaultChecked. This uses: - // - // 1. The checked React property when present - // 2. The defaultChecked React property when present - // 3. Otherwise, false - node.defaultChecked = !node.defaultChecked; - node.defaultChecked = !!node._wrapperState.initialChecked; - } - - if (name !== '') { - node.name = name; - } - } - function restoreControlledState(element, props) { - var node = element; - updateWrapper(node, props); - updateNamedCousins(node, props); - } - - function updateNamedCousins(rootNode, props) { - var name = props.name; - - if (props.type === 'radio' && name != null) { - var queryRoot = rootNode; - - while (queryRoot.parentNode) { - queryRoot = queryRoot.parentNode; - } // If `rootNode.form` was non-null, then we could try `form.elements`, - // but that sometimes behaves strangely in IE8. We could also try using - // `form.getElementsByName`, but that will only return direct children - // and won't include inputs that use the HTML5 `form=` attribute. Since - // the input might not even be in a form. It might not even be in the - // document. Let's just use the local `querySelectorAll` to ensure we don't - // miss anything. - - - var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); - - for (var i = 0; i < group.length; i++) { - var otherNode = group[i]; - - if (otherNode === rootNode || otherNode.form !== rootNode.form) { - continue; - } // This will throw if radio buttons rendered by different copies of React - // and the same name are rendered into the same form (same as #1939). - // That's probably okay; we don't support it just as we don't support - // mixing React radio buttons with non-React ones. - - - var otherProps = getFiberCurrentPropsFromNode(otherNode); - - if (!otherProps) { - { - throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." ); - } - } // We need update the tracked value on the named cousin since the value - // was changed but the input saw no event or value set - - - updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that - // was previously checked to update will cause it to be come re-checked - // as appropriate. - - updateWrapper(otherNode, otherProps); - } - } - } // In Chrome, assigning defaultValue to certain input types triggers input validation. - // For number inputs, the display value loses trailing decimal points. For email inputs, - // Chrome raises "The specified value <x> is not a valid email address". - // - // Here we check to see if the defaultValue has actually changed, avoiding these problems - // when the user is inputting text - // - // https://github.com/facebook/react/issues/7253 - - - function setDefaultValue(node, type, value) { - if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js - type !== 'number' || getActiveElement(node.ownerDocument) !== node) { - if (value == null) { - node.defaultValue = toString(node._wrapperState.initialValue); - } else if (node.defaultValue !== toString(value)) { - node.defaultValue = toString(value); - } - } - } - - var didWarnSelectedSetOnOption = false; - var didWarnInvalidChild = false; - - function flattenChildren(children) { - var content = ''; // Flatten children. We'll warn if they are invalid - // during validateProps() which runs for hydration too. - // Note that this would throw on non-element objects. - // Elements are stringified (which is normally irrelevant - // but matters for <fbt>). - - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } - - content += child; // Note: we don't warn about invalid children here. - // Instead, this is done separately below so that - // it happens during the hydration code path too. - }); - return content; - } - /** - * Implements an <option> host component that warns when `selected` is set. - */ - - - function validateProps(element, props) { - { - // This mirrors the code path above, but runs for hydration too. - // Warn about invalid children here so that client and hydration are consistent. - // TODO: this seems like it could cause a DEV-only throw for hydration - // if children contains a non-element object. We should try to avoid that. - if (typeof props.children === 'object' && props.children !== null) { - React.Children.forEach(props.children, function (child) { - if (child == null) { - return; - } - - if (typeof child === 'string' || typeof child === 'number') { - return; - } - - if (typeof child.type !== 'string') { - return; - } - - if (!didWarnInvalidChild) { - didWarnInvalidChild = true; - - error('Only strings and numbers are supported as <option> children.'); - } - }); - } // TODO: Remove support for `selected` in <option>. - - - if (props.selected != null && !didWarnSelectedSetOnOption) { - error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.'); - - didWarnSelectedSetOnOption = true; - } - } - } - function postMountWrapper$1(element, props) { - // value="" should make a value attribute (#6219) - if (props.value != null) { - element.setAttribute('value', toString(getToStringValue(props.value))); - } - } - function getHostProps$1(element, props) { - var hostProps = _assign({ - children: undefined - }, props); - - var content = flattenChildren(props.children); - - if (content) { - hostProps.children = content; - } - - return hostProps; - } - - var didWarnValueDefaultValue$1; - - { - didWarnValueDefaultValue$1 = false; - } - - function getDeclarationErrorAddendum() { - var ownerName = getCurrentFiberOwnerNameInDevOrNull(); - - if (ownerName) { - return '\n\nCheck the render method of `' + ownerName + '`.'; - } - - return ''; - } - - var valuePropNames = ['value', 'defaultValue']; - /** - * Validation function for `value` and `defaultValue`. - */ - - function checkSelectPropTypes(props) { - { - checkControlledValueProps('select', props); - - for (var i = 0; i < valuePropNames.length; i++) { - var propName = valuePropNames[i]; - - if (props[propName] == null) { - continue; - } - - var isArray = Array.isArray(props[propName]); - - if (props.multiple && !isArray) { - error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum()); - } else if (!props.multiple && isArray) { - error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum()); - } - } - } - } - - function updateOptions(node, multiple, propValue, setDefaultSelected) { - var options = node.options; - - if (multiple) { - var selectedValues = propValue; - var selectedValue = {}; - - for (var i = 0; i < selectedValues.length; i++) { - // Prefix to avoid chaos with special keys. - selectedValue['$' + selectedValues[i]] = true; - } - - for (var _i = 0; _i < options.length; _i++) { - var selected = selectedValue.hasOwnProperty('$' + options[_i].value); - - if (options[_i].selected !== selected) { - options[_i].selected = selected; - } - - if (selected && setDefaultSelected) { - options[_i].defaultSelected = true; - } - } - } else { - // Do not set `select.value` as exact behavior isn't consistent across all - // browsers for all cases. - var _selectedValue = toString(getToStringValue(propValue)); - - var defaultSelected = null; - - for (var _i2 = 0; _i2 < options.length; _i2++) { - if (options[_i2].value === _selectedValue) { - options[_i2].selected = true; - - if (setDefaultSelected) { - options[_i2].defaultSelected = true; - } - - return; - } - - if (defaultSelected === null && !options[_i2].disabled) { - defaultSelected = options[_i2]; - } - } - - if (defaultSelected !== null) { - defaultSelected.selected = true; - } - } - } - /** - * Implements a <select> host component that allows optionally setting the - * props `value` and `defaultValue`. If `multiple` is false, the prop must be a - * stringable. If `multiple` is true, the prop must be an array of stringables. - * - * If `value` is not supplied (or null/undefined), user actions that change the - * selected option will trigger updates to the rendered options. - * - * If it is supplied (and not null/undefined), the rendered options will not - * update in response to user actions. Instead, the `value` prop must change in - * order for the rendered options to update. - * - * If `defaultValue` is provided, any options with the supplied values will be - * selected. - */ - - - function getHostProps$2(element, props) { - return _assign({}, props, { - value: undefined - }); - } - function initWrapperState$1(element, props) { - var node = element; - - { - checkSelectPropTypes(props); - } - - node._wrapperState = { - wasMultiple: !!props.multiple - }; - - { - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) { - error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components'); - - didWarnValueDefaultValue$1 = true; - } - } - } - function postMountWrapper$2(element, props) { - var node = element; - node.multiple = !!props.multiple; - var value = props.value; - - if (value != null) { - updateOptions(node, !!props.multiple, value, false); - } else if (props.defaultValue != null) { - updateOptions(node, !!props.multiple, props.defaultValue, true); - } - } - function postUpdateWrapper(element, props) { - var node = element; - var wasMultiple = node._wrapperState.wasMultiple; - node._wrapperState.wasMultiple = !!props.multiple; - var value = props.value; - - if (value != null) { - updateOptions(node, !!props.multiple, value, false); - } else if (wasMultiple !== !!props.multiple) { - // For simplicity, reapply `defaultValue` if `multiple` is toggled. - if (props.defaultValue != null) { - updateOptions(node, !!props.multiple, props.defaultValue, true); - } else { - // Revert the select back to its default unselected state. - updateOptions(node, !!props.multiple, props.multiple ? [] : '', false); - } - } - } - function restoreControlledState$1(element, props) { - var node = element; - var value = props.value; - - if (value != null) { - updateOptions(node, !!props.multiple, value, false); - } - } - - var didWarnValDefaultVal = false; - - /** - * Implements a <textarea> host component that allows setting `value`, and - * `defaultValue`. This differs from the traditional DOM API because value is - * usually set as PCDATA children. - * - * If `value` is not supplied (or null/undefined), user actions that affect the - * value will trigger updates to the element. - * - * If `value` is supplied (and not null/undefined), the rendered element will - * not trigger updates to the element. Instead, the `value` prop must change in - * order for the rendered element to be updated. - * - * The rendered element will be initialized with an empty value, the prop - * `defaultValue` if specified, or the children content (deprecated). - */ - function getHostProps$3(element, props) { - var node = element; - - if (!(props.dangerouslySetInnerHTML == null)) { - { - throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." ); - } - } // Always set children to the same thing. In IE9, the selection range will - // get reset if `textContent` is mutated. We could add a check in setTextContent - // to only set the value if/when the value differs from the node value (which would - // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this - // solution. The value can be a boolean or object so that's why it's forced - // to be a string. - - - var hostProps = _assign({}, props, { - value: undefined, - defaultValue: undefined, - children: toString(node._wrapperState.initialValue) - }); - - return hostProps; - } - function initWrapperState$2(element, props) { - var node = element; - - { - checkControlledValueProps('textarea', props); - - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) { - error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component'); - - didWarnValDefaultVal = true; - } - } - - var initialValue = props.value; // Only bother fetching default value if we're going to use it - - if (initialValue == null) { - var children = props.children, - defaultValue = props.defaultValue; - - if (children != null) { - { - error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.'); - } - - { - if (!(defaultValue == null)) { - { - throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." ); - } - } - - if (Array.isArray(children)) { - if (!(children.length <= 1)) { - { - throw Error( "<textarea> can only have at most one child." ); - } - } - - children = children[0]; - } - - defaultValue = children; - } - } - - if (defaultValue == null) { - defaultValue = ''; - } - - initialValue = defaultValue; - } - - node._wrapperState = { - initialValue: getToStringValue(initialValue) - }; - } - function updateWrapper$1(element, props) { - var node = element; - var value = getToStringValue(props.value); - var defaultValue = getToStringValue(props.defaultValue); - - if (value != null) { - // Cast `value` to a string to ensure the value is set correctly. While - // browsers typically do this as necessary, jsdom doesn't. - var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed - - if (newValue !== node.value) { - node.value = newValue; - } - - if (props.defaultValue == null && node.defaultValue !== newValue) { - node.defaultValue = newValue; - } - } - - if (defaultValue != null) { - node.defaultValue = toString(defaultValue); - } - } - function postMountWrapper$3(element, props) { - var node = element; // This is in postMount because we need access to the DOM node, which is not - // available until after the component has mounted. - - var textContent = node.textContent; // Only set node.value if textContent is equal to the expected - // initial value. In IE10/IE11 there is a bug where the placeholder attribute - // will populate textContent as well. - // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/ - - if (textContent === node._wrapperState.initialValue) { - if (textContent !== '' && textContent !== null) { - node.value = textContent; - } - } - } - function restoreControlledState$2(element, props) { - // DOM component is still mounted; update - updateWrapper$1(element, props); - } - - var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml'; - var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML'; - var SVG_NAMESPACE = 'http://www.w3.org/2000/svg'; - var Namespaces = { - html: HTML_NAMESPACE, - mathml: MATH_NAMESPACE, - svg: SVG_NAMESPACE - }; // Assumes there is no parent namespace. - - function getIntrinsicNamespace(type) { - switch (type) { - case 'svg': - return SVG_NAMESPACE; - - case 'math': - return MATH_NAMESPACE; - - default: - return HTML_NAMESPACE; - } - } - function getChildNamespace(parentNamespace, type) { - if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) { - // No (or default) parent namespace: potential entry point. - return getIntrinsicNamespace(type); - } - - if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') { - // We're leaving SVG. - return HTML_NAMESPACE; - } // By default, pass namespace below. - - - return parentNamespace; - } - - /* globals MSApp */ - - /** - * Create a function which has 'unsafe' privileges (required by windows8 apps) - */ - var createMicrosoftUnsafeLocalFunction = function (func) { - if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { - return function (arg0, arg1, arg2, arg3) { - MSApp.execUnsafeLocalFunction(function () { - return func(arg0, arg1, arg2, arg3); - }); - }; - } else { - return func; - } - }; - - var reusableSVGContainer; - /** - * Set the innerHTML property of a node - * - * @param {DOMElement} node - * @param {string} html - * @internal - */ - - var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) { - if (node.namespaceURI === Namespaces.svg) { - - if (!('innerHTML' in node)) { - // IE does not have innerHTML for SVG nodes, so instead we inject the - // new markup in a temp node and then move the child nodes across into - // the target node - reusableSVGContainer = reusableSVGContainer || document.createElement('div'); - reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>'; - var svgNode = reusableSVGContainer.firstChild; - - while (node.firstChild) { - node.removeChild(node.firstChild); - } - - while (svgNode.firstChild) { - node.appendChild(svgNode.firstChild); - } - - return; - } - } - - node.innerHTML = html; - }); - - /** - * HTML nodeType values that represent the type of the node - */ - var ELEMENT_NODE = 1; - var TEXT_NODE = 3; - var COMMENT_NODE = 8; - var DOCUMENT_NODE = 9; - var DOCUMENT_FRAGMENT_NODE = 11; - - /** - * Set the textContent property of a node. For text updates, it's faster - * to set the `nodeValue` of the Text node directly instead of using - * `.textContent` which will remove the existing node and create a new one. - * - * @param {DOMElement} node - * @param {string} text - * @internal - */ - - var setTextContent = function (node, text) { - if (text) { - var firstChild = node.firstChild; - - if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) { - firstChild.nodeValue = text; - return; - } - } - - node.textContent = text; - }; - - // List derived from Gecko source code: - // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js - var shorthandToLonghand = { - animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'], - background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'], - backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'], - border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'], - borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'], - borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'], - borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'], - borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'], - borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'], - borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'], - borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'], - borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'], - borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'], - borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'], - borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'], - borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'], - borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'], - columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'], - columns: ['columnCount', 'columnWidth'], - flex: ['flexBasis', 'flexGrow', 'flexShrink'], - flexFlow: ['flexDirection', 'flexWrap'], - font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'], - fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'], - gap: ['columnGap', 'rowGap'], - grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], - gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'], - gridColumn: ['gridColumnEnd', 'gridColumnStart'], - gridColumnGap: ['columnGap'], - gridGap: ['columnGap', 'rowGap'], - gridRow: ['gridRowEnd', 'gridRowStart'], - gridRowGap: ['rowGap'], - gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'], - listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'], - margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'], - marker: ['markerEnd', 'markerMid', 'markerStart'], - mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'], - maskPosition: ['maskPositionX', 'maskPositionY'], - outline: ['outlineColor', 'outlineStyle', 'outlineWidth'], - overflow: ['overflowX', 'overflowY'], - padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'], - placeContent: ['alignContent', 'justifyContent'], - placeItems: ['alignItems', 'justifyItems'], - placeSelf: ['alignSelf', 'justifySelf'], - textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'], - textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'], - transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'], - wordWrap: ['overflowWrap'] - }; - - /** - * CSS properties which accept numbers but are not in units of "px". - */ - var isUnitlessNumber = { - animationIterationCount: true, - borderImageOutset: true, - borderImageSlice: true, - borderImageWidth: true, - boxFlex: true, - boxFlexGroup: true, - boxOrdinalGroup: true, - columnCount: true, - columns: true, - flex: true, - flexGrow: true, - flexPositive: true, - flexShrink: true, - flexNegative: true, - flexOrder: true, - gridArea: true, - gridRow: true, - gridRowEnd: true, - gridRowSpan: true, - gridRowStart: true, - gridColumn: true, - gridColumnEnd: true, - gridColumnSpan: true, - gridColumnStart: true, - fontWeight: true, - lineClamp: true, - lineHeight: true, - opacity: true, - order: true, - orphans: true, - tabSize: true, - widows: true, - zIndex: true, - zoom: true, - // SVG-related properties - fillOpacity: true, - floodOpacity: true, - stopOpacity: true, - strokeDasharray: true, - strokeDashoffset: true, - strokeMiterlimit: true, - strokeOpacity: true, - strokeWidth: true - }; - /** - * @param {string} prefix vendor-specific prefix, eg: Webkit - * @param {string} key style name, eg: transitionDuration - * @return {string} style name prefixed with `prefix`, properly camelCased, eg: - * WebkitTransitionDuration - */ - - function prefixKey(prefix, key) { - return prefix + key.charAt(0).toUpperCase() + key.substring(1); - } - /** - * Support style names that may come passed in prefixed by adding permutations - * of vendor prefixes. - */ - - - var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an - // infinite loop, because it iterates over the newly added props too. - - Object.keys(isUnitlessNumber).forEach(function (prop) { - prefixes.forEach(function (prefix) { - isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; - }); - }); - - /** - * Convert a value into the proper css writable value. The style name `name` - * should be logical (no hyphens), as specified - * in `CSSProperty.isUnitlessNumber`. - * - * @param {string} name CSS property name such as `topMargin`. - * @param {*} value CSS property value such as `10px`. - * @return {string} Normalized style value with dimensions applied. - */ - - function dangerousStyleValue(name, value, isCustomProperty) { - // Note that we've removed escapeTextForBrowser() calls here since the - // whole string will be escaped when the attribute is injected into - // the markup. If you provide unsafe user data here they can inject - // arbitrary CSS which may be problematic (I couldn't repro this): - // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ - // This is not an XSS hole but instead a potential CSS injection issue - // which has lead to a greater discussion about how we're going to - // trust URLs moving forward. See #2115901 - var isEmpty = value == null || typeof value === 'boolean' || value === ''; - - if (isEmpty) { - return ''; - } - - if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) { - return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers - } - - return ('' + value).trim(); - } - - var uppercasePattern = /([A-Z])/g; - var msPattern = /^ms-/; - /** - * Hyphenates a camelcased CSS property name, for example: - * - * > hyphenateStyleName('backgroundColor') - * < "background-color" - * > hyphenateStyleName('MozTransition') - * < "-moz-transition" - * > hyphenateStyleName('msTransition') - * < "-ms-transition" - * - * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix - * is converted to `-ms-`. - */ - - function hyphenateStyleName(name) { - return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-'); - } - - var warnValidStyle = function () {}; - - { - // 'msTransform' is correct, but the other prefixes should be capitalized - var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; - var msPattern$1 = /^-ms-/; - var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon - - var badStyleValueWithSemicolonPattern = /;\s*$/; - var warnedStyleNames = {}; - var warnedStyleValues = {}; - var warnedForNaNValue = false; - var warnedForInfinityValue = false; - - var camelize = function (string) { - return string.replace(hyphenPattern, function (_, character) { - return character.toUpperCase(); - }); - }; - - var warnHyphenatedStyleName = function (name) { - if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { - return; - } - - warnedStyleNames[name] = true; - - error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests - // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix - // is converted to lowercase `ms`. - camelize(name.replace(msPattern$1, 'ms-'))); - }; - - var warnBadVendoredStyleName = function (name) { - if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { - return; - } - - warnedStyleNames[name] = true; - - error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)); - }; - - var warnStyleValueWithSemicolon = function (name, value) { - if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { - return; - } - - warnedStyleValues[value] = true; - - error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')); - }; - - var warnStyleValueIsNaN = function (name, value) { - if (warnedForNaNValue) { - return; - } - - warnedForNaNValue = true; - - error('`NaN` is an invalid value for the `%s` css style property.', name); - }; - - var warnStyleValueIsInfinity = function (name, value) { - if (warnedForInfinityValue) { - return; - } - - warnedForInfinityValue = true; - - error('`Infinity` is an invalid value for the `%s` css style property.', name); - }; - - warnValidStyle = function (name, value) { - if (name.indexOf('-') > -1) { - warnHyphenatedStyleName(name); - } else if (badVendoredStyleNamePattern.test(name)) { - warnBadVendoredStyleName(name); - } else if (badStyleValueWithSemicolonPattern.test(value)) { - warnStyleValueWithSemicolon(name, value); - } - - if (typeof value === 'number') { - if (isNaN(value)) { - warnStyleValueIsNaN(name, value); - } else if (!isFinite(value)) { - warnStyleValueIsInfinity(name, value); - } - } - }; - } - - var warnValidStyle$1 = warnValidStyle; - - /** - * Operations for dealing with CSS properties. - */ - - /** - * This creates a string that is expected to be equivalent to the style - * attribute generated by server-side rendering. It by-passes warnings and - * security checks so it's not safe to use this value for anything other than - * comparison. It is only used in DEV for SSR validation. - */ - - function createDangerousStringForStyles(styles) { - { - var serialized = ''; - var delimiter = ''; - - for (var styleName in styles) { - if (!styles.hasOwnProperty(styleName)) { - continue; - } - - var styleValue = styles[styleName]; - - if (styleValue != null) { - var isCustomProperty = styleName.indexOf('--') === 0; - serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':'; - serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty); - delimiter = ';'; - } - } - - return serialized || null; - } - } - /** - * Sets the value for multiple styles on a node. If a value is specified as - * '' (empty string), the corresponding style property will be unset. - * - * @param {DOMElement} node - * @param {object} styles - */ - - function setValueForStyles(node, styles) { - var style = node.style; - - for (var styleName in styles) { - if (!styles.hasOwnProperty(styleName)) { - continue; - } - - var isCustomProperty = styleName.indexOf('--') === 0; - - { - if (!isCustomProperty) { - warnValidStyle$1(styleName, styles[styleName]); - } - } - - var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty); - - if (styleName === 'float') { - styleName = 'cssFloat'; - } - - if (isCustomProperty) { - style.setProperty(styleName, styleValue); - } else { - style[styleName] = styleValue; - } - } - } - - function isValueEmpty(value) { - return value == null || typeof value === 'boolean' || value === ''; - } - /** - * Given {color: 'red', overflow: 'hidden'} returns { - * color: 'color', - * overflowX: 'overflow', - * overflowY: 'overflow', - * }. This can be read as "the overflowY property was set by the overflow - * shorthand". That is, the values are the property that each was derived from. - */ - - - function expandShorthandMap(styles) { - var expanded = {}; - - for (var key in styles) { - var longhands = shorthandToLonghand[key] || [key]; - - for (var i = 0; i < longhands.length; i++) { - expanded[longhands[i]] = key; - } - } - - return expanded; - } - /** - * When mixing shorthand and longhand property names, we warn during updates if - * we expect an incorrect result to occur. In particular, we warn for: - * - * Updating a shorthand property (longhand gets overwritten): - * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'} - * becomes .style.font = 'baz' - * Removing a shorthand property (longhand gets lost too): - * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'} - * becomes .style.font = '' - * Removing a longhand property (should revert to shorthand; doesn't): - * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'} - * becomes .style.fontVariant = '' - */ - - - function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) { - { - if (!nextStyles) { - return; - } - - var expandedUpdates = expandShorthandMap(styleUpdates); - var expandedStyles = expandShorthandMap(nextStyles); - var warnedAbout = {}; - - for (var key in expandedUpdates) { - var originalKey = expandedUpdates[key]; - var correctOriginalKey = expandedStyles[key]; - - if (correctOriginalKey && originalKey !== correctOriginalKey) { - var warningKey = originalKey + ',' + correctOriginalKey; - - if (warnedAbout[warningKey]) { - continue; - } - - warnedAbout[warningKey] = true; - - error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey); - } - } - } - } - - // For HTML, certain tags should omit their close tag. We keep a list for - // those special-case tags. - var omittedCloseTags = { - area: true, - base: true, - br: true, - col: true, - embed: true, - hr: true, - img: true, - input: true, - keygen: true, - link: true, - meta: true, - param: true, - source: true, - track: true, - wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems. - - }; - - // `omittedCloseTags` except that `menuitem` should still have its closing tag. - - var voidElementTags = _assign({ - menuitem: true - }, omittedCloseTags); - - var HTML = '__html'; - - function assertValidProps(tag, props) { - if (!props) { - return; - } // Note the use of `==` which checks for null or undefined. - - - if (voidElementTags[tag]) { - if (!(props.children == null && props.dangerouslySetInnerHTML == null)) { - { - throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." ); - } - } - } - - if (props.dangerouslySetInnerHTML != null) { - if (!(props.children == null)) { - { - throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." ); - } - } - - if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) { - { - throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." ); - } - } - } - - { - if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) { - error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.'); - } - } - - if (!(props.style == null || typeof props.style === 'object')) { - { - throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." ); - } - } - } - - function isCustomComponent(tagName, props) { - if (tagName.indexOf('-') === -1) { - return typeof props.is === 'string'; - } - - switch (tagName) { - // These are reserved SVG and MathML elements. - // We don't mind this list too much because we expect it to never grow. - // The alternative is to track the namespace in a few places which is convoluted. - // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts - case 'annotation-xml': - case 'color-profile': - case 'font-face': - case 'font-face-src': - case 'font-face-uri': - case 'font-face-format': - case 'font-face-name': - case 'missing-glyph': - return false; - - default: - return true; - } - } - - // When adding attributes to the HTML or SVG allowed attribute list, be sure to - // also add them to this module to ensure casing and incorrect name - // warnings. - var possibleStandardNames = { - // HTML - accept: 'accept', - acceptcharset: 'acceptCharset', - 'accept-charset': 'acceptCharset', - accesskey: 'accessKey', - action: 'action', - allowfullscreen: 'allowFullScreen', - alt: 'alt', - as: 'as', - async: 'async', - autocapitalize: 'autoCapitalize', - autocomplete: 'autoComplete', - autocorrect: 'autoCorrect', - autofocus: 'autoFocus', - autoplay: 'autoPlay', - autosave: 'autoSave', - capture: 'capture', - cellpadding: 'cellPadding', - cellspacing: 'cellSpacing', - challenge: 'challenge', - charset: 'charSet', - checked: 'checked', - children: 'children', - cite: 'cite', - class: 'className', - classid: 'classID', - classname: 'className', - cols: 'cols', - colspan: 'colSpan', - content: 'content', - contenteditable: 'contentEditable', - contextmenu: 'contextMenu', - controls: 'controls', - controlslist: 'controlsList', - coords: 'coords', - crossorigin: 'crossOrigin', - dangerouslysetinnerhtml: 'dangerouslySetInnerHTML', - data: 'data', - datetime: 'dateTime', - default: 'default', - defaultchecked: 'defaultChecked', - defaultvalue: 'defaultValue', - defer: 'defer', - dir: 'dir', - disabled: 'disabled', - disablepictureinpicture: 'disablePictureInPicture', - disableremoteplayback: 'disableRemotePlayback', - download: 'download', - draggable: 'draggable', - enctype: 'encType', - enterkeyhint: 'enterKeyHint', - for: 'htmlFor', - form: 'form', - formmethod: 'formMethod', - formaction: 'formAction', - formenctype: 'formEncType', - formnovalidate: 'formNoValidate', - formtarget: 'formTarget', - frameborder: 'frameBorder', - headers: 'headers', - height: 'height', - hidden: 'hidden', - high: 'high', - href: 'href', - hreflang: 'hrefLang', - htmlfor: 'htmlFor', - httpequiv: 'httpEquiv', - 'http-equiv': 'httpEquiv', - icon: 'icon', - id: 'id', - innerhtml: 'innerHTML', - inputmode: 'inputMode', - integrity: 'integrity', - is: 'is', - itemid: 'itemID', - itemprop: 'itemProp', - itemref: 'itemRef', - itemscope: 'itemScope', - itemtype: 'itemType', - keyparams: 'keyParams', - keytype: 'keyType', - kind: 'kind', - label: 'label', - lang: 'lang', - list: 'list', - loop: 'loop', - low: 'low', - manifest: 'manifest', - marginwidth: 'marginWidth', - marginheight: 'marginHeight', - max: 'max', - maxlength: 'maxLength', - media: 'media', - mediagroup: 'mediaGroup', - method: 'method', - min: 'min', - minlength: 'minLength', - multiple: 'multiple', - muted: 'muted', - name: 'name', - nomodule: 'noModule', - nonce: 'nonce', - novalidate: 'noValidate', - open: 'open', - optimum: 'optimum', - pattern: 'pattern', - placeholder: 'placeholder', - playsinline: 'playsInline', - poster: 'poster', - preload: 'preload', - profile: 'profile', - radiogroup: 'radioGroup', - readonly: 'readOnly', - referrerpolicy: 'referrerPolicy', - rel: 'rel', - required: 'required', - reversed: 'reversed', - role: 'role', - rows: 'rows', - rowspan: 'rowSpan', - sandbox: 'sandbox', - scope: 'scope', - scoped: 'scoped', - scrolling: 'scrolling', - seamless: 'seamless', - selected: 'selected', - shape: 'shape', - size: 'size', - sizes: 'sizes', - span: 'span', - spellcheck: 'spellCheck', - src: 'src', - srcdoc: 'srcDoc', - srclang: 'srcLang', - srcset: 'srcSet', - start: 'start', - step: 'step', - style: 'style', - summary: 'summary', - tabindex: 'tabIndex', - target: 'target', - title: 'title', - type: 'type', - usemap: 'useMap', - value: 'value', - width: 'width', - wmode: 'wmode', - wrap: 'wrap', - // SVG - about: 'about', - accentheight: 'accentHeight', - 'accent-height': 'accentHeight', - accumulate: 'accumulate', - additive: 'additive', - alignmentbaseline: 'alignmentBaseline', - 'alignment-baseline': 'alignmentBaseline', - allowreorder: 'allowReorder', - alphabetic: 'alphabetic', - amplitude: 'amplitude', - arabicform: 'arabicForm', - 'arabic-form': 'arabicForm', - ascent: 'ascent', - attributename: 'attributeName', - attributetype: 'attributeType', - autoreverse: 'autoReverse', - azimuth: 'azimuth', - basefrequency: 'baseFrequency', - baselineshift: 'baselineShift', - 'baseline-shift': 'baselineShift', - baseprofile: 'baseProfile', - bbox: 'bbox', - begin: 'begin', - bias: 'bias', - by: 'by', - calcmode: 'calcMode', - capheight: 'capHeight', - 'cap-height': 'capHeight', - clip: 'clip', - clippath: 'clipPath', - 'clip-path': 'clipPath', - clippathunits: 'clipPathUnits', - cliprule: 'clipRule', - 'clip-rule': 'clipRule', - color: 'color', - colorinterpolation: 'colorInterpolation', - 'color-interpolation': 'colorInterpolation', - colorinterpolationfilters: 'colorInterpolationFilters', - 'color-interpolation-filters': 'colorInterpolationFilters', - colorprofile: 'colorProfile', - 'color-profile': 'colorProfile', - colorrendering: 'colorRendering', - 'color-rendering': 'colorRendering', - contentscripttype: 'contentScriptType', - contentstyletype: 'contentStyleType', - cursor: 'cursor', - cx: 'cx', - cy: 'cy', - d: 'd', - datatype: 'datatype', - decelerate: 'decelerate', - descent: 'descent', - diffuseconstant: 'diffuseConstant', - direction: 'direction', - display: 'display', - divisor: 'divisor', - dominantbaseline: 'dominantBaseline', - 'dominant-baseline': 'dominantBaseline', - dur: 'dur', - dx: 'dx', - dy: 'dy', - edgemode: 'edgeMode', - elevation: 'elevation', - enablebackground: 'enableBackground', - 'enable-background': 'enableBackground', - end: 'end', - exponent: 'exponent', - externalresourcesrequired: 'externalResourcesRequired', - fill: 'fill', - fillopacity: 'fillOpacity', - 'fill-opacity': 'fillOpacity', - fillrule: 'fillRule', - 'fill-rule': 'fillRule', - filter: 'filter', - filterres: 'filterRes', - filterunits: 'filterUnits', - floodopacity: 'floodOpacity', - 'flood-opacity': 'floodOpacity', - floodcolor: 'floodColor', - 'flood-color': 'floodColor', - focusable: 'focusable', - fontfamily: 'fontFamily', - 'font-family': 'fontFamily', - fontsize: 'fontSize', - 'font-size': 'fontSize', - fontsizeadjust: 'fontSizeAdjust', - 'font-size-adjust': 'fontSizeAdjust', - fontstretch: 'fontStretch', - 'font-stretch': 'fontStretch', - fontstyle: 'fontStyle', - 'font-style': 'fontStyle', - fontvariant: 'fontVariant', - 'font-variant': 'fontVariant', - fontweight: 'fontWeight', - 'font-weight': 'fontWeight', - format: 'format', - from: 'from', - fx: 'fx', - fy: 'fy', - g1: 'g1', - g2: 'g2', - glyphname: 'glyphName', - 'glyph-name': 'glyphName', - glyphorientationhorizontal: 'glyphOrientationHorizontal', - 'glyph-orientation-horizontal': 'glyphOrientationHorizontal', - glyphorientationvertical: 'glyphOrientationVertical', - 'glyph-orientation-vertical': 'glyphOrientationVertical', - glyphref: 'glyphRef', - gradienttransform: 'gradientTransform', - gradientunits: 'gradientUnits', - hanging: 'hanging', - horizadvx: 'horizAdvX', - 'horiz-adv-x': 'horizAdvX', - horizoriginx: 'horizOriginX', - 'horiz-origin-x': 'horizOriginX', - ideographic: 'ideographic', - imagerendering: 'imageRendering', - 'image-rendering': 'imageRendering', - in2: 'in2', - in: 'in', - inlist: 'inlist', - intercept: 'intercept', - k1: 'k1', - k2: 'k2', - k3: 'k3', - k4: 'k4', - k: 'k', - kernelmatrix: 'kernelMatrix', - kernelunitlength: 'kernelUnitLength', - kerning: 'kerning', - keypoints: 'keyPoints', - keysplines: 'keySplines', - keytimes: 'keyTimes', - lengthadjust: 'lengthAdjust', - letterspacing: 'letterSpacing', - 'letter-spacing': 'letterSpacing', - lightingcolor: 'lightingColor', - 'lighting-color': 'lightingColor', - limitingconeangle: 'limitingConeAngle', - local: 'local', - markerend: 'markerEnd', - 'marker-end': 'markerEnd', - markerheight: 'markerHeight', - markermid: 'markerMid', - 'marker-mid': 'markerMid', - markerstart: 'markerStart', - 'marker-start': 'markerStart', - markerunits: 'markerUnits', - markerwidth: 'markerWidth', - mask: 'mask', - maskcontentunits: 'maskContentUnits', - maskunits: 'maskUnits', - mathematical: 'mathematical', - mode: 'mode', - numoctaves: 'numOctaves', - offset: 'offset', - opacity: 'opacity', - operator: 'operator', - order: 'order', - orient: 'orient', - orientation: 'orientation', - origin: 'origin', - overflow: 'overflow', - overlineposition: 'overlinePosition', - 'overline-position': 'overlinePosition', - overlinethickness: 'overlineThickness', - 'overline-thickness': 'overlineThickness', - paintorder: 'paintOrder', - 'paint-order': 'paintOrder', - panose1: 'panose1', - 'panose-1': 'panose1', - pathlength: 'pathLength', - patterncontentunits: 'patternContentUnits', - patterntransform: 'patternTransform', - patternunits: 'patternUnits', - pointerevents: 'pointerEvents', - 'pointer-events': 'pointerEvents', - points: 'points', - pointsatx: 'pointsAtX', - pointsaty: 'pointsAtY', - pointsatz: 'pointsAtZ', - prefix: 'prefix', - preservealpha: 'preserveAlpha', - preserveaspectratio: 'preserveAspectRatio', - primitiveunits: 'primitiveUnits', - property: 'property', - r: 'r', - radius: 'radius', - refx: 'refX', - refy: 'refY', - renderingintent: 'renderingIntent', - 'rendering-intent': 'renderingIntent', - repeatcount: 'repeatCount', - repeatdur: 'repeatDur', - requiredextensions: 'requiredExtensions', - requiredfeatures: 'requiredFeatures', - resource: 'resource', - restart: 'restart', - result: 'result', - results: 'results', - rotate: 'rotate', - rx: 'rx', - ry: 'ry', - scale: 'scale', - security: 'security', - seed: 'seed', - shaperendering: 'shapeRendering', - 'shape-rendering': 'shapeRendering', - slope: 'slope', - spacing: 'spacing', - specularconstant: 'specularConstant', - specularexponent: 'specularExponent', - speed: 'speed', - spreadmethod: 'spreadMethod', - startoffset: 'startOffset', - stddeviation: 'stdDeviation', - stemh: 'stemh', - stemv: 'stemv', - stitchtiles: 'stitchTiles', - stopcolor: 'stopColor', - 'stop-color': 'stopColor', - stopopacity: 'stopOpacity', - 'stop-opacity': 'stopOpacity', - strikethroughposition: 'strikethroughPosition', - 'strikethrough-position': 'strikethroughPosition', - strikethroughthickness: 'strikethroughThickness', - 'strikethrough-thickness': 'strikethroughThickness', - string: 'string', - stroke: 'stroke', - strokedasharray: 'strokeDasharray', - 'stroke-dasharray': 'strokeDasharray', - strokedashoffset: 'strokeDashoffset', - 'stroke-dashoffset': 'strokeDashoffset', - strokelinecap: 'strokeLinecap', - 'stroke-linecap': 'strokeLinecap', - strokelinejoin: 'strokeLinejoin', - 'stroke-linejoin': 'strokeLinejoin', - strokemiterlimit: 'strokeMiterlimit', - 'stroke-miterlimit': 'strokeMiterlimit', - strokewidth: 'strokeWidth', - 'stroke-width': 'strokeWidth', - strokeopacity: 'strokeOpacity', - 'stroke-opacity': 'strokeOpacity', - suppresscontenteditablewarning: 'suppressContentEditableWarning', - suppresshydrationwarning: 'suppressHydrationWarning', - surfacescale: 'surfaceScale', - systemlanguage: 'systemLanguage', - tablevalues: 'tableValues', - targetx: 'targetX', - targety: 'targetY', - textanchor: 'textAnchor', - 'text-anchor': 'textAnchor', - textdecoration: 'textDecoration', - 'text-decoration': 'textDecoration', - textlength: 'textLength', - textrendering: 'textRendering', - 'text-rendering': 'textRendering', - to: 'to', - transform: 'transform', - typeof: 'typeof', - u1: 'u1', - u2: 'u2', - underlineposition: 'underlinePosition', - 'underline-position': 'underlinePosition', - underlinethickness: 'underlineThickness', - 'underline-thickness': 'underlineThickness', - unicode: 'unicode', - unicodebidi: 'unicodeBidi', - 'unicode-bidi': 'unicodeBidi', - unicoderange: 'unicodeRange', - 'unicode-range': 'unicodeRange', - unitsperem: 'unitsPerEm', - 'units-per-em': 'unitsPerEm', - unselectable: 'unselectable', - valphabetic: 'vAlphabetic', - 'v-alphabetic': 'vAlphabetic', - values: 'values', - vectoreffect: 'vectorEffect', - 'vector-effect': 'vectorEffect', - version: 'version', - vertadvy: 'vertAdvY', - 'vert-adv-y': 'vertAdvY', - vertoriginx: 'vertOriginX', - 'vert-origin-x': 'vertOriginX', - vertoriginy: 'vertOriginY', - 'vert-origin-y': 'vertOriginY', - vhanging: 'vHanging', - 'v-hanging': 'vHanging', - videographic: 'vIdeographic', - 'v-ideographic': 'vIdeographic', - viewbox: 'viewBox', - viewtarget: 'viewTarget', - visibility: 'visibility', - vmathematical: 'vMathematical', - 'v-mathematical': 'vMathematical', - vocab: 'vocab', - widths: 'widths', - wordspacing: 'wordSpacing', - 'word-spacing': 'wordSpacing', - writingmode: 'writingMode', - 'writing-mode': 'writingMode', - x1: 'x1', - x2: 'x2', - x: 'x', - xchannelselector: 'xChannelSelector', - xheight: 'xHeight', - 'x-height': 'xHeight', - xlinkactuate: 'xlinkActuate', - 'xlink:actuate': 'xlinkActuate', - xlinkarcrole: 'xlinkArcrole', - 'xlink:arcrole': 'xlinkArcrole', - xlinkhref: 'xlinkHref', - 'xlink:href': 'xlinkHref', - xlinkrole: 'xlinkRole', - 'xlink:role': 'xlinkRole', - xlinkshow: 'xlinkShow', - 'xlink:show': 'xlinkShow', - xlinktitle: 'xlinkTitle', - 'xlink:title': 'xlinkTitle', - xlinktype: 'xlinkType', - 'xlink:type': 'xlinkType', - xmlbase: 'xmlBase', - 'xml:base': 'xmlBase', - xmllang: 'xmlLang', - 'xml:lang': 'xmlLang', - xmlns: 'xmlns', - 'xml:space': 'xmlSpace', - xmlnsxlink: 'xmlnsXlink', - 'xmlns:xlink': 'xmlnsXlink', - xmlspace: 'xmlSpace', - y1: 'y1', - y2: 'y2', - y: 'y', - ychannelselector: 'yChannelSelector', - z: 'z', - zoomandpan: 'zoomAndPan' - }; - - var ariaProperties = { - 'aria-current': 0, - // state - 'aria-details': 0, - 'aria-disabled': 0, - // state - 'aria-hidden': 0, - // state - 'aria-invalid': 0, - // state - 'aria-keyshortcuts': 0, - 'aria-label': 0, - 'aria-roledescription': 0, - // Widget Attributes - 'aria-autocomplete': 0, - 'aria-checked': 0, - 'aria-expanded': 0, - 'aria-haspopup': 0, - 'aria-level': 0, - 'aria-modal': 0, - 'aria-multiline': 0, - 'aria-multiselectable': 0, - 'aria-orientation': 0, - 'aria-placeholder': 0, - 'aria-pressed': 0, - 'aria-readonly': 0, - 'aria-required': 0, - 'aria-selected': 0, - 'aria-sort': 0, - 'aria-valuemax': 0, - 'aria-valuemin': 0, - 'aria-valuenow': 0, - 'aria-valuetext': 0, - // Live Region Attributes - 'aria-atomic': 0, - 'aria-busy': 0, - 'aria-live': 0, - 'aria-relevant': 0, - // Drag-and-Drop Attributes - 'aria-dropeffect': 0, - 'aria-grabbed': 0, - // Relationship Attributes - 'aria-activedescendant': 0, - 'aria-colcount': 0, - 'aria-colindex': 0, - 'aria-colspan': 0, - 'aria-controls': 0, - 'aria-describedby': 0, - 'aria-errormessage': 0, - 'aria-flowto': 0, - 'aria-labelledby': 0, - 'aria-owns': 0, - 'aria-posinset': 0, - 'aria-rowcount': 0, - 'aria-rowindex': 0, - 'aria-rowspan': 0, - 'aria-setsize': 0 - }; - - var warnedProperties = {}; - var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); - var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); - var hasOwnProperty$1 = Object.prototype.hasOwnProperty; - - function validateProperty(tagName, name) { - { - if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) { - return true; - } - - if (rARIACamel.test(name)) { - var ariaName = 'aria-' + name.slice(4).toLowerCase(); - var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM - // DOM properties, then it is an invalid aria-* attribute. - - if (correctName == null) { - error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name); - - warnedProperties[name] = true; - return true; - } // aria-* attributes should be lowercase; suggest the lowercase version. - - - if (name !== correctName) { - error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName); - - warnedProperties[name] = true; - return true; - } - } - - if (rARIA.test(name)) { - var lowerCasedName = name.toLowerCase(); - var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM - // DOM properties, then it is an invalid aria-* attribute. - - if (standardName == null) { - warnedProperties[name] = true; - return false; - } // aria-* attributes should be lowercase; suggest the lowercase version. - - - if (name !== standardName) { - error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName); - - warnedProperties[name] = true; - return true; - } - } - } - - return true; - } - - function warnInvalidARIAProps(type, props) { - { - var invalidProps = []; - - for (var key in props) { - var isValid = validateProperty(type, key); - - if (!isValid) { - invalidProps.push(key); - } - } - - var unknownPropString = invalidProps.map(function (prop) { - return '`' + prop + '`'; - }).join(', '); - - if (invalidProps.length === 1) { - error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); - } else if (invalidProps.length > 1) { - error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type); - } - } - } - - function validateProperties(type, props) { - if (isCustomComponent(type, props)) { - return; - } - - warnInvalidARIAProps(type, props); - } - - var didWarnValueNull = false; - function validateProperties$1(type, props) { - { - if (type !== 'input' && type !== 'textarea' && type !== 'select') { - return; - } - - if (props != null && props.value === null && !didWarnValueNull) { - didWarnValueNull = true; - - if (type === 'select' && props.multiple) { - error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type); - } else { - error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type); - } - } - } - } - - var validateProperty$1 = function () {}; - - { - var warnedProperties$1 = {}; - var _hasOwnProperty = Object.prototype.hasOwnProperty; - var EVENT_NAME_REGEX = /^on./; - var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/; - var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'); - var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$'); - - validateProperty$1 = function (tagName, name, value, eventRegistry) { - if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) { - return true; - } - - var lowerCasedName = name.toLowerCase(); - - if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') { - error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.'); - - warnedProperties$1[name] = true; - return true; - } // We can't rely on the event system being injected on the server. - - - if (eventRegistry != null) { - var registrationNameDependencies = eventRegistry.registrationNameDependencies, - possibleRegistrationNames = eventRegistry.possibleRegistrationNames; - - if (registrationNameDependencies.hasOwnProperty(name)) { - return true; - } - - var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null; - - if (registrationName != null) { - error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName); - - warnedProperties$1[name] = true; - return true; - } - - if (EVENT_NAME_REGEX.test(name)) { - error('Unknown event handler property `%s`. It will be ignored.', name); - - warnedProperties$1[name] = true; - return true; - } - } else if (EVENT_NAME_REGEX.test(name)) { - // If no event plugins have been injected, we are in a server environment. - // So we can't tell if the event name is correct for sure, but we can filter - // out known bad ones like `onclick`. We can't suggest a specific replacement though. - if (INVALID_EVENT_NAME_REGEX.test(name)) { - error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name); - } - - warnedProperties$1[name] = true; - return true; - } // Let the ARIA attribute hook validate ARIA attributes - - - if (rARIA$1.test(name) || rARIACamel$1.test(name)) { - return true; - } - - if (lowerCasedName === 'innerhtml') { - error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.'); - - warnedProperties$1[name] = true; - return true; - } - - if (lowerCasedName === 'aria') { - error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.'); - - warnedProperties$1[name] = true; - return true; - } - - if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') { - error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value); - - warnedProperties$1[name] = true; - return true; - } - - if (typeof value === 'number' && isNaN(value)) { - error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name); - - warnedProperties$1[name] = true; - return true; - } - - var propertyInfo = getPropertyInfo(name); - var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config. - - if (possibleStandardNames.hasOwnProperty(lowerCasedName)) { - var standardName = possibleStandardNames[lowerCasedName]; - - if (standardName !== name) { - error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName); - - warnedProperties$1[name] = true; - return true; - } - } else if (!isReserved && name !== lowerCasedName) { - // Unknown attributes should have lowercase casing since that's how they - // will be cased anyway with server rendering. - error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName); - - warnedProperties$1[name] = true; - return true; - } - - if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { - if (value) { - error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name); - } else { - error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name); - } - - warnedProperties$1[name] = true; - return true; - } // Now that we've validated casing, do not validate - // data types for reserved props - - - if (isReserved) { - return true; - } // Warn when a known attribute is a bad type - - - if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) { - warnedProperties$1[name] = true; - return false; - } // Warn when passing the strings 'false' or 'true' into a boolean prop - - - if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) { - error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value); - - warnedProperties$1[name] = true; - return true; - } - - return true; - }; - } - - var warnUnknownProperties = function (type, props, eventRegistry) { - { - var unknownProps = []; - - for (var key in props) { - var isValid = validateProperty$1(type, key, props[key], eventRegistry); - - if (!isValid) { - unknownProps.push(key); - } - } - - var unknownPropString = unknownProps.map(function (prop) { - return '`' + prop + '`'; - }).join(', '); - - if (unknownProps.length === 1) { - error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); - } else if (unknownProps.length > 1) { - error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type); - } - } - }; - - function validateProperties$2(type, props, eventRegistry) { - if (isCustomComponent(type, props)) { - return; - } - - warnUnknownProperties(type, props, eventRegistry); - } - - var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1; - var IS_NON_DELEGATED = 1 << 1; - var IS_CAPTURE_PHASE = 1 << 2; - var IS_REPLAYED = 1 << 4; - // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when - // we call willDeferLaterForLegacyFBSupport, thus not bailing out - // will result in endless cycles like an infinite loop. - // We also don't want to defer during event replaying. - - var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE; - - /** - * Gets the target node from a native browser event by accounting for - * inconsistencies in browser DOM APIs. - * - * @param {object} nativeEvent Native browser event. - * @return {DOMEventTarget} Target node. - */ - - function getEventTarget(nativeEvent) { - // Fallback to nativeEvent.srcElement for IE9 - // https://github.com/facebook/react/issues/12506 - var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963 - - if (target.correspondingUseElement) { - target = target.correspondingUseElement; - } // Safari may fire events on text nodes (Node.TEXT_NODE is 3). - // @see http://www.quirksmode.org/js/events_properties.html - - - return target.nodeType === TEXT_NODE ? target.parentNode : target; - } - - var restoreImpl = null; - var restoreTarget = null; - var restoreQueue = null; - - function restoreStateOfTarget(target) { - // We perform this translation at the end of the event loop so that we - // always receive the correct fiber here - var internalInstance = getInstanceFromNode(target); - - if (!internalInstance) { - // Unmounted - return; - } - - if (!(typeof restoreImpl === 'function')) { - { - throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted. - - if (stateNode) { - var _props = getFiberCurrentPropsFromNode(stateNode); - - restoreImpl(internalInstance.stateNode, internalInstance.type, _props); - } - } - - function setRestoreImplementation(impl) { - restoreImpl = impl; - } - function enqueueStateRestore(target) { - if (restoreTarget) { - if (restoreQueue) { - restoreQueue.push(target); - } else { - restoreQueue = [target]; - } - } else { - restoreTarget = target; - } - } - function needsStateRestore() { - return restoreTarget !== null || restoreQueue !== null; - } - function restoreStateIfNeeded() { - if (!restoreTarget) { - return; - } - - var target = restoreTarget; - var queuedTargets = restoreQueue; - restoreTarget = null; - restoreQueue = null; - restoreStateOfTarget(target); - - if (queuedTargets) { - for (var i = 0; i < queuedTargets.length; i++) { - restoreStateOfTarget(queuedTargets[i]); - } - } - } - - // the renderer. Such as when we're dispatching events or if third party - // libraries need to call batchedUpdates. Eventually, this API will go away when - // everything is batched by default. We'll then have a similar API to opt-out of - // scheduled work and instead do synchronous work. - // Defaults - - var batchedUpdatesImpl = function (fn, bookkeeping) { - return fn(bookkeeping); - }; - - var discreteUpdatesImpl = function (fn, a, b, c, d) { - return fn(a, b, c, d); - }; - - var flushDiscreteUpdatesImpl = function () {}; - - var batchedEventUpdatesImpl = batchedUpdatesImpl; - var isInsideEventHandler = false; - var isBatchingEventUpdates = false; - - function finishEventHandler() { - // Here we wait until all updates have propagated, which is important - // when using controlled components within layers: - // https://github.com/facebook/react/issues/1698 - // Then we restore state of any controlled component. - var controlledComponentsHavePendingUpdates = needsStateRestore(); - - if (controlledComponentsHavePendingUpdates) { - // If a controlled event was fired, we may need to restore the state of - // the DOM node back to the controlled value. This is necessary when React - // bails out of the update without touching the DOM. - flushDiscreteUpdatesImpl(); - restoreStateIfNeeded(); - } - } - - function batchedUpdates(fn, bookkeeping) { - if (isInsideEventHandler) { - // If we are currently inside another batch, we need to wait until it - // fully completes before restoring state. - return fn(bookkeeping); - } - - isInsideEventHandler = true; - - try { - return batchedUpdatesImpl(fn, bookkeeping); - } finally { - isInsideEventHandler = false; - finishEventHandler(); - } - } - function batchedEventUpdates(fn, a, b) { - if (isBatchingEventUpdates) { - // If we are currently inside another batch, we need to wait until it - // fully completes before restoring state. - return fn(a, b); - } - - isBatchingEventUpdates = true; - - try { - return batchedEventUpdatesImpl(fn, a, b); - } finally { - isBatchingEventUpdates = false; - finishEventHandler(); - } - } - function discreteUpdates(fn, a, b, c, d) { - var prevIsInsideEventHandler = isInsideEventHandler; - isInsideEventHandler = true; - - try { - return discreteUpdatesImpl(fn, a, b, c, d); - } finally { - isInsideEventHandler = prevIsInsideEventHandler; - - if (!isInsideEventHandler) { - finishEventHandler(); - } - } - } - function flushDiscreteUpdatesIfNeeded(timeStamp) { - { - if (!isInsideEventHandler) { - flushDiscreteUpdatesImpl(); - } - } - } - function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) { - batchedUpdatesImpl = _batchedUpdatesImpl; - discreteUpdatesImpl = _discreteUpdatesImpl; - flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl; - batchedEventUpdatesImpl = _batchedEventUpdatesImpl; - } - - function isInteractive(tag) { - return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; - } - - function shouldPreventMouseEvent(name, type, props) { - switch (name) { - case 'onClick': - case 'onClickCapture': - case 'onDoubleClick': - case 'onDoubleClickCapture': - case 'onMouseDown': - case 'onMouseDownCapture': - case 'onMouseMove': - case 'onMouseMoveCapture': - case 'onMouseUp': - case 'onMouseUpCapture': - case 'onMouseEnter': - return !!(props.disabled && isInteractive(type)); - - default: - return false; - } - } - /** - * @param {object} inst The instance, which is the source of events. - * @param {string} registrationName Name of listener (e.g. `onClick`). - * @return {?function} The stored callback. - */ - - - function getListener(inst, registrationName) { - var stateNode = inst.stateNode; - - if (stateNode === null) { - // Work in progress (ex: onload events in incremental mode). - return null; - } - - var props = getFiberCurrentPropsFromNode(stateNode); - - if (props === null) { - // Work in progress. - return null; - } - - var listener = props[registrationName]; - - if (shouldPreventMouseEvent(registrationName, inst.type, props)) { - return null; - } - - if (!(!listener || typeof listener === 'function')) { - { - throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." ); - } - } - - return listener; - } - - var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners - // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support - - if (canUseDOM) { - try { - var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value - - Object.defineProperty(options, 'passive', { - get: function () { - passiveBrowserEventsSupported = true; - } - }); - window.addEventListener('test', options, options); - window.removeEventListener('test', options, options); - } catch (e) { - passiveBrowserEventsSupported = false; - } - } - - function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) { - var funcArgs = Array.prototype.slice.call(arguments, 3); - - try { - func.apply(context, funcArgs); - } catch (error) { - this.onError(error); - } - } - - var invokeGuardedCallbackImpl = invokeGuardedCallbackProd; - - { - // In DEV mode, we swap out invokeGuardedCallback for a special version - // that plays more nicely with the browser's DevTools. The idea is to preserve - // "Pause on exceptions" behavior. Because React wraps all user-provided - // functions in invokeGuardedCallback, and the production version of - // invokeGuardedCallback uses a try-catch, all user exceptions are treated - // like caught exceptions, and the DevTools won't pause unless the developer - // takes the extra step of enabling pause on caught exceptions. This is - // unintuitive, though, because even though React has caught the error, from - // the developer's perspective, the error is uncaught. - // - // To preserve the expected "Pause on exceptions" behavior, we don't use a - // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake - // DOM node, and call the user-provided callback from inside an event handler - // for that fake event. If the callback throws, the error is "captured" using - // a global event handler. But because the error happens in a different - // event loop context, it does not interrupt the normal program flow. - // Effectively, this gives us try-catch behavior without actually using - // try-catch. Neat! - // Check that the browser supports the APIs we need to implement our special - // DEV version of invokeGuardedCallback - if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { - var fakeNode = document.createElement('react'); - - invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) { - // If document doesn't exist we know for sure we will crash in this method - // when we call document.createEvent(). However this can cause confusing - // errors: https://github.com/facebookincubator/create-react-app/issues/3482 - // So we preemptively throw with a better message instead. - if (!(typeof document !== 'undefined')) { - { - throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." ); - } - } - - var evt = document.createEvent('Event'); - var didCall = false; // Keeps track of whether the user-provided callback threw an error. We - // set this to true at the beginning, then set it to false right after - // calling the function. If the function errors, `didError` will never be - // set to false. This strategy works even if the browser is flaky and - // fails to call our global error handler, because it doesn't rely on - // the error event at all. - - var didError = true; // Keeps track of the value of window.event so that we can reset it - // during the callback to let user code access window.event in the - // browsers that support it. - - var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event - // dispatching: https://github.com/facebook/react/issues/13688 - - var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); - - function restoreAfterDispatch() { - // We immediately remove the callback from event listeners so that - // nested `invokeGuardedCallback` calls do not clash. Otherwise, a - // nested call would trigger the fake event handlers of any call higher - // in the stack. - fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the - // window.event assignment in both IE <= 10 as they throw an error - // "Member not found" in strict mode, and in Firefox which does not - // support window.event. - - if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) { - window.event = windowEvent; - } - } // Create an event handler for our fake event. We will synchronously - // dispatch our fake event using `dispatchEvent`. Inside the handler, we - // call the user-provided callback. - - - var funcArgs = Array.prototype.slice.call(arguments, 3); - - function callCallback() { - didCall = true; - restoreAfterDispatch(); - func.apply(context, funcArgs); - didError = false; - } // Create a global error event handler. We use this to capture the value - // that was thrown. It's possible that this error handler will fire more - // than once; for example, if non-React code also calls `dispatchEvent` - // and a handler for that event throws. We should be resilient to most of - // those cases. Even if our error event handler fires more than once, the - // last error event is always used. If the callback actually does error, - // we know that the last error event is the correct one, because it's not - // possible for anything else to have happened in between our callback - // erroring and the code that follows the `dispatchEvent` call below. If - // the callback doesn't error, but the error event was fired, we know to - // ignore it because `didError` will be false, as described above. - - - var error; // Use this to track whether the error event is ever called. - - var didSetError = false; - var isCrossOriginError = false; - - function handleWindowError(event) { - error = event.error; - didSetError = true; - - if (error === null && event.colno === 0 && event.lineno === 0) { - isCrossOriginError = true; - } - - if (event.defaultPrevented) { - // Some other error handler has prevented default. - // Browsers silence the error report if this happens. - // We'll remember this to later decide whether to log it or not. - if (error != null && typeof error === 'object') { - try { - error._suppressLogging = true; - } catch (inner) {// Ignore. - } - } - } - } // Create a fake event type. - - - var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers - - window.addEventListener('error', handleWindowError); - fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function - // errors, it will trigger our global error handler. - - evt.initEvent(evtType, false, false); - fakeNode.dispatchEvent(evt); - - if (windowEventDescriptor) { - Object.defineProperty(window, 'event', windowEventDescriptor); - } - - if (didCall && didError) { - if (!didSetError) { - // The callback errored, but the error event never fired. - error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.'); - } else if (isCrossOriginError) { - error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.'); - } - - this.onError(error); - } // Remove our event listeners - - - window.removeEventListener('error', handleWindowError); - - if (!didCall) { - // Something went really wrong, and our event was not dispatched. - // https://github.com/facebook/react/issues/16734 - // https://github.com/facebook/react/issues/16585 - // Fall back to the production implementation. - restoreAfterDispatch(); - return invokeGuardedCallbackProd.apply(this, arguments); - } - }; - } - } - - var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl; - - var hasError = false; - var caughtError = null; // Used by event system to capture/rethrow the first error. - - var hasRethrowError = false; - var rethrowError = null; - var reporter = { - onError: function (error) { - hasError = true; - caughtError = error; - } - }; - /** - * Call a function while guarding against errors that happens within it. - * Returns an error if it throws, otherwise null. - * - * In production, this is implemented using a try-catch. The reason we don't - * use a try-catch directly is so that we can swap out a different - * implementation in DEV mode. - * - * @param {String} name of the guard to use for logging or debugging - * @param {Function} func The function to invoke - * @param {*} context The context to use when calling the function - * @param {...*} args Arguments for function - */ - - function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) { - hasError = false; - caughtError = null; - invokeGuardedCallbackImpl$1.apply(reporter, arguments); - } - /** - * Same as invokeGuardedCallback, but instead of returning an error, it stores - * it in a global so it can be rethrown by `rethrowCaughtError` later. - * TODO: See if caughtError and rethrowError can be unified. - * - * @param {String} name of the guard to use for logging or debugging - * @param {Function} func The function to invoke - * @param {*} context The context to use when calling the function - * @param {...*} args Arguments for function - */ - - function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) { - invokeGuardedCallback.apply(this, arguments); - - if (hasError) { - var error = clearCaughtError(); - - if (!hasRethrowError) { - hasRethrowError = true; - rethrowError = error; - } - } - } - /** - * During execution of guarded functions we will capture the first error which - * we will rethrow to be handled by the top level error handler. - */ - - function rethrowCaughtError() { - if (hasRethrowError) { - var error = rethrowError; - hasRethrowError = false; - rethrowError = null; - throw error; - } - } - function hasCaughtError() { - return hasError; - } - function clearCaughtError() { - if (hasError) { - var error = caughtError; - hasError = false; - caughtError = null; - return error; - } else { - { - { - throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - } - - var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - var _ReactInternals$Sched = ReactInternals$1.Scheduler, - unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback, - unstable_now = _ReactInternals$Sched.unstable_now, - unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback, - unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield, - unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint, - unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode, - unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority, - unstable_next = _ReactInternals$Sched.unstable_next, - unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution, - unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution, - unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel, - unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority, - unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority, - unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority, - unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority, - unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority, - unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate, - unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting; - - /** - * `ReactInstanceMap` maintains a mapping from a public facing stateful - * instance (key) and the internal representation (value). This allows public - * methods to accept the user facing instance as an argument and map them back - * to internal methods. - * - * Note that this module is currently shared and assumed to be stateless. - * If this becomes an actual Map, that will break. - */ - function get(key) { - return key._reactInternals; - } - function has(key) { - return key._reactInternals !== undefined; - } - function set(key, value) { - key._reactInternals = value; - } - - // Don't change these two values. They're used by React Dev Tools. - var NoFlags = - /* */ - 0; - var PerformedWork = - /* */ - 1; // You can change the rest (and add more). - - var Placement = - /* */ - 2; - var Update = - /* */ - 4; - var PlacementAndUpdate = - /* */ - 6; - var Deletion = - /* */ - 8; - var ContentReset = - /* */ - 16; - var Callback = - /* */ - 32; - var DidCapture = - /* */ - 64; - var Ref = - /* */ - 128; - var Snapshot = - /* */ - 256; - var Passive = - /* */ - 512; // TODO (effects) Remove this bit once the new reconciler is synced to the old. - - var PassiveUnmountPendingDev = - /* */ - 8192; - var Hydrating = - /* */ - 1024; - var HydratingAndUpdate = - /* */ - 1028; // Passive & Update & Callback & Ref & Snapshot - - var LifecycleEffectMask = - /* */ - 932; // Union of all host effects - - var HostEffectMask = - /* */ - 2047; // These are not really side effects, but we still reuse this field. - - var Incomplete = - /* */ - 2048; - var ShouldCapture = - /* */ - 4096; - var ForceUpdateForLegacySuspense = - /* */ - 16384; // Static tags describe aspects of a fiber that are not specific to a render, - - var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; - function getNearestMountedFiber(fiber) { - var node = fiber; - var nearestMounted = fiber; - - if (!fiber.alternate) { - // If there is no alternate, this might be a new tree that isn't inserted - // yet. If it is, then it will have a pending insertion effect on it. - var nextNode = node; - - do { - node = nextNode; - - if ((node.flags & (Placement | Hydrating)) !== NoFlags) { - // This is an insertion or in-progress hydration. The nearest possible - // mounted fiber is the parent but we need to continue to figure out - // if that one is still mounted. - nearestMounted = node.return; - } - - nextNode = node.return; - } while (nextNode); - } else { - while (node.return) { - node = node.return; - } - } - - if (node.tag === HostRoot) { - // TODO: Check if this was a nested HostRoot when used with - // renderContainerIntoSubtree. - return nearestMounted; - } // If we didn't hit the root, that means that we're in an disconnected tree - // that has been unmounted. - - - return null; - } - function getSuspenseInstanceFromFiber(fiber) { - if (fiber.tag === SuspenseComponent) { - var suspenseState = fiber.memoizedState; - - if (suspenseState === null) { - var current = fiber.alternate; - - if (current !== null) { - suspenseState = current.memoizedState; - } - } - - if (suspenseState !== null) { - return suspenseState.dehydrated; - } - } - - return null; - } - function getContainerFromFiber(fiber) { - return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null; - } - function isFiberMounted(fiber) { - return getNearestMountedFiber(fiber) === fiber; - } - function isMounted(component) { - { - var owner = ReactCurrentOwner.current; - - if (owner !== null && owner.tag === ClassComponent) { - var ownerFiber = owner; - var instance = ownerFiber.stateNode; - - if (!instance._warnedAboutRefsInRender) { - error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component'); - } - - instance._warnedAboutRefsInRender = true; - } - } - - var fiber = get(component); - - if (!fiber) { - return false; - } - - return getNearestMountedFiber(fiber) === fiber; - } - - function assertIsMounted(fiber) { - if (!(getNearestMountedFiber(fiber) === fiber)) { - { - throw Error( "Unable to find node on an unmounted component." ); - } - } - } - - function findCurrentFiberUsingSlowPath(fiber) { - var alternate = fiber.alternate; - - if (!alternate) { - // If there is no alternate, then we only need to check if it is mounted. - var nearestMounted = getNearestMountedFiber(fiber); - - if (!(nearestMounted !== null)) { - { - throw Error( "Unable to find node on an unmounted component." ); - } - } - - if (nearestMounted !== fiber) { - return null; - } - - return fiber; - } // If we have two possible branches, we'll walk backwards up to the root - // to see what path the root points to. On the way we may hit one of the - // special cases and we'll deal with them. - - - var a = fiber; - var b = alternate; - - while (true) { - var parentA = a.return; - - if (parentA === null) { - // We're at the root. - break; - } - - var parentB = parentA.alternate; - - if (parentB === null) { - // There is no alternate. This is an unusual case. Currently, it only - // happens when a Suspense component is hidden. An extra fragment fiber - // is inserted in between the Suspense fiber and its children. Skip - // over this extra fragment fiber and proceed to the next parent. - var nextParent = parentA.return; - - if (nextParent !== null) { - a = b = nextParent; - continue; - } // If there's no parent, we're at the root. - - - break; - } // If both copies of the parent fiber point to the same child, we can - // assume that the child is current. This happens when we bailout on low - // priority: the bailed out fiber's child reuses the current child. - - - if (parentA.child === parentB.child) { - var child = parentA.child; - - while (child) { - if (child === a) { - // We've determined that A is the current branch. - assertIsMounted(parentA); - return fiber; - } - - if (child === b) { - // We've determined that B is the current branch. - assertIsMounted(parentA); - return alternate; - } - - child = child.sibling; - } // We should never have an alternate for any mounting node. So the only - // way this could possibly happen is if this was unmounted, if at all. - - - { - { - throw Error( "Unable to find node on an unmounted component." ); - } - } - } - - if (a.return !== b.return) { - // The return pointer of A and the return pointer of B point to different - // fibers. We assume that return pointers never criss-cross, so A must - // belong to the child set of A.return, and B must belong to the child - // set of B.return. - a = parentA; - b = parentB; - } else { - // The return pointers point to the same fiber. We'll have to use the - // default, slow path: scan the child sets of each parent alternate to see - // which child belongs to which set. - // - // Search parent A's child set - var didFindChild = false; - var _child = parentA.child; - - while (_child) { - if (_child === a) { - didFindChild = true; - a = parentA; - b = parentB; - break; - } - - if (_child === b) { - didFindChild = true; - b = parentA; - a = parentB; - break; - } - - _child = _child.sibling; - } - - if (!didFindChild) { - // Search parent B's child set - _child = parentB.child; - - while (_child) { - if (_child === a) { - didFindChild = true; - a = parentB; - b = parentA; - break; - } - - if (_child === b) { - didFindChild = true; - b = parentB; - a = parentA; - break; - } - - _child = _child.sibling; - } - - if (!didFindChild) { - { - throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." ); - } - } - } - } - - if (!(a.alternate === b)) { - { - throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } // If the root is not a host container, we're in a disconnected tree. I.e. - // unmounted. - - - if (!(a.tag === HostRoot)) { - { - throw Error( "Unable to find node on an unmounted component." ); - } - } - - if (a.stateNode.current === a) { - // We've determined that A is the current branch. - return fiber; - } // Otherwise B has to be current branch. - - - return alternate; - } - function findCurrentHostFiber(parent) { - var currentParent = findCurrentFiberUsingSlowPath(parent); - - if (!currentParent) { - return null; - } // Next we'll drill down this component to find the first HostComponent/Text. - - - var node = currentParent; - - while (true) { - if (node.tag === HostComponent || node.tag === HostText) { - return node; - } else if (node.child) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === currentParent) { - return null; - } - - while (!node.sibling) { - if (!node.return || node.return === currentParent) { - return null; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } // Flow needs the return null here, but ESLint complains about it. - // eslint-disable-next-line no-unreachable - - - return null; - } - function findCurrentHostFiberWithNoPortals(parent) { - var currentParent = findCurrentFiberUsingSlowPath(parent); - - if (!currentParent) { - return null; - } // Next we'll drill down this component to find the first HostComponent/Text. - - - var node = currentParent; - - while (true) { - if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) { - return node; - } else if (node.child && node.tag !== HostPortal) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === currentParent) { - return null; - } - - while (!node.sibling) { - if (!node.return || node.return === currentParent) { - return null; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } // Flow needs the return null here, but ESLint complains about it. - // eslint-disable-next-line no-unreachable - - - return null; - } - function doesFiberContain(parentFiber, childFiber) { - var node = childFiber; - var parentFiberAlternate = parentFiber.alternate; - - while (node !== null) { - if (node === parentFiber || node === parentFiberAlternate) { - return true; - } - - node = node.return; - } - - return false; - } - - var attemptUserBlockingHydration; - function setAttemptUserBlockingHydration(fn) { - attemptUserBlockingHydration = fn; - } - var attemptContinuousHydration; - function setAttemptContinuousHydration(fn) { - attemptContinuousHydration = fn; - } - var attemptHydrationAtCurrentPriority; - function setAttemptHydrationAtCurrentPriority(fn) { - attemptHydrationAtCurrentPriority = fn; - } - var attemptHydrationAtPriority; - function setAttemptHydrationAtPriority(fn) { - attemptHydrationAtPriority = fn; - } // TODO: Upgrade this definition once we're on a newer version of Flow that - var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed. - - var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout. - // if the last target was dehydrated. - - var queuedFocus = null; - var queuedDrag = null; - var queuedMouse = null; // For pointer events there can be one latest event per pointerId. - - var queuedPointers = new Map(); - var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too. - - var queuedExplicitHydrationTargets = []; - function hasQueuedDiscreteEvents() { - return queuedDiscreteEvents.length > 0; - } - var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase - 'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit']; - function isReplayableDiscreteEvent(eventType) { - return discreteReplayableEvents.indexOf(eventType) > -1; - } - - function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) { - return { - blockedOn: blockedOn, - domEventName: domEventName, - eventSystemFlags: eventSystemFlags | IS_REPLAYED, - nativeEvent: nativeEvent, - targetContainers: [targetContainer] - }; - } - - function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) { - var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent); - queuedDiscreteEvents.push(queuedEvent); - } // Resets the replaying for this type of continuous event to no event. - - function clearIfContinuousEvent(domEventName, nativeEvent) { - switch (domEventName) { - case 'focusin': - case 'focusout': - queuedFocus = null; - break; - - case 'dragenter': - case 'dragleave': - queuedDrag = null; - break; - - case 'mouseover': - case 'mouseout': - queuedMouse = null; - break; - - case 'pointerover': - case 'pointerout': - { - var pointerId = nativeEvent.pointerId; - queuedPointers.delete(pointerId); - break; - } - - case 'gotpointercapture': - case 'lostpointercapture': - { - var _pointerId = nativeEvent.pointerId; - queuedPointerCaptures.delete(_pointerId); - break; - } - } - } - - function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) { - if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) { - var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent); - - if (blockedOn !== null) { - var _fiber2 = getInstanceFromNode(blockedOn); - - if (_fiber2 !== null) { - // Attempt to increase the priority of this target. - attemptContinuousHydration(_fiber2); - } - } - - return queuedEvent; - } // If we have already queued this exact event, then it's because - // the different event systems have different DOM event listeners. - // We can accumulate the flags, and the targetContainers, and - // store a single event to be replayed. - - - existingQueuedEvent.eventSystemFlags |= eventSystemFlags; - var targetContainers = existingQueuedEvent.targetContainers; - - if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) { - targetContainers.push(targetContainer); - } - - return existingQueuedEvent; - } - - function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) { - // These set relatedTarget to null because the replayed event will be treated as if we - // moved from outside the window (no target) onto the target once it hydrates. - // Instead of mutating we could clone the event. - switch (domEventName) { - case 'focusin': - { - var focusEvent = nativeEvent; - queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent); - return true; - } - - case 'dragenter': - { - var dragEvent = nativeEvent; - queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent); - return true; - } - - case 'mouseover': - { - var mouseEvent = nativeEvent; - queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent); - return true; - } - - case 'pointerover': - { - var pointerEvent = nativeEvent; - var pointerId = pointerEvent.pointerId; - queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent)); - return true; - } - - case 'gotpointercapture': - { - var _pointerEvent = nativeEvent; - var _pointerId2 = _pointerEvent.pointerId; - queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent)); - return true; - } - } - - return false; - } // Check if this target is unblocked. Returns true if it's unblocked. - - function attemptExplicitHydrationTarget(queuedTarget) { - // TODO: This function shares a lot of logic with attemptToDispatchEvent. - // Try to unify them. It's a bit tricky since it would require two return - // values. - var targetInst = getClosestInstanceFromNode(queuedTarget.target); - - if (targetInst !== null) { - var nearestMounted = getNearestMountedFiber(targetInst); - - if (nearestMounted !== null) { - var tag = nearestMounted.tag; - - if (tag === SuspenseComponent) { - var instance = getSuspenseInstanceFromFiber(nearestMounted); - - if (instance !== null) { - // We're blocked on hydrating this boundary. - // Increase its priority. - queuedTarget.blockedOn = instance; - attemptHydrationAtPriority(queuedTarget.lanePriority, function () { - unstable_runWithPriority(queuedTarget.priority, function () { - attemptHydrationAtCurrentPriority(nearestMounted); - }); - }); - return; - } - } else if (tag === HostRoot) { - var root = nearestMounted.stateNode; - - if (root.hydrate) { - queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of - // a root other than sync. - - return; - } - } - } - } - - queuedTarget.blockedOn = null; - } - - function attemptReplayContinuousQueuedEvent(queuedEvent) { - if (queuedEvent.blockedOn !== null) { - return false; - } - - var targetContainers = queuedEvent.targetContainers; - - while (targetContainers.length > 0) { - var targetContainer = targetContainers[0]; - var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent); - - if (nextBlockedOn !== null) { - // We're still blocked. Try again later. - var _fiber3 = getInstanceFromNode(nextBlockedOn); - - if (_fiber3 !== null) { - attemptContinuousHydration(_fiber3); - } - - queuedEvent.blockedOn = nextBlockedOn; - return false; - } // This target container was successfully dispatched. Try the next. - - - targetContainers.shift(); - } - - return true; - } - - function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) { - if (attemptReplayContinuousQueuedEvent(queuedEvent)) { - map.delete(key); - } - } - - function replayUnblockedEvents() { - hasScheduledReplayAttempt = false; // First replay discrete events. - - while (queuedDiscreteEvents.length > 0) { - var nextDiscreteEvent = queuedDiscreteEvents[0]; - - if (nextDiscreteEvent.blockedOn !== null) { - // We're still blocked. - // Increase the priority of this boundary to unblock - // the next discrete event. - var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn); - - if (_fiber4 !== null) { - attemptUserBlockingHydration(_fiber4); - } - - break; - } - - var targetContainers = nextDiscreteEvent.targetContainers; - - while (targetContainers.length > 0) { - var targetContainer = targetContainers[0]; - var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent); - - if (nextBlockedOn !== null) { - // We're still blocked. Try again later. - nextDiscreteEvent.blockedOn = nextBlockedOn; - break; - } // This target container was successfully dispatched. Try the next. - - - targetContainers.shift(); - } - - if (nextDiscreteEvent.blockedOn === null) { - // We've successfully replayed the first event. Let's try the next one. - queuedDiscreteEvents.shift(); - } - } // Next replay any continuous events. - - - if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) { - queuedFocus = null; - } - - if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) { - queuedDrag = null; - } - - if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) { - queuedMouse = null; - } - - queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap); - queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap); - } - - function scheduleCallbackIfUnblocked(queuedEvent, unblocked) { - if (queuedEvent.blockedOn === unblocked) { - queuedEvent.blockedOn = null; - - if (!hasScheduledReplayAttempt) { - hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are - // now unblocked. This first might not actually be unblocked yet. - // We could check it early to avoid scheduling an unnecessary callback. - - unstable_scheduleCallback(unstable_NormalPriority, replayUnblockedEvents); - } - } - } - - function retryIfBlockedOn(unblocked) { - // Mark anything that was blocked on this as no longer blocked - // and eligible for a replay. - if (queuedDiscreteEvents.length > 0) { - scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's - // worth it because we expect very few discrete events to queue up and once - // we are actually fully unblocked it will be fast to replay them. - - for (var i = 1; i < queuedDiscreteEvents.length; i++) { - var queuedEvent = queuedDiscreteEvents[i]; - - if (queuedEvent.blockedOn === unblocked) { - queuedEvent.blockedOn = null; - } - } - } - - if (queuedFocus !== null) { - scheduleCallbackIfUnblocked(queuedFocus, unblocked); - } - - if (queuedDrag !== null) { - scheduleCallbackIfUnblocked(queuedDrag, unblocked); - } - - if (queuedMouse !== null) { - scheduleCallbackIfUnblocked(queuedMouse, unblocked); - } - - var unblock = function (queuedEvent) { - return scheduleCallbackIfUnblocked(queuedEvent, unblocked); - }; - - queuedPointers.forEach(unblock); - queuedPointerCaptures.forEach(unblock); - - for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) { - var queuedTarget = queuedExplicitHydrationTargets[_i]; - - if (queuedTarget.blockedOn === unblocked) { - queuedTarget.blockedOn = null; - } - } - - while (queuedExplicitHydrationTargets.length > 0) { - var nextExplicitTarget = queuedExplicitHydrationTargets[0]; - - if (nextExplicitTarget.blockedOn !== null) { - // We're still blocked. - break; - } else { - attemptExplicitHydrationTarget(nextExplicitTarget); - - if (nextExplicitTarget.blockedOn === null) { - // We're unblocked. - queuedExplicitHydrationTargets.shift(); - } - } - } - } - - var DiscreteEvent = 0; - var UserBlockingEvent = 1; - var ContinuousEvent = 2; - - /** - * Generate a mapping of standard vendor prefixes using the defined style property and event name. - * - * @param {string} styleProp - * @param {string} eventName - * @returns {object} - */ - - function makePrefixMap(styleProp, eventName) { - var prefixes = {}; - prefixes[styleProp.toLowerCase()] = eventName.toLowerCase(); - prefixes['Webkit' + styleProp] = 'webkit' + eventName; - prefixes['Moz' + styleProp] = 'moz' + eventName; - return prefixes; - } - /** - * A list of event names to a configurable list of vendor prefixes. - */ - - - var vendorPrefixes = { - animationend: makePrefixMap('Animation', 'AnimationEnd'), - animationiteration: makePrefixMap('Animation', 'AnimationIteration'), - animationstart: makePrefixMap('Animation', 'AnimationStart'), - transitionend: makePrefixMap('Transition', 'TransitionEnd') - }; - /** - * Event names that have already been detected and prefixed (if applicable). - */ - - var prefixedEventNames = {}; - /** - * Element to check for prefixes on. - */ - - var style = {}; - /** - * Bootstrap if a DOM exists. - */ - - if (canUseDOM) { - style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x, - // the un-prefixed "animation" and "transition" properties are defined on the - // style object but the events that fire will still be prefixed, so we need - // to check if the un-prefixed events are usable, and if not remove them from the map. - - if (!('AnimationEvent' in window)) { - delete vendorPrefixes.animationend.animation; - delete vendorPrefixes.animationiteration.animation; - delete vendorPrefixes.animationstart.animation; - } // Same as above - - - if (!('TransitionEvent' in window)) { - delete vendorPrefixes.transitionend.transition; - } - } - /** - * Attempts to determine the correct vendor prefixed event name. - * - * @param {string} eventName - * @returns {string} - */ - - - function getVendorPrefixedEventName(eventName) { - if (prefixedEventNames[eventName]) { - return prefixedEventNames[eventName]; - } else if (!vendorPrefixes[eventName]) { - return eventName; - } - - var prefixMap = vendorPrefixes[eventName]; - - for (var styleProp in prefixMap) { - if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) { - return prefixedEventNames[eventName] = prefixMap[styleProp]; - } - } - - return eventName; - } - - var ANIMATION_END = getVendorPrefixedEventName('animationend'); - var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration'); - var ANIMATION_START = getVendorPrefixedEventName('animationstart'); - var TRANSITION_END = getVendorPrefixedEventName('transitionend'); - - var topLevelEventsToReactNames = new Map(); - var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use - // the code required to apply the same logic for event prioritization and that of the - // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code - // duplication (for which there would be quite a bit). For the events that are not needed - // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an - // array of top level events. - // Lastly, we ignore prettier so we can keep the formatting sane. - // prettier-ignore - - var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful! - 'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful! - 'focusout', 'blur', // Careful! - 'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange']; - var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate']; - - - var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore - - var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting']; - /** - * Turns - * ['abort', ...] - * - * into - * - * topLevelEventsToReactNames = new Map([ - * ['abort', 'onAbort'], - * ]); - * - * and registers them. - */ - - function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) { - // As the event types are in pairs of two, we need to iterate - // through in twos. The events are in pairs of two to save code - // and improve init perf of processing this array, as it will - // result in far fewer object allocations and property accesses - // if we only use three arrays to process all the categories of - // instead of tuples. - for (var i = 0; i < eventTypes.length; i += 2) { - var topEvent = eventTypes[i]; - var event = eventTypes[i + 1]; - var capitalizedEvent = event[0].toUpperCase() + event.slice(1); - var reactName = 'on' + capitalizedEvent; - eventPriorities.set(topEvent, priority); - topLevelEventsToReactNames.set(topEvent, reactName); - registerTwoPhaseEvent(reactName, [topEvent]); - } - } - - function setEventPriorities(eventTypes, priority) { - for (var i = 0; i < eventTypes.length; i++) { - eventPriorities.set(eventTypes[i], priority); - } - } - - function getEventPriorityForPluginSystem(domEventName) { - var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might - // want to warn if we can't detect the priority - // for the event. - - return priority === undefined ? ContinuousEvent : priority; - } - function registerSimpleEvents() { - registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent); - registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent); - registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent); - setEventPriorities(otherDiscreteEvents, DiscreteEvent); - } - - var ReactInternals$2 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - var _ReactInternals$Sched$1 = ReactInternals$2.SchedulerTracing, - __interactionsRef = _ReactInternals$Sched$1.__interactionsRef, - __subscriberRef = _ReactInternals$Sched$1.__subscriberRef, - unstable_clear = _ReactInternals$Sched$1.unstable_clear, - unstable_getCurrent = _ReactInternals$Sched$1.unstable_getCurrent, - unstable_getThreadID = _ReactInternals$Sched$1.unstable_getThreadID, - unstable_subscribe = _ReactInternals$Sched$1.unstable_subscribe, - unstable_trace = _ReactInternals$Sched$1.unstable_trace, - unstable_unsubscribe = _ReactInternals$Sched$1.unstable_unsubscribe, - unstable_wrap = _ReactInternals$Sched$1.unstable_wrap; - - var Scheduler_now = unstable_now; - - { - // Provide explicit error message when production+profiling bundle of e.g. - // react-dom is used with production (non-profiling) bundle of - // scheduler/tracing - if (!(__interactionsRef != null && __interactionsRef.current != null)) { - { - throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" ); - } - } - } - // ascending numbers so we can compare them like numbers. They start at 90 to - // avoid clashing with Scheduler's priorities. - - var ImmediatePriority = 99; - var UserBlockingPriority = 98; - var NormalPriority = 97; - var LowPriority = 96; - var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only. - - var NoPriority = 90; - var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly. - - var SyncLanePriority = 15; - var SyncBatchedLanePriority = 14; - var InputDiscreteHydrationLanePriority = 13; - var InputDiscreteLanePriority = 12; - var InputContinuousHydrationLanePriority = 11; - var InputContinuousLanePriority = 10; - var DefaultHydrationLanePriority = 9; - var DefaultLanePriority = 8; - var TransitionHydrationPriority = 7; - var TransitionPriority = 6; - var RetryLanePriority = 5; - var SelectiveHydrationLanePriority = 4; - var IdleHydrationLanePriority = 3; - var IdleLanePriority = 2; - var OffscreenLanePriority = 1; - var NoLanePriority = 0; - var TotalLanes = 31; - var NoLanes = - /* */ - 0; - var NoLane = - /* */ - 0; - var SyncLane = - /* */ - 1; - var SyncBatchedLane = - /* */ - 2; - var InputDiscreteHydrationLane = - /* */ - 4; - var InputDiscreteLanes = - /* */ - 24; - var InputContinuousHydrationLane = - /* */ - 32; - var InputContinuousLanes = - /* */ - 192; - var DefaultHydrationLane = - /* */ - 256; - var DefaultLanes = - /* */ - 3584; - var TransitionHydrationLane = - /* */ - 4096; - var TransitionLanes = - /* */ - 4186112; - var RetryLanes = - /* */ - 62914560; - var SomeRetryLane = - /* */ - 33554432; - var SelectiveHydrationLane = - /* */ - 67108864; - var NonIdleLanes = - /* */ - 134217727; - var IdleHydrationLane = - /* */ - 134217728; - var IdleLanes = - /* */ - 805306368; - var OffscreenLane = - /* */ - 1073741824; - var NoTimestamp = -1; - function setCurrentUpdateLanePriority(newLanePriority) { - } // "Registers" used to "return" multiple values - // Used by getHighestPriorityLanes and getNextLanes: - - var return_highestLanePriority = DefaultLanePriority; - - function getHighestPriorityLanes(lanes) { - if ((SyncLane & lanes) !== NoLanes) { - return_highestLanePriority = SyncLanePriority; - return SyncLane; - } - - if ((SyncBatchedLane & lanes) !== NoLanes) { - return_highestLanePriority = SyncBatchedLanePriority; - return SyncBatchedLane; - } - - if ((InputDiscreteHydrationLane & lanes) !== NoLanes) { - return_highestLanePriority = InputDiscreteHydrationLanePriority; - return InputDiscreteHydrationLane; - } - - var inputDiscreteLanes = InputDiscreteLanes & lanes; - - if (inputDiscreteLanes !== NoLanes) { - return_highestLanePriority = InputDiscreteLanePriority; - return inputDiscreteLanes; - } - - if ((lanes & InputContinuousHydrationLane) !== NoLanes) { - return_highestLanePriority = InputContinuousHydrationLanePriority; - return InputContinuousHydrationLane; - } - - var inputContinuousLanes = InputContinuousLanes & lanes; - - if (inputContinuousLanes !== NoLanes) { - return_highestLanePriority = InputContinuousLanePriority; - return inputContinuousLanes; - } - - if ((lanes & DefaultHydrationLane) !== NoLanes) { - return_highestLanePriority = DefaultHydrationLanePriority; - return DefaultHydrationLane; - } - - var defaultLanes = DefaultLanes & lanes; - - if (defaultLanes !== NoLanes) { - return_highestLanePriority = DefaultLanePriority; - return defaultLanes; - } - - if ((lanes & TransitionHydrationLane) !== NoLanes) { - return_highestLanePriority = TransitionHydrationPriority; - return TransitionHydrationLane; - } - - var transitionLanes = TransitionLanes & lanes; - - if (transitionLanes !== NoLanes) { - return_highestLanePriority = TransitionPriority; - return transitionLanes; - } - - var retryLanes = RetryLanes & lanes; - - if (retryLanes !== NoLanes) { - return_highestLanePriority = RetryLanePriority; - return retryLanes; - } - - if (lanes & SelectiveHydrationLane) { - return_highestLanePriority = SelectiveHydrationLanePriority; - return SelectiveHydrationLane; - } - - if ((lanes & IdleHydrationLane) !== NoLanes) { - return_highestLanePriority = IdleHydrationLanePriority; - return IdleHydrationLane; - } - - var idleLanes = IdleLanes & lanes; - - if (idleLanes !== NoLanes) { - return_highestLanePriority = IdleLanePriority; - return idleLanes; - } - - if ((OffscreenLane & lanes) !== NoLanes) { - return_highestLanePriority = OffscreenLanePriority; - return OffscreenLane; - } - - { - error('Should have found matching lanes. This is a bug in React.'); - } // This shouldn't be reachable, but as a fallback, return the entire bitmask. - - - return_highestLanePriority = DefaultLanePriority; - return lanes; - } - - function schedulerPriorityToLanePriority(schedulerPriorityLevel) { - switch (schedulerPriorityLevel) { - case ImmediatePriority: - return SyncLanePriority; - - case UserBlockingPriority: - return InputContinuousLanePriority; - - case NormalPriority: - case LowPriority: - // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration. - return DefaultLanePriority; - - case IdlePriority: - return IdleLanePriority; - - default: - return NoLanePriority; - } - } - function lanePriorityToSchedulerPriority(lanePriority) { - switch (lanePriority) { - case SyncLanePriority: - case SyncBatchedLanePriority: - return ImmediatePriority; - - case InputDiscreteHydrationLanePriority: - case InputDiscreteLanePriority: - case InputContinuousHydrationLanePriority: - case InputContinuousLanePriority: - return UserBlockingPriority; - - case DefaultHydrationLanePriority: - case DefaultLanePriority: - case TransitionHydrationPriority: - case TransitionPriority: - case SelectiveHydrationLanePriority: - case RetryLanePriority: - return NormalPriority; - - case IdleHydrationLanePriority: - case IdleLanePriority: - case OffscreenLanePriority: - return IdlePriority; - - case NoLanePriority: - return NoPriority; - - default: - { - { - throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." ); - } - } - - } - } - function getNextLanes(root, wipLanes) { - // Early bailout if there's no pending work left. - var pendingLanes = root.pendingLanes; - - if (pendingLanes === NoLanes) { - return_highestLanePriority = NoLanePriority; - return NoLanes; - } - - var nextLanes = NoLanes; - var nextLanePriority = NoLanePriority; - var expiredLanes = root.expiredLanes; - var suspendedLanes = root.suspendedLanes; - var pingedLanes = root.pingedLanes; // Check if any work has expired. - - if (expiredLanes !== NoLanes) { - nextLanes = expiredLanes; - nextLanePriority = return_highestLanePriority = SyncLanePriority; - } else { - // Do not work on any idle work until all the non-idle work has finished, - // even if the work is suspended. - var nonIdlePendingLanes = pendingLanes & NonIdleLanes; - - if (nonIdlePendingLanes !== NoLanes) { - var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes; - - if (nonIdleUnblockedLanes !== NoLanes) { - nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes); - nextLanePriority = return_highestLanePriority; - } else { - var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes; - - if (nonIdlePingedLanes !== NoLanes) { - nextLanes = getHighestPriorityLanes(nonIdlePingedLanes); - nextLanePriority = return_highestLanePriority; - } - } - } else { - // The only remaining work is Idle. - var unblockedLanes = pendingLanes & ~suspendedLanes; - - if (unblockedLanes !== NoLanes) { - nextLanes = getHighestPriorityLanes(unblockedLanes); - nextLanePriority = return_highestLanePriority; - } else { - if (pingedLanes !== NoLanes) { - nextLanes = getHighestPriorityLanes(pingedLanes); - nextLanePriority = return_highestLanePriority; - } - } - } - } - - if (nextLanes === NoLanes) { - // This should only be reachable if we're suspended - // TODO: Consider warning in this path if a fallback timer is not scheduled. - return NoLanes; - } // If there are higher priority lanes, we'll include them even if they - // are suspended. - - - nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt - // it and we'll lose our progress. We should only do this if the new lanes are - // higher priority. - - if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't - // bother waiting until the root is complete. - (wipLanes & suspendedLanes) === NoLanes) { - getHighestPriorityLanes(wipLanes); - var wipLanePriority = return_highestLanePriority; - - if (nextLanePriority <= wipLanePriority) { - return wipLanes; - } else { - return_highestLanePriority = nextLanePriority; - } - } // Check for entangled lanes and add them to the batch. - // - // A lane is said to be entangled with another when it's not allowed to render - // in a batch that does not also include the other lane. Typically we do this - // when multiple updates have the same source, and we only want to respond to - // the most recent event from that source. - // - // Note that we apply entanglements *after* checking for partial work above. - // This means that if a lane is entangled during an interleaved event while - // it's already rendering, we won't interrupt it. This is intentional, since - // entanglement is usually "best effort": we'll try our best to render the - // lanes in the same batch, but it's not worth throwing out partially - // completed work in order to do it. - // - // For those exceptions where entanglement is semantically important, like - // useMutableSource, we should ensure that there is no partial work at the - // time we apply the entanglement. - - - var entangledLanes = root.entangledLanes; - - if (entangledLanes !== NoLanes) { - var entanglements = root.entanglements; - var lanes = nextLanes & entangledLanes; - - while (lanes > 0) { - var index = pickArbitraryLaneIndex(lanes); - var lane = 1 << index; - nextLanes |= entanglements[index]; - lanes &= ~lane; - } - } - - return nextLanes; - } - function getMostRecentEventTime(root, lanes) { - var eventTimes = root.eventTimes; - var mostRecentEventTime = NoTimestamp; - - while (lanes > 0) { - var index = pickArbitraryLaneIndex(lanes); - var lane = 1 << index; - var eventTime = eventTimes[index]; - - if (eventTime > mostRecentEventTime) { - mostRecentEventTime = eventTime; - } - - lanes &= ~lane; - } - - return mostRecentEventTime; - } - - function computeExpirationTime(lane, currentTime) { - // TODO: Expiration heuristic is constant per lane, so could use a map. - getHighestPriorityLanes(lane); - var priority = return_highestLanePriority; - - if (priority >= InputContinuousLanePriority) { - // User interactions should expire slightly more quickly. - // - // NOTE: This is set to the corresponding constant as in Scheduler.js. When - // we made it larger, a product metric in www regressed, suggesting there's - // a user interaction that's being starved by a series of synchronous - // updates. If that theory is correct, the proper solution is to fix the - // starvation. However, this scenario supports the idea that expiration - // times are an important safeguard when starvation does happen. - // - // Also note that, in the case of user input specifically, this will soon no - // longer be an issue because we plan to make user input synchronous by - // default (until you enter `startTransition`, of course.) - // - // If weren't planning to make these updates synchronous soon anyway, I - // would probably make this number a configurable parameter. - return currentTime + 250; - } else if (priority >= TransitionPriority) { - return currentTime + 5000; - } else { - // Anything idle priority or lower should never expire. - return NoTimestamp; - } - } - - function markStarvedLanesAsExpired(root, currentTime) { - // TODO: This gets called every time we yield. We can optimize by storing - // the earliest expiration time on the root. Then use that to quickly bail out - // of this function. - var pendingLanes = root.pendingLanes; - var suspendedLanes = root.suspendedLanes; - var pingedLanes = root.pingedLanes; - var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their - // expiration time. If so, we'll assume the update is being starved and mark - // it as expired to force it to finish. - - var lanes = pendingLanes; - - while (lanes > 0) { - var index = pickArbitraryLaneIndex(lanes); - var lane = 1 << index; - var expirationTime = expirationTimes[index]; - - if (expirationTime === NoTimestamp) { - // Found a pending lane with no expiration time. If it's not suspended, or - // if it's pinged, assume it's CPU-bound. Compute a new expiration time - // using the current time. - if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) { - // Assumes timestamps are monotonically increasing. - expirationTimes[index] = computeExpirationTime(lane, currentTime); - } - } else if (expirationTime <= currentTime) { - // This lane expired - root.expiredLanes |= lane; - } - - lanes &= ~lane; - } - } // This returns the highest priority pending lanes regardless of whether they - function getLanesToRetrySynchronouslyOnError(root) { - var everythingButOffscreen = root.pendingLanes & ~OffscreenLane; - - if (everythingButOffscreen !== NoLanes) { - return everythingButOffscreen; - } - - if (everythingButOffscreen & OffscreenLane) { - return OffscreenLane; - } - - return NoLanes; - } - function returnNextLanesPriority() { - return return_highestLanePriority; - } - function includesNonIdleWork(lanes) { - return (lanes & NonIdleLanes) !== NoLanes; - } - function includesOnlyRetries(lanes) { - return (lanes & RetryLanes) === lanes; - } - function includesOnlyTransitions(lanes) { - return (lanes & TransitionLanes) === lanes; - } // To ensure consistency across multiple updates in the same event, this should - // be a pure function, so that it always returns the same lane for given inputs. - - function findUpdateLane(lanePriority, wipLanes) { - switch (lanePriority) { - case NoLanePriority: - break; - - case SyncLanePriority: - return SyncLane; - - case SyncBatchedLanePriority: - return SyncBatchedLane; - - case InputDiscreteLanePriority: - { - var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes); - - if (_lane === NoLane) { - // Shift to the next priority level - return findUpdateLane(InputContinuousLanePriority, wipLanes); - } - - return _lane; - } - - case InputContinuousLanePriority: - { - var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes); - - if (_lane2 === NoLane) { - // Shift to the next priority level - return findUpdateLane(DefaultLanePriority, wipLanes); - } - - return _lane2; - } - - case DefaultLanePriority: - { - var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes); - - if (_lane3 === NoLane) { - // If all the default lanes are already being worked on, look for a - // lane in the transition range. - _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes); - - if (_lane3 === NoLane) { - // All the transition lanes are taken, too. This should be very - // rare, but as a last resort, pick a default lane. This will have - // the effect of interrupting the current work-in-progress render. - _lane3 = pickArbitraryLane(DefaultLanes); - } - } - - return _lane3; - } - - case TransitionPriority: // Should be handled by findTransitionLane instead - - case RetryLanePriority: - // Should be handled by findRetryLane instead - break; - - case IdleLanePriority: - var lane = pickArbitraryLane(IdleLanes & ~wipLanes); - - if (lane === NoLane) { - lane = pickArbitraryLane(IdleLanes); - } - - return lane; - } - - { - { - throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." ); - } - } - } // To ensure consistency across multiple updates in the same event, this should - // be pure function, so that it always returns the same lane for given inputs. - - function findTransitionLane(wipLanes, pendingLanes) { - // First look for lanes that are completely unclaimed, i.e. have no - // pending work. - var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes); - - if (lane === NoLane) { - // If all lanes have pending work, look for a lane that isn't currently - // being worked on. - lane = pickArbitraryLane(TransitionLanes & ~wipLanes); - - if (lane === NoLane) { - // If everything is being worked on, pick any lane. This has the - // effect of interrupting the current work-in-progress. - lane = pickArbitraryLane(TransitionLanes); - } - } - - return lane; - } // To ensure consistency across multiple updates in the same event, this should - // be pure function, so that it always returns the same lane for given inputs. - - function findRetryLane(wipLanes) { - // This is a fork of `findUpdateLane` designed specifically for Suspense - // "retries" — a special update that attempts to flip a Suspense boundary - // from its placeholder state to its primary/resolved state. - var lane = pickArbitraryLane(RetryLanes & ~wipLanes); - - if (lane === NoLane) { - lane = pickArbitraryLane(RetryLanes); - } - - return lane; - } - - function getHighestPriorityLane(lanes) { - return lanes & -lanes; - } - - function getLowestPriorityLane(lanes) { - // This finds the most significant non-zero bit. - var index = 31 - clz32(lanes); - return index < 0 ? NoLanes : 1 << index; - } - - function getEqualOrHigherPriorityLanes(lanes) { - return (getLowestPriorityLane(lanes) << 1) - 1; - } - - function pickArbitraryLane(lanes) { - // This wrapper function gets inlined. Only exists so to communicate that it - // doesn't matter which bit is selected; you can pick any bit without - // affecting the algorithms where its used. Here I'm using - // getHighestPriorityLane because it requires the fewest operations. - return getHighestPriorityLane(lanes); - } - - function pickArbitraryLaneIndex(lanes) { - return 31 - clz32(lanes); - } - - function laneToIndex(lane) { - return pickArbitraryLaneIndex(lane); - } - - function includesSomeLane(a, b) { - return (a & b) !== NoLanes; - } - function isSubsetOfLanes(set, subset) { - return (set & subset) === subset; - } - function mergeLanes(a, b) { - return a | b; - } - function removeLanes(set, subset) { - return set & ~subset; - } // Seems redundant, but it changes the type from a single lane (used for - // updates) to a group of lanes (used for flushing work). - - function laneToLanes(lane) { - return lane; - } - function higherPriorityLane(a, b) { - // This works because the bit ranges decrease in priority as you go left. - return a !== NoLane && a < b ? a : b; - } - function createLaneMap(initial) { - // Intentionally pushing one by one. - // https://v8.dev/blog/elements-kinds#avoid-creating-holes - var laneMap = []; - - for (var i = 0; i < TotalLanes; i++) { - laneMap.push(initial); - } - - return laneMap; - } - function markRootUpdated(root, updateLane, eventTime) { - root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But - // it's not practical to try every single possible combination. We need a - // heuristic to decide which lanes to attempt to render, and in which batches. - // For now, we use the same heuristic as in the old ExpirationTimes model: - // retry any lane at equal or lower priority, but don't try updates at higher - // priority without also including the lower priority updates. This works well - // when considering updates across different priority levels, but isn't - // sufficient for updates within the same priority, since we want to treat - // those updates as parallel. - // Unsuspend any update at equal or lower priority. - - var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111 - - root.suspendedLanes &= higherPriorityLanes; - root.pingedLanes &= higherPriorityLanes; - var eventTimes = root.eventTimes; - var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most - // recent event, and we assume time is monotonically increasing. - - eventTimes[index] = eventTime; - } - function markRootSuspended(root, suspendedLanes) { - root.suspendedLanes |= suspendedLanes; - root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times. - - var expirationTimes = root.expirationTimes; - var lanes = suspendedLanes; - - while (lanes > 0) { - var index = pickArbitraryLaneIndex(lanes); - var lane = 1 << index; - expirationTimes[index] = NoTimestamp; - lanes &= ~lane; - } - } - function markRootPinged(root, pingedLanes, eventTime) { - root.pingedLanes |= root.suspendedLanes & pingedLanes; - } - function markDiscreteUpdatesExpired(root) { - root.expiredLanes |= InputDiscreteLanes & root.pendingLanes; - } - function hasDiscreteLanes(lanes) { - return (lanes & InputDiscreteLanes) !== NoLanes; - } - function markRootMutableRead(root, updateLane) { - root.mutableReadLanes |= updateLane & root.pendingLanes; - } - function markRootFinished(root, remainingLanes) { - var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; - root.pendingLanes = remainingLanes; // Let's try everything again - - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.expiredLanes &= remainingLanes; - root.mutableReadLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - var entanglements = root.entanglements; - var eventTimes = root.eventTimes; - var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work - - var lanes = noLongerPendingLanes; - - while (lanes > 0) { - var index = pickArbitraryLaneIndex(lanes); - var lane = 1 << index; - entanglements[index] = NoLanes; - eventTimes[index] = NoTimestamp; - expirationTimes[index] = NoTimestamp; - lanes &= ~lane; - } - } - function markRootEntangled(root, entangledLanes) { - root.entangledLanes |= entangledLanes; - var entanglements = root.entanglements; - var lanes = entangledLanes; - - while (lanes > 0) { - var index = pickArbitraryLaneIndex(lanes); - var lane = 1 << index; - entanglements[index] |= entangledLanes; - lanes &= ~lane; - } - } - var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer. - // Based on: - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 - - var log = Math.log; - var LN2 = Math.LN2; - - function clz32Fallback(lanes) { - if (lanes === 0) { - return 32; - } - - return 31 - (log(lanes) / LN2 | 0) | 0; - } - - // Intentionally not named imports because Rollup would use dynamic dispatch for - var UserBlockingPriority$1 = unstable_UserBlockingPriority, - runWithPriority = unstable_runWithPriority; // TODO: can we stop exporting these? - - var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra. - // We'd like to remove this but it's not clear if this is safe. - - function setEnabled(enabled) { - _enabled = !!enabled; - } - function isEnabled() { - return _enabled; - } - function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) { - var eventPriority = getEventPriorityForPluginSystem(domEventName); - var listenerWrapper; - - switch (eventPriority) { - case DiscreteEvent: - listenerWrapper = dispatchDiscreteEvent; - break; - - case UserBlockingEvent: - listenerWrapper = dispatchUserBlockingUpdate; - break; - - case ContinuousEvent: - default: - listenerWrapper = dispatchEvent; - break; - } - - return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer); - } - - function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) { - { - flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp); - } - - discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent); - } - - function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) { - { - runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent)); - } - } - - function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) { - if (!_enabled) { - return; - } - - var allowReplay = true; - - { - // TODO: replaying capture phase events is currently broken - // because we used to do it during top-level native bubble handlers - // but now we use different bubble and capture handlers. - // In eager mode, we attach capture listeners early, so we need - // to filter them out until we fix the logic to handle them correctly. - // This could've been outside the flag but I put it inside to reduce risk. - allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0; - } - - if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) { - // If we already have a queue of discrete events, and this is another discrete - // event, then we can't dispatch it regardless of its target, since they - // need to dispatch in order. - queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know. - domEventName, eventSystemFlags, targetContainer, nativeEvent); - return; - } - - var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent); - - if (blockedOn === null) { - // We successfully dispatched this event. - if (allowReplay) { - clearIfContinuousEvent(domEventName, nativeEvent); - } - - return; - } - - if (allowReplay) { - if (isReplayableDiscreteEvent(domEventName)) { - // This this to be replayed later once the target is available. - queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent); - return; - } - - if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) { - return; - } // We need to clear only if we didn't queue because - // queueing is accummulative. - - - clearIfContinuousEvent(domEventName, nativeEvent); - } // This is not replayable so we'll invoke it but without a target, - // in case the event system needs to trace it. - - - dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer); - } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked. - - function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) { - // TODO: Warn if _enabled is false. - var nativeEventTarget = getEventTarget(nativeEvent); - var targetInst = getClosestInstanceFromNode(nativeEventTarget); - - if (targetInst !== null) { - var nearestMounted = getNearestMountedFiber(targetInst); - - if (nearestMounted === null) { - // This tree has been unmounted already. Dispatch without a target. - targetInst = null; - } else { - var tag = nearestMounted.tag; - - if (tag === SuspenseComponent) { - var instance = getSuspenseInstanceFromFiber(nearestMounted); - - if (instance !== null) { - // Queue the event to be replayed later. Abort dispatching since we - // don't want this event dispatched twice through the event system. - // TODO: If this is the first discrete event in the queue. Schedule an increased - // priority for this boundary. - return instance; - } // This shouldn't happen, something went wrong but to avoid blocking - // the whole system, dispatch the event without a target. - // TODO: Warn. - - - targetInst = null; - } else if (tag === HostRoot) { - var root = nearestMounted.stateNode; - - if (root.hydrate) { - // If this happens during a replay something went wrong and it might block - // the whole system. - return getContainerFromFiber(nearestMounted); - } - - targetInst = null; - } else if (nearestMounted !== targetInst) { - // If we get an event (ex: img onload) before committing that - // component's mount, ignore it for now (that is, treat it as if it was an - // event on a non-React tree). We might also consider queueing events and - // dispatching them after the mount. - targetInst = null; - } - } - } - - dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything. - - return null; - } - - function addEventBubbleListener(target, eventType, listener) { - target.addEventListener(eventType, listener, false); - return listener; - } - function addEventCaptureListener(target, eventType, listener) { - target.addEventListener(eventType, listener, true); - return listener; - } - function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) { - target.addEventListener(eventType, listener, { - capture: true, - passive: passive - }); - return listener; - } - function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) { - target.addEventListener(eventType, listener, { - passive: passive - }); - return listener; - } - - /** - * These variables store information about text content of a target node, - * allowing comparison of content before and after a given event. - * - * Identify the node where selection currently begins, then observe - * both its text content and its current position in the DOM. Since the - * browser may natively replace the target node during composition, we can - * use its position to find its replacement. - * - * - */ - var root = null; - var startText = null; - var fallbackText = null; - function initialize(nativeEventTarget) { - root = nativeEventTarget; - startText = getText(); - return true; - } - function reset() { - root = null; - startText = null; - fallbackText = null; - } - function getData() { - if (fallbackText) { - return fallbackText; - } - - var start; - var startValue = startText; - var startLength = startValue.length; - var end; - var endValue = getText(); - var endLength = endValue.length; - - for (start = 0; start < startLength; start++) { - if (startValue[start] !== endValue[start]) { - break; - } - } - - var minEnd = startLength - start; - - for (end = 1; end <= minEnd; end++) { - if (startValue[startLength - end] !== endValue[endLength - end]) { - break; - } - } - - var sliceTail = end > 1 ? 1 - end : undefined; - fallbackText = endValue.slice(start, sliceTail); - return fallbackText; - } - function getText() { - if ('value' in root) { - return root.value; - } - - return root.textContent; - } - - /** - * `charCode` represents the actual "character code" and is safe to use with - * `String.fromCharCode`. As such, only keys that correspond to printable - * characters produce a valid `charCode`, the only exception to this is Enter. - * The Tab-key is considered non-printable and does not have a `charCode`, - * presumably because it does not produce a tab-character in browsers. - * - * @param {object} nativeEvent Native browser event. - * @return {number} Normalized `charCode` property. - */ - function getEventCharCode(nativeEvent) { - var charCode; - var keyCode = nativeEvent.keyCode; - - if ('charCode' in nativeEvent) { - charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`. - - if (charCode === 0 && keyCode === 13) { - charCode = 13; - } - } else { - // IE8 does not implement `charCode`, but `keyCode` has the correct value. - charCode = keyCode; - } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux) - // report Enter as charCode 10 when ctrl is pressed. - - - if (charCode === 10) { - charCode = 13; - } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. - // Must not discard the (non-)printable Enter-key. - - - if (charCode >= 32 || charCode === 13) { - return charCode; - } - - return 0; - } - - function functionThatReturnsTrue() { - return true; - } - - function functionThatReturnsFalse() { - return false; - } // This is intentionally a factory so that we have different returned constructors. - // If we had a single constructor, it would be megamorphic and engines would deopt. - - - function createSyntheticEvent(Interface) { - /** - * Synthetic events are dispatched by event plugins, typically in response to a - * top-level event delegation handler. - * - * These systems should generally use pooling to reduce the frequency of garbage - * collection. The system should check `isPersistent` to determine whether the - * event should be released into the pool after being dispatched. Users that - * need a persisted event should invoke `persist`. - * - * Synthetic events (and subclasses) implement the DOM Level 3 Events API by - * normalizing browser quirks. Subclasses do not necessarily have to implement a - * DOM interface; custom application-specific events can also subclass this. - */ - function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) { - this._reactName = reactName; - this._targetInst = targetInst; - this.type = reactEventType; - this.nativeEvent = nativeEvent; - this.target = nativeEventTarget; - this.currentTarget = null; - - for (var _propName in Interface) { - if (!Interface.hasOwnProperty(_propName)) { - continue; - } - - var normalize = Interface[_propName]; - - if (normalize) { - this[_propName] = normalize(nativeEvent); - } else { - this[_propName] = nativeEvent[_propName]; - } - } - - var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false; - - if (defaultPrevented) { - this.isDefaultPrevented = functionThatReturnsTrue; - } else { - this.isDefaultPrevented = functionThatReturnsFalse; - } - - this.isPropagationStopped = functionThatReturnsFalse; - return this; - } - - _assign(SyntheticBaseEvent.prototype, { - preventDefault: function () { - this.defaultPrevented = true; - var event = this.nativeEvent; - - if (!event) { - return; - } - - if (event.preventDefault) { - event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE - } else if (typeof event.returnValue !== 'unknown') { - event.returnValue = false; - } - - this.isDefaultPrevented = functionThatReturnsTrue; - }, - stopPropagation: function () { - var event = this.nativeEvent; - - if (!event) { - return; - } - - if (event.stopPropagation) { - event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE - } else if (typeof event.cancelBubble !== 'unknown') { - // The ChangeEventPlugin registers a "propertychange" event for - // IE. This event does not support bubbling or cancelling, and - // any references to cancelBubble throw "Member not found". A - // typeof check of "unknown" circumvents this issue (and is also - // IE specific). - event.cancelBubble = true; - } - - this.isPropagationStopped = functionThatReturnsTrue; - }, - - /** - * We release all dispatched `SyntheticEvent`s after each event loop, adding - * them back into the pool. This allows a way to hold onto a reference that - * won't be added back into the pool. - */ - persist: function () {// Modern event system doesn't use pooling. - }, - - /** - * Checks if this event should be released back into the pool. - * - * @return {boolean} True if this should not be released, false otherwise. - */ - isPersistent: functionThatReturnsTrue - }); - - return SyntheticBaseEvent; - } - /** - * @interface Event - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - - - var EventInterface = { - eventPhase: 0, - bubbles: 0, - cancelable: 0, - timeStamp: function (event) { - return event.timeStamp || Date.now(); - }, - defaultPrevented: 0, - isTrusted: 0 - }; - var SyntheticEvent = createSyntheticEvent(EventInterface); - - var UIEventInterface = _assign({}, EventInterface, { - view: 0, - detail: 0 - }); - - var SyntheticUIEvent = createSyntheticEvent(UIEventInterface); - var lastMovementX; - var lastMovementY; - var lastMouseEvent; - - function updateMouseMovementPolyfillState(event) { - if (event !== lastMouseEvent) { - if (lastMouseEvent && event.type === 'mousemove') { - lastMovementX = event.screenX - lastMouseEvent.screenX; - lastMovementY = event.screenY - lastMouseEvent.screenY; - } else { - lastMovementX = 0; - lastMovementY = 0; - } - - lastMouseEvent = event; - } - } - /** - * @interface MouseEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - - - var MouseEventInterface = _assign({}, UIEventInterface, { - screenX: 0, - screenY: 0, - clientX: 0, - clientY: 0, - pageX: 0, - pageY: 0, - ctrlKey: 0, - shiftKey: 0, - altKey: 0, - metaKey: 0, - getModifierState: getEventModifierState, - button: 0, - buttons: 0, - relatedTarget: function (event) { - if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement; - return event.relatedTarget; - }, - movementX: function (event) { - if ('movementX' in event) { - return event.movementX; - } - - updateMouseMovementPolyfillState(event); - return lastMovementX; - }, - movementY: function (event) { - if ('movementY' in event) { - return event.movementY; - } // Don't need to call updateMouseMovementPolyfillState() here - // because it's guaranteed to have already run when movementX - // was copied. - - - return lastMovementY; - } - }); - - var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface); - /** - * @interface DragEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - - var DragEventInterface = _assign({}, MouseEventInterface, { - dataTransfer: 0 - }); - - var SyntheticDragEvent = createSyntheticEvent(DragEventInterface); - /** - * @interface FocusEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - - var FocusEventInterface = _assign({}, UIEventInterface, { - relatedTarget: 0 - }); - - var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface); - /** - * @interface Event - * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface - * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent - */ - - var AnimationEventInterface = _assign({}, EventInterface, { - animationName: 0, - elapsedTime: 0, - pseudoElement: 0 - }); - - var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface); - /** - * @interface Event - * @see http://www.w3.org/TR/clipboard-apis/ - */ - - var ClipboardEventInterface = _assign({}, EventInterface, { - clipboardData: function (event) { - return 'clipboardData' in event ? event.clipboardData : window.clipboardData; - } - }); - - var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface); - /** - * @interface Event - * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents - */ - - var CompositionEventInterface = _assign({}, EventInterface, { - data: 0 - }); - - var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface); - /** - * @interface Event - * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 - * /#events-inputevents - */ - // Happens to share the same list for now. - - var SyntheticInputEvent = SyntheticCompositionEvent; - /** - * Normalization of deprecated HTML5 `key` values - * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names - */ - - var normalizeKey = { - Esc: 'Escape', - Spacebar: ' ', - Left: 'ArrowLeft', - Up: 'ArrowUp', - Right: 'ArrowRight', - Down: 'ArrowDown', - Del: 'Delete', - Win: 'OS', - Menu: 'ContextMenu', - Apps: 'ContextMenu', - Scroll: 'ScrollLock', - MozPrintableKey: 'Unidentified' - }; - /** - * Translation from legacy `keyCode` to HTML5 `key` - * Only special keys supported, all others depend on keyboard layout or browser - * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names - */ - - var translateToKey = { - '8': 'Backspace', - '9': 'Tab', - '12': 'Clear', - '13': 'Enter', - '16': 'Shift', - '17': 'Control', - '18': 'Alt', - '19': 'Pause', - '20': 'CapsLock', - '27': 'Escape', - '32': ' ', - '33': 'PageUp', - '34': 'PageDown', - '35': 'End', - '36': 'Home', - '37': 'ArrowLeft', - '38': 'ArrowUp', - '39': 'ArrowRight', - '40': 'ArrowDown', - '45': 'Insert', - '46': 'Delete', - '112': 'F1', - '113': 'F2', - '114': 'F3', - '115': 'F4', - '116': 'F5', - '117': 'F6', - '118': 'F7', - '119': 'F8', - '120': 'F9', - '121': 'F10', - '122': 'F11', - '123': 'F12', - '144': 'NumLock', - '145': 'ScrollLock', - '224': 'Meta' - }; - /** - * @param {object} nativeEvent Native browser event. - * @return {string} Normalized `key` property. - */ - - function getEventKey(nativeEvent) { - if (nativeEvent.key) { - // Normalize inconsistent values reported by browsers due to - // implementations of a working draft specification. - // FireFox implements `key` but returns `MozPrintableKey` for all - // printable characters (normalized to `Unidentified`), ignore it. - var key = normalizeKey[nativeEvent.key] || nativeEvent.key; - - if (key !== 'Unidentified') { - return key; - } - } // Browser does not implement `key`, polyfill as much of it as we can. - - - if (nativeEvent.type === 'keypress') { - var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can - // thus be captured by `keypress`, no other non-printable key should. - - return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); - } - - if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { - // While user keyboard layout determines the actual meaning of each - // `keyCode` value, almost all function keys have a universal value. - return translateToKey[nativeEvent.keyCode] || 'Unidentified'; - } - - return ''; - } - /** - * Translation from modifier key to the associated property in the event. - * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers - */ - - - var modifierKeyToProp = { - Alt: 'altKey', - Control: 'ctrlKey', - Meta: 'metaKey', - Shift: 'shiftKey' - }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support - // getModifierState. If getModifierState is not supported, we map it to a set of - // modifier keys exposed by the event. In this case, Lock-keys are not supported. - - function modifierStateGetter(keyArg) { - var syntheticEvent = this; - var nativeEvent = syntheticEvent.nativeEvent; - - if (nativeEvent.getModifierState) { - return nativeEvent.getModifierState(keyArg); - } - - var keyProp = modifierKeyToProp[keyArg]; - return keyProp ? !!nativeEvent[keyProp] : false; - } - - function getEventModifierState(nativeEvent) { - return modifierStateGetter; - } - /** - * @interface KeyboardEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - - - var KeyboardEventInterface = _assign({}, UIEventInterface, { - key: getEventKey, - code: 0, - location: 0, - ctrlKey: 0, - shiftKey: 0, - altKey: 0, - metaKey: 0, - repeat: 0, - locale: 0, - getModifierState: getEventModifierState, - // Legacy Interface - charCode: function (event) { - // `charCode` is the result of a KeyPress event and represents the value of - // the actual printable character. - // KeyPress is deprecated, but its replacement is not yet final and not - // implemented in any major browser. Only KeyPress has charCode. - if (event.type === 'keypress') { - return getEventCharCode(event); - } - - return 0; - }, - keyCode: function (event) { - // `keyCode` is the result of a KeyDown/Up event and represents the value of - // physical keyboard key. - // The actual meaning of the value depends on the users' keyboard layout - // which cannot be detected. Assuming that it is a US keyboard layout - // provides a surprisingly accurate mapping for US and European users. - // Due to this, it is left to the user to implement at this time. - if (event.type === 'keydown' || event.type === 'keyup') { - return event.keyCode; - } - - return 0; - }, - which: function (event) { - // `which` is an alias for either `keyCode` or `charCode` depending on the - // type of the event. - if (event.type === 'keypress') { - return getEventCharCode(event); - } - - if (event.type === 'keydown' || event.type === 'keyup') { - return event.keyCode; - } - - return 0; - } - }); - - var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface); - /** - * @interface PointerEvent - * @see http://www.w3.org/TR/pointerevents/ - */ - - var PointerEventInterface = _assign({}, MouseEventInterface, { - pointerId: 0, - width: 0, - height: 0, - pressure: 0, - tangentialPressure: 0, - tiltX: 0, - tiltY: 0, - twist: 0, - pointerType: 0, - isPrimary: 0 - }); - - var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface); - /** - * @interface TouchEvent - * @see http://www.w3.org/TR/touch-events/ - */ - - var TouchEventInterface = _assign({}, UIEventInterface, { - touches: 0, - targetTouches: 0, - changedTouches: 0, - altKey: 0, - metaKey: 0, - ctrlKey: 0, - shiftKey: 0, - getModifierState: getEventModifierState - }); - - var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface); - /** - * @interface Event - * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events- - * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent - */ - - var TransitionEventInterface = _assign({}, EventInterface, { - propertyName: 0, - elapsedTime: 0, - pseudoElement: 0 - }); - - var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface); - /** - * @interface WheelEvent - * @see http://www.w3.org/TR/DOM-Level-3-Events/ - */ - - var WheelEventInterface = _assign({}, MouseEventInterface, { - deltaX: function (event) { - return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). - 'wheelDeltaX' in event ? -event.wheelDeltaX : 0; - }, - deltaY: function (event) { - return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). - 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). - 'wheelDelta' in event ? -event.wheelDelta : 0; - }, - deltaZ: 0, - // Browsers without "deltaMode" is reporting in raw wheel delta where one - // notch on the scroll is always +/- 120, roughly equivalent to pixels. - // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or - // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. - deltaMode: 0 - }); - - var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface); - - var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space - - var START_KEYCODE = 229; - var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window; - var documentMode = null; - - if (canUseDOM && 'documentMode' in document) { - documentMode = document.documentMode; - } // Webkit offers a very useful `textInput` event that can be used to - // directly represent `beforeInput`. The IE `textinput` event is not as - // useful, so we don't use it. - - - var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied - // by the native compositionend event may be incorrect. Japanese ideographic - // spaces, for instance (\u3000) are not recorded correctly. - - var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); - var SPACEBAR_CODE = 32; - var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); - - function registerEvents() { - registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']); - registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']); - registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']); - registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']); - } // Track whether we've ever handled a keypress on the space key. - - - var hasSpaceKeypress = false; - /** - * Return whether a native keypress event is assumed to be a command. - * This is required because Firefox fires `keypress` events for key commands - * (cut, copy, select-all, etc.) even though no character is inserted. - */ - - function isKeypressCommand(nativeEvent) { - return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command. - !(nativeEvent.ctrlKey && nativeEvent.altKey); - } - /** - * Translate native top level events into event types. - */ - - - function getCompositionEventType(domEventName) { - switch (domEventName) { - case 'compositionstart': - return 'onCompositionStart'; - - case 'compositionend': - return 'onCompositionEnd'; - - case 'compositionupdate': - return 'onCompositionUpdate'; - } - } - /** - * Does our fallback best-guess model think this event signifies that - * composition has begun? - */ - - - function isFallbackCompositionStart(domEventName, nativeEvent) { - return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE; - } - /** - * Does our fallback mode think that this event is the end of composition? - */ - - - function isFallbackCompositionEnd(domEventName, nativeEvent) { - switch (domEventName) { - case 'keyup': - // Command keys insert or clear IME input. - return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; - - case 'keydown': - // Expect IME keyCode on each keydown. If we get any other - // code we must have exited earlier. - return nativeEvent.keyCode !== START_KEYCODE; - - case 'keypress': - case 'mousedown': - case 'focusout': - // Events are not possible without cancelling IME. - return true; - - default: - return false; - } - } - /** - * Google Input Tools provides composition data via a CustomEvent, - * with the `data` property populated in the `detail` object. If this - * is available on the event object, use it. If not, this is a plain - * composition event and we have nothing special to extract. - * - * @param {object} nativeEvent - * @return {?string} - */ - - - function getDataFromCustomEvent(nativeEvent) { - var detail = nativeEvent.detail; - - if (typeof detail === 'object' && 'data' in detail) { - return detail.data; - } - - return null; - } - /** - * Check if a composition event was triggered by Korean IME. - * Our fallback mode does not work well with IE's Korean IME, - * so just use native composition events when Korean IME is used. - * Although CompositionEvent.locale property is deprecated, - * it is available in IE, where our fallback mode is enabled. - * - * @param {object} nativeEvent - * @return {boolean} - */ - - - function isUsingKoreanIME(nativeEvent) { - return nativeEvent.locale === 'ko'; - } // Track the current IME composition status, if any. - - - var isComposing = false; - /** - * @return {?object} A SyntheticCompositionEvent. - */ - - function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) { - var eventType; - var fallbackData; - - if (canUseCompositionEvent) { - eventType = getCompositionEventType(domEventName); - } else if (!isComposing) { - if (isFallbackCompositionStart(domEventName, nativeEvent)) { - eventType = 'onCompositionStart'; - } - } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) { - eventType = 'onCompositionEnd'; - } - - if (!eventType) { - return null; - } - - if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) { - // The current composition is stored statically and must not be - // overwritten while composition continues. - if (!isComposing && eventType === 'onCompositionStart') { - isComposing = initialize(nativeEventTarget); - } else if (eventType === 'onCompositionEnd') { - if (isComposing) { - fallbackData = getData(); - } - } - } - - var listeners = accumulateTwoPhaseListeners(targetInst, eventType); - - if (listeners.length > 0) { - var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget); - dispatchQueue.push({ - event: event, - listeners: listeners - }); - - if (fallbackData) { - // Inject data generated from fallback path into the synthetic event. - // This matches the property of native CompositionEventInterface. - event.data = fallbackData; - } else { - var customData = getDataFromCustomEvent(nativeEvent); - - if (customData !== null) { - event.data = customData; - } - } - } - } - - function getNativeBeforeInputChars(domEventName, nativeEvent) { - switch (domEventName) { - case 'compositionend': - return getDataFromCustomEvent(nativeEvent); - - case 'keypress': - /** - * If native `textInput` events are available, our goal is to make - * use of them. However, there is a special case: the spacebar key. - * In Webkit, preventing default on a spacebar `textInput` event - * cancels character insertion, but it *also* causes the browser - * to fall back to its default spacebar behavior of scrolling the - * page. - * - * Tracking at: - * https://code.google.com/p/chromium/issues/detail?id=355103 - * - * To avoid this issue, use the keypress event as if no `textInput` - * event is available. - */ - var which = nativeEvent.which; - - if (which !== SPACEBAR_CODE) { - return null; - } - - hasSpaceKeypress = true; - return SPACEBAR_CHAR; - - case 'textInput': - // Record the characters to be added to the DOM. - var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled - // it at the keypress level and bail immediately. Android Chrome - // doesn't give us keycodes, so we need to ignore it. - - if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { - return null; - } - - return chars; - - default: - // For other native event types, do nothing. - return null; - } - } - /** - * For browsers that do not provide the `textInput` event, extract the - * appropriate string to use for SyntheticInputEvent. - */ - - - function getFallbackBeforeInputChars(domEventName, nativeEvent) { - // If we are currently composing (IME) and using a fallback to do so, - // try to extract the composed characters from the fallback object. - // If composition event is available, we extract a string only at - // compositionevent, otherwise extract it at fallback events. - if (isComposing) { - if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) { - var chars = getData(); - reset(); - isComposing = false; - return chars; - } - - return null; - } - - switch (domEventName) { - case 'paste': - // If a paste event occurs after a keypress, throw out the input - // chars. Paste events should not lead to BeforeInput events. - return null; - - case 'keypress': - /** - * As of v27, Firefox may fire keypress events even when no character - * will be inserted. A few possibilities: - * - * - `which` is `0`. Arrow keys, Esc key, etc. - * - * - `which` is the pressed key code, but no char is available. - * Ex: 'AltGr + d` in Polish. There is no modified character for - * this key combination and no character is inserted into the - * document, but FF fires the keypress for char code `100` anyway. - * No `input` event will occur. - * - * - `which` is the pressed key code, but a command combination is - * being used. Ex: `Cmd+C`. No character is inserted, and no - * `input` event will occur. - */ - if (!isKeypressCommand(nativeEvent)) { - // IE fires the `keypress` event when a user types an emoji via - // Touch keyboard of Windows. In such a case, the `char` property - // holds an emoji character like `\uD83D\uDE0A`. Because its length - // is 2, the property `which` does not represent an emoji correctly. - // In such a case, we directly return the `char` property instead of - // using `which`. - if (nativeEvent.char && nativeEvent.char.length > 1) { - return nativeEvent.char; - } else if (nativeEvent.which) { - return String.fromCharCode(nativeEvent.which); - } - } - - return null; - - case 'compositionend': - return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data; - - default: - return null; - } - } - /** - * Extract a SyntheticInputEvent for `beforeInput`, based on either native - * `textInput` or fallback behavior. - * - * @return {?object} A SyntheticInputEvent. - */ - - - function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) { - var chars; - - if (canUseTextInputEvent) { - chars = getNativeBeforeInputChars(domEventName, nativeEvent); - } else { - chars = getFallbackBeforeInputChars(domEventName, nativeEvent); - } // If no characters are being inserted, no BeforeInput event should - // be fired. - - - if (!chars) { - return null; - } - - var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput'); - - if (listeners.length > 0) { - var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget); - dispatchQueue.push({ - event: event, - listeners: listeners - }); - event.data = chars; - } - } - /** - * Create an `onBeforeInput` event to match - * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. - * - * This event plugin is based on the native `textInput` event - * available in Chrome, Safari, Opera, and IE. This event fires after - * `onKeyPress` and `onCompositionEnd`, but before `onInput`. - * - * `beforeInput` is spec'd but not implemented in any browsers, and - * the `input` event does not provide any useful information about what has - * actually been added, contrary to the spec. Thus, `textInput` is the best - * available event to identify the characters that have actually been inserted - * into the target node. - * - * This plugin is also responsible for emitting `composition` events, thus - * allowing us to share composition fallback code for both `beforeInput` and - * `composition` event types. - */ - - - function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { - extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); - extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); - } - - /** - * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary - */ - var supportedInputTypes = { - color: true, - date: true, - datetime: true, - 'datetime-local': true, - email: true, - month: true, - number: true, - password: true, - range: true, - search: true, - tel: true, - text: true, - time: true, - url: true, - week: true - }; - - function isTextInputElement(elem) { - var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); - - if (nodeName === 'input') { - return !!supportedInputTypes[elem.type]; - } - - if (nodeName === 'textarea') { - return true; - } - - return false; - } - - /** - * Checks if an event is supported in the current execution environment. - * - * NOTE: This will not work correctly for non-generic events such as `change`, - * `reset`, `load`, `error`, and `select`. - * - * Borrows from Modernizr. - * - * @param {string} eventNameSuffix Event name, e.g. "click". - * @return {boolean} True if the event is supported. - * @internal - * @license Modernizr 3.0.0pre (Custom Build) | MIT - */ - - function isEventSupported(eventNameSuffix) { - if (!canUseDOM) { - return false; - } - - var eventName = 'on' + eventNameSuffix; - var isSupported = (eventName in document); - - if (!isSupported) { - var element = document.createElement('div'); - element.setAttribute(eventName, 'return;'); - isSupported = typeof element[eventName] === 'function'; - } - - return isSupported; - } - - function registerEvents$1() { - registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']); - } - - function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) { - // Flag this event loop as needing state restore. - enqueueStateRestore(target); - var listeners = accumulateTwoPhaseListeners(inst, 'onChange'); - - if (listeners.length > 0) { - var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target); - dispatchQueue.push({ - event: event, - listeners: listeners - }); - } - } - /** - * For IE shims - */ - - - var activeElement = null; - var activeElementInst = null; - /** - * SECTION: handle `change` event - */ - - function shouldUseChangeEvent(elem) { - var nodeName = elem.nodeName && elem.nodeName.toLowerCase(); - return nodeName === 'select' || nodeName === 'input' && elem.type === 'file'; - } - - function manualDispatchChangeEvent(nativeEvent) { - var dispatchQueue = []; - createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the - // other events and have it go through ReactBrowserEventEmitter. Since it - // doesn't, we manually listen for the events and so we have to enqueue and - // process the abstract event manually. - // - // Batching is necessary here in order to ensure that all event handlers run - // before the next rerender (including event handlers attached to ancestor - // elements instead of directly on the input). Without this, controlled - // components don't work properly in conjunction with event bubbling because - // the component is rerendered and the value reverted before all the event - // handlers can run. See https://github.com/facebook/react/issues/708. - - batchedUpdates(runEventInBatch, dispatchQueue); - } - - function runEventInBatch(dispatchQueue) { - processDispatchQueue(dispatchQueue, 0); - } - - function getInstIfValueChanged(targetInst) { - var targetNode = getNodeFromInstance(targetInst); - - if (updateValueIfChanged(targetNode)) { - return targetInst; - } - } - - function getTargetInstForChangeEvent(domEventName, targetInst) { - if (domEventName === 'change') { - return targetInst; - } - } - /** - * SECTION: handle `input` event - */ - - - var isInputEventSupported = false; - - if (canUseDOM) { - // IE9 claims to support the input event but fails to trigger it when - // deleting text, so we ignore its input events. - isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9); - } - /** - * (For IE <=9) Starts tracking propertychange events on the passed-in element - * and override the value property so that we can distinguish user events from - * value changes in JS. - */ - - - function startWatchingForValueChange(target, targetInst) { - activeElement = target; - activeElementInst = targetInst; - activeElement.attachEvent('onpropertychange', handlePropertyChange); - } - /** - * (For IE <=9) Removes the event listeners from the currently-tracked element, - * if any exists. - */ - - - function stopWatchingForValueChange() { - if (!activeElement) { - return; - } - - activeElement.detachEvent('onpropertychange', handlePropertyChange); - activeElement = null; - activeElementInst = null; - } - /** - * (For IE <=9) Handles a propertychange event, sending a `change` event if - * the value of the active element has changed. - */ - - - function handlePropertyChange(nativeEvent) { - if (nativeEvent.propertyName !== 'value') { - return; - } - - if (getInstIfValueChanged(activeElementInst)) { - manualDispatchChangeEvent(nativeEvent); - } - } - - function handleEventsForInputEventPolyfill(domEventName, target, targetInst) { - if (domEventName === 'focusin') { - // In IE9, propertychange fires for most input events but is buggy and - // doesn't fire when text is deleted, but conveniently, selectionchange - // appears to fire in all of the remaining cases so we catch those and - // forward the event if the value has changed - // In either case, we don't want to call the event handler if the value - // is changed from JS so we redefine a setter for `.value` that updates - // our activeElementValue variable, allowing us to ignore those changes - // - // stopWatching() should be a noop here but we call it just in case we - // missed a blur event somehow. - stopWatchingForValueChange(); - startWatchingForValueChange(target, targetInst); - } else if (domEventName === 'focusout') { - stopWatchingForValueChange(); - } - } // For IE8 and IE9. - - - function getTargetInstForInputEventPolyfill(domEventName, targetInst) { - if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') { - // On the selectionchange event, the target is just document which isn't - // helpful for us so just check activeElement instead. - // - // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire - // propertychange on the first input event after setting `value` from a - // script and fires only keydown, keypress, keyup. Catching keyup usually - // gets it and catching keydown lets us fire an event for the first - // keystroke if user does a key repeat (it'll be a little delayed: right - // before the second keystroke). Other input methods (e.g., paste) seem to - // fire selectionchange normally. - return getInstIfValueChanged(activeElementInst); - } - } - /** - * SECTION: handle `click` event - */ - - - function shouldUseClickEvent(elem) { - // Use the `click` event to detect changes to checkbox and radio inputs. - // This approach works across all browsers, whereas `change` does not fire - // until `blur` in IE8. - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio'); - } - - function getTargetInstForClickEvent(domEventName, targetInst) { - if (domEventName === 'click') { - return getInstIfValueChanged(targetInst); - } - } - - function getTargetInstForInputOrChangeEvent(domEventName, targetInst) { - if (domEventName === 'input' || domEventName === 'change') { - return getInstIfValueChanged(targetInst); - } - } - - function handleControlledInputBlur(node) { - var state = node._wrapperState; - - if (!state || !state.controlled || node.type !== 'number') { - return; - } - - { - // If controlled, assign the value attribute to the current value on blur - setDefaultValue(node, 'number', node.value); - } - } - /** - * This plugin creates an `onChange` event that normalizes change events - * across form elements. This event fires at a time when it's possible to - * change the element's value without seeing a flicker. - * - * Supported elements are: - * - input (see `isTextInputElement`) - * - textarea - * - select - */ - - - function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { - var targetNode = targetInst ? getNodeFromInstance(targetInst) : window; - var getTargetInstFunc, handleEventFunc; - - if (shouldUseChangeEvent(targetNode)) { - getTargetInstFunc = getTargetInstForChangeEvent; - } else if (isTextInputElement(targetNode)) { - if (isInputEventSupported) { - getTargetInstFunc = getTargetInstForInputOrChangeEvent; - } else { - getTargetInstFunc = getTargetInstForInputEventPolyfill; - handleEventFunc = handleEventsForInputEventPolyfill; - } - } else if (shouldUseClickEvent(targetNode)) { - getTargetInstFunc = getTargetInstForClickEvent; - } - - if (getTargetInstFunc) { - var inst = getTargetInstFunc(domEventName, targetInst); - - if (inst) { - createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget); - return; - } - } - - if (handleEventFunc) { - handleEventFunc(domEventName, targetNode, targetInst); - } // When blurring, set the value attribute for number inputs - - - if (domEventName === 'focusout') { - handleControlledInputBlur(targetNode); - } - } - - function registerEvents$2() { - registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']); - registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']); - registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']); - registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']); - } - /** - * For almost every interaction we care about, there will be both a top-level - * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that - * we do not extract duplicate events. However, moving the mouse into the - * browser from outside will not fire a `mouseout` event. In this case, we use - * the `mouseover` top-level event. - */ - - - function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { - var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover'; - var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout'; - - if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) { - // If this is an over event with a target, we might have already dispatched - // the event in the out event of the other target. If this is replayed, - // then it's because we couldn't dispatch against this target previously - // so we have to do it now instead. - var related = nativeEvent.relatedTarget || nativeEvent.fromElement; - - if (related) { - // If the related node is managed by React, we can assume that we have - // already dispatched the corresponding events during its mouseout. - if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) { - return; - } - } - } - - if (!isOutEvent && !isOverEvent) { - // Must not be a mouse or pointer in or out - ignoring. - return; - } - - var win; // TODO: why is this nullable in the types but we read from it? - - if (nativeEventTarget.window === nativeEventTarget) { - // `nativeEventTarget` is probably a window object. - win = nativeEventTarget; - } else { - // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. - var doc = nativeEventTarget.ownerDocument; - - if (doc) { - win = doc.defaultView || doc.parentWindow; - } else { - win = window; - } - } - - var from; - var to; - - if (isOutEvent) { - var _related = nativeEvent.relatedTarget || nativeEvent.toElement; - - from = targetInst; - to = _related ? getClosestInstanceFromNode(_related) : null; - - if (to !== null) { - var nearestMounted = getNearestMountedFiber(to); - - if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) { - to = null; - } - } - } else { - // Moving to a node from outside the window. - from = null; - to = targetInst; - } - - if (from === to) { - // Nothing pertains to our managed components. - return; - } - - var SyntheticEventCtor = SyntheticMouseEvent; - var leaveEventType = 'onMouseLeave'; - var enterEventType = 'onMouseEnter'; - var eventTypePrefix = 'mouse'; - - if (domEventName === 'pointerout' || domEventName === 'pointerover') { - SyntheticEventCtor = SyntheticPointerEvent; - leaveEventType = 'onPointerLeave'; - enterEventType = 'onPointerEnter'; - eventTypePrefix = 'pointer'; - } - - var fromNode = from == null ? win : getNodeFromInstance(from); - var toNode = to == null ? win : getNodeFromInstance(to); - var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget); - leave.target = fromNode; - leave.relatedTarget = toNode; - var enter = null; // We should only process this nativeEvent if we are processing - // the first ancestor. Next time, we will ignore the event. - - var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget); - - if (nativeTargetInst === targetInst) { - var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget); - enterEvent.target = toNode; - enterEvent.relatedTarget = fromNode; - enter = enterEvent; - } - - accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to); - } - - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - function is(x, y) { - return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare - ; - } - - var objectIs = typeof Object.is === 'function' ? Object.is : is; - - var hasOwnProperty$2 = Object.prototype.hasOwnProperty; - /** - * Performs equality by iterating through keys on an object and returning false - * when any key has values which are not strictly equal between the arguments. - * Returns true when the values of all keys are strictly equal. - */ - - function shallowEqual(objA, objB) { - if (objectIs(objA, objB)) { - return true; - } - - if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { - return false; - } - - var keysA = Object.keys(objA); - var keysB = Object.keys(objB); - - if (keysA.length !== keysB.length) { - return false; - } // Test for A's keys different from B. - - - for (var i = 0; i < keysA.length; i++) { - if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) { - return false; - } - } - - return true; - } - - /** - * Given any node return the first leaf node without children. - * - * @param {DOMElement|DOMTextNode} node - * @return {DOMElement|DOMTextNode} - */ - - function getLeafNode(node) { - while (node && node.firstChild) { - node = node.firstChild; - } - - return node; - } - /** - * Get the next sibling within a container. This will walk up the - * DOM if a node's siblings have been exhausted. - * - * @param {DOMElement|DOMTextNode} node - * @return {?DOMElement|DOMTextNode} - */ - - - function getSiblingNode(node) { - while (node) { - if (node.nextSibling) { - return node.nextSibling; - } - - node = node.parentNode; - } - } - /** - * Get object describing the nodes which contain characters at offset. - * - * @param {DOMElement|DOMTextNode} root - * @param {number} offset - * @return {?object} - */ - - - function getNodeForCharacterOffset(root, offset) { - var node = getLeafNode(root); - var nodeStart = 0; - var nodeEnd = 0; - - while (node) { - if (node.nodeType === TEXT_NODE) { - nodeEnd = nodeStart + node.textContent.length; - - if (nodeStart <= offset && nodeEnd >= offset) { - return { - node: node, - offset: offset - nodeStart - }; - } - - nodeStart = nodeEnd; - } - - node = getLeafNode(getSiblingNode(node)); - } - } - - /** - * @param {DOMElement} outerNode - * @return {?object} - */ - - function getOffsets(outerNode) { - var ownerDocument = outerNode.ownerDocument; - var win = ownerDocument && ownerDocument.defaultView || window; - var selection = win.getSelection && win.getSelection(); - - if (!selection || selection.rangeCount === 0) { - return null; - } - - var anchorNode = selection.anchorNode, - anchorOffset = selection.anchorOffset, - focusNode = selection.focusNode, - focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the - // up/down buttons on an <input type="number">. Anonymous divs do not seem to - // expose properties, triggering a "Permission denied error" if any of its - // properties are accessed. The only seemingly possible way to avoid erroring - // is to access a property that typically works for non-anonymous divs and - // catch any error that may otherwise arise. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=208427 - - try { - /* eslint-disable no-unused-expressions */ - anchorNode.nodeType; - focusNode.nodeType; - /* eslint-enable no-unused-expressions */ - } catch (e) { - return null; - } - - return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset); - } - /** - * Returns {start, end} where `start` is the character/codepoint index of - * (anchorNode, anchorOffset) within the textContent of `outerNode`, and - * `end` is the index of (focusNode, focusOffset). - * - * Returns null if you pass in garbage input but we should probably just crash. - * - * Exported only for testing. - */ - - function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) { - var length = 0; - var start = -1; - var end = -1; - var indexWithinAnchor = 0; - var indexWithinFocus = 0; - var node = outerNode; - var parentNode = null; - - outer: while (true) { - var next = null; - - while (true) { - if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) { - start = length + anchorOffset; - } - - if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) { - end = length + focusOffset; - } - - if (node.nodeType === TEXT_NODE) { - length += node.nodeValue.length; - } - - if ((next = node.firstChild) === null) { - break; - } // Moving from `node` to its first child `next`. - - - parentNode = node; - node = next; - } - - while (true) { - if (node === outerNode) { - // If `outerNode` has children, this is always the second time visiting - // it. If it has no children, this is still the first loop, and the only - // valid selection is anchorNode and focusNode both equal to this node - // and both offsets 0, in which case we will have handled above. - break outer; - } - - if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) { - start = length; - } - - if (parentNode === focusNode && ++indexWithinFocus === focusOffset) { - end = length; - } - - if ((next = node.nextSibling) !== null) { - break; - } - - node = parentNode; - parentNode = node.parentNode; - } // Moving from `node` to its next sibling `next`. - - - node = next; - } - - if (start === -1 || end === -1) { - // This should never happen. (Would happen if the anchor/focus nodes aren't - // actually inside the passed-in node.) - return null; - } - - return { - start: start, - end: end - }; - } - /** - * In modern non-IE browsers, we can support both forward and backward - * selections. - * - * Note: IE10+ supports the Selection object, but it does not support - * the `extend` method, which means that even in modern IE, it's not possible - * to programmatically create a backward selection. Thus, for all IE - * versions, we use the old IE API to create our selections. - * - * @param {DOMElement|DOMTextNode} node - * @param {object} offsets - */ - - function setOffsets(node, offsets) { - var doc = node.ownerDocument || document; - var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios. - // (For instance: TinyMCE editor used in a list component that supports pasting to add more, - // fails when pasting 100+ items) - - if (!win.getSelection) { - return; - } - - var selection = win.getSelection(); - var length = node.textContent.length; - var start = Math.min(offsets.start, length); - var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method. - // Flip backward selections, so we can set with a single range. - - if (!selection.extend && start > end) { - var temp = end; - end = start; - start = temp; - } - - var startMarker = getNodeForCharacterOffset(node, start); - var endMarker = getNodeForCharacterOffset(node, end); - - if (startMarker && endMarker) { - if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) { - return; - } - - var range = doc.createRange(); - range.setStart(startMarker.node, startMarker.offset); - selection.removeAllRanges(); - - if (start > end) { - selection.addRange(range); - selection.extend(endMarker.node, endMarker.offset); - } else { - range.setEnd(endMarker.node, endMarker.offset); - selection.addRange(range); - } - } - } - - function isTextNode(node) { - return node && node.nodeType === TEXT_NODE; - } - - function containsNode(outerNode, innerNode) { - if (!outerNode || !innerNode) { - return false; - } else if (outerNode === innerNode) { - return true; - } else if (isTextNode(outerNode)) { - return false; - } else if (isTextNode(innerNode)) { - return containsNode(outerNode, innerNode.parentNode); - } else if ('contains' in outerNode) { - return outerNode.contains(innerNode); - } else if (outerNode.compareDocumentPosition) { - return !!(outerNode.compareDocumentPosition(innerNode) & 16); - } else { - return false; - } - } - - function isInDocument(node) { - return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node); - } - - function isSameOriginFrame(iframe) { - try { - // Accessing the contentDocument of a HTMLIframeElement can cause the browser - // to throw, e.g. if it has a cross-origin src attribute. - // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g: - // iframe.contentDocument.defaultView; - // A safety way is to access one of the cross origin properties: Window or Location - // Which might result in "SecurityError" DOM Exception and it is compatible to Safari. - // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl - return typeof iframe.contentWindow.location.href === 'string'; - } catch (err) { - return false; - } - } - - function getActiveElementDeep() { - var win = window; - var element = getActiveElement(); - - while (element instanceof win.HTMLIFrameElement) { - if (isSameOriginFrame(element)) { - win = element.contentWindow; - } else { - return element; - } - - element = getActiveElement(win.document); - } - - return element; - } - /** - * @ReactInputSelection: React input selection module. Based on Selection.js, - * but modified to be suitable for react and has a couple of bug fixes (doesn't - * assume buttons have range selections allowed). - * Input selection module for React. - */ - - /** - * @hasSelectionCapabilities: we get the element types that support selection - * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart` - * and `selectionEnd` rows. - */ - - - function hasSelectionCapabilities(elem) { - var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); - return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true'); - } - function getSelectionInformation() { - var focusedElem = getActiveElementDeep(); - return { - focusedElem: focusedElem, - selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null - }; - } - /** - * @restoreSelection: If any selection information was potentially lost, - * restore it. This is useful when performing operations that could remove dom - * nodes and place them back in, resulting in focus being lost. - */ - - function restoreSelection(priorSelectionInformation) { - var curFocusedElem = getActiveElementDeep(); - var priorFocusedElem = priorSelectionInformation.focusedElem; - var priorSelectionRange = priorSelectionInformation.selectionRange; - - if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) { - if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) { - setSelection(priorFocusedElem, priorSelectionRange); - } // Focusing a node can change the scroll position, which is undesirable - - - var ancestors = []; - var ancestor = priorFocusedElem; - - while (ancestor = ancestor.parentNode) { - if (ancestor.nodeType === ELEMENT_NODE) { - ancestors.push({ - element: ancestor, - left: ancestor.scrollLeft, - top: ancestor.scrollTop - }); - } - } - - if (typeof priorFocusedElem.focus === 'function') { - priorFocusedElem.focus(); - } - - for (var i = 0; i < ancestors.length; i++) { - var info = ancestors[i]; - info.element.scrollLeft = info.left; - info.element.scrollTop = info.top; - } - } - } - /** - * @getSelection: Gets the selection bounds of a focused textarea, input or - * contentEditable node. - * -@input: Look up selection bounds of this input - * -@return {start: selectionStart, end: selectionEnd} - */ - - function getSelection(input) { - var selection; - - if ('selectionStart' in input) { - // Modern browser with input or textarea. - selection = { - start: input.selectionStart, - end: input.selectionEnd - }; - } else { - // Content editable or old IE textarea. - selection = getOffsets(input); - } - - return selection || { - start: 0, - end: 0 - }; - } - /** - * @setSelection: Sets the selection bounds of a textarea or input and focuses - * the input. - * -@input Set selection bounds of this input or textarea - * -@offsets Object of same form that is returned from get* - */ - - function setSelection(input, offsets) { - var start = offsets.start; - var end = offsets.end; - - if (end === undefined) { - end = start; - } - - if ('selectionStart' in input) { - input.selectionStart = start; - input.selectionEnd = Math.min(end, input.value.length); - } else { - setOffsets(input, offsets); - } - } - - var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11; - - function registerEvents$3() { - registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']); - } - - var activeElement$1 = null; - var activeElementInst$1 = null; - var lastSelection = null; - var mouseDown = false; - /** - * Get an object which is a unique representation of the current selection. - * - * The return value will not be consistent across nodes or browsers, but - * two identical selections on the same node will return identical objects. - */ - - function getSelection$1(node) { - if ('selectionStart' in node && hasSelectionCapabilities(node)) { - return { - start: node.selectionStart, - end: node.selectionEnd - }; - } else { - var win = node.ownerDocument && node.ownerDocument.defaultView || window; - var selection = win.getSelection(); - return { - anchorNode: selection.anchorNode, - anchorOffset: selection.anchorOffset, - focusNode: selection.focusNode, - focusOffset: selection.focusOffset - }; - } - } - /** - * Get document associated with the event target. - */ - - - function getEventTargetDocument(eventTarget) { - return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument; - } - /** - * Poll selection to see whether it's changed. - * - * @param {object} nativeEvent - * @param {object} nativeEventTarget - * @return {?SyntheticEvent} - */ - - - function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) { - // Ensure we have the right element, and that the user is not dragging a - // selection (this matches native `select` event behavior). In HTML5, select - // fires only on input and textarea thus if there's no focused element we - // won't dispatch. - var doc = getEventTargetDocument(nativeEventTarget); - - if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) { - return; - } // Only fire when selection has actually changed. - - - var currentSelection = getSelection$1(activeElement$1); - - if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { - lastSelection = currentSelection; - var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect'); - - if (listeners.length > 0) { - var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget); - dispatchQueue.push({ - event: event, - listeners: listeners - }); - event.target = activeElement$1; - } - } - } - /** - * This plugin creates an `onSelect` event that normalizes select events - * across form elements. - * - * Supported elements are: - * - input (see `isTextInputElement`) - * - textarea - * - contentEditable - * - * This differs from native browser implementations in the following ways: - * - Fires on contentEditable fields as well as inputs. - * - Fires for collapsed selection. - * - Fires after user input. - */ - - - function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { - - var targetNode = targetInst ? getNodeFromInstance(targetInst) : window; - - switch (domEventName) { - // Track the input node that has focus. - case 'focusin': - if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') { - activeElement$1 = targetNode; - activeElementInst$1 = targetInst; - lastSelection = null; - } - - break; - - case 'focusout': - activeElement$1 = null; - activeElementInst$1 = null; - lastSelection = null; - break; - // Don't fire the event while the user is dragging. This matches the - // semantics of the native select event. - - case 'mousedown': - mouseDown = true; - break; - - case 'contextmenu': - case 'mouseup': - case 'dragend': - mouseDown = false; - constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget); - break; - // Chrome and IE fire non-standard event when selection is changed (and - // sometimes when it hasn't). IE's event fires out of order with respect - // to key and input events on deletion, so we discard it. - // - // Firefox doesn't support selectionchange, so check selection status - // after each key entry. The selection changes after keydown and before - // keyup, but we check on keydown as well in the case of holding down a - // key, when multiple keydown events are fired but only one keyup is. - // This is also our approach for IE handling, for the reason above. - - case 'selectionchange': - if (skipSelectionChangeEvent) { - break; - } - - // falls through - - case 'keydown': - case 'keyup': - constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget); - } - } - - function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { - var reactName = topLevelEventsToReactNames.get(domEventName); - - if (reactName === undefined) { - return; - } - - var SyntheticEventCtor = SyntheticEvent; - var reactEventType = domEventName; - - switch (domEventName) { - case 'keypress': - // Firefox creates a keypress event for function keys too. This removes - // the unwanted keypress events. Enter is however both printable and - // non-printable. One would expect Tab to be as well (but it isn't). - if (getEventCharCode(nativeEvent) === 0) { - return; - } - - /* falls through */ - - case 'keydown': - case 'keyup': - SyntheticEventCtor = SyntheticKeyboardEvent; - break; - - case 'focusin': - reactEventType = 'focus'; - SyntheticEventCtor = SyntheticFocusEvent; - break; - - case 'focusout': - reactEventType = 'blur'; - SyntheticEventCtor = SyntheticFocusEvent; - break; - - case 'beforeblur': - case 'afterblur': - SyntheticEventCtor = SyntheticFocusEvent; - break; - - case 'click': - // Firefox creates a click event on right mouse clicks. This removes the - // unwanted click events. - if (nativeEvent.button === 2) { - return; - } - - /* falls through */ - - case 'auxclick': - case 'dblclick': - case 'mousedown': - case 'mousemove': - case 'mouseup': // TODO: Disabled elements should not respond to mouse events - - /* falls through */ - - case 'mouseout': - case 'mouseover': - case 'contextmenu': - SyntheticEventCtor = SyntheticMouseEvent; - break; - - case 'drag': - case 'dragend': - case 'dragenter': - case 'dragexit': - case 'dragleave': - case 'dragover': - case 'dragstart': - case 'drop': - SyntheticEventCtor = SyntheticDragEvent; - break; - - case 'touchcancel': - case 'touchend': - case 'touchmove': - case 'touchstart': - SyntheticEventCtor = SyntheticTouchEvent; - break; - - case ANIMATION_END: - case ANIMATION_ITERATION: - case ANIMATION_START: - SyntheticEventCtor = SyntheticAnimationEvent; - break; - - case TRANSITION_END: - SyntheticEventCtor = SyntheticTransitionEvent; - break; - - case 'scroll': - SyntheticEventCtor = SyntheticUIEvent; - break; - - case 'wheel': - SyntheticEventCtor = SyntheticWheelEvent; - break; - - case 'copy': - case 'cut': - case 'paste': - SyntheticEventCtor = SyntheticClipboardEvent; - break; - - case 'gotpointercapture': - case 'lostpointercapture': - case 'pointercancel': - case 'pointerdown': - case 'pointermove': - case 'pointerout': - case 'pointerover': - case 'pointerup': - SyntheticEventCtor = SyntheticPointerEvent; - break; - } - - var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0; - - { - // Some events don't bubble in the browser. - // In the past, React has always bubbled them, but this can be surprising. - // We're going to try aligning closer to the browser behavior by not bubbling - // them in React either. We'll start by not bubbling onScroll, and then expand. - var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from - // nonDelegatedEvents list in DOMPluginEventSystem. - // Then we can remove this special list. - // This is a breaking change that can wait until React 18. - domEventName === 'scroll'; - - var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly); - - if (_listeners.length > 0) { - // Intentionally create event lazily. - var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget); - - dispatchQueue.push({ - event: _event, - listeners: _listeners - }); - } - } - } - - // TODO: remove top-level side effect. - registerSimpleEvents(); - registerEvents$2(); - registerEvents$1(); - registerEvents$3(); - registerEvents(); - - function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) { - // TODO: we should remove the concept of a "SimpleEventPlugin". - // This is the basic functionality of the event system. All - // the other plugins are essentially polyfills. So the plugin - // should probably be inlined somewhere and have its logic - // be core the to event system. This would potentially allow - // us to ship builds of React without the polyfilled plugins below. - extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags); - var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the - // event's native "bubble" phase, which means that we're - // not in the capture phase. That's because we emulate - // the capture phase here still. This is a trade-off, - // because in an ideal world we would not emulate and use - // the phases properly, like we do with the SimpleEvent - // plugin. However, the plugins below either expect - // emulation (EnterLeave) or use state localized to that - // plugin (BeforeInput, Change, Select). The state in - // these modules complicates things, as you'll essentially - // get the case where the capture phase event might change - // state, only for the following bubble event to come in - // later and not trigger anything as the state now - // invalidates the heuristics of the event plugin. We - // could alter all these plugins to work in such ways, but - // that might cause other unknown side-effects that we - // can't forsee right now. - - if (shouldProcessPolyfillPlugins) { - extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags); - extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); - extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); - extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget); - } - } // List of events that need to be individually attached to media elements. - - - var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather - // set them on the actual target element itself. This is primarily - // because these events do not consistently bubble in the DOM. - - var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes)); - - function executeDispatch(event, listener, currentTarget) { - var type = event.type || 'unknown-event'; - event.currentTarget = currentTarget; - invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event); - event.currentTarget = null; - } - - function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) { - var previousInstance; - - if (inCapturePhase) { - for (var i = dispatchListeners.length - 1; i >= 0; i--) { - var _dispatchListeners$i = dispatchListeners[i], - instance = _dispatchListeners$i.instance, - currentTarget = _dispatchListeners$i.currentTarget, - listener = _dispatchListeners$i.listener; - - if (instance !== previousInstance && event.isPropagationStopped()) { - return; - } - - executeDispatch(event, listener, currentTarget); - previousInstance = instance; - } - } else { - for (var _i = 0; _i < dispatchListeners.length; _i++) { - var _dispatchListeners$_i = dispatchListeners[_i], - _instance = _dispatchListeners$_i.instance, - _currentTarget = _dispatchListeners$_i.currentTarget, - _listener = _dispatchListeners$_i.listener; - - if (_instance !== previousInstance && event.isPropagationStopped()) { - return; - } - - executeDispatch(event, _listener, _currentTarget); - previousInstance = _instance; - } - } - } - - function processDispatchQueue(dispatchQueue, eventSystemFlags) { - var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0; - - for (var i = 0; i < dispatchQueue.length; i++) { - var _dispatchQueue$i = dispatchQueue[i], - event = _dispatchQueue$i.event, - listeners = _dispatchQueue$i.listeners; - processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling. - } // This would be a good time to rethrow if any of the event handlers threw. - - - rethrowCaughtError(); - } - - function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) { - var nativeEventTarget = getEventTarget(nativeEvent); - var dispatchQueue = []; - extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags); - processDispatchQueue(dispatchQueue, eventSystemFlags); - } - - function listenToNonDelegatedEvent(domEventName, targetElement) { - var isCapturePhaseListener = false; - var listenerSet = getEventListenerSet(targetElement); - var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); - - if (!listenerSet.has(listenerSetKey)) { - addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener); - listenerSet.add(listenerSetKey); - } - } - var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2); - function listenToAllSupportedEvents(rootContainerElement) { - { - if (rootContainerElement[listeningMarker]) { - // Performance optimization: don't iterate through events - // for the same portal container or root node more than once. - // TODO: once we remove the flag, we may be able to also - // remove some of the bookkeeping maps used for laziness. - return; - } - - rootContainerElement[listeningMarker] = true; - allNativeEvents.forEach(function (domEventName) { - if (!nonDelegatedEvents.has(domEventName)) { - listenToNativeEvent(domEventName, false, rootContainerElement, null); - } - - listenToNativeEvent(domEventName, true, rootContainerElement, null); - }); - } - } - function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) { - var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; - var target = rootContainerElement; // selectionchange needs to be attached to the document - // otherwise it won't capture incoming events that are only - // triggered on the document directly. - - if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) { - target = rootContainerElement.ownerDocument; - } // If the event can be delegated (or is capture phase), we can - // register it to the root container. Otherwise, we should - // register the event to the target element and mark it as - // a non-delegated event. - - - if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) { - // For all non-delegated events, apart from scroll, we attach - // their event listeners to the respective elements that their - // events fire on. That means we can skip this step, as event - // listener has already been added previously. However, we - // special case the scroll event because the reality is that any - // element can scroll. - // TODO: ideally, we'd eventually apply the same logic to all - // events from the nonDelegatedEvents list. Then we can remove - // this special case and use the same logic for all events. - if (domEventName !== 'scroll') { - return; - } - - eventSystemFlags |= IS_NON_DELEGATED; - target = targetElement; - } - - var listenerSet = getEventListenerSet(target); - var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then - // we need to trap an event listener onto the target. - - if (!listenerSet.has(listenerSetKey)) { - if (isCapturePhaseListener) { - eventSystemFlags |= IS_CAPTURE_PHASE; - } - - addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener); - listenerSet.add(listenerSetKey); - } - } - - function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) { - var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be - // active and not passive. - - var isPassiveListener = undefined; - - if (passiveBrowserEventsSupported) { - // Browsers introduced an intervention, making these events - // passive by default on document. React doesn't bind them - // to document anymore, but changing this now would undo - // the performance wins from the change. So we emulate - // the existing behavior manually on the roots now. - // https://github.com/facebook/react/issues/19651 - if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') { - isPassiveListener = true; - } - } - - targetContainer = targetContainer; - var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we - - - if (isCapturePhaseListener) { - if (isPassiveListener !== undefined) { - unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener); - } else { - unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener); - } - } else { - if (isPassiveListener !== undefined) { - unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener); - } else { - unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener); - } - } - } - - function isMatchingRootContainer(grandContainer, targetContainer) { - return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer; - } - - function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) { - var ancestorInst = targetInst; - - if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) { - var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we - - if (targetInst !== null) { - // The below logic attempts to work out if we need to change - // the target fiber to a different ancestor. We had similar logic - // in the legacy event system, except the big difference between - // systems is that the modern event system now has an event listener - // attached to each React Root and React Portal Root. Together, - // the DOM nodes representing these roots are the "rootContainer". - // To figure out which ancestor instance we should use, we traverse - // up the fiber tree from the target instance and attempt to find - // root boundaries that match that of our current "rootContainer". - // If we find that "rootContainer", we find the parent fiber - // sub-tree for that root and make that our ancestor instance. - var node = targetInst; - - mainLoop: while (true) { - if (node === null) { - return; - } - - var nodeTag = node.tag; - - if (nodeTag === HostRoot || nodeTag === HostPortal) { - var container = node.stateNode.containerInfo; - - if (isMatchingRootContainer(container, targetContainerNode)) { - break; - } - - if (nodeTag === HostPortal) { - // The target is a portal, but it's not the rootContainer we're looking for. - // Normally portals handle their own events all the way down to the root. - // So we should be able to stop now. However, we don't know if this portal - // was part of *our* root. - var grandNode = node.return; - - while (grandNode !== null) { - var grandTag = grandNode.tag; - - if (grandTag === HostRoot || grandTag === HostPortal) { - var grandContainer = grandNode.stateNode.containerInfo; - - if (isMatchingRootContainer(grandContainer, targetContainerNode)) { - // This is the rootContainer we're looking for and we found it as - // a parent of the Portal. That means we can ignore it because the - // Portal will bubble through to us. - return; - } - } - - grandNode = grandNode.return; - } - } // Now we need to find it's corresponding host fiber in the other - // tree. To do this we can use getClosestInstanceFromNode, but we - // need to validate that the fiber is a host instance, otherwise - // we need to traverse up through the DOM till we find the correct - // node that is from the other tree. - - - while (container !== null) { - var parentNode = getClosestInstanceFromNode(container); - - if (parentNode === null) { - return; - } - - var parentTag = parentNode.tag; - - if (parentTag === HostComponent || parentTag === HostText) { - node = ancestorInst = parentNode; - continue mainLoop; - } - - container = container.parentNode; - } - } - - node = node.return; - } - } - } - - batchedEventUpdates(function () { - return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst); - }); - } - - function createDispatchListener(instance, listener, currentTarget) { - return { - instance: instance, - listener: listener, - currentTarget: currentTarget - }; - } - - function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) { - var captureName = reactName !== null ? reactName + 'Capture' : null; - var reactEventName = inCapturePhase ? captureName : reactName; - var listeners = []; - var instance = targetFiber; - var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path. - - while (instance !== null) { - var _instance2 = instance, - stateNode = _instance2.stateNode, - tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>) - - if (tag === HostComponent && stateNode !== null) { - lastHostComponent = stateNode; // createEventHandle listeners - - - if (reactEventName !== null) { - var listener = getListener(instance, reactEventName); - - if (listener != null) { - listeners.push(createDispatchListener(instance, listener, lastHostComponent)); - } - } - } // If we are only accumulating events for the target, then we don't - // continue to propagate through the React fiber tree to find other - // listeners. - - - if (accumulateTargetOnly) { - break; - } - - instance = instance.return; - } - - return listeners; - } // We should only use this function for: - // - BeforeInputEventPlugin - // - ChangeEventPlugin - // - SelectEventPlugin - // This is because we only process these plugins - // in the bubble phase, so we need to accumulate two - // phase event listeners (via emulation). - - function accumulateTwoPhaseListeners(targetFiber, reactName) { - var captureName = reactName + 'Capture'; - var listeners = []; - var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path. - - while (instance !== null) { - var _instance3 = instance, - stateNode = _instance3.stateNode, - tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>) - - if (tag === HostComponent && stateNode !== null) { - var currentTarget = stateNode; - var captureListener = getListener(instance, captureName); - - if (captureListener != null) { - listeners.unshift(createDispatchListener(instance, captureListener, currentTarget)); - } - - var bubbleListener = getListener(instance, reactName); - - if (bubbleListener != null) { - listeners.push(createDispatchListener(instance, bubbleListener, currentTarget)); - } - } - - instance = instance.return; - } - - return listeners; - } - - function getParent(inst) { - if (inst === null) { - return null; - } - - do { - inst = inst.return; // TODO: If this is a HostRoot we might want to bail out. - // That is depending on if we want nested subtrees (layers) to bubble - // events to their parent. We could also go through parentNode on the - // host node but that wouldn't work for React Native and doesn't let us - // do the portal feature. - } while (inst && inst.tag !== HostComponent); - - if (inst) { - return inst; - } - - return null; - } - /** - * Return the lowest common ancestor of A and B, or null if they are in - * different trees. - */ - - - function getLowestCommonAncestor(instA, instB) { - var nodeA = instA; - var nodeB = instB; - var depthA = 0; - - for (var tempA = nodeA; tempA; tempA = getParent(tempA)) { - depthA++; - } - - var depthB = 0; - - for (var tempB = nodeB; tempB; tempB = getParent(tempB)) { - depthB++; - } // If A is deeper, crawl up. - - - while (depthA - depthB > 0) { - nodeA = getParent(nodeA); - depthA--; - } // If B is deeper, crawl up. - - - while (depthB - depthA > 0) { - nodeB = getParent(nodeB); - depthB--; - } // Walk in lockstep until we find a match. - - - var depth = depthA; - - while (depth--) { - if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) { - return nodeA; - } - - nodeA = getParent(nodeA); - nodeB = getParent(nodeB); - } - - return null; - } - - function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) { - var registrationName = event._reactName; - var listeners = []; - var instance = target; - - while (instance !== null) { - if (instance === common) { - break; - } - - var _instance4 = instance, - alternate = _instance4.alternate, - stateNode = _instance4.stateNode, - tag = _instance4.tag; - - if (alternate !== null && alternate === common) { - break; - } - - if (tag === HostComponent && stateNode !== null) { - var currentTarget = stateNode; - - if (inCapturePhase) { - var captureListener = getListener(instance, registrationName); - - if (captureListener != null) { - listeners.unshift(createDispatchListener(instance, captureListener, currentTarget)); - } - } else if (!inCapturePhase) { - var bubbleListener = getListener(instance, registrationName); - - if (bubbleListener != null) { - listeners.push(createDispatchListener(instance, bubbleListener, currentTarget)); - } - } - } - - instance = instance.return; - } - - if (listeners.length !== 0) { - dispatchQueue.push({ - event: event, - listeners: listeners - }); - } - } // We should only use this function for: - // - EnterLeaveEventPlugin - // This is because we only process this plugin - // in the bubble phase, so we need to accumulate two - // phase event listeners. - - - function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) { - var common = from && to ? getLowestCommonAncestor(from, to) : null; - - if (from !== null) { - accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false); - } - - if (to !== null && enterEvent !== null) { - accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true); - } - } - function getListenerSetKey(domEventName, capture) { - return domEventName + "__" + (capture ? 'capture' : 'bubble'); - } - - var didWarnInvalidHydration = false; - var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML'; - var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning'; - var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning'; - var AUTOFOCUS = 'autoFocus'; - var CHILDREN = 'children'; - var STYLE = 'style'; - var HTML$1 = '__html'; - var HTML_NAMESPACE$1 = Namespaces.html; - var warnedUnknownTags; - var suppressHydrationWarning; - var validatePropertiesInDevelopment; - var warnForTextDifference; - var warnForPropDifference; - var warnForExtraAttributes; - var warnForInvalidEventListener; - var canDiffStyleForHydrationWarning; - var normalizeMarkupForTextOrAttribute; - var normalizeHTML; - - { - warnedUnknownTags = { - // There are working polyfills for <dialog>. Let people use it. - dialog: true, - // Electron ships a custom <webview> tag to display external web content in - // an isolated frame and process. - // This tag is not present in non Electron environments such as JSDom which - // is often used for testing purposes. - // @see https://electronjs.org/docs/api/webview-tag - webview: true - }; - - validatePropertiesInDevelopment = function (type, props) { - validateProperties(type, props); - validateProperties$1(type, props); - validateProperties$2(type, props, { - registrationNameDependencies: registrationNameDependencies, - possibleRegistrationNames: possibleRegistrationNames - }); - }; // IE 11 parses & normalizes the style attribute as opposed to other - // browsers. It adds spaces and sorts the properties in some - // non-alphabetical order. Handling that would require sorting CSS - // properties in the client & server versions or applying - // `expectedStyle` to a temporary DOM node to read its `style` attribute - // normalized. Since it only affects IE, we're skipping style warnings - // in that browser completely in favor of doing all that work. - // See https://github.com/facebook/react/issues/11807 - - - canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF. - // It also can turn \u0000 into \uFFFD inside attributes. - // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream - // If we have a mismatch, it might be caused by that. - // We will still patch up in this case but not fire the warning. - - var NORMALIZE_NEWLINES_REGEX = /\r\n?/g; - var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g; - - normalizeMarkupForTextOrAttribute = function (markup) { - var markupString = typeof markup === 'string' ? markup : '' + markup; - return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, ''); - }; - - warnForTextDifference = function (serverText, clientText) { - if (didWarnInvalidHydration) { - return; - } - - var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText); - var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText); - - if (normalizedServerText === normalizedClientText) { - return; - } - - didWarnInvalidHydration = true; - - error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText); - }; - - warnForPropDifference = function (propName, serverValue, clientValue) { - if (didWarnInvalidHydration) { - return; - } - - var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue); - var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue); - - if (normalizedServerValue === normalizedClientValue) { - return; - } - - didWarnInvalidHydration = true; - - error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue)); - }; - - warnForExtraAttributes = function (attributeNames) { - if (didWarnInvalidHydration) { - return; - } - - didWarnInvalidHydration = true; - var names = []; - attributeNames.forEach(function (name) { - names.push(name); - }); - - error('Extra attributes from the server: %s', names); - }; - - warnForInvalidEventListener = function (registrationName, listener) { - if (listener === false) { - error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName); - } else { - error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener); - } - }; // Parse the HTML and read it back to normalize the HTML string so that it - // can be used for comparison. - - - normalizeHTML = function (parent, html) { - // We could have created a separate document here to avoid - // re-initializing custom elements if they exist. But this breaks - // how <noscript> is being handled. So we use the same document. - // See the discussion in https://github.com/facebook/react/pull/11157. - var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName); - testElement.innerHTML = html; - return testElement.innerHTML; - }; - } - - function getOwnerDocumentFromRootContainer(rootContainerElement) { - return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument; - } - - function noop() {} - - function trapClickOnNonInteractiveElement(node) { - // Mobile Safari does not fire properly bubble click events on - // non-interactive elements, which means delegated click listeners do not - // fire. The workaround for this bug involves attaching an empty click - // listener on the target node. - // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html - // Just set it using the onclick property so that we don't have to manage any - // bookkeeping for it. Not sure if we need to clear it when the listener is - // removed. - // TODO: Only do this for the relevant Safaris maybe? - node.onclick = noop; - } - - function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) { - for (var propKey in nextProps) { - if (!nextProps.hasOwnProperty(propKey)) { - continue; - } - - var nextProp = nextProps[propKey]; - - if (propKey === STYLE) { - { - if (nextProp) { - // Freeze the next style object so that we can assume it won't be - // mutated. We have already warned for this in the past. - Object.freeze(nextProp); - } - } // Relies on `updateStylesByID` not mutating `styleUpdates`. - - - setValueForStyles(domElement, nextProp); - } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { - var nextHtml = nextProp ? nextProp[HTML$1] : undefined; - - if (nextHtml != null) { - setInnerHTML(domElement, nextHtml); - } - } else if (propKey === CHILDREN) { - if (typeof nextProp === 'string') { - // Avoid setting initial textContent when the text is empty. In IE11 setting - // textContent on a <textarea> will cause the placeholder to not - // show within the <textarea> until it has been focused and blurred again. - // https://github.com/facebook/react/issues/6731#issuecomment-254874553 - var canSetTextContent = tag !== 'textarea' || nextProp !== ''; - - if (canSetTextContent) { - setTextContent(domElement, nextProp); - } - } else if (typeof nextProp === 'number') { - setTextContent(domElement, '' + nextProp); - } - } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) { - if (nextProp != null) { - if ( typeof nextProp !== 'function') { - warnForInvalidEventListener(propKey, nextProp); - } - - if (propKey === 'onScroll') { - listenToNonDelegatedEvent('scroll', domElement); - } - } - } else if (nextProp != null) { - setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag); - } - } - } - - function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) { - // TODO: Handle wasCustomComponentTag - for (var i = 0; i < updatePayload.length; i += 2) { - var propKey = updatePayload[i]; - var propValue = updatePayload[i + 1]; - - if (propKey === STYLE) { - setValueForStyles(domElement, propValue); - } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { - setInnerHTML(domElement, propValue); - } else if (propKey === CHILDREN) { - setTextContent(domElement, propValue); - } else { - setValueForProperty(domElement, propKey, propValue, isCustomComponentTag); - } - } - } - - function createElement(type, props, rootContainerElement, parentNamespace) { - var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML - // tags get no namespace. - - var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement); - var domElement; - var namespaceURI = parentNamespace; - - if (namespaceURI === HTML_NAMESPACE$1) { - namespaceURI = getIntrinsicNamespace(type); - } - - if (namespaceURI === HTML_NAMESPACE$1) { - { - isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to - // allow <SVG> or <mATH>. - - if (!isCustomComponentTag && type !== type.toLowerCase()) { - error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type); - } - } - - if (type === 'script') { - // Create the script via .innerHTML so its "parser-inserted" flag is - // set to true and it does not execute - var div = ownerDocument.createElement('div'); - - div.innerHTML = '<script><' + '/script>'; // eslint-disable-line - // This is guaranteed to yield a script element. - - var firstChild = div.firstChild; - domElement = div.removeChild(firstChild); - } else if (typeof props.is === 'string') { - // $FlowIssue `createElement` should be updated for Web Components - domElement = ownerDocument.createElement(type, { - is: props.is - }); - } else { - // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug. - // See discussion in https://github.com/facebook/react/pull/6896 - // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240 - domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size` - // attributes on `select`s needs to be added before `option`s are inserted. - // This prevents: - // - a bug where the `select` does not scroll to the correct option because singular - // `select` elements automatically pick the first item #13222 - // - a bug where the `select` set the first item as selected despite the `size` attribute #14239 - // See https://github.com/facebook/react/issues/13222 - // and https://github.com/facebook/react/issues/14239 - - if (type === 'select') { - var node = domElement; - - if (props.multiple) { - node.multiple = true; - } else if (props.size) { - // Setting a size greater than 1 causes a select to behave like `multiple=true`, where - // it is possible that no option is selected. - // - // This is only necessary when a select in "single selection mode". - node.size = props.size; - } - } - } - } else { - domElement = ownerDocument.createElementNS(namespaceURI, type); - } - - { - if (namespaceURI === HTML_NAMESPACE$1) { - if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) { - warnedUnknownTags[type] = true; - - error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type); - } - } - } - - return domElement; - } - function createTextNode(text, rootContainerElement) { - return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text); - } - function setInitialProperties(domElement, tag, rawProps, rootContainerElement) { - var isCustomComponentTag = isCustomComponent(tag, rawProps); - - { - validatePropertiesInDevelopment(tag, rawProps); - } // TODO: Make sure that we check isMounted before firing any of these events. - - - var props; - - switch (tag) { - case 'dialog': - listenToNonDelegatedEvent('cancel', domElement); - listenToNonDelegatedEvent('close', domElement); - props = rawProps; - break; - - case 'iframe': - case 'object': - case 'embed': - // We listen to this event in case to ensure emulated bubble - // listeners still fire for the load event. - listenToNonDelegatedEvent('load', domElement); - props = rawProps; - break; - - case 'video': - case 'audio': - // We listen to these events in case to ensure emulated bubble - // listeners still fire for all the media events. - for (var i = 0; i < mediaEventTypes.length; i++) { - listenToNonDelegatedEvent(mediaEventTypes[i], domElement); - } - - props = rawProps; - break; - - case 'source': - // We listen to this event in case to ensure emulated bubble - // listeners still fire for the error event. - listenToNonDelegatedEvent('error', domElement); - props = rawProps; - break; - - case 'img': - case 'image': - case 'link': - // We listen to these events in case to ensure emulated bubble - // listeners still fire for error and load events. - listenToNonDelegatedEvent('error', domElement); - listenToNonDelegatedEvent('load', domElement); - props = rawProps; - break; - - case 'details': - // We listen to this event in case to ensure emulated bubble - // listeners still fire for the toggle event. - listenToNonDelegatedEvent('toggle', domElement); - props = rawProps; - break; - - case 'input': - initWrapperState(domElement, rawProps); - props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble - // listeners still fire for the invalid event. - - listenToNonDelegatedEvent('invalid', domElement); - - break; - - case 'option': - validateProps(domElement, rawProps); - props = getHostProps$1(domElement, rawProps); - break; - - case 'select': - initWrapperState$1(domElement, rawProps); - props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble - // listeners still fire for the invalid event. - - listenToNonDelegatedEvent('invalid', domElement); - - break; - - case 'textarea': - initWrapperState$2(domElement, rawProps); - props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble - // listeners still fire for the invalid event. - - listenToNonDelegatedEvent('invalid', domElement); - - break; - - default: - props = rawProps; - } - - assertValidProps(tag, props); - setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag); - - switch (tag) { - case 'input': - // TODO: Make sure we check if this is still unmounted or do any clean - // up necessary since we never stop tracking anymore. - track(domElement); - postMountWrapper(domElement, rawProps, false); - break; - - case 'textarea': - // TODO: Make sure we check if this is still unmounted or do any clean - // up necessary since we never stop tracking anymore. - track(domElement); - postMountWrapper$3(domElement); - break; - - case 'option': - postMountWrapper$1(domElement, rawProps); - break; - - case 'select': - postMountWrapper$2(domElement, rawProps); - break; - - default: - if (typeof props.onClick === 'function') { - // TODO: This cast may not be sound for SVG, MathML or custom elements. - trapClickOnNonInteractiveElement(domElement); - } - - break; - } - } // Calculate the diff between the two objects. - - function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) { - { - validatePropertiesInDevelopment(tag, nextRawProps); - } - - var updatePayload = null; - var lastProps; - var nextProps; - - switch (tag) { - case 'input': - lastProps = getHostProps(domElement, lastRawProps); - nextProps = getHostProps(domElement, nextRawProps); - updatePayload = []; - break; - - case 'option': - lastProps = getHostProps$1(domElement, lastRawProps); - nextProps = getHostProps$1(domElement, nextRawProps); - updatePayload = []; - break; - - case 'select': - lastProps = getHostProps$2(domElement, lastRawProps); - nextProps = getHostProps$2(domElement, nextRawProps); - updatePayload = []; - break; - - case 'textarea': - lastProps = getHostProps$3(domElement, lastRawProps); - nextProps = getHostProps$3(domElement, nextRawProps); - updatePayload = []; - break; - - default: - lastProps = lastRawProps; - nextProps = nextRawProps; - - if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') { - // TODO: This cast may not be sound for SVG, MathML or custom elements. - trapClickOnNonInteractiveElement(domElement); - } - - break; - } - - assertValidProps(tag, nextProps); - var propKey; - var styleName; - var styleUpdates = null; - - for (propKey in lastProps) { - if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) { - continue; - } - - if (propKey === STYLE) { - var lastStyle = lastProps[propKey]; - - for (styleName in lastStyle) { - if (lastStyle.hasOwnProperty(styleName)) { - if (!styleUpdates) { - styleUpdates = {}; - } - - styleUpdates[styleName] = ''; - } - } - } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) { - // This is a special case. If any listener updates we need to ensure - // that the "current" fiber pointer gets updated so we need a commit - // to update this element. - if (!updatePayload) { - updatePayload = []; - } - } else { - // For all other deleted properties we add it to the queue. We use - // the allowed property list in the commit phase instead. - (updatePayload = updatePayload || []).push(propKey, null); - } - } - - for (propKey in nextProps) { - var nextProp = nextProps[propKey]; - var lastProp = lastProps != null ? lastProps[propKey] : undefined; - - if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) { - continue; - } - - if (propKey === STYLE) { - { - if (nextProp) { - // Freeze the next style object so that we can assume it won't be - // mutated. We have already warned for this in the past. - Object.freeze(nextProp); - } - } - - if (lastProp) { - // Unset styles on `lastProp` but not on `nextProp`. - for (styleName in lastProp) { - if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) { - if (!styleUpdates) { - styleUpdates = {}; - } - - styleUpdates[styleName] = ''; - } - } // Update styles that changed since `lastProp`. - - - for (styleName in nextProp) { - if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) { - if (!styleUpdates) { - styleUpdates = {}; - } - - styleUpdates[styleName] = nextProp[styleName]; - } - } - } else { - // Relies on `updateStylesByID` not mutating `styleUpdates`. - if (!styleUpdates) { - if (!updatePayload) { - updatePayload = []; - } - - updatePayload.push(propKey, styleUpdates); - } - - styleUpdates = nextProp; - } - } else if (propKey === DANGEROUSLY_SET_INNER_HTML) { - var nextHtml = nextProp ? nextProp[HTML$1] : undefined; - var lastHtml = lastProp ? lastProp[HTML$1] : undefined; - - if (nextHtml != null) { - if (lastHtml !== nextHtml) { - (updatePayload = updatePayload || []).push(propKey, nextHtml); - } - } - } else if (propKey === CHILDREN) { - if (typeof nextProp === 'string' || typeof nextProp === 'number') { - (updatePayload = updatePayload || []).push(propKey, '' + nextProp); - } - } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) { - if (nextProp != null) { - // We eagerly listen to this even though we haven't committed yet. - if ( typeof nextProp !== 'function') { - warnForInvalidEventListener(propKey, nextProp); - } - - if (propKey === 'onScroll') { - listenToNonDelegatedEvent('scroll', domElement); - } - } - - if (!updatePayload && lastProp !== nextProp) { - // This is a special case. If any listener updates we need to ensure - // that the "current" props pointer gets updated so we need a commit - // to update this element. - updatePayload = []; - } - } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) { - // If we encounter useOpaqueReference's opaque object, this means we are hydrating. - // In this case, call the opaque object's toString function which generates a new client - // ID so client and server IDs match and throws to rerender. - nextProp.toString(); - } else { - // For any other property we always add it to the queue and then we - // filter it out using the allowed property list during the commit. - (updatePayload = updatePayload || []).push(propKey, nextProp); - } - } - - if (styleUpdates) { - { - validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]); - } - - (updatePayload = updatePayload || []).push(STYLE, styleUpdates); - } - - return updatePayload; - } // Apply the diff. - - function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) { - // Update checked *before* name. - // In the middle of an update, it is possible to have multiple checked. - // When a checked radio tries to change name, browser makes another radio's checked false. - if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) { - updateChecked(domElement, nextRawProps); - } - - var wasCustomComponentTag = isCustomComponent(tag, lastRawProps); - var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff. - - updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props - // changed. - - switch (tag) { - case 'input': - // Update the wrapper around inputs *after* updating props. This has to - // happen after `updateDOMProperties`. Otherwise HTML5 input validations - // raise warnings and prevent the new value from being assigned. - updateWrapper(domElement, nextRawProps); - break; - - case 'textarea': - updateWrapper$1(domElement, nextRawProps); - break; - - case 'select': - // <select> value update needs to occur after <option> children - // reconciliation - postUpdateWrapper(domElement, nextRawProps); - break; - } - } - - function getPossibleStandardName(propName) { - { - var lowerCasedName = propName.toLowerCase(); - - if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) { - return null; - } - - return possibleStandardNames[lowerCasedName] || null; - } - } - - function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) { - var isCustomComponentTag; - var extraAttributeNames; - - { - suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true; - isCustomComponentTag = isCustomComponent(tag, rawProps); - validatePropertiesInDevelopment(tag, rawProps); - } // TODO: Make sure that we check isMounted before firing any of these events. - - - switch (tag) { - case 'dialog': - listenToNonDelegatedEvent('cancel', domElement); - listenToNonDelegatedEvent('close', domElement); - break; - - case 'iframe': - case 'object': - case 'embed': - // We listen to this event in case to ensure emulated bubble - // listeners still fire for the load event. - listenToNonDelegatedEvent('load', domElement); - break; - - case 'video': - case 'audio': - // We listen to these events in case to ensure emulated bubble - // listeners still fire for all the media events. - for (var i = 0; i < mediaEventTypes.length; i++) { - listenToNonDelegatedEvent(mediaEventTypes[i], domElement); - } - - break; - - case 'source': - // We listen to this event in case to ensure emulated bubble - // listeners still fire for the error event. - listenToNonDelegatedEvent('error', domElement); - break; - - case 'img': - case 'image': - case 'link': - // We listen to these events in case to ensure emulated bubble - // listeners still fire for error and load events. - listenToNonDelegatedEvent('error', domElement); - listenToNonDelegatedEvent('load', domElement); - break; - - case 'details': - // We listen to this event in case to ensure emulated bubble - // listeners still fire for the toggle event. - listenToNonDelegatedEvent('toggle', domElement); - break; - - case 'input': - initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble - // listeners still fire for the invalid event. - - listenToNonDelegatedEvent('invalid', domElement); - - break; - - case 'option': - validateProps(domElement, rawProps); - break; - - case 'select': - initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble - // listeners still fire for the invalid event. - - listenToNonDelegatedEvent('invalid', domElement); - - break; - - case 'textarea': - initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble - // listeners still fire for the invalid event. - - listenToNonDelegatedEvent('invalid', domElement); - - break; - } - - assertValidProps(tag, rawProps); - - { - extraAttributeNames = new Set(); - var attributes = domElement.attributes; - - for (var _i = 0; _i < attributes.length; _i++) { - var name = attributes[_i].name.toLowerCase(); - - switch (name) { - // Built-in SSR attribute is allowed - case 'data-reactroot': - break; - // Controlled attributes are not validated - // TODO: Only ignore them on controlled tags. - - case 'value': - break; - - case 'checked': - break; - - case 'selected': - break; - - default: - // Intentionally use the original name. - // See discussion in https://github.com/facebook/react/pull/10676. - extraAttributeNames.add(attributes[_i].name); - } - } - } - - var updatePayload = null; - - for (var propKey in rawProps) { - if (!rawProps.hasOwnProperty(propKey)) { - continue; - } - - var nextProp = rawProps[propKey]; - - if (propKey === CHILDREN) { - // For text content children we compare against textContent. This - // might match additional HTML that is hidden when we read it using - // textContent. E.g. "foo" will match "f<span>oo</span>" but that still - // satisfies our requirement. Our requirement is not to produce perfect - // HTML and attributes. Ideally we should preserve structure but it's - // ok not to if the visible content is still enough to indicate what - // even listeners these nodes might be wired up to. - // TODO: Warn if there is more than a single textNode as a child. - // TODO: Should we use domElement.firstChild.nodeValue to compare? - if (typeof nextProp === 'string') { - if (domElement.textContent !== nextProp) { - if ( !suppressHydrationWarning) { - warnForTextDifference(domElement.textContent, nextProp); - } - - updatePayload = [CHILDREN, nextProp]; - } - } else if (typeof nextProp === 'number') { - if (domElement.textContent !== '' + nextProp) { - if ( !suppressHydrationWarning) { - warnForTextDifference(domElement.textContent, nextProp); - } - - updatePayload = [CHILDREN, '' + nextProp]; - } - } - } else if (registrationNameDependencies.hasOwnProperty(propKey)) { - if (nextProp != null) { - if ( typeof nextProp !== 'function') { - warnForInvalidEventListener(propKey, nextProp); - } - - if (propKey === 'onScroll') { - listenToNonDelegatedEvent('scroll', domElement); - } - } - } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.) - typeof isCustomComponentTag === 'boolean') { - // Validate that the properties correspond to their expected values. - var serverValue = void 0; - var propertyInfo = getPropertyInfo(propKey); - - if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated - // TODO: Only ignore them on controlled tags. - propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) { - var serverHTML = domElement.innerHTML; - var nextHtml = nextProp ? nextProp[HTML$1] : undefined; - - if (nextHtml != null) { - var expectedHTML = normalizeHTML(domElement, nextHtml); - - if (expectedHTML !== serverHTML) { - warnForPropDifference(propKey, serverHTML, expectedHTML); - } - } - } else if (propKey === STYLE) { - // $FlowFixMe - Should be inferred as not undefined. - extraAttributeNames.delete(propKey); - - if (canDiffStyleForHydrationWarning) { - var expectedStyle = createDangerousStringForStyles(nextProp); - serverValue = domElement.getAttribute('style'); - - if (expectedStyle !== serverValue) { - warnForPropDifference(propKey, serverValue, expectedStyle); - } - } - } else if (isCustomComponentTag) { - // $FlowFixMe - Should be inferred as not undefined. - extraAttributeNames.delete(propKey.toLowerCase()); - serverValue = getValueForAttribute(domElement, propKey, nextProp); - - if (nextProp !== serverValue) { - warnForPropDifference(propKey, serverValue, nextProp); - } - } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) { - var isMismatchDueToBadCasing = false; - - if (propertyInfo !== null) { - // $FlowFixMe - Should be inferred as not undefined. - extraAttributeNames.delete(propertyInfo.attributeName); - serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo); - } else { - var ownNamespace = parentNamespace; - - if (ownNamespace === HTML_NAMESPACE$1) { - ownNamespace = getIntrinsicNamespace(tag); - } - - if (ownNamespace === HTML_NAMESPACE$1) { - // $FlowFixMe - Should be inferred as not undefined. - extraAttributeNames.delete(propKey.toLowerCase()); - } else { - var standardName = getPossibleStandardName(propKey); - - if (standardName !== null && standardName !== propKey) { - // If an SVG prop is supplied with bad casing, it will - // be successfully parsed from HTML, but will produce a mismatch - // (and would be incorrectly rendered on the client). - // However, we already warn about bad casing elsewhere. - // So we'll skip the misleading extra mismatch warning in this case. - isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined. - - extraAttributeNames.delete(standardName); - } // $FlowFixMe - Should be inferred as not undefined. - - - extraAttributeNames.delete(propKey); - } - - serverValue = getValueForAttribute(domElement, propKey, nextProp); - } - - if (nextProp !== serverValue && !isMismatchDueToBadCasing) { - warnForPropDifference(propKey, serverValue, nextProp); - } - } - } - } - - { - // $FlowFixMe - Should be inferred as not undefined. - if (extraAttributeNames.size > 0 && !suppressHydrationWarning) { - // $FlowFixMe - Should be inferred as not undefined. - warnForExtraAttributes(extraAttributeNames); - } - } - - switch (tag) { - case 'input': - // TODO: Make sure we check if this is still unmounted or do any clean - // up necessary since we never stop tracking anymore. - track(domElement); - postMountWrapper(domElement, rawProps, true); - break; - - case 'textarea': - // TODO: Make sure we check if this is still unmounted or do any clean - // up necessary since we never stop tracking anymore. - track(domElement); - postMountWrapper$3(domElement); - break; - - case 'select': - case 'option': - // For input and textarea we current always set the value property at - // post mount to force it to diverge from attributes. However, for - // option and select we don't quite do the same thing and select - // is not resilient to the DOM state changing so we don't do that here. - // TODO: Consider not doing this for input and textarea. - break; - - default: - if (typeof rawProps.onClick === 'function') { - // TODO: This cast may not be sound for SVG, MathML or custom elements. - trapClickOnNonInteractiveElement(domElement); - } - - break; - } - - return updatePayload; - } - function diffHydratedText(textNode, text) { - var isDifferent = textNode.nodeValue !== text; - return isDifferent; - } - function warnForUnmatchedText(textNode, text) { - { - warnForTextDifference(textNode.nodeValue, text); - } - } - function warnForDeletedHydratableElement(parentNode, child) { - { - if (didWarnInvalidHydration) { - return; - } - - didWarnInvalidHydration = true; - - error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase()); - } - } - function warnForDeletedHydratableText(parentNode, child) { - { - if (didWarnInvalidHydration) { - return; - } - - didWarnInvalidHydration = true; - - error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase()); - } - } - function warnForInsertedHydratedElement(parentNode, tag, props) { - { - if (didWarnInvalidHydration) { - return; - } - - didWarnInvalidHydration = true; - - error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase()); - } - } - function warnForInsertedHydratedText(parentNode, text) { - { - if (text === '') { - // We expect to insert empty text nodes since they're not represented in - // the HTML. - // TODO: Remove this special case if we can just avoid inserting empty - // text nodes. - return; - } - - if (didWarnInvalidHydration) { - return; - } - - didWarnInvalidHydration = true; - - error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase()); - } - } - function restoreControlledState$3(domElement, tag, props) { - switch (tag) { - case 'input': - restoreControlledState(domElement, props); - return; - - case 'textarea': - restoreControlledState$2(domElement, props); - return; - - case 'select': - restoreControlledState$1(domElement, props); - return; - } - } - - var validateDOMNesting = function () {}; - - var updatedAncestorInfo = function () {}; - - { - // This validation code was written based on the HTML5 parsing spec: - // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope - // - // Note: this does not catch all invalid nesting, nor does it try to (as it's - // not clear what practical benefit doing so provides); instead, we warn only - // for cases where the parser will give a parse tree differing from what React - // intended. For example, <b><div></div></b> is invalid but we don't warn - // because it still parses correctly; we do warn for other cases like nested - // <p> tags where the beginning of the second element implicitly closes the - // first, causing a confusing mess. - // https://html.spec.whatwg.org/multipage/syntax.html#special - var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope - - var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point - // TODO: Distinguish by namespace here -- for <title>, including it here - // errs on the side of fewer warnings - 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope - - var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags - - var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt']; - var emptyAncestorInfo = { - current: null, - formTag: null, - aTagInScope: null, - buttonTagInScope: null, - nobrTagInScope: null, - pTagInButtonScope: null, - listItemTagAutoclosing: null, - dlItemTagAutoclosing: null - }; - - updatedAncestorInfo = function (oldInfo, tag) { - var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo); - - var info = { - tag: tag - }; - - if (inScopeTags.indexOf(tag) !== -1) { - ancestorInfo.aTagInScope = null; - ancestorInfo.buttonTagInScope = null; - ancestorInfo.nobrTagInScope = null; - } - - if (buttonScopeTags.indexOf(tag) !== -1) { - ancestorInfo.pTagInButtonScope = null; - } // See rules for 'li', 'dd', 'dt' start tags in - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody - - - if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') { - ancestorInfo.listItemTagAutoclosing = null; - ancestorInfo.dlItemTagAutoclosing = null; - } - - ancestorInfo.current = info; - - if (tag === 'form') { - ancestorInfo.formTag = info; - } - - if (tag === 'a') { - ancestorInfo.aTagInScope = info; - } - - if (tag === 'button') { - ancestorInfo.buttonTagInScope = info; - } - - if (tag === 'nobr') { - ancestorInfo.nobrTagInScope = info; - } - - if (tag === 'p') { - ancestorInfo.pTagInButtonScope = info; - } - - if (tag === 'li') { - ancestorInfo.listItemTagAutoclosing = info; - } - - if (tag === 'dd' || tag === 'dt') { - ancestorInfo.dlItemTagAutoclosing = info; - } - - return ancestorInfo; - }; - /** - * Returns whether - */ - - - var isTagValidWithParent = function (tag, parentTag) { - // First, let's check if we're in an unusual parsing mode... - switch (parentTag) { - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect - case 'select': - return tag === 'option' || tag === 'optgroup' || tag === '#text'; - - case 'optgroup': - return tag === 'option' || tag === '#text'; - // Strictly speaking, seeing an <option> doesn't mean we're in a <select> - // but - - case 'option': - return tag === '#text'; - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption - // No special behavior since these rules fall back to "in body" mode for - // all except special table nodes which cause bad parsing behavior anyway. - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr - - case 'tr': - return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template'; - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody - - case 'tbody': - case 'thead': - case 'tfoot': - return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template'; - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup - - case 'colgroup': - return tag === 'col' || tag === 'template'; - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable - - case 'table': - return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template'; - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead - - case 'head': - return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template'; - // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element - - case 'html': - return tag === 'head' || tag === 'body' || tag === 'frameset'; - - case 'frameset': - return tag === 'frame'; - - case '#document': - return tag === 'html'; - } // Probably in the "in body" parsing mode, so we outlaw only tag combos - // where the parsing rules cause implicit opens or closes to be added. - // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody - - - switch (tag) { - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': - return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6'; - - case 'rp': - case 'rt': - return impliedEndTags.indexOf(parentTag) === -1; - - case 'body': - case 'caption': - case 'col': - case 'colgroup': - case 'frameset': - case 'frame': - case 'head': - case 'html': - case 'tbody': - case 'td': - case 'tfoot': - case 'th': - case 'thead': - case 'tr': - // These tags are only valid with a few parents that have special child - // parsing rules -- if we're down here, then none of those matched and - // so we allow it only if we don't know what the parent is, as all other - // cases are invalid. - return parentTag == null; - } - - return true; - }; - /** - * Returns whether - */ - - - var findInvalidAncestorForTag = function (tag, ancestorInfo) { - switch (tag) { - case 'address': - case 'article': - case 'aside': - case 'blockquote': - case 'center': - case 'details': - case 'dialog': - case 'dir': - case 'div': - case 'dl': - case 'fieldset': - case 'figcaption': - case 'figure': - case 'footer': - case 'header': - case 'hgroup': - case 'main': - case 'menu': - case 'nav': - case 'ol': - case 'p': - case 'section': - case 'summary': - case 'ul': - case 'pre': - case 'listing': - case 'table': - case 'hr': - case 'xmp': - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': - return ancestorInfo.pTagInButtonScope; - - case 'form': - return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope; - - case 'li': - return ancestorInfo.listItemTagAutoclosing; - - case 'dd': - case 'dt': - return ancestorInfo.dlItemTagAutoclosing; - - case 'button': - return ancestorInfo.buttonTagInScope; - - case 'a': - // Spec says something about storing a list of markers, but it sounds - // equivalent to this check. - return ancestorInfo.aTagInScope; - - case 'nobr': - return ancestorInfo.nobrTagInScope; - } - - return null; - }; - - var didWarn$1 = {}; - - validateDOMNesting = function (childTag, childText, ancestorInfo) { - ancestorInfo = ancestorInfo || emptyAncestorInfo; - var parentInfo = ancestorInfo.current; - var parentTag = parentInfo && parentInfo.tag; - - if (childText != null) { - if (childTag != null) { - error('validateDOMNesting: when childText is passed, childTag should be null'); - } - - childTag = '#text'; - } - - var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo; - var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo); - var invalidParentOrAncestor = invalidParent || invalidAncestor; - - if (!invalidParentOrAncestor) { - return; - } - - var ancestorTag = invalidParentOrAncestor.tag; - var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag; - - if (didWarn$1[warnKey]) { - return; - } - - didWarn$1[warnKey] = true; - var tagDisplayName = childTag; - var whitespaceInfo = ''; - - if (childTag === '#text') { - if (/\S/.test(childText)) { - tagDisplayName = 'Text nodes'; - } else { - tagDisplayName = 'Whitespace text nodes'; - whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.'; - } - } else { - tagDisplayName = '<' + childTag + '>'; - } - - if (invalidParent) { - var info = ''; - - if (ancestorTag === 'table' && childTag === 'tr') { - info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.'; - } - - error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info); - } else { - error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag); - } - }; - } - - var SUPPRESS_HYDRATION_WARNING$1; - - { - SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning'; - } - - var SUSPENSE_START_DATA = '$'; - var SUSPENSE_END_DATA = '/$'; - var SUSPENSE_PENDING_START_DATA = '$?'; - var SUSPENSE_FALLBACK_START_DATA = '$!'; - var STYLE$1 = 'style'; - var eventsEnabled = null; - var selectionInformation = null; - - function shouldAutoFocusHostComponent(type, props) { - switch (type) { - case 'button': - case 'input': - case 'select': - case 'textarea': - return !!props.autoFocus; - } - - return false; - } - function getRootHostContext(rootContainerInstance) { - var type; - var namespace; - var nodeType = rootContainerInstance.nodeType; - - switch (nodeType) { - case DOCUMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - { - type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment'; - var root = rootContainerInstance.documentElement; - namespace = root ? root.namespaceURI : getChildNamespace(null, ''); - break; - } - - default: - { - var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance; - var ownNamespace = container.namespaceURI || null; - type = container.tagName; - namespace = getChildNamespace(ownNamespace, type); - break; - } - } - - { - var validatedTag = type.toLowerCase(); - var ancestorInfo = updatedAncestorInfo(null, validatedTag); - return { - namespace: namespace, - ancestorInfo: ancestorInfo - }; - } - } - function getChildHostContext(parentHostContext, type, rootContainerInstance) { - { - var parentHostContextDev = parentHostContext; - var namespace = getChildNamespace(parentHostContextDev.namespace, type); - var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type); - return { - namespace: namespace, - ancestorInfo: ancestorInfo - }; - } - } - function getPublicInstance(instance) { - return instance; - } - function prepareForCommit(containerInfo) { - eventsEnabled = isEnabled(); - selectionInformation = getSelectionInformation(); - var activeInstance = null; - - setEnabled(false); - return activeInstance; - } - function resetAfterCommit(containerInfo) { - restoreSelection(selectionInformation); - setEnabled(eventsEnabled); - eventsEnabled = null; - selectionInformation = null; - } - function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) { - var parentNamespace; - - { - // TODO: take namespace into account when validating. - var hostContextDev = hostContext; - validateDOMNesting(type, null, hostContextDev.ancestorInfo); - - if (typeof props.children === 'string' || typeof props.children === 'number') { - var string = '' + props.children; - var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); - validateDOMNesting(null, string, ownAncestorInfo); - } - - parentNamespace = hostContextDev.namespace; - } - - var domElement = createElement(type, props, rootContainerInstance, parentNamespace); - precacheFiberNode(internalInstanceHandle, domElement); - updateFiberProps(domElement, props); - return domElement; - } - function appendInitialChild(parentInstance, child) { - parentInstance.appendChild(child); - } - function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) { - setInitialProperties(domElement, type, props, rootContainerInstance); - return shouldAutoFocusHostComponent(type, props); - } - function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) { - { - var hostContextDev = hostContext; - - if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) { - var string = '' + newProps.children; - var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type); - validateDOMNesting(null, string, ownAncestorInfo); - } - } - - return diffProperties(domElement, type, oldProps, newProps); - } - function shouldSetTextContent(type, props) { - return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null; - } - function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) { - { - var hostContextDev = hostContext; - validateDOMNesting(null, text, hostContextDev.ancestorInfo); - } - - var textNode = createTextNode(text, rootContainerInstance); - precacheFiberNode(internalInstanceHandle, textNode); - return textNode; - } - // if a component just imports ReactDOM (e.g. for findDOMNode). - // Some environments might not have setTimeout or clearTimeout. - - var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined; - var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined; - var noTimeout = -1; // ------------------- - function commitMount(domElement, type, newProps, internalInstanceHandle) { - // Despite the naming that might imply otherwise, this method only - // fires if there is an `Update` effect scheduled during mounting. - // This happens if `finalizeInitialChildren` returns `true` (which it - // does to implement the `autoFocus` attribute on the client). But - // there are also other cases when this might happen (such as patching - // up text content during hydration mismatch). So we'll check this again. - if (shouldAutoFocusHostComponent(type, newProps)) { - domElement.focus(); - } - } - function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) { - // Update the props handle so that we know which props are the ones with - // with current event handlers. - updateFiberProps(domElement, newProps); // Apply the diff to the DOM node. - - updateProperties(domElement, updatePayload, type, oldProps, newProps); - } - function resetTextContent(domElement) { - setTextContent(domElement, ''); - } - function commitTextUpdate(textInstance, oldText, newText) { - textInstance.nodeValue = newText; - } - function appendChild(parentInstance, child) { - parentInstance.appendChild(child); - } - function appendChildToContainer(container, child) { - var parentNode; - - if (container.nodeType === COMMENT_NODE) { - parentNode = container.parentNode; - parentNode.insertBefore(child, container); - } else { - parentNode = container; - parentNode.appendChild(child); - } // This container might be used for a portal. - // If something inside a portal is clicked, that click should bubble - // through the React tree. However, on Mobile Safari the click would - // never bubble through the *DOM* tree unless an ancestor with onclick - // event exists. So we wouldn't see it and dispatch it. - // This is why we ensure that non React root containers have inline onclick - // defined. - // https://github.com/facebook/react/issues/11918 - - - var reactRootContainer = container._reactRootContainer; - - if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) { - // TODO: This cast may not be sound for SVG, MathML or custom elements. - trapClickOnNonInteractiveElement(parentNode); - } - } - function insertBefore(parentInstance, child, beforeChild) { - parentInstance.insertBefore(child, beforeChild); - } - function insertInContainerBefore(container, child, beforeChild) { - if (container.nodeType === COMMENT_NODE) { - container.parentNode.insertBefore(child, beforeChild); - } else { - container.insertBefore(child, beforeChild); - } - } - - function removeChild(parentInstance, child) { - parentInstance.removeChild(child); - } - function removeChildFromContainer(container, child) { - if (container.nodeType === COMMENT_NODE) { - container.parentNode.removeChild(child); - } else { - container.removeChild(child); - } - } - function hideInstance(instance) { - // TODO: Does this work for all element types? What about MathML? Should we - // pass host context to this method? - instance = instance; - var style = instance.style; - - if (typeof style.setProperty === 'function') { - style.setProperty('display', 'none', 'important'); - } else { - style.display = 'none'; - } - } - function hideTextInstance(textInstance) { - textInstance.nodeValue = ''; - } - function unhideInstance(instance, props) { - instance = instance; - var styleProp = props[STYLE$1]; - var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null; - instance.style.display = dangerousStyleValue('display', display); - } - function unhideTextInstance(textInstance, text) { - textInstance.nodeValue = text; - } - function clearContainer(container) { - if (container.nodeType === ELEMENT_NODE) { - container.textContent = ''; - } else if (container.nodeType === DOCUMENT_NODE) { - var body = container.body; - - if (body != null) { - body.textContent = ''; - } - } - } // ------------------- - function canHydrateInstance(instance, type, props) { - if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) { - return null; - } // This has now been refined to an element node. - - - return instance; - } - function canHydrateTextInstance(instance, text) { - if (text === '' || instance.nodeType !== TEXT_NODE) { - // Empty strings are not parsed by HTML so there won't be a correct match here. - return null; - } // This has now been refined to a text node. - - - return instance; - } - function isSuspenseInstancePending(instance) { - return instance.data === SUSPENSE_PENDING_START_DATA; - } - function isSuspenseInstanceFallback(instance) { - return instance.data === SUSPENSE_FALLBACK_START_DATA; - } - - function getNextHydratable(node) { - // Skip non-hydratable nodes. - for (; node != null; node = node.nextSibling) { - var nodeType = node.nodeType; - - if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) { - break; - } - } - - return node; - } - - function getNextHydratableSibling(instance) { - return getNextHydratable(instance.nextSibling); - } - function getFirstHydratableChild(parentInstance) { - return getNextHydratable(parentInstance.firstChild); - } - function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) { - precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events - // get attached. - - updateFiberProps(instance, props); - var parentNamespace; - - { - var hostContextDev = hostContext; - parentNamespace = hostContextDev.namespace; - } - - return diffHydratedProperties(instance, type, props, parentNamespace); - } - function hydrateTextInstance(textInstance, text, internalInstanceHandle) { - precacheFiberNode(internalInstanceHandle, textInstance); - return diffHydratedText(textInstance, text); - } - function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) { - var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary. - // There might be nested nodes so we need to keep track of how - // deep we are and only break out when we're back on top. - - var depth = 0; - - while (node) { - if (node.nodeType === COMMENT_NODE) { - var data = node.data; - - if (data === SUSPENSE_END_DATA) { - if (depth === 0) { - return getNextHydratableSibling(node); - } else { - depth--; - } - } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) { - depth++; - } - } - - node = node.nextSibling; - } // TODO: Warn, we didn't find the end comment boundary. - - - return null; - } // Returns the SuspenseInstance if this node is a direct child of a - // SuspenseInstance. I.e. if its previous sibling is a Comment with - // SUSPENSE_x_START_DATA. Otherwise, null. - - function getParentSuspenseInstance(targetInstance) { - var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary. - // There might be nested nodes so we need to keep track of how - // deep we are and only break out when we're back on top. - - var depth = 0; - - while (node) { - if (node.nodeType === COMMENT_NODE) { - var data = node.data; - - if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) { - if (depth === 0) { - return node; - } else { - depth--; - } - } else if (data === SUSPENSE_END_DATA) { - depth++; - } - } - - node = node.previousSibling; - } - - return null; - } - function commitHydratedContainer(container) { - // Retry if any event replaying was blocked on this. - retryIfBlockedOn(container); - } - function commitHydratedSuspenseInstance(suspenseInstance) { - // Retry if any event replaying was blocked on this. - retryIfBlockedOn(suspenseInstance); - } - function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) { - { - warnForUnmatchedText(textInstance, text); - } - } - function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) { - if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { - warnForUnmatchedText(textInstance, text); - } - } - function didNotHydrateContainerInstance(parentContainer, instance) { - { - if (instance.nodeType === ELEMENT_NODE) { - warnForDeletedHydratableElement(parentContainer, instance); - } else if (instance.nodeType === COMMENT_NODE) ; else { - warnForDeletedHydratableText(parentContainer, instance); - } - } - } - function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) { - if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { - if (instance.nodeType === ELEMENT_NODE) { - warnForDeletedHydratableElement(parentInstance, instance); - } else if (instance.nodeType === COMMENT_NODE) ; else { - warnForDeletedHydratableText(parentInstance, instance); - } - } - } - function didNotFindHydratableContainerInstance(parentContainer, type, props) { - { - warnForInsertedHydratedElement(parentContainer, type); - } - } - function didNotFindHydratableContainerTextInstance(parentContainer, text) { - { - warnForInsertedHydratedText(parentContainer, text); - } - } - function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) { - if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { - warnForInsertedHydratedElement(parentInstance, type); - } - } - function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) { - if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) { - warnForInsertedHydratedText(parentInstance, text); - } - } - function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) { - if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ; - } - var clientId = 0; - function makeClientIdInDEV(warnOnAccessInDEV) { - var id = 'r:' + (clientId++).toString(36); - return { - toString: function () { - warnOnAccessInDEV(); - return id; - }, - valueOf: function () { - warnOnAccessInDEV(); - return id; - } - }; - } - function isOpaqueHydratingObject(value) { - return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE; - } - function makeOpaqueHydratingObject(attemptToReadValue) { - return { - $$typeof: REACT_OPAQUE_ID_TYPE, - toString: attemptToReadValue, - valueOf: attemptToReadValue - }; - } - function preparePortalMount(portalInstance) { - { - listenToAllSupportedEvents(portalInstance); - } - } - - var randomKey = Math.random().toString(36).slice(2); - var internalInstanceKey = '__reactFiber$' + randomKey; - var internalPropsKey = '__reactProps$' + randomKey; - var internalContainerInstanceKey = '__reactContainer$' + randomKey; - var internalEventHandlersKey = '__reactEvents$' + randomKey; - function precacheFiberNode(hostInst, node) { - node[internalInstanceKey] = hostInst; - } - function markContainerAsRoot(hostRoot, node) { - node[internalContainerInstanceKey] = hostRoot; - } - function unmarkContainerAsRoot(node) { - node[internalContainerInstanceKey] = null; - } - function isContainerMarkedAsRoot(node) { - return !!node[internalContainerInstanceKey]; - } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor. - // If the target node is part of a hydrated or not yet rendered subtree, then - // this may also return a SuspenseComponent or HostRoot to indicate that. - // Conceptually the HostRoot fiber is a child of the Container node. So if you - // pass the Container node as the targetNode, you will not actually get the - // HostRoot back. To get to the HostRoot, you need to pass a child of it. - // The same thing applies to Suspense boundaries. - - function getClosestInstanceFromNode(targetNode) { - var targetInst = targetNode[internalInstanceKey]; - - if (targetInst) { - // Don't return HostRoot or SuspenseComponent here. - return targetInst; - } // If the direct event target isn't a React owned DOM node, we need to look - // to see if one of its parents is a React owned DOM node. - - - var parentNode = targetNode.parentNode; - - while (parentNode) { - // We'll check if this is a container root that could include - // React nodes in the future. We need to check this first because - // if we're a child of a dehydrated container, we need to first - // find that inner container before moving on to finding the parent - // instance. Note that we don't check this field on the targetNode - // itself because the fibers are conceptually between the container - // node and the first child. It isn't surrounding the container node. - // If it's not a container, we check if it's an instance. - targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]; - - if (targetInst) { - // Since this wasn't the direct target of the event, we might have - // stepped past dehydrated DOM nodes to get here. However they could - // also have been non-React nodes. We need to answer which one. - // If we the instance doesn't have any children, then there can't be - // a nested suspense boundary within it. So we can use this as a fast - // bailout. Most of the time, when people add non-React children to - // the tree, it is using a ref to a child-less DOM node. - // Normally we'd only need to check one of the fibers because if it - // has ever gone from having children to deleting them or vice versa - // it would have deleted the dehydrated boundary nested inside already. - // However, since the HostRoot starts out with an alternate it might - // have one on the alternate so we need to check in case this was a - // root. - var alternate = targetInst.alternate; - - if (targetInst.child !== null || alternate !== null && alternate.child !== null) { - // Next we need to figure out if the node that skipped past is - // nested within a dehydrated boundary and if so, which one. - var suspenseInstance = getParentSuspenseInstance(targetNode); - - while (suspenseInstance !== null) { - // We found a suspense instance. That means that we haven't - // hydrated it yet. Even though we leave the comments in the - // DOM after hydrating, and there are boundaries in the DOM - // that could already be hydrated, we wouldn't have found them - // through this pass since if the target is hydrated it would - // have had an internalInstanceKey on it. - // Let's get the fiber associated with the SuspenseComponent - // as the deepest instance. - var targetSuspenseInst = suspenseInstance[internalInstanceKey]; - - if (targetSuspenseInst) { - return targetSuspenseInst; - } // If we don't find a Fiber on the comment, it might be because - // we haven't gotten to hydrate it yet. There might still be a - // parent boundary that hasn't above this one so we need to find - // the outer most that is known. - - - suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent - // host component also hasn't hydrated yet. We can return it - // below since it will bail out on the isMounted check later. - } - } - - return targetInst; - } - - targetNode = parentNode; - parentNode = targetNode.parentNode; - } - - return null; - } - /** - * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent - * instance, or null if the node was not rendered by this React. - */ - - function getInstanceFromNode(node) { - var inst = node[internalInstanceKey] || node[internalContainerInstanceKey]; - - if (inst) { - if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) { - return inst; - } else { - return null; - } - } - - return null; - } - /** - * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding - * DOM node. - */ - - function getNodeFromInstance(inst) { - if (inst.tag === HostComponent || inst.tag === HostText) { - // In Fiber this, is just the state node right now. We assume it will be - // a host component or host text. - return inst.stateNode; - } // Without this first invariant, passing a non-DOM-component triggers the next - // invariant for a missing parent, which is super confusing. - - - { - { - throw Error( "getNodeFromInstance: Invalid argument." ); - } - } - } - function getFiberCurrentPropsFromNode(node) { - return node[internalPropsKey] || null; - } - function updateFiberProps(node, props) { - node[internalPropsKey] = props; - } - function getEventListenerSet(node) { - var elementListenerSet = node[internalEventHandlersKey]; - - if (elementListenerSet === undefined) { - elementListenerSet = node[internalEventHandlersKey] = new Set(); - } - - return elementListenerSet; - } - - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); - } - } - } - - function checkPropTypes(typeSpecs, values, location, componentName, element) { - { - // $FlowFixMe This is okay but Flow doesn't know it. - var has = Function.call.bind(Object.prototype.hasOwnProperty); - - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); - err.name = 'Invariant Violation'; - throw err; - } - - error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); - } catch (ex) { - error$1 = ex; - } - - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - - error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); - - setCurrentlyValidatingElement(null); - } - - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - - error('Failed %s type: %s', location, error$1.message); - - setCurrentlyValidatingElement(null); - } - } - } - } - } - - var valueStack = []; - var fiberStack; - - { - fiberStack = []; - } - - var index = -1; - - function createCursor(defaultValue) { - return { - current: defaultValue - }; - } - - function pop(cursor, fiber) { - if (index < 0) { - { - error('Unexpected pop.'); - } - - return; - } - - { - if (fiber !== fiberStack[index]) { - error('Unexpected Fiber popped.'); - } - } - - cursor.current = valueStack[index]; - valueStack[index] = null; - - { - fiberStack[index] = null; - } - - index--; - } - - function push(cursor, value, fiber) { - index++; - valueStack[index] = cursor.current; - - { - fiberStack[index] = fiber; - } - - cursor.current = value; - } - - var warnedAboutMissingGetChildContext; - - { - warnedAboutMissingGetChildContext = {}; - } - - var emptyContextObject = {}; - - { - Object.freeze(emptyContextObject); - } // A cursor to the current merged context object on the stack. - - - var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed. - - var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack. - // We use this to get access to the parent context after we have already - // pushed the next context provider, and now need to merge their contexts. - - var previousContext = emptyContextObject; - - function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) { - { - if (didPushOwnContextIfProvider && isContextProvider(Component)) { - // If the fiber is a context provider itself, when we read its context - // we may have already pushed its own child context on the stack. A context - // provider should not "see" its own child context. Therefore we read the - // previous (parent) context instead for a context provider. - return previousContext; - } - - return contextStackCursor.current; - } - } - - function cacheContext(workInProgress, unmaskedContext, maskedContext) { - { - var instance = workInProgress.stateNode; - instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext; - instance.__reactInternalMemoizedMaskedChildContext = maskedContext; - } - } - - function getMaskedContext(workInProgress, unmaskedContext) { - { - var type = workInProgress.type; - var contextTypes = type.contextTypes; - - if (!contextTypes) { - return emptyContextObject; - } // Avoid recreating masked context unless unmasked context has changed. - // Failing to do this will result in unnecessary calls to componentWillReceiveProps. - // This may trigger infinite loops if componentWillReceiveProps calls setState. - - - var instance = workInProgress.stateNode; - - if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) { - return instance.__reactInternalMemoizedMaskedChildContext; - } - - var context = {}; - - for (var key in contextTypes) { - context[key] = unmaskedContext[key]; - } - - { - var name = getComponentName(type) || 'Unknown'; - checkPropTypes(contextTypes, context, 'context', name); - } // Cache unmasked context so we can avoid recreating masked context unless necessary. - // Context is created before the class component is instantiated so check for instance. - - - if (instance) { - cacheContext(workInProgress, unmaskedContext, context); - } - - return context; - } - } - - function hasContextChanged() { - { - return didPerformWorkStackCursor.current; - } - } - - function isContextProvider(type) { - { - var childContextTypes = type.childContextTypes; - return childContextTypes !== null && childContextTypes !== undefined; - } - } - - function popContext(fiber) { - { - pop(didPerformWorkStackCursor, fiber); - pop(contextStackCursor, fiber); - } - } - - function popTopLevelContextObject(fiber) { - { - pop(didPerformWorkStackCursor, fiber); - pop(contextStackCursor, fiber); - } - } - - function pushTopLevelContextObject(fiber, context, didChange) { - { - if (!(contextStackCursor.current === emptyContextObject)) { - { - throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - push(contextStackCursor, context, fiber); - push(didPerformWorkStackCursor, didChange, fiber); - } - } - - function processChildContext(fiber, type, parentContext) { - { - var instance = fiber.stateNode; - var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future. - // It has only been added in Fiber to match the (unintentional) behavior in Stack. - - if (typeof instance.getChildContext !== 'function') { - { - var componentName = getComponentName(type) || 'Unknown'; - - if (!warnedAboutMissingGetChildContext[componentName]) { - warnedAboutMissingGetChildContext[componentName] = true; - - error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName); - } - } - - return parentContext; - } - - var childContext = instance.getChildContext(); - - for (var contextKey in childContext) { - if (!(contextKey in childContextTypes)) { - { - throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." ); - } - } - } - - { - var name = getComponentName(type) || 'Unknown'; - checkPropTypes(childContextTypes, childContext, 'child context', name); - } - - return _assign({}, parentContext, childContext); - } - } - - function pushContextProvider(workInProgress) { - { - var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity. - // If the instance does not exist yet, we will push null at first, - // and replace it on the stack later when invalidating the context. - - var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later. - // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates. - - previousContext = contextStackCursor.current; - push(contextStackCursor, memoizedMergedChildContext, workInProgress); - push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress); - return true; - } - } - - function invalidateContextProvider(workInProgress, type, didChange) { - { - var instance = workInProgress.stateNode; - - if (!instance) { - { - throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - if (didChange) { - // Merge parent and own context. - // Skip this if we're not updating due to sCU. - // This avoids unnecessarily recomputing memoized values. - var mergedContext = processChildContext(workInProgress, type, previousContext); - instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one. - // It is important to unwind the context in the reverse order. - - pop(didPerformWorkStackCursor, workInProgress); - pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed. - - push(contextStackCursor, mergedContext, workInProgress); - push(didPerformWorkStackCursor, didChange, workInProgress); - } else { - pop(didPerformWorkStackCursor, workInProgress); - push(didPerformWorkStackCursor, didChange, workInProgress); - } - } - } - - function findCurrentUnmaskedContext(fiber) { - { - // Currently this is only used with renderSubtreeIntoContainer; not sure if it - // makes sense elsewhere - if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) { - { - throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - var node = fiber; - - do { - switch (node.tag) { - case HostRoot: - return node.stateNode.context; - - case ClassComponent: - { - var Component = node.type; - - if (isContextProvider(Component)) { - return node.stateNode.__reactInternalMemoizedMergedChildContext; - } - - break; - } - } - - node = node.return; - } while (node !== null); - - { - { - throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - } - - var LegacyRoot = 0; - var BlockingRoot = 1; - var ConcurrentRoot = 2; - - var rendererID = null; - var injectedHook = null; - var hasLoggedError = false; - var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined'; - function injectInternals(internals) { - if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { - // No DevTools - return false; - } - - var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; - - if (hook.isDisabled) { - // This isn't a real property on the hook, but it can be set to opt out - // of DevTools integration and associated warnings and logs. - // https://github.com/facebook/react/issues/3877 - return true; - } - - if (!hook.supportsFiber) { - { - error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools'); - } // DevTools exists, even though it doesn't support Fiber. - - - return true; - } - - try { - rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks. - - injectedHook = hook; - } catch (err) { - // Catch all errors because it is unsafe to throw during initialization. - { - error('React instrumentation encountered an error: %s.', err); - } - } // DevTools exists - - - return true; - } - function onScheduleRoot(root, children) { - { - if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') { - try { - injectedHook.onScheduleFiberRoot(rendererID, root, children); - } catch (err) { - if ( !hasLoggedError) { - hasLoggedError = true; - - error('React instrumentation encountered an error: %s', err); - } - } - } - } - } - function onCommitRoot(root, priorityLevel) { - if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') { - try { - var didError = (root.current.flags & DidCapture) === DidCapture; - - if (enableProfilerTimer) { - injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError); - } else { - injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError); - } - } catch (err) { - { - if (!hasLoggedError) { - hasLoggedError = true; - - error('React instrumentation encountered an error: %s', err); - } - } - } - } - } - function onCommitUnmount(fiber) { - if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') { - try { - injectedHook.onCommitFiberUnmount(rendererID, fiber); - } catch (err) { - { - if (!hasLoggedError) { - hasLoggedError = true; - - error('React instrumentation encountered an error: %s', err); - } - } - } - } - } - - var Scheduler_runWithPriority = unstable_runWithPriority, - Scheduler_scheduleCallback = unstable_scheduleCallback, - Scheduler_cancelCallback = unstable_cancelCallback, - Scheduler_shouldYield = unstable_shouldYield, - Scheduler_requestPaint = unstable_requestPaint, - Scheduler_now$1 = unstable_now, - Scheduler_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel, - Scheduler_ImmediatePriority = unstable_ImmediatePriority, - Scheduler_UserBlockingPriority = unstable_UserBlockingPriority, - Scheduler_NormalPriority = unstable_NormalPriority, - Scheduler_LowPriority = unstable_LowPriority, - Scheduler_IdlePriority = unstable_IdlePriority; - - { - // Provide explicit error message when production+profiling bundle of e.g. - // react-dom is used with production (non-profiling) bundle of - // scheduler/tracing - if (!(__interactionsRef != null && __interactionsRef.current != null)) { - { - throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" ); - } - } - } - - var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use - // ascending numbers so we can compare them like numbers. They start at 90 to - // avoid clashing with Scheduler's priorities. - - var ImmediatePriority$1 = 99; - var UserBlockingPriority$2 = 98; - var NormalPriority$1 = 97; - var LowPriority$1 = 96; - var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only. - - var NoPriority$1 = 90; - var shouldYield = Scheduler_shouldYield; - var requestPaint = // Fall back gracefully if we're running an older version of Scheduler. - Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {}; - var syncQueue = null; - var immediateQueueCallbackNode = null; - var isFlushingSyncQueue = false; - var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly. - // This will be the case for modern browsers that support `performance.now`. In - // older browsers, Scheduler falls back to `Date.now`, which returns a Unix - // timestamp. In that case, subtract the module initialization time to simulate - // the behavior of performance.now and keep our times small enough to fit - // within 32 bits. - // TODO: Consider lifting this into Scheduler. - - var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () { - return Scheduler_now$1() - initialTimeMs$1; - }; - function getCurrentPriorityLevel() { - switch (Scheduler_getCurrentPriorityLevel()) { - case Scheduler_ImmediatePriority: - return ImmediatePriority$1; - - case Scheduler_UserBlockingPriority: - return UserBlockingPriority$2; - - case Scheduler_NormalPriority: - return NormalPriority$1; - - case Scheduler_LowPriority: - return LowPriority$1; - - case Scheduler_IdlePriority: - return IdlePriority$1; - - default: - { - { - throw Error( "Unknown priority level." ); - } - } - - } - } - - function reactPriorityToSchedulerPriority(reactPriorityLevel) { - switch (reactPriorityLevel) { - case ImmediatePriority$1: - return Scheduler_ImmediatePriority; - - case UserBlockingPriority$2: - return Scheduler_UserBlockingPriority; - - case NormalPriority$1: - return Scheduler_NormalPriority; - - case LowPriority$1: - return Scheduler_LowPriority; - - case IdlePriority$1: - return Scheduler_IdlePriority; - - default: - { - { - throw Error( "Unknown priority level." ); - } - } - - } - } - - function runWithPriority$1(reactPriorityLevel, fn) { - var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); - return Scheduler_runWithPriority(priorityLevel, fn); - } - function scheduleCallback(reactPriorityLevel, callback, options) { - var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel); - return Scheduler_scheduleCallback(priorityLevel, callback, options); - } - function scheduleSyncCallback(callback) { - // Push this callback into an internal queue. We'll flush these either in - // the next tick, or earlier if something calls `flushSyncCallbackQueue`. - if (syncQueue === null) { - syncQueue = [callback]; // Flush the queue in the next tick, at the earliest. - - immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl); - } else { - // Push onto existing queue. Don't need to schedule a callback because - // we already scheduled one when we created the queue. - syncQueue.push(callback); - } - - return fakeCallbackNode; - } - function cancelCallback(callbackNode) { - if (callbackNode !== fakeCallbackNode) { - Scheduler_cancelCallback(callbackNode); - } - } - function flushSyncCallbackQueue() { - if (immediateQueueCallbackNode !== null) { - var node = immediateQueueCallbackNode; - immediateQueueCallbackNode = null; - Scheduler_cancelCallback(node); - } - - flushSyncCallbackQueueImpl(); - } - - function flushSyncCallbackQueueImpl() { - if (!isFlushingSyncQueue && syncQueue !== null) { - // Prevent re-entrancy. - isFlushingSyncQueue = true; - var i = 0; - - { - try { - var _isSync2 = true; - var _queue = syncQueue; - runWithPriority$1(ImmediatePriority$1, function () { - for (; i < _queue.length; i++) { - var callback = _queue[i]; - - do { - callback = callback(_isSync2); - } while (callback !== null); - } - }); - syncQueue = null; - } catch (error) { - // If something throws, leave the remaining callbacks on the queue. - if (syncQueue !== null) { - syncQueue = syncQueue.slice(i + 1); - } // Resume flushing in the next tick - - - Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue); - throw error; - } finally { - isFlushingSyncQueue = false; - } - } - } - } - - // TODO: this is special because it gets imported during build. - var ReactVersion = '17.0.2'; - - var NoMode = 0; - var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root - // tag instead - - var BlockingMode = 2; - var ConcurrentMode = 4; - var ProfileMode = 8; - var DebugTracingMode = 16; - - var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig; - var NoTransition = 0; - function requestCurrentTransition() { - return ReactCurrentBatchConfig.transition; - } - - var ReactStrictModeWarnings = { - recordUnsafeLifecycleWarnings: function (fiber, instance) {}, - flushPendingUnsafeLifecycleWarnings: function () {}, - recordLegacyContextWarning: function (fiber, instance) {}, - flushLegacyContextWarning: function () {}, - discardPendingWarnings: function () {} - }; - - { - var findStrictRoot = function (fiber) { - var maybeStrictRoot = null; - var node = fiber; - - while (node !== null) { - if (node.mode & StrictMode) { - maybeStrictRoot = node; - } - - node = node.return; - } - - return maybeStrictRoot; - }; - - var setToSortedString = function (set) { - var array = []; - set.forEach(function (value) { - array.push(value); - }); - return array.sort().join(', '); - }; - - var pendingComponentWillMountWarnings = []; - var pendingUNSAFE_ComponentWillMountWarnings = []; - var pendingComponentWillReceivePropsWarnings = []; - var pendingUNSAFE_ComponentWillReceivePropsWarnings = []; - var pendingComponentWillUpdateWarnings = []; - var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about. - - var didWarnAboutUnsafeLifecycles = new Set(); - - ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) { - // Dedup strategy: Warn once per component. - if (didWarnAboutUnsafeLifecycles.has(fiber.type)) { - return; - } - - if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components. - instance.componentWillMount.__suppressDeprecationWarning !== true) { - pendingComponentWillMountWarnings.push(fiber); - } - - if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') { - pendingUNSAFE_ComponentWillMountWarnings.push(fiber); - } - - if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) { - pendingComponentWillReceivePropsWarnings.push(fiber); - } - - if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') { - pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber); - } - - if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) { - pendingComponentWillUpdateWarnings.push(fiber); - } - - if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') { - pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber); - } - }; - - ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () { - // We do an initial pass to gather component names - var componentWillMountUniqueNames = new Set(); - - if (pendingComponentWillMountWarnings.length > 0) { - pendingComponentWillMountWarnings.forEach(function (fiber) { - componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); - didWarnAboutUnsafeLifecycles.add(fiber.type); - }); - pendingComponentWillMountWarnings = []; - } - - var UNSAFE_componentWillMountUniqueNames = new Set(); - - if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) { - pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) { - UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component'); - didWarnAboutUnsafeLifecycles.add(fiber.type); - }); - pendingUNSAFE_ComponentWillMountWarnings = []; - } - - var componentWillReceivePropsUniqueNames = new Set(); - - if (pendingComponentWillReceivePropsWarnings.length > 0) { - pendingComponentWillReceivePropsWarnings.forEach(function (fiber) { - componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component'); - didWarnAboutUnsafeLifecycles.add(fiber.type); - }); - pendingComponentWillReceivePropsWarnings = []; - } - - var UNSAFE_componentWillReceivePropsUniqueNames = new Set(); - - if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) { - pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) { - UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component'); - didWarnAboutUnsafeLifecycles.add(fiber.type); - }); - pendingUNSAFE_ComponentWillReceivePropsWarnings = []; - } - - var componentWillUpdateUniqueNames = new Set(); - - if (pendingComponentWillUpdateWarnings.length > 0) { - pendingComponentWillUpdateWarnings.forEach(function (fiber) { - componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); - didWarnAboutUnsafeLifecycles.add(fiber.type); - }); - pendingComponentWillUpdateWarnings = []; - } - - var UNSAFE_componentWillUpdateUniqueNames = new Set(); - - if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) { - pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) { - UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component'); - didWarnAboutUnsafeLifecycles.add(fiber.type); - }); - pendingUNSAFE_ComponentWillUpdateWarnings = []; - } // Finally, we flush all the warnings - // UNSAFE_ ones before the deprecated ones, since they'll be 'louder' - - - if (UNSAFE_componentWillMountUniqueNames.size > 0) { - var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames); - - error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames); - } - - if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) { - var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames); - - error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames); - } - - if (UNSAFE_componentWillUpdateUniqueNames.size > 0) { - var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames); - - error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2); - } - - if (componentWillMountUniqueNames.size > 0) { - var _sortedNames3 = setToSortedString(componentWillMountUniqueNames); - - warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3); - } - - if (componentWillReceivePropsUniqueNames.size > 0) { - var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames); - - warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4); - } - - if (componentWillUpdateUniqueNames.size > 0) { - var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames); - - warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5); - } - }; - - var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about. - - var didWarnAboutLegacyContext = new Set(); - - ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) { - var strictRoot = findStrictRoot(fiber); - - if (strictRoot === null) { - error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.'); - - return; - } // Dedup strategy: Warn once per component. - - - if (didWarnAboutLegacyContext.has(fiber.type)) { - return; - } - - var warningsForRoot = pendingLegacyContextWarning.get(strictRoot); - - if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') { - if (warningsForRoot === undefined) { - warningsForRoot = []; - pendingLegacyContextWarning.set(strictRoot, warningsForRoot); - } - - warningsForRoot.push(fiber); - } - }; - - ReactStrictModeWarnings.flushLegacyContextWarning = function () { - pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) { - if (fiberArray.length === 0) { - return; - } - - var firstFiber = fiberArray[0]; - var uniqueNames = new Set(); - fiberArray.forEach(function (fiber) { - uniqueNames.add(getComponentName(fiber.type) || 'Component'); - didWarnAboutLegacyContext.add(fiber.type); - }); - var sortedNames = setToSortedString(uniqueNames); - - try { - setCurrentFiber(firstFiber); - - error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames); - } finally { - resetCurrentFiber(); - } - }); - }; - - ReactStrictModeWarnings.discardPendingWarnings = function () { - pendingComponentWillMountWarnings = []; - pendingUNSAFE_ComponentWillMountWarnings = []; - pendingComponentWillReceivePropsWarnings = []; - pendingUNSAFE_ComponentWillReceivePropsWarnings = []; - pendingComponentWillUpdateWarnings = []; - pendingUNSAFE_ComponentWillUpdateWarnings = []; - pendingLegacyContextWarning = new Map(); - }; - } - - function resolveDefaultProps(Component, baseProps) { - if (Component && Component.defaultProps) { - // Resolve default props. Taken from ReactElement - var props = _assign({}, baseProps); - - var defaultProps = Component.defaultProps; - - for (var propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - - return props; - } - - return baseProps; - } - - // Max 31 bit integer. The max integer size in V8 for 32-bit systems. - // Math.pow(2, 30) - 1 - // 0b111111111111111111111111111111 - var MAX_SIGNED_31_BIT_INT = 1073741823; - - var valueCursor = createCursor(null); - var rendererSigil; - - { - // Use this to detect multiple renderers using the same context - rendererSigil = {}; - } - - var currentlyRenderingFiber = null; - var lastContextDependency = null; - var lastContextWithAllBitsObserved = null; - var isDisallowedContextReadInDEV = false; - function resetContextDependencies() { - // This is called right before React yields execution, to ensure `readContext` - // cannot be called outside the render phase. - currentlyRenderingFiber = null; - lastContextDependency = null; - lastContextWithAllBitsObserved = null; - - { - isDisallowedContextReadInDEV = false; - } - } - function enterDisallowedContextReadInDEV() { - { - isDisallowedContextReadInDEV = true; - } - } - function exitDisallowedContextReadInDEV() { - { - isDisallowedContextReadInDEV = false; - } - } - function pushProvider(providerFiber, nextValue) { - var context = providerFiber.type._context; - - { - push(valueCursor, context._currentValue, providerFiber); - context._currentValue = nextValue; - - { - if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) { - error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.'); - } - - context._currentRenderer = rendererSigil; - } - } - } - function popProvider(providerFiber) { - var currentValue = valueCursor.current; - pop(valueCursor, providerFiber); - var context = providerFiber.type._context; - - { - context._currentValue = currentValue; - } - } - function calculateChangedBits(context, newValue, oldValue) { - if (objectIs(oldValue, newValue)) { - // No change - return 0; - } else { - var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT; - - { - if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) { - error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits); - } - } - - return changedBits | 0; - } - } - function scheduleWorkOnParentPath(parent, renderLanes) { - // Update the child lanes of all the ancestors, including the alternates. - var node = parent; - - while (node !== null) { - var alternate = node.alternate; - - if (!isSubsetOfLanes(node.childLanes, renderLanes)) { - node.childLanes = mergeLanes(node.childLanes, renderLanes); - - if (alternate !== null) { - alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes); - } - } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) { - alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes); - } else { - // Neither alternate was updated, which means the rest of the - // ancestor path already has sufficient priority. - break; - } - - node = node.return; - } - } - function propagateContextChange(workInProgress, context, changedBits, renderLanes) { - var fiber = workInProgress.child; - - if (fiber !== null) { - // Set the return pointer of the child to the work-in-progress fiber. - fiber.return = workInProgress; - } - - while (fiber !== null) { - var nextFiber = void 0; // Visit this fiber. - - var list = fiber.dependencies; - - if (list !== null) { - nextFiber = fiber.child; - var dependency = list.firstContext; - - while (dependency !== null) { - // Check if the context matches. - if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) { - // Match! Schedule an update on this fiber. - if (fiber.tag === ClassComponent) { - // Schedule a force update on the work-in-progress. - var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes)); - update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the - // update to the current fiber, too, which means it will persist even if - // this render is thrown away. Since it's a race condition, not sure it's - // worth fixing. - - enqueueUpdate(fiber, update); - } - - fiber.lanes = mergeLanes(fiber.lanes, renderLanes); - var alternate = fiber.alternate; - - if (alternate !== null) { - alternate.lanes = mergeLanes(alternate.lanes, renderLanes); - } - - scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too. - - list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the - // dependency list. - - break; - } - - dependency = dependency.next; - } - } else if (fiber.tag === ContextProvider) { - // Don't scan deeper if this is a matching provider - nextFiber = fiber.type === workInProgress.type ? null : fiber.child; - } else { - // Traverse down. - nextFiber = fiber.child; - } - - if (nextFiber !== null) { - // Set the return pointer of the child to the work-in-progress fiber. - nextFiber.return = fiber; - } else { - // No child. Traverse to next sibling. - nextFiber = fiber; - - while (nextFiber !== null) { - if (nextFiber === workInProgress) { - // We're back to the root of this subtree. Exit. - nextFiber = null; - break; - } - - var sibling = nextFiber.sibling; - - if (sibling !== null) { - // Set the return pointer of the sibling to the work-in-progress fiber. - sibling.return = nextFiber.return; - nextFiber = sibling; - break; - } // No more siblings. Traverse up. - - - nextFiber = nextFiber.return; - } - } - - fiber = nextFiber; - } - } - function prepareToReadContext(workInProgress, renderLanes) { - currentlyRenderingFiber = workInProgress; - lastContextDependency = null; - lastContextWithAllBitsObserved = null; - var dependencies = workInProgress.dependencies; - - if (dependencies !== null) { - var firstContext = dependencies.firstContext; - - if (firstContext !== null) { - if (includesSomeLane(dependencies.lanes, renderLanes)) { - // Context list has a pending update. Mark that this fiber performed work. - markWorkInProgressReceivedUpdate(); - } // Reset the work-in-progress list - - - dependencies.firstContext = null; - } - } - } - function readContext(context, observedBits) { - { - // This warning would fire if you read context inside a Hook like useMemo. - // Unlike the class check below, it's not enforced in production for perf. - if (isDisallowedContextReadInDEV) { - error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().'); - } - } - - if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else { - var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types. - - if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) { - // Observe all updates. - lastContextWithAllBitsObserved = context; - resolvedObservedBits = MAX_SIGNED_31_BIT_INT; - } else { - resolvedObservedBits = observedBits; - } - - var contextItem = { - context: context, - observedBits: resolvedObservedBits, - next: null - }; - - if (lastContextDependency === null) { - if (!(currentlyRenderingFiber !== null)) { - { - throw Error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." ); - } - } // This is the first dependency for this component. Create a new list. - - - lastContextDependency = contextItem; - currentlyRenderingFiber.dependencies = { - lanes: NoLanes, - firstContext: contextItem, - responders: null - }; - } else { - // Append a new context item. - lastContextDependency = lastContextDependency.next = contextItem; - } - } - - return context._currentValue ; - } - - var UpdateState = 0; - var ReplaceState = 1; - var ForceUpdate = 2; - var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`. - // It should only be read right after calling `processUpdateQueue`, via - // `checkHasForceUpdateAfterProcessing`. - - var hasForceUpdate = false; - var didWarnUpdateInsideUpdate; - var currentlyProcessingQueue; - - { - didWarnUpdateInsideUpdate = false; - currentlyProcessingQueue = null; - } - - function initializeUpdateQueue(fiber) { - var queue = { - baseState: fiber.memoizedState, - firstBaseUpdate: null, - lastBaseUpdate: null, - shared: { - pending: null - }, - effects: null - }; - fiber.updateQueue = queue; - } - function cloneUpdateQueue(current, workInProgress) { - // Clone the update queue from current. Unless it's already a clone. - var queue = workInProgress.updateQueue; - var currentQueue = current.updateQueue; - - if (queue === currentQueue) { - var clone = { - baseState: currentQueue.baseState, - firstBaseUpdate: currentQueue.firstBaseUpdate, - lastBaseUpdate: currentQueue.lastBaseUpdate, - shared: currentQueue.shared, - effects: currentQueue.effects - }; - workInProgress.updateQueue = clone; - } - } - function createUpdate(eventTime, lane) { - var update = { - eventTime: eventTime, - lane: lane, - tag: UpdateState, - payload: null, - callback: null, - next: null - }; - return update; - } - function enqueueUpdate(fiber, update) { - var updateQueue = fiber.updateQueue; - - if (updateQueue === null) { - // Only occurs if the fiber has been unmounted. - return; - } - - var sharedQueue = updateQueue.shared; - var pending = sharedQueue.pending; - - if (pending === null) { - // This is the first update. Create a circular list. - update.next = update; - } else { - update.next = pending.next; - pending.next = update; - } - - sharedQueue.pending = update; - - { - if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) { - error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.'); - - didWarnUpdateInsideUpdate = true; - } - } - } - function enqueueCapturedUpdate(workInProgress, capturedUpdate) { - // Captured updates are updates that are thrown by a child during the render - // phase. They should be discarded if the render is aborted. Therefore, - // we should only put them on the work-in-progress queue, not the current one. - var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone. - - var current = workInProgress.alternate; - - if (current !== null) { - var currentQueue = current.updateQueue; - - if (queue === currentQueue) { - // The work-in-progress queue is the same as current. This happens when - // we bail out on a parent fiber that then captures an error thrown by - // a child. Since we want to append the update only to the work-in - // -progress queue, we need to clone the updates. We usually clone during - // processUpdateQueue, but that didn't happen in this case because we - // skipped over the parent when we bailed out. - var newFirst = null; - var newLast = null; - var firstBaseUpdate = queue.firstBaseUpdate; - - if (firstBaseUpdate !== null) { - // Loop through the updates and clone them. - var update = firstBaseUpdate; - - do { - var clone = { - eventTime: update.eventTime, - lane: update.lane, - tag: update.tag, - payload: update.payload, - callback: update.callback, - next: null - }; - - if (newLast === null) { - newFirst = newLast = clone; - } else { - newLast.next = clone; - newLast = clone; - } - - update = update.next; - } while (update !== null); // Append the captured update the end of the cloned list. - - - if (newLast === null) { - newFirst = newLast = capturedUpdate; - } else { - newLast.next = capturedUpdate; - newLast = capturedUpdate; - } - } else { - // There are no base updates. - newFirst = newLast = capturedUpdate; - } - - queue = { - baseState: currentQueue.baseState, - firstBaseUpdate: newFirst, - lastBaseUpdate: newLast, - shared: currentQueue.shared, - effects: currentQueue.effects - }; - workInProgress.updateQueue = queue; - return; - } - } // Append the update to the end of the list. - - - var lastBaseUpdate = queue.lastBaseUpdate; - - if (lastBaseUpdate === null) { - queue.firstBaseUpdate = capturedUpdate; - } else { - lastBaseUpdate.next = capturedUpdate; - } - - queue.lastBaseUpdate = capturedUpdate; - } - - function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) { - switch (update.tag) { - case ReplaceState: - { - var payload = update.payload; - - if (typeof payload === 'function') { - // Updater function - { - enterDisallowedContextReadInDEV(); - } - - var nextState = payload.call(instance, prevState, nextProps); - - { - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - payload.call(instance, prevState, nextProps); - } finally { - reenableLogs(); - } - } - - exitDisallowedContextReadInDEV(); - } - - return nextState; - } // State object - - - return payload; - } - - case CaptureUpdate: - { - workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture; - } - // Intentional fallthrough - - case UpdateState: - { - var _payload = update.payload; - var partialState; - - if (typeof _payload === 'function') { - // Updater function - { - enterDisallowedContextReadInDEV(); - } - - partialState = _payload.call(instance, prevState, nextProps); - - { - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - _payload.call(instance, prevState, nextProps); - } finally { - reenableLogs(); - } - } - - exitDisallowedContextReadInDEV(); - } - } else { - // Partial state object - partialState = _payload; - } - - if (partialState === null || partialState === undefined) { - // Null and undefined are treated as no-ops. - return prevState; - } // Merge the partial state and the previous state. - - - return _assign({}, prevState, partialState); - } - - case ForceUpdate: - { - hasForceUpdate = true; - return prevState; - } - } - - return prevState; - } - - function processUpdateQueue(workInProgress, props, instance, renderLanes) { - // This is always non-null on a ClassComponent or HostRoot - var queue = workInProgress.updateQueue; - hasForceUpdate = false; - - { - currentlyProcessingQueue = queue.shared; - } - - var firstBaseUpdate = queue.firstBaseUpdate; - var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue. - - var pendingQueue = queue.shared.pending; - - if (pendingQueue !== null) { - queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first - // and last so that it's non-circular. - - var lastPendingUpdate = pendingQueue; - var firstPendingUpdate = lastPendingUpdate.next; - lastPendingUpdate.next = null; // Append pending updates to base queue - - if (lastBaseUpdate === null) { - firstBaseUpdate = firstPendingUpdate; - } else { - lastBaseUpdate.next = firstPendingUpdate; - } - - lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then - // we need to transfer the updates to that queue, too. Because the base - // queue is a singly-linked list with no cycles, we can append to both - // lists and take advantage of structural sharing. - // TODO: Pass `current` as argument - - var current = workInProgress.alternate; - - if (current !== null) { - // This is always non-null on a ClassComponent or HostRoot - var currentQueue = current.updateQueue; - var currentLastBaseUpdate = currentQueue.lastBaseUpdate; - - if (currentLastBaseUpdate !== lastBaseUpdate) { - if (currentLastBaseUpdate === null) { - currentQueue.firstBaseUpdate = firstPendingUpdate; - } else { - currentLastBaseUpdate.next = firstPendingUpdate; - } - - currentQueue.lastBaseUpdate = lastPendingUpdate; - } - } - } // These values may change as we process the queue. - - - if (firstBaseUpdate !== null) { - // Iterate through the list of updates to compute the result. - var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes - // from the original lanes. - - var newLanes = NoLanes; - var newBaseState = null; - var newFirstBaseUpdate = null; - var newLastBaseUpdate = null; - var update = firstBaseUpdate; - - do { - var updateLane = update.lane; - var updateEventTime = update.eventTime; - - if (!isSubsetOfLanes(renderLanes, updateLane)) { - // Priority is insufficient. Skip this update. If this is the first - // skipped update, the previous update/state is the new base - // update/state. - var clone = { - eventTime: updateEventTime, - lane: updateLane, - tag: update.tag, - payload: update.payload, - callback: update.callback, - next: null - }; - - if (newLastBaseUpdate === null) { - newFirstBaseUpdate = newLastBaseUpdate = clone; - newBaseState = newState; - } else { - newLastBaseUpdate = newLastBaseUpdate.next = clone; - } // Update the remaining priority in the queue. - - - newLanes = mergeLanes(newLanes, updateLane); - } else { - // This update does have sufficient priority. - if (newLastBaseUpdate !== null) { - var _clone = { - eventTime: updateEventTime, - // This update is going to be committed so we never want uncommit - // it. Using NoLane works because 0 is a subset of all bitmasks, so - // this will never be skipped by the check above. - lane: NoLane, - tag: update.tag, - payload: update.payload, - callback: update.callback, - next: null - }; - newLastBaseUpdate = newLastBaseUpdate.next = _clone; - } // Process this update. - - - newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance); - var callback = update.callback; - - if (callback !== null) { - workInProgress.flags |= Callback; - var effects = queue.effects; - - if (effects === null) { - queue.effects = [update]; - } else { - effects.push(update); - } - } - } - - update = update.next; - - if (update === null) { - pendingQueue = queue.shared.pending; - - if (pendingQueue === null) { - break; - } else { - // An update was scheduled from inside a reducer. Add the new - // pending updates to the end of the list and keep processing. - var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we - // unravel them when transferring them to the base queue. - - var _firstPendingUpdate = _lastPendingUpdate.next; - _lastPendingUpdate.next = null; - update = _firstPendingUpdate; - queue.lastBaseUpdate = _lastPendingUpdate; - queue.shared.pending = null; - } - } - } while (true); - - if (newLastBaseUpdate === null) { - newBaseState = newState; - } - - queue.baseState = newBaseState; - queue.firstBaseUpdate = newFirstBaseUpdate; - queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue. - // This should be fine because the only two other things that contribute to - // expiration time are props and context. We're already in the middle of the - // begin phase by the time we start processing the queue, so we've already - // dealt with the props. Context in components that specify - // shouldComponentUpdate is tricky; but we'll have to account for - // that regardless. - - markSkippedUpdateLanes(newLanes); - workInProgress.lanes = newLanes; - workInProgress.memoizedState = newState; - } - - { - currentlyProcessingQueue = null; - } - } - - function callCallback(callback, context) { - if (!(typeof callback === 'function')) { - { - throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback ); - } - } - - callback.call(context); - } - - function resetHasForceUpdateBeforeProcessing() { - hasForceUpdate = false; - } - function checkHasForceUpdateAfterProcessing() { - return hasForceUpdate; - } - function commitUpdateQueue(finishedWork, finishedQueue, instance) { - // Commit the effects - var effects = finishedQueue.effects; - finishedQueue.effects = null; - - if (effects !== null) { - for (var i = 0; i < effects.length; i++) { - var effect = effects[i]; - var callback = effect.callback; - - if (callback !== null) { - effect.callback = null; - callCallback(callback, instance); - } - } - } - } - - var fakeInternalInstance = {}; - var isArray = Array.isArray; // React.Component uses a shared frozen object by default. - // We'll use it to determine whether we need to initialize legacy refs. - - var emptyRefsObject = new React.Component().refs; - var didWarnAboutStateAssignmentForComponent; - var didWarnAboutUninitializedState; - var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate; - var didWarnAboutLegacyLifecyclesAndDerivedState; - var didWarnAboutUndefinedDerivedState; - var warnOnUndefinedDerivedState; - var warnOnInvalidCallback; - var didWarnAboutDirectlyAssigningPropsToState; - var didWarnAboutContextTypeAndContextTypes; - var didWarnAboutInvalidateContextType; - - { - didWarnAboutStateAssignmentForComponent = new Set(); - didWarnAboutUninitializedState = new Set(); - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set(); - didWarnAboutLegacyLifecyclesAndDerivedState = new Set(); - didWarnAboutDirectlyAssigningPropsToState = new Set(); - didWarnAboutUndefinedDerivedState = new Set(); - didWarnAboutContextTypeAndContextTypes = new Set(); - didWarnAboutInvalidateContextType = new Set(); - var didWarnOnInvalidCallback = new Set(); - - warnOnInvalidCallback = function (callback, callerName) { - if (callback === null || typeof callback === 'function') { - return; - } - - var key = callerName + '_' + callback; - - if (!didWarnOnInvalidCallback.has(key)) { - didWarnOnInvalidCallback.add(key); - - error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback); - } - }; - - warnOnUndefinedDerivedState = function (type, partialState) { - if (partialState === undefined) { - var componentName = getComponentName(type) || 'Component'; - - if (!didWarnAboutUndefinedDerivedState.has(componentName)) { - didWarnAboutUndefinedDerivedState.add(componentName); - - error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName); - } - } - }; // This is so gross but it's at least non-critical and can be removed if - // it causes problems. This is meant to give a nicer error message for - // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component, - // ...)) which otherwise throws a "_processChildContext is not a function" - // exception. - - - Object.defineProperty(fakeInternalInstance, '_processChildContext', { - enumerable: false, - value: function () { - { - { - throw Error( "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)." ); - } - } - } - }); - Object.freeze(fakeInternalInstance); - } - - function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) { - var prevState = workInProgress.memoizedState; - - { - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - // Invoke the function an extra time to help detect side-effects. - getDerivedStateFromProps(nextProps, prevState); - } finally { - reenableLogs(); - } - } - } - - var partialState = getDerivedStateFromProps(nextProps, prevState); - - { - warnOnUndefinedDerivedState(ctor, partialState); - } // Merge the partial state and the previous state. - - - var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState); - workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the - // base state. - - if (workInProgress.lanes === NoLanes) { - // Queue is always non-null for classes - var updateQueue = workInProgress.updateQueue; - updateQueue.baseState = memoizedState; - } - } - var classComponentUpdater = { - isMounted: isMounted, - enqueueSetState: function (inst, payload, callback) { - var fiber = get(inst); - var eventTime = requestEventTime(); - var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); - update.payload = payload; - - if (callback !== undefined && callback !== null) { - { - warnOnInvalidCallback(callback, 'setState'); - } - - update.callback = callback; - } - - enqueueUpdate(fiber, update); - scheduleUpdateOnFiber(fiber, lane, eventTime); - }, - enqueueReplaceState: function (inst, payload, callback) { - var fiber = get(inst); - var eventTime = requestEventTime(); - var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); - update.tag = ReplaceState; - update.payload = payload; - - if (callback !== undefined && callback !== null) { - { - warnOnInvalidCallback(callback, 'replaceState'); - } - - update.callback = callback; - } - - enqueueUpdate(fiber, update); - scheduleUpdateOnFiber(fiber, lane, eventTime); - }, - enqueueForceUpdate: function (inst, callback) { - var fiber = get(inst); - var eventTime = requestEventTime(); - var lane = requestUpdateLane(fiber); - var update = createUpdate(eventTime, lane); - update.tag = ForceUpdate; - - if (callback !== undefined && callback !== null) { - { - warnOnInvalidCallback(callback, 'forceUpdate'); - } - - update.callback = callback; - } - - enqueueUpdate(fiber, update); - scheduleUpdateOnFiber(fiber, lane, eventTime); - } - }; - - function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) { - var instance = workInProgress.stateNode; - - if (typeof instance.shouldComponentUpdate === 'function') { - { - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - // Invoke the function an extra time to help detect side-effects. - instance.shouldComponentUpdate(newProps, newState, nextContext); - } finally { - reenableLogs(); - } - } - } - - var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext); - - { - if (shouldUpdate === undefined) { - error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component'); - } - } - - return shouldUpdate; - } - - if (ctor.prototype && ctor.prototype.isPureReactComponent) { - return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState); - } - - return true; - } - - function checkClassInstance(workInProgress, ctor, newProps) { - var instance = workInProgress.stateNode; - - { - var name = getComponentName(ctor) || 'Component'; - var renderPresent = instance.render; - - if (!renderPresent) { - if (ctor.prototype && typeof ctor.prototype.render === 'function') { - error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name); - } else { - error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name); - } - } - - if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) { - error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name); - } - - if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) { - error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name); - } - - if (instance.propTypes) { - error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name); - } - - if (instance.contextType) { - error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name); - } - - { - if (instance.contextTypes) { - error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name); - } - - if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) { - didWarnAboutContextTypeAndContextTypes.add(ctor); - - error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name); - } - } - - if (typeof instance.componentShouldUpdate === 'function') { - error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name); - } - - if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') { - error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component'); - } - - if (typeof instance.componentDidUnmount === 'function') { - error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name); - } - - if (typeof instance.componentDidReceiveProps === 'function') { - error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name); - } - - if (typeof instance.componentWillRecieveProps === 'function') { - error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name); - } - - if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') { - error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name); - } - - var hasMutatedProps = instance.props !== newProps; - - if (instance.props !== undefined && hasMutatedProps) { - error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name); - } - - if (instance.defaultProps) { - error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name); - } - - if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) { - didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor); - - error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor)); - } - - if (typeof instance.getDerivedStateFromProps === 'function') { - error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name); - } - - if (typeof instance.getDerivedStateFromError === 'function') { - error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name); - } - - if (typeof ctor.getSnapshotBeforeUpdate === 'function') { - error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name); - } - - var _state = instance.state; - - if (_state && (typeof _state !== 'object' || isArray(_state))) { - error('%s.state: must be set to an object or null', name); - } - - if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') { - error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name); - } - } - } - - function adoptClassInstance(workInProgress, instance) { - instance.updater = classComponentUpdater; - workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates - - set(instance, workInProgress); - - { - instance._reactInternalInstance = fakeInternalInstance; - } - } - - function constructClassInstance(workInProgress, ctor, props) { - var isLegacyContextConsumer = false; - var unmaskedContext = emptyContextObject; - var context = emptyContextObject; - var contextType = ctor.contextType; - - { - if ('contextType' in ctor) { - var isValid = // Allow null for conditional declaration - contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer> - - if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) { - didWarnAboutInvalidateContextType.add(ctor); - var addendum = ''; - - if (contextType === undefined) { - addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.'; - } else if (typeof contextType !== 'object') { - addendum = ' However, it is set to a ' + typeof contextType + '.'; - } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) { - addendum = ' Did you accidentally pass the Context.Provider instead?'; - } else if (contextType._context !== undefined) { - // <Context.Consumer> - addendum = ' Did you accidentally pass the Context.Consumer instead?'; - } else { - addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.'; - } - - error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum); - } - } - } - - if (typeof contextType === 'object' && contextType !== null) { - context = readContext(contextType); - } else { - unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); - var contextTypes = ctor.contextTypes; - isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined; - context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject; - } // Instantiate twice to help detect side-effects. - - - { - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - new ctor(props, context); // eslint-disable-line no-new - } finally { - reenableLogs(); - } - } - } - - var instance = new ctor(props, context); - var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null; - adoptClassInstance(workInProgress, instance); - - { - if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) { - var componentName = getComponentName(ctor) || 'Component'; - - if (!didWarnAboutUninitializedState.has(componentName)) { - didWarnAboutUninitializedState.add(componentName); - - error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName); - } - } // If new component APIs are defined, "unsafe" lifecycles won't be called. - // Warn about these lifecycles if they are present. - // Don't warn about react-lifecycles-compat polyfilled methods though. - - - if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') { - var foundWillMountName = null; - var foundWillReceivePropsName = null; - var foundWillUpdateName = null; - - if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) { - foundWillMountName = 'componentWillMount'; - } else if (typeof instance.UNSAFE_componentWillMount === 'function') { - foundWillMountName = 'UNSAFE_componentWillMount'; - } - - if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) { - foundWillReceivePropsName = 'componentWillReceiveProps'; - } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { - foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; - } - - if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) { - foundWillUpdateName = 'componentWillUpdate'; - } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') { - foundWillUpdateName = 'UNSAFE_componentWillUpdate'; - } - - if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) { - var _componentName = getComponentName(ctor) || 'Component'; - - var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; - - if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) { - didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName); - - error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : ''); - } - } - } - } // Cache unmasked context so we can avoid recreating masked context unless necessary. - // ReactFiberContext usually updates this cache but can't for newly-created instances. - - - if (isLegacyContextConsumer) { - cacheContext(workInProgress, unmaskedContext, context); - } - - return instance; - } - - function callComponentWillMount(workInProgress, instance) { - var oldState = instance.state; - - if (typeof instance.componentWillMount === 'function') { - instance.componentWillMount(); - } - - if (typeof instance.UNSAFE_componentWillMount === 'function') { - instance.UNSAFE_componentWillMount(); - } - - if (oldState !== instance.state) { - { - error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component'); - } - - classComponentUpdater.enqueueReplaceState(instance, instance.state, null); - } - } - - function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) { - var oldState = instance.state; - - if (typeof instance.componentWillReceiveProps === 'function') { - instance.componentWillReceiveProps(newProps, nextContext); - } - - if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') { - instance.UNSAFE_componentWillReceiveProps(newProps, nextContext); - } - - if (instance.state !== oldState) { - { - var componentName = getComponentName(workInProgress.type) || 'Component'; - - if (!didWarnAboutStateAssignmentForComponent.has(componentName)) { - didWarnAboutStateAssignmentForComponent.add(componentName); - - error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName); - } - } - - classComponentUpdater.enqueueReplaceState(instance, instance.state, null); - } - } // Invokes the mount life-cycles on a previously never rendered instance. - - - function mountClassInstance(workInProgress, ctor, newProps, renderLanes) { - { - checkClassInstance(workInProgress, ctor, newProps); - } - - var instance = workInProgress.stateNode; - instance.props = newProps; - instance.state = workInProgress.memoizedState; - instance.refs = emptyRefsObject; - initializeUpdateQueue(workInProgress); - var contextType = ctor.contextType; - - if (typeof contextType === 'object' && contextType !== null) { - instance.context = readContext(contextType); - } else { - var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true); - instance.context = getMaskedContext(workInProgress, unmaskedContext); - } - - { - if (instance.state === newProps) { - var componentName = getComponentName(ctor) || 'Component'; - - if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) { - didWarnAboutDirectlyAssigningPropsToState.add(componentName); - - error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName); - } - } - - if (workInProgress.mode & StrictMode) { - ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance); - } - - { - ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance); - } - } - - processUpdateQueue(workInProgress, newProps, instance, renderLanes); - instance.state = workInProgress.memoizedState; - var getDerivedStateFromProps = ctor.getDerivedStateFromProps; - - if (typeof getDerivedStateFromProps === 'function') { - applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); - instance.state = workInProgress.memoizedState; - } // In order to support react-lifecycles-compat polyfilled components, - // Unsafe lifecycles should not be invoked for components using the new APIs. - - - if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) { - callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's - // process them now. - - processUpdateQueue(workInProgress, newProps, instance, renderLanes); - instance.state = workInProgress.memoizedState; - } - - if (typeof instance.componentDidMount === 'function') { - workInProgress.flags |= Update; - } - } - - function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode; - var oldProps = workInProgress.memoizedProps; - instance.props = oldProps; - var oldContext = instance.context; - var contextType = ctor.contextType; - var nextContext = emptyContextObject; - - if (typeof contextType === 'object' && contextType !== null) { - nextContext = readContext(contextType); - } else { - var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); - nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext); - } - - var getDerivedStateFromProps = ctor.getDerivedStateFromProps; - var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what - // ever the previously attempted to render - not the "current". However, - // during componentDidUpdate we pass the "current" props. - // In order to support react-lifecycles-compat polyfilled components, - // Unsafe lifecycles should not be invoked for components using the new APIs. - - if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) { - if (oldProps !== newProps || oldContext !== nextContext) { - callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); - } - } - - resetHasForceUpdateBeforeProcessing(); - var oldState = workInProgress.memoizedState; - var newState = instance.state = oldState; - processUpdateQueue(workInProgress, newProps, instance, renderLanes); - newState = workInProgress.memoizedState; - - if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) { - // If an update was already in progress, we should schedule an Update - // effect even though we're bailing out, so that cWU/cDU are called. - if (typeof instance.componentDidMount === 'function') { - workInProgress.flags |= Update; - } - - return false; - } - - if (typeof getDerivedStateFromProps === 'function') { - applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); - newState = workInProgress.memoizedState; - } - - var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext); - - if (shouldUpdate) { - // In order to support react-lifecycles-compat polyfilled components, - // Unsafe lifecycles should not be invoked for components using the new APIs. - if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) { - if (typeof instance.componentWillMount === 'function') { - instance.componentWillMount(); - } - - if (typeof instance.UNSAFE_componentWillMount === 'function') { - instance.UNSAFE_componentWillMount(); - } - } - - if (typeof instance.componentDidMount === 'function') { - workInProgress.flags |= Update; - } - } else { - // If an update was already in progress, we should schedule an Update - // effect even though we're bailing out, so that cWU/cDU are called. - if (typeof instance.componentDidMount === 'function') { - workInProgress.flags |= Update; - } // If shouldComponentUpdate returned false, we should still update the - // memoized state to indicate that this work can be reused. - - - workInProgress.memoizedProps = newProps; - workInProgress.memoizedState = newState; - } // Update the existing instance's state, props, and context pointers even - // if shouldComponentUpdate returns false. - - - instance.props = newProps; - instance.state = newState; - instance.context = nextContext; - return shouldUpdate; - } // Invokes the update life-cycles and returns false if it shouldn't rerender. - - - function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) { - var instance = workInProgress.stateNode; - cloneUpdateQueue(current, workInProgress); - var unresolvedOldProps = workInProgress.memoizedProps; - var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps); - instance.props = oldProps; - var unresolvedNewProps = workInProgress.pendingProps; - var oldContext = instance.context; - var contextType = ctor.contextType; - var nextContext = emptyContextObject; - - if (typeof contextType === 'object' && contextType !== null) { - nextContext = readContext(contextType); - } else { - var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true); - nextContext = getMaskedContext(workInProgress, nextUnmaskedContext); - } - - var getDerivedStateFromProps = ctor.getDerivedStateFromProps; - var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what - // ever the previously attempted to render - not the "current". However, - // during componentDidUpdate we pass the "current" props. - // In order to support react-lifecycles-compat polyfilled components, - // Unsafe lifecycles should not be invoked for components using the new APIs. - - if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) { - if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) { - callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext); - } - } - - resetHasForceUpdateBeforeProcessing(); - var oldState = workInProgress.memoizedState; - var newState = instance.state = oldState; - processUpdateQueue(workInProgress, newProps, instance, renderLanes); - newState = workInProgress.memoizedState; - - if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) { - // If an update was already in progress, we should schedule an Update - // effect even though we're bailing out, so that cWU/cDU are called. - if (typeof instance.componentDidUpdate === 'function') { - if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { - workInProgress.flags |= Update; - } - } - - if (typeof instance.getSnapshotBeforeUpdate === 'function') { - if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { - workInProgress.flags |= Snapshot; - } - } - - return false; - } - - if (typeof getDerivedStateFromProps === 'function') { - applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps); - newState = workInProgress.memoizedState; - } - - var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext); - - if (shouldUpdate) { - // In order to support react-lifecycles-compat polyfilled components, - // Unsafe lifecycles should not be invoked for components using the new APIs. - if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) { - if (typeof instance.componentWillUpdate === 'function') { - instance.componentWillUpdate(newProps, newState, nextContext); - } - - if (typeof instance.UNSAFE_componentWillUpdate === 'function') { - instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext); - } - } - - if (typeof instance.componentDidUpdate === 'function') { - workInProgress.flags |= Update; - } - - if (typeof instance.getSnapshotBeforeUpdate === 'function') { - workInProgress.flags |= Snapshot; - } - } else { - // If an update was already in progress, we should schedule an Update - // effect even though we're bailing out, so that cWU/cDU are called. - if (typeof instance.componentDidUpdate === 'function') { - if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { - workInProgress.flags |= Update; - } - } - - if (typeof instance.getSnapshotBeforeUpdate === 'function') { - if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) { - workInProgress.flags |= Snapshot; - } - } // If shouldComponentUpdate returned false, we should still update the - // memoized props/state to indicate that this work can be reused. - - - workInProgress.memoizedProps = newProps; - workInProgress.memoizedState = newState; - } // Update the existing instance's state, props, and context pointers even - // if shouldComponentUpdate returns false. - - - instance.props = newProps; - instance.state = newState; - instance.context = nextContext; - return shouldUpdate; - } - - var didWarnAboutMaps; - var didWarnAboutGenerators; - var didWarnAboutStringRefs; - var ownerHasKeyUseWarning; - var ownerHasFunctionTypeWarning; - - var warnForMissingKey = function (child, returnFiber) {}; - - { - didWarnAboutMaps = false; - didWarnAboutGenerators = false; - didWarnAboutStringRefs = {}; - /** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ - - ownerHasKeyUseWarning = {}; - ownerHasFunctionTypeWarning = {}; - - warnForMissingKey = function (child, returnFiber) { - if (child === null || typeof child !== 'object') { - return; - } - - if (!child._store || child._store.validated || child.key != null) { - return; - } - - if (!(typeof child._store === 'object')) { - { - throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - child._store.validated = true; - var componentName = getComponentName(returnFiber.type) || 'Component'; - - if (ownerHasKeyUseWarning[componentName]) { - return; - } - - ownerHasKeyUseWarning[componentName] = true; - - error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.'); - }; - } - - var isArray$1 = Array.isArray; - - function coerceRef(returnFiber, current, element) { - var mixedRef = element.ref; - - if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') { - { - // TODO: Clean this up once we turn on the string ref warning for - // everyone, because the strict mode case will no longer be relevant - if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs - // because these cannot be automatically converted to an arrow function - // using a codemod. Therefore, we don't have to warn about string refs again. - !(element._owner && element._self && element._owner.stateNode !== element._self)) { - var componentName = getComponentName(returnFiber.type) || 'Component'; - - if (!didWarnAboutStringRefs[componentName]) { - { - error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef); - } - - didWarnAboutStringRefs[componentName] = true; - } - } - } - - if (element._owner) { - var owner = element._owner; - var inst; - - if (owner) { - var ownerFiber = owner; - - if (!(ownerFiber.tag === ClassComponent)) { - { - throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" ); - } - } - - inst = ownerFiber.stateNode; - } - - if (!inst) { - { - throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." ); - } - } - - var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref - - if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) { - return current.ref; - } - - var ref = function (value) { - var refs = inst.refs; - - if (refs === emptyRefsObject) { - // This is a lazy pooled frozen object, so we need to initialize. - refs = inst.refs = {}; - } - - if (value === null) { - delete refs[stringRef]; - } else { - refs[stringRef] = value; - } - }; - - ref._stringRef = stringRef; - return ref; - } else { - if (!(typeof mixedRef === 'string')) { - { - throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." ); - } - } - - if (!element._owner) { - { - throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." ); - } - } - } - } - - return mixedRef; - } - - function throwOnInvalidObjectType(returnFiber, newChild) { - if (returnFiber.type !== 'textarea') { - { - { - throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + "). If you meant to render a collection of children, use an array instead." ); - } - } - } - } - - function warnOnFunctionType(returnFiber) { - { - var componentName = getComponentName(returnFiber.type) || 'Component'; - - if (ownerHasFunctionTypeWarning[componentName]) { - return; - } - - ownerHasFunctionTypeWarning[componentName] = true; - - error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.'); - } - } // We avoid inlining this to avoid potential deopts from using try/catch. - // to be able to optimize each path individually by branching early. This needs - // a compiler or we can do it manually. Helpers that don't need this branching - // live outside of this function. - - - function ChildReconciler(shouldTrackSideEffects) { - function deleteChild(returnFiber, childToDelete) { - if (!shouldTrackSideEffects) { - // Noop. - return; - } // Deletions are added in reversed order so we add it to the front. - // At this point, the return fiber's effect list is empty except for - // deletions, so we can just append the deletion to the list. The remaining - // effects aren't added until the complete phase. Once we implement - // resuming, this may not be true. - - - var last = returnFiber.lastEffect; - - if (last !== null) { - last.nextEffect = childToDelete; - returnFiber.lastEffect = childToDelete; - } else { - returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; - } - - childToDelete.nextEffect = null; - childToDelete.flags = Deletion; - } - - function deleteRemainingChildren(returnFiber, currentFirstChild) { - if (!shouldTrackSideEffects) { - // Noop. - return null; - } // TODO: For the shouldClone case, this could be micro-optimized a bit by - // assuming that after the first child we've already added everything. - - - var childToDelete = currentFirstChild; - - while (childToDelete !== null) { - deleteChild(returnFiber, childToDelete); - childToDelete = childToDelete.sibling; - } - - return null; - } - - function mapRemainingChildren(returnFiber, currentFirstChild) { - // Add the remaining children to a temporary map so that we can find them by - // keys quickly. Implicit (null) keys get added to this set with their index - // instead. - var existingChildren = new Map(); - var existingChild = currentFirstChild; - - while (existingChild !== null) { - if (existingChild.key !== null) { - existingChildren.set(existingChild.key, existingChild); - } else { - existingChildren.set(existingChild.index, existingChild); - } - - existingChild = existingChild.sibling; - } - - return existingChildren; - } - - function useFiber(fiber, pendingProps) { - // We currently set sibling to null and index to 0 here because it is easy - // to forget to do before returning it. E.g. for the single child case. - var clone = createWorkInProgress(fiber, pendingProps); - clone.index = 0; - clone.sibling = null; - return clone; - } - - function placeChild(newFiber, lastPlacedIndex, newIndex) { - newFiber.index = newIndex; - - if (!shouldTrackSideEffects) { - // Noop. - return lastPlacedIndex; - } - - var current = newFiber.alternate; - - if (current !== null) { - var oldIndex = current.index; - - if (oldIndex < lastPlacedIndex) { - // This is a move. - newFiber.flags = Placement; - return lastPlacedIndex; - } else { - // This item can stay in place. - return oldIndex; - } - } else { - // This is an insertion. - newFiber.flags = Placement; - return lastPlacedIndex; - } - } - - function placeSingleChild(newFiber) { - // This is simpler for the single child case. We only need to do a - // placement for inserting new children. - if (shouldTrackSideEffects && newFiber.alternate === null) { - newFiber.flags = Placement; - } - - return newFiber; - } - - function updateTextNode(returnFiber, current, textContent, lanes) { - if (current === null || current.tag !== HostText) { - // Insert - var created = createFiberFromText(textContent, returnFiber.mode, lanes); - created.return = returnFiber; - return created; - } else { - // Update - var existing = useFiber(current, textContent); - existing.return = returnFiber; - return existing; - } - } - - function updateElement(returnFiber, current, element, lanes) { - if (current !== null) { - if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path: - isCompatibleFamilyForHotReloading(current, element) )) { - // Move based on index - var existing = useFiber(current, element.props); - existing.ref = coerceRef(returnFiber, current, element); - existing.return = returnFiber; - - { - existing._debugSource = element._source; - existing._debugOwner = element._owner; - } - - return existing; - } - } // Insert - - - var created = createFiberFromElement(element, returnFiber.mode, lanes); - created.ref = coerceRef(returnFiber, current, element); - created.return = returnFiber; - return created; - } - - function updatePortal(returnFiber, current, portal, lanes) { - if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) { - // Insert - var created = createFiberFromPortal(portal, returnFiber.mode, lanes); - created.return = returnFiber; - return created; - } else { - // Update - var existing = useFiber(current, portal.children || []); - existing.return = returnFiber; - return existing; - } - } - - function updateFragment(returnFiber, current, fragment, lanes, key) { - if (current === null || current.tag !== Fragment) { - // Insert - var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key); - created.return = returnFiber; - return created; - } else { - // Update - var existing = useFiber(current, fragment); - existing.return = returnFiber; - return existing; - } - } - - function createChild(returnFiber, newChild, lanes) { - if (typeof newChild === 'string' || typeof newChild === 'number') { - // Text nodes don't have keys. If the previous node is implicitly keyed - // we can continue to replace it without aborting even if it is not a text - // node. - var created = createFiberFromText('' + newChild, returnFiber.mode, lanes); - created.return = returnFiber; - return created; - } - - if (typeof newChild === 'object' && newChild !== null) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - { - var _created = createFiberFromElement(newChild, returnFiber.mode, lanes); - - _created.ref = coerceRef(returnFiber, null, newChild); - _created.return = returnFiber; - return _created; - } - - case REACT_PORTAL_TYPE: - { - var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes); - - _created2.return = returnFiber; - return _created2; - } - } - - if (isArray$1(newChild) || getIteratorFn(newChild)) { - var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null); - - _created3.return = returnFiber; - return _created3; - } - - throwOnInvalidObjectType(returnFiber, newChild); - } - - { - if (typeof newChild === 'function') { - warnOnFunctionType(returnFiber); - } - } - - return null; - } - - function updateSlot(returnFiber, oldFiber, newChild, lanes) { - // Update the fiber if the keys match, otherwise return null. - var key = oldFiber !== null ? oldFiber.key : null; - - if (typeof newChild === 'string' || typeof newChild === 'number') { - // Text nodes don't have keys. If the previous node is implicitly keyed - // we can continue to replace it without aborting even if it is not a text - // node. - if (key !== null) { - return null; - } - - return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes); - } - - if (typeof newChild === 'object' && newChild !== null) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - { - if (newChild.key === key) { - if (newChild.type === REACT_FRAGMENT_TYPE) { - return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key); - } - - return updateElement(returnFiber, oldFiber, newChild, lanes); - } else { - return null; - } - } - - case REACT_PORTAL_TYPE: - { - if (newChild.key === key) { - return updatePortal(returnFiber, oldFiber, newChild, lanes); - } else { - return null; - } - } - } - - if (isArray$1(newChild) || getIteratorFn(newChild)) { - if (key !== null) { - return null; - } - - return updateFragment(returnFiber, oldFiber, newChild, lanes, null); - } - - throwOnInvalidObjectType(returnFiber, newChild); - } - - { - if (typeof newChild === 'function') { - warnOnFunctionType(returnFiber); - } - } - - return null; - } - - function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) { - if (typeof newChild === 'string' || typeof newChild === 'number') { - // Text nodes don't have keys, so we neither have to check the old nor - // new node for the key. If both are text nodes, they match. - var matchedFiber = existingChildren.get(newIdx) || null; - return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes); - } - - if (typeof newChild === 'object' && newChild !== null) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - { - var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; - - if (newChild.type === REACT_FRAGMENT_TYPE) { - return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key); - } - - return updateElement(returnFiber, _matchedFiber, newChild, lanes); - } - - case REACT_PORTAL_TYPE: - { - var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null; - - return updatePortal(returnFiber, _matchedFiber2, newChild, lanes); - } - - } - - if (isArray$1(newChild) || getIteratorFn(newChild)) { - var _matchedFiber3 = existingChildren.get(newIdx) || null; - - return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null); - } - - throwOnInvalidObjectType(returnFiber, newChild); - } - - { - if (typeof newChild === 'function') { - warnOnFunctionType(returnFiber); - } - } - - return null; - } - /** - * Warns if there is a duplicate or missing key - */ - - - function warnOnInvalidKey(child, knownKeys, returnFiber) { - { - if (typeof child !== 'object' || child === null) { - return knownKeys; - } - - switch (child.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - warnForMissingKey(child, returnFiber); - var key = child.key; - - if (typeof key !== 'string') { - break; - } - - if (knownKeys === null) { - knownKeys = new Set(); - knownKeys.add(key); - break; - } - - if (!knownKeys.has(key)) { - knownKeys.add(key); - break; - } - - error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key); - - break; - } - } - - return knownKeys; - } - - function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) { - // This algorithm can't optimize by searching from both ends since we - // don't have backpointers on fibers. I'm trying to see how far we can get - // with that model. If it ends up not being worth the tradeoffs, we can - // add it later. - // Even with a two ended optimization, we'd want to optimize for the case - // where there are few changes and brute force the comparison instead of - // going for the Map. It'd like to explore hitting that path first in - // forward-only mode and only go for the Map once we notice that we need - // lots of look ahead. This doesn't handle reversal as well as two ended - // search but that's unusual. Besides, for the two ended optimization to - // work on Iterables, we'd need to copy the whole set. - // In this first iteration, we'll just live with hitting the bad case - // (adding everything to a Map) in for every insert/move. - // If you change this code, also update reconcileChildrenIterator() which - // uses the same algorithm. - { - // First, validate keys. - var knownKeys = null; - - for (var i = 0; i < newChildren.length; i++) { - var child = newChildren[i]; - knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber); - } - } - - var resultingFirstChild = null; - var previousNewFiber = null; - var oldFiber = currentFirstChild; - var lastPlacedIndex = 0; - var newIdx = 0; - var nextOldFiber = null; - - for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) { - if (oldFiber.index > newIdx) { - nextOldFiber = oldFiber; - oldFiber = null; - } else { - nextOldFiber = oldFiber.sibling; - } - - var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes); - - if (newFiber === null) { - // TODO: This breaks on empty slots like null children. That's - // unfortunate because it triggers the slow path all the time. We need - // a better way to communicate whether this was a miss or null, - // boolean, undefined, etc. - if (oldFiber === null) { - oldFiber = nextOldFiber; - } - - break; - } - - if (shouldTrackSideEffects) { - if (oldFiber && newFiber.alternate === null) { - // We matched the slot, but we didn't reuse the existing fiber, so we - // need to delete the existing child. - deleteChild(returnFiber, oldFiber); - } - } - - lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); - - if (previousNewFiber === null) { - // TODO: Move out of the loop. This only happens for the first run. - resultingFirstChild = newFiber; - } else { - // TODO: Defer siblings if we're not at the right index for this slot. - // I.e. if we had null values before, then we want to defer this - // for each null value. However, we also don't want to call updateSlot - // with the previous one. - previousNewFiber.sibling = newFiber; - } - - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - - if (newIdx === newChildren.length) { - // We've reached the end of the new children. We can delete the rest. - deleteRemainingChildren(returnFiber, oldFiber); - return resultingFirstChild; - } - - if (oldFiber === null) { - // If we don't have any more existing children we can choose a fast path - // since the rest will all be insertions. - for (; newIdx < newChildren.length; newIdx++) { - var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes); - - if (_newFiber === null) { - continue; - } - - lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx); - - if (previousNewFiber === null) { - // TODO: Move out of the loop. This only happens for the first run. - resultingFirstChild = _newFiber; - } else { - previousNewFiber.sibling = _newFiber; - } - - previousNewFiber = _newFiber; - } - - return resultingFirstChild; - } // Add all children to a key map for quick lookups. - - - var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. - - for (; newIdx < newChildren.length; newIdx++) { - var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes); - - if (_newFiber2 !== null) { - if (shouldTrackSideEffects) { - if (_newFiber2.alternate !== null) { - // The new fiber is a work in progress, but if there exists a - // current, that means that we reused the fiber. We need to delete - // it from the child list so that we don't add it to the deletion - // list. - existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key); - } - } - - lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx); - - if (previousNewFiber === null) { - resultingFirstChild = _newFiber2; - } else { - previousNewFiber.sibling = _newFiber2; - } - - previousNewFiber = _newFiber2; - } - } - - if (shouldTrackSideEffects) { - // Any existing children that weren't consumed above were deleted. We need - // to add them to the deletion list. - existingChildren.forEach(function (child) { - return deleteChild(returnFiber, child); - }); - } - - return resultingFirstChild; - } - - function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) { - // This is the same implementation as reconcileChildrenArray(), - // but using the iterator instead. - var iteratorFn = getIteratorFn(newChildrenIterable); - - if (!(typeof iteratorFn === 'function')) { - { - throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - { - // We don't support rendering Generators because it's a mutation. - // See https://github.com/facebook/react/issues/12995 - if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag - newChildrenIterable[Symbol.toStringTag] === 'Generator') { - if (!didWarnAboutGenerators) { - error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.'); - } - - didWarnAboutGenerators = true; - } // Warn about using Maps as children - - - if (newChildrenIterable.entries === iteratorFn) { - if (!didWarnAboutMaps) { - error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.'); - } - - didWarnAboutMaps = true; - } // First, validate keys. - // We'll get a different iterator later for the main pass. - - - var _newChildren = iteratorFn.call(newChildrenIterable); - - if (_newChildren) { - var knownKeys = null; - - var _step = _newChildren.next(); - - for (; !_step.done; _step = _newChildren.next()) { - var child = _step.value; - knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber); - } - } - } - - var newChildren = iteratorFn.call(newChildrenIterable); - - if (!(newChildren != null)) { - { - throw Error( "An iterable object provided no iterator." ); - } - } - - var resultingFirstChild = null; - var previousNewFiber = null; - var oldFiber = currentFirstChild; - var lastPlacedIndex = 0; - var newIdx = 0; - var nextOldFiber = null; - var step = newChildren.next(); - - for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) { - if (oldFiber.index > newIdx) { - nextOldFiber = oldFiber; - oldFiber = null; - } else { - nextOldFiber = oldFiber.sibling; - } - - var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes); - - if (newFiber === null) { - // TODO: This breaks on empty slots like null children. That's - // unfortunate because it triggers the slow path all the time. We need - // a better way to communicate whether this was a miss or null, - // boolean, undefined, etc. - if (oldFiber === null) { - oldFiber = nextOldFiber; - } - - break; - } - - if (shouldTrackSideEffects) { - if (oldFiber && newFiber.alternate === null) { - // We matched the slot, but we didn't reuse the existing fiber, so we - // need to delete the existing child. - deleteChild(returnFiber, oldFiber); - } - } - - lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx); - - if (previousNewFiber === null) { - // TODO: Move out of the loop. This only happens for the first run. - resultingFirstChild = newFiber; - } else { - // TODO: Defer siblings if we're not at the right index for this slot. - // I.e. if we had null values before, then we want to defer this - // for each null value. However, we also don't want to call updateSlot - // with the previous one. - previousNewFiber.sibling = newFiber; - } - - previousNewFiber = newFiber; - oldFiber = nextOldFiber; - } - - if (step.done) { - // We've reached the end of the new children. We can delete the rest. - deleteRemainingChildren(returnFiber, oldFiber); - return resultingFirstChild; - } - - if (oldFiber === null) { - // If we don't have any more existing children we can choose a fast path - // since the rest will all be insertions. - for (; !step.done; newIdx++, step = newChildren.next()) { - var _newFiber3 = createChild(returnFiber, step.value, lanes); - - if (_newFiber3 === null) { - continue; - } - - lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx); - - if (previousNewFiber === null) { - // TODO: Move out of the loop. This only happens for the first run. - resultingFirstChild = _newFiber3; - } else { - previousNewFiber.sibling = _newFiber3; - } - - previousNewFiber = _newFiber3; - } - - return resultingFirstChild; - } // Add all children to a key map for quick lookups. - - - var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves. - - for (; !step.done; newIdx++, step = newChildren.next()) { - var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes); - - if (_newFiber4 !== null) { - if (shouldTrackSideEffects) { - if (_newFiber4.alternate !== null) { - // The new fiber is a work in progress, but if there exists a - // current, that means that we reused the fiber. We need to delete - // it from the child list so that we don't add it to the deletion - // list. - existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key); - } - } - - lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx); - - if (previousNewFiber === null) { - resultingFirstChild = _newFiber4; - } else { - previousNewFiber.sibling = _newFiber4; - } - - previousNewFiber = _newFiber4; - } - } - - if (shouldTrackSideEffects) { - // Any existing children that weren't consumed above were deleted. We need - // to add them to the deletion list. - existingChildren.forEach(function (child) { - return deleteChild(returnFiber, child); - }); - } - - return resultingFirstChild; - } - - function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) { - // There's no need to check for keys on text nodes since we don't have a - // way to define them. - if (currentFirstChild !== null && currentFirstChild.tag === HostText) { - // We already have an existing node so let's just update it and delete - // the rest. - deleteRemainingChildren(returnFiber, currentFirstChild.sibling); - var existing = useFiber(currentFirstChild, textContent); - existing.return = returnFiber; - return existing; - } // The existing first child is not a text node so we need to create one - // and delete the existing ones. - - - deleteRemainingChildren(returnFiber, currentFirstChild); - var created = createFiberFromText(textContent, returnFiber.mode, lanes); - created.return = returnFiber; - return created; - } - - function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) { - var key = element.key; - var child = currentFirstChild; - - while (child !== null) { - // TODO: If key === null and child.key === null, then this only applies to - // the first item in the list. - if (child.key === key) { - switch (child.tag) { - case Fragment: - { - if (element.type === REACT_FRAGMENT_TYPE) { - deleteRemainingChildren(returnFiber, child.sibling); - var existing = useFiber(child, element.props.children); - existing.return = returnFiber; - - { - existing._debugSource = element._source; - existing._debugOwner = element._owner; - } - - return existing; - } - - break; - } - - case Block: - - // We intentionally fallthrough here if enableBlocksAPI is not on. - // eslint-disable-next-lined no-fallthrough - - default: - { - if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path: - isCompatibleFamilyForHotReloading(child, element) )) { - deleteRemainingChildren(returnFiber, child.sibling); - - var _existing3 = useFiber(child, element.props); - - _existing3.ref = coerceRef(returnFiber, child, element); - _existing3.return = returnFiber; - - { - _existing3._debugSource = element._source; - _existing3._debugOwner = element._owner; - } - - return _existing3; - } - - break; - } - } // Didn't match. - - - deleteRemainingChildren(returnFiber, child); - break; - } else { - deleteChild(returnFiber, child); - } - - child = child.sibling; - } - - if (element.type === REACT_FRAGMENT_TYPE) { - var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key); - created.return = returnFiber; - return created; - } else { - var _created4 = createFiberFromElement(element, returnFiber.mode, lanes); - - _created4.ref = coerceRef(returnFiber, currentFirstChild, element); - _created4.return = returnFiber; - return _created4; - } - } - - function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) { - var key = portal.key; - var child = currentFirstChild; - - while (child !== null) { - // TODO: If key === null and child.key === null, then this only applies to - // the first item in the list. - if (child.key === key) { - if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { - deleteRemainingChildren(returnFiber, child.sibling); - var existing = useFiber(child, portal.children || []); - existing.return = returnFiber; - return existing; - } else { - deleteRemainingChildren(returnFiber, child); - break; - } - } else { - deleteChild(returnFiber, child); - } - - child = child.sibling; - } - - var created = createFiberFromPortal(portal, returnFiber.mode, lanes); - created.return = returnFiber; - return created; - } // This API will tag the children with the side-effect of the reconciliation - // itself. They will be added to the side-effect list as we pass through the - // children and the parent. - - - function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) { - // This function is not recursive. - // If the top level item is an array, we treat it as a set of children, - // not as a fragment. Nested arrays on the other hand will be treated as - // fragment nodes. Recursion happens at the normal flow. - // Handle top level unkeyed fragments as if they were arrays. - // This leads to an ambiguity between <>{[...]}</> and <>...</>. - // We treat the ambiguous cases above the same. - var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null; - - if (isUnkeyedTopLevelFragment) { - newChild = newChild.props.children; - } // Handle object types - - - var isObject = typeof newChild === 'object' && newChild !== null; - - if (isObject) { - switch (newChild.$$typeof) { - case REACT_ELEMENT_TYPE: - return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes)); - - case REACT_PORTAL_TYPE: - return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes)); - - } - } - - if (typeof newChild === 'string' || typeof newChild === 'number') { - return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes)); - } - - if (isArray$1(newChild)) { - return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes); - } - - if (getIteratorFn(newChild)) { - return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes); - } - - if (isObject) { - throwOnInvalidObjectType(returnFiber, newChild); - } - - { - if (typeof newChild === 'function') { - warnOnFunctionType(returnFiber); - } - } - - if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) { - // If the new child is undefined, and the return fiber is a composite - // component, throw an error. If Fiber return types are disabled, - // we already threw above. - switch (returnFiber.tag) { - case ClassComponent: - { - { - var instance = returnFiber.stateNode; - - if (instance.render._isMockFunction) { - // We allow auto-mocks to proceed as if they're returning null. - break; - } - } - } - // Intentionally fall through to the next case, which handles both - // functions and classes - // eslint-disable-next-lined no-fallthrough - - case Block: - case FunctionComponent: - case ForwardRef: - case SimpleMemoComponent: - { - { - { - throw Error( (getComponentName(returnFiber.type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." ); - } - } - } - } - } // Remaining cases are all treated as empty. - - - return deleteRemainingChildren(returnFiber, currentFirstChild); - } - - return reconcileChildFibers; - } - - var reconcileChildFibers = ChildReconciler(true); - var mountChildFibers = ChildReconciler(false); - function cloneChildFibers(current, workInProgress) { - if (!(current === null || workInProgress.child === current.child)) { - { - throw Error( "Resuming work not yet implemented." ); - } - } - - if (workInProgress.child === null) { - return; - } - - var currentChild = workInProgress.child; - var newChild = createWorkInProgress(currentChild, currentChild.pendingProps); - workInProgress.child = newChild; - newChild.return = workInProgress; - - while (currentChild.sibling !== null) { - currentChild = currentChild.sibling; - newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps); - newChild.return = workInProgress; - } - - newChild.sibling = null; - } // Reset a workInProgress child set to prepare it for a second pass. - - function resetChildFibers(workInProgress, lanes) { - var child = workInProgress.child; - - while (child !== null) { - resetWorkInProgress(child, lanes); - child = child.sibling; - } - } - - var NO_CONTEXT = {}; - var contextStackCursor$1 = createCursor(NO_CONTEXT); - var contextFiberStackCursor = createCursor(NO_CONTEXT); - var rootInstanceStackCursor = createCursor(NO_CONTEXT); - - function requiredContext(c) { - if (!(c !== NO_CONTEXT)) { - { - throw Error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - return c; - } - - function getRootHostContainer() { - var rootInstance = requiredContext(rootInstanceStackCursor.current); - return rootInstance; - } - - function pushHostContainer(fiber, nextRootInstance) { - // Push current root instance onto the stack; - // This allows us to reset root when portals are popped. - push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - - push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack. - // However, we can't just call getRootHostContext() and push it because - // we'd have a different number of entries on the stack depending on - // whether getRootHostContext() throws somewhere in renderer code or not. - // So we push an empty value first. This lets us safely unwind on errors. - - push(contextStackCursor$1, NO_CONTEXT, fiber); - var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it. - - pop(contextStackCursor$1, fiber); - push(contextStackCursor$1, nextRootContext, fiber); - } - - function popHostContainer(fiber) { - pop(contextStackCursor$1, fiber); - pop(contextFiberStackCursor, fiber); - pop(rootInstanceStackCursor, fiber); - } - - function getHostContext() { - var context = requiredContext(contextStackCursor$1.current); - return context; - } - - function pushHostContext(fiber) { - var rootInstance = requiredContext(rootInstanceStackCursor.current); - var context = requiredContext(contextStackCursor$1.current); - var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique. - - if (context === nextContext) { - return; - } // Track the context and the Fiber that provided it. - // This enables us to pop only Fibers that provide unique contexts. - - - push(contextFiberStackCursor, fiber, fiber); - push(contextStackCursor$1, nextContext, fiber); - } - - function popHostContext(fiber) { - // Do not pop unless this Fiber provided the current context. - // pushHostContext() only pushes Fibers that provide unique contexts. - if (contextFiberStackCursor.current !== fiber) { - return; - } - - pop(contextStackCursor$1, fiber); - pop(contextFiberStackCursor, fiber); - } - - var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is - // inherited deeply down the subtree. The upper bits only affect - // this immediate suspense boundary and gets reset each new - // boundary or suspense list. - - var SubtreeSuspenseContextMask = 1; // Subtree Flags: - // InvisibleParentSuspenseContext indicates that one of our parent Suspense - // boundaries is not currently showing visible main content. - // Either because it is already showing a fallback or is not mounted at all. - // We can use this to determine if it is desirable to trigger a fallback at - // the parent. If not, then we might need to trigger undesirable boundaries - // and/or suspend the commit to avoid hiding the parent content. - - var InvisibleParentSuspenseContext = 1; // Shallow Flags: - // ForceSuspenseFallback can be used by SuspenseList to force newly added - // items into their fallback state during one of the render passes. - - var ForceSuspenseFallback = 2; - var suspenseStackCursor = createCursor(DefaultSuspenseContext); - function hasSuspenseContext(parentContext, flag) { - return (parentContext & flag) !== 0; - } - function setDefaultShallowSuspenseContext(parentContext) { - return parentContext & SubtreeSuspenseContextMask; - } - function setShallowSuspenseContext(parentContext, shallowContext) { - return parentContext & SubtreeSuspenseContextMask | shallowContext; - } - function addSubtreeSuspenseContext(parentContext, subtreeContext) { - return parentContext | subtreeContext; - } - function pushSuspenseContext(fiber, newContext) { - push(suspenseStackCursor, newContext, fiber); - } - function popSuspenseContext(fiber) { - pop(suspenseStackCursor, fiber); - } - - function shouldCaptureSuspense(workInProgress, hasInvisibleParent) { - // If it was the primary children that just suspended, capture and render the - // fallback. Otherwise, don't capture and bubble to the next boundary. - var nextState = workInProgress.memoizedState; - - if (nextState !== null) { - if (nextState.dehydrated !== null) { - // A dehydrated boundary always captures. - return true; - } - - return false; - } - - var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop. - - if (props.fallback === undefined) { - return false; - } // Regular boundaries always capture. - - - if (props.unstable_avoidThisFallback !== true) { - return true; - } // If it's a boundary we should avoid, then we prefer to bubble up to the - // parent boundary if it is currently invisible. - - - if (hasInvisibleParent) { - return false; - } // If the parent is not able to handle it, we must handle it. - - - return true; - } - function findFirstSuspended(row) { - var node = row; - - while (node !== null) { - if (node.tag === SuspenseComponent) { - var state = node.memoizedState; - - if (state !== null) { - var dehydrated = state.dehydrated; - - if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) { - return node; - } - } - } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't - // keep track of whether it suspended or not. - node.memoizedProps.revealOrder !== undefined) { - var didSuspend = (node.flags & DidCapture) !== NoFlags; - - if (didSuspend) { - return node; - } - } else if (node.child !== null) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === row) { - return null; - } - - while (node.sibling === null) { - if (node.return === null || node.return === row) { - return null; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } - - return null; - } - - var NoFlags$1 = - /* */ - 0; // Represents whether effect should fire. - - var HasEffect = - /* */ - 1; // Represents the phase in which the effect (not the clean-up) fires. - - var Layout = - /* */ - 2; - var Passive$1 = - /* */ - 4; - - // This may have been an insertion or a hydration. - - var hydrationParentFiber = null; - var nextHydratableInstance = null; - var isHydrating = false; - - function enterHydrationState(fiber) { - - var parentInstance = fiber.stateNode.containerInfo; - nextHydratableInstance = getFirstHydratableChild(parentInstance); - hydrationParentFiber = fiber; - isHydrating = true; - return true; - } - - function deleteHydratableInstance(returnFiber, instance) { - { - switch (returnFiber.tag) { - case HostRoot: - didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance); - break; - - case HostComponent: - didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance); - break; - } - } - - var childToDelete = createFiberFromHostInstanceForDeletion(); - childToDelete.stateNode = instance; - childToDelete.return = returnFiber; - childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However, - // these children are not part of the reconciliation list of children. - // Even if we abort and rereconcile the children, that will try to hydrate - // again and the nodes are still in the host tree so these will be - // recreated. - - if (returnFiber.lastEffect !== null) { - returnFiber.lastEffect.nextEffect = childToDelete; - returnFiber.lastEffect = childToDelete; - } else { - returnFiber.firstEffect = returnFiber.lastEffect = childToDelete; - } - } - - function insertNonHydratedInstance(returnFiber, fiber) { - fiber.flags = fiber.flags & ~Hydrating | Placement; - - { - switch (returnFiber.tag) { - case HostRoot: - { - var parentContainer = returnFiber.stateNode.containerInfo; - - switch (fiber.tag) { - case HostComponent: - var type = fiber.type; - var props = fiber.pendingProps; - didNotFindHydratableContainerInstance(parentContainer, type); - break; - - case HostText: - var text = fiber.pendingProps; - didNotFindHydratableContainerTextInstance(parentContainer, text); - break; - } - - break; - } - - case HostComponent: - { - var parentType = returnFiber.type; - var parentProps = returnFiber.memoizedProps; - var parentInstance = returnFiber.stateNode; - - switch (fiber.tag) { - case HostComponent: - var _type = fiber.type; - var _props = fiber.pendingProps; - didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type); - break; - - case HostText: - var _text = fiber.pendingProps; - didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text); - break; - - case SuspenseComponent: - didNotFindHydratableSuspenseInstance(parentType, parentProps); - break; - } - - break; - } - - default: - return; - } - } - } - - function tryHydrate(fiber, nextInstance) { - switch (fiber.tag) { - case HostComponent: - { - var type = fiber.type; - var props = fiber.pendingProps; - var instance = canHydrateInstance(nextInstance, type); - - if (instance !== null) { - fiber.stateNode = instance; - return true; - } - - return false; - } - - case HostText: - { - var text = fiber.pendingProps; - var textInstance = canHydrateTextInstance(nextInstance, text); - - if (textInstance !== null) { - fiber.stateNode = textInstance; - return true; - } - - return false; - } - - case SuspenseComponent: - { - - return false; - } - - default: - return false; - } - } - - function tryToClaimNextHydratableInstance(fiber) { - if (!isHydrating) { - return; - } - - var nextInstance = nextHydratableInstance; - - if (!nextInstance) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - return; - } - - var firstAttemptedInstance = nextInstance; - - if (!tryHydrate(fiber, nextInstance)) { - // If we can't hydrate this instance let's try the next one. - // We use this as a heuristic. It's based on intuition and not data so it - // might be flawed or unnecessary. - nextInstance = getNextHydratableSibling(firstAttemptedInstance); - - if (!nextInstance || !tryHydrate(fiber, nextInstance)) { - // Nothing to hydrate. Make it an insertion. - insertNonHydratedInstance(hydrationParentFiber, fiber); - isHydrating = false; - hydrationParentFiber = fiber; - return; - } // We matched the next one, we'll now assume that the first one was - // superfluous and we'll delete it. Since we can't eagerly delete it - // we'll have to schedule a deletion. To do that, this node needs a dummy - // fiber associated with it. - - - deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance); - } - - hydrationParentFiber = fiber; - nextHydratableInstance = getFirstHydratableChild(nextInstance); - } - - function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) { - - var instance = fiber.stateNode; - var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component. - - fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there - // is a new ref we mark this as an update. - - if (updatePayload !== null) { - return true; - } - - return false; - } - - function prepareToHydrateHostTextInstance(fiber) { - - var textInstance = fiber.stateNode; - var textContent = fiber.memoizedProps; - var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber); - - { - if (shouldUpdate) { - // We assume that prepareToHydrateHostTextInstance is called in a context where the - // hydration parent is the parent host component of this host text. - var returnFiber = hydrationParentFiber; - - if (returnFiber !== null) { - switch (returnFiber.tag) { - case HostRoot: - { - var parentContainer = returnFiber.stateNode.containerInfo; - didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent); - break; - } - - case HostComponent: - { - var parentType = returnFiber.type; - var parentProps = returnFiber.memoizedProps; - var parentInstance = returnFiber.stateNode; - didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent); - break; - } - } - } - } - } - - return shouldUpdate; - } - - function skipPastDehydratedSuspenseInstance(fiber) { - - var suspenseState = fiber.memoizedState; - var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null; - - if (!suspenseInstance) { - { - throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance); - } - - function popToNextHostParent(fiber) { - var parent = fiber.return; - - while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) { - parent = parent.return; - } - - hydrationParentFiber = parent; - } - - function popHydrationState(fiber) { - - if (fiber !== hydrationParentFiber) { - // We're deeper than the current hydration context, inside an inserted - // tree. - return false; - } - - if (!isHydrating) { - // If we're not currently hydrating but we're in a hydration context, then - // we were an insertion and now need to pop up reenter hydration of our - // siblings. - popToNextHostParent(fiber); - isHydrating = true; - return false; - } - - var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now. - // We only do this deeper than head and body since they tend to have random - // other nodes in them. We also ignore components with pure text content in - // side of them. - // TODO: Better heuristic. - - if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) { - var nextInstance = nextHydratableInstance; - - while (nextInstance) { - deleteHydratableInstance(fiber, nextInstance); - nextInstance = getNextHydratableSibling(nextInstance); - } - } - - popToNextHostParent(fiber); - - if (fiber.tag === SuspenseComponent) { - nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber); - } else { - nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null; - } - - return true; - } - - function resetHydrationState() { - - hydrationParentFiber = null; - nextHydratableInstance = null; - isHydrating = false; - } - - function getIsHydrating() { - return isHydrating; - } - - // and should be reset before starting a new render. - // This tracks which mutable sources need to be reset after a render. - - var workInProgressSources = []; - var rendererSigil$1; - - { - // Used to detect multiple renderers using the same mutable source. - rendererSigil$1 = {}; - } - - function markSourceAsDirty(mutableSource) { - workInProgressSources.push(mutableSource); - } - function resetWorkInProgressVersions() { - for (var i = 0; i < workInProgressSources.length; i++) { - var mutableSource = workInProgressSources[i]; - - { - mutableSource._workInProgressVersionPrimary = null; - } - } - - workInProgressSources.length = 0; - } - function getWorkInProgressVersion(mutableSource) { - { - return mutableSource._workInProgressVersionPrimary; - } - } - function setWorkInProgressVersion(mutableSource, version) { - { - mutableSource._workInProgressVersionPrimary = version; - } - - workInProgressSources.push(mutableSource); - } - function warnAboutMultipleRenderersDEV(mutableSource) { - { - { - if (mutableSource._currentPrimaryRenderer == null) { - mutableSource._currentPrimaryRenderer = rendererSigil$1; - } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) { - error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.'); - } - } - } - } // Eager reads the version of a mutable source and stores it on the root. - - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig; - var didWarnAboutMismatchedHooksForComponent; - var didWarnAboutUseOpaqueIdentifier; - - { - didWarnAboutUseOpaqueIdentifier = {}; - didWarnAboutMismatchedHooksForComponent = new Set(); - } - - // These are set right before calling the component. - var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from - // the work-in-progress hook. - - var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The - // current hook list is the list that belongs to the current fiber. The - // work-in-progress hook list is a new list that will be added to the - // work-in-progress fiber. - - var currentHook = null; - var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This - // does not get reset if we do another render pass; only when we're completely - // finished evaluating this component. This is an optimization so we know - // whether we need to clear render phase updates after a throw. - - var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This - // gets reset after each attempt. - // TODO: Maybe there's some way to consolidate this with - // `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`. - - var didScheduleRenderPhaseUpdateDuringThisPass = false; - var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook - - var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders. - // The list stores the order of hooks used during the initial render (mount). - // Subsequent renders (updates) reference this list. - - var hookTypesDev = null; - var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore - // the dependencies for Hooks that need them (e.g. useEffect or useMemo). - // When true, such Hooks will always be "remounted". Only used during hot reload. - - var ignorePreviousDependencies = false; - - function mountHookTypesDev() { - { - var hookName = currentHookNameInDev; - - if (hookTypesDev === null) { - hookTypesDev = [hookName]; - } else { - hookTypesDev.push(hookName); - } - } - } - - function updateHookTypesDev() { - { - var hookName = currentHookNameInDev; - - if (hookTypesDev !== null) { - hookTypesUpdateIndexDev++; - - if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) { - warnOnHookMismatchInDev(hookName); - } - } - } - } - - function checkDepsAreArrayDev(deps) { - { - if (deps !== undefined && deps !== null && !Array.isArray(deps)) { - // Verify deps, but only on mount to avoid extra checks. - // It's unlikely their type would change as usually you define them inline. - error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps); - } - } - } - - function warnOnHookMismatchInDev(currentHookName) { - { - var componentName = getComponentName(currentlyRenderingFiber$1.type); - - if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) { - didWarnAboutMismatchedHooksForComponent.add(componentName); - - if (hookTypesDev !== null) { - var table = ''; - var secondColumnStart = 30; - - for (var i = 0; i <= hookTypesUpdateIndexDev; i++) { - var oldHookName = hookTypesDev[i]; - var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName; - var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up - // lol @ IE not supporting String#repeat - - while (row.length < secondColumnStart) { - row += ' '; - } - - row += newHookName + '\n'; - table += row; - } - - error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table); - } - } - } - } - - function throwInvalidHookError() { - { - { - throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." ); - } - } - } - - function areHookInputsEqual(nextDeps, prevDeps) { - { - if (ignorePreviousDependencies) { - // Only true when this component is being hot reloaded. - return false; - } - } - - if (prevDeps === null) { - { - error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev); - } - - return false; - } - - { - // Don't bother comparing lengths in prod because these arrays should be - // passed inline. - if (nextDeps.length !== prevDeps.length) { - error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]"); - } - } - - for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) { - if (objectIs(nextDeps[i], prevDeps[i])) { - continue; - } - - return false; - } - - return true; - } - - function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) { - renderLanes = nextRenderLanes; - currentlyRenderingFiber$1 = workInProgress; - - { - hookTypesDev = current !== null ? current._debugHookTypes : null; - hookTypesUpdateIndexDev = -1; // Used for hot reloading: - - ignorePreviousDependencies = current !== null && current.type !== workInProgress.type; - } - - workInProgress.memoizedState = null; - workInProgress.updateQueue = null; - workInProgress.lanes = NoLanes; // The following should have already been reset - // currentHook = null; - // workInProgressHook = null; - // didScheduleRenderPhaseUpdate = false; - // TODO Warn if no hooks are used at all during mount, then some are used during update. - // Currently we will identify the update render as a mount because memoizedState === null. - // This is tricky because it's valid for certain types of components (e.g. React.lazy) - // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used. - // Non-stateful hooks (e.g. context) don't get added to memoizedState, - // so memoizedState would be null during updates and mounts. - - { - if (current !== null && current.memoizedState !== null) { - ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV; - } else if (hookTypesDev !== null) { - // This dispatcher handles an edge case where a component is updating, - // but no stateful hooks have been used. - // We want to match the production code behavior (which will use HooksDispatcherOnMount), - // but with the extra DEV validation to ensure hooks ordering hasn't changed. - // This dispatcher does that. - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV; - } else { - ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; - } - } - - var children = Component(props, secondArg); // Check if there was a render phase update - - if (didScheduleRenderPhaseUpdateDuringThisPass) { - // Keep rendering in a loop for as long as render phase updates continue to - // be scheduled. Use a counter to prevent infinite loops. - var numberOfReRenders = 0; - - do { - didScheduleRenderPhaseUpdateDuringThisPass = false; - - if (!(numberOfReRenders < RE_RENDER_LIMIT)) { - { - throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." ); - } - } - - numberOfReRenders += 1; - - { - // Even when hot reloading, allow dependencies to stabilize - // after first render to prevent infinite render phase updates. - ignorePreviousDependencies = false; - } // Start over from the beginning of the list - - - currentHook = null; - workInProgressHook = null; - workInProgress.updateQueue = null; - - { - // Also validate hook order for cascading updates. - hookTypesUpdateIndexDev = -1; - } - - ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ; - children = Component(props, secondArg); - } while (didScheduleRenderPhaseUpdateDuringThisPass); - } // We can assume the previous dispatcher is always this one, since we set it - // at the beginning of the render phase and there's no re-entrancy. - - - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - - { - workInProgress._debugHookTypes = hookTypesDev; - } // This check uses currentHook so that it works the same in DEV and prod bundles. - // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles. - - - var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null; - renderLanes = NoLanes; - currentlyRenderingFiber$1 = null; - currentHook = null; - workInProgressHook = null; - - { - currentHookNameInDev = null; - hookTypesDev = null; - hookTypesUpdateIndexDev = -1; - } - - didScheduleRenderPhaseUpdate = false; - - if (!!didRenderTooFewHooks) { - { - throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." ); - } - } - - return children; - } - function bailoutHooks(current, workInProgress, lanes) { - workInProgress.updateQueue = current.updateQueue; - workInProgress.flags &= ~(Passive | Update); - current.lanes = removeLanes(current.lanes, lanes); - } - function resetHooksAfterThrow() { - // We can assume the previous dispatcher is always this one, since we set it - // at the beginning of the render phase and there's no re-entrancy. - ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; - - if (didScheduleRenderPhaseUpdate) { - // There were render phase updates. These are only valid for this render - // phase, which we are now aborting. Remove the updates from the queues so - // they do not persist to the next render. Do not remove updates from hooks - // that weren't processed. - // - // Only reset the updates from the queue if it has a clone. If it does - // not have a clone, that means it wasn't processed, and the updates were - // scheduled before we entered the render phase. - var hook = currentlyRenderingFiber$1.memoizedState; - - while (hook !== null) { - var queue = hook.queue; - - if (queue !== null) { - queue.pending = null; - } - - hook = hook.next; - } - - didScheduleRenderPhaseUpdate = false; - } - - renderLanes = NoLanes; - currentlyRenderingFiber$1 = null; - currentHook = null; - workInProgressHook = null; - - { - hookTypesDev = null; - hookTypesUpdateIndexDev = -1; - currentHookNameInDev = null; - isUpdatingOpaqueValueInRenderPhase = false; - } - - didScheduleRenderPhaseUpdateDuringThisPass = false; - } - - function mountWorkInProgressHook() { - var hook = { - memoizedState: null, - baseState: null, - baseQueue: null, - queue: null, - next: null - }; - - if (workInProgressHook === null) { - // This is the first hook in the list - currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook; - } else { - // Append to the end of the list - workInProgressHook = workInProgressHook.next = hook; - } - - return workInProgressHook; - } - - function updateWorkInProgressHook() { - // This function is used both for updates and for re-renders triggered by a - // render phase update. It assumes there is either a current hook we can - // clone, or a work-in-progress hook from a previous render pass that we can - // use as a base. When we reach the end of the base list, we must switch to - // the dispatcher used for mounts. - var nextCurrentHook; - - if (currentHook === null) { - var current = currentlyRenderingFiber$1.alternate; - - if (current !== null) { - nextCurrentHook = current.memoizedState; - } else { - nextCurrentHook = null; - } - } else { - nextCurrentHook = currentHook.next; - } - - var nextWorkInProgressHook; - - if (workInProgressHook === null) { - nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState; - } else { - nextWorkInProgressHook = workInProgressHook.next; - } - - if (nextWorkInProgressHook !== null) { - // There's already a work-in-progress. Reuse it. - workInProgressHook = nextWorkInProgressHook; - nextWorkInProgressHook = workInProgressHook.next; - currentHook = nextCurrentHook; - } else { - // Clone from the current hook. - if (!(nextCurrentHook !== null)) { - { - throw Error( "Rendered more hooks than during the previous render." ); - } - } - - currentHook = nextCurrentHook; - var newHook = { - memoizedState: currentHook.memoizedState, - baseState: currentHook.baseState, - baseQueue: currentHook.baseQueue, - queue: currentHook.queue, - next: null - }; - - if (workInProgressHook === null) { - // This is the first hook in the list. - currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook; - } else { - // Append to the end of the list. - workInProgressHook = workInProgressHook.next = newHook; - } - } - - return workInProgressHook; - } - - function createFunctionComponentUpdateQueue() { - return { - lastEffect: null - }; - } - - function basicStateReducer(state, action) { - // $FlowFixMe: Flow doesn't like mixed types - return typeof action === 'function' ? action(state) : action; - } - - function mountReducer(reducer, initialArg, init) { - var hook = mountWorkInProgressHook(); - var initialState; - - if (init !== undefined) { - initialState = init(initialArg); - } else { - initialState = initialArg; - } - - hook.memoizedState = hook.baseState = initialState; - var queue = hook.queue = { - pending: null, - dispatch: null, - lastRenderedReducer: reducer, - lastRenderedState: initialState - }; - var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue); - return [hook.memoizedState, dispatch]; - } - - function updateReducer(reducer, initialArg, init) { - var hook = updateWorkInProgressHook(); - var queue = hook.queue; - - if (!(queue !== null)) { - { - throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." ); - } - } - - queue.lastRenderedReducer = reducer; - var current = currentHook; // The last rebase update that is NOT part of the base state. - - var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet. - - var pendingQueue = queue.pending; - - if (pendingQueue !== null) { - // We have new updates that haven't been processed yet. - // We'll add them to the base queue. - if (baseQueue !== null) { - // Merge the pending queue and the base queue. - var baseFirst = baseQueue.next; - var pendingFirst = pendingQueue.next; - baseQueue.next = pendingFirst; - pendingQueue.next = baseFirst; - } - - { - if (current.baseQueue !== baseQueue) { - // Internal invariant that should never happen, but feasibly could in - // the future if we implement resuming, or some form of that. - error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.'); - } - } - - current.baseQueue = baseQueue = pendingQueue; - queue.pending = null; - } - - if (baseQueue !== null) { - // We have a queue to process. - var first = baseQueue.next; - var newState = current.baseState; - var newBaseState = null; - var newBaseQueueFirst = null; - var newBaseQueueLast = null; - var update = first; - - do { - var updateLane = update.lane; - - if (!isSubsetOfLanes(renderLanes, updateLane)) { - // Priority is insufficient. Skip this update. If this is the first - // skipped update, the previous update/state is the new base - // update/state. - var clone = { - lane: updateLane, - action: update.action, - eagerReducer: update.eagerReducer, - eagerState: update.eagerState, - next: null - }; - - if (newBaseQueueLast === null) { - newBaseQueueFirst = newBaseQueueLast = clone; - newBaseState = newState; - } else { - newBaseQueueLast = newBaseQueueLast.next = clone; - } // Update the remaining priority in the queue. - // TODO: Don't need to accumulate this. Instead, we can remove - // renderLanes from the original lanes. - - - currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane); - markSkippedUpdateLanes(updateLane); - } else { - // This update does have sufficient priority. - if (newBaseQueueLast !== null) { - var _clone = { - // This update is going to be committed so we never want uncommit - // it. Using NoLane works because 0 is a subset of all bitmasks, so - // this will never be skipped by the check above. - lane: NoLane, - action: update.action, - eagerReducer: update.eagerReducer, - eagerState: update.eagerState, - next: null - }; - newBaseQueueLast = newBaseQueueLast.next = _clone; - } // Process this update. - - - if (update.eagerReducer === reducer) { - // If this update was processed eagerly, and its reducer matches the - // current reducer, we can use the eagerly computed state. - newState = update.eagerState; - } else { - var action = update.action; - newState = reducer(newState, action); - } - } - - update = update.next; - } while (update !== null && update !== first); - - if (newBaseQueueLast === null) { - newBaseState = newState; - } else { - newBaseQueueLast.next = newBaseQueueFirst; - } // Mark that the fiber performed work, but only if the new state is - // different from the current state. - - - if (!objectIs(newState, hook.memoizedState)) { - markWorkInProgressReceivedUpdate(); - } - - hook.memoizedState = newState; - hook.baseState = newBaseState; - hook.baseQueue = newBaseQueueLast; - queue.lastRenderedState = newState; - } - - var dispatch = queue.dispatch; - return [hook.memoizedState, dispatch]; - } - - function rerenderReducer(reducer, initialArg, init) { - var hook = updateWorkInProgressHook(); - var queue = hook.queue; - - if (!(queue !== null)) { - { - throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." ); - } - } - - queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous - // work-in-progress hook. - - var dispatch = queue.dispatch; - var lastRenderPhaseUpdate = queue.pending; - var newState = hook.memoizedState; - - if (lastRenderPhaseUpdate !== null) { - // The queue doesn't persist past this render pass. - queue.pending = null; - var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next; - var update = firstRenderPhaseUpdate; - - do { - // Process this render phase update. We don't have to check the - // priority because it will always be the same as the current - // render's. - var action = update.action; - newState = reducer(newState, action); - update = update.next; - } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is - // different from the current state. - - - if (!objectIs(newState, hook.memoizedState)) { - markWorkInProgressReceivedUpdate(); - } - - hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to - // the base state unless the queue is empty. - // TODO: Not sure if this is the desired semantics, but it's what we - // do for gDSFP. I can't remember why. - - if (hook.baseQueue === null) { - hook.baseState = newState; - } - - queue.lastRenderedState = newState; - } - - return [newState, dispatch]; - } - - function readFromUnsubcribedMutableSource(root, source, getSnapshot) { - { - warnAboutMultipleRenderersDEV(source); - } - - var getVersion = source._getVersion; - var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render? - - var isSafeToReadFromSource = false; // Check the version first. - // If this render has already been started with a specific version, - // we can use it alone to determine if we can safely read from the source. - - var currentRenderVersion = getWorkInProgressVersion(source); - - if (currentRenderVersion !== null) { - // It's safe to read if the store hasn't been mutated since the last time - // we read something. - isSafeToReadFromSource = currentRenderVersion === version; - } else { - // If there's no version, then this is the first time we've read from the - // source during the current render pass, so we need to do a bit more work. - // What we need to determine is if there are any hooks that already - // subscribed to the source, and if so, whether there are any pending - // mutations that haven't been synchronized yet. - // - // If there are no pending mutations, then `root.mutableReadLanes` will be - // empty, and we know we can safely read. - // - // If there *are* pending mutations, we may still be able to safely read - // if the currently rendering lanes are inclusive of the pending mutation - // lanes, since that guarantees that the value we're about to read from - // the source is consistent with the values that we read during the most - // recent mutation. - isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes); - - if (isSafeToReadFromSource) { - // If it's safe to read from this source during the current render, - // store the version in case other components read from it. - // A changed version number will let those components know to throw and restart the render. - setWorkInProgressVersion(source, version); - } - } - - if (isSafeToReadFromSource) { - var snapshot = getSnapshot(source._source); - - { - if (typeof snapshot === 'function') { - error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.'); - } - } - - return snapshot; - } else { - // This handles the special case of a mutable source being shared between renderers. - // In that case, if the source is mutated between the first and second renderer, - // The second renderer don't know that it needs to reset the WIP version during unwind, - // (because the hook only marks sources as dirty if it's written to their WIP version). - // That would cause this tear check to throw again and eventually be visible to the user. - // We can avoid this infinite loop by explicitly marking the source as dirty. - // - // This can lead to tearing in the first renderer when it resumes, - // but there's nothing we can do about that (short of throwing here and refusing to continue the render). - markSourceAsDirty(source); - - { - { - throw Error( "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue." ); - } - } - } - } - - function useMutableSource(hook, source, getSnapshot, subscribe) { - var root = getWorkInProgressRoot(); - - if (!(root !== null)) { - { - throw Error( "Expected a work-in-progress root. This is a bug in React. Please file an issue." ); - } - } - - var getVersion = source._getVersion; - var version = getVersion(source._source); - var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const - - var _dispatcher$useState = dispatcher.useState(function () { - return readFromUnsubcribedMutableSource(root, source, getSnapshot); - }), - currentSnapshot = _dispatcher$useState[0], - setSnapshot = _dispatcher$useState[1]; - - var snapshot = currentSnapshot; // Grab a handle to the state hook as well. - // We use it to clear the pending update queue if we have a new source. - - var stateHook = workInProgressHook; - var memoizedState = hook.memoizedState; - var refs = memoizedState.refs; - var prevGetSnapshot = refs.getSnapshot; - var prevSource = memoizedState.source; - var prevSubscribe = memoizedState.subscribe; - var fiber = currentlyRenderingFiber$1; - hook.memoizedState = { - refs: refs, - source: source, - subscribe: subscribe - }; // Sync the values needed by our subscription handler after each commit. - - dispatcher.useEffect(function () { - refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes, - // but this hook recreates the queue in certain cases to avoid updates from stale sources. - // handleChange() below needs to reference the dispatch function without re-subscribing, - // so we use a ref to ensure that it always has the latest version. - - refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now. - - var maybeNewVersion = getVersion(source._source); - - if (!objectIs(version, maybeNewVersion)) { - var maybeNewSnapshot = getSnapshot(source._source); - - { - if (typeof maybeNewSnapshot === 'function') { - error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.'); - } - } - - if (!objectIs(snapshot, maybeNewSnapshot)) { - setSnapshot(maybeNewSnapshot); - var lane = requestUpdateLane(fiber); - markRootMutableRead(root, lane); - } // If the source mutated between render and now, - // there may be state updates already scheduled from the old source. - // Entangle the updates so that they render in the same batch. - - - markRootEntangled(root, root.mutableReadLanes); - } - }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect. - - dispatcher.useEffect(function () { - var handleChange = function () { - var latestGetSnapshot = refs.getSnapshot; - var latestSetSnapshot = refs.setSnapshot; - - try { - latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time. - - var lane = requestUpdateLane(fiber); - markRootMutableRead(root, lane); - } catch (error) { - // A selector might throw after a source mutation. - // e.g. it might try to read from a part of the store that no longer exists. - // In this case we should still schedule an update with React. - // Worst case the selector will throw again and then an error boundary will handle it. - latestSetSnapshot(function () { - throw error; - }); - } - }; - - var unsubscribe = subscribe(source._source, handleChange); - - { - if (typeof unsubscribe !== 'function') { - error('Mutable source subscribe function must return an unsubscribe function.'); - } - } - - return unsubscribe; - }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe. - // - // If either the source or the subscription have changed we can't can't trust the update queue. - // Maybe the source changed in a way that the old subscription ignored but the new one depends on. - // - // If the getSnapshot function changed, we also shouldn't rely on the update queue. - // It's possible that the underlying source was mutated between the when the last "change" event fired, - // and when the current render (with the new getSnapshot function) is processed. - // - // In both cases, we need to throw away pending updates (since they are no longer relevant) - // and treat reading from the source as we do in the mount case. - - if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) { - // Create a new queue and setState method, - // So if there are interleaved updates, they get pushed to the older queue. - // When this becomes current, the previous queue and dispatch method will be discarded, - // including any interleaving updates that occur. - var newQueue = { - pending: null, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: snapshot - }; - newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue); - stateHook.queue = newQueue; - stateHook.baseQueue = null; - snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot); - stateHook.memoizedState = stateHook.baseState = snapshot; - } - - return snapshot; - } - - function mountMutableSource(source, getSnapshot, subscribe) { - var hook = mountWorkInProgressHook(); - hook.memoizedState = { - refs: { - getSnapshot: getSnapshot, - setSnapshot: null - }, - source: source, - subscribe: subscribe - }; - return useMutableSource(hook, source, getSnapshot, subscribe); - } - - function updateMutableSource(source, getSnapshot, subscribe) { - var hook = updateWorkInProgressHook(); - return useMutableSource(hook, source, getSnapshot, subscribe); - } - - function mountState(initialState) { - var hook = mountWorkInProgressHook(); - - if (typeof initialState === 'function') { - // $FlowFixMe: Flow doesn't like mixed types - initialState = initialState(); - } - - hook.memoizedState = hook.baseState = initialState; - var queue = hook.queue = { - pending: null, - dispatch: null, - lastRenderedReducer: basicStateReducer, - lastRenderedState: initialState - }; - var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue); - return [hook.memoizedState, dispatch]; - } - - function updateState(initialState) { - return updateReducer(basicStateReducer); - } - - function rerenderState(initialState) { - return rerenderReducer(basicStateReducer); - } - - function pushEffect(tag, create, destroy, deps) { - var effect = { - tag: tag, - create: create, - destroy: destroy, - deps: deps, - // Circular - next: null - }; - var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue; - - if (componentUpdateQueue === null) { - componentUpdateQueue = createFunctionComponentUpdateQueue(); - currentlyRenderingFiber$1.updateQueue = componentUpdateQueue; - componentUpdateQueue.lastEffect = effect.next = effect; - } else { - var lastEffect = componentUpdateQueue.lastEffect; - - if (lastEffect === null) { - componentUpdateQueue.lastEffect = effect.next = effect; - } else { - var firstEffect = lastEffect.next; - lastEffect.next = effect; - effect.next = firstEffect; - componentUpdateQueue.lastEffect = effect; - } - } - - return effect; - } - - function mountRef(initialValue) { - var hook = mountWorkInProgressHook(); - var ref = { - current: initialValue - }; - - { - Object.seal(ref); - } - - hook.memoizedState = ref; - return ref; - } - - function updateRef(initialValue) { - var hook = updateWorkInProgressHook(); - return hook.memoizedState; - } - - function mountEffectImpl(fiberFlags, hookFlags, create, deps) { - var hook = mountWorkInProgressHook(); - var nextDeps = deps === undefined ? null : deps; - currentlyRenderingFiber$1.flags |= fiberFlags; - hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps); - } - - function updateEffectImpl(fiberFlags, hookFlags, create, deps) { - var hook = updateWorkInProgressHook(); - var nextDeps = deps === undefined ? null : deps; - var destroy = undefined; - - if (currentHook !== null) { - var prevEffect = currentHook.memoizedState; - destroy = prevEffect.destroy; - - if (nextDeps !== null) { - var prevDeps = prevEffect.deps; - - if (areHookInputsEqual(nextDeps, prevDeps)) { - pushEffect(hookFlags, create, destroy, nextDeps); - return; - } - } - } - - currentlyRenderingFiber$1.flags |= fiberFlags; - hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps); - } - - function mountEffect(create, deps) { - { - // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests - if ('undefined' !== typeof jest) { - warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); - } - } - - return mountEffectImpl(Update | Passive, Passive$1, create, deps); - } - - function updateEffect(create, deps) { - { - // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests - if ('undefined' !== typeof jest) { - warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1); - } - } - - return updateEffectImpl(Update | Passive, Passive$1, create, deps); - } - - function mountLayoutEffect(create, deps) { - return mountEffectImpl(Update, Layout, create, deps); - } - - function updateLayoutEffect(create, deps) { - return updateEffectImpl(Update, Layout, create, deps); - } - - function imperativeHandleEffect(create, ref) { - if (typeof ref === 'function') { - var refCallback = ref; - - var _inst = create(); - - refCallback(_inst); - return function () { - refCallback(null); - }; - } else if (ref !== null && ref !== undefined) { - var refObject = ref; - - { - if (!refObject.hasOwnProperty('current')) { - error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}'); - } - } - - var _inst2 = create(); - - refObject.current = _inst2; - return function () { - refObject.current = null; - }; - } - } - - function mountImperativeHandle(ref, create, deps) { - { - if (typeof create !== 'function') { - error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null'); - } - } // TODO: If deps are provided, should we skip comparing the ref itself? - - - var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; - return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps); - } - - function updateImperativeHandle(ref, create, deps) { - { - if (typeof create !== 'function') { - error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null'); - } - } // TODO: If deps are provided, should we skip comparing the ref itself? - - - var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null; - return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps); - } - - function mountDebugValue(value, formatterFn) {// This hook is normally a no-op. - // The react-debug-hooks package injects its own implementation - // so that e.g. DevTools can display custom hook values. - } - - var updateDebugValue = mountDebugValue; - - function mountCallback(callback, deps) { - var hook = mountWorkInProgressHook(); - var nextDeps = deps === undefined ? null : deps; - hook.memoizedState = [callback, nextDeps]; - return callback; - } - - function updateCallback(callback, deps) { - var hook = updateWorkInProgressHook(); - var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; - - if (prevState !== null) { - if (nextDeps !== null) { - var prevDeps = prevState[1]; - - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } - } - } - - hook.memoizedState = [callback, nextDeps]; - return callback; - } - - function mountMemo(nextCreate, deps) { - var hook = mountWorkInProgressHook(); - var nextDeps = deps === undefined ? null : deps; - var nextValue = nextCreate(); - hook.memoizedState = [nextValue, nextDeps]; - return nextValue; - } - - function updateMemo(nextCreate, deps) { - var hook = updateWorkInProgressHook(); - var nextDeps = deps === undefined ? null : deps; - var prevState = hook.memoizedState; - - if (prevState !== null) { - // Assume these are defined. If they're not, areHookInputsEqual will warn. - if (nextDeps !== null) { - var prevDeps = prevState[1]; - - if (areHookInputsEqual(nextDeps, prevDeps)) { - return prevState[0]; - } - } - } - - var nextValue = nextCreate(); - hook.memoizedState = [nextValue, nextDeps]; - return nextValue; - } - - function mountDeferredValue(value) { - var _mountState = mountState(value), - prevValue = _mountState[0], - setValue = _mountState[1]; - - mountEffect(function () { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = 1; - - try { - setValue(value); - } finally { - ReactCurrentBatchConfig$1.transition = prevTransition; - } - }, [value]); - return prevValue; - } - - function updateDeferredValue(value) { - var _updateState = updateState(), - prevValue = _updateState[0], - setValue = _updateState[1]; - - updateEffect(function () { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = 1; - - try { - setValue(value); - } finally { - ReactCurrentBatchConfig$1.transition = prevTransition; - } - }, [value]); - return prevValue; - } - - function rerenderDeferredValue(value) { - var _rerenderState = rerenderState(), - prevValue = _rerenderState[0], - setValue = _rerenderState[1]; - - updateEffect(function () { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = 1; - - try { - setValue(value); - } finally { - ReactCurrentBatchConfig$1.transition = prevTransition; - } - }, [value]); - return prevValue; - } - - function startTransition(setPending, callback) { - var priorityLevel = getCurrentPriorityLevel(); - - { - runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () { - setPending(true); - }); - runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () { - var prevTransition = ReactCurrentBatchConfig$1.transition; - ReactCurrentBatchConfig$1.transition = 1; - - try { - setPending(false); - callback(); - } finally { - ReactCurrentBatchConfig$1.transition = prevTransition; - } - }); - } - } - - function mountTransition() { - var _mountState2 = mountState(false), - isPending = _mountState2[0], - setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending` - // never changes. - - - var start = startTransition.bind(null, setPending); - mountRef(start); - return [start, isPending]; - } - - function updateTransition() { - var _updateState2 = updateState(), - isPending = _updateState2[0]; - - var startRef = updateRef(); - var start = startRef.current; - return [start, isPending]; - } - - function rerenderTransition() { - var _rerenderState2 = rerenderState(), - isPending = _rerenderState2[0]; - - var startRef = updateRef(); - var start = startRef.current; - return [start, isPending]; - } - - var isUpdatingOpaqueValueInRenderPhase = false; - function getIsUpdatingOpaqueValueInRenderPhaseInDEV() { - { - return isUpdatingOpaqueValueInRenderPhase; - } - } - - function warnOnOpaqueIdentifierAccessInDEV(fiber) { - { - // TODO: Should warn in effects and callbacks, too - var name = getComponentName(fiber.type) || 'Unknown'; - - if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) { - error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.'); - - didWarnAboutUseOpaqueIdentifier[name] = true; - } - } - } - - function mountOpaqueIdentifier() { - var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ; - - if (getIsHydrating()) { - var didUpgrade = false; - var fiber = currentlyRenderingFiber$1; - - var readValue = function () { - if (!didUpgrade) { - // Only upgrade once. This works even inside the render phase because - // the update is added to a shared queue, which outlasts the - // in-progress render. - didUpgrade = true; - - { - isUpdatingOpaqueValueInRenderPhase = true; - setId(makeId()); - isUpdatingOpaqueValueInRenderPhase = false; - warnOnOpaqueIdentifierAccessInDEV(fiber); - } - } - - { - { - throw Error( "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly." ); - } - } - }; - - var id = makeOpaqueHydratingObject(readValue); - var setId = mountState(id)[1]; - - if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) { - currentlyRenderingFiber$1.flags |= Update | Passive; - pushEffect(HasEffect | Passive$1, function () { - setId(makeId()); - }, undefined, null); - } - - return id; - } else { - var _id = makeId(); - - mountState(_id); - return _id; - } - } - - function updateOpaqueIdentifier() { - var id = updateState()[0]; - return id; - } - - function rerenderOpaqueIdentifier() { - var id = rerenderState()[0]; - return id; - } - - function dispatchAction(fiber, queue, action) { - { - if (typeof arguments[3] === 'function') { - error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().'); - } - } - - var eventTime = requestEventTime(); - var lane = requestUpdateLane(fiber); - var update = { - lane: lane, - action: action, - eagerReducer: null, - eagerState: null, - next: null - }; // Append the update to the end of the list. - - var pending = queue.pending; - - if (pending === null) { - // This is the first update. Create a circular list. - update.next = update; - } else { - update.next = pending.next; - pending.next = update; - } - - queue.pending = update; - var alternate = fiber.alternate; - - if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) { - // This is a render phase update. Stash it in a lazily-created map of - // queue -> linked list of updates. After this render pass, we'll restart - // and apply the stashed updates on top of the work-in-progress hook. - didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true; - } else { - if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) { - // The queue is currently empty, which means we can eagerly compute the - // next state before entering the render phase. If the new state is the - // same as the current state, we may be able to bail out entirely. - var lastRenderedReducer = queue.lastRenderedReducer; - - if (lastRenderedReducer !== null) { - var prevDispatcher; - - { - prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - } - - try { - var currentState = queue.lastRenderedState; - var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute - // it, on the update object. If the reducer hasn't changed by the - // time we enter the render phase, then the eager state can be used - // without calling the reducer again. - - update.eagerReducer = lastRenderedReducer; - update.eagerState = eagerState; - - if (objectIs(eagerState, currentState)) { - // Fast path. We can bail out without scheduling React to re-render. - // It's still possible that we'll need to rebase this update later, - // if the component re-renders for a different reason and by that - // time the reducer has changed. - return; - } - } catch (error) {// Suppress the error. It will throw again in the render phase. - } finally { - { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - } - } - } - - { - // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests - if ('undefined' !== typeof jest) { - warnIfNotScopedWithMatchingAct(fiber); - warnIfNotCurrentlyActingUpdatesInDev(fiber); - } - } - - scheduleUpdateOnFiber(fiber, lane, eventTime); - } - } - - var ContextOnlyDispatcher = { - readContext: readContext, - useCallback: throwInvalidHookError, - useContext: throwInvalidHookError, - useEffect: throwInvalidHookError, - useImperativeHandle: throwInvalidHookError, - useLayoutEffect: throwInvalidHookError, - useMemo: throwInvalidHookError, - useReducer: throwInvalidHookError, - useRef: throwInvalidHookError, - useState: throwInvalidHookError, - useDebugValue: throwInvalidHookError, - useDeferredValue: throwInvalidHookError, - useTransition: throwInvalidHookError, - useMutableSource: throwInvalidHookError, - useOpaqueIdentifier: throwInvalidHookError, - unstable_isNewReconciler: enableNewReconciler - }; - var HooksDispatcherOnMountInDEV = null; - var HooksDispatcherOnMountWithHookTypesInDEV = null; - var HooksDispatcherOnUpdateInDEV = null; - var HooksDispatcherOnRerenderInDEV = null; - var InvalidNestedHooksDispatcherOnMountInDEV = null; - var InvalidNestedHooksDispatcherOnUpdateInDEV = null; - var InvalidNestedHooksDispatcherOnRerenderInDEV = null; - - { - var warnInvalidContextAccess = function () { - error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().'); - }; - - var warnInvalidHookAccess = function () { - error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks'); - }; - - HooksDispatcherOnMountInDEV = { - readContext: function (context, observedBits) { - return readContext(context, observedBits); - }, - useCallback: function (callback, deps) { - currentHookNameInDev = 'useCallback'; - mountHookTypesDev(); - checkDepsAreArrayDev(deps); - return mountCallback(callback, deps); - }, - useContext: function (context, observedBits) { - currentHookNameInDev = 'useContext'; - mountHookTypesDev(); - return readContext(context, observedBits); - }, - useEffect: function (create, deps) { - currentHookNameInDev = 'useEffect'; - mountHookTypesDev(); - checkDepsAreArrayDev(deps); - return mountEffect(create, deps); - }, - useImperativeHandle: function (ref, create, deps) { - currentHookNameInDev = 'useImperativeHandle'; - mountHookTypesDev(); - checkDepsAreArrayDev(deps); - return mountImperativeHandle(ref, create, deps); - }, - useLayoutEffect: function (create, deps) { - currentHookNameInDev = 'useLayoutEffect'; - mountHookTypesDev(); - checkDepsAreArrayDev(deps); - return mountLayoutEffect(create, deps); - }, - useMemo: function (create, deps) { - currentHookNameInDev = 'useMemo'; - mountHookTypesDev(); - checkDepsAreArrayDev(deps); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountMemo(create, deps); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useReducer: function (reducer, initialArg, init) { - currentHookNameInDev = 'useReducer'; - mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountReducer(reducer, initialArg, init); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useRef: function (initialValue) { - currentHookNameInDev = 'useRef'; - mountHookTypesDev(); - return mountRef(initialValue); - }, - useState: function (initialState) { - currentHookNameInDev = 'useState'; - mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountState(initialState); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useDebugValue: function (value, formatterFn) { - currentHookNameInDev = 'useDebugValue'; - mountHookTypesDev(); - return mountDebugValue(); - }, - useDeferredValue: function (value) { - currentHookNameInDev = 'useDeferredValue'; - mountHookTypesDev(); - return mountDeferredValue(value); - }, - useTransition: function () { - currentHookNameInDev = 'useTransition'; - mountHookTypesDev(); - return mountTransition(); - }, - useMutableSource: function (source, getSnapshot, subscribe) { - currentHookNameInDev = 'useMutableSource'; - mountHookTypesDev(); - return mountMutableSource(source, getSnapshot, subscribe); - }, - useOpaqueIdentifier: function () { - currentHookNameInDev = 'useOpaqueIdentifier'; - mountHookTypesDev(); - return mountOpaqueIdentifier(); - }, - unstable_isNewReconciler: enableNewReconciler - }; - HooksDispatcherOnMountWithHookTypesInDEV = { - readContext: function (context, observedBits) { - return readContext(context, observedBits); - }, - useCallback: function (callback, deps) { - currentHookNameInDev = 'useCallback'; - updateHookTypesDev(); - return mountCallback(callback, deps); - }, - useContext: function (context, observedBits) { - currentHookNameInDev = 'useContext'; - updateHookTypesDev(); - return readContext(context, observedBits); - }, - useEffect: function (create, deps) { - currentHookNameInDev = 'useEffect'; - updateHookTypesDev(); - return mountEffect(create, deps); - }, - useImperativeHandle: function (ref, create, deps) { - currentHookNameInDev = 'useImperativeHandle'; - updateHookTypesDev(); - return mountImperativeHandle(ref, create, deps); - }, - useLayoutEffect: function (create, deps) { - currentHookNameInDev = 'useLayoutEffect'; - updateHookTypesDev(); - return mountLayoutEffect(create, deps); - }, - useMemo: function (create, deps) { - currentHookNameInDev = 'useMemo'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountMemo(create, deps); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useReducer: function (reducer, initialArg, init) { - currentHookNameInDev = 'useReducer'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountReducer(reducer, initialArg, init); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useRef: function (initialValue) { - currentHookNameInDev = 'useRef'; - updateHookTypesDev(); - return mountRef(initialValue); - }, - useState: function (initialState) { - currentHookNameInDev = 'useState'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountState(initialState); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useDebugValue: function (value, formatterFn) { - currentHookNameInDev = 'useDebugValue'; - updateHookTypesDev(); - return mountDebugValue(); - }, - useDeferredValue: function (value) { - currentHookNameInDev = 'useDeferredValue'; - updateHookTypesDev(); - return mountDeferredValue(value); - }, - useTransition: function () { - currentHookNameInDev = 'useTransition'; - updateHookTypesDev(); - return mountTransition(); - }, - useMutableSource: function (source, getSnapshot, subscribe) { - currentHookNameInDev = 'useMutableSource'; - updateHookTypesDev(); - return mountMutableSource(source, getSnapshot, subscribe); - }, - useOpaqueIdentifier: function () { - currentHookNameInDev = 'useOpaqueIdentifier'; - updateHookTypesDev(); - return mountOpaqueIdentifier(); - }, - unstable_isNewReconciler: enableNewReconciler - }; - HooksDispatcherOnUpdateInDEV = { - readContext: function (context, observedBits) { - return readContext(context, observedBits); - }, - useCallback: function (callback, deps) { - currentHookNameInDev = 'useCallback'; - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext: function (context, observedBits) { - currentHookNameInDev = 'useContext'; - updateHookTypesDev(); - return readContext(context, observedBits); - }, - useEffect: function (create, deps) { - currentHookNameInDev = 'useEffect'; - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle: function (ref, create, deps) { - currentHookNameInDev = 'useImperativeHandle'; - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useLayoutEffect: function (create, deps) { - currentHookNameInDev = 'useLayoutEffect'; - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo: function (create, deps) { - currentHookNameInDev = 'useMemo'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return updateMemo(create, deps); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useReducer: function (reducer, initialArg, init) { - currentHookNameInDev = 'useReducer'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return updateReducer(reducer, initialArg, init); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useRef: function (initialValue) { - currentHookNameInDev = 'useRef'; - updateHookTypesDev(); - return updateRef(); - }, - useState: function (initialState) { - currentHookNameInDev = 'useState'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return updateState(initialState); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useDebugValue: function (value, formatterFn) { - currentHookNameInDev = 'useDebugValue'; - updateHookTypesDev(); - return updateDebugValue(); - }, - useDeferredValue: function (value) { - currentHookNameInDev = 'useDeferredValue'; - updateHookTypesDev(); - return updateDeferredValue(value); - }, - useTransition: function () { - currentHookNameInDev = 'useTransition'; - updateHookTypesDev(); - return updateTransition(); - }, - useMutableSource: function (source, getSnapshot, subscribe) { - currentHookNameInDev = 'useMutableSource'; - updateHookTypesDev(); - return updateMutableSource(source, getSnapshot, subscribe); - }, - useOpaqueIdentifier: function () { - currentHookNameInDev = 'useOpaqueIdentifier'; - updateHookTypesDev(); - return updateOpaqueIdentifier(); - }, - unstable_isNewReconciler: enableNewReconciler - }; - HooksDispatcherOnRerenderInDEV = { - readContext: function (context, observedBits) { - return readContext(context, observedBits); - }, - useCallback: function (callback, deps) { - currentHookNameInDev = 'useCallback'; - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext: function (context, observedBits) { - currentHookNameInDev = 'useContext'; - updateHookTypesDev(); - return readContext(context, observedBits); - }, - useEffect: function (create, deps) { - currentHookNameInDev = 'useEffect'; - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle: function (ref, create, deps) { - currentHookNameInDev = 'useImperativeHandle'; - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useLayoutEffect: function (create, deps) { - currentHookNameInDev = 'useLayoutEffect'; - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo: function (create, deps) { - currentHookNameInDev = 'useMemo'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV; - - try { - return updateMemo(create, deps); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useReducer: function (reducer, initialArg, init) { - currentHookNameInDev = 'useReducer'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV; - - try { - return rerenderReducer(reducer, initialArg, init); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useRef: function (initialValue) { - currentHookNameInDev = 'useRef'; - updateHookTypesDev(); - return updateRef(); - }, - useState: function (initialState) { - currentHookNameInDev = 'useState'; - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV; - - try { - return rerenderState(initialState); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useDebugValue: function (value, formatterFn) { - currentHookNameInDev = 'useDebugValue'; - updateHookTypesDev(); - return updateDebugValue(); - }, - useDeferredValue: function (value) { - currentHookNameInDev = 'useDeferredValue'; - updateHookTypesDev(); - return rerenderDeferredValue(value); - }, - useTransition: function () { - currentHookNameInDev = 'useTransition'; - updateHookTypesDev(); - return rerenderTransition(); - }, - useMutableSource: function (source, getSnapshot, subscribe) { - currentHookNameInDev = 'useMutableSource'; - updateHookTypesDev(); - return updateMutableSource(source, getSnapshot, subscribe); - }, - useOpaqueIdentifier: function () { - currentHookNameInDev = 'useOpaqueIdentifier'; - updateHookTypesDev(); - return rerenderOpaqueIdentifier(); - }, - unstable_isNewReconciler: enableNewReconciler - }; - InvalidNestedHooksDispatcherOnMountInDEV = { - readContext: function (context, observedBits) { - warnInvalidContextAccess(); - return readContext(context, observedBits); - }, - useCallback: function (callback, deps) { - currentHookNameInDev = 'useCallback'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountCallback(callback, deps); - }, - useContext: function (context, observedBits) { - currentHookNameInDev = 'useContext'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return readContext(context, observedBits); - }, - useEffect: function (create, deps) { - currentHookNameInDev = 'useEffect'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountEffect(create, deps); - }, - useImperativeHandle: function (ref, create, deps) { - currentHookNameInDev = 'useImperativeHandle'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountImperativeHandle(ref, create, deps); - }, - useLayoutEffect: function (create, deps) { - currentHookNameInDev = 'useLayoutEffect'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountLayoutEffect(create, deps); - }, - useMemo: function (create, deps) { - currentHookNameInDev = 'useMemo'; - warnInvalidHookAccess(); - mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountMemo(create, deps); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useReducer: function (reducer, initialArg, init) { - currentHookNameInDev = 'useReducer'; - warnInvalidHookAccess(); - mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountReducer(reducer, initialArg, init); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useRef: function (initialValue) { - currentHookNameInDev = 'useRef'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountRef(initialValue); - }, - useState: function (initialState) { - currentHookNameInDev = 'useState'; - warnInvalidHookAccess(); - mountHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV; - - try { - return mountState(initialState); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useDebugValue: function (value, formatterFn) { - currentHookNameInDev = 'useDebugValue'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountDebugValue(); - }, - useDeferredValue: function (value) { - currentHookNameInDev = 'useDeferredValue'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountDeferredValue(value); - }, - useTransition: function () { - currentHookNameInDev = 'useTransition'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountTransition(); - }, - useMutableSource: function (source, getSnapshot, subscribe) { - currentHookNameInDev = 'useMutableSource'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountMutableSource(source, getSnapshot, subscribe); - }, - useOpaqueIdentifier: function () { - currentHookNameInDev = 'useOpaqueIdentifier'; - warnInvalidHookAccess(); - mountHookTypesDev(); - return mountOpaqueIdentifier(); - }, - unstable_isNewReconciler: enableNewReconciler - }; - InvalidNestedHooksDispatcherOnUpdateInDEV = { - readContext: function (context, observedBits) { - warnInvalidContextAccess(); - return readContext(context, observedBits); - }, - useCallback: function (callback, deps) { - currentHookNameInDev = 'useCallback'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext: function (context, observedBits) { - currentHookNameInDev = 'useContext'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return readContext(context, observedBits); - }, - useEffect: function (create, deps) { - currentHookNameInDev = 'useEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle: function (ref, create, deps) { - currentHookNameInDev = 'useImperativeHandle'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useLayoutEffect: function (create, deps) { - currentHookNameInDev = 'useLayoutEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo: function (create, deps) { - currentHookNameInDev = 'useMemo'; - warnInvalidHookAccess(); - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return updateMemo(create, deps); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useReducer: function (reducer, initialArg, init) { - currentHookNameInDev = 'useReducer'; - warnInvalidHookAccess(); - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return updateReducer(reducer, initialArg, init); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useRef: function (initialValue) { - currentHookNameInDev = 'useRef'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateRef(); - }, - useState: function (initialState) { - currentHookNameInDev = 'useState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return updateState(initialState); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useDebugValue: function (value, formatterFn) { - currentHookNameInDev = 'useDebugValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateDebugValue(); - }, - useDeferredValue: function (value) { - currentHookNameInDev = 'useDeferredValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateDeferredValue(value); - }, - useTransition: function () { - currentHookNameInDev = 'useTransition'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateTransition(); - }, - useMutableSource: function (source, getSnapshot, subscribe) { - currentHookNameInDev = 'useMutableSource'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateMutableSource(source, getSnapshot, subscribe); - }, - useOpaqueIdentifier: function () { - currentHookNameInDev = 'useOpaqueIdentifier'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateOpaqueIdentifier(); - }, - unstable_isNewReconciler: enableNewReconciler - }; - InvalidNestedHooksDispatcherOnRerenderInDEV = { - readContext: function (context, observedBits) { - warnInvalidContextAccess(); - return readContext(context, observedBits); - }, - useCallback: function (callback, deps) { - currentHookNameInDev = 'useCallback'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateCallback(callback, deps); - }, - useContext: function (context, observedBits) { - currentHookNameInDev = 'useContext'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return readContext(context, observedBits); - }, - useEffect: function (create, deps) { - currentHookNameInDev = 'useEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateEffect(create, deps); - }, - useImperativeHandle: function (ref, create, deps) { - currentHookNameInDev = 'useImperativeHandle'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateImperativeHandle(ref, create, deps); - }, - useLayoutEffect: function (create, deps) { - currentHookNameInDev = 'useLayoutEffect'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateLayoutEffect(create, deps); - }, - useMemo: function (create, deps) { - currentHookNameInDev = 'useMemo'; - warnInvalidHookAccess(); - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return updateMemo(create, deps); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useReducer: function (reducer, initialArg, init) { - currentHookNameInDev = 'useReducer'; - warnInvalidHookAccess(); - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return rerenderReducer(reducer, initialArg, init); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useRef: function (initialValue) { - currentHookNameInDev = 'useRef'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateRef(); - }, - useState: function (initialState) { - currentHookNameInDev = 'useState'; - warnInvalidHookAccess(); - updateHookTypesDev(); - var prevDispatcher = ReactCurrentDispatcher$1.current; - ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV; - - try { - return rerenderState(initialState); - } finally { - ReactCurrentDispatcher$1.current = prevDispatcher; - } - }, - useDebugValue: function (value, formatterFn) { - currentHookNameInDev = 'useDebugValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateDebugValue(); - }, - useDeferredValue: function (value) { - currentHookNameInDev = 'useDeferredValue'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderDeferredValue(value); - }, - useTransition: function () { - currentHookNameInDev = 'useTransition'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderTransition(); - }, - useMutableSource: function (source, getSnapshot, subscribe) { - currentHookNameInDev = 'useMutableSource'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return updateMutableSource(source, getSnapshot, subscribe); - }, - useOpaqueIdentifier: function () { - currentHookNameInDev = 'useOpaqueIdentifier'; - warnInvalidHookAccess(); - updateHookTypesDev(); - return rerenderOpaqueIdentifier(); - }, - unstable_isNewReconciler: enableNewReconciler - }; - } - - var now$1 = unstable_now; - var commitTime = 0; - var profilerStartTime = -1; - - function getCommitTime() { - return commitTime; - } - - function recordCommitTime() { - - commitTime = now$1(); - } - - function startProfilerTimer(fiber) { - - profilerStartTime = now$1(); - - if (fiber.actualStartTime < 0) { - fiber.actualStartTime = now$1(); - } - } - - function stopProfilerTimerIfRunning(fiber) { - - profilerStartTime = -1; - } - - function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) { - - if (profilerStartTime >= 0) { - var elapsedTime = now$1() - profilerStartTime; - fiber.actualDuration += elapsedTime; - - if (overrideBaseTime) { - fiber.selfBaseDuration = elapsedTime; - } - - profilerStartTime = -1; - } - } - - function transferActualDuration(fiber) { - // Transfer time spent rendering these children so we don't lose it - // after we rerender. This is used as a helper in special cases - // where we should count the work of multiple passes. - var child = fiber.child; - - while (child) { - fiber.actualDuration += child.actualDuration; - child = child.sibling; - } - } - - var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; - var didReceiveUpdate = false; - var didWarnAboutBadClass; - var didWarnAboutModulePatternComponent; - var didWarnAboutContextTypeOnFunctionComponent; - var didWarnAboutGetDerivedStateOnFunctionComponent; - var didWarnAboutFunctionRefs; - var didWarnAboutReassigningProps; - var didWarnAboutRevealOrder; - var didWarnAboutTailOptions; - - { - didWarnAboutBadClass = {}; - didWarnAboutModulePatternComponent = {}; - didWarnAboutContextTypeOnFunctionComponent = {}; - didWarnAboutGetDerivedStateOnFunctionComponent = {}; - didWarnAboutFunctionRefs = {}; - didWarnAboutReassigningProps = false; - didWarnAboutRevealOrder = {}; - didWarnAboutTailOptions = {}; - } - - function reconcileChildren(current, workInProgress, nextChildren, renderLanes) { - if (current === null) { - // If this is a fresh new component that hasn't been rendered yet, we - // won't update its child set by applying minimal side-effects. Instead, - // we will add them all to the child before it gets rendered. That means - // we can optimize this reconciliation pass by not tracking side-effects. - workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes); - } else { - // If the current child is the same as the work in progress, it means that - // we haven't yet started any work on these children. Therefore, we use - // the clone algorithm to create a copy of all the current children. - // If we had any progressed work already, that is invalid at this point so - // let's throw it out. - workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes); - } - } - - function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) { - // This function is fork of reconcileChildren. It's used in cases where we - // want to reconcile without matching against the existing set. This has the - // effect of all current children being unmounted; even if the type and key - // are the same, the old child is unmounted and a new child is created. - // - // To do this, we're going to go through the reconcile algorithm twice. In - // the first pass, we schedule a deletion for all the current children by - // passing null. - workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we - // pass null in place of where we usually pass the current child set. This has - // the effect of remounting all children regardless of whether their - // identities match. - - workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes); - } - - function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) { - // TODO: current can be non-null here even if the component - // hasn't yet mounted. This happens after the first render suspends. - // We'll need to figure out if this is fine or can cause issues. - { - if (workInProgress.type !== workInProgress.elementType) { - // Lazy component props can't be validated in createElement - // because they're only guaranteed to be resolved here. - var innerPropTypes = Component.propTypes; - - if (innerPropTypes) { - checkPropTypes(innerPropTypes, nextProps, // Resolved props - 'prop', getComponentName(Component)); - } - } - } - - var render = Component.render; - var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent - - var nextChildren; - prepareToReadContext(workInProgress, renderLanes); - - { - ReactCurrentOwner$1.current = workInProgress; - setIsRendering(true); - nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes); - - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes); - } finally { - reenableLogs(); - } - } - - setIsRendering(false); - } - - if (current !== null && !didReceiveUpdate) { - bailoutHooks(current, workInProgress, renderLanes); - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } // React DevTools reads this flag. - - - workInProgress.flags |= PerformedWork; - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - - function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) { - if (current === null) { - var type = Component.type; - - if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either. - Component.defaultProps === undefined) { - var resolvedType = type; - - { - resolvedType = resolveFunctionForHotReloading(type); - } // If this is a plain function component without default props, - // and with only the default shallow comparison, we upgrade it - // to a SimpleMemoComponent to allow fast path updates. - - - workInProgress.tag = SimpleMemoComponent; - workInProgress.type = resolvedType; - - { - validateFunctionComponentInDev(workInProgress, type); - } - - return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes); - } - - { - var innerPropTypes = type.propTypes; - - if (innerPropTypes) { - // Inner memo component props aren't currently validated in createElement. - // We could move it there, but we'd still need this for lazy code path. - checkPropTypes(innerPropTypes, nextProps, // Resolved props - 'prop', getComponentName(type)); - } - } - - var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes); - child.ref = workInProgress.ref; - child.return = workInProgress; - workInProgress.child = child; - return child; - } - - { - var _type = Component.type; - var _innerPropTypes = _type.propTypes; - - if (_innerPropTypes) { - // Inner memo component props aren't currently validated in createElement. - // We could move it there, but we'd still need this for lazy code path. - checkPropTypes(_innerPropTypes, nextProps, // Resolved props - 'prop', getComponentName(_type)); - } - } - - var currentChild = current.child; // This is always exactly one child - - if (!includesSomeLane(updateLanes, renderLanes)) { - // This will be the props with resolved defaultProps, - // unlike current.memoizedProps which will be the unresolved ones. - var prevProps = currentChild.memoizedProps; // Default to shallow comparison - - var compare = Component.compare; - compare = compare !== null ? compare : shallowEqual; - - if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) { - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } - } // React DevTools reads this flag. - - - workInProgress.flags |= PerformedWork; - var newChild = createWorkInProgress(currentChild, nextProps); - newChild.ref = workInProgress.ref; - newChild.return = workInProgress; - workInProgress.child = newChild; - return newChild; - } - - function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) { - // TODO: current can be non-null here even if the component - // hasn't yet mounted. This happens when the inner render suspends. - // We'll need to figure out if this is fine or can cause issues. - { - if (workInProgress.type !== workInProgress.elementType) { - // Lazy component props can't be validated in createElement - // because they're only guaranteed to be resolved here. - var outerMemoType = workInProgress.elementType; - - if (outerMemoType.$$typeof === REACT_LAZY_TYPE) { - // We warn when you define propTypes on lazy() - // so let's just skip over it to find memo() outer wrapper. - // Inner props for memo are validated later. - var lazyComponent = outerMemoType; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - outerMemoType = init(payload); - } catch (x) { - outerMemoType = null; - } // Inner propTypes will be validated in the function component path. - - - var outerPropTypes = outerMemoType && outerMemoType.propTypes; - - if (outerPropTypes) { - checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps) - 'prop', getComponentName(outerMemoType)); - } - } - } - } - - if (current !== null) { - var prevProps = current.memoizedProps; - - if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload. - workInProgress.type === current.type )) { - didReceiveUpdate = false; - - if (!includesSomeLane(renderLanes, updateLanes)) { - // The pending lanes were cleared at the beginning of beginWork. We're - // about to bail out, but there might be other lanes that weren't - // included in the current render. Usually, the priority level of the - // remaining updates is accumlated during the evaluation of the - // component (i.e. when processing the update queue). But since since - // we're bailing out early *without* evaluating the component, we need - // to account for it here, too. Reset to the value of the current fiber. - // NOTE: This only applies to SimpleMemoComponent, not MemoComponent, - // because a MemoComponent fiber does not have hooks or an update queue; - // rather, it wraps around an inner component, which may or may not - // contains hooks. - // TODO: Move the reset at in beginWork out of the common path so that - // this is no longer necessary. - workInProgress.lanes = current.lanes; - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) { - // This is a special case that only exists for legacy mode. - // See https://github.com/facebook/react/pull/19216. - didReceiveUpdate = true; - } - } - } - - return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes); - } - - function updateOffscreenComponent(current, workInProgress, renderLanes) { - var nextProps = workInProgress.pendingProps; - var nextChildren = nextProps.children; - var prevState = current !== null ? current.memoizedState : null; - - if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') { - if ((workInProgress.mode & ConcurrentMode) === NoMode) { - // In legacy sync mode, don't defer the subtree. Render it now. - // TODO: Figure out what we should do in Blocking mode. - var nextState = { - baseLanes: NoLanes - }; - workInProgress.memoizedState = nextState; - pushRenderLanes(workInProgress, renderLanes); - } else if (!includesSomeLane(renderLanes, OffscreenLane)) { - var nextBaseLanes; - - if (prevState !== null) { - var prevBaseLanes = prevState.baseLanes; - nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes); - } else { - nextBaseLanes = renderLanes; - } // Schedule this fiber to re-render at offscreen priority. Then bailout. - - - { - markSpawnedWork(OffscreenLane); - } - - workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane); - var _nextState = { - baseLanes: nextBaseLanes - }; - workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway - // to avoid a push/pop misalignment. - - pushRenderLanes(workInProgress, nextBaseLanes); - return null; - } else { - // Rendering at offscreen, so we can clear the base lanes. - var _nextState2 = { - baseLanes: NoLanes - }; - workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out. - - var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes; - pushRenderLanes(workInProgress, subtreeRenderLanes); - } - } else { - var _subtreeRenderLanes; - - if (prevState !== null) { - _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state - - workInProgress.memoizedState = null; - } else { - // We weren't previously hidden, and we still aren't, so there's nothing - // special to do. Need to push to the stack regardless, though, to avoid - // a push/pop misalignment. - _subtreeRenderLanes = renderLanes; - } - - pushRenderLanes(workInProgress, _subtreeRenderLanes); - } - - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } // Note: These happen to have identical begin phases, for now. We shouldn't hold - // ourselves to this constraint, though. If the behavior diverges, we should - // fork the function. - - - var updateLegacyHiddenComponent = updateOffscreenComponent; - - function updateFragment(current, workInProgress, renderLanes) { - var nextChildren = workInProgress.pendingProps; - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - - function updateMode(current, workInProgress, renderLanes) { - var nextChildren = workInProgress.pendingProps.children; - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - - function updateProfiler(current, workInProgress, renderLanes) { - { - workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase. - // These are reset during render to allow the DevTools commit hook a chance to read them, - - var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; - } - - var nextProps = workInProgress.pendingProps; - var nextChildren = nextProps.children; - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - - function markRef(current, workInProgress) { - var ref = workInProgress.ref; - - if (current === null && ref !== null || current !== null && current.ref !== ref) { - // Schedule a Ref effect - workInProgress.flags |= Ref; - } - } - - function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) { - { - if (workInProgress.type !== workInProgress.elementType) { - // Lazy component props can't be validated in createElement - // because they're only guaranteed to be resolved here. - var innerPropTypes = Component.propTypes; - - if (innerPropTypes) { - checkPropTypes(innerPropTypes, nextProps, // Resolved props - 'prop', getComponentName(Component)); - } - } - } - - var context; - - { - var unmaskedContext = getUnmaskedContext(workInProgress, Component, true); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - var nextChildren; - prepareToReadContext(workInProgress, renderLanes); - - { - ReactCurrentOwner$1.current = workInProgress; - setIsRendering(true); - nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); - - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes); - } finally { - reenableLogs(); - } - } - - setIsRendering(false); - } - - if (current !== null && !didReceiveUpdate) { - bailoutHooks(current, workInProgress, renderLanes); - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } // React DevTools reads this flag. - - - workInProgress.flags |= PerformedWork; - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - - function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) { - { - if (workInProgress.type !== workInProgress.elementType) { - // Lazy component props can't be validated in createElement - // because they're only guaranteed to be resolved here. - var innerPropTypes = Component.propTypes; - - if (innerPropTypes) { - checkPropTypes(innerPropTypes, nextProps, // Resolved props - 'prop', getComponentName(Component)); - } - } - } // Push context providers early to prevent context stack mismatches. - // During mounting we don't know the child context yet as the instance doesn't exist. - // We will invalidate the child context in finishClassComponent() right after rendering. - - - var hasContext; - - if (isContextProvider(Component)) { - hasContext = true; - pushContextProvider(workInProgress); - } else { - hasContext = false; - } - - prepareToReadContext(workInProgress, renderLanes); - var instance = workInProgress.stateNode; - var shouldUpdate; - - if (instance === null) { - if (current !== null) { - // A class component without an instance only mounts if it suspended - // inside a non-concurrent tree, in an inconsistent state. We want to - // treat it like a new mount, even though an empty version of it already - // committed. Disconnect the alternate pointers. - current.alternate = null; - workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect - - workInProgress.flags |= Placement; - } // In the initial pass we might need to construct the instance. - - - constructClassInstance(workInProgress, Component, nextProps); - mountClassInstance(workInProgress, Component, nextProps, renderLanes); - shouldUpdate = true; - } else if (current === null) { - // In a resume, we'll already have an instance we can reuse. - shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes); - } else { - shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes); - } - - var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes); - - { - var inst = workInProgress.stateNode; - - if (shouldUpdate && inst.props !== nextProps) { - if (!didWarnAboutReassigningProps) { - error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component'); - } - - didWarnAboutReassigningProps = true; - } - } - - return nextUnitOfWork; - } - - function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) { - // Refs should update even if shouldComponentUpdate returns false - markRef(current, workInProgress); - var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags; - - if (!shouldUpdate && !didCaptureError) { - // Context providers should defer to sCU for rendering - if (hasContext) { - invalidateContextProvider(workInProgress, Component, false); - } - - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } - - var instance = workInProgress.stateNode; // Rerender - - ReactCurrentOwner$1.current = workInProgress; - var nextChildren; - - if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') { - // If we captured an error, but getDerivedStateFromError is not defined, - // unmount all the children. componentDidCatch will schedule an update to - // re-render a fallback. This is temporary until we migrate everyone to - // the new API. - // TODO: Warn in a future release. - nextChildren = null; - - { - stopProfilerTimerIfRunning(); - } - } else { - { - setIsRendering(true); - nextChildren = instance.render(); - - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - instance.render(); - } finally { - reenableLogs(); - } - } - - setIsRendering(false); - } - } // React DevTools reads this flag. - - - workInProgress.flags |= PerformedWork; - - if (current !== null && didCaptureError) { - // If we're recovering from an error, reconcile without reusing any of - // the existing children. Conceptually, the normal children and the children - // that are shown on error are two different sets, so we shouldn't reuse - // normal children even if their identities match. - forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes); - } else { - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - } // Memoize state using the values we just used to render. - // TODO: Restructure so we never read values from the instance. - - - workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it. - - if (hasContext) { - invalidateContextProvider(workInProgress, Component, true); - } - - return workInProgress.child; - } - - function pushHostRootContext(workInProgress) { - var root = workInProgress.stateNode; - - if (root.pendingContext) { - pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context); - } else if (root.context) { - // Should always be set - pushTopLevelContextObject(workInProgress, root.context, false); - } - - pushHostContainer(workInProgress, root.containerInfo); - } - - function updateHostRoot(current, workInProgress, renderLanes) { - pushHostRootContext(workInProgress); - var updateQueue = workInProgress.updateQueue; - - if (!(current !== null && updateQueue !== null)) { - { - throw Error( "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - var nextProps = workInProgress.pendingProps; - var prevState = workInProgress.memoizedState; - var prevChildren = prevState !== null ? prevState.element : null; - cloneUpdateQueue(current, workInProgress); - processUpdateQueue(workInProgress, nextProps, null, renderLanes); - var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property - // being called "element". - - var nextChildren = nextState.element; - - if (nextChildren === prevChildren) { - resetHydrationState(); - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } - - var root = workInProgress.stateNode; - - if (root.hydrate && enterHydrationState(workInProgress)) { - // If we don't have any current children this might be the first pass. - // We always try to hydrate. If this isn't a hydration pass there won't - // be any children to hydrate which is effectively the same thing as - // not hydrating. - { - var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData; - - if (mutableSourceEagerHydrationData != null) { - for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) { - var mutableSource = mutableSourceEagerHydrationData[i]; - var version = mutableSourceEagerHydrationData[i + 1]; - setWorkInProgressVersion(mutableSource, version); - } - } - } - - var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes); - workInProgress.child = child; - var node = child; - - while (node) { - // Mark each child as hydrating. This is a fast path to know whether this - // tree is part of a hydrating tree. This is used to determine if a child - // node has fully mounted yet, and for scheduling event replaying. - // Conceptually this is similar to Placement in that a new subtree is - // inserted into the React tree here. It just happens to not need DOM - // mutations because it already exists. - node.flags = node.flags & ~Placement | Hydrating; - node = node.sibling; - } - } else { - // Otherwise reset hydration state in case we aborted and resumed another - // root. - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - resetHydrationState(); - } - - return workInProgress.child; - } - - function updateHostComponent(current, workInProgress, renderLanes) { - pushHostContext(workInProgress); - - if (current === null) { - tryToClaimNextHydratableInstance(workInProgress); - } - - var type = workInProgress.type; - var nextProps = workInProgress.pendingProps; - var prevProps = current !== null ? current.memoizedProps : null; - var nextChildren = nextProps.children; - var isDirectTextChild = shouldSetTextContent(type, nextProps); - - if (isDirectTextChild) { - // We special case a direct text child of a host node. This is a common - // case. We won't handle it as a reified child. We will instead handle - // this in the host environment that also has access to this prop. That - // avoids allocating another HostText fiber and traversing it. - nextChildren = null; - } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) { - // If we're switching from a direct text child to a normal child, or to - // empty, we need to schedule the text content to be reset. - workInProgress.flags |= ContentReset; - } - - markRef(current, workInProgress); - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - return workInProgress.child; - } - - function updateHostText(current, workInProgress) { - if (current === null) { - tryToClaimNextHydratableInstance(workInProgress); - } // Nothing to do here. This is terminal. We'll do the completion step - // immediately after. - - - return null; - } - - function mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) { - if (_current !== null) { - // A lazy component only mounts if it suspended inside a non- - // concurrent tree, in an inconsistent state. We want to treat it like - // a new mount, even though an empty version of it already committed. - // Disconnect the alternate pointers. - _current.alternate = null; - workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect - - workInProgress.flags |= Placement; - } - - var props = workInProgress.pendingProps; - var lazyComponent = elementType; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - var Component = init(payload); // Store the unwrapped component in the type. - - workInProgress.type = Component; - var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component); - var resolvedProps = resolveDefaultProps(Component, props); - var child; - - switch (resolvedTag) { - case FunctionComponent: - { - { - validateFunctionComponentInDev(workInProgress, Component); - workInProgress.type = Component = resolveFunctionForHotReloading(Component); - } - - child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes); - return child; - } - - case ClassComponent: - { - { - workInProgress.type = Component = resolveClassForHotReloading(Component); - } - - child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes); - return child; - } - - case ForwardRef: - { - { - workInProgress.type = Component = resolveForwardRefForHotReloading(Component); - } - - child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes); - return child; - } - - case MemoComponent: - { - { - if (workInProgress.type !== workInProgress.elementType) { - var outerPropTypes = Component.propTypes; - - if (outerPropTypes) { - checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only - 'prop', getComponentName(Component)); - } - } - } - - child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too - updateLanes, renderLanes); - return child; - } - } - - var hint = ''; - - { - if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) { - hint = ' Did you wrap a component in React.lazy() more than once?'; - } - } // This message intentionally doesn't mention ForwardRef or MemoComponent - // because the fact that it's a separate type of work is an - // implementation detail. - - - { - { - throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint ); - } - } - } - - function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) { - if (_current !== null) { - // An incomplete component only mounts if it suspended inside a non- - // concurrent tree, in an inconsistent state. We want to treat it like - // a new mount, even though an empty version of it already committed. - // Disconnect the alternate pointers. - _current.alternate = null; - workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect - - workInProgress.flags |= Placement; - } // Promote the fiber to a class and try rendering again. - - - workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent` - // Push context providers early to prevent context stack mismatches. - // During mounting we don't know the child context yet as the instance doesn't exist. - // We will invalidate the child context in finishClassComponent() right after rendering. - - var hasContext; - - if (isContextProvider(Component)) { - hasContext = true; - pushContextProvider(workInProgress); - } else { - hasContext = false; - } - - prepareToReadContext(workInProgress, renderLanes); - constructClassInstance(workInProgress, Component, nextProps); - mountClassInstance(workInProgress, Component, nextProps, renderLanes); - return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes); - } - - function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) { - if (_current !== null) { - // An indeterminate component only mounts if it suspended inside a non- - // concurrent tree, in an inconsistent state. We want to treat it like - // a new mount, even though an empty version of it already committed. - // Disconnect the alternate pointers. - _current.alternate = null; - workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect - - workInProgress.flags |= Placement; - } - - var props = workInProgress.pendingProps; - var context; - - { - var unmaskedContext = getUnmaskedContext(workInProgress, Component, false); - context = getMaskedContext(workInProgress, unmaskedContext); - } - - prepareToReadContext(workInProgress, renderLanes); - var value; - - { - if (Component.prototype && typeof Component.prototype.render === 'function') { - var componentName = getComponentName(Component) || 'Unknown'; - - if (!didWarnAboutBadClass[componentName]) { - error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName); - - didWarnAboutBadClass[componentName] = true; - } - } - - if (workInProgress.mode & StrictMode) { - ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null); - } - - setIsRendering(true); - ReactCurrentOwner$1.current = workInProgress; - value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes); - setIsRendering(false); - } // React DevTools reads this flag. - - - workInProgress.flags |= PerformedWork; - - { - // Support for module components is deprecated and is removed behind a flag. - // Whether or not it would crash later, we want to show a good message in DEV first. - if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { - var _componentName = getComponentName(Component) || 'Unknown'; - - if (!didWarnAboutModulePatternComponent[_componentName]) { - error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName); - - didWarnAboutModulePatternComponent[_componentName] = true; - } - } - } - - if ( // Run these checks in production only if the flag is off. - // Eventually we'll delete this branch altogether. - typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) { - { - var _componentName2 = getComponentName(Component) || 'Unknown'; - - if (!didWarnAboutModulePatternComponent[_componentName2]) { - error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2); - - didWarnAboutModulePatternComponent[_componentName2] = true; - } - } // Proceed under the assumption that this is a class instance - - - workInProgress.tag = ClassComponent; // Throw out any hooks that were used. - - workInProgress.memoizedState = null; - workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches. - // During mounting we don't know the child context yet as the instance doesn't exist. - // We will invalidate the child context in finishClassComponent() right after rendering. - - var hasContext = false; - - if (isContextProvider(Component)) { - hasContext = true; - pushContextProvider(workInProgress); - } else { - hasContext = false; - } - - workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null; - initializeUpdateQueue(workInProgress); - var getDerivedStateFromProps = Component.getDerivedStateFromProps; - - if (typeof getDerivedStateFromProps === 'function') { - applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props); - } - - adoptClassInstance(workInProgress, value); - mountClassInstance(workInProgress, Component, props, renderLanes); - return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes); - } else { - // Proceed under the assumption that this is a function component - workInProgress.tag = FunctionComponent; - - { - - if ( workInProgress.mode & StrictMode) { - disableLogs(); - - try { - value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes); - } finally { - reenableLogs(); - } - } - } - - reconcileChildren(null, workInProgress, value, renderLanes); - - { - validateFunctionComponentInDev(workInProgress, Component); - } - - return workInProgress.child; - } - } - - function validateFunctionComponentInDev(workInProgress, Component) { - { - if (Component) { - if (Component.childContextTypes) { - error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component'); - } - } - - if (workInProgress.ref !== null) { - var info = ''; - var ownerName = getCurrentFiberOwnerNameInDevOrNull(); - - if (ownerName) { - info += '\n\nCheck the render method of `' + ownerName + '`.'; - } - - var warningKey = ownerName || workInProgress._debugID || ''; - var debugSource = workInProgress._debugSource; - - if (debugSource) { - warningKey = debugSource.fileName + ':' + debugSource.lineNumber; - } - - if (!didWarnAboutFunctionRefs[warningKey]) { - didWarnAboutFunctionRefs[warningKey] = true; - - error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info); - } - } - - if (typeof Component.getDerivedStateFromProps === 'function') { - var _componentName3 = getComponentName(Component) || 'Unknown'; - - if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) { - error('%s: Function components do not support getDerivedStateFromProps.', _componentName3); - - didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true; - } - } - - if (typeof Component.contextType === 'object' && Component.contextType !== null) { - var _componentName4 = getComponentName(Component) || 'Unknown'; - - if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { - error('%s: Function components do not support contextType.', _componentName4); - - didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; - } - } - } - } - - var SUSPENDED_MARKER = { - dehydrated: null, - retryLane: NoLane - }; - - function mountSuspenseOffscreenState(renderLanes) { - return { - baseLanes: renderLanes - }; - } - - function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) { - return { - baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes) - }; - } // TODO: Probably should inline this back - - - function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) { - // If we're already showing a fallback, there are cases where we need to - // remain on that fallback regardless of whether the content has resolved. - // For example, SuspenseList coordinates when nested content appears. - if (current !== null) { - var suspenseState = current.memoizedState; - - if (suspenseState === null) { - // Currently showing content. Don't hide it, even if ForceSuspenseFallack - // is true. More precise name might be "ForceRemainSuspenseFallback". - // Note: This is a factoring smell. Can't remain on a fallback if there's - // no fallback to remain on. - return false; - } - } // Not currently showing content. Consult the Suspense context. - - - return hasSuspenseContext(suspenseContext, ForceSuspenseFallback); - } - - function getRemainingWorkInPrimaryTree(current, renderLanes) { - // TODO: Should not remove render lanes that were pinged during this render - return removeLanes(current.childLanes, renderLanes); - } - - function updateSuspenseComponent(current, workInProgress, renderLanes) { - var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend. - - { - if (shouldSuspend(workInProgress)) { - workInProgress.flags |= DidCapture; - } - } - - var suspenseContext = suspenseStackCursor.current; - var showFallback = false; - var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags; - - if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) { - // Something in this boundary's subtree already suspended. Switch to - // rendering the fallback children. - showFallback = true; - workInProgress.flags &= ~DidCapture; - } else { - // Attempting the main content - if (current === null || current.memoizedState !== null) { - // This is a new mount or this boundary is already showing a fallback state. - // Mark this subtree context as having at least one invisible parent that could - // handle the fallback state. - // Boundaries without fallbacks or should be avoided are not considered since - // they cannot handle preferred fallback states. - if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) { - suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext); - } - } - } - - suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); - pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense - // boundary's children. This involves some custom reconcilation logic. Two - // main reasons this is so complicated. - // - // First, Legacy Mode has different semantics for backwards compatibility. The - // primary tree will commit in an inconsistent state, so when we do the - // second pass to render the fallback, we do some exceedingly, uh, clever - // hacks to make that not totally break. Like transferring effects and - // deletions from hidden tree. In Concurrent Mode, it's much simpler, - // because we bailout on the primary tree completely and leave it in its old - // state, no effects. Same as what we do for Offscreen (except that - // Offscreen doesn't have the first render pass). - // - // Second is hydration. During hydration, the Suspense fiber has a slightly - // different layout, where the child points to a dehydrated fragment, which - // contains the DOM rendered by the server. - // - // Third, even if you set all that aside, Suspense is like error boundaries in - // that we first we try to render one tree, and if that fails, we render again - // and switch to a different tree. Like a try/catch block. So we have to track - // which branch we're currently rendering. Ideally we would model this using - // a stack. - - if (current === null) { - // Initial mount - // If we're currently hydrating, try to hydrate this boundary. - // But only if this has a fallback. - if (nextProps.fallback !== undefined) { - tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component. - } - - var nextPrimaryChildren = nextProps.children; - var nextFallbackChildren = nextProps.fallback; - - if (showFallback) { - var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes); - var primaryChildFragment = workInProgress.child; - primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes); - workInProgress.memoizedState = SUSPENDED_MARKER; - return fallbackFragment; - } else if (typeof nextProps.unstable_expectedLoadTime === 'number') { - // This is a CPU-bound tree. Skip this tree and show a placeholder to - // unblock the surrounding content. Then immediately retry after the - // initial commit. - var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes); - - var _primaryChildFragment = workInProgress.child; - _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes); - workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to - // get it started back up to attempt the next item. While in terms of - // priority this work has the same priority as this current render, it's - // not part of the same transition once the transition has committed. If - // it's sync, we still want to yield so that it can be painted. - // Conceptually, this is really the same as pinging. We can use any - // RetryLane even if it's the one currently rendering since we're leaving - // it behind on this node. - - workInProgress.lanes = SomeRetryLane; - - { - markSpawnedWork(SomeRetryLane); - } - - return _fallbackFragment; - } else { - return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes); - } - } else { - // This is an update. - // If the current fiber has a SuspenseState, that means it's already showing - // a fallback. - var prevState = current.memoizedState; - - if (prevState !== null) { - - if (showFallback) { - var _nextFallbackChildren2 = nextProps.fallback; - var _nextPrimaryChildren2 = nextProps.children; - - var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes); - - var _primaryChildFragment3 = workInProgress.child; - var prevOffscreenState = current.child.memoizedState; - _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes); - _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); - workInProgress.memoizedState = SUSPENDED_MARKER; - return _fallbackChildFragment; - } else { - var _nextPrimaryChildren3 = nextProps.children; - - var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes); - - workInProgress.memoizedState = null; - return _primaryChildFragment4; - } - } else { - // The current tree is not already showing a fallback. - if (showFallback) { - // Timed out. - var _nextFallbackChildren3 = nextProps.fallback; - var _nextPrimaryChildren4 = nextProps.children; - - var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes); - - var _primaryChildFragment5 = workInProgress.child; - var _prevOffscreenState = current.child.memoizedState; - _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes); - _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the - // fallback children. - - workInProgress.memoizedState = SUSPENDED_MARKER; - return _fallbackChildFragment2; - } else { - // Still haven't timed out. Continue rendering the children, like we - // normally do. - var _nextPrimaryChildren5 = nextProps.children; - - var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes); - - workInProgress.memoizedState = null; - return _primaryChildFragment6; - } - } - } - } - - function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) { - var mode = workInProgress.mode; - var primaryChildProps = { - mode: 'visible', - children: primaryChildren - }; - var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null); - primaryChildFragment.return = workInProgress; - workInProgress.child = primaryChildFragment; - return primaryChildFragment; - } - - function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) { - var mode = workInProgress.mode; - var progressedPrimaryFragment = workInProgress.child; - var primaryChildProps = { - mode: 'hidden', - children: primaryChildren - }; - var primaryChildFragment; - var fallbackChildFragment; - - if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) { - // In legacy mode, we commit the primary tree as if it successfully - // completed, even though it's in an inconsistent state. - primaryChildFragment = progressedPrimaryFragment; - primaryChildFragment.childLanes = NoLanes; - primaryChildFragment.pendingProps = primaryChildProps; - - if ( workInProgress.mode & ProfileMode) { - // Reset the durations from the first pass so they aren't included in the - // final amounts. This seems counterintuitive, since we're intentionally - // not measuring part of the render phase, but this makes it match what we - // do in Concurrent Mode. - primaryChildFragment.actualDuration = 0; - primaryChildFragment.actualStartTime = -1; - primaryChildFragment.selfBaseDuration = 0; - primaryChildFragment.treeBaseDuration = 0; - } - - fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); - } else { - primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null); - fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); - } - - primaryChildFragment.return = workInProgress; - fallbackChildFragment.return = workInProgress; - primaryChildFragment.sibling = fallbackChildFragment; - workInProgress.child = primaryChildFragment; - return fallbackChildFragment; - } - - function createWorkInProgressOffscreenFiber(current, offscreenProps) { - // The props argument to `createWorkInProgress` is `any` typed, so we use this - // wrapper function to constrain it. - return createWorkInProgress(current, offscreenProps); - } - - function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) { - var currentPrimaryChildFragment = current.child; - var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; - var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, { - mode: 'visible', - children: primaryChildren - }); - - if ((workInProgress.mode & BlockingMode) === NoMode) { - primaryChildFragment.lanes = renderLanes; - } - - primaryChildFragment.return = workInProgress; - primaryChildFragment.sibling = null; - - if (currentFallbackChildFragment !== null) { - // Delete the fallback child fragment - currentFallbackChildFragment.nextEffect = null; - currentFallbackChildFragment.flags = Deletion; - workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment; - } - - workInProgress.child = primaryChildFragment; - return primaryChildFragment; - } - - function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) { - var mode = workInProgress.mode; - var currentPrimaryChildFragment = current.child; - var currentFallbackChildFragment = currentPrimaryChildFragment.sibling; - var primaryChildProps = { - mode: 'hidden', - children: primaryChildren - }; - var primaryChildFragment; - - if ( // In legacy mode, we commit the primary tree as if it successfully - // completed, even though it's in an inconsistent state. - (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was - // already cloned. In legacy mode, the only case where this isn't true is - // when DevTools forces us to display a fallback; we skip the first render - // pass entirely and go straight to rendering the fallback. (In Concurrent - // Mode, SuspenseList can also trigger this scenario, but this is a legacy- - // only codepath.) - workInProgress.child !== currentPrimaryChildFragment) { - var progressedPrimaryFragment = workInProgress.child; - primaryChildFragment = progressedPrimaryFragment; - primaryChildFragment.childLanes = NoLanes; - primaryChildFragment.pendingProps = primaryChildProps; - - if ( workInProgress.mode & ProfileMode) { - // Reset the durations from the first pass so they aren't included in the - // final amounts. This seems counterintuitive, since we're intentionally - // not measuring part of the render phase, but this makes it match what we - // do in Concurrent Mode. - primaryChildFragment.actualDuration = 0; - primaryChildFragment.actualStartTime = -1; - primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration; - primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration; - } // The fallback fiber was added as a deletion effect during the first pass. - // However, since we're going to remain on the fallback, we no longer want - // to delete it. So we need to remove it from the list. Deletions are stored - // on the same list as effects. We want to keep the effects from the primary - // tree. So we copy the primary child fragment's effect list, which does not - // include the fallback deletion effect. - - - var progressedLastEffect = primaryChildFragment.lastEffect; - - if (progressedLastEffect !== null) { - workInProgress.firstEffect = primaryChildFragment.firstEffect; - workInProgress.lastEffect = progressedLastEffect; - progressedLastEffect.nextEffect = null; - } else { - // TODO: Reset this somewhere else? Lol legacy mode is so weird. - workInProgress.firstEffect = workInProgress.lastEffect = null; - } - } else { - primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps); - } - - var fallbackChildFragment; - - if (currentFallbackChildFragment !== null) { - fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren); - } else { - fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already - // mounted but this is a new fiber. - - fallbackChildFragment.flags |= Placement; - } - - fallbackChildFragment.return = workInProgress; - primaryChildFragment.return = workInProgress; - primaryChildFragment.sibling = fallbackChildFragment; - workInProgress.child = primaryChildFragment; - return fallbackChildFragment; - } - - function scheduleWorkOnFiber(fiber, renderLanes) { - fiber.lanes = mergeLanes(fiber.lanes, renderLanes); - var alternate = fiber.alternate; - - if (alternate !== null) { - alternate.lanes = mergeLanes(alternate.lanes, renderLanes); - } - - scheduleWorkOnParentPath(fiber.return, renderLanes); - } - - function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) { - // Mark any Suspense boundaries with fallbacks as having work to do. - // If they were previously forced into fallbacks, they may now be able - // to unblock. - var node = firstChild; - - while (node !== null) { - if (node.tag === SuspenseComponent) { - var state = node.memoizedState; - - if (state !== null) { - scheduleWorkOnFiber(node, renderLanes); - } - } else if (node.tag === SuspenseListComponent) { - // If the tail is hidden there might not be an Suspense boundaries - // to schedule work on. In this case we have to schedule it on the - // list itself. - // We don't have to traverse to the children of the list since - // the list will propagate the change when it rerenders. - scheduleWorkOnFiber(node, renderLanes); - } else if (node.child !== null) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === workInProgress) { - return; - } - - while (node.sibling === null) { - if (node.return === null || node.return === workInProgress) { - return; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } - } - - function findLastContentRow(firstChild) { - // This is going to find the last row among these children that is already - // showing content on the screen, as opposed to being in fallback state or - // new. If a row has multiple Suspense boundaries, any of them being in the - // fallback state, counts as the whole row being in a fallback state. - // Note that the "rows" will be workInProgress, but any nested children - // will still be current since we haven't rendered them yet. The mounted - // order may not be the same as the new order. We use the new order. - var row = firstChild; - var lastContentRow = null; - - while (row !== null) { - var currentRow = row.alternate; // New rows can't be content rows. - - if (currentRow !== null && findFirstSuspended(currentRow) === null) { - lastContentRow = row; - } - - row = row.sibling; - } - - return lastContentRow; - } - - function validateRevealOrder(revealOrder) { - { - if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) { - didWarnAboutRevealOrder[revealOrder] = true; - - if (typeof revealOrder === 'string') { - switch (revealOrder.toLowerCase()) { - case 'together': - case 'forwards': - case 'backwards': - { - error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase()); - - break; - } - - case 'forward': - case 'backward': - { - error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase()); - - break; - } - - default: - error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder); - - break; - } - } else { - error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder); - } - } - } - } - - function validateTailOptions(tailMode, revealOrder) { - { - if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) { - if (tailMode !== 'collapsed' && tailMode !== 'hidden') { - didWarnAboutTailOptions[tailMode] = true; - - error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode); - } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') { - didWarnAboutTailOptions[tailMode] = true; - - error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode); - } - } - } - } - - function validateSuspenseListNestedChild(childSlot, index) { - { - var isArray = Array.isArray(childSlot); - var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function'; - - if (isArray || isIterable) { - var type = isArray ? 'array' : 'iterable'; - - error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type); - - return false; - } - } - - return true; - } - - function validateSuspenseListChildren(children, revealOrder) { - { - if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) { - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - if (!validateSuspenseListNestedChild(children[i], i)) { - return; - } - } - } else { - var iteratorFn = getIteratorFn(children); - - if (typeof iteratorFn === 'function') { - var childrenIterator = iteratorFn.call(children); - - if (childrenIterator) { - var step = childrenIterator.next(); - var _i = 0; - - for (; !step.done; step = childrenIterator.next()) { - if (!validateSuspenseListNestedChild(step.value, _i)) { - return; - } - - _i++; - } - } - } else { - error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder); - } - } - } - } - } - - function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) { - var renderState = workInProgress.memoizedState; - - if (renderState === null) { - workInProgress.memoizedState = { - isBackwards: isBackwards, - rendering: null, - renderingStartTime: 0, - last: lastContentRow, - tail: tail, - tailMode: tailMode, - lastEffect: lastEffectBeforeRendering - }; - } else { - // We can reuse the existing object from previous renders. - renderState.isBackwards = isBackwards; - renderState.rendering = null; - renderState.renderingStartTime = 0; - renderState.last = lastContentRow; - renderState.tail = tail; - renderState.tailMode = tailMode; - renderState.lastEffect = lastEffectBeforeRendering; - } - } // This can end up rendering this component multiple passes. - // The first pass splits the children fibers into two sets. A head and tail. - // We first render the head. If anything is in fallback state, we do another - // pass through beginWork to rerender all children (including the tail) with - // the force suspend context. If the first render didn't have anything in - // in fallback state. Then we render each row in the tail one-by-one. - // That happens in the completeWork phase without going back to beginWork. - - - function updateSuspenseListComponent(current, workInProgress, renderLanes) { - var nextProps = workInProgress.pendingProps; - var revealOrder = nextProps.revealOrder; - var tailMode = nextProps.tail; - var newChildren = nextProps.children; - validateRevealOrder(revealOrder); - validateTailOptions(tailMode, revealOrder); - validateSuspenseListChildren(newChildren, revealOrder); - reconcileChildren(current, workInProgress, newChildren, renderLanes); - var suspenseContext = suspenseStackCursor.current; - var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback); - - if (shouldForceFallback) { - suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); - workInProgress.flags |= DidCapture; - } else { - var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags; - - if (didSuspendBefore) { - // If we previously forced a fallback, we need to schedule work - // on any nested boundaries to let them know to try to render - // again. This is the same as context updating. - propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes); - } - - suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); - } - - pushSuspenseContext(workInProgress, suspenseContext); - - if ((workInProgress.mode & BlockingMode) === NoMode) { - // In legacy mode, SuspenseList doesn't work so we just - // use make it a noop by treating it as the default revealOrder. - workInProgress.memoizedState = null; - } else { - switch (revealOrder) { - case 'forwards': - { - var lastContentRow = findLastContentRow(workInProgress.child); - var tail; - - if (lastContentRow === null) { - // The whole list is part of the tail. - // TODO: We could fast path by just rendering the tail now. - tail = workInProgress.child; - workInProgress.child = null; - } else { - // Disconnect the tail rows after the content row. - // We're going to render them separately later. - tail = lastContentRow.sibling; - lastContentRow.sibling = null; - } - - initSuspenseListRenderState(workInProgress, false, // isBackwards - tail, lastContentRow, tailMode, workInProgress.lastEffect); - break; - } - - case 'backwards': - { - // We're going to find the first row that has existing content. - // At the same time we're going to reverse the list of everything - // we pass in the meantime. That's going to be our tail in reverse - // order. - var _tail = null; - var row = workInProgress.child; - workInProgress.child = null; - - while (row !== null) { - var currentRow = row.alternate; // New rows can't be content rows. - - if (currentRow !== null && findFirstSuspended(currentRow) === null) { - // This is the beginning of the main content. - workInProgress.child = row; - break; - } - - var nextRow = row.sibling; - row.sibling = _tail; - _tail = row; - row = nextRow; - } // TODO: If workInProgress.child is null, we can continue on the tail immediately. - - - initSuspenseListRenderState(workInProgress, true, // isBackwards - _tail, null, // last - tailMode, workInProgress.lastEffect); - break; - } - - case 'together': - { - initSuspenseListRenderState(workInProgress, false, // isBackwards - null, // tail - null, // last - undefined, workInProgress.lastEffect); - break; - } - - default: - { - // The default reveal order is the same as not having - // a boundary. - workInProgress.memoizedState = null; - } - } - } - - return workInProgress.child; - } - - function updatePortalComponent(current, workInProgress, renderLanes) { - pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); - var nextChildren = workInProgress.pendingProps; - - if (current === null) { - // Portals are special because we don't append the children during mount - // but at commit. Therefore we need to track insertions which the normal - // flow doesn't do during mount. This doesn't happen at the root because - // the root always starts with a "current" with a null child. - // TODO: Consider unifying this with how the root works. - workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes); - } else { - reconcileChildren(current, workInProgress, nextChildren, renderLanes); - } - - return workInProgress.child; - } - - var hasWarnedAboutUsingNoValuePropOnContextProvider = false; - - function updateContextProvider(current, workInProgress, renderLanes) { - var providerType = workInProgress.type; - var context = providerType._context; - var newProps = workInProgress.pendingProps; - var oldProps = workInProgress.memoizedProps; - var newValue = newProps.value; - - { - if (!('value' in newProps)) { - if (!hasWarnedAboutUsingNoValuePropOnContextProvider) { - hasWarnedAboutUsingNoValuePropOnContextProvider = true; - - error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?'); - } - } - - var providerPropTypes = workInProgress.type.propTypes; - - if (providerPropTypes) { - checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider'); - } - } - - pushProvider(workInProgress, newValue); - - if (oldProps !== null) { - var oldValue = oldProps.value; - var changedBits = calculateChangedBits(context, newValue, oldValue); - - if (changedBits === 0) { - // No change. Bailout early if children are the same. - if (oldProps.children === newProps.children && !hasContextChanged()) { - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } - } else { - // The context value changed. Search for matching consumers and schedule - // them to update. - propagateContextChange(workInProgress, context, changedBits, renderLanes); - } - } - - var newChildren = newProps.children; - reconcileChildren(current, workInProgress, newChildren, renderLanes); - return workInProgress.child; - } - - var hasWarnedAboutUsingContextAsConsumer = false; - - function updateContextConsumer(current, workInProgress, renderLanes) { - var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In - // DEV mode, we create a separate object for Context.Consumer that acts - // like a proxy to Context. This proxy object adds unnecessary code in PROD - // so we use the old behaviour (Context.Consumer references Context) to - // reduce size and overhead. The separate object references context via - // a property called "_context", which also gives us the ability to check - // in DEV mode if this property exists or not and warn if it does not. - - { - if (context._context === undefined) { - // This may be because it's a Context (rather than a Consumer). - // Or it may be because it's older React where they're the same thing. - // We only want to warn if we're sure it's a new React. - if (context !== context.Consumer) { - if (!hasWarnedAboutUsingContextAsConsumer) { - hasWarnedAboutUsingContextAsConsumer = true; - - error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?'); - } - } - } else { - context = context._context; - } - } - - var newProps = workInProgress.pendingProps; - var render = newProps.children; - - { - if (typeof render !== 'function') { - error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.'); - } - } - - prepareToReadContext(workInProgress, renderLanes); - var newValue = readContext(context, newProps.unstable_observedBits); - var newChildren; - - { - ReactCurrentOwner$1.current = workInProgress; - setIsRendering(true); - newChildren = render(newValue); - setIsRendering(false); - } // React DevTools reads this flag. - - - workInProgress.flags |= PerformedWork; - reconcileChildren(current, workInProgress, newChildren, renderLanes); - return workInProgress.child; - } - - function markWorkInProgressReceivedUpdate() { - didReceiveUpdate = true; - } - - function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) { - if (current !== null) { - // Reuse previous dependencies - workInProgress.dependencies = current.dependencies; - } - - { - // Don't update "base" render times for bailouts. - stopProfilerTimerIfRunning(); - } - - markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work. - - if (!includesSomeLane(renderLanes, workInProgress.childLanes)) { - // The children don't have any work either. We can skip them. - // TODO: Once we add back resuming, we should check if the children are - // a work-in-progress set. If so, we need to transfer their effects. - return null; - } else { - // This fiber doesn't have work, but its subtree does. Clone the child - // fibers and continue. - cloneChildFibers(current, workInProgress); - return workInProgress.child; - } - } - - function remountFiber(current, oldWorkInProgress, newWorkInProgress) { - { - var returnFiber = oldWorkInProgress.return; - - if (returnFiber === null) { - throw new Error('Cannot swap the root fiber.'); - } // Disconnect from the old current. - // It will get deleted. - - - current.alternate = null; - oldWorkInProgress.alternate = null; // Connect to the new tree. - - newWorkInProgress.index = oldWorkInProgress.index; - newWorkInProgress.sibling = oldWorkInProgress.sibling; - newWorkInProgress.return = oldWorkInProgress.return; - newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it. - - if (oldWorkInProgress === returnFiber.child) { - returnFiber.child = newWorkInProgress; - } else { - var prevSibling = returnFiber.child; - - if (prevSibling === null) { - throw new Error('Expected parent to have a child.'); - } - - while (prevSibling.sibling !== oldWorkInProgress) { - prevSibling = prevSibling.sibling; - - if (prevSibling === null) { - throw new Error('Expected to find the previous sibling.'); - } - } - - prevSibling.sibling = newWorkInProgress; - } // Delete the old fiber and place the new one. - // Since the old fiber is disconnected, we have to schedule it manually. - - - var last = returnFiber.lastEffect; - - if (last !== null) { - last.nextEffect = current; - returnFiber.lastEffect = current; - } else { - returnFiber.firstEffect = returnFiber.lastEffect = current; - } - - current.nextEffect = null; - current.flags = Deletion; - newWorkInProgress.flags |= Placement; // Restart work from the new fiber. - - return newWorkInProgress; - } - } - - function beginWork(current, workInProgress, renderLanes) { - var updateLanes = workInProgress.lanes; - - { - if (workInProgress._debugNeedsRemount && current !== null) { - // This will restart the begin phase with a new fiber. - return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes)); - } - } - - if (current !== null) { - var oldProps = current.memoizedProps; - var newProps = workInProgress.pendingProps; - - if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload: - workInProgress.type !== current.type )) { - // If props or context changed, mark the fiber as having performed work. - // This may be unset if the props are determined to be equal later (memo). - didReceiveUpdate = true; - } else if (!includesSomeLane(renderLanes, updateLanes)) { - didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering - // the begin phase. There's still some bookkeeping we that needs to be done - // in this optimized path, mostly pushing stuff onto the stack. - - switch (workInProgress.tag) { - case HostRoot: - pushHostRootContext(workInProgress); - resetHydrationState(); - break; - - case HostComponent: - pushHostContext(workInProgress); - break; - - case ClassComponent: - { - var Component = workInProgress.type; - - if (isContextProvider(Component)) { - pushContextProvider(workInProgress); - } - - break; - } - - case HostPortal: - pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); - break; - - case ContextProvider: - { - var newValue = workInProgress.memoizedProps.value; - pushProvider(workInProgress, newValue); - break; - } - - case Profiler: - { - // Profiler should only call onRender when one of its descendants actually rendered. - var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes); - - if (hasChildWork) { - workInProgress.flags |= Update; - } // Reset effect durations for the next eventual effect phase. - // These are reset during render to allow the DevTools commit hook a chance to read them, - - - var stateNode = workInProgress.stateNode; - stateNode.effectDuration = 0; - stateNode.passiveEffectDuration = 0; - } - - break; - - case SuspenseComponent: - { - var state = workInProgress.memoizedState; - - if (state !== null) { - // whether to retry the primary children, or to skip over it and - // go straight to the fallback. Check the priority of the primary - // child fragment. - - - var primaryChildFragment = workInProgress.child; - var primaryChildLanes = primaryChildFragment.childLanes; - - if (includesSomeLane(renderLanes, primaryChildLanes)) { - // The primary children have pending work. Use the normal path - // to attempt to render the primary children again. - return updateSuspenseComponent(current, workInProgress, renderLanes); - } else { - // The primary child fragment does not have pending work marked - // on it - pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient - // priority. Bailout. - - var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - - if (child !== null) { - // The fallback children have pending work. Skip over the - // primary children and work on the fallback. - return child.sibling; - } else { - return null; - } - } - } else { - pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); - } - - break; - } - - case SuspenseListComponent: - { - var didSuspendBefore = (current.flags & DidCapture) !== NoFlags; - - var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes); - - if (didSuspendBefore) { - if (_hasChildWork) { - // If something was in fallback state last time, and we have all the - // same children then we're still in progressive loading state. - // Something might get unblocked by state updates or retries in the - // tree which will affect the tail. So we need to use the normal - // path to compute the correct tail. - return updateSuspenseListComponent(current, workInProgress, renderLanes); - } // If none of the children had any work, that means that none of - // them got retried so they'll still be blocked in the same way - // as before. We can fast bail out. - - - workInProgress.flags |= DidCapture; - } // If nothing suspended before and we're rendering the same children, - // then the tail doesn't matter. Anything new that suspends will work - // in the "together" mode, so we can continue from the state we had. - - - var renderState = workInProgress.memoizedState; - - if (renderState !== null) { - // Reset to the "together" mode in case we've started a different - // update in the past but didn't complete it. - renderState.rendering = null; - renderState.tail = null; - renderState.lastEffect = null; - } - - pushSuspenseContext(workInProgress, suspenseStackCursor.current); - - if (_hasChildWork) { - break; - } else { - // If none of the children had any work, that means that none of - // them got retried so they'll still be blocked in the same way - // as before. We can fast bail out. - return null; - } - } - - case OffscreenComponent: - case LegacyHiddenComponent: - { - // Need to check if the tree still needs to be deferred. This is - // almost identical to the logic used in the normal update path, - // so we'll just enter that. The only difference is we'll bail out - // at the next level instead of this one, because the child props - // have not changed. Which is fine. - // TODO: Probably should refactor `beginWork` to split the bailout - // path from the normal path. I'm tempted to do a labeled break here - // but I won't :) - workInProgress.lanes = NoLanes; - return updateOffscreenComponent(current, workInProgress, renderLanes); - } - } - - return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes); - } else { - if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) { - // This is a special case that only exists for legacy mode. - // See https://github.com/facebook/react/pull/19216. - didReceiveUpdate = true; - } else { - // An update was scheduled on this fiber, but there are no new props - // nor legacy context. Set this to false. If an update queue or context - // consumer produces a changed value, it will set this to true. Otherwise, - // the component will assume the children have not changed and bail out. - didReceiveUpdate = false; - } - } - } else { - didReceiveUpdate = false; - } // Before entering the begin phase, clear pending update priority. - // TODO: This assumes that we're about to evaluate the component and process - // the update queue. However, there's an exception: SimpleMemoComponent - // sometimes bails out later in the begin phase. This indicates that we should - // move this assignment out of the common path and into each branch. - - - workInProgress.lanes = NoLanes; - - switch (workInProgress.tag) { - case IndeterminateComponent: - { - return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes); - } - - case LazyComponent: - { - var elementType = workInProgress.elementType; - return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes); - } - - case FunctionComponent: - { - var _Component = workInProgress.type; - var unresolvedProps = workInProgress.pendingProps; - var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps); - return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes); - } - - case ClassComponent: - { - var _Component2 = workInProgress.type; - var _unresolvedProps = workInProgress.pendingProps; - - var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps); - - return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes); - } - - case HostRoot: - return updateHostRoot(current, workInProgress, renderLanes); - - case HostComponent: - return updateHostComponent(current, workInProgress, renderLanes); - - case HostText: - return updateHostText(current, workInProgress); - - case SuspenseComponent: - return updateSuspenseComponent(current, workInProgress, renderLanes); - - case HostPortal: - return updatePortalComponent(current, workInProgress, renderLanes); - - case ForwardRef: - { - var type = workInProgress.type; - var _unresolvedProps2 = workInProgress.pendingProps; - - var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2); - - return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes); - } - - case Fragment: - return updateFragment(current, workInProgress, renderLanes); - - case Mode: - return updateMode(current, workInProgress, renderLanes); - - case Profiler: - return updateProfiler(current, workInProgress, renderLanes); - - case ContextProvider: - return updateContextProvider(current, workInProgress, renderLanes); - - case ContextConsumer: - return updateContextConsumer(current, workInProgress, renderLanes); - - case MemoComponent: - { - var _type2 = workInProgress.type; - var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props. - - var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3); - - { - if (workInProgress.type !== workInProgress.elementType) { - var outerPropTypes = _type2.propTypes; - - if (outerPropTypes) { - checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only - 'prop', getComponentName(_type2)); - } - } - } - - _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3); - return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes); - } - - case SimpleMemoComponent: - { - return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes); - } - - case IncompleteClassComponent: - { - var _Component3 = workInProgress.type; - var _unresolvedProps4 = workInProgress.pendingProps; - - var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4); - - return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes); - } - - case SuspenseListComponent: - { - return updateSuspenseListComponent(current, workInProgress, renderLanes); - } - - case FundamentalComponent: - { - - break; - } - - case ScopeComponent: - { - - break; - } - - case Block: - { - - break; - } - - case OffscreenComponent: - { - return updateOffscreenComponent(current, workInProgress, renderLanes); - } - - case LegacyHiddenComponent: - { - return updateLegacyHiddenComponent(current, workInProgress, renderLanes); - } - } - - { - { - throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - - function markUpdate(workInProgress) { - // Tag the fiber with an update effect. This turns a Placement into - // a PlacementAndUpdate. - workInProgress.flags |= Update; - } - - function markRef$1(workInProgress) { - workInProgress.flags |= Ref; - } - - var appendAllChildren; - var updateHostContainer; - var updateHostComponent$1; - var updateHostText$1; - - { - // Mutation mode - appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) { - // We only have the top Fiber that was created but we need recurse down its - // children to find all the terminal nodes. - var node = workInProgress.child; - - while (node !== null) { - if (node.tag === HostComponent || node.tag === HostText) { - appendInitialChild(parent, node.stateNode); - } else if (node.tag === HostPortal) ; else if (node.child !== null) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === workInProgress) { - return; - } - - while (node.sibling === null) { - if (node.return === null || node.return === workInProgress) { - return; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } - }; - - updateHostContainer = function (workInProgress) {// Noop - }; - - updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) { - // If we have an alternate, that means this is an update and we need to - // schedule a side-effect to do the updates. - var oldProps = current.memoizedProps; - - if (oldProps === newProps) { - // In mutation mode, this is sufficient for a bailout because - // we won't touch this node even if children changed. - return; - } // If we get updated because one of our children updated, we don't - // have newProps so we'll have to reuse them. - // TODO: Split the update API as separate for the props vs. children. - // Even better would be if children weren't special cased at all tho. - - - var instance = workInProgress.stateNode; - var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host - // component is hitting the resume path. Figure out why. Possibly - // related to `hidden`. - - var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component. - - workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there - // is a new ref we mark this as an update. All the work is done in commitWork. - - if (updatePayload) { - markUpdate(workInProgress); - } - }; - - updateHostText$1 = function (current, workInProgress, oldText, newText) { - // If the text differs, mark it as an update. All the work in done in commitWork. - if (oldText !== newText) { - markUpdate(workInProgress); - } - }; - } - - function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) { - if (getIsHydrating()) { - // If we're hydrating, we should consume as many items as we can - // so we don't leave any behind. - return; - } - - switch (renderState.tailMode) { - case 'hidden': - { - // Any insertions at the end of the tail list after this point - // should be invisible. If there are already mounted boundaries - // anything before them are not considered for collapsing. - // Therefore we need to go through the whole tail to find if - // there are any. - var tailNode = renderState.tail; - var lastTailNode = null; - - while (tailNode !== null) { - if (tailNode.alternate !== null) { - lastTailNode = tailNode; - } - - tailNode = tailNode.sibling; - } // Next we're simply going to delete all insertions after the - // last rendered item. - - - if (lastTailNode === null) { - // All remaining items in the tail are insertions. - renderState.tail = null; - } else { - // Detach the insertion after the last node that was already - // inserted. - lastTailNode.sibling = null; - } - - break; - } - - case 'collapsed': - { - // Any insertions at the end of the tail list after this point - // should be invisible. If there are already mounted boundaries - // anything before them are not considered for collapsing. - // Therefore we need to go through the whole tail to find if - // there are any. - var _tailNode = renderState.tail; - var _lastTailNode = null; - - while (_tailNode !== null) { - if (_tailNode.alternate !== null) { - _lastTailNode = _tailNode; - } - - _tailNode = _tailNode.sibling; - } // Next we're simply going to delete all insertions after the - // last rendered item. - - - if (_lastTailNode === null) { - // All remaining items in the tail are insertions. - if (!hasRenderedATailFallback && renderState.tail !== null) { - // We suspended during the head. We want to show at least one - // row at the tail. So we'll keep on and cut off the rest. - renderState.tail.sibling = null; - } else { - renderState.tail = null; - } - } else { - // Detach the insertion after the last node that was already - // inserted. - _lastTailNode.sibling = null; - } - - break; - } - } - } - - function completeWork(current, workInProgress, renderLanes) { - var newProps = workInProgress.pendingProps; - - switch (workInProgress.tag) { - case IndeterminateComponent: - case LazyComponent: - case SimpleMemoComponent: - case FunctionComponent: - case ForwardRef: - case Fragment: - case Mode: - case Profiler: - case ContextConsumer: - case MemoComponent: - return null; - - case ClassComponent: - { - var Component = workInProgress.type; - - if (isContextProvider(Component)) { - popContext(workInProgress); - } - - return null; - } - - case HostRoot: - { - popHostContainer(workInProgress); - popTopLevelContextObject(workInProgress); - resetWorkInProgressVersions(); - var fiberRoot = workInProgress.stateNode; - - if (fiberRoot.pendingContext) { - fiberRoot.context = fiberRoot.pendingContext; - fiberRoot.pendingContext = null; - } - - if (current === null || current.child === null) { - // If we hydrated, pop so that we can delete any remaining children - // that weren't hydrated. - var wasHydrated = popHydrationState(workInProgress); - - if (wasHydrated) { - // If we hydrated, then we'll need to schedule an update for - // the commit side-effects on the root. - markUpdate(workInProgress); - } else if (!fiberRoot.hydrate) { - // Schedule an effect to clear this container at the start of the next commit. - // This handles the case of React rendering into a container with previous children. - // It's also safe to do for updates too, because current.child would only be null - // if the previous render was null (so the the container would already be empty). - workInProgress.flags |= Snapshot; - } - } - - updateHostContainer(workInProgress); - return null; - } - - case HostComponent: - { - popHostContext(workInProgress); - var rootContainerInstance = getRootHostContainer(); - var type = workInProgress.type; - - if (current !== null && workInProgress.stateNode != null) { - updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance); - - if (current.ref !== workInProgress.ref) { - markRef$1(workInProgress); - } - } else { - if (!newProps) { - if (!(workInProgress.stateNode !== null)) { - { - throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." ); - } - } // This can happen when we abort work. - - - return null; - } - - var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context - // "stack" as the parent. Then append children as we go in beginWork - // or completeWork depending on whether we want to add them top->down or - // bottom->up. Top->down is faster in IE11. - - var _wasHydrated = popHydrationState(workInProgress); - - if (_wasHydrated) { - // TODO: Move this and createInstance step into the beginPhase - // to consolidate. - if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) { - // If changes to the hydrated node need to be applied at the - // commit-phase we mark this as such. - markUpdate(workInProgress); - } - } else { - var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress); - appendAllChildren(instance, workInProgress, false, false); - workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount. - // (eg DOM renderer supports auto-focus for certain elements). - // Make sure such renderers get scheduled for later work. - - if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) { - markUpdate(workInProgress); - } - } - - if (workInProgress.ref !== null) { - // If there is a ref on a host node we need to schedule a callback - markRef$1(workInProgress); - } - } - - return null; - } - - case HostText: - { - var newText = newProps; - - if (current && workInProgress.stateNode != null) { - var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need - // to schedule a side-effect to do the updates. - - updateHostText$1(current, workInProgress, oldText, newText); - } else { - if (typeof newText !== 'string') { - if (!(workInProgress.stateNode !== null)) { - { - throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." ); - } - } // This can happen when we abort work. - - } - - var _rootContainerInstance = getRootHostContainer(); - - var _currentHostContext = getHostContext(); - - var _wasHydrated2 = popHydrationState(workInProgress); - - if (_wasHydrated2) { - if (prepareToHydrateHostTextInstance(workInProgress)) { - markUpdate(workInProgress); - } - } else { - workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress); - } - } - - return null; - } - - case SuspenseComponent: - { - popSuspenseContext(workInProgress); - var nextState = workInProgress.memoizedState; - - if ((workInProgress.flags & DidCapture) !== NoFlags) { - // Something suspended. Re-render with the fallback children. - workInProgress.lanes = renderLanes; // Do not reset the effect list. - - if ( (workInProgress.mode & ProfileMode) !== NoMode) { - transferActualDuration(workInProgress); - } - - return workInProgress; - } - - var nextDidTimeout = nextState !== null; - var prevDidTimeout = false; - - if (current === null) { - if (workInProgress.memoizedProps.fallback !== undefined) { - popHydrationState(workInProgress); - } - } else { - var prevState = current.memoizedState; - prevDidTimeout = prevState !== null; - } - - if (nextDidTimeout && !prevDidTimeout) { - // If this subtreee is running in blocking mode we can suspend, - // otherwise we won't suspend. - // TODO: This will still suspend a synchronous tree if anything - // in the concurrent tree already suspended during this render. - // This is a known bug. - if ((workInProgress.mode & BlockingMode) !== NoMode) { - // TODO: Move this back to throwException because this is too late - // if this is a large tree which is common for initial loads. We - // don't know if we should restart a render or not until we get - // this marker, and this is too late. - // If this render already had a ping or lower pri updates, - // and this is the first time we know we're going to suspend we - // should be able to immediately restart from within throwException. - var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true; - - if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) { - // If this was in an invisible tree or a new render, then showing - // this boundary is ok. - renderDidSuspend(); - } else { - // Otherwise, we're going to have to hide content so we should - // suspend for longer if possible. - renderDidSuspendDelayIfPossible(); - } - } - } - - { - // TODO: Only schedule updates if these values are non equal, i.e. it changed. - if (nextDidTimeout || prevDidTimeout) { - // If this boundary just timed out, schedule an effect to attach a - // retry listener to the promise. This flag is also used to hide the - // primary children. In mutation mode, we also need the flag to - // *unhide* children that were previously hidden, so check if this - // is currently timed out, too. - workInProgress.flags |= Update; - } - } - - return null; - } - - case HostPortal: - popHostContainer(workInProgress); - updateHostContainer(workInProgress); - - if (current === null) { - preparePortalMount(workInProgress.stateNode.containerInfo); - } - - return null; - - case ContextProvider: - // Pop provider fiber - popProvider(workInProgress); - return null; - - case IncompleteClassComponent: - { - // Same as class component case. I put it down here so that the tags are - // sequential to ensure this switch is compiled to a jump table. - var _Component = workInProgress.type; - - if (isContextProvider(_Component)) { - popContext(workInProgress); - } - - return null; - } - - case SuspenseListComponent: - { - popSuspenseContext(workInProgress); - var renderState = workInProgress.memoizedState; - - if (renderState === null) { - // We're running in the default, "independent" mode. - // We don't do anything in this mode. - return null; - } - - var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags; - var renderedTail = renderState.rendering; - - if (renderedTail === null) { - // We just rendered the head. - if (!didSuspendAlready) { - // This is the first pass. We need to figure out if anything is still - // suspended in the rendered set. - // If new content unsuspended, but there's still some content that - // didn't. Then we need to do a second pass that forces everything - // to keep showing their fallbacks. - // We might be suspended if something in this render pass suspended, or - // something in the previous committed pass suspended. Otherwise, - // there's no chance so we can skip the expensive call to - // findFirstSuspended. - var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags); - - if (!cannotBeSuspended) { - var row = workInProgress.child; - - while (row !== null) { - var suspended = findFirstSuspended(row); - - if (suspended !== null) { - didSuspendAlready = true; - workInProgress.flags |= DidCapture; - cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as - // part of the second pass. In that case nothing will subscribe to - // its thennables. Instead, we'll transfer its thennables to the - // SuspenseList so that it can retry if they resolve. - // There might be multiple of these in the list but since we're - // going to wait for all of them anyway, it doesn't really matter - // which ones gets to ping. In theory we could get clever and keep - // track of how many dependencies remain but it gets tricky because - // in the meantime, we can add/remove/change items and dependencies. - // We might bail out of the loop before finding any but that - // doesn't matter since that means that the other boundaries that - // we did find already has their listeners attached. - - var newThennables = suspended.updateQueue; - - if (newThennables !== null) { - workInProgress.updateQueue = newThennables; - workInProgress.flags |= Update; - } // Rerender the whole list, but this time, we'll force fallbacks - // to stay in place. - // Reset the effect list before doing the second pass since that's now invalid. - - - if (renderState.lastEffect === null) { - workInProgress.firstEffect = null; - } - - workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state. - - resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately - // rerender the children. - - pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback)); - return workInProgress.child; - } - - row = row.sibling; - } - } - - if (renderState.tail !== null && now() > getRenderTargetTime()) { - // We have already passed our CPU deadline but we still have rows - // left in the tail. We'll just give up further attempts to render - // the main content and only render fallbacks. - workInProgress.flags |= DidCapture; - didSuspendAlready = true; - cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this - // to get it started back up to attempt the next item. While in terms - // of priority this work has the same priority as this current render, - // it's not part of the same transition once the transition has - // committed. If it's sync, we still want to yield so that it can be - // painted. Conceptually, this is really the same as pinging. - // We can use any RetryLane even if it's the one currently rendering - // since we're leaving it behind on this node. - - workInProgress.lanes = SomeRetryLane; - - { - markSpawnedWork(SomeRetryLane); - } - } - } else { - cutOffTailIfNeeded(renderState, false); - } // Next we're going to render the tail. - - } else { - // Append the rendered row to the child list. - if (!didSuspendAlready) { - var _suspended = findFirstSuspended(renderedTail); - - if (_suspended !== null) { - workInProgress.flags |= DidCapture; - didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't - // get lost if this row ends up dropped during a second pass. - - var _newThennables = _suspended.updateQueue; - - if (_newThennables !== null) { - workInProgress.updateQueue = _newThennables; - workInProgress.flags |= Update; - } - - cutOffTailIfNeeded(renderState, true); // This might have been modified. - - if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating. - ) { - // We need to delete the row we just rendered. - // Reset the effect list to what it was before we rendered this - // child. The nested children have already appended themselves. - var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point. - - if (lastEffect !== null) { - lastEffect.nextEffect = null; - } // We're done. - - - return null; - } - } else if ( // The time it took to render last row is greater than the remaining - // time we have to render. So rendering one more row would likely - // exceed it. - now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) { - // We have now passed our CPU deadline and we'll just give up further - // attempts to render the main content and only render fallbacks. - // The assumption is that this is usually faster. - workInProgress.flags |= DidCapture; - didSuspendAlready = true; - cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this - // to get it started back up to attempt the next item. While in terms - // of priority this work has the same priority as this current render, - // it's not part of the same transition once the transition has - // committed. If it's sync, we still want to yield so that it can be - // painted. Conceptually, this is really the same as pinging. - // We can use any RetryLane even if it's the one currently rendering - // since we're leaving it behind on this node. - - workInProgress.lanes = SomeRetryLane; - - { - markSpawnedWork(SomeRetryLane); - } - } - } - - if (renderState.isBackwards) { - // The effect list of the backwards tail will have been added - // to the end. This breaks the guarantee that life-cycles fire in - // sibling order but that isn't a strong guarantee promised by React. - // Especially since these might also just pop in during future commits. - // Append to the beginning of the list. - renderedTail.sibling = workInProgress.child; - workInProgress.child = renderedTail; - } else { - var previousSibling = renderState.last; - - if (previousSibling !== null) { - previousSibling.sibling = renderedTail; - } else { - workInProgress.child = renderedTail; - } - - renderState.last = renderedTail; - } - } - - if (renderState.tail !== null) { - // We still have tail rows to render. - // Pop a row. - var next = renderState.tail; - renderState.rendering = next; - renderState.tail = next.sibling; - renderState.lastEffect = workInProgress.lastEffect; - renderState.renderingStartTime = now(); - next.sibling = null; // Restore the context. - // TODO: We can probably just avoid popping it instead and only - // setting it the first time we go from not suspended to suspended. - - var suspenseContext = suspenseStackCursor.current; - - if (didSuspendAlready) { - suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback); - } else { - suspenseContext = setDefaultShallowSuspenseContext(suspenseContext); - } - - pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row. - - return next; - } - - return null; - } - - case FundamentalComponent: - { - - break; - } - - case ScopeComponent: - { - - break; - } - - case Block: - - break; - - case OffscreenComponent: - case LegacyHiddenComponent: - { - popRenderLanes(workInProgress); - - if (current !== null) { - var _nextState = workInProgress.memoizedState; - var _prevState = current.memoizedState; - var prevIsHidden = _prevState !== null; - var nextIsHidden = _nextState !== null; - - if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') { - workInProgress.flags |= Update; - } - } - - return null; - } - } - - { - { - throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - - function unwindWork(workInProgress, renderLanes) { - switch (workInProgress.tag) { - case ClassComponent: - { - var Component = workInProgress.type; - - if (isContextProvider(Component)) { - popContext(workInProgress); - } - - var flags = workInProgress.flags; - - if (flags & ShouldCapture) { - workInProgress.flags = flags & ~ShouldCapture | DidCapture; - - if ( (workInProgress.mode & ProfileMode) !== NoMode) { - transferActualDuration(workInProgress); - } - - return workInProgress; - } - - return null; - } - - case HostRoot: - { - popHostContainer(workInProgress); - popTopLevelContextObject(workInProgress); - resetWorkInProgressVersions(); - var _flags = workInProgress.flags; - - if (!((_flags & DidCapture) === NoFlags)) { - { - throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." ); - } - } - - workInProgress.flags = _flags & ~ShouldCapture | DidCapture; - return workInProgress; - } - - case HostComponent: - { - // TODO: popHydrationState - popHostContext(workInProgress); - return null; - } - - case SuspenseComponent: - { - popSuspenseContext(workInProgress); - - var _flags2 = workInProgress.flags; - - if (_flags2 & ShouldCapture) { - workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary. - - if ( (workInProgress.mode & ProfileMode) !== NoMode) { - transferActualDuration(workInProgress); - } - - return workInProgress; - } - - return null; - } - - case SuspenseListComponent: - { - popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been - // caught by a nested boundary. If not, it should bubble through. - - return null; - } - - case HostPortal: - popHostContainer(workInProgress); - return null; - - case ContextProvider: - popProvider(workInProgress); - return null; - - case OffscreenComponent: - case LegacyHiddenComponent: - popRenderLanes(workInProgress); - return null; - - default: - return null; - } - } - - function unwindInterruptedWork(interruptedWork) { - switch (interruptedWork.tag) { - case ClassComponent: - { - var childContextTypes = interruptedWork.type.childContextTypes; - - if (childContextTypes !== null && childContextTypes !== undefined) { - popContext(interruptedWork); - } - - break; - } - - case HostRoot: - { - popHostContainer(interruptedWork); - popTopLevelContextObject(interruptedWork); - resetWorkInProgressVersions(); - break; - } - - case HostComponent: - { - popHostContext(interruptedWork); - break; - } - - case HostPortal: - popHostContainer(interruptedWork); - break; - - case SuspenseComponent: - popSuspenseContext(interruptedWork); - break; - - case SuspenseListComponent: - popSuspenseContext(interruptedWork); - break; - - case ContextProvider: - popProvider(interruptedWork); - break; - - case OffscreenComponent: - case LegacyHiddenComponent: - popRenderLanes(interruptedWork); - break; - } - } - - function createCapturedValue(value, source) { - // If the value is an error, call this function immediately after it is thrown - // so the stack is accurate. - return { - value: value, - source: source, - stack: getStackByFiberInDevAndProd(source) - }; - } - - // This module is forked in different environments. - // By default, return `true` to log errors to the console. - // Forks can return `false` if this isn't desirable. - function showErrorDialog(boundary, errorInfo) { - return true; - } - - function logCapturedError(boundary, errorInfo) { - try { - var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging. - // This enables renderers like ReactNative to better manage redbox behavior. - - if (logError === false) { - return; - } - - var error = errorInfo.value; - - if (true) { - var source = errorInfo.source; - var stack = errorInfo.stack; - var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling - // `preventDefault()` in window `error` handler. - // We record this information as an expando on the error. - - if (error != null && error._suppressLogging) { - if (boundary.tag === ClassComponent) { - // The error is recoverable and was silenced. - // Ignore it and don't print the stack addendum. - // This is handy for testing error boundaries without noise. - return; - } // The error is fatal. Since the silencing might have - // been accidental, we'll surface it anyway. - // However, the browser would have silenced the original error - // so we'll print it first, and then print the stack addendum. - - - console['error'](error); // Don't transform to our wrapper - // For a more detailed description of this block, see: - // https://github.com/facebook/react/pull/13384 - } - - var componentName = source ? getComponentName(source.type) : null; - var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:'; - var errorBoundaryMessage; - var errorBoundaryName = getComponentName(boundary.type); - - if (errorBoundaryName) { - errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + "."); - } else { - errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.'; - } - - var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack. - // We don't include the original error message and JS stack because the browser - // has already printed it. Even if the application swallows the error, it is still - // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils. - - console['error'](combinedMessage); // Don't transform to our wrapper - } else { - // In production, we print the error directly. - // This will include the message, the JS stack, and anything the browser wants to show. - // We pass the error object instead of custom message so that the browser displays the error natively. - console['error'](error); // Don't transform to our wrapper - } - } catch (e) { - // This method must not throw, or React internal state will get messed up. - // If console.error is overridden, or logCapturedError() shows a dialog that throws, - // we want to report this error outside of the normal stack as a last resort. - // https://github.com/facebook/react/issues/13188 - setTimeout(function () { - throw e; - }); - } - } - - var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map; - - function createRootErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null. - - update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property - // being called "element". - - update.payload = { - element: null - }; - var error = errorInfo.value; - - update.callback = function () { - onUncaughtError(error); - logCapturedError(fiber, errorInfo); - }; - - return update; - } - - function createClassErrorUpdate(fiber, errorInfo, lane) { - var update = createUpdate(NoTimestamp, lane); - update.tag = CaptureUpdate; - var getDerivedStateFromError = fiber.type.getDerivedStateFromError; - - if (typeof getDerivedStateFromError === 'function') { - var error$1 = errorInfo.value; - - update.payload = function () { - logCapturedError(fiber, errorInfo); - return getDerivedStateFromError(error$1); - }; - } - - var inst = fiber.stateNode; - - if (inst !== null && typeof inst.componentDidCatch === 'function') { - update.callback = function callback() { - { - markFailedErrorBoundaryForHotReloading(fiber); - } - - if (typeof getDerivedStateFromError !== 'function') { - // To preserve the preexisting retry behavior of error boundaries, - // we keep track of which ones already failed during this batch. - // This gets reset before we yield back to the browser. - // TODO: Warn in strict mode if getDerivedStateFromError is - // not defined. - markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined - - logCapturedError(fiber, errorInfo); - } - - var error$1 = errorInfo.value; - var stack = errorInfo.stack; - this.componentDidCatch(error$1, { - componentStack: stack !== null ? stack : '' - }); - - { - if (typeof getDerivedStateFromError !== 'function') { - // If componentDidCatch is the only error boundary method defined, - // then it needs to call setState to recover from errors. - // If no state update is scheduled then the boundary will swallow the error. - if (!includesSomeLane(fiber.lanes, SyncLane)) { - error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown'); - } - } - } - }; - } else { - update.callback = function () { - markFailedErrorBoundaryForHotReloading(fiber); - }; - } - - return update; - } - - function attachPingListener(root, wakeable, lanes) { - // Attach a listener to the promise to "ping" the root and retry. But only if - // one does not already exist for the lanes we're currently rendering (which - // acts like a "thread ID" here). - var pingCache = root.pingCache; - var threadIDs; - - if (pingCache === null) { - pingCache = root.pingCache = new PossiblyWeakMap$1(); - threadIDs = new Set(); - pingCache.set(wakeable, threadIDs); - } else { - threadIDs = pingCache.get(wakeable); - - if (threadIDs === undefined) { - threadIDs = new Set(); - pingCache.set(wakeable, threadIDs); - } - } - - if (!threadIDs.has(lanes)) { - // Memoize using the thread ID to prevent redundant listeners. - threadIDs.add(lanes); - var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes); - wakeable.then(ping, ping); - } - } - - function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) { - // The source fiber did not complete. - sourceFiber.flags |= Incomplete; // Its effect list is no longer valid. - - sourceFiber.firstEffect = sourceFiber.lastEffect = null; - - if (value !== null && typeof value === 'object' && typeof value.then === 'function') { - // This is a wakeable. - var wakeable = value; - - if ((sourceFiber.mode & BlockingMode) === NoMode) { - // Reset the memoizedState to what it was before we attempted - // to render it. - var currentSource = sourceFiber.alternate; - - if (currentSource) { - sourceFiber.updateQueue = currentSource.updateQueue; - sourceFiber.memoizedState = currentSource.memoizedState; - sourceFiber.lanes = currentSource.lanes; - } else { - sourceFiber.updateQueue = null; - sourceFiber.memoizedState = null; - } - } - - var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view. - - var _workInProgress = returnFiber; - - do { - if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) { - // Found the nearest boundary. - // Stash the promise on the boundary fiber. If the boundary times out, we'll - // attach another listener to flip the boundary back to its normal state. - var wakeables = _workInProgress.updateQueue; - - if (wakeables === null) { - var updateQueue = new Set(); - updateQueue.add(wakeable); - _workInProgress.updateQueue = updateQueue; - } else { - wakeables.add(wakeable); - } // If the boundary is outside of blocking mode, we should *not* - // suspend the commit. Pretend as if the suspended component rendered - // null and keep rendering. In the commit phase, we'll schedule a - // subsequent synchronous update to re-render the Suspense. - // - // Note: It doesn't matter whether the component that suspended was - // inside a blocking mode tree. If the Suspense is outside of it, we - // should *not* suspend the commit. - - - if ((_workInProgress.mode & BlockingMode) === NoMode) { - _workInProgress.flags |= DidCapture; - sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete. - // But we shouldn't call any lifecycle methods or callbacks. Remove - // all lifecycle effect tags. - - sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete); - - if (sourceFiber.tag === ClassComponent) { - var currentSourceFiber = sourceFiber.alternate; - - if (currentSourceFiber === null) { - // This is a new mount. Change the tag so it's not mistaken for a - // completed class component. For example, we should not call - // componentWillUnmount if it is deleted. - sourceFiber.tag = IncompleteClassComponent; - } else { - // When we try rendering again, we should not reuse the current fiber, - // since it's known to be in an inconsistent state. Use a force update to - // prevent a bail out. - var update = createUpdate(NoTimestamp, SyncLane); - update.tag = ForceUpdate; - enqueueUpdate(sourceFiber, update); - } - } // The source fiber did not complete. Mark it with Sync priority to - // indicate that it still has pending work. - - - sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending. - - return; - } // Confirmed that the boundary is in a concurrent mode tree. Continue - // with the normal suspend path. - // - // After this we'll use a set of heuristics to determine whether this - // render pass will run to completion or restart or "suspend" the commit. - // The actual logic for this is spread out in different places. - // - // This first principle is that if we're going to suspend when we complete - // a root, then we should also restart if we get an update or ping that - // might unsuspend it, and vice versa. The only reason to suspend is - // because you think you might want to restart before committing. However, - // it doesn't make sense to restart only while in the period we're suspended. - // - // Restarting too aggressively is also not good because it starves out any - // intermediate loading state. So we use heuristics to determine when. - // Suspense Heuristics - // - // If nothing threw a Promise or all the same fallbacks are already showing, - // then don't suspend/restart. - // - // If this is an initial render of a new tree of Suspense boundaries and - // those trigger a fallback, then don't suspend/restart. We want to ensure - // that we can show the initial loading state as quickly as possible. - // - // If we hit a "Delayed" case, such as when we'd switch from content back into - // a fallback, then we should always suspend/restart. Transitions apply - // to this case. If none is defined, JND is used instead. - // - // If we're already showing a fallback and it gets "retried", allowing us to show - // another level, but there's still an inner boundary that would show a fallback, - // then we suspend/restart for 500ms since the last time we showed a fallback - // anywhere in the tree. This effectively throttles progressive loading into a - // consistent train of commits. This also gives us an opportunity to restart to - // get to the completed state slightly earlier. - // - // If there's ambiguity due to batching it's resolved in preference of: - // 1) "delayed", 2) "initial render", 3) "retry". - // - // We want to ensure that a "busy" state doesn't get force committed. We want to - // ensure that new initial loading states can commit as soon as possible. - - - attachPingListener(root, wakeable, rootRenderLanes); - _workInProgress.flags |= ShouldCapture; - _workInProgress.lanes = rootRenderLanes; - return; - } // This boundary already captured during this render. Continue to the next - // boundary. - - - _workInProgress = _workInProgress.return; - } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode. - // TODO: Use invariant so the message is stripped in prod? - - - value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.'); - } // We didn't find a boundary that could handle this type of exception. Start - // over and traverse parent path again, this time treating the exception - // as an error. - - - renderDidError(); - value = createCapturedValue(value, sourceFiber); - var workInProgress = returnFiber; - - do { - switch (workInProgress.tag) { - case HostRoot: - { - var _errorInfo = value; - workInProgress.flags |= ShouldCapture; - var lane = pickArbitraryLane(rootRenderLanes); - workInProgress.lanes = mergeLanes(workInProgress.lanes, lane); - - var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane); - - enqueueCapturedUpdate(workInProgress, _update); - return; - } - - case ClassComponent: - // Capture and retry - var errorInfo = value; - var ctor = workInProgress.type; - var instance = workInProgress.stateNode; - - if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) { - workInProgress.flags |= ShouldCapture; - - var _lane = pickArbitraryLane(rootRenderLanes); - - workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state - - var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane); - - enqueueCapturedUpdate(workInProgress, _update2); - return; - } - - break; - } - - workInProgress = workInProgress.return; - } while (workInProgress !== null); - } - - var didWarnAboutUndefinedSnapshotBeforeUpdate = null; - - { - didWarnAboutUndefinedSnapshotBeforeUpdate = new Set(); - } - - var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set; - - var callComponentWillUnmountWithTimer = function (current, instance) { - instance.props = current.memoizedProps; - instance.state = current.memoizedState; - - { - instance.componentWillUnmount(); - } - }; // Capture errors so they don't interrupt unmounting. - - - function safelyCallComponentWillUnmount(current, instance) { - { - invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance); - - if (hasCaughtError()) { - var unmountError = clearCaughtError(); - captureCommitPhaseError(current, unmountError); - } - } - } - - function safelyDetachRef(current) { - var ref = current.ref; - - if (ref !== null) { - if (typeof ref === 'function') { - { - invokeGuardedCallback(null, ref, null, null); - - if (hasCaughtError()) { - var refError = clearCaughtError(); - captureCommitPhaseError(current, refError); - } - } - } else { - ref.current = null; - } - } - } - - function safelyCallDestroy(current, destroy) { - { - invokeGuardedCallback(null, destroy, null); - - if (hasCaughtError()) { - var error = clearCaughtError(); - captureCommitPhaseError(current, error); - } - } - } - - function commitBeforeMutationLifeCycles(current, finishedWork) { - switch (finishedWork.tag) { - case FunctionComponent: - case ForwardRef: - case SimpleMemoComponent: - case Block: - { - return; - } - - case ClassComponent: - { - if (finishedWork.flags & Snapshot) { - if (current !== null) { - var prevProps = current.memoizedProps; - var prevState = current.memoizedState; - var instance = finishedWork.stateNode; // We could update instance props and state here, - // but instead we rely on them being set during last render. - // TODO: revisit this when we implement resuming. - - { - if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { - if (instance.props !== finishedWork.memoizedProps) { - error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - - if (instance.state !== finishedWork.memoizedState) { - error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - } - } - - var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState); - - { - var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate; - - if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) { - didWarnSet.add(finishedWork.type); - - error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type)); - } - } - - instance.__reactInternalSnapshotBeforeUpdate = snapshot; - } - } - - return; - } - - case HostRoot: - { - { - if (finishedWork.flags & Snapshot) { - var root = finishedWork.stateNode; - clearContainer(root.containerInfo); - } - } - - return; - } - - case HostComponent: - case HostText: - case HostPortal: - case IncompleteClassComponent: - // Nothing to do for these component types - return; - } - - { - { - throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - - function commitHookEffectListUnmount(tag, finishedWork) { - var updateQueue = finishedWork.updateQueue; - var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; - - if (lastEffect !== null) { - var firstEffect = lastEffect.next; - var effect = firstEffect; - - do { - if ((effect.tag & tag) === tag) { - // Unmount - var destroy = effect.destroy; - effect.destroy = undefined; - - if (destroy !== undefined) { - destroy(); - } - } - - effect = effect.next; - } while (effect !== firstEffect); - } - } - - function commitHookEffectListMount(tag, finishedWork) { - var updateQueue = finishedWork.updateQueue; - var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; - - if (lastEffect !== null) { - var firstEffect = lastEffect.next; - var effect = firstEffect; - - do { - if ((effect.tag & tag) === tag) { - // Mount - var create = effect.create; - effect.destroy = create(); - - { - var destroy = effect.destroy; - - if (destroy !== undefined && typeof destroy !== 'function') { - var addendum = void 0; - - if (destroy === null) { - addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).'; - } else if (typeof destroy.then === 'function') { - addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching'; - } else { - addendum = ' You returned: ' + destroy; - } - - error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum); - } - } - } - - effect = effect.next; - } while (effect !== firstEffect); - } - } - - function schedulePassiveEffects(finishedWork) { - var updateQueue = finishedWork.updateQueue; - var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null; - - if (lastEffect !== null) { - var firstEffect = lastEffect.next; - var effect = firstEffect; - - do { - var _effect = effect, - next = _effect.next, - tag = _effect.tag; - - if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) { - enqueuePendingPassiveHookEffectUnmount(finishedWork, effect); - enqueuePendingPassiveHookEffectMount(finishedWork, effect); - } - - effect = next; - } while (effect !== firstEffect); - } - } - - function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) { - switch (finishedWork.tag) { - case FunctionComponent: - case ForwardRef: - case SimpleMemoComponent: - case Block: - { - // At this point layout effects have already been destroyed (during mutation phase). - // This is done to prevent sibling component effects from interfering with each other, - // e.g. a destroy function in one component should never override a ref set - // by a create function in another component during the same commit. - { - commitHookEffectListMount(Layout | HasEffect, finishedWork); - } - - schedulePassiveEffects(finishedWork); - return; - } - - case ClassComponent: - { - var instance = finishedWork.stateNode; - - if (finishedWork.flags & Update) { - if (current === null) { - // We could update instance props and state here, - // but instead we rely on them being set during last render. - // TODO: revisit this when we implement resuming. - { - if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { - if (instance.props !== finishedWork.memoizedProps) { - error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - - if (instance.state !== finishedWork.memoizedState) { - error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - } - } - - { - instance.componentDidMount(); - } - } else { - var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps); - var prevState = current.memoizedState; // We could update instance props and state here, - // but instead we rely on them being set during last render. - // TODO: revisit this when we implement resuming. - - { - if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { - if (instance.props !== finishedWork.memoizedProps) { - error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - - if (instance.state !== finishedWork.memoizedState) { - error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - } - } - - { - instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate); - } - } - } // TODO: I think this is now always non-null by the time it reaches the - // commit phase. Consider removing the type check. - - - var updateQueue = finishedWork.updateQueue; - - if (updateQueue !== null) { - { - if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) { - if (instance.props !== finishedWork.memoizedProps) { - error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - - if (instance.state !== finishedWork.memoizedState) { - error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance'); - } - } - } // We could update instance props and state here, - // but instead we rely on them being set during last render. - // TODO: revisit this when we implement resuming. - - - commitUpdateQueue(finishedWork, updateQueue, instance); - } - - return; - } - - case HostRoot: - { - // TODO: I think this is now always non-null by the time it reaches the - // commit phase. Consider removing the type check. - var _updateQueue = finishedWork.updateQueue; - - if (_updateQueue !== null) { - var _instance = null; - - if (finishedWork.child !== null) { - switch (finishedWork.child.tag) { - case HostComponent: - _instance = getPublicInstance(finishedWork.child.stateNode); - break; - - case ClassComponent: - _instance = finishedWork.child.stateNode; - break; - } - } - - commitUpdateQueue(finishedWork, _updateQueue, _instance); - } - - return; - } - - case HostComponent: - { - var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted - // (eg DOM renderer may schedule auto-focus for inputs and form controls). - // These effects should only be committed when components are first mounted, - // aka when there is no current/alternate. - - if (current === null && finishedWork.flags & Update) { - var type = finishedWork.type; - var props = finishedWork.memoizedProps; - commitMount(_instance2, type, props); - } - - return; - } - - case HostText: - { - // We have no life-cycles associated with text. - return; - } - - case HostPortal: - { - // We have no life-cycles associated with portals. - return; - } - - case Profiler: - { - { - var _finishedWork$memoize2 = finishedWork.memoizedProps, - onCommit = _finishedWork$memoize2.onCommit, - onRender = _finishedWork$memoize2.onRender; - var effectDuration = finishedWork.stateNode.effectDuration; - var commitTime = getCommitTime(); - - if (typeof onRender === 'function') { - { - onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions); - } - } - } - - return; - } - - case SuspenseComponent: - { - commitSuspenseHydrationCallbacks(finishedRoot, finishedWork); - return; - } - - case SuspenseListComponent: - case IncompleteClassComponent: - case FundamentalComponent: - case ScopeComponent: - case OffscreenComponent: - case LegacyHiddenComponent: - return; - } - - { - { - throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - - function hideOrUnhideAllChildren(finishedWork, isHidden) { - { - // We only have the top Fiber that was inserted but we need to recurse down its - // children to find all the terminal nodes. - var node = finishedWork; - - while (true) { - if (node.tag === HostComponent) { - var instance = node.stateNode; - - if (isHidden) { - hideInstance(instance); - } else { - unhideInstance(node.stateNode, node.memoizedProps); - } - } else if (node.tag === HostText) { - var _instance3 = node.stateNode; - - if (isHidden) { - hideTextInstance(_instance3); - } else { - unhideTextInstance(_instance3, node.memoizedProps); - } - } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === finishedWork) { - return; - } - - while (node.sibling === null) { - if (node.return === null || node.return === finishedWork) { - return; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } - } - } - - function commitAttachRef(finishedWork) { - var ref = finishedWork.ref; - - if (ref !== null) { - var instance = finishedWork.stateNode; - var instanceToUse; - - switch (finishedWork.tag) { - case HostComponent: - instanceToUse = getPublicInstance(instance); - break; - - default: - instanceToUse = instance; - } // Moved outside to ensure DCE works with this flag - - if (typeof ref === 'function') { - ref(instanceToUse); - } else { - { - if (!ref.hasOwnProperty('current')) { - error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type)); - } - } - - ref.current = instanceToUse; - } - } - } - - function commitDetachRef(current) { - var currentRef = current.ref; - - if (currentRef !== null) { - if (typeof currentRef === 'function') { - currentRef(null); - } else { - currentRef.current = null; - } - } - } // User-originating errors (lifecycles and refs) should not interrupt - // deletion, so don't let them throw. Host-originating errors should - // interrupt deletion, so it's okay - - - function commitUnmount(finishedRoot, current, renderPriorityLevel) { - onCommitUnmount(current); - - switch (current.tag) { - case FunctionComponent: - case ForwardRef: - case MemoComponent: - case SimpleMemoComponent: - case Block: - { - var updateQueue = current.updateQueue; - - if (updateQueue !== null) { - var lastEffect = updateQueue.lastEffect; - - if (lastEffect !== null) { - var firstEffect = lastEffect.next; - var effect = firstEffect; - - do { - var _effect2 = effect, - destroy = _effect2.destroy, - tag = _effect2.tag; - - if (destroy !== undefined) { - if ((tag & Passive$1) !== NoFlags$1) { - enqueuePendingPassiveHookEffectUnmount(current, effect); - } else { - { - safelyCallDestroy(current, destroy); - } - } - } - - effect = effect.next; - } while (effect !== firstEffect); - } - } - - return; - } - - case ClassComponent: - { - safelyDetachRef(current); - var instance = current.stateNode; - - if (typeof instance.componentWillUnmount === 'function') { - safelyCallComponentWillUnmount(current, instance); - } - - return; - } - - case HostComponent: - { - safelyDetachRef(current); - return; - } - - case HostPortal: - { - // TODO: this is recursive. - // We are also not using this parent because - // the portal will get pushed immediately. - { - unmountHostComponents(finishedRoot, current); - } - - return; - } - - case FundamentalComponent: - { - - return; - } - - case DehydratedFragment: - { - - return; - } - - case ScopeComponent: - { - - return; - } - } - } - - function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) { - // While we're inside a removed host node we don't want to call - // removeChild on the inner nodes because they're removed by the top - // call anyway. We also want to call componentWillUnmount on all - // composites before this host node is removed from the tree. Therefore - // we do an inner loop while we're still inside the host node. - var node = root; - - while (true) { - commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes. - // Skip portals because commitUnmount() currently visits them recursively. - - if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above. - // If we don't use mutation we drill down into portals here instead. - node.tag !== HostPortal)) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === root) { - return; - } - - while (node.sibling === null) { - if (node.return === null || node.return === root) { - return; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } - } - - function detachFiberMutation(fiber) { - // Cut off the return pointers to disconnect it from the tree. Ideally, we - // should clear the child pointer of the parent alternate to let this - // get GC:ed but we don't know which for sure which parent is the current - // one so we'll settle for GC:ing the subtree of this child. This child - // itself will be GC:ed when the parent updates the next time. - // Note: we cannot null out sibling here, otherwise it can cause issues - // with findDOMNode and how it requires the sibling field to carry out - // traversal in a later effect. See PR #16820. We now clear the sibling - // field after effects, see: detachFiberAfterEffects. - // - // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects. - // It may be required if the current component is an error boundary, - // and one of its descendants throws while unmounting a passive effect. - fiber.alternate = null; - fiber.child = null; - fiber.dependencies = null; - fiber.firstEffect = null; - fiber.lastEffect = null; - fiber.memoizedProps = null; - fiber.memoizedState = null; - fiber.pendingProps = null; - fiber.return = null; - fiber.updateQueue = null; - - { - fiber._debugOwner = null; - } - } - - function getHostParentFiber(fiber) { - var parent = fiber.return; - - while (parent !== null) { - if (isHostParent(parent)) { - return parent; - } - - parent = parent.return; - } - - { - { - throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - - function isHostParent(fiber) { - return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal; - } - - function getHostSibling(fiber) { - // We're going to search forward into the tree until we find a sibling host - // node. Unfortunately, if multiple insertions are done in a row we have to - // search past them. This leads to exponential search for the next sibling. - // TODO: Find a more efficient way to do this. - var node = fiber; - - siblings: while (true) { - // If we didn't find anything, let's try the next sibling. - while (node.sibling === null) { - if (node.return === null || isHostParent(node.return)) { - // If we pop out of the root or hit the parent the fiber we are the - // last sibling. - return null; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - - while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) { - // If it is not host node and, we might have a host node inside it. - // Try to search down until we find one. - if (node.flags & Placement) { - // If we don't have a child, try the siblings instead. - continue siblings; - } // If we don't have a child, try the siblings instead. - // We also skip portals because they are not part of this host tree. - - - if (node.child === null || node.tag === HostPortal) { - continue siblings; - } else { - node.child.return = node; - node = node.child; - } - } // Check if this host node is stable or about to be placed. - - - if (!(node.flags & Placement)) { - // Found it! - return node.stateNode; - } - } - } - - function commitPlacement(finishedWork) { - - - var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together. - - var parent; - var isContainer; - var parentStateNode = parentFiber.stateNode; - - switch (parentFiber.tag) { - case HostComponent: - parent = parentStateNode; - isContainer = false; - break; - - case HostRoot: - parent = parentStateNode.containerInfo; - isContainer = true; - break; - - case HostPortal: - parent = parentStateNode.containerInfo; - isContainer = true; - break; - - case FundamentalComponent: - - // eslint-disable-next-line-no-fallthrough - - default: - { - { - throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - } - - if (parentFiber.flags & ContentReset) { - // Reset the text content of the parent before doing any insertions - resetTextContent(parent); // Clear ContentReset from the effect tag - - parentFiber.flags &= ~ContentReset; - } - - var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its - // children to find all the terminal nodes. - - if (isContainer) { - insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent); - } else { - insertOrAppendPlacementNode(finishedWork, before, parent); - } - } - - function insertOrAppendPlacementNodeIntoContainer(node, before, parent) { - var tag = node.tag; - var isHost = tag === HostComponent || tag === HostText; - - if (isHost || enableFundamentalAPI ) { - var stateNode = isHost ? node.stateNode : node.stateNode.instance; - - if (before) { - insertInContainerBefore(parent, stateNode, before); - } else { - appendChildToContainer(parent, stateNode); - } - } else if (tag === HostPortal) ; else { - var child = node.child; - - if (child !== null) { - insertOrAppendPlacementNodeIntoContainer(child, before, parent); - var sibling = child.sibling; - - while (sibling !== null) { - insertOrAppendPlacementNodeIntoContainer(sibling, before, parent); - sibling = sibling.sibling; - } - } - } - } - - function insertOrAppendPlacementNode(node, before, parent) { - var tag = node.tag; - var isHost = tag === HostComponent || tag === HostText; - - if (isHost || enableFundamentalAPI ) { - var stateNode = isHost ? node.stateNode : node.stateNode.instance; - - if (before) { - insertBefore(parent, stateNode, before); - } else { - appendChild(parent, stateNode); - } - } else if (tag === HostPortal) ; else { - var child = node.child; - - if (child !== null) { - insertOrAppendPlacementNode(child, before, parent); - var sibling = child.sibling; - - while (sibling !== null) { - insertOrAppendPlacementNode(sibling, before, parent); - sibling = sibling.sibling; - } - } - } - } - - function unmountHostComponents(finishedRoot, current, renderPriorityLevel) { - // We only have the top Fiber that was deleted but we need to recurse down its - // children to find all the terminal nodes. - var node = current; // Each iteration, currentParent is populated with node's host parent if not - // currentParentIsValid. - - var currentParentIsValid = false; // Note: these two variables *must* always be updated together. - - var currentParent; - var currentParentIsContainer; - - while (true) { - if (!currentParentIsValid) { - var parent = node.return; - - findParent: while (true) { - if (!(parent !== null)) { - { - throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - var parentStateNode = parent.stateNode; - - switch (parent.tag) { - case HostComponent: - currentParent = parentStateNode; - currentParentIsContainer = false; - break findParent; - - case HostRoot: - currentParent = parentStateNode.containerInfo; - currentParentIsContainer = true; - break findParent; - - case HostPortal: - currentParent = parentStateNode.containerInfo; - currentParentIsContainer = true; - break findParent; - - } - - parent = parent.return; - } - - currentParentIsValid = true; - } - - if (node.tag === HostComponent || node.tag === HostText) { - commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the - // node from the tree. - - if (currentParentIsContainer) { - removeChildFromContainer(currentParent, node.stateNode); - } else { - removeChild(currentParent, node.stateNode); - } // Don't visit children because we already visited them. - - } else if (node.tag === HostPortal) { - if (node.child !== null) { - // When we go into a portal, it becomes the parent to remove from. - // We will reassign it back when we pop the portal on the way up. - currentParent = node.stateNode.containerInfo; - currentParentIsContainer = true; // Visit children because portals might contain host components. - - node.child.return = node; - node = node.child; - continue; - } - } else { - commitUnmount(finishedRoot, node); // Visit children because we may find more host components below. - - if (node.child !== null) { - node.child.return = node; - node = node.child; - continue; - } - } - - if (node === current) { - return; - } - - while (node.sibling === null) { - if (node.return === null || node.return === current) { - return; - } - - node = node.return; - - if (node.tag === HostPortal) { - // When we go out of the portal, we need to restore the parent. - // Since we don't keep a stack of them, we will search for it. - currentParentIsValid = false; - } - } - - node.sibling.return = node.return; - node = node.sibling; - } - } - - function commitDeletion(finishedRoot, current, renderPriorityLevel) { - { - // Recursively delete all host nodes from the parent. - // Detach refs and call componentWillUnmount() on the whole subtree. - unmountHostComponents(finishedRoot, current); - } - - var alternate = current.alternate; - detachFiberMutation(current); - - if (alternate !== null) { - detachFiberMutation(alternate); - } - } - - function commitWork(current, finishedWork) { - - switch (finishedWork.tag) { - case FunctionComponent: - case ForwardRef: - case MemoComponent: - case SimpleMemoComponent: - case Block: - { - // Layout effects are destroyed during the mutation phase so that all - // destroy functions for all fibers are called before any create functions. - // This prevents sibling component effects from interfering with each other, - // e.g. a destroy function in one component should never override a ref set - // by a create function in another component during the same commit. - { - commitHookEffectListUnmount(Layout | HasEffect, finishedWork); - } - - return; - } - - case ClassComponent: - { - return; - } - - case HostComponent: - { - var instance = finishedWork.stateNode; - - if (instance != null) { - // Commit the work prepared earlier. - var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps - // as the newProps. The updatePayload will contain the real change in - // this case. - - var oldProps = current !== null ? current.memoizedProps : newProps; - var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components. - - var updatePayload = finishedWork.updateQueue; - finishedWork.updateQueue = null; - - if (updatePayload !== null) { - commitUpdate(instance, updatePayload, type, oldProps, newProps); - } - } - - return; - } - - case HostText: - { - if (!(finishedWork.stateNode !== null)) { - { - throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." ); - } - } - - var textInstance = finishedWork.stateNode; - var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps - // as the newProps. The updatePayload will contain the real change in - // this case. - - var oldText = current !== null ? current.memoizedProps : newText; - commitTextUpdate(textInstance, oldText, newText); - return; - } - - case HostRoot: - { - { - var _root = finishedWork.stateNode; - - if (_root.hydrate) { - // We've just hydrated. No need to hydrate again. - _root.hydrate = false; - commitHydratedContainer(_root.containerInfo); - } - } - - return; - } - - case Profiler: - { - return; - } - - case SuspenseComponent: - { - commitSuspenseComponent(finishedWork); - attachSuspenseRetryListeners(finishedWork); - return; - } - - case SuspenseListComponent: - { - attachSuspenseRetryListeners(finishedWork); - return; - } - - case IncompleteClassComponent: - { - return; - } - - case FundamentalComponent: - { - - break; - } - - case ScopeComponent: - { - - break; - } - - case OffscreenComponent: - case LegacyHiddenComponent: - { - var newState = finishedWork.memoizedState; - var isHidden = newState !== null; - hideOrUnhideAllChildren(finishedWork, isHidden); - return; - } - } - - { - { - throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - - function commitSuspenseComponent(finishedWork) { - var newState = finishedWork.memoizedState; - - if (newState !== null) { - markCommitTimeOfFallback(); - - { - // Hide the Offscreen component that contains the primary children. TODO: - // Ideally, this effect would have been scheduled on the Offscreen fiber - // itself. That's how unhiding works: the Offscreen component schedules an - // effect on itself. However, in this case, the component didn't complete, - // so the fiber was never added to the effect list in the normal path. We - // could have appended it to the effect list in the Suspense component's - // second pass, but doing it this way is less complicated. This would be - // simpler if we got rid of the effect list and traversed the tree, like - // we're planning to do. - var primaryChildParent = finishedWork.child; - hideOrUnhideAllChildren(primaryChildParent, true); - } - } - } - - function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) { - - var newState = finishedWork.memoizedState; - - if (newState === null) { - var current = finishedWork.alternate; - - if (current !== null) { - var prevState = current.memoizedState; - - if (prevState !== null) { - var suspenseInstance = prevState.dehydrated; - - if (suspenseInstance !== null) { - commitHydratedSuspenseInstance(suspenseInstance); - } - } - } - } - } - - function attachSuspenseRetryListeners(finishedWork) { - // If this boundary just timed out, then it will have a set of wakeables. - // For each wakeable, attach a listener so that when it resolves, React - // attempts to re-render the boundary in the primary (pre-timeout) state. - var wakeables = finishedWork.updateQueue; - - if (wakeables !== null) { - finishedWork.updateQueue = null; - var retryCache = finishedWork.stateNode; - - if (retryCache === null) { - retryCache = finishedWork.stateNode = new PossiblyWeakSet(); - } - - wakeables.forEach(function (wakeable) { - // Memoize using the boundary fiber to prevent redundant listeners. - var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable); - - if (!retryCache.has(wakeable)) { - { - if (wakeable.__reactDoNotTraceInteractions !== true) { - retry = unstable_wrap(retry); - } - } - - retryCache.add(wakeable); - wakeable.then(retry, retry); - } - }); - } - } // This function detects when a Suspense boundary goes from visible to hidden. - // It returns false if the boundary is already hidden. - // TODO: Use an effect tag. - - - function isSuspenseBoundaryBeingHidden(current, finishedWork) { - if (current !== null) { - var oldState = current.memoizedState; - - if (oldState === null || oldState.dehydrated !== null) { - var newState = finishedWork.memoizedState; - return newState !== null && newState.dehydrated === null; - } - } - - return false; - } - - function commitResetTextContent(current) { - - resetTextContent(current.stateNode); - } - - var COMPONENT_TYPE = 0; - var HAS_PSEUDO_CLASS_TYPE = 1; - var ROLE_TYPE = 2; - var TEST_NAME_TYPE = 3; - var TEXT_TYPE = 4; - - if (typeof Symbol === 'function' && Symbol.for) { - var symbolFor$1 = Symbol.for; - COMPONENT_TYPE = symbolFor$1('selector.component'); - HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class'); - ROLE_TYPE = symbolFor$1('selector.role'); - TEST_NAME_TYPE = symbolFor$1('selector.test_id'); - TEXT_TYPE = symbolFor$1('selector.text'); - } - var commitHooks = []; - function onCommitRoot$1() { - { - commitHooks.forEach(function (commitHook) { - return commitHook(); - }); - } - } - - var ceil = Math.ceil; - var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, - ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner, - IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; - var NoContext = - /* */ - 0; - var BatchedContext = - /* */ - 1; - var EventContext = - /* */ - 2; - var DiscreteEventContext = - /* */ - 4; - var LegacyUnbatchedContext = - /* */ - 8; - var RenderContext = - /* */ - 16; - var CommitContext = - /* */ - 32; - var RetryAfterError = - /* */ - 64; - var RootIncomplete = 0; - var RootFatalErrored = 1; - var RootErrored = 2; - var RootSuspended = 3; - var RootSuspendedWithDelay = 4; - var RootCompleted = 5; // Describes where we are in the React execution stack - - var executionContext = NoContext; // The root we're working on - - var workInProgressRoot = null; // The fiber we're working on - - var workInProgress = null; // The lanes we're rendering - - var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree - // This is a superset of the lanes we started working on at the root. The only - // case where it's different from `workInProgressRootRenderLanes` is when we - // enter a subtree that is hidden and needs to be unhidden: Suspense and - // Offscreen component. - // - // Most things in the work loop should deal with workInProgressRootRenderLanes. - // Most things in begin/complete phases should deal with subtreeRenderLanes. - - var subtreeRenderLanes = NoLanes; - var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc. - - var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown - - var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's - // slightly different than `renderLanes` because `renderLanes` can change as you - // enter and exit an Offscreen tree. This value is the combination of all render - // lanes for the entire render phase. - - var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only - // includes unprocessed updates, not work in bailed out children. - - var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render. - - var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render. - - var workInProgressRootPingedLanes = NoLanes; - var mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train - // model where we don't commit new loading states in too quick succession. - - var globalMostRecentFallbackTime = 0; - var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering - // more and prefer CPU suspense heuristics instead. - - var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU - // suspense heuristics and opt out of rendering more content. - - var RENDER_TIMEOUT_MS = 500; - - function resetRenderTimer() { - workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS; - } - - function getRenderTargetTime() { - return workInProgressRootRenderTargetTime; - } - var nextEffect = null; - var hasUncaughtError = false; - var firstUncaughtError = null; - var legacyErrorBoundariesThatAlreadyFailed = null; - var rootDoesHavePassiveEffects = false; - var rootWithPendingPassiveEffects = null; - var pendingPassiveEffectsRenderPriority = NoPriority$1; - var pendingPassiveEffectsLanes = NoLanes; - var pendingPassiveHookEffectsMount = []; - var pendingPassiveHookEffectsUnmount = []; - var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates - - var NESTED_UPDATE_LIMIT = 50; - var nestedUpdateCount = 0; - var rootWithNestedUpdates = null; - var NESTED_PASSIVE_UPDATE_LIMIT = 50; - var nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes - // during the commit phase. This enables them to be traced across components - // that spawn new work during render. E.g. hidden boundaries, suspended SSR - // hydration or SuspenseList. - // TODO: Can use a bitmask instead of an array - - var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their - // event times as simultaneous, even if the actual clock time has advanced - // between the first and second call. - - var currentEventTime = NoTimestamp; - var currentEventWipLanes = NoLanes; - var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed. - // We warn about state updates for unmounted components differently in this case. - - var isFlushingPassiveEffects = false; - var focusedInstanceHandle = null; - var shouldFireAfterActiveInstanceBlur = false; - function getWorkInProgressRoot() { - return workInProgressRoot; - } - function requestEventTime() { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { - // We're inside React, so it's fine to read the actual time. - return now(); - } // We're not inside React, so we may be in the middle of a browser event. - - - if (currentEventTime !== NoTimestamp) { - // Use the same start time for all updates until we enter React again. - return currentEventTime; - } // This is the first update since React yielded. Compute a new start time. - - - currentEventTime = now(); - return currentEventTime; - } - function requestUpdateLane(fiber) { - // Special cases - var mode = fiber.mode; - - if ((mode & BlockingMode) === NoMode) { - return SyncLane; - } else if ((mode & ConcurrentMode) === NoMode) { - return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane; - } // The algorithm for assigning an update to a lane should be stable for all - // updates at the same priority within the same event. To do this, the inputs - // to the algorithm must be the same. For example, we use the `renderLanes` - // to avoid choosing a lane that is already in the middle of rendering. - // - // However, the "included" lanes could be mutated in between updates in the - // same event, like if you perform an update inside `flushSync`. Or any other - // code path that might call `prepareFreshStack`. - // - // The trick we use is to cache the first of each of these inputs within an - // event. Then reset the cached values once we can be sure the event is over. - // Our heuristic for that is whenever we enter a concurrent work loop. - // - // We'll do the same for `currentEventPendingLanes` below. - - - if (currentEventWipLanes === NoLanes) { - currentEventWipLanes = workInProgressRootIncludedLanes; - } - - var isTransition = requestCurrentTransition() !== NoTransition; - - if (isTransition) { - if (currentEventPendingLanes !== NoLanes) { - currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes; - } - - return findTransitionLane(currentEventWipLanes, currentEventPendingLanes); - } // TODO: Remove this dependency on the Scheduler priority. - // To do that, we're replacing it with an update lane priority. - - - var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler. - // This couples React to the Scheduler internals, so we're replacing it - // with the currentUpdateLanePriority above. As an example of how this - // could be problematic, if we're not inside `Scheduler.runWithPriority`, - // then we'll get the priority of the current running Scheduler task, - // which is probably not what we want. - - var lane; - - if ( // TODO: Temporary. We're removing the concept of discrete updates. - (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) { - lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes); - } else { - var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority); - - lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes); - } - - return lane; - } - - function requestRetryLane(fiber) { - // This is a fork of `requestUpdateLane` designed specifically for Suspense - // "retries" — a special update that attempts to flip a Suspense boundary - // from its placeholder state to its primary/resolved state. - // Special cases - var mode = fiber.mode; - - if ((mode & BlockingMode) === NoMode) { - return SyncLane; - } else if ((mode & ConcurrentMode) === NoMode) { - return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane; - } // See `requestUpdateLane` for explanation of `currentEventWipLanes` - - - if (currentEventWipLanes === NoLanes) { - currentEventWipLanes = workInProgressRootIncludedLanes; - } - - return findRetryLane(currentEventWipLanes); - } - - function scheduleUpdateOnFiber(fiber, lane, eventTime) { - checkForNestedUpdates(); - warnAboutRenderPhaseUpdatesInDEV(fiber); - var root = markUpdateLaneFromFiberToRoot(fiber, lane); - - if (root === null) { - warnAboutUpdateOnUnmountedFiberInDEV(fiber); - return null; - } // Mark that the root has a pending update. - - - markRootUpdated(root, lane, eventTime); - - if (root === workInProgressRoot) { - // Received an update to a tree that's in the middle of rendering. Mark - // that there was an interleaved update work on this root. Unless the - // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render - // phase update. In that case, we don't treat render phase updates as if - // they were interleaved, for backwards compat reasons. - { - workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane); - } - - if (workInProgressRootExitStatus === RootSuspendedWithDelay) { - // The root already suspended with a delay, which means this render - // definitely won't finish. Since we have a new update, let's mark it as - // suspended now, right before marking the incoming update. This has the - // effect of interrupting the current render and switching to the update. - // TODO: Make sure this doesn't override pings that happen while we've - // already started rendering. - markRootSuspended$1(root, workInProgressRootRenderLanes); - } - } // TODO: requestUpdateLanePriority also reads the priority. Pass the - // priority as an argument to that function and this one. - - - var priorityLevel = getCurrentPriorityLevel(); - - if (lane === SyncLane) { - if ( // Check if we're inside unbatchedUpdates - (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering - (executionContext & (RenderContext | CommitContext)) === NoContext) { - // Register pending interactions on the root to avoid losing traced interaction data. - schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed - // root inside of batchedUpdates should be synchronous, but layout updates - // should be deferred until the end of the batch. - - performSyncWorkOnRoot(root); - } else { - ensureRootIsScheduled(root, eventTime); - schedulePendingInteractions(root, lane); - - if (executionContext === NoContext) { - // Flush the synchronous work now, unless we're already working or inside - // a batch. This is intentionally inside scheduleUpdateOnFiber instead of - // scheduleCallbackForFiber to preserve the ability to schedule a callback - // without immediately flushing it. We only do this for user-initiated - // updates, to preserve historical behavior of legacy mode. - resetRenderTimer(); - flushSyncCallbackQueue(); - } - } - } else { - // Schedule a discrete update but only if it's not Sync. - if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered - // discrete, even inside a discrete event. - priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) { - // This is the result of a discrete event. Track the lowest priority - // discrete update per root so we can flush them early, if needed. - if (rootsWithPendingDiscreteUpdates === null) { - rootsWithPendingDiscreteUpdates = new Set([root]); - } else { - rootsWithPendingDiscreteUpdates.add(root); - } - } // Schedule other updates after in case the callback is sync. - - - ensureRootIsScheduled(root, eventTime); - schedulePendingInteractions(root, lane); - } // We use this when assigning a lane for a transition inside - // `requestUpdateLane`. We assume it's the same as the root being updated, - // since in the common case of a single root app it probably is. If it's not - // the same root, then it's not a huge deal, we just might batch more stuff - // together more than necessary. - - - mostRecentlyUpdatedRoot = root; - } // This is split into a separate function so we can mark a fiber with pending - // work without treating it as a typical update that originates from an event; - // e.g. retrying a Suspense boundary isn't an update, but it does schedule work - // on a fiber. - - function markUpdateLaneFromFiberToRoot(sourceFiber, lane) { - // Update the source fiber's lanes - sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane); - var alternate = sourceFiber.alternate; - - if (alternate !== null) { - alternate.lanes = mergeLanes(alternate.lanes, lane); - } - - { - if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) { - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - } - } // Walk the parent path to the root and update the child expiration time. - - - var node = sourceFiber; - var parent = sourceFiber.return; - - while (parent !== null) { - parent.childLanes = mergeLanes(parent.childLanes, lane); - alternate = parent.alternate; - - if (alternate !== null) { - alternate.childLanes = mergeLanes(alternate.childLanes, lane); - } else { - { - if ((parent.flags & (Placement | Hydrating)) !== NoFlags) { - warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber); - } - } - } - - node = parent; - parent = parent.return; - } - - if (node.tag === HostRoot) { - var root = node.stateNode; - return root; - } else { - return null; - } - } // Use this function to schedule a task for a root. There's only one task per - // root; if a task was already scheduled, we'll check to make sure the priority - // of the existing task is the same as the priority of the next level that the - // root has work on. This function is called on every update, and right before - // exiting a task. - - - function ensureRootIsScheduled(root, currentTime) { - var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as - // expired so we know to work on those next. - - markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority. - - var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call. - - var newCallbackPriority = returnNextLanesPriority(); - - if (nextLanes === NoLanes) { - // Special case: There's nothing to work on. - if (existingCallbackNode !== null) { - cancelCallback(existingCallbackNode); - root.callbackNode = null; - root.callbackPriority = NoLanePriority; - } - - return; - } // Check if there's an existing task. We may be able to reuse it. - - - if (existingCallbackNode !== null) { - var existingCallbackPriority = root.callbackPriority; - - if (existingCallbackPriority === newCallbackPriority) { - // The priority hasn't changed. We can reuse the existing task. Exit. - return; - } // The priority changed. Cancel the existing callback. We'll schedule a new - // one below. - - - cancelCallback(existingCallbackNode); - } // Schedule a new callback. - - - var newCallbackNode; - - if (newCallbackPriority === SyncLanePriority) { - // Special case: Sync React callbacks are scheduled on a special - // internal queue - newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root)); - } else if (newCallbackPriority === SyncBatchedLanePriority) { - newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root)); - } else { - var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority); - newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root)); - } - - root.callbackPriority = newCallbackPriority; - root.callbackNode = newCallbackNode; - } // This is the entry point for every concurrent task, i.e. anything that - // goes through Scheduler. - - - function performConcurrentWorkOnRoot(root) { - // Since we know we're in a React event, we can clear the current - // event time. The next update will compute a new event time. - currentEventTime = NoTimestamp; - currentEventWipLanes = NoLanes; - currentEventPendingLanes = NoLanes; - - if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { - { - throw Error( "Should not already be working." ); - } - } // Flush any pending passive effects before deciding which lanes to work on, - // in case they schedule additional work. - - - var originalCallbackNode = root.callbackNode; - var didFlushPassiveEffects = flushPassiveEffects(); - - if (didFlushPassiveEffects) { - // Something in the passive effect phase may have canceled the current task. - // Check if the task node for this root was changed. - if (root.callbackNode !== originalCallbackNode) { - // The current task was canceled. Exit. We don't need to call - // `ensureRootIsScheduled` because the check above implies either that - // there's a new task, or that there's no remaining work on this root. - return null; - } - } // Determine the next expiration time to work on, using the fields stored - // on the root. - - - var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); - - if (lanes === NoLanes) { - // Defensive coding. This is never expected to happen. - return null; - } - - var exitStatus = renderRootConcurrent(root, lanes); - - if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) { - // The render included lanes that were updated during the render phase. - // For example, when unhiding a hidden tree, we include all the lanes - // that were previously skipped when the tree was hidden. That set of - // lanes is a superset of the lanes we started rendering with. - // - // So we'll throw out the current work and restart. - prepareFreshStack(root, NoLanes); - } else if (exitStatus !== RootIncomplete) { - if (exitStatus === RootErrored) { - executionContext |= RetryAfterError; // If an error occurred during hydration, - // discard server response and fall back to client side render. - - if (root.hydrate) { - root.hydrate = false; - clearContainer(root.containerInfo); - } // If something threw an error, try rendering one more time. We'll render - // synchronously to block concurrent data mutations, and we'll includes - // all pending updates are included. If it still fails after the second - // attempt, we'll give up and commit the resulting tree. - - - lanes = getLanesToRetrySynchronouslyOnError(root); - - if (lanes !== NoLanes) { - exitStatus = renderRootSync(root, lanes); - } - } - - if (exitStatus === RootFatalErrored) { - var fatalError = workInProgressRootFatalError; - prepareFreshStack(root, NoLanes); - markRootSuspended$1(root, lanes); - ensureRootIsScheduled(root, now()); - throw fatalError; - } // We now have a consistent tree. The next step is either to commit it, - // or, if something suspended, wait to commit it after a timeout. - - - var finishedWork = root.current.alternate; - root.finishedWork = finishedWork; - root.finishedLanes = lanes; - finishConcurrentRender(root, exitStatus, lanes); - } - - ensureRootIsScheduled(root, now()); - - if (root.callbackNode === originalCallbackNode) { - // The task node scheduled for this root is the same one that's - // currently executed. Need to return a continuation. - return performConcurrentWorkOnRoot.bind(null, root); - } - - return null; - } - - function finishConcurrentRender(root, exitStatus, lanes) { - switch (exitStatus) { - case RootIncomplete: - case RootFatalErrored: - { - { - { - throw Error( "Root did not complete. This is a bug in React." ); - } - } - } - // Flow knows about invariant, so it complains if I add a break - // statement, but eslint doesn't know about invariant, so it complains - // if I do. eslint-disable-next-line no-fallthrough - - case RootErrored: - { - // We should have already attempted to retry this tree. If we reached - // this point, it errored again. Commit it. - commitRoot(root); - break; - } - - case RootSuspended: - { - markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we - // should immediately commit it or wait a bit. - - if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope - !shouldForceFlushFallbacksInDEV()) { - // This render only included retries, no updates. Throttle committing - // retries so that we don't show too many loading states too quickly. - var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time. - - if (msUntilTimeout > 10) { - var nextLanes = getNextLanes(root, NoLanes); - - if (nextLanes !== NoLanes) { - // There's additional work on this root. - break; - } - - var suspendedLanes = root.suspendedLanes; - - if (!isSubsetOfLanes(suspendedLanes, lanes)) { - // We should prefer to render the fallback of at the last - // suspended level. Ping the last suspended level to try - // rendering it again. - // FIXME: What if the suspended lanes are Idle? Should not restart. - var eventTime = requestEventTime(); - markRootPinged(root, suspendedLanes); - break; - } // The render is suspended, it hasn't timed out, and there's no - // lower priority work to do. Instead of committing the fallback - // immediately, wait for more data to arrive. - - - root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout); - break; - } - } // The work expired. Commit immediately. - - - commitRoot(root); - break; - } - - case RootSuspendedWithDelay: - { - markRootSuspended$1(root, lanes); - - if (includesOnlyTransitions(lanes)) { - // This is a transition, so we should exit without committing a - // placeholder and without scheduling a timeout. Delay indefinitely - // until we receive more data. - break; - } - - if (!shouldForceFlushFallbacksInDEV()) { - // This is not a transition, but we did trigger an avoided state. - // Schedule a placeholder to display after a short delay, using the Just - // Noticeable Difference. - // TODO: Is the JND optimization worth the added complexity? If this is - // the only reason we track the event time, then probably not. - // Consider removing. - var mostRecentEventTime = getMostRecentEventTime(root, lanes); - var eventTimeMs = mostRecentEventTime; - var timeElapsedMs = now() - eventTimeMs; - - var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time. - - - if (_msUntilTimeout > 10) { - // Instead of committing the fallback immediately, wait for more data - // to arrive. - root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout); - break; - } - } // Commit the placeholder. - - - commitRoot(root); - break; - } - - case RootCompleted: - { - // The work completed. Ready to commit. - commitRoot(root); - break; - } - - default: - { - { - { - throw Error( "Unknown root exit status." ); - } - } - } - } - } - - function markRootSuspended$1(root, suspendedLanes) { - // When suspending, we should always exclude lanes that were pinged or (more - // rarely, since we try to avoid it) updated during the render phase. - // TODO: Lol maybe there's a better way to factor this besides this - // obnoxiously named function :) - suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes); - suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes); - markRootSuspended(root, suspendedLanes); - } // This is the entry point for synchronous tasks that don't go - // through Scheduler - - - function performSyncWorkOnRoot(root) { - if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { - { - throw Error( "Should not already be working." ); - } - } - - flushPassiveEffects(); - var lanes; - var exitStatus; - - if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) { - // There's a partial tree, and at least one of its lanes has expired. Finish - // rendering it before rendering the rest of the expired work. - lanes = workInProgressRootRenderLanes; - exitStatus = renderRootSync(root, lanes); - - if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) { - // The render included lanes that were updated during the render phase. - // For example, when unhiding a hidden tree, we include all the lanes - // that were previously skipped when the tree was hidden. That set of - // lanes is a superset of the lanes we started rendering with. - // - // Note that this only happens when part of the tree is rendered - // concurrently. If the whole tree is rendered synchronously, then there - // are no interleaved events. - lanes = getNextLanes(root, lanes); - exitStatus = renderRootSync(root, lanes); - } - } else { - lanes = getNextLanes(root, NoLanes); - exitStatus = renderRootSync(root, lanes); - } - - if (root.tag !== LegacyRoot && exitStatus === RootErrored) { - executionContext |= RetryAfterError; // If an error occurred during hydration, - // discard server response and fall back to client side render. - - if (root.hydrate) { - root.hydrate = false; - clearContainer(root.containerInfo); - } // If something threw an error, try rendering one more time. We'll render - // synchronously to block concurrent data mutations, and we'll includes - // all pending updates are included. If it still fails after the second - // attempt, we'll give up and commit the resulting tree. - - - lanes = getLanesToRetrySynchronouslyOnError(root); - - if (lanes !== NoLanes) { - exitStatus = renderRootSync(root, lanes); - } - } - - if (exitStatus === RootFatalErrored) { - var fatalError = workInProgressRootFatalError; - prepareFreshStack(root, NoLanes); - markRootSuspended$1(root, lanes); - ensureRootIsScheduled(root, now()); - throw fatalError; - } // We now have a consistent tree. Because this is a sync render, we - // will commit it even if something suspended. - - - var finishedWork = root.current.alternate; - root.finishedWork = finishedWork; - root.finishedLanes = lanes; - commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next - // pending level. - - ensureRootIsScheduled(root, now()); - return null; - } - function flushDiscreteUpdates() { - // TODO: Should be able to flush inside batchedUpdates, but not inside `act`. - // However, `act` uses `batchedUpdates`, so there's no way to distinguish - // those two cases. Need to fix this before exposing flushDiscreteUpdates - // as a public API. - if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) { - { - if ((executionContext & RenderContext) !== NoContext) { - error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.'); - } - } // We're already rendering, so we can't synchronously flush pending work. - // This is probably a nested event dispatch triggered by a lifecycle/effect, - // like `el.focus()`. Exit. - - - return; - } - - flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that - // they fire before the next serial event. - - flushPassiveEffects(); - } - - function flushPendingDiscreteUpdates() { - if (rootsWithPendingDiscreteUpdates !== null) { - // For each root with pending discrete updates, schedule a callback to - // immediately flush them. - var roots = rootsWithPendingDiscreteUpdates; - rootsWithPendingDiscreteUpdates = null; - roots.forEach(function (root) { - markDiscreteUpdatesExpired(root); - ensureRootIsScheduled(root, now()); - }); - } // Now flush the immediate queue. - - - flushSyncCallbackQueue(); - } - - function batchedUpdates$1(fn, a) { - var prevExecutionContext = executionContext; - executionContext |= BatchedContext; - - try { - return fn(a); - } finally { - executionContext = prevExecutionContext; - - if (executionContext === NoContext) { - // Flush the immediate callbacks that were scheduled during this batch - resetRenderTimer(); - flushSyncCallbackQueue(); - } - } - } - function batchedEventUpdates$1(fn, a) { - var prevExecutionContext = executionContext; - executionContext |= EventContext; - - try { - return fn(a); - } finally { - executionContext = prevExecutionContext; - - if (executionContext === NoContext) { - // Flush the immediate callbacks that were scheduled during this batch - resetRenderTimer(); - flushSyncCallbackQueue(); - } - } - } - function discreteUpdates$1(fn, a, b, c, d) { - var prevExecutionContext = executionContext; - executionContext |= DiscreteEventContext; - - { - try { - return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d)); - } finally { - executionContext = prevExecutionContext; - - if (executionContext === NoContext) { - // Flush the immediate callbacks that were scheduled during this batch - resetRenderTimer(); - flushSyncCallbackQueue(); - } - } - } - } - function unbatchedUpdates(fn, a) { - var prevExecutionContext = executionContext; - executionContext &= ~BatchedContext; - executionContext |= LegacyUnbatchedContext; - - try { - return fn(a); - } finally { - executionContext = prevExecutionContext; - - if (executionContext === NoContext) { - // Flush the immediate callbacks that were scheduled during this batch - resetRenderTimer(); - flushSyncCallbackQueue(); - } - } - } - function flushSync(fn, a) { - var prevExecutionContext = executionContext; - - if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) { - { - error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.'); - } - - return fn(a); - } - - executionContext |= BatchedContext; - - { - try { - if (fn) { - return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a)); - } else { - return undefined; - } - } finally { - executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch. - // Note that this will happen even if batchedUpdates is higher up - // the stack. - - flushSyncCallbackQueue(); - } - } - } - function pushRenderLanes(fiber, lanes) { - push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber); - subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes); - workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes); - } - function popRenderLanes(fiber) { - subtreeRenderLanes = subtreeRenderLanesCursor.current; - pop(subtreeRenderLanesCursor, fiber); - } - - function prepareFreshStack(root, lanes) { - root.finishedWork = null; - root.finishedLanes = NoLanes; - var timeoutHandle = root.timeoutHandle; - - if (timeoutHandle !== noTimeout) { - // The root previous suspended and scheduled a timeout to commit a fallback - // state. Now that we have additional work, cancel the timeout. - root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above - - cancelTimeout(timeoutHandle); - } - - if (workInProgress !== null) { - var interruptedWork = workInProgress.return; - - while (interruptedWork !== null) { - unwindInterruptedWork(interruptedWork); - interruptedWork = interruptedWork.return; - } - } - - workInProgressRoot = root; - workInProgress = createWorkInProgress(root.current, null); - workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes; - workInProgressRootExitStatus = RootIncomplete; - workInProgressRootFatalError = null; - workInProgressRootSkippedLanes = NoLanes; - workInProgressRootUpdatedLanes = NoLanes; - workInProgressRootPingedLanes = NoLanes; - - { - spawnedWorkDuringRender = null; - } - - { - ReactStrictModeWarnings.discardPendingWarnings(); - } - } - - function handleError(root, thrownValue) { - do { - var erroredWork = workInProgress; - - try { - // Reset module-level state that was set during the render phase. - resetContextDependencies(); - resetHooksAfterThrow(); - resetCurrentFiber(); // TODO: I found and added this missing line while investigating a - // separate issue. Write a regression test using string refs. - - ReactCurrentOwner$2.current = null; - - if (erroredWork === null || erroredWork.return === null) { - // Expected to be working on a non-root fiber. This is a fatal error - // because there's no ancestor that can handle it; the root is - // supposed to capture all errors that weren't caught by an error - // boundary. - workInProgressRootExitStatus = RootFatalErrored; - workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next - // sibling, or the parent if there are no siblings. But since the root - // has no siblings nor a parent, we set it to null. Usually this is - // handled by `completeUnitOfWork` or `unwindWork`, but since we're - // intentionally not calling those, we need set it here. - // TODO: Consider calling `unwindWork` to pop the contexts. - - workInProgress = null; - return; - } - - if (enableProfilerTimer && erroredWork.mode & ProfileMode) { - // Record the time spent rendering before an error was thrown. This - // avoids inaccurate Profiler durations in the case of a - // suspended render. - stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true); - } - - throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes); - completeUnitOfWork(erroredWork); - } catch (yetAnotherThrownValue) { - // Something in the return path also threw. - thrownValue = yetAnotherThrownValue; - - if (workInProgress === erroredWork && erroredWork !== null) { - // If this boundary has already errored, then we had trouble processing - // the error. Bubble it to the next boundary. - erroredWork = erroredWork.return; - workInProgress = erroredWork; - } else { - erroredWork = workInProgress; - } - - continue; - } // Return to the normal work loop. - - - return; - } while (true); - } - - function pushDispatcher() { - var prevDispatcher = ReactCurrentDispatcher$2.current; - ReactCurrentDispatcher$2.current = ContextOnlyDispatcher; - - if (prevDispatcher === null) { - // The React isomorphic package does not include a default dispatcher. - // Instead the first renderer will lazily attach one, in order to give - // nicer error messages. - return ContextOnlyDispatcher; - } else { - return prevDispatcher; - } - } - - function popDispatcher(prevDispatcher) { - ReactCurrentDispatcher$2.current = prevDispatcher; - } - - function pushInteractions(root) { - { - var prevInteractions = __interactionsRef.current; - __interactionsRef.current = root.memoizedInteractions; - return prevInteractions; - } - } - - function popInteractions(prevInteractions) { - { - __interactionsRef.current = prevInteractions; - } - } - - function markCommitTimeOfFallback() { - globalMostRecentFallbackTime = now(); - } - function markSkippedUpdateLanes(lane) { - workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes); - } - function renderDidSuspend() { - if (workInProgressRootExitStatus === RootIncomplete) { - workInProgressRootExitStatus = RootSuspended; - } - } - function renderDidSuspendDelayIfPossible() { - if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) { - workInProgressRootExitStatus = RootSuspendedWithDelay; - } // Check if there are updates that we skipped tree that might have unblocked - // this render. - - - if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) { - // Mark the current render as suspended so that we switch to working on - // the updates that were skipped. Usually we only suspend at the end of - // the render phase. - // TODO: We should probably always mark the root as suspended immediately - // (inside this function), since by suspending at the end of the render - // phase introduces a potential mistake where we suspend lanes that were - // pinged or updated while we were rendering. - markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes); - } - } - function renderDidError() { - if (workInProgressRootExitStatus !== RootCompleted) { - workInProgressRootExitStatus = RootErrored; - } - } // Called during render to determine if anything has suspended. - // Returns false if we're not sure. - - function renderHasNotSuspendedYet() { - // If something errored or completed, we can't really be sure, - // so those are false. - return workInProgressRootExitStatus === RootIncomplete; - } - - function renderRootSync(root, lanes) { - var prevExecutionContext = executionContext; - executionContext |= RenderContext; - var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack - // and prepare a fresh one. Otherwise we'll continue where we left off. - - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) { - prepareFreshStack(root, lanes); - startWorkOnPendingInteractions(root, lanes); - } - - var prevInteractions = pushInteractions(root); - - do { - try { - workLoopSync(); - break; - } catch (thrownValue) { - handleError(root, thrownValue); - } - } while (true); - - resetContextDependencies(); - - { - popInteractions(prevInteractions); - } - - executionContext = prevExecutionContext; - popDispatcher(prevDispatcher); - - if (workInProgress !== null) { - // This is a sync render, so we should have finished the whole tree. - { - { - throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." ); - } - } - } - - - workInProgressRoot = null; - workInProgressRootRenderLanes = NoLanes; - return workInProgressRootExitStatus; - } // The work loop is an extremely hot path. Tell Closure not to inline it. - - /** @noinline */ - - - function workLoopSync() { - // Already timed out, so perform work without checking if we need to yield. - while (workInProgress !== null) { - performUnitOfWork(workInProgress); - } - } - - function renderRootConcurrent(root, lanes) { - var prevExecutionContext = executionContext; - executionContext |= RenderContext; - var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack - // and prepare a fresh one. Otherwise we'll continue where we left off. - - if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) { - resetRenderTimer(); - prepareFreshStack(root, lanes); - startWorkOnPendingInteractions(root, lanes); - } - - var prevInteractions = pushInteractions(root); - - do { - try { - workLoopConcurrent(); - break; - } catch (thrownValue) { - handleError(root, thrownValue); - } - } while (true); - - resetContextDependencies(); - - { - popInteractions(prevInteractions); - } - - popDispatcher(prevDispatcher); - executionContext = prevExecutionContext; - - - if (workInProgress !== null) { - - return RootIncomplete; - } else { - - - workInProgressRoot = null; - workInProgressRootRenderLanes = NoLanes; // Return the final exit status. - - return workInProgressRootExitStatus; - } - } - /** @noinline */ - - - function workLoopConcurrent() { - // Perform work until Scheduler asks us to yield - while (workInProgress !== null && !shouldYield()) { - performUnitOfWork(workInProgress); - } - } - - function performUnitOfWork(unitOfWork) { - // The current, flushed, state of this fiber is the alternate. Ideally - // nothing should rely on this, but relying on it here means that we don't - // need an additional field on the work in progress. - var current = unitOfWork.alternate; - setCurrentFiber(unitOfWork); - var next; - - if ( (unitOfWork.mode & ProfileMode) !== NoMode) { - startProfilerTimer(unitOfWork); - next = beginWork$1(current, unitOfWork, subtreeRenderLanes); - stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true); - } else { - next = beginWork$1(current, unitOfWork, subtreeRenderLanes); - } - - resetCurrentFiber(); - unitOfWork.memoizedProps = unitOfWork.pendingProps; - - if (next === null) { - // If this doesn't spawn new work, complete the current work. - completeUnitOfWork(unitOfWork); - } else { - workInProgress = next; - } - - ReactCurrentOwner$2.current = null; - } - - function completeUnitOfWork(unitOfWork) { - // Attempt to complete the current unit of work, then move to the next - // sibling. If there are no more siblings, return to the parent fiber. - var completedWork = unitOfWork; - - do { - // The current, flushed, state of this fiber is the alternate. Ideally - // nothing should rely on this, but relying on it here means that we don't - // need an additional field on the work in progress. - var current = completedWork.alternate; - var returnFiber = completedWork.return; // Check if the work completed or if something threw. - - if ((completedWork.flags & Incomplete) === NoFlags) { - setCurrentFiber(completedWork); - var next = void 0; - - if ( (completedWork.mode & ProfileMode) === NoMode) { - next = completeWork(current, completedWork, subtreeRenderLanes); - } else { - startProfilerTimer(completedWork); - next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error. - - stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); - } - - resetCurrentFiber(); - - if (next !== null) { - // Completing this fiber spawned new work. Work on that next. - workInProgress = next; - return; - } - - resetChildLanes(completedWork); - - if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete - (returnFiber.flags & Incomplete) === NoFlags) { - // Append all the effects of the subtree and this fiber onto the effect - // list of the parent. The completion order of the children affects the - // side-effect order. - if (returnFiber.firstEffect === null) { - returnFiber.firstEffect = completedWork.firstEffect; - } - - if (completedWork.lastEffect !== null) { - if (returnFiber.lastEffect !== null) { - returnFiber.lastEffect.nextEffect = completedWork.firstEffect; - } - - returnFiber.lastEffect = completedWork.lastEffect; - } // If this fiber had side-effects, we append it AFTER the children's - // side-effects. We can perform certain side-effects earlier if needed, - // by doing multiple passes over the effect list. We don't want to - // schedule our own side-effect on our own list because if end up - // reusing children we'll schedule this effect onto itself since we're - // at the end. - - - var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect - // list. PerformedWork effect is read by React DevTools but shouldn't be - // committed. - - if (flags > PerformedWork) { - if (returnFiber.lastEffect !== null) { - returnFiber.lastEffect.nextEffect = completedWork; - } else { - returnFiber.firstEffect = completedWork; - } - - returnFiber.lastEffect = completedWork; - } - } - } else { - // This fiber did not complete because something threw. Pop values off - // the stack without entering the complete phase. If this is a boundary, - // capture values if possible. - var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time. - - - if (_next !== null) { - // If completing this work spawned new work, do that next. We'll come - // back here again. - // Since we're restarting, remove anything that is not a host effect - // from the effect tag. - _next.flags &= HostEffectMask; - workInProgress = _next; - return; - } - - if ( (completedWork.mode & ProfileMode) !== NoMode) { - // Record the render duration for the fiber that errored. - stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing. - - var actualDuration = completedWork.actualDuration; - var child = completedWork.child; - - while (child !== null) { - actualDuration += child.actualDuration; - child = child.sibling; - } - - completedWork.actualDuration = actualDuration; - } - - if (returnFiber !== null) { - // Mark the parent fiber as incomplete and clear its effect list. - returnFiber.firstEffect = returnFiber.lastEffect = null; - returnFiber.flags |= Incomplete; - } - } - - var siblingFiber = completedWork.sibling; - - if (siblingFiber !== null) { - // If there is more work to do in this returnFiber, do that next. - workInProgress = siblingFiber; - return; - } // Otherwise, return to the parent - - - completedWork = returnFiber; // Update the next thing we're working on in case something throws. - - workInProgress = completedWork; - } while (completedWork !== null); // We've reached the root. - - - if (workInProgressRootExitStatus === RootIncomplete) { - workInProgressRootExitStatus = RootCompleted; - } - } - - function resetChildLanes(completedWork) { - if ( // TODO: Move this check out of the hot path by moving `resetChildLanes` - // to switch statement in `completeWork`. - (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) { - // The children of this component are hidden. Don't bubble their - // expiration times. - return; - } - - var newChildLanes = NoLanes; // Bubble up the earliest expiration time. - - if ( (completedWork.mode & ProfileMode) !== NoMode) { - // In profiling mode, resetChildExpirationTime is also used to reset - // profiler durations. - var actualDuration = completedWork.actualDuration; - var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will - // only be updated if work is done on the fiber (i.e. it doesn't bailout). - // When work is done, it should bubble to the parent's actualDuration. If - // the fiber has not been cloned though, (meaning no work was done), then - // this value will reflect the amount of time spent working on a previous - // render. In that case it should not bubble. We determine whether it was - // cloned by comparing the child pointer. - - var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child; - var child = completedWork.child; - - while (child !== null) { - newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes)); - - if (shouldBubbleActualDurations) { - actualDuration += child.actualDuration; - } - - treeBaseDuration += child.treeBaseDuration; - child = child.sibling; - } - - var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null; - - if (isTimedOutSuspense) { - // Don't count time spent in a timed out Suspense subtree as part of the base duration. - var primaryChildFragment = completedWork.child; - - if (primaryChildFragment !== null) { - treeBaseDuration -= primaryChildFragment.treeBaseDuration; - } - } - - completedWork.actualDuration = actualDuration; - completedWork.treeBaseDuration = treeBaseDuration; - } else { - var _child = completedWork.child; - - while (_child !== null) { - newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes)); - _child = _child.sibling; - } - } - - completedWork.childLanes = newChildLanes; - } - - function commitRoot(root) { - var renderPriorityLevel = getCurrentPriorityLevel(); - runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel)); - return null; - } - - function commitRootImpl(root, renderPriorityLevel) { - do { - // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which - // means `flushPassiveEffects` will sometimes result in additional - // passive effects. So we need to keep flushing in a loop until there are - // no more pending effects. - // TODO: Might be better if `flushPassiveEffects` did not automatically - // flush synchronous work at the end, to avoid factoring hazards like this. - flushPassiveEffects(); - } while (rootWithPendingPassiveEffects !== null); - - flushRenderPhaseStrictModeWarningsInDEV(); - - if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { - { - throw Error( "Should not already be working." ); - } - } - - var finishedWork = root.finishedWork; - var lanes = root.finishedLanes; - - if (finishedWork === null) { - - return null; - } - - root.finishedWork = null; - root.finishedLanes = NoLanes; - - if (!(finishedWork !== root.current)) { - { - throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." ); - } - } // commitRoot never returns a continuation; it always finishes synchronously. - // So we can clear these now to allow a new callback to be scheduled. - - - root.callbackNode = null; // Update the first and last pending times on this root. The new first - // pending time is whatever is left on the root fiber. - - var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes); - markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of - // `flushDiscreteUpdates` starts a useless render pass which may cancels - // a scheduled timeout. - - if (rootsWithPendingDiscreteUpdates !== null) { - if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) { - rootsWithPendingDiscreteUpdates.delete(root); - } - } - - if (root === workInProgressRoot) { - // We can reset these now that they are finished. - workInProgressRoot = null; - workInProgress = null; - workInProgressRootRenderLanes = NoLanes; - } // Get the list of effects. - - - var firstEffect; - - if (finishedWork.flags > PerformedWork) { - // A fiber's effect list consists only of its children, not itself. So if - // the root has an effect, we need to add it to the end of the list. The - // resulting list is the set that would belong to the root's parent, if it - // had one; that is, all the effects in the tree including the root. - if (finishedWork.lastEffect !== null) { - finishedWork.lastEffect.nextEffect = finishedWork; - firstEffect = finishedWork.firstEffect; - } else { - firstEffect = finishedWork; - } - } else { - // There is no effect on the root. - firstEffect = finishedWork.firstEffect; - } - - if (firstEffect !== null) { - - var prevExecutionContext = executionContext; - executionContext |= CommitContext; - var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles - - ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass - // of the effect list for each phase: all mutation effects come before all - // layout effects, and so on. - // The first phase a "before mutation" phase. We use this phase to read the - // state of the host tree right before we mutate it. This is where - // getSnapshotBeforeUpdate is called. - - focusedInstanceHandle = prepareForCommit(root.containerInfo); - shouldFireAfterActiveInstanceBlur = false; - nextEffect = firstEffect; - - do { - { - invokeGuardedCallback(null, commitBeforeMutationEffects, null); - - if (hasCaughtError()) { - if (!(nextEffect !== null)) { - { - throw Error( "Should be working on an effect." ); - } - } - - var error = clearCaughtError(); - captureCommitPhaseError(nextEffect, error); - nextEffect = nextEffect.nextEffect; - } - } - } while (nextEffect !== null); // We no longer need to track the active instance fiber - - - focusedInstanceHandle = null; - - { - // Mark the current commit time to be shared by all Profilers in this - // batch. This enables them to be grouped later. - recordCommitTime(); - } // The next phase is the mutation phase, where we mutate the host tree. - - - nextEffect = firstEffect; - - do { - { - invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel); - - if (hasCaughtError()) { - if (!(nextEffect !== null)) { - { - throw Error( "Should be working on an effect." ); - } - } - - var _error = clearCaughtError(); - - captureCommitPhaseError(nextEffect, _error); - nextEffect = nextEffect.nextEffect; - } - } - } while (nextEffect !== null); - - resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after - // the mutation phase, so that the previous tree is still current during - // componentWillUnmount, but before the layout phase, so that the finished - // work is current during componentDidMount/Update. - - root.current = finishedWork; // The next phase is the layout phase, where we call effects that read - // the host tree after it's been mutated. The idiomatic use case for this is - // layout, but class component lifecycles also fire here for legacy reasons. - - nextEffect = firstEffect; - - do { - { - invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes); - - if (hasCaughtError()) { - if (!(nextEffect !== null)) { - { - throw Error( "Should be working on an effect." ); - } - } - - var _error2 = clearCaughtError(); - - captureCommitPhaseError(nextEffect, _error2); - nextEffect = nextEffect.nextEffect; - } - } - } while (nextEffect !== null); - - nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an - // opportunity to paint. - - requestPaint(); - - { - popInteractions(prevInteractions); - } - - executionContext = prevExecutionContext; - } else { - // No effects. - root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were - // no effects. - // TODO: Maybe there's a better way to report this. - - { - recordCommitTime(); - } - } - - var rootDidHavePassiveEffects = rootDoesHavePassiveEffects; - - if (rootDoesHavePassiveEffects) { - // This commit has passive effects. Stash a reference to them. But don't - // schedule a callback until after flushing layout work. - rootDoesHavePassiveEffects = false; - rootWithPendingPassiveEffects = root; - pendingPassiveEffectsLanes = lanes; - pendingPassiveEffectsRenderPriority = renderPriorityLevel; - } else { - // We are done with the effect chain at this point so let's clear the - // nextEffect pointers to assist with GC. If we have passive effects, we'll - // clear this in flushPassiveEffects. - nextEffect = firstEffect; - - while (nextEffect !== null) { - var nextNextEffect = nextEffect.nextEffect; - nextEffect.nextEffect = null; - - if (nextEffect.flags & Deletion) { - detachFiberAfterEffects(nextEffect); - } - - nextEffect = nextNextEffect; - } - } // Read this again, since an effect might have updated it - - - remainingLanes = root.pendingLanes; // Check if there's remaining work on this root - - if (remainingLanes !== NoLanes) { - { - if (spawnedWorkDuringRender !== null) { - var expirationTimes = spawnedWorkDuringRender; - spawnedWorkDuringRender = null; - - for (var i = 0; i < expirationTimes.length; i++) { - scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions); - } - } - - schedulePendingInteractions(root, remainingLanes); - } - } else { - // If there's no remaining work, we can clear the set of already failed - // error boundaries. - legacyErrorBoundariesThatAlreadyFailed = null; - } - - { - if (!rootDidHavePassiveEffects) { - // If there are no passive effects, then we can complete the pending interactions. - // Otherwise, we'll wait until after the passive effects are flushed. - // Wait to do this until after remaining work has been scheduled, - // so that we don't prematurely signal complete for interactions when there's e.g. hidden work. - finishPendingInteractions(root, lanes); - } - } - - if (remainingLanes === SyncLane) { - // Count the number of times the root synchronously re-renders without - // finishing. If there are too many, it indicates an infinite update loop. - if (root === rootWithNestedUpdates) { - nestedUpdateCount++; - } else { - nestedUpdateCount = 0; - rootWithNestedUpdates = root; - } - } else { - nestedUpdateCount = 0; - } - - onCommitRoot(finishedWork.stateNode, renderPriorityLevel); - - { - onCommitRoot$1(); - } // Always call this before exiting `commitRoot`, to ensure that any - // additional work on this root is scheduled. - - - ensureRootIsScheduled(root, now()); - - if (hasUncaughtError) { - hasUncaughtError = false; - var _error3 = firstUncaughtError; - firstUncaughtError = null; - throw _error3; - } - - if ((executionContext & LegacyUnbatchedContext) !== NoContext) { - // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired - // synchronously, but layout updates should be deferred until the end - // of the batch. - - - return null; - } // If layout work was scheduled, flush it now. - - - flushSyncCallbackQueue(); - - return null; - } - - function commitBeforeMutationEffects() { - while (nextEffect !== null) { - var current = nextEffect.alternate; - - if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) { - if ((nextEffect.flags & Deletion) !== NoFlags) { - if (doesFiberContain(nextEffect, focusedInstanceHandle)) { - shouldFireAfterActiveInstanceBlur = true; - } - } else { - // TODO: Move this out of the hot path using a dedicated effect tag. - if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) { - shouldFireAfterActiveInstanceBlur = true; - } - } - } - - var flags = nextEffect.flags; - - if ((flags & Snapshot) !== NoFlags) { - setCurrentFiber(nextEffect); - commitBeforeMutationLifeCycles(current, nextEffect); - resetCurrentFiber(); - } - - if ((flags & Passive) !== NoFlags) { - // If there are passive effects, schedule a callback to flush at - // the earliest opportunity. - if (!rootDoesHavePassiveEffects) { - rootDoesHavePassiveEffects = true; - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(); - return null; - }); - } - } - - nextEffect = nextEffect.nextEffect; - } - } - - function commitMutationEffects(root, renderPriorityLevel) { - // TODO: Should probably move the bulk of this function to commitWork. - while (nextEffect !== null) { - setCurrentFiber(nextEffect); - var flags = nextEffect.flags; - - if (flags & ContentReset) { - commitResetTextContent(nextEffect); - } - - if (flags & Ref) { - var current = nextEffect.alternate; - - if (current !== null) { - commitDetachRef(current); - } - } // The following switch statement is only concerned about placement, - // updates, and deletions. To avoid needing to add a case for every possible - // bitmap value, we remove the secondary effects from the effect tag and - // switch on that value. - - - var primaryFlags = flags & (Placement | Update | Deletion | Hydrating); - - switch (primaryFlags) { - case Placement: - { - commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is - // inserted, before any life-cycles like componentDidMount gets called. - // TODO: findDOMNode doesn't rely on this any more but isMounted does - // and isMounted is deprecated anyway so we should be able to kill this. - - nextEffect.flags &= ~Placement; - break; - } - - case PlacementAndUpdate: - { - // Placement - commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is - // inserted, before any life-cycles like componentDidMount gets called. - - nextEffect.flags &= ~Placement; // Update - - var _current = nextEffect.alternate; - commitWork(_current, nextEffect); - break; - } - - case Hydrating: - { - nextEffect.flags &= ~Hydrating; - break; - } - - case HydratingAndUpdate: - { - nextEffect.flags &= ~Hydrating; // Update - - var _current2 = nextEffect.alternate; - commitWork(_current2, nextEffect); - break; - } - - case Update: - { - var _current3 = nextEffect.alternate; - commitWork(_current3, nextEffect); - break; - } - - case Deletion: - { - commitDeletion(root, nextEffect); - break; - } - } - - resetCurrentFiber(); - nextEffect = nextEffect.nextEffect; - } - } - - function commitLayoutEffects(root, committedLanes) { - - - while (nextEffect !== null) { - setCurrentFiber(nextEffect); - var flags = nextEffect.flags; - - if (flags & (Update | Callback)) { - var current = nextEffect.alternate; - commitLifeCycles(root, current, nextEffect); - } - - { - if (flags & Ref) { - commitAttachRef(nextEffect); - } - } - - resetCurrentFiber(); - nextEffect = nextEffect.nextEffect; - } - } - - function flushPassiveEffects() { - // Returns whether passive effects were flushed. - if (pendingPassiveEffectsRenderPriority !== NoPriority$1) { - var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority; - pendingPassiveEffectsRenderPriority = NoPriority$1; - - { - return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl); - } - } - - return false; - } - function enqueuePendingPassiveHookEffectMount(fiber, effect) { - pendingPassiveHookEffectsMount.push(effect, fiber); - - if (!rootDoesHavePassiveEffects) { - rootDoesHavePassiveEffects = true; - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(); - return null; - }); - } - } - function enqueuePendingPassiveHookEffectUnmount(fiber, effect) { - pendingPassiveHookEffectsUnmount.push(effect, fiber); - - { - fiber.flags |= PassiveUnmountPendingDev; - var alternate = fiber.alternate; - - if (alternate !== null) { - alternate.flags |= PassiveUnmountPendingDev; - } - } - - if (!rootDoesHavePassiveEffects) { - rootDoesHavePassiveEffects = true; - scheduleCallback(NormalPriority$1, function () { - flushPassiveEffects(); - return null; - }); - } - } - - function invokePassiveEffectCreate(effect) { - var create = effect.create; - effect.destroy = create(); - } - - function flushPassiveEffectsImpl() { - if (rootWithPendingPassiveEffects === null) { - return false; - } - - var root = rootWithPendingPassiveEffects; - var lanes = pendingPassiveEffectsLanes; - rootWithPendingPassiveEffects = null; - pendingPassiveEffectsLanes = NoLanes; - - if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) { - { - throw Error( "Cannot flush passive effects while already rendering." ); - } - } - - { - isFlushingPassiveEffects = true; - } - - var prevExecutionContext = executionContext; - executionContext |= CommitContext; - var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called - // before ANY passive effect create functions are called. - // Otherwise effects in sibling components might interfere with each other. - // e.g. a destroy function in one component may unintentionally override a ref - // value set by a create function in another component. - // Layout effects have the same constraint. - // First pass: Destroy stale passive effects. - - var unmountEffects = pendingPassiveHookEffectsUnmount; - pendingPassiveHookEffectsUnmount = []; - - for (var i = 0; i < unmountEffects.length; i += 2) { - var _effect = unmountEffects[i]; - var fiber = unmountEffects[i + 1]; - var destroy = _effect.destroy; - _effect.destroy = undefined; - - { - fiber.flags &= ~PassiveUnmountPendingDev; - var alternate = fiber.alternate; - - if (alternate !== null) { - alternate.flags &= ~PassiveUnmountPendingDev; - } - } - - if (typeof destroy === 'function') { - { - setCurrentFiber(fiber); - - { - invokeGuardedCallback(null, destroy, null); - } - - if (hasCaughtError()) { - if (!(fiber !== null)) { - { - throw Error( "Should be working on an effect." ); - } - } - - var error = clearCaughtError(); - captureCommitPhaseError(fiber, error); - } - - resetCurrentFiber(); - } - } - } // Second pass: Create new passive effects. - - - var mountEffects = pendingPassiveHookEffectsMount; - pendingPassiveHookEffectsMount = []; - - for (var _i = 0; _i < mountEffects.length; _i += 2) { - var _effect2 = mountEffects[_i]; - var _fiber = mountEffects[_i + 1]; - - { - setCurrentFiber(_fiber); - - { - invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2); - } - - if (hasCaughtError()) { - if (!(_fiber !== null)) { - { - throw Error( "Should be working on an effect." ); - } - } - - var _error4 = clearCaughtError(); - - captureCommitPhaseError(_fiber, _error4); - } - - resetCurrentFiber(); - } - } // Note: This currently assumes there are no passive effects on the root fiber - // because the root is not part of its own effect list. - // This could change in the future. - - - var effect = root.current.firstEffect; - - while (effect !== null) { - var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC - - effect.nextEffect = null; - - if (effect.flags & Deletion) { - detachFiberAfterEffects(effect); - } - - effect = nextNextEffect; - } - - { - popInteractions(prevInteractions); - finishPendingInteractions(root, lanes); - } - - { - isFlushingPassiveEffects = false; - } - - executionContext = prevExecutionContext; - flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this - // exceeds the limit, we'll fire a warning. - - nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1; - return true; - } - - function isAlreadyFailedLegacyErrorBoundary(instance) { - return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance); - } - function markLegacyErrorBoundaryAsFailed(instance) { - if (legacyErrorBoundariesThatAlreadyFailed === null) { - legacyErrorBoundariesThatAlreadyFailed = new Set([instance]); - } else { - legacyErrorBoundariesThatAlreadyFailed.add(instance); - } - } - - function prepareToThrowUncaughtError(error) { - if (!hasUncaughtError) { - hasUncaughtError = true; - firstUncaughtError = error; - } - } - - var onUncaughtError = prepareToThrowUncaughtError; - - function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { - var errorInfo = createCapturedValue(error, sourceFiber); - var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane); - enqueueUpdate(rootFiber, update); - var eventTime = requestEventTime(); - var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane); - - if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); - ensureRootIsScheduled(root, eventTime); - schedulePendingInteractions(root, SyncLane); - } - } - - function captureCommitPhaseError(sourceFiber, error) { - if (sourceFiber.tag === HostRoot) { - // Error was thrown at the root. There is no parent, so the root - // itself should capture it. - captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error); - return; - } - - var fiber = sourceFiber.return; - - while (fiber !== null) { - if (fiber.tag === HostRoot) { - captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error); - return; - } else if (fiber.tag === ClassComponent) { - var ctor = fiber.type; - var instance = fiber.stateNode; - - if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) { - var errorInfo = createCapturedValue(error, sourceFiber); - var update = createClassErrorUpdate(fiber, errorInfo, SyncLane); - enqueueUpdate(fiber, update); - var eventTime = requestEventTime(); - var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane); - - if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); - ensureRootIsScheduled(root, eventTime); - schedulePendingInteractions(root, SyncLane); - } else { - // This component has already been unmounted. - // We can't schedule any follow up work for the root because the fiber is already unmounted, - // but we can still call the log-only boundary so the error isn't swallowed. - // - // TODO This is only a temporary bandaid for the old reconciler fork. - // We can delete this special case once the new fork is merged. - if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) { - try { - instance.componentDidCatch(error, errorInfo); - } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it? - // This is kind of an edge case. - } - } - } - - return; - } - } - - fiber = fiber.return; - } - } - function pingSuspendedRoot(root, wakeable, pingedLanes) { - var pingCache = root.pingCache; - - if (pingCache !== null) { - // The wakeable resolved, so we no longer need to memoize, because it will - // never be thrown again. - pingCache.delete(wakeable); - } - - var eventTime = requestEventTime(); - markRootPinged(root, pingedLanes); - - if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) { - // Received a ping at the same priority level at which we're currently - // rendering. We might want to restart this render. This should mirror - // the logic of whether or not a root suspends once it completes. - // TODO: If we're rendering sync either due to Sync, Batched or expired, - // we should probably never restart. - // If we're suspended with delay, or if it's a retry, we'll always suspend - // so we can always restart. - if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) { - // Restart from the root. - prepareFreshStack(root, NoLanes); - } else { - // Even though we can't restart right now, we might get an - // opportunity later. So we mark this render as having a ping. - workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes); - } - } - - ensureRootIsScheduled(root, eventTime); - schedulePendingInteractions(root, pingedLanes); - } - - function retryTimedOutBoundary(boundaryFiber, retryLane) { - // The boundary fiber (a Suspense component or SuspenseList component) - // previously was rendered in its fallback state. One of the promises that - // suspended it has resolved, which means at least part of the tree was - // likely unblocked. Try rendering again, at a new expiration time. - if (retryLane === NoLane) { - retryLane = requestRetryLane(boundaryFiber); - } // TODO: Special case idle priority? - - - var eventTime = requestEventTime(); - var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane); - - if (root !== null) { - markRootUpdated(root, retryLane, eventTime); - ensureRootIsScheduled(root, eventTime); - schedulePendingInteractions(root, retryLane); - } - } - function resolveRetryWakeable(boundaryFiber, wakeable) { - var retryLane = NoLane; // Default - - var retryCache; - - { - retryCache = boundaryFiber.stateNode; - } - - if (retryCache !== null) { - // The wakeable resolved, so we no longer need to memoize, because it will - // never be thrown again. - retryCache.delete(wakeable); - } - - retryTimedOutBoundary(boundaryFiber, retryLane); - } // Computes the next Just Noticeable Difference (JND) boundary. - // The theory is that a person can't tell the difference between small differences in time. - // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable - // difference in the experience. However, waiting for longer might mean that we can avoid - // showing an intermediate loading state. The longer we have already waited, the harder it - // is to tell small differences in time. Therefore, the longer we've already waited, - // the longer we can wait additionally. At some point we have to give up though. - // We pick a train model where the next boundary commits at a consistent schedule. - // These particular numbers are vague estimates. We expect to adjust them based on research. - - function jnd(timeElapsed) { - return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960; - } - - function checkForNestedUpdates() { - if (nestedUpdateCount > NESTED_UPDATE_LIMIT) { - nestedUpdateCount = 0; - rootWithNestedUpdates = null; - - { - { - throw Error( "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." ); - } - } - } - - { - if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) { - nestedPassiveUpdateCount = 0; - - error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.'); - } - } - } - - function flushRenderPhaseStrictModeWarningsInDEV() { - { - ReactStrictModeWarnings.flushLegacyContextWarning(); - - { - ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings(); - } - } - } - - var didWarnStateUpdateForNotYetMountedComponent = null; - - function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) { - { - if ((executionContext & RenderContext) !== NoContext) { - // We let the other warning about render phase updates deal with this one. - return; - } - - if (!(fiber.mode & (BlockingMode | ConcurrentMode))) { - return; - } - - var tag = fiber.tag; - - if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) { - // Only warn for user-defined components, not internal ones like Suspense. - return; - } // We show the whole stack but dedupe on the top component's name because - // the problematic code almost always lies inside that component. - - - var componentName = getComponentName(fiber.type) || 'ReactComponent'; - - if (didWarnStateUpdateForNotYetMountedComponent !== null) { - if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) { - return; - } - - didWarnStateUpdateForNotYetMountedComponent.add(componentName); - } else { - didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]); - } - - var previousFiber = current; - - try { - setCurrentFiber(fiber); - - error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.'); - } finally { - if (previousFiber) { - setCurrentFiber(fiber); - } else { - resetCurrentFiber(); - } - } - } - } - - var didWarnStateUpdateForUnmountedComponent = null; - - function warnAboutUpdateOnUnmountedFiberInDEV(fiber) { - { - var tag = fiber.tag; - - if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) { - // Only warn for user-defined components, not internal ones like Suspense. - return; - } // If there are pending passive effects unmounts for this Fiber, - // we can assume that they would have prevented this update. - - - if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) { - return; - } // We show the whole stack but dedupe on the top component's name because - // the problematic code almost always lies inside that component. - - - var componentName = getComponentName(fiber.type) || 'ReactComponent'; - - if (didWarnStateUpdateForUnmountedComponent !== null) { - if (didWarnStateUpdateForUnmountedComponent.has(componentName)) { - return; - } - - didWarnStateUpdateForUnmountedComponent.add(componentName); - } else { - didWarnStateUpdateForUnmountedComponent = new Set([componentName]); - } - - if (isFlushingPassiveEffects) ; else { - var previousFiber = current; - - try { - setCurrentFiber(fiber); - - error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function'); - } finally { - if (previousFiber) { - setCurrentFiber(fiber); - } else { - resetCurrentFiber(); - } - } - } - } - } - - var beginWork$1; - - { - var dummyFiber = null; - - beginWork$1 = function (current, unitOfWork, lanes) { - // If a component throws an error, we replay it again in a synchronously - // dispatched event, so that the debugger will treat it as an uncaught - // error See ReactErrorUtils for more information. - // Before entering the begin phase, copy the work-in-progress onto a dummy - // fiber. If beginWork throws, we'll use this to reset the state. - var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork); - - try { - return beginWork(current, unitOfWork, lanes); - } catch (originalError) { - if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') { - // Don't replay promises. Treat everything else like an error. - throw originalError; - } // Keep this code in sync with handleError; any changes here must have - // corresponding changes there. - - - resetContextDependencies(); - resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the - // same fiber again. - // Unwind the failed stack frame - - unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber. - - assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy); - - if ( unitOfWork.mode & ProfileMode) { - // Reset the profiler timer. - startProfilerTimer(unitOfWork); - } // Run beginWork again. - - - invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes); - - if (hasCaughtError()) { - var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`. - // Rethrow this error instead of the original one. - - throw replayError; - } else { - // This branch is reachable if the render phase is impure. - throw originalError; - } - } - }; - } - - var didWarnAboutUpdateInRender = false; - var didWarnAboutUpdateInRenderForAnotherComponent; - - { - didWarnAboutUpdateInRenderForAnotherComponent = new Set(); - } - - function warnAboutRenderPhaseUpdatesInDEV(fiber) { - { - if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) { - switch (fiber.tag) { - case FunctionComponent: - case ForwardRef: - case SimpleMemoComponent: - { - var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed. - - var dedupeKey = renderingComponentName; - - if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) { - didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey); - var setStateComponentName = getComponentName(fiber.type) || 'Unknown'; - - error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName); - } - - break; - } - - case ClassComponent: - { - if (!didWarnAboutUpdateInRender) { - error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.'); - - didWarnAboutUpdateInRender = true; - } - - break; - } - } - } - } - } // a 'shared' variable that changes when act() opens/closes in tests. - - - var IsThisRendererActing = { - current: false - }; - function warnIfNotScopedWithMatchingAct(fiber) { - { - if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) { - var previousFiber = current; - - try { - setCurrentFiber(fiber); - - error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + // Break up imports to avoid accidentally parsing them as dependencies. - 'import {act} fr' + "om 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + // Break up imports to avoid accidentally parsing them as dependencies. - 'import TestRenderer fr' + "om react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);'); - } finally { - if (previousFiber) { - setCurrentFiber(fiber); - } else { - resetCurrentFiber(); - } - } - } - } - } - function warnIfNotCurrentlyActingEffectsInDEV(fiber) { - { - if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) { - error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type)); - } - } - } - - function warnIfNotCurrentlyActingUpdatesInDEV(fiber) { - { - if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) { - var previousFiber = current; - - try { - setCurrentFiber(fiber); - - error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type)); - } finally { - if (previousFiber) { - setCurrentFiber(fiber); - } else { - resetCurrentFiber(); - } - } - } - } - } - - var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler. - - var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked - // scheduler is the actual recommendation. The alternative could be a testing build, - // a new lib, or whatever; we dunno just yet. This message is for early adopters - // to get their tests right. - - function warnIfUnmockedScheduler(fiber) { - { - if (didWarnAboutUnmockedScheduler === false && unstable_flushAllWithoutAsserting === undefined) { - if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) { - didWarnAboutUnmockedScheduler = true; - - error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + // Break up requires to avoid accidentally parsing them as dependencies. - "jest.mock('scheduler', () => require" + "('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://reactjs.org/link/mock-scheduler'); - } - } - } - } - - function computeThreadID(root, lane) { - // Interaction threads are unique per root and expiration time. - // NOTE: Intentionally unsound cast. All that matters is that it's a number - // and it represents a batch of work. Could make a helper function instead, - // but meh this is fine for now. - return lane * 1000 + root.interactionThreadID; - } - - function markSpawnedWork(lane) { - - if (spawnedWorkDuringRender === null) { - spawnedWorkDuringRender = [lane]; - } else { - spawnedWorkDuringRender.push(lane); - } - } - - function scheduleInteractions(root, lane, interactions) { - - if (interactions.size > 0) { - var pendingInteractionMap = root.pendingInteractionMap; - var pendingInteractions = pendingInteractionMap.get(lane); - - if (pendingInteractions != null) { - interactions.forEach(function (interaction) { - if (!pendingInteractions.has(interaction)) { - // Update the pending async work count for previously unscheduled interaction. - interaction.__count++; - } - - pendingInteractions.add(interaction); - }); - } else { - pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions. - - interactions.forEach(function (interaction) { - interaction.__count++; - }); - } - - var subscriber = __subscriberRef.current; - - if (subscriber !== null) { - var threadID = computeThreadID(root, lane); - subscriber.onWorkScheduled(interactions, threadID); - } - } - } - - function schedulePendingInteractions(root, lane) { - - scheduleInteractions(root, lane, __interactionsRef.current); - } - - function startWorkOnPendingInteractions(root, lanes) { - // we can accurately attribute time spent working on it, And so that cascading - // work triggered during the render phase will be associated with it. - - - var interactions = new Set(); - root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) { - if (includesSomeLane(lanes, scheduledLane)) { - scheduledInteractions.forEach(function (interaction) { - return interactions.add(interaction); - }); - } - }); // Store the current set of interactions on the FiberRoot for a few reasons: - // We can re-use it in hot functions like performConcurrentWorkOnRoot() - // without having to recalculate it. We will also use it in commitWork() to - // pass to any Profiler onRender() hooks. This also provides DevTools with a - // way to access it when the onCommitRoot() hook is called. - - root.memoizedInteractions = interactions; - - if (interactions.size > 0) { - var subscriber = __subscriberRef.current; - - if (subscriber !== null) { - var threadID = computeThreadID(root, lanes); - - try { - subscriber.onWorkStarted(interactions, threadID); - } catch (error) { - // If the subscriber throws, rethrow it in a separate task - scheduleCallback(ImmediatePriority$1, function () { - throw error; - }); - } - } - } - } - - function finishPendingInteractions(root, committedLanes) { - - var remainingLanesAfterCommit = root.pendingLanes; - var subscriber; - - try { - subscriber = __subscriberRef.current; - - if (subscriber !== null && root.memoizedInteractions.size > 0) { - // FIXME: More than one lane can finish in a single commit. - var threadID = computeThreadID(root, committedLanes); - subscriber.onWorkStopped(root.memoizedInteractions, threadID); - } - } catch (error) { - // If the subscriber throws, rethrow it in a separate task - scheduleCallback(ImmediatePriority$1, function () { - throw error; - }); - } finally { - // Clear completed interactions from the pending Map. - // Unless the render was suspended or cascading work was scheduled, - // In which case– leave pending interactions until the subsequent render. - var pendingInteractionMap = root.pendingInteractionMap; - pendingInteractionMap.forEach(function (scheduledInteractions, lane) { - // Only decrement the pending interaction count if we're done. - // If there's still work at the current priority, - // That indicates that we are waiting for suspense data. - if (!includesSomeLane(remainingLanesAfterCommit, lane)) { - pendingInteractionMap.delete(lane); - scheduledInteractions.forEach(function (interaction) { - interaction.__count--; - - if (subscriber !== null && interaction.__count === 0) { - try { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } catch (error) { - // If the subscriber throws, rethrow it in a separate task - scheduleCallback(ImmediatePriority$1, function () { - throw error; - }); - } - } - }); - } - }); - } - } // `act` testing API - - function shouldForceFlushFallbacksInDEV() { - // Never force flush in production. This function should get stripped out. - return actingUpdatesScopeDepth > 0; - } - // so we can tell if any async act() calls try to run in parallel. - - - var actingUpdatesScopeDepth = 0; - - function detachFiberAfterEffects(fiber) { - fiber.sibling = null; - fiber.stateNode = null; - } - - var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below. - - var failedBoundaries = null; - var setRefreshHandler = function (handler) { - { - resolveFamily = handler; - } - }; - function resolveFunctionForHotReloading(type) { - { - if (resolveFamily === null) { - // Hot reloading is disabled. - return type; - } - - var family = resolveFamily(type); - - if (family === undefined) { - return type; - } // Use the latest known implementation. - - - return family.current; - } - } - function resolveClassForHotReloading(type) { - // No implementation differences. - return resolveFunctionForHotReloading(type); - } - function resolveForwardRefForHotReloading(type) { - { - if (resolveFamily === null) { - // Hot reloading is disabled. - return type; - } - - var family = resolveFamily(type); - - if (family === undefined) { - // Check if we're dealing with a real forwardRef. Don't want to crash early. - if (type !== null && type !== undefined && typeof type.render === 'function') { - // ForwardRef is special because its resolved .type is an object, - // but it's possible that we only have its inner render function in the map. - // If that inner render function is different, we'll build a new forwardRef type. - var currentRender = resolveFunctionForHotReloading(type.render); - - if (type.render !== currentRender) { - var syntheticType = { - $$typeof: REACT_FORWARD_REF_TYPE, - render: currentRender - }; - - if (type.displayName !== undefined) { - syntheticType.displayName = type.displayName; - } - - return syntheticType; - } - } - - return type; - } // Use the latest known implementation. - - - return family.current; - } - } - function isCompatibleFamilyForHotReloading(fiber, element) { - { - if (resolveFamily === null) { - // Hot reloading is disabled. - return false; - } - - var prevType = fiber.elementType; - var nextType = element.type; // If we got here, we know types aren't === equal. - - var needsCompareFamilies = false; - var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null; - - switch (fiber.tag) { - case ClassComponent: - { - if (typeof nextType === 'function') { - needsCompareFamilies = true; - } - - break; - } - - case FunctionComponent: - { - if (typeof nextType === 'function') { - needsCompareFamilies = true; - } else if ($$typeofNextType === REACT_LAZY_TYPE) { - // We don't know the inner type yet. - // We're going to assume that the lazy inner type is stable, - // and so it is sufficient to avoid reconciling it away. - // We're not going to unwrap or actually use the new lazy type. - needsCompareFamilies = true; - } - - break; - } - - case ForwardRef: - { - if ($$typeofNextType === REACT_FORWARD_REF_TYPE) { - needsCompareFamilies = true; - } else if ($$typeofNextType === REACT_LAZY_TYPE) { - needsCompareFamilies = true; - } - - break; - } - - case MemoComponent: - case SimpleMemoComponent: - { - if ($$typeofNextType === REACT_MEMO_TYPE) { - // TODO: if it was but can no longer be simple, - // we shouldn't set this. - needsCompareFamilies = true; - } else if ($$typeofNextType === REACT_LAZY_TYPE) { - needsCompareFamilies = true; - } - - break; - } - - default: - return false; - } // Check if both types have a family and it's the same one. - - - if (needsCompareFamilies) { - // Note: memo() and forwardRef() we'll compare outer rather than inner type. - // This means both of them need to be registered to preserve state. - // If we unwrapped and compared the inner types for wrappers instead, - // then we would risk falsely saying two separate memo(Foo) - // calls are equivalent because they wrap the same Foo function. - var prevFamily = resolveFamily(prevType); - - if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) { - return true; - } - } - - return false; - } - } - function markFailedErrorBoundaryForHotReloading(fiber) { - { - if (resolveFamily === null) { - // Hot reloading is disabled. - return; - } - - if (typeof WeakSet !== 'function') { - return; - } - - if (failedBoundaries === null) { - failedBoundaries = new WeakSet(); - } - - failedBoundaries.add(fiber); - } - } - var scheduleRefresh = function (root, update) { - { - if (resolveFamily === null) { - // Hot reloading is disabled. - return; - } - - var staleFamilies = update.staleFamilies, - updatedFamilies = update.updatedFamilies; - flushPassiveEffects(); - flushSync(function () { - scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies); - }); - } - }; - var scheduleRoot = function (root, element) { - { - if (root.context !== emptyContextObject) { - // Super edge case: root has a legacy _renderSubtree context - // but we don't know the parentComponent so we can't pass it. - // Just ignore. We'll delete this with _renderSubtree code path later. - return; - } - - flushPassiveEffects(); - flushSync(function () { - updateContainer(element, root, null, null); - }); - } - }; - - function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) { - { - var alternate = fiber.alternate, - child = fiber.child, - sibling = fiber.sibling, - tag = fiber.tag, - type = fiber.type; - var candidateType = null; - - switch (tag) { - case FunctionComponent: - case SimpleMemoComponent: - case ClassComponent: - candidateType = type; - break; - - case ForwardRef: - candidateType = type.render; - break; - } - - if (resolveFamily === null) { - throw new Error('Expected resolveFamily to be set during hot reload.'); - } - - var needsRender = false; - var needsRemount = false; - - if (candidateType !== null) { - var family = resolveFamily(candidateType); - - if (family !== undefined) { - if (staleFamilies.has(family)) { - needsRemount = true; - } else if (updatedFamilies.has(family)) { - if (tag === ClassComponent) { - needsRemount = true; - } else { - needsRender = true; - } - } - } - } - - if (failedBoundaries !== null) { - if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) { - needsRemount = true; - } - } - - if (needsRemount) { - fiber._debugNeedsRemount = true; - } - - if (needsRemount || needsRender) { - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - } - - if (child !== null && !needsRemount) { - scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies); - } - - if (sibling !== null) { - scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies); - } - } - } - - var findHostInstancesForRefresh = function (root, families) { - { - var hostInstances = new Set(); - var types = new Set(families.map(function (family) { - return family.current; - })); - findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances); - return hostInstances; - } - }; - - function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) { - { - var child = fiber.child, - sibling = fiber.sibling, - tag = fiber.tag, - type = fiber.type; - var candidateType = null; - - switch (tag) { - case FunctionComponent: - case SimpleMemoComponent: - case ClassComponent: - candidateType = type; - break; - - case ForwardRef: - candidateType = type.render; - break; - } - - var didMatch = false; - - if (candidateType !== null) { - if (types.has(candidateType)) { - didMatch = true; - } - } - - if (didMatch) { - // We have a match. This only drills down to the closest host components. - // There's no need to search deeper because for the purpose of giving - // visual feedback, "flashing" outermost parent rectangles is sufficient. - findHostInstancesForFiberShallowly(fiber, hostInstances); - } else { - // If there's no match, maybe there will be one further down in the child tree. - if (child !== null) { - findHostInstancesForMatchingFibersRecursively(child, types, hostInstances); - } - } - - if (sibling !== null) { - findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances); - } - } - } - - function findHostInstancesForFiberShallowly(fiber, hostInstances) { - { - var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances); - - if (foundHostInstances) { - return; - } // If we didn't find any host children, fallback to closest host parent. - - - var node = fiber; - - while (true) { - switch (node.tag) { - case HostComponent: - hostInstances.add(node.stateNode); - return; - - case HostPortal: - hostInstances.add(node.stateNode.containerInfo); - return; - - case HostRoot: - hostInstances.add(node.stateNode.containerInfo); - return; - } - - if (node.return === null) { - throw new Error('Expected to reach root first.'); - } - - node = node.return; - } - } - } - - function findChildHostInstancesForFiberShallowly(fiber, hostInstances) { - { - var node = fiber; - var foundHostInstances = false; - - while (true) { - if (node.tag === HostComponent) { - // We got a match. - foundHostInstances = true; - hostInstances.add(node.stateNode); // There may still be more, so keep searching. - } else if (node.child !== null) { - node.child.return = node; - node = node.child; - continue; - } - - if (node === fiber) { - return foundHostInstances; - } - - while (node.sibling === null) { - if (node.return === null || node.return === fiber) { - return foundHostInstances; - } - - node = node.return; - } - - node.sibling.return = node.return; - node = node.sibling; - } - } - - return false; - } - - var hasBadMapPolyfill; - - { - hasBadMapPolyfill = false; - - try { - var nonExtensibleObject = Object.preventExtensions({}); - /* eslint-disable no-new */ - - new Map([[nonExtensibleObject, null]]); - new Set([nonExtensibleObject]); - /* eslint-enable no-new */ - } catch (e) { - // TODO: Consider warning about bad polyfills - hasBadMapPolyfill = true; - } - } - - var debugCounter = 1; - - function FiberNode(tag, pendingProps, key, mode) { - // Instance - this.tag = tag; - this.key = key; - this.elementType = null; - this.type = null; - this.stateNode = null; // Fiber - - this.return = null; - this.child = null; - this.sibling = null; - this.index = 0; - this.ref = null; - this.pendingProps = pendingProps; - this.memoizedProps = null; - this.updateQueue = null; - this.memoizedState = null; - this.dependencies = null; - this.mode = mode; // Effects - - this.flags = NoFlags; - this.nextEffect = null; - this.firstEffect = null; - this.lastEffect = null; - this.lanes = NoLanes; - this.childLanes = NoLanes; - this.alternate = null; - - { - // Note: The following is done to avoid a v8 performance cliff. - // - // Initializing the fields below to smis and later updating them with - // double values will cause Fibers to end up having separate shapes. - // This behavior/bug has something to do with Object.preventExtension(). - // Fortunately this only impacts DEV builds. - // Unfortunately it makes React unusably slow for some applications. - // To work around this, initialize the fields below with doubles. - // - // Learn more about this here: - // https://github.com/facebook/react/issues/14365 - // https://bugs.chromium.org/p/v8/issues/detail?id=8538 - this.actualDuration = Number.NaN; - this.actualStartTime = Number.NaN; - this.selfBaseDuration = Number.NaN; - this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization. - // This won't trigger the performance cliff mentioned above, - // and it simplifies other profiler code (including DevTools). - - this.actualDuration = 0; - this.actualStartTime = -1; - this.selfBaseDuration = 0; - this.treeBaseDuration = 0; - } - - { - // This isn't directly used but is handy for debugging internals: - this._debugID = debugCounter++; - this._debugSource = null; - this._debugOwner = null; - this._debugNeedsRemount = false; - this._debugHookTypes = null; - - if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') { - Object.preventExtensions(this); - } - } - } // This is a constructor function, rather than a POJO constructor, still - // please ensure we do the following: - // 1) Nobody should add any instance methods on this. Instance methods can be - // more difficult to predict when they get optimized and they are almost - // never inlined properly in static compilers. - // 2) Nobody should rely on `instanceof Fiber` for type testing. We should - // always know when it is a fiber. - // 3) We might want to experiment with using numeric keys since they are easier - // to optimize in a non-JIT environment. - // 4) We can easily go from a constructor to a createFiber object literal if that - // is faster. - // 5) It should be easy to port this to a C struct and keep a C implementation - // compatible. - - - var createFiber = function (tag, pendingProps, key, mode) { - // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors - return new FiberNode(tag, pendingProps, key, mode); - }; - - function shouldConstruct$1(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - - function isSimpleFunctionComponent(type) { - return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined; - } - function resolveLazyComponentTag(Component) { - if (typeof Component === 'function') { - return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent; - } else if (Component !== undefined && Component !== null) { - var $$typeof = Component.$$typeof; - - if ($$typeof === REACT_FORWARD_REF_TYPE) { - return ForwardRef; - } - - if ($$typeof === REACT_MEMO_TYPE) { - return MemoComponent; - } - } - - return IndeterminateComponent; - } // This is used to create an alternate fiber to do work on. - - function createWorkInProgress(current, pendingProps) { - var workInProgress = current.alternate; - - if (workInProgress === null) { - // We use a double buffering pooling technique because we know that we'll - // only ever need at most two versions of a tree. We pool the "other" unused - // node that we're free to reuse. This is lazily created to avoid allocating - // extra objects for things that are never updated. It also allow us to - // reclaim the extra memory if needed. - workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode); - workInProgress.elementType = current.elementType; - workInProgress.type = current.type; - workInProgress.stateNode = current.stateNode; - - { - // DEV-only fields - workInProgress._debugID = current._debugID; - workInProgress._debugSource = current._debugSource; - workInProgress._debugOwner = current._debugOwner; - workInProgress._debugHookTypes = current._debugHookTypes; - } - - workInProgress.alternate = current; - current.alternate = workInProgress; - } else { - workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type. - - workInProgress.type = current.type; // We already have an alternate. - // Reset the effect tag. - - workInProgress.flags = NoFlags; // The effect list is no longer valid. - - workInProgress.nextEffect = null; - workInProgress.firstEffect = null; - workInProgress.lastEffect = null; - - { - // We intentionally reset, rather than copy, actualDuration & actualStartTime. - // This prevents time from endlessly accumulating in new commits. - // This has the downside of resetting values for different priority renders, - // But works for yielding (the common case) and should support resuming. - workInProgress.actualDuration = 0; - workInProgress.actualStartTime = -1; - } - } - - workInProgress.childLanes = current.childLanes; - workInProgress.lanes = current.lanes; - workInProgress.child = current.child; - workInProgress.memoizedProps = current.memoizedProps; - workInProgress.memoizedState = current.memoizedState; - workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so - // it cannot be shared with the current fiber. - - var currentDependencies = current.dependencies; - workInProgress.dependencies = currentDependencies === null ? null : { - lanes: currentDependencies.lanes, - firstContext: currentDependencies.firstContext - }; // These will be overridden during the parent's reconciliation - - workInProgress.sibling = current.sibling; - workInProgress.index = current.index; - workInProgress.ref = current.ref; - - { - workInProgress.selfBaseDuration = current.selfBaseDuration; - workInProgress.treeBaseDuration = current.treeBaseDuration; - } - - { - workInProgress._debugNeedsRemount = current._debugNeedsRemount; - - switch (workInProgress.tag) { - case IndeterminateComponent: - case FunctionComponent: - case SimpleMemoComponent: - workInProgress.type = resolveFunctionForHotReloading(current.type); - break; - - case ClassComponent: - workInProgress.type = resolveClassForHotReloading(current.type); - break; - - case ForwardRef: - workInProgress.type = resolveForwardRefForHotReloading(current.type); - break; - } - } - - return workInProgress; - } // Used to reuse a Fiber for a second pass. - - function resetWorkInProgress(workInProgress, renderLanes) { - // This resets the Fiber to what createFiber or createWorkInProgress would - // have set the values to before during the first pass. Ideally this wouldn't - // be necessary but unfortunately many code paths reads from the workInProgress - // when they should be reading from current and writing to workInProgress. - // We assume pendingProps, index, key, ref, return are still untouched to - // avoid doing another reconciliation. - // Reset the effect tag but keep any Placement tags, since that's something - // that child fiber is setting, not the reconciliation. - workInProgress.flags &= Placement; // The effect list is no longer valid. - - workInProgress.nextEffect = null; - workInProgress.firstEffect = null; - workInProgress.lastEffect = null; - var current = workInProgress.alternate; - - if (current === null) { - // Reset to createFiber's initial values. - workInProgress.childLanes = NoLanes; - workInProgress.lanes = renderLanes; - workInProgress.child = null; - workInProgress.memoizedProps = null; - workInProgress.memoizedState = null; - workInProgress.updateQueue = null; - workInProgress.dependencies = null; - workInProgress.stateNode = null; - - { - // Note: We don't reset the actualTime counts. It's useful to accumulate - // actual time across multiple render passes. - workInProgress.selfBaseDuration = 0; - workInProgress.treeBaseDuration = 0; - } - } else { - // Reset to the cloned values that createWorkInProgress would've. - workInProgress.childLanes = current.childLanes; - workInProgress.lanes = current.lanes; - workInProgress.child = current.child; - workInProgress.memoizedProps = current.memoizedProps; - workInProgress.memoizedState = current.memoizedState; - workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type. - - workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so - // it cannot be shared with the current fiber. - - var currentDependencies = current.dependencies; - workInProgress.dependencies = currentDependencies === null ? null : { - lanes: currentDependencies.lanes, - firstContext: currentDependencies.firstContext - }; - - { - // Note: We don't reset the actualTime counts. It's useful to accumulate - // actual time across multiple render passes. - workInProgress.selfBaseDuration = current.selfBaseDuration; - workInProgress.treeBaseDuration = current.treeBaseDuration; - } - } - - return workInProgress; - } - function createHostRootFiber(tag) { - var mode; - - if (tag === ConcurrentRoot) { - mode = ConcurrentMode | BlockingMode | StrictMode; - } else if (tag === BlockingRoot) { - mode = BlockingMode | StrictMode; - } else { - mode = NoMode; - } - - if ( isDevToolsPresent) { - // Always collect profile timings when DevTools are present. - // This enables DevTools to start capturing timing at any point– - // Without some nodes in the tree having empty base times. - mode |= ProfileMode; - } - - return createFiber(HostRoot, null, null, mode); - } - function createFiberFromTypeAndProps(type, // React$ElementType - key, pendingProps, owner, mode, lanes) { - var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy. - - var resolvedType = type; - - if (typeof type === 'function') { - if (shouldConstruct$1(type)) { - fiberTag = ClassComponent; - - { - resolvedType = resolveClassForHotReloading(resolvedType); - } - } else { - { - resolvedType = resolveFunctionForHotReloading(resolvedType); - } - } - } else if (typeof type === 'string') { - fiberTag = HostComponent; - } else { - getTag: switch (type) { - case REACT_FRAGMENT_TYPE: - return createFiberFromFragment(pendingProps.children, mode, lanes, key); - - case REACT_DEBUG_TRACING_MODE_TYPE: - fiberTag = Mode; - mode |= DebugTracingMode; - break; - - case REACT_STRICT_MODE_TYPE: - fiberTag = Mode; - mode |= StrictMode; - break; - - case REACT_PROFILER_TYPE: - return createFiberFromProfiler(pendingProps, mode, lanes, key); - - case REACT_SUSPENSE_TYPE: - return createFiberFromSuspense(pendingProps, mode, lanes, key); - - case REACT_SUSPENSE_LIST_TYPE: - return createFiberFromSuspenseList(pendingProps, mode, lanes, key); - - case REACT_OFFSCREEN_TYPE: - return createFiberFromOffscreen(pendingProps, mode, lanes, key); - - case REACT_LEGACY_HIDDEN_TYPE: - return createFiberFromLegacyHidden(pendingProps, mode, lanes, key); - - case REACT_SCOPE_TYPE: - - // eslint-disable-next-line no-fallthrough - - default: - { - if (typeof type === 'object' && type !== null) { - switch (type.$$typeof) { - case REACT_PROVIDER_TYPE: - fiberTag = ContextProvider; - break getTag; - - case REACT_CONTEXT_TYPE: - // This is a consumer - fiberTag = ContextConsumer; - break getTag; - - case REACT_FORWARD_REF_TYPE: - fiberTag = ForwardRef; - - { - resolvedType = resolveForwardRefForHotReloading(resolvedType); - } - - break getTag; - - case REACT_MEMO_TYPE: - fiberTag = MemoComponent; - break getTag; - - case REACT_LAZY_TYPE: - fiberTag = LazyComponent; - resolvedType = null; - break getTag; - - case REACT_BLOCK_TYPE: - fiberTag = Block; - break getTag; - } - } - - var info = ''; - - { - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.'; - } - - var ownerName = owner ? getComponentName(owner.type) : null; - - if (ownerName) { - info += '\n\nCheck the render method of `' + ownerName + '`.'; - } - } - - { - { - throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (type == null ? type : typeof type) + "." + info ); - } - } - } - } - } - - var fiber = createFiber(fiberTag, pendingProps, key, mode); - fiber.elementType = type; - fiber.type = resolvedType; - fiber.lanes = lanes; - - { - fiber._debugOwner = owner; - } - - return fiber; - } - function createFiberFromElement(element, mode, lanes) { - var owner = null; - - { - owner = element._owner; - } - - var type = element.type; - var key = element.key; - var pendingProps = element.props; - var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes); - - { - fiber._debugSource = element._source; - fiber._debugOwner = element._owner; - } - - return fiber; - } - function createFiberFromFragment(elements, mode, lanes, key) { - var fiber = createFiber(Fragment, elements, key, mode); - fiber.lanes = lanes; - return fiber; - } - - function createFiberFromProfiler(pendingProps, mode, lanes, key) { - { - if (typeof pendingProps.id !== 'string') { - error('Profiler must specify an "id" as a prop'); - } - } - - var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag. - - fiber.elementType = REACT_PROFILER_TYPE; - fiber.type = REACT_PROFILER_TYPE; - fiber.lanes = lanes; - - { - fiber.stateNode = { - effectDuration: 0, - passiveEffectDuration: 0 - }; - } - - return fiber; - } - - function createFiberFromSuspense(pendingProps, mode, lanes, key) { - var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag. - // This needs to be fixed in getComponentName so that it relies on the tag - // instead. - - fiber.type = REACT_SUSPENSE_TYPE; - fiber.elementType = REACT_SUSPENSE_TYPE; - fiber.lanes = lanes; - return fiber; - } - function createFiberFromSuspenseList(pendingProps, mode, lanes, key) { - var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode); - - { - // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag. - // This needs to be fixed in getComponentName so that it relies on the tag - // instead. - fiber.type = REACT_SUSPENSE_LIST_TYPE; - } - - fiber.elementType = REACT_SUSPENSE_LIST_TYPE; - fiber.lanes = lanes; - return fiber; - } - function createFiberFromOffscreen(pendingProps, mode, lanes, key) { - var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag. - // This needs to be fixed in getComponentName so that it relies on the tag - // instead. - - { - fiber.type = REACT_OFFSCREEN_TYPE; - } - - fiber.elementType = REACT_OFFSCREEN_TYPE; - fiber.lanes = lanes; - return fiber; - } - function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) { - var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag. - // This needs to be fixed in getComponentName so that it relies on the tag - // instead. - - { - fiber.type = REACT_LEGACY_HIDDEN_TYPE; - } - - fiber.elementType = REACT_LEGACY_HIDDEN_TYPE; - fiber.lanes = lanes; - return fiber; - } - function createFiberFromText(content, mode, lanes) { - var fiber = createFiber(HostText, content, null, mode); - fiber.lanes = lanes; - return fiber; - } - function createFiberFromHostInstanceForDeletion() { - var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type. - - fiber.elementType = 'DELETED'; - fiber.type = 'DELETED'; - return fiber; - } - function createFiberFromPortal(portal, mode, lanes) { - var pendingProps = portal.children !== null ? portal.children : []; - var fiber = createFiber(HostPortal, pendingProps, portal.key, mode); - fiber.lanes = lanes; - fiber.stateNode = { - containerInfo: portal.containerInfo, - pendingChildren: null, - // Used by persistent updates - implementation: portal.implementation - }; - return fiber; - } // Used for stashing WIP properties to replay failed work in DEV. - - function assignFiberPropertiesInDEV(target, source) { - if (target === null) { - // This Fiber's initial properties will always be overwritten. - // We only use a Fiber to ensure the same hidden class so DEV isn't slow. - target = createFiber(IndeterminateComponent, null, null, NoMode); - } // This is intentionally written as a list of all properties. - // We tried to use Object.assign() instead but this is called in - // the hottest path, and Object.assign() was too slow: - // https://github.com/facebook/react/issues/12502 - // This code is DEV-only so size is not a concern. - - - target.tag = source.tag; - target.key = source.key; - target.elementType = source.elementType; - target.type = source.type; - target.stateNode = source.stateNode; - target.return = source.return; - target.child = source.child; - target.sibling = source.sibling; - target.index = source.index; - target.ref = source.ref; - target.pendingProps = source.pendingProps; - target.memoizedProps = source.memoizedProps; - target.updateQueue = source.updateQueue; - target.memoizedState = source.memoizedState; - target.dependencies = source.dependencies; - target.mode = source.mode; - target.flags = source.flags; - target.nextEffect = source.nextEffect; - target.firstEffect = source.firstEffect; - target.lastEffect = source.lastEffect; - target.lanes = source.lanes; - target.childLanes = source.childLanes; - target.alternate = source.alternate; - - { - target.actualDuration = source.actualDuration; - target.actualStartTime = source.actualStartTime; - target.selfBaseDuration = source.selfBaseDuration; - target.treeBaseDuration = source.treeBaseDuration; - } - - target._debugID = source._debugID; - target._debugSource = source._debugSource; - target._debugOwner = source._debugOwner; - target._debugNeedsRemount = source._debugNeedsRemount; - target._debugHookTypes = source._debugHookTypes; - return target; - } - - function FiberRootNode(containerInfo, tag, hydrate) { - this.tag = tag; - this.containerInfo = containerInfo; - this.pendingChildren = null; - this.current = null; - this.pingCache = null; - this.finishedWork = null; - this.timeoutHandle = noTimeout; - this.context = null; - this.pendingContext = null; - this.hydrate = hydrate; - this.callbackNode = null; - this.callbackPriority = NoLanePriority; - this.eventTimes = createLaneMap(NoLanes); - this.expirationTimes = createLaneMap(NoTimestamp); - this.pendingLanes = NoLanes; - this.suspendedLanes = NoLanes; - this.pingedLanes = NoLanes; - this.expiredLanes = NoLanes; - this.mutableReadLanes = NoLanes; - this.finishedLanes = NoLanes; - this.entangledLanes = NoLanes; - this.entanglements = createLaneMap(NoLanes); - - { - this.mutableSourceEagerHydrationData = null; - } - - { - this.interactionThreadID = unstable_getThreadID(); - this.memoizedInteractions = new Set(); - this.pendingInteractionMap = new Map(); - } - - { - switch (tag) { - case BlockingRoot: - this._debugRootType = 'createBlockingRoot()'; - break; - - case ConcurrentRoot: - this._debugRootType = 'createRoot()'; - break; - - case LegacyRoot: - this._debugRootType = 'createLegacyRoot()'; - break; - } - } - } - - function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) { - var root = new FiberRootNode(containerInfo, tag, hydrate); - // stateNode is any. - - - var uninitializedFiber = createHostRootFiber(tag); - root.current = uninitializedFiber; - uninitializedFiber.stateNode = root; - initializeUpdateQueue(uninitializedFiber); - return root; - } - - // This ensures that the version used for server rendering matches the one - // that is eventually read during hydration. - // If they don't match there's a potential tear and a full deopt render is required. - - function registerMutableSourceForHydration(root, mutableSource) { - var getVersion = mutableSource._getVersion; - var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished. - // Retaining it forever may interfere with GC. - - if (root.mutableSourceEagerHydrationData == null) { - root.mutableSourceEagerHydrationData = [mutableSource, version]; - } else { - root.mutableSourceEagerHydrationData.push(mutableSource, version); - } - } - - function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation. - implementation) { - var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - return { - // This tag allow us to uniquely identify this as a React Portal - $$typeof: REACT_PORTAL_TYPE, - key: key == null ? null : '' + key, - children: children, - containerInfo: containerInfo, - implementation: implementation - }; - } - - var didWarnAboutNestedUpdates; - var didWarnAboutFindNodeInStrictMode; - - { - didWarnAboutNestedUpdates = false; - didWarnAboutFindNodeInStrictMode = {}; - } - - function getContextForSubtree(parentComponent) { - if (!parentComponent) { - return emptyContextObject; - } - - var fiber = get(parentComponent); - var parentContext = findCurrentUnmaskedContext(fiber); - - if (fiber.tag === ClassComponent) { - var Component = fiber.type; - - if (isContextProvider(Component)) { - return processChildContext(fiber, Component, parentContext); - } - } - - return parentContext; - } - - function findHostInstanceWithWarning(component, methodName) { - { - var fiber = get(component); - - if (fiber === undefined) { - if (typeof component.render === 'function') { - { - { - throw Error( "Unable to find node on an unmounted component." ); - } - } - } else { - { - { - throw Error( "Argument appears to not be a ReactComponent. Keys: " + Object.keys(component) ); - } - } - } - } - - var hostFiber = findCurrentHostFiber(fiber); - - if (hostFiber === null) { - return null; - } - - if (hostFiber.mode & StrictMode) { - var componentName = getComponentName(fiber.type) || 'Component'; - - if (!didWarnAboutFindNodeInStrictMode[componentName]) { - didWarnAboutFindNodeInStrictMode[componentName] = true; - var previousFiber = current; - - try { - setCurrentFiber(hostFiber); - - if (fiber.mode & StrictMode) { - error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName); - } else { - error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName); - } - } finally { - // Ideally this should reset to previous but this shouldn't be called in - // render and there's another warning for that anyway. - if (previousFiber) { - setCurrentFiber(previousFiber); - } else { - resetCurrentFiber(); - } - } - } - } - - return hostFiber.stateNode; - } - } - - function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) { - return createFiberRoot(containerInfo, tag, hydrate); - } - function updateContainer(element, container, parentComponent, callback) { - { - onScheduleRoot(container, element); - } - - var current$1 = container.current; - var eventTime = requestEventTime(); - - { - // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests - if ('undefined' !== typeof jest) { - warnIfUnmockedScheduler(current$1); - warnIfNotScopedWithMatchingAct(current$1); - } - } - - var lane = requestUpdateLane(current$1); - - var context = getContextForSubtree(parentComponent); - - if (container.context === null) { - container.context = context; - } else { - container.pendingContext = context; - } - - { - if (isRendering && current !== null && !didWarnAboutNestedUpdates) { - didWarnAboutNestedUpdates = true; - - error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown'); - } - } - - var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property - // being called "element". - - update.payload = { - element: element - }; - callback = callback === undefined ? null : callback; - - if (callback !== null) { - { - if (typeof callback !== 'function') { - error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback); - } - } - - update.callback = callback; - } - - enqueueUpdate(current$1, update); - scheduleUpdateOnFiber(current$1, lane, eventTime); - return lane; - } - function getPublicRootInstance(container) { - var containerFiber = container.current; - - if (!containerFiber.child) { - return null; - } - - switch (containerFiber.child.tag) { - case HostComponent: - return getPublicInstance(containerFiber.child.stateNode); - - default: - return containerFiber.child.stateNode; - } - } - - function markRetryLaneImpl(fiber, retryLane) { - var suspenseState = fiber.memoizedState; - - if (suspenseState !== null && suspenseState.dehydrated !== null) { - suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane); - } - } // Increases the priority of thennables when they resolve within this boundary. - - - function markRetryLaneIfNotHydrated(fiber, retryLane) { - markRetryLaneImpl(fiber, retryLane); - var alternate = fiber.alternate; - - if (alternate) { - markRetryLaneImpl(alternate, retryLane); - } - } - - function attemptUserBlockingHydration$1(fiber) { - if (fiber.tag !== SuspenseComponent) { - // We ignore HostRoots here because we can't increase - // their priority and they should not suspend on I/O, - // since you have to wrap anything that might suspend in - // Suspense. - return; - } - - var eventTime = requestEventTime(); - var lane = InputDiscreteHydrationLane; - scheduleUpdateOnFiber(fiber, lane, eventTime); - markRetryLaneIfNotHydrated(fiber, lane); - } - function attemptContinuousHydration$1(fiber) { - if (fiber.tag !== SuspenseComponent) { - // We ignore HostRoots here because we can't increase - // their priority and they should not suspend on I/O, - // since you have to wrap anything that might suspend in - // Suspense. - return; - } - - var eventTime = requestEventTime(); - var lane = SelectiveHydrationLane; - scheduleUpdateOnFiber(fiber, lane, eventTime); - markRetryLaneIfNotHydrated(fiber, lane); - } - function attemptHydrationAtCurrentPriority$1(fiber) { - if (fiber.tag !== SuspenseComponent) { - // We ignore HostRoots here because we can't increase - // their priority other than synchronously flush it. - return; - } - - var eventTime = requestEventTime(); - var lane = requestUpdateLane(fiber); - scheduleUpdateOnFiber(fiber, lane, eventTime); - markRetryLaneIfNotHydrated(fiber, lane); - } - function runWithPriority$2(priority, fn) { - - try { - setCurrentUpdateLanePriority(priority); - return fn(); - } finally { - } - } - function findHostInstanceWithNoPortals(fiber) { - var hostFiber = findCurrentHostFiberWithNoPortals(fiber); - - if (hostFiber === null) { - return null; - } - - if (hostFiber.tag === FundamentalComponent) { - return hostFiber.stateNode.instance; - } - - return hostFiber.stateNode; - } - - var shouldSuspendImpl = function (fiber) { - return false; - }; - - function shouldSuspend(fiber) { - return shouldSuspendImpl(fiber); - } - var overrideHookState = null; - var overrideHookStateDeletePath = null; - var overrideHookStateRenamePath = null; - var overrideProps = null; - var overridePropsDeletePath = null; - var overridePropsRenamePath = null; - var scheduleUpdate = null; - var setSuspenseHandler = null; - - { - var copyWithDeleteImpl = function (obj, path, index) { - var key = path[index]; - var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); - - if (index + 1 === path.length) { - if (Array.isArray(updated)) { - updated.splice(key, 1); - } else { - delete updated[key]; - } - - return updated; - } // $FlowFixMe number or string is fine here - - - updated[key] = copyWithDeleteImpl(obj[key], path, index + 1); - return updated; - }; - - var copyWithDelete = function (obj, path) { - return copyWithDeleteImpl(obj, path, 0); - }; - - var copyWithRenameImpl = function (obj, oldPath, newPath, index) { - var oldKey = oldPath[index]; - var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); - - if (index + 1 === oldPath.length) { - var newKey = newPath[index]; // $FlowFixMe number or string is fine here - - updated[newKey] = updated[oldKey]; - - if (Array.isArray(updated)) { - updated.splice(oldKey, 1); - } else { - delete updated[oldKey]; - } - } else { - // $FlowFixMe number or string is fine here - updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here - obj[oldKey], oldPath, newPath, index + 1); - } - - return updated; - }; - - var copyWithRename = function (obj, oldPath, newPath) { - if (oldPath.length !== newPath.length) { - warn('copyWithRename() expects paths of the same length'); - - return; - } else { - for (var i = 0; i < newPath.length - 1; i++) { - if (oldPath[i] !== newPath[i]) { - warn('copyWithRename() expects paths to be the same except for the deepest key'); - - return; - } - } - } - - return copyWithRenameImpl(obj, oldPath, newPath, 0); - }; - - var copyWithSetImpl = function (obj, path, index, value) { - if (index >= path.length) { - return value; - } - - var key = path[index]; - var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here - - updated[key] = copyWithSetImpl(obj[key], path, index + 1, value); - return updated; - }; - - var copyWithSet = function (obj, path, value) { - return copyWithSetImpl(obj, path, 0, value); - }; - - var findHook = function (fiber, id) { - // For now, the "id" of stateful hooks is just the stateful hook index. - // This may change in the future with e.g. nested hooks. - var currentHook = fiber.memoizedState; - - while (currentHook !== null && id > 0) { - currentHook = currentHook.next; - id--; - } - - return currentHook; - }; // Support DevTools editable values for useState and useReducer. - - - overrideHookState = function (fiber, id, path, value) { - var hook = findHook(fiber, id); - - if (hook !== null) { - var newState = copyWithSet(hook.memoizedState, path, value); - hook.memoizedState = newState; - hook.baseState = newState; // We aren't actually adding an update to the queue, - // because there is no update we can add for useReducer hooks that won't trigger an error. - // (There's no appropriate action type for DevTools overrides.) - // As a result though, React will see the scheduled update as a noop and bailout. - // Shallow cloning props works as a workaround for now to bypass the bailout check. - - fiber.memoizedProps = _assign({}, fiber.memoizedProps); - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - } - }; - - overrideHookStateDeletePath = function (fiber, id, path) { - var hook = findHook(fiber, id); - - if (hook !== null) { - var newState = copyWithDelete(hook.memoizedState, path); - hook.memoizedState = newState; - hook.baseState = newState; // We aren't actually adding an update to the queue, - // because there is no update we can add for useReducer hooks that won't trigger an error. - // (There's no appropriate action type for DevTools overrides.) - // As a result though, React will see the scheduled update as a noop and bailout. - // Shallow cloning props works as a workaround for now to bypass the bailout check. - - fiber.memoizedProps = _assign({}, fiber.memoizedProps); - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - } - }; - - overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) { - var hook = findHook(fiber, id); - - if (hook !== null) { - var newState = copyWithRename(hook.memoizedState, oldPath, newPath); - hook.memoizedState = newState; - hook.baseState = newState; // We aren't actually adding an update to the queue, - // because there is no update we can add for useReducer hooks that won't trigger an error. - // (There's no appropriate action type for DevTools overrides.) - // As a result though, React will see the scheduled update as a noop and bailout. - // Shallow cloning props works as a workaround for now to bypass the bailout check. - - fiber.memoizedProps = _assign({}, fiber.memoizedProps); - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - } - }; // Support DevTools props for function components, forwardRef, memo, host components, etc. - - - overrideProps = function (fiber, path, value) { - fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value); - - if (fiber.alternate) { - fiber.alternate.pendingProps = fiber.pendingProps; - } - - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - }; - - overridePropsDeletePath = function (fiber, path) { - fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path); - - if (fiber.alternate) { - fiber.alternate.pendingProps = fiber.pendingProps; - } - - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - }; - - overridePropsRenamePath = function (fiber, oldPath, newPath) { - fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath); - - if (fiber.alternate) { - fiber.alternate.pendingProps = fiber.pendingProps; - } - - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - }; - - scheduleUpdate = function (fiber) { - scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp); - }; - - setSuspenseHandler = function (newShouldSuspendImpl) { - shouldSuspendImpl = newShouldSuspendImpl; - }; - } - - function findHostInstanceByFiber(fiber) { - var hostFiber = findCurrentHostFiber(fiber); - - if (hostFiber === null) { - return null; - } - - return hostFiber.stateNode; - } - - function emptyFindFiberByHostInstance(instance) { - return null; - } - - function getCurrentFiberForDevTools() { - return current; - } - - function injectIntoDevTools(devToolsConfig) { - var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance; - var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; - return injectInternals({ - bundleType: devToolsConfig.bundleType, - version: devToolsConfig.version, - rendererPackageName: devToolsConfig.rendererPackageName, - rendererConfig: devToolsConfig.rendererConfig, - overrideHookState: overrideHookState, - overrideHookStateDeletePath: overrideHookStateDeletePath, - overrideHookStateRenamePath: overrideHookStateRenamePath, - overrideProps: overrideProps, - overridePropsDeletePath: overridePropsDeletePath, - overridePropsRenamePath: overridePropsRenamePath, - setSuspenseHandler: setSuspenseHandler, - scheduleUpdate: scheduleUpdate, - currentDispatcherRef: ReactCurrentDispatcher, - findHostInstanceByFiber: findHostInstanceByFiber, - findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance, - // React Refresh - findHostInstancesForRefresh: findHostInstancesForRefresh , - scheduleRefresh: scheduleRefresh , - scheduleRoot: scheduleRoot , - setRefreshHandler: setRefreshHandler , - // Enables DevTools to append owner stacks to error messages in DEV mode. - getCurrentFiber: getCurrentFiberForDevTools - }); - } - - function ReactDOMRoot(container, options) { - this._internalRoot = createRootImpl(container, ConcurrentRoot, options); - } - - function ReactDOMBlockingRoot(container, tag, options) { - this._internalRoot = createRootImpl(container, tag, options); - } - - ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) { - var root = this._internalRoot; - - { - if (typeof arguments[1] === 'function') { - error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().'); - } - - var container = root.containerInfo; - - if (container.nodeType !== COMMENT_NODE) { - var hostInstance = findHostInstanceWithNoPortals(root.current); - - if (hostInstance) { - if (hostInstance.parentNode !== container) { - error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container."); - } - } - } - } - - updateContainer(children, root, null, null); - }; - - ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () { - { - if (typeof arguments[0] === 'function') { - error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().'); - } - } - - var root = this._internalRoot; - var container = root.containerInfo; - updateContainer(null, root, null, function () { - unmarkContainerAsRoot(container); - }); - }; - - function createRootImpl(container, tag, options) { - // Tag is either LegacyRoot or Concurrent Root - var hydrate = options != null && options.hydrate === true; - var hydrationCallbacks = options != null && options.hydrationOptions || null; - var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null; - var root = createContainer(container, tag, hydrate); - markContainerAsRoot(root.current, container); - var containerNodeType = container.nodeType; - - { - var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container; - listenToAllSupportedEvents(rootContainerElement); - } - - if (mutableSources) { - for (var i = 0; i < mutableSources.length; i++) { - var mutableSource = mutableSources[i]; - registerMutableSourceForHydration(root, mutableSource); - } - } - - return root; - } - function createLegacyRoot(container, options) { - return new ReactDOMBlockingRoot(container, LegacyRoot, options); - } - function isValidContainer(node) { - return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable ')); - } - - var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner; - var topLevelUpdateWarnings; - var warnedAboutHydrateAPI = false; - - { - topLevelUpdateWarnings = function (container) { - if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) { - var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current); - - if (hostInstance) { - if (hostInstance.parentNode !== container) { - error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.'); - } - } - } - - var isRootRenderedBySomeReact = !!container._reactRootContainer; - var rootEl = getReactRootElementInContainer(container); - var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl)); - - if (hasNonRootReactChild && !isRootRenderedBySomeReact) { - error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.'); - } - - if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') { - error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.'); - } - }; - } - - function getReactRootElementInContainer(container) { - if (!container) { - return null; - } - - if (container.nodeType === DOCUMENT_NODE) { - return container.documentElement; - } else { - return container.firstChild; - } - } - - function shouldHydrateDueToLegacyHeuristic(container) { - var rootElement = getReactRootElementInContainer(container); - return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME)); - } - - function legacyCreateRootFromDOMContainer(container, forceHydrate) { - var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content. - - if (!shouldHydrate) { - var warned = false; - var rootSibling; - - while (rootSibling = container.lastChild) { - { - if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) { - warned = true; - - error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.'); - } - } - - container.removeChild(rootSibling); - } - } - - { - if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) { - warnedAboutHydrateAPI = true; - - warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.'); - } - } - - return createLegacyRoot(container, shouldHydrate ? { - hydrate: true - } : undefined); - } - - function warnOnInvalidCallback$1(callback, callerName) { - { - if (callback !== null && typeof callback !== 'function') { - error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback); - } - } - } - - function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) { - { - topLevelUpdateWarnings(container); - warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render'); - } // TODO: Without `any` type, Flow says "Property cannot be accessed on any - // member of intersection type." Whyyyyyy. - - - var root = container._reactRootContainer; - var fiberRoot; - - if (!root) { - // Initial mount - root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate); - fiberRoot = root._internalRoot; - - if (typeof callback === 'function') { - var originalCallback = callback; - - callback = function () { - var instance = getPublicRootInstance(fiberRoot); - originalCallback.call(instance); - }; - } // Initial mount should not be batched. - - - unbatchedUpdates(function () { - updateContainer(children, fiberRoot, parentComponent, callback); - }); - } else { - fiberRoot = root._internalRoot; - - if (typeof callback === 'function') { - var _originalCallback = callback; - - callback = function () { - var instance = getPublicRootInstance(fiberRoot); - - _originalCallback.call(instance); - }; - } // Update - - - updateContainer(children, fiberRoot, parentComponent, callback); - } - - return getPublicRootInstance(fiberRoot); - } - - function findDOMNode(componentOrElement) { - { - var owner = ReactCurrentOwner$3.current; - - if (owner !== null && owner.stateNode !== null) { - var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender; - - if (!warnedAboutRefsInRender) { - error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component'); - } - - owner.stateNode._warnedAboutRefsInRender = true; - } - } - - if (componentOrElement == null) { - return null; - } - - if (componentOrElement.nodeType === ELEMENT_NODE) { - return componentOrElement; - } - - { - return findHostInstanceWithWarning(componentOrElement, 'findDOMNode'); - } - } - function hydrate(element, container, callback) { - if (!isValidContainer(container)) { - { - throw Error( "Target container is not a DOM element." ); - } - } - - { - var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; - - if (isModernRoot) { - error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?'); - } - } // TODO: throw or warn if we couldn't hydrate? - - - return legacyRenderSubtreeIntoContainer(null, element, container, true, callback); - } - function render(element, container, callback) { - if (!isValidContainer(container)) { - { - throw Error( "Target container is not a DOM element." ); - } - } - - { - var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; - - if (isModernRoot) { - error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?'); - } - } - - return legacyRenderSubtreeIntoContainer(null, element, container, false, callback); - } - function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { - if (!isValidContainer(containerNode)) { - { - throw Error( "Target container is not a DOM element." ); - } - } - - if (!(parentComponent != null && has(parentComponent))) { - { - throw Error( "parentComponent must be a valid React Component" ); - } - } - - return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback); - } - function unmountComponentAtNode(container) { - if (!isValidContainer(container)) { - { - throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." ); - } - } - - { - var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined; - - if (isModernRoot) { - error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?'); - } - } - - if (container._reactRootContainer) { - { - var rootEl = getReactRootElementInContainer(container); - var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl); - - if (renderedByDifferentReact) { - error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.'); - } - } // Unmount should not be batched. - - - unbatchedUpdates(function () { - legacyRenderSubtreeIntoContainer(null, null, container, false, function () { - // $FlowFixMe This should probably use `delete container._reactRootContainer` - container._reactRootContainer = null; - unmarkContainerAsRoot(container); - }); - }); // If you call unmountComponentAtNode twice in quick succession, you'll - // get `true` twice. That's probably fine? - - return true; - } else { - { - var _rootEl = getReactRootElementInContainer(container); - - var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node. - - var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer; - - if (hasNonRootReactChild) { - error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.'); - } - } - - return false; - } - } - - setAttemptUserBlockingHydration(attemptUserBlockingHydration$1); - setAttemptContinuousHydration(attemptContinuousHydration$1); - setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1); - setAttemptHydrationAtPriority(runWithPriority$2); - var didWarnAboutUnstableCreatePortal = false; - - { - if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype - Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype - Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') { - error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills'); - } - } - - setRestoreImplementation(restoreControlledState$3); - setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1); - - function createPortal$1(children, container) { - var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - - if (!isValidContainer(container)) { - { - throw Error( "Target container is not a DOM element." ); - } - } // TODO: pass ReactDOM portal implementation as third argument - // $FlowFixMe The Flow type is opaque but there's no way to actually create it. - - - return createPortal(children, container, null, key); - } - - function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) { - - return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback); - } - - function unstable_createPortal(children, container) { - var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - - { - if (!didWarnAboutUnstableCreatePortal) { - didWarnAboutUnstableCreatePortal = true; - - warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.'); - } - } - - return createPortal$1(children, container, key); - } - - var Internals = { - // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js. - // This is an array for better minification. - Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key? - IsThisRendererActing] - }; - var foundDevTools = injectIntoDevTools({ - findFiberByHostInstance: getClosestInstanceFromNode, - bundleType: 1 , - version: ReactVersion, - rendererPackageName: 'react-dom' - }); - - { - if (!foundDevTools && canUseDOM && window.top === window.self) { - // If we're in Chrome or Firefox, provide a download link if not installed. - if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) { - var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://. - - if (/^(https?|file):$/.test(protocol)) { - // eslint-disable-next-line react-internal/no-production-logging - console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold'); - } - } - } - } - - exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals; - exports.createPortal = createPortal$1; - exports.findDOMNode = findDOMNode; - exports.flushSync = flushSync; - exports.hydrate = hydrate; - exports.render = render; - exports.unmountComponentAtNode = unmountComponentAtNode; - exports.unstable_batchedUpdates = batchedUpdates$1; - exports.unstable_createPortal = unstable_createPortal; - exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer; - exports.version = ReactVersion; - -}))); diff --git a/res/script/react.development.js b/res/script/react.development.js deleted file mode 100644 index 1124191bb..000000000 --- a/res/script/react.development.js +++ /dev/null @@ -1,3357 +0,0 @@ -/** @license React v17.0.2 - * react.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.React = {})); -}(this, (function (exports) { 'use strict'; - - // TODO: this is special because it gets imported during build. - var ReactVersion = '17.0.2'; - - // ATTENTION - // When adding new symbols to this file, - // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' - // The Symbol used to tag the ReactElement-like types. If there is no native Symbol - // nor polyfill, then a plain number is used for performance. - var REACT_ELEMENT_TYPE = 0xeac7; - var REACT_PORTAL_TYPE = 0xeaca; - exports.Fragment = 0xeacb; - exports.StrictMode = 0xeacc; - exports.Profiler = 0xead2; - var REACT_PROVIDER_TYPE = 0xeacd; - var REACT_CONTEXT_TYPE = 0xeace; - var REACT_FORWARD_REF_TYPE = 0xead0; - exports.Suspense = 0xead1; - var REACT_SUSPENSE_LIST_TYPE = 0xead8; - var REACT_MEMO_TYPE = 0xead3; - var REACT_LAZY_TYPE = 0xead4; - var REACT_BLOCK_TYPE = 0xead9; - var REACT_SERVER_BLOCK_TYPE = 0xeada; - var REACT_FUNDAMENTAL_TYPE = 0xead5; - var REACT_SCOPE_TYPE = 0xead7; - var REACT_OPAQUE_ID_TYPE = 0xeae0; - var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1; - var REACT_OFFSCREEN_TYPE = 0xeae2; - var REACT_LEGACY_HIDDEN_TYPE = 0xeae3; - - if (typeof Symbol === 'function' && Symbol.for) { - var symbolFor = Symbol.for; - REACT_ELEMENT_TYPE = symbolFor('react.element'); - REACT_PORTAL_TYPE = symbolFor('react.portal'); - exports.Fragment = symbolFor('react.fragment'); - exports.StrictMode = symbolFor('react.strict_mode'); - exports.Profiler = symbolFor('react.profiler'); - REACT_PROVIDER_TYPE = symbolFor('react.provider'); - REACT_CONTEXT_TYPE = symbolFor('react.context'); - REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref'); - exports.Suspense = symbolFor('react.suspense'); - REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list'); - REACT_MEMO_TYPE = symbolFor('react.memo'); - REACT_LAZY_TYPE = symbolFor('react.lazy'); - REACT_BLOCK_TYPE = symbolFor('react.block'); - REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block'); - REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental'); - REACT_SCOPE_TYPE = symbolFor('react.scope'); - REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); - REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode'); - REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen'); - REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); - } - - var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; - function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== 'object') { - return null; - } - - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - - return null; - } - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - var _assign = function (to, from) { - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - }; - - var assign = Object.assign || function (target, sources) { - if (target == null) { - throw new TypeError('Object.assign target cannot be null or undefined'); - } - - var to = Object(target); - - for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { - var nextSource = arguments[nextIndex]; - - if (nextSource != null) { - _assign(to, Object(nextSource)); - } - } - - return to; - }; - - /** - * Keeps track of the current dispatcher. - */ - var ReactCurrentDispatcher = { - /** - * @internal - * @type {ReactComponent} - */ - current: null - }; - - /** - * Keeps track of the current batch's configuration such as how long an update - * should suspend for if it needs to. - */ - var ReactCurrentBatchConfig = { - transition: 0 - }; - - /** - * Keeps track of the current owner. - * - * The current owner is the component who should own any components that are - * currently being constructed. - */ - var ReactCurrentOwner = { - /** - * @internal - * @type {ReactComponent} - */ - current: null - }; - - var ReactDebugCurrentFrame = {}; - var currentExtraStackFrame = null; - function setExtraStackFrame(stack) { - { - currentExtraStackFrame = stack; - } - } - - { - ReactDebugCurrentFrame.setExtraStackFrame = function (stack) { - { - currentExtraStackFrame = stack; - } - }; // Stack implementation injected by the current renderer. - - - ReactDebugCurrentFrame.getCurrentStack = null; - - ReactDebugCurrentFrame.getStackAddendum = function () { - var stack = ''; // Add an extra top frame while an element is being validated - - if (currentExtraStackFrame) { - stack += currentExtraStackFrame; - } // Delegate to the injected renderer-specific implementation - - - var impl = ReactDebugCurrentFrame.getCurrentStack; - - if (impl) { - stack += impl() || ''; - } - - return stack; - }; - } - - /** - * Used by act() to track whether you're inside an act() scope. - */ - var IsSomeRendererActing = { - current: false - }; - - var ReactSharedInternals = { - ReactCurrentDispatcher: ReactCurrentDispatcher, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - ReactCurrentOwner: ReactCurrentOwner, - IsSomeRendererActing: IsSomeRendererActing, - // Used by renderers to avoid bundling object-assign twice in UMD bundles: - assign: assign - }; - - { - ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame; - } - - // by calls to these methods by a Babel plugin. - // - // In PROD (or in packages without access to React internals), - // they are left as they are instead. - - function warn(format) { - { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - printWarning('warn', format, args); - } - } - function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } - } - - function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } - - var argsWithFormat = args.map(function (item) { - return '' + item; - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - } - } - - var didWarnStateUpdateForUnmountedComponent = {}; - - function warnNoop(publicInstance, callerName) { - { - var _constructor = publicInstance.constructor; - var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; - var warningKey = componentName + "." + callerName; - - if (didWarnStateUpdateForUnmountedComponent[warningKey]) { - return; - } - - error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); - - didWarnStateUpdateForUnmountedComponent[warningKey] = true; - } - } - /** - * This is the abstract API for an update queue. - */ - - - var ReactNoopUpdateQueue = { - /** - * Checks whether or not this composite component is mounted. - * @param {ReactClass} publicInstance The instance we want to test. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function (publicInstance) { - return false; - }, - - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueForceUpdate: function (publicInstance, callback, callerName) { - warnNoop(publicInstance, 'forceUpdate'); - }, - - /** - * Replaces all of the state. Always use this or `setState` to mutate state. - * You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} completeState Next state. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { - warnNoop(publicInstance, 'replaceState'); - }, - - /** - * Sets a subset of the state. This only exists because _pendingState is - * internal. This provides a merging strategy that is not available to deep - * properties which is confusing. TODO: Expose pendingState or don't use it - * during the merge. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} partialState Next partial state to be merged with state. - * @param {?function} callback Called after component is updated. - * @param {?string} Name of the calling function in the public API. - * @internal - */ - enqueueSetState: function (publicInstance, partialState, callback, callerName) { - warnNoop(publicInstance, 'setState'); - } - }; - - var emptyObject = {}; - - { - Object.freeze(emptyObject); - } - /** - * Base class helpers for the updating state of a component. - */ - - - function Component(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the - // renderer. - - this.updater = updater || ReactNoopUpdateQueue; - } - - Component.prototype.isReactComponent = {}; - /** - * Sets a subset of the state. Always use this to mutate - * state. You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * There is no guarantee that calls to `setState` will run synchronously, - * as they may eventually be batched together. You can provide an optional - * callback that will be executed when the call to setState is actually - * completed. - * - * When a function is provided to setState, it will be called at some point in - * the future (not synchronously). It will be called with the up to date - * component arguments (state, props, context). These values can be different - * from this.* because your function may be called after receiveProps but before - * shouldComponentUpdate, and this new state, props, and context will not yet be - * assigned to this. - * - * @param {object|function} partialState Next partial state or function to - * produce next partial state to be merged with current state. - * @param {?function} callback Called after state is updated. - * @final - * @protected - */ - - Component.prototype.setState = function (partialState, callback) { - if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) { - { - throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." ); - } - } - - this.updater.enqueueSetState(this, partialState, callback, 'setState'); - }; - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {?function} callback Called after update is complete. - * @final - * @protected - */ - - - Component.prototype.forceUpdate = function (callback) { - this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); - }; - /** - * Deprecated APIs. These APIs used to exist on classic React classes but since - * we would like to deprecate them, we're not going to move them over to this - * modern base class. Instead, we define a getter that warns if it's accessed. - */ - - - { - var deprecatedAPIs = { - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] - }; - - var defineDeprecationWarning = function (methodName, info) { - Object.defineProperty(Component.prototype, methodName, { - get: function () { - warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); - - return undefined; - } - }); - }; - - for (var fnName in deprecatedAPIs) { - if (deprecatedAPIs.hasOwnProperty(fnName)) { - defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - } - } - } - - function ComponentDummy() {} - - ComponentDummy.prototype = Component.prototype; - /** - * Convenience component with default shallow equality check for sCU. - */ - - function PureComponent(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - - var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); - pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. - - assign(pureComponentPrototype, Component.prototype); - - pureComponentPrototype.isPureReactComponent = true; - - // an immutable object with a single mutable value - function createRef() { - var refObject = { - current: null - }; - - { - Object.seal(refObject); - } - - return refObject; - } - - function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ''; - return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); - } - - function getContextName(type) { - return type.displayName || 'Context'; - } - - function getComponentName(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case exports.Fragment: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case exports.Profiler: - return 'Profiler'; - - case exports.StrictMode: - return 'StrictMode'; - - case exports.Suspense: - return 'Suspense'; - - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + '.Consumer'; - - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + '.Provider'; - - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - - case REACT_MEMO_TYPE: - return getComponentName(type.type); - - case REACT_BLOCK_TYPE: - return getComponentName(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - return getComponentName(init(payload)); - } catch (x) { - return null; - } - } - } - } - - return null; - } - - var hasOwnProperty$1 = Object.prototype.hasOwnProperty; - var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true - }; - var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; - - { - didWarnAboutStringRefs = {}; - } - - function hasValidRef(config) { - { - if (hasOwnProperty$1.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.ref !== undefined; - } - - function hasValidKey(config) { - { - if (hasOwnProperty$1.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.key !== undefined; - } - - function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function () { - { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - - error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); - } - } - }; - - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); - } - - function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function () { - { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - - error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); - } - } - }; - - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); - } - - function warnIfStringRefCannotBeAutoConverted(config) { - { - if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { - var componentName = getComponentName(ReactCurrentOwner.current.type); - - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); - - didWarnAboutStringRefs[componentName] = true; - } - } - } - } - /** - * Factory method to create a new React element. This no longer adheres to - * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check - * if something is a React Element. - * - * @param {*} type - * @param {*} props - * @param {*} key - * @param {string|object} ref - * @param {*} owner - * @param {*} self A *temporary* helper to detect places where `this` is - * different from the `owner` when React.createElement is called, so that we - * can warn. We want to get rid of owner and replace string `ref`s with arrow - * functions, and as long as `this` and owner are the same, there will be no - * change in behavior. - * @param {*} source An annotation object (added by a transpiler or otherwise) - * indicating filename, line number, and/or other information. - * @internal - */ - - - var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, - // Record the component responsible for creating this element. - _owner: owner - }; - - { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); // self and source are DEV only properties. - - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } - - return element; - }; - /** - * Create and return a new ReactElement of the given type. - * See https://reactjs.org/docs/react-api.html#createelement - */ - - function createElement(type, config, children) { - var propName; // Reserved names are extracted - - var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; - - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - - { - warnIfStringRefCannotBeAutoConverted(config); - } - } - - if (hasValidKey(config)) { - key = '' + config.key; - } - - self = config.__self === undefined ? null : config.__self; - source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object - - for (propName in config) { - if (hasOwnProperty$1.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - { - if (Object.freeze) { - Object.freeze(childArray); - } - } - - props.children = childArray; - } // Resolve default props - - - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - - { - if (key || ref) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); - } - function cloneAndReplaceKey(oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); - return newElement; - } - /** - * Clone and return a new ReactElement using element as the starting point. - * See https://reactjs.org/docs/react-api.html#cloneelement - */ - - function cloneElement(element, config, children) { - if (!!(element === null || element === undefined)) { - { - throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." ); - } - } - - var propName; // Original props are copied - - var props = assign({}, element.props); // Reserved names are extracted - - - var key = element.key; - var ref = element.ref; // Self is preserved since the owner is preserved. - - var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a - // transpiler, and the original source is probably a better indicator of the - // true owner. - - var source = element._source; // Owner will be preserved, unless ref is overridden - - var owner = element._owner; - - if (config != null) { - if (hasValidRef(config)) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - - if (hasValidKey(config)) { - key = '' + config.key; - } // Remaining properties override existing props - - - var defaultProps; - - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - - for (propName in config) { - if (hasOwnProperty$1.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === undefined && defaultProps !== undefined) { - // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; - } - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - props.children = childArray; - } - - return ReactElement(element.type, key, ref, self, source, owner, props); - } - /** - * Verifies the object is a ReactElement. - * See https://reactjs.org/docs/react-api.html#isvalidelement - * @param {?object} object - * @return {boolean} True if `object` is a ReactElement. - * @final - */ - - function isValidElement(object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; - } - - var SEPARATOR = '.'; - var SUBSEPARATOR = ':'; - /** - * Escape and wrap key so it is safe to use as a reactid - * - * @param {string} key to be escaped. - * @return {string} the escaped key. - */ - - function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = key.replace(escapeRegex, function (match) { - return escaperLookup[match]; - }); - return '$' + escapedString; - } - /** - * TODO: Test that a single child and an array with one item have the same key - * pattern. - */ - - - var didWarnAboutMaps = false; - var userProvidedKeyEscapeRegex = /\/+/g; - - function escapeUserProvidedKey(text) { - return text.replace(userProvidedKeyEscapeRegex, '$&/'); - } - /** - * Generate a key string that identifies a element within a set. - * - * @param {*} element A element that could contain a manual key. - * @param {number} index Index that is used if a manual key is not provided. - * @return {string} - */ - - - function getElementKey(element, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (typeof element === 'object' && element !== null && element.key != null) { - // Explicit key - return escape('' + element.key); - } // Implicit key determined by the index in the set - - - return index.toString(36); - } - - function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { - var type = typeof children; - - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } - - var invokeCallback = false; - - if (children === null) { - invokeCallback = true; - } else { - switch (type) { - case 'string': - case 'number': - invokeCallback = true; - break; - - case 'object': - switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = true; - } - - } - } - - if (invokeCallback) { - var _child = children; - var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows: - - var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; - - if (Array.isArray(mappedChild)) { - var escapedChildKey = ''; - - if (childKey != null) { - escapedChildKey = escapeUserProvidedKey(childKey) + '/'; - } - - mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) { - return c; - }); - } else if (mappedChild != null) { - if (isValidElement(mappedChild)) { - mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key - mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number - escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey); - } - - array.push(mappedChild); - } - - return 1; - } - - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; - - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getElementKey(child, i); - subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); - } - } else { - var iteratorFn = getIteratorFn(children); - - if (typeof iteratorFn === 'function') { - var iterableChildren = children; - - { - // Warn about using Maps as children - if (iteratorFn === iterableChildren.entries) { - if (!didWarnAboutMaps) { - warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.'); - } - - didWarnAboutMaps = true; - } - } - - var iterator = iteratorFn.call(iterableChildren); - var step; - var ii = 0; - - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getElementKey(child, ii++); - subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); - } - } else if (type === 'object') { - var childrenString = '' + children; - - { - { - throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead." ); - } - } - } - } - - return subtreeCount; - } - - /** - * Maps children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenmap - * - * The provided mapFunction(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} func The map function. - * @param {*} context Context for mapFunction. - * @return {object} Object containing the ordered map of results. - */ - function mapChildren(children, func, context) { - if (children == null) { - return children; - } - - var result = []; - var count = 0; - mapIntoArray(children, result, '', '', function (child) { - return func.call(context, child, count++); - }); - return result; - } - /** - * Count the number of children that are typically specified as - * `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrencount - * - * @param {?*} children Children tree container. - * @return {number} The number of children. - */ - - - function countChildren(children) { - var n = 0; - mapChildren(children, function () { - n++; // Don't return anything - }); - return n; - } - - /** - * Iterates through children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenforeach - * - * The provided forEachFunc(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc - * @param {*} forEachContext Context for forEachContext. - */ - function forEachChildren(children, forEachFunc, forEachContext) { - mapChildren(children, function () { - forEachFunc.apply(this, arguments); // Don't return anything. - }, forEachContext); - } - /** - * Flatten a children object (typically specified as `props.children`) and - * return an array with appropriately re-keyed children. - * - * See https://reactjs.org/docs/react-api.html#reactchildrentoarray - */ - - - function toArray(children) { - return mapChildren(children, function (child) { - return child; - }) || []; - } - /** - * Returns the first child in a collection of children and verifies that there - * is only one child in the collection. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenonly - * - * The current implementation of this function assumes that a single child gets - * passed without a wrapper, but the purpose of this helper function is to - * abstract away the particular structure of children. - * - * @param {?object} children Child collection structure. - * @return {ReactElement} The first and only `ReactElement` contained in the - * structure. - */ - - - function onlyChild(children) { - if (!isValidElement(children)) { - { - throw Error( "React.Children.only expected to receive a single React element child." ); - } - } - - return children; - } - - function createContext(defaultValue, calculateChangedBits) { - if (calculateChangedBits === undefined) { - calculateChangedBits = null; - } else { - { - if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') { - error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits); - } - } - } - - var context = { - $$typeof: REACT_CONTEXT_TYPE, - _calculateChangedBits: calculateChangedBits, - // As a workaround to support multiple concurrent renderers, we categorize - // some renderers as primary and others as secondary. We only expect - // there to be two concurrent renderers at most: React Native (primary) and - // Fabric (secondary); React DOM (primary) and React ART (secondary). - // Secondary renderers store their context values on separate fields. - _currentValue: defaultValue, - _currentValue2: defaultValue, - // Used to track how many concurrent renderers this context currently - // supports within in a single renderer. Such as parallel server rendering. - _threadCount: 0, - // These are circular - Provider: null, - Consumer: null - }; - context.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: context - }; - var hasWarnedAboutUsingNestedContextConsumers = false; - var hasWarnedAboutUsingConsumerProvider = false; - var hasWarnedAboutDisplayNameOnConsumer = false; - - { - // A separate object, but proxies back to the original context object for - // backwards compatibility. It has a different $$typeof, so we can properly - // warn for the incorrect usage of Context as a Consumer. - var Consumer = { - $$typeof: REACT_CONTEXT_TYPE, - _context: context, - _calculateChangedBits: context._calculateChangedBits - }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here - - Object.defineProperties(Consumer, { - Provider: { - get: function () { - if (!hasWarnedAboutUsingConsumerProvider) { - hasWarnedAboutUsingConsumerProvider = true; - - error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?'); - } - - return context.Provider; - }, - set: function (_Provider) { - context.Provider = _Provider; - } - }, - _currentValue: { - get: function () { - return context._currentValue; - }, - set: function (_currentValue) { - context._currentValue = _currentValue; - } - }, - _currentValue2: { - get: function () { - return context._currentValue2; - }, - set: function (_currentValue2) { - context._currentValue2 = _currentValue2; - } - }, - _threadCount: { - get: function () { - return context._threadCount; - }, - set: function (_threadCount) { - context._threadCount = _threadCount; - } - }, - Consumer: { - get: function () { - if (!hasWarnedAboutUsingNestedContextConsumers) { - hasWarnedAboutUsingNestedContextConsumers = true; - - error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?'); - } - - return context.Consumer; - } - }, - displayName: { - get: function () { - return context.displayName; - }, - set: function (displayName) { - if (!hasWarnedAboutDisplayNameOnConsumer) { - warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName); - - hasWarnedAboutDisplayNameOnConsumer = true; - } - } - } - }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty - - context.Consumer = Consumer; - } - - { - context._currentRenderer = null; - context._currentRenderer2 = null; - } - - return context; - } - - var Uninitialized = -1; - var Pending = 0; - var Resolved = 1; - var Rejected = 2; - - function lazyInitializer(payload) { - if (payload._status === Uninitialized) { - var ctor = payload._result; - var thenable = ctor(); // Transition to the next state. - - var pending = payload; - pending._status = Pending; - pending._result = thenable; - thenable.then(function (moduleObject) { - if (payload._status === Pending) { - var defaultExport = moduleObject.default; - - { - if (defaultExport === undefined) { - error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies. - 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject); - } - } // Transition to the next state. - - - var resolved = payload; - resolved._status = Resolved; - resolved._result = defaultExport; - } - }, function (error) { - if (payload._status === Pending) { - // Transition to the next state. - var rejected = payload; - rejected._status = Rejected; - rejected._result = error; - } - }); - } - - if (payload._status === Resolved) { - return payload._result; - } else { - throw payload._result; - } - } - - function lazy(ctor) { - var payload = { - // We use these fields to store the result. - _status: -1, - _result: ctor - }; - var lazyType = { - $$typeof: REACT_LAZY_TYPE, - _payload: payload, - _init: lazyInitializer - }; - - { - // In production, this would just set it on the object. - var defaultProps; - var propTypes; // $FlowFixMe - - Object.defineProperties(lazyType, { - defaultProps: { - configurable: true, - get: function () { - return defaultProps; - }, - set: function (newDefaultProps) { - error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); - - defaultProps = newDefaultProps; // Match production behavior more closely: - // $FlowFixMe - - Object.defineProperty(lazyType, 'defaultProps', { - enumerable: true - }); - } - }, - propTypes: { - configurable: true, - get: function () { - return propTypes; - }, - set: function (newPropTypes) { - error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); - - propTypes = newPropTypes; // Match production behavior more closely: - // $FlowFixMe - - Object.defineProperty(lazyType, 'propTypes', { - enumerable: true - }); - } - } - }); - } - - return lazyType; - } - - function forwardRef(render) { - { - if (render != null && render.$$typeof === REACT_MEMO_TYPE) { - error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).'); - } else if (typeof render !== 'function') { - error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); - } else { - if (render.length !== 0 && render.length !== 2) { - error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.'); - } - } - - if (render != null) { - if (render.defaultProps != null || render.propTypes != null) { - error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?'); - } - } - } - - var elementType = { - $$typeof: REACT_FORWARD_REF_TYPE, - render: render - }; - - { - var ownName; - Object.defineProperty(elementType, 'displayName', { - enumerable: false, - configurable: true, - get: function () { - return ownName; - }, - set: function (name) { - ownName = name; - - if (render.displayName == null) { - render.displayName = name; - } - } - }); - } - - return elementType; - } - - // Filter certain DOM attributes (e.g. src, href) if their values are empty strings. - - var enableScopeAPI = false; // Experimental Create Event Handle API. - - function isValidElementType(type) { - if (typeof type === 'string' || typeof type === 'function') { - return true; - } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). - - - if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) { - return true; - } - - if (typeof type === 'object' && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) { - return true; - } - } - - return false; - } - - function memo(type, compare) { - { - if (!isValidElementType(type)) { - error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type); - } - } - - var elementType = { - $$typeof: REACT_MEMO_TYPE, - type: type, - compare: compare === undefined ? null : compare - }; - - { - var ownName; - Object.defineProperty(elementType, 'displayName', { - enumerable: false, - configurable: true, - get: function () { - return ownName; - }, - set: function (name) { - ownName = name; - - if (type.displayName == null) { - type.displayName = name; - } - } - }); - } - - return elementType; - } - - function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher.current; - - if (!(dispatcher !== null)) { - { - throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." ); - } - } - - return dispatcher; - } - - function useContext(Context, unstable_observedBits) { - var dispatcher = resolveDispatcher(); - - { - if (unstable_observedBits !== undefined) { - error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : ''); - } // TODO: add a more generic warning for invalid values. - - - if (Context._context !== undefined) { - var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs - // and nobody should be using this in existing code. - - if (realContext.Consumer === Context) { - error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?'); - } else if (realContext.Provider === Context) { - error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?'); - } - } - } - - return dispatcher.useContext(Context, unstable_observedBits); - } - function useState(initialState) { - var dispatcher = resolveDispatcher(); - return dispatcher.useState(initialState); - } - function useReducer(reducer, initialArg, init) { - var dispatcher = resolveDispatcher(); - return dispatcher.useReducer(reducer, initialArg, init); - } - function useRef(initialValue) { - var dispatcher = resolveDispatcher(); - return dispatcher.useRef(initialValue); - } - function useEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useEffect(create, deps); - } - function useLayoutEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useLayoutEffect(create, deps); - } - function useCallback(callback, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useCallback(callback, deps); - } - function useMemo(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useMemo(create, deps); - } - function useImperativeHandle(ref, create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useImperativeHandle(ref, create, deps); - } - function useDebugValue(value, formatterFn) { - { - var dispatcher = resolveDispatcher(); - return dispatcher.useDebugValue(value, formatterFn); - } - } - - // Helpers to patch console.logs to avoid logging during side-effect free - // replaying on render function. This currently only patches the object - // lazily which won't cover if the log function was extracted eagerly. - // We could also eagerly patch the method. - var disabledDepth = 0; - var prevLog; - var prevInfo; - var prevWarn; - var prevError; - var prevGroup; - var prevGroupCollapsed; - var prevGroupEnd; - - function disabledLog() {} - - disabledLog.__reactDisabledLog = true; - function disableLogs() { - { - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 - - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - /* eslint-enable react-internal/no-production-logging */ - } - - disabledDepth++; - } - } - function reenableLogs() { - { - disabledDepth--; - - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - var props = { - configurable: true, - enumerable: true, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - log: assign({}, props, { - value: prevLog - }), - info: assign({}, props, { - value: prevInfo - }), - warn: assign({}, props, { - value: prevWarn - }), - error: assign({}, props, { - value: prevError - }), - group: assign({}, props, { - value: prevGroup - }), - groupCollapsed: assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: assign({}, props, { - value: prevGroupEnd - }) - }); - /* eslint-enable react-internal/no-production-logging */ - } - - if (disabledDepth < 0) { - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); - } - } - } - - var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; - var prefix; - function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === undefined) { - // Extract the VM specific prefix used by each line. - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ''; - } - } // We use the prefix to ensure our stacks line up with native stack frames. - - - return '\n' + prefix + name; - } - } - var reentry = false; - var componentFrameCache; - - { - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); - } - - function describeNativeComponentFrame(fn, construct) { - // If something asked for a stack inside a fake render, it should get ignored. - if (!fn || reentry) { - return ''; - } - - { - var frame = componentFrameCache.get(fn); - - if (frame !== undefined) { - return frame; - } - } - - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. - - Error.prepareStackTrace = undefined; - var previousDispatcher; - - { - previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function - // for warnings. - - ReactCurrentDispatcher$1.current = null; - disableLogs(); - } - - try { - // This should throw. - if (construct) { - // Something should be setting the props in the constructor. - var Fake = function () { - throw Error(); - }; // $FlowFixMe - - - Object.defineProperty(Fake.prototype, 'props', { - set: function () { - // We use a throwing setter instead of frozen or non-writable props - // because that won't throw in a non-strict mode function. - throw Error(); - } - }); - - if (typeof Reflect === 'object' && Reflect.construct) { - // We construct a different control for this case to include any extra - // frames added by the construct call. - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - - fn(); - } - } catch (sample) { - // This is inlined manually because closure doesn't do it for us. - if (sample && control && typeof sample.stack === 'string') { - // This extracts the first frame from the sample that isn't also in the control. - // Skipping one frame that we assume is the frame that calls the two. - var sampleLines = sample.stack.split('\n'); - var controlLines = control.stack.split('\n'); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - // We expect at least one stack frame to be shared. - // Typically this will be the root most one. However, stack frames may be - // cut off due to maximum stack limits. In this case, one maybe cut off - // earlier than the other. We assume that the sample is longer or the same - // and there for cut off earlier. So we should find the root most frame in - // the sample somewhere in the control. - c--; - } - - for (; s >= 1 && c >= 0; s--, c--) { - // Next we find the first one that isn't the same which should be the - // frame that called our sample function and the control. - if (sampleLines[s] !== controlLines[c]) { - // In V8, the first line is describing the message but other VMs don't. - // If we're about to return the first line, and the control is also on the same - // line, that's a pretty good indicator that our sample threw at same line as - // the control. I.e. before we entered the sample frame. So we ignore this result. - // This can happen if you passed a class to function component, or non-function. - if (s !== 1 || c !== 1) { - do { - s--; - c--; // We may still have similar intermediate frames from the construct call. - // The next one that isn't the same should be our match though. - - if (c < 0 || sampleLines[s] !== controlLines[c]) { - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, _frame); - } - } // Return the line we found. - - - return _frame; - } - } while (s >= 1 && c >= 0); - } - - break; - } - } - } - } finally { - reentry = false; - - { - ReactCurrentDispatcher$1.current = previousDispatcher; - reenableLogs(); - } - - Error.prepareStackTrace = previousPrepareStackTrace; - } // Fallback to just using the name if we couldn't make it throw. - - - var name = fn ? fn.displayName || fn.name : ''; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, syntheticFrame); - } - } - - return syntheticFrame; - } - function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } - } - - function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); - } - - function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - - if (type == null) { - return ''; - } - - if (typeof type === 'function') { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - - if (typeof type === 'string') { - return describeBuiltInComponentFrame(type); - } - - switch (type) { - case exports.Suspense: - return describeBuiltInComponentFrame('Suspense'); - - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame('SuspenseList'); - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - - case REACT_MEMO_TYPE: - // Memo may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - - case REACT_BLOCK_TYPE: - return describeFunctionComponentFrame(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - // Lazy may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) {} - } - } - } - - return ''; - } - - var loggedTypeFailures = {}; - var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - - function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); - } - } - } - - function checkPropTypes(typeSpecs, values, location, componentName, element) { - { - // $FlowFixMe This is okay but Flow doesn't know it. - var has = Function.call.bind(Object.prototype.hasOwnProperty); - - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); - err.name = 'Invariant Violation'; - throw err; - } - - error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); - } catch (ex) { - error$1 = ex; - } - - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - - error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); - - setCurrentlyValidatingElement(null); - } - - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - - error('Failed %s type: %s', location, error$1.message); - - setCurrentlyValidatingElement(null); - } - } - } - } - } - - function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - setExtraStackFrame(stack); - } else { - setExtraStackFrame(null); - } - } - } - - var propTypesMisspellWarningShown; - - { - propTypesMisspellWarningShown = false; - } - - function getDeclarationErrorAddendum() { - if (ReactCurrentOwner.current) { - var name = getComponentName(ReactCurrentOwner.current.type); - - if (name) { - return '\n\nCheck the render method of `' + name + '`.'; - } - } - - return ''; - } - - function getSourceInfoErrorAddendum(source) { - if (source !== undefined) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ''); - var lineNumber = source.lineNumber; - return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; - } - - return ''; - } - - function getSourceInfoErrorAddendumForProps(elementProps) { - if (elementProps !== null && elementProps !== undefined) { - return getSourceInfoErrorAddendum(elementProps.__source); - } - - return ''; - } - /** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ - - - var ownerHasKeyUseWarning = {}; - - function getCurrentComponentErrorInfo(parentType) { - var info = getDeclarationErrorAddendum(); - - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } - } - - return info; - } - /** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. - * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. - */ - - - function validateExplicitKey(element, parentType) { - if (!element._store || element._store.validated || element.key != null) { - return; - } - - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a - // property, it may be the creator of the child that's responsible for - // assigning it a key. - - var childOwner = ''; - - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { - // Give the component that originally created this child. - childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; - } - - { - setCurrentlyValidatingElement$1(element); - - error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - - setCurrentlyValidatingElement$1(null); - } - } - /** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. - * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. - */ - - - function validateChildKeys(node, parentType) { - if (typeof node !== 'object') { - return; - } - - if (Array.isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - - if (typeof iteratorFn === 'function') { - // Entry iterators used to provide implicit keys, - // but now we print a separate warning for them later. - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } - } - } - } - } - /** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. - * - * @param {ReactElement} element - */ - - - function validatePropTypes(element) { - { - var type = element.type; - - if (type === null || type === undefined || typeof type === 'string') { - return; - } - - var propTypes; - - if (typeof type === 'function') { - propTypes = type.propTypes; - } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes = type.propTypes; - } else { - return; - } - - if (propTypes) { - // Intentionally inside to avoid triggering lazy initializers: - var name = getComponentName(type); - checkPropTypes(propTypes, element.props, 'prop', name, element); - } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: - - var _name = getComponentName(type); - - error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); - } - - if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { - error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); - } - } - } - /** - * Given a fragment, validate that it can only be provided with fragment props - * @param {ReactElement} fragment - */ - - - function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== 'children' && key !== 'key') { - setCurrentlyValidatingElement$1(fragment); - - error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); - - setCurrentlyValidatingElement$1(null); - break; - } - } - - if (fragment.ref !== null) { - setCurrentlyValidatingElement$1(fragment); - - error('Invalid attribute `ref` supplied to `React.Fragment`.'); - - setCurrentlyValidatingElement$1(null); - } - } - } - function createElementWithValidation(type, props, children) { - var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - - if (!validType) { - var info = ''; - - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; - } - - var sourceInfo = getSourceInfoErrorAddendumForProps(props); - - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - - var typeString; - - if (type === null) { - typeString = 'null'; - } else if (Array.isArray(type)) { - typeString = 'array'; - } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />"; - info = ' Did you accidentally export a JSX literal instead of a component?'; - } else { - typeString = typeof type; - } - - { - error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); - } - } - - var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - - if (element == null) { - return element; - } // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - - - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); - } - } - - if (type === exports.Fragment) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - - return element; - } - var didWarnAboutDeprecatedCreateFactory = false; - function createFactoryWithValidation(type) { - var validatedFactory = createElementWithValidation.bind(null, type); - validatedFactory.type = type; - - { - if (!didWarnAboutDeprecatedCreateFactory) { - didWarnAboutDeprecatedCreateFactory = true; - - warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.'); - } // Legacy hook: remove it - - - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function () { - warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); - - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } - }); - } - - return validatedFactory; - } - function cloneElementWithValidation(element, props, children) { - var newElement = cloneElement.apply(this, arguments); - - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], newElement.type); - } - - validatePropTypes(newElement); - return newElement; - } - - var enableSchedulerDebugging = false; - var enableProfiling = false; - - var requestHostCallback; - var requestHostTimeout; - var cancelHostTimeout; - var shouldYieldToHost; - var requestPaint; - var getCurrentTime; - var forceFrameRate; - var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function'; - - if (hasPerformanceNow) { - var localPerformance = performance; - - getCurrentTime = function () { - return localPerformance.now(); - }; - } else { - var localDate = Date; - var initialTime = localDate.now(); - - getCurrentTime = function () { - return localDate.now() - initialTime; - }; - } - - if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive - // implementation using setTimeout. - typeof window === 'undefined' || // Check if MessageChannel is supported, too. - typeof MessageChannel !== 'function') { - // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore, - // fallback to a naive implementation. - var _callback = null; - var _timeoutID = null; - - var _flushCallback = function () { - if (_callback !== null) { - try { - var currentTime = getCurrentTime(); - var hasRemainingTime = true; - - _callback(hasRemainingTime, currentTime); - - _callback = null; - } catch (e) { - setTimeout(_flushCallback, 0); - throw e; - } - } - }; - - requestHostCallback = function (cb) { - if (_callback !== null) { - // Protect against re-entrancy. - setTimeout(requestHostCallback, 0, cb); - } else { - _callback = cb; - setTimeout(_flushCallback, 0); - } - }; - - requestHostTimeout = function (cb, ms) { - _timeoutID = setTimeout(cb, ms); - }; - - cancelHostTimeout = function () { - clearTimeout(_timeoutID); - }; - - shouldYieldToHost = function () { - return false; - }; - - requestPaint = forceFrameRate = function () {}; - } else { - // Capture local references to native APIs, in case a polyfill overrides them. - var _setTimeout = window.setTimeout; - var _clearTimeout = window.clearTimeout; - - if (typeof console !== 'undefined') { - // TODO: Scheduler no longer requires these methods to be polyfilled. But - // maybe we want to continue warning if they don't exist, to preserve the - // option to rely on it in the future? - var requestAnimationFrame = window.requestAnimationFrame; - var cancelAnimationFrame = window.cancelAnimationFrame; - - if (typeof requestAnimationFrame !== 'function') { - // Using console['error'] to evade Babel and ESLint - console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills'); - } - - if (typeof cancelAnimationFrame !== 'function') { - // Using console['error'] to evade Babel and ESLint - console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills'); - } - } - - var isMessageLoopRunning = false; - var scheduledHostCallback = null; - var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main - // thread, like user events. By default, it yields multiple times per frame. - // It does not attempt to align with frame boundaries, since most tasks don't - // need to be frame aligned; for those that do, use requestAnimationFrame. - - var yieldInterval = 5; - var deadline = 0; // TODO: Make this configurable - - { - // `isInputPending` is not available. Since we have no way of knowing if - // there's pending input, always yield at the end of the frame. - shouldYieldToHost = function () { - return getCurrentTime() >= deadline; - }; // Since we yield every frame regardless, `requestPaint` has no effect. - - - requestPaint = function () {}; - } - - forceFrameRate = function (fps) { - if (fps < 0 || fps > 125) { - // Using console['error'] to evade Babel and ESLint - console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported'); - return; - } - - if (fps > 0) { - yieldInterval = Math.floor(1000 / fps); - } else { - // reset the framerate - yieldInterval = 5; - } - }; - - var performWorkUntilDeadline = function () { - if (scheduledHostCallback !== null) { - var currentTime = getCurrentTime(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync - // cycle. This means there's always time remaining at the beginning of - // the message event. - - deadline = currentTime + yieldInterval; - var hasTimeRemaining = true; - - try { - var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); - - if (!hasMoreWork) { - isMessageLoopRunning = false; - scheduledHostCallback = null; - } else { - // If there's more work, schedule the next message event at the end - // of the preceding one. - port.postMessage(null); - } - } catch (error) { - // If a scheduler task throws, exit the current browser task so the - // error can be observed. - port.postMessage(null); - throw error; - } - } else { - isMessageLoopRunning = false; - } // Yielding to the browser will give it a chance to paint, so we can - }; - - var channel = new MessageChannel(); - var port = channel.port2; - channel.port1.onmessage = performWorkUntilDeadline; - - requestHostCallback = function (callback) { - scheduledHostCallback = callback; - - if (!isMessageLoopRunning) { - isMessageLoopRunning = true; - port.postMessage(null); - } - }; - - requestHostTimeout = function (callback, ms) { - taskTimeoutID = _setTimeout(function () { - callback(getCurrentTime()); - }, ms); - }; - - cancelHostTimeout = function () { - _clearTimeout(taskTimeoutID); - - taskTimeoutID = -1; - }; - } - - function push(heap, node) { - var index = heap.length; - heap.push(node); - siftUp(heap, node, index); - } - function peek(heap) { - var first = heap[0]; - return first === undefined ? null : first; - } - function pop(heap) { - var first = heap[0]; - - if (first !== undefined) { - var last = heap.pop(); - - if (last !== first) { - heap[0] = last; - siftDown(heap, last, 0); - } - - return first; - } else { - return null; - } - } - - function siftUp(heap, node, i) { - var index = i; - - while (true) { - var parentIndex = index - 1 >>> 1; - var parent = heap[parentIndex]; - - if (parent !== undefined && compare(parent, node) > 0) { - // The parent is larger. Swap positions. - heap[parentIndex] = node; - heap[index] = parent; - index = parentIndex; - } else { - // The parent is smaller. Exit. - return; - } - } - } - - function siftDown(heap, node, i) { - var index = i; - var length = heap.length; - - while (index < length) { - var leftIndex = (index + 1) * 2 - 1; - var left = heap[leftIndex]; - var rightIndex = leftIndex + 1; - var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. - - if (left !== undefined && compare(left, node) < 0) { - if (right !== undefined && compare(right, left) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - heap[index] = left; - heap[leftIndex] = node; - index = leftIndex; - } - } else if (right !== undefined && compare(right, node) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - // Neither child is smaller. Exit. - return; - } - } - } - - function compare(a, b) { - // Compare sort index first, then task id. - var diff = a.sortIndex - b.sortIndex; - return diff !== 0 ? diff : a.id - b.id; - } - - // TODO: Use symbols? - var ImmediatePriority = 1; - var UserBlockingPriority = 2; - var NormalPriority = 3; - var LowPriority = 4; - var IdlePriority = 5; - - function markTaskErrored(task, ms) { - } - - /* eslint-disable no-var */ - // Math.pow(2, 30) - 1 - // 0b111111111111111111111111111111 - - var maxSigned31BitInt = 1073741823; // Times out immediately - - var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out - - var USER_BLOCKING_PRIORITY_TIMEOUT = 250; - var NORMAL_PRIORITY_TIMEOUT = 5000; - var LOW_PRIORITY_TIMEOUT = 10000; // Never times out - - var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap - - var taskQueue = []; - var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. - - var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. - var currentTask = null; - var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy. - - var isPerformingWork = false; - var isHostCallbackScheduled = false; - var isHostTimeoutScheduled = false; - - function advanceTimers(currentTime) { - // Check for tasks that are no longer delayed and add them to the queue. - var timer = peek(timerQueue); - - while (timer !== null) { - if (timer.callback === null) { - // Timer was cancelled. - pop(timerQueue); - } else if (timer.startTime <= currentTime) { - // Timer fired. Transfer to the task queue. - pop(timerQueue); - timer.sortIndex = timer.expirationTime; - push(taskQueue, timer); - } else { - // Remaining timers are pending. - return; - } - - timer = peek(timerQueue); - } - } - - function handleTimeout(currentTime) { - isHostTimeoutScheduled = false; - advanceTimers(currentTime); - - if (!isHostCallbackScheduled) { - if (peek(taskQueue) !== null) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } else { - var firstTimer = peek(timerQueue); - - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - } - } - } - - function flushWork(hasTimeRemaining, initialTime) { - - - isHostCallbackScheduled = false; - - if (isHostTimeoutScheduled) { - // We scheduled a timeout but it's no longer needed. Cancel it. - isHostTimeoutScheduled = false; - cancelHostTimeout(); - } - - isPerformingWork = true; - var previousPriorityLevel = currentPriorityLevel; - - try { - if (enableProfiling) { - try { - return workLoop(hasTimeRemaining, initialTime); - } catch (error) { - if (currentTask !== null) { - var currentTime = getCurrentTime(); - markTaskErrored(currentTask, currentTime); - currentTask.isQueued = false; - } - - throw error; - } - } else { - // No catch in prod code path. - return workLoop(hasTimeRemaining, initialTime); - } - } finally { - currentTask = null; - currentPriorityLevel = previousPriorityLevel; - isPerformingWork = false; - } - } - - function workLoop(hasTimeRemaining, initialTime) { - var currentTime = initialTime; - advanceTimers(currentTime); - currentTask = peek(taskQueue); - - while (currentTask !== null && !(enableSchedulerDebugging )) { - if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { - // This currentTask hasn't expired, and we've reached the deadline. - break; - } - - var callback = currentTask.callback; - - if (typeof callback === 'function') { - currentTask.callback = null; - currentPriorityLevel = currentTask.priorityLevel; - var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; - - var continuationCallback = callback(didUserCallbackTimeout); - currentTime = getCurrentTime(); - - if (typeof continuationCallback === 'function') { - currentTask.callback = continuationCallback; - } else { - - if (currentTask === peek(taskQueue)) { - pop(taskQueue); - } - } - - advanceTimers(currentTime); - } else { - pop(taskQueue); - } - - currentTask = peek(taskQueue); - } // Return whether there's additional work - - - if (currentTask !== null) { - return true; - } else { - var firstTimer = peek(timerQueue); - - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - - return false; - } - } - - function unstable_runWithPriority(priorityLevel, eventHandler) { - switch (priorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - case LowPriority: - case IdlePriority: - break; - - default: - priorityLevel = NormalPriority; - } - - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - } - - function unstable_next(eventHandler) { - var priorityLevel; - - switch (currentPriorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - // Shift down to normal priority - priorityLevel = NormalPriority; - break; - - default: - // Anything lower than normal priority should remain at the current level. - priorityLevel = currentPriorityLevel; - break; - } - - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - } - - function unstable_wrapCallback(callback) { - var parentPriorityLevel = currentPriorityLevel; - return function () { - // This is a fork of runWithPriority, inlined for performance. - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = parentPriorityLevel; - - try { - return callback.apply(this, arguments); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - }; - } - - function unstable_scheduleCallback(priorityLevel, callback, options) { - var currentTime = getCurrentTime(); - var startTime; - - if (typeof options === 'object' && options !== null) { - var delay = options.delay; - - if (typeof delay === 'number' && delay > 0) { - startTime = currentTime + delay; - } else { - startTime = currentTime; - } - } else { - startTime = currentTime; - } - - var timeout; - - switch (priorityLevel) { - case ImmediatePriority: - timeout = IMMEDIATE_PRIORITY_TIMEOUT; - break; - - case UserBlockingPriority: - timeout = USER_BLOCKING_PRIORITY_TIMEOUT; - break; - - case IdlePriority: - timeout = IDLE_PRIORITY_TIMEOUT; - break; - - case LowPriority: - timeout = LOW_PRIORITY_TIMEOUT; - break; - - case NormalPriority: - default: - timeout = NORMAL_PRIORITY_TIMEOUT; - break; - } - - var expirationTime = startTime + timeout; - var newTask = { - id: taskIdCounter++, - callback: callback, - priorityLevel: priorityLevel, - startTime: startTime, - expirationTime: expirationTime, - sortIndex: -1 - }; - - if (startTime > currentTime) { - // This is a delayed task. - newTask.sortIndex = startTime; - push(timerQueue, newTask); - - if (peek(taskQueue) === null && newTask === peek(timerQueue)) { - // All tasks are delayed, and this is the task with the earliest delay. - if (isHostTimeoutScheduled) { - // Cancel an existing timeout. - cancelHostTimeout(); - } else { - isHostTimeoutScheduled = true; - } // Schedule a timeout. - - - requestHostTimeout(handleTimeout, startTime - currentTime); - } - } else { - newTask.sortIndex = expirationTime; - push(taskQueue, newTask); - // wait until the next time we yield. - - - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } - } - - return newTask; - } - - function unstable_pauseExecution() { - } - - function unstable_continueExecution() { - - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } - } - - function unstable_getFirstCallbackNode() { - return peek(taskQueue); - } - - function unstable_cancelCallback(task) { - // remove from the queue because you can't remove arbitrary nodes from an - // array based heap, only the first one.) - - - task.callback = null; - } - - function unstable_getCurrentPriorityLevel() { - return currentPriorityLevel; - } - - var unstable_requestPaint = requestPaint; - var unstable_Profiling = null; - - - - var Scheduler = /*#__PURE__*/Object.freeze({ - __proto__: null, - unstable_ImmediatePriority: ImmediatePriority, - unstable_UserBlockingPriority: UserBlockingPriority, - unstable_NormalPriority: NormalPriority, - unstable_IdlePriority: IdlePriority, - unstable_LowPriority: LowPriority, - unstable_runWithPriority: unstable_runWithPriority, - unstable_next: unstable_next, - unstable_scheduleCallback: unstable_scheduleCallback, - unstable_cancelCallback: unstable_cancelCallback, - unstable_wrapCallback: unstable_wrapCallback, - unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel, - get unstable_shouldYield () { return shouldYieldToHost; }, - unstable_requestPaint: unstable_requestPaint, - unstable_continueExecution: unstable_continueExecution, - unstable_pauseExecution: unstable_pauseExecution, - unstable_getFirstCallbackNode: unstable_getFirstCallbackNode, - get unstable_now () { return getCurrentTime; }, - get unstable_forceFrameRate () { return forceFrameRate; }, - unstable_Profiling: unstable_Profiling - }); - - var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs. - - var interactionIDCounter = 0; - var threadIDCounter = 0; // Set of currently traced interactions. - // Interactions "stack"– - // Meaning that newly traced interactions are appended to the previously active set. - // When an interaction goes out of scope, the previous set (if any) is restored. - - var interactionsRef = null; // Listener(s) to notify when interactions begin and end. - - var subscriberRef = null; - - { - interactionsRef = { - current: new Set() - }; - subscriberRef = { - current: null - }; - } - function unstable_clear(callback) { - - var prevInteractions = interactionsRef.current; - interactionsRef.current = new Set(); - - try { - return callback(); - } finally { - interactionsRef.current = prevInteractions; - } - } - function unstable_getCurrent() { - { - return interactionsRef.current; - } - } - function unstable_getThreadID() { - return ++threadIDCounter; - } - function unstable_trace(name, timestamp, callback) { - var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID; - - var interaction = { - __count: 1, - id: interactionIDCounter++, - name: name, - timestamp: timestamp - }; - var prevInteractions = interactionsRef.current; // Traced interactions should stack/accumulate. - // To do that, clone the current interactions. - // The previous set will be restored upon completion. - - var interactions = new Set(prevInteractions); - interactions.add(interaction); - interactionsRef.current = interactions; - var subscriber = subscriberRef.current; - var returnValue; - - try { - if (subscriber !== null) { - subscriber.onInteractionTraced(interaction); - } - } finally { - try { - if (subscriber !== null) { - subscriber.onWorkStarted(interactions, threadID); - } - } finally { - try { - returnValue = callback(); - } finally { - interactionsRef.current = prevInteractions; - - try { - if (subscriber !== null) { - subscriber.onWorkStopped(interactions, threadID); - } - } finally { - interaction.__count--; // If no async work was scheduled for this interaction, - // Notify subscribers that it's completed. - - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - } - } - } - } - - return returnValue; - } - function unstable_wrap(callback) { - var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID; - - var wrappedInteractions = interactionsRef.current; - var subscriber = subscriberRef.current; - - if (subscriber !== null) { - subscriber.onWorkScheduled(wrappedInteractions, threadID); - } // Update the pending async work count for the current interactions. - // Update after calling subscribers in case of error. - - - wrappedInteractions.forEach(function (interaction) { - interaction.__count++; - }); - var hasRun = false; - - function wrapped() { - var prevInteractions = interactionsRef.current; - interactionsRef.current = wrappedInteractions; - subscriber = subscriberRef.current; - - try { - var returnValue; - - try { - if (subscriber !== null) { - subscriber.onWorkStarted(wrappedInteractions, threadID); - } - } finally { - try { - returnValue = callback.apply(undefined, arguments); - } finally { - interactionsRef.current = prevInteractions; - - if (subscriber !== null) { - subscriber.onWorkStopped(wrappedInteractions, threadID); - } - } - } - - return returnValue; - } finally { - if (!hasRun) { - // We only expect a wrapped function to be executed once, - // But in the event that it's executed more than once– - // Only decrement the outstanding interaction counts once. - hasRun = true; // Update pending async counts for all wrapped interactions. - // If this was the last scheduled async work for any of them, - // Mark them as completed. - - wrappedInteractions.forEach(function (interaction) { - interaction.__count--; - - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - } - } - - wrapped.cancel = function cancel() { - subscriber = subscriberRef.current; - - try { - if (subscriber !== null) { - subscriber.onWorkCanceled(wrappedInteractions, threadID); - } - } finally { - // Update pending async counts for all wrapped interactions. - // If this was the last scheduled async work for any of them, - // Mark them as completed. - wrappedInteractions.forEach(function (interaction) { - interaction.__count--; - - if (subscriber && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - }; - - return wrapped; - } - - var subscribers = null; - - { - subscribers = new Set(); - } - - function unstable_subscribe(subscriber) { - { - subscribers.add(subscriber); - - if (subscribers.size === 1) { - subscriberRef.current = { - onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted, - onInteractionTraced: onInteractionTraced, - onWorkCanceled: onWorkCanceled, - onWorkScheduled: onWorkScheduled, - onWorkStarted: onWorkStarted, - onWorkStopped: onWorkStopped - }; - } - } - } - function unstable_unsubscribe(subscriber) { - { - subscribers.delete(subscriber); - - if (subscribers.size === 0) { - subscriberRef.current = null; - } - } - } - - function onInteractionTraced(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onInteractionTraced(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onInteractionScheduledWorkCompleted(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkScheduled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkScheduled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkStarted(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkStarted(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkStopped(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkStopped(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - function onWorkCanceled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkCanceled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } - } - - - - var SchedulerTracing = /*#__PURE__*/Object.freeze({ - __proto__: null, - get __interactionsRef () { return interactionsRef; }, - get __subscriberRef () { return subscriberRef; }, - unstable_clear: unstable_clear, - unstable_getCurrent: unstable_getCurrent, - unstable_getThreadID: unstable_getThreadID, - unstable_trace: unstable_trace, - unstable_wrap: unstable_wrap, - unstable_subscribe: unstable_subscribe, - unstable_unsubscribe: unstable_unsubscribe - }); - - var ReactSharedInternals$1 = { - ReactCurrentDispatcher: ReactCurrentDispatcher, - ReactCurrentOwner: ReactCurrentOwner, - IsSomeRendererActing: IsSomeRendererActing, - ReactCurrentBatchConfig: ReactCurrentBatchConfig, - // Used by renderers to avoid bundling object-assign twice in UMD bundles: - assign: assign, - // Re-export the schedule API(s) for UMD bundles. - // This avoids introducing a dependency on a new UMD global in a minor update, - // Since that would be a breaking change (e.g. for all existing CodeSandboxes). - // This re-export is only required for UMD bundles; - // CJS bundles use the shared NPM package. - Scheduler: Scheduler, - SchedulerTracing: SchedulerTracing - }; - - { - ReactSharedInternals$1.ReactDebugCurrentFrame = ReactDebugCurrentFrame; - } - - { - - try { - var frozenObject = Object.freeze({}); - /* eslint-disable no-new */ - - new Map([[frozenObject, null]]); - new Set([frozenObject]); - /* eslint-enable no-new */ - } catch (e) { - } - } - - var createElement$1 = createElementWithValidation ; - var cloneElement$1 = cloneElementWithValidation ; - var createFactory = createFactoryWithValidation ; - var Children = { - map: mapChildren, - forEach: forEachChildren, - count: countChildren, - toArray: toArray, - only: onlyChild - }; - - exports.Children = Children; - exports.Component = Component; - exports.PureComponent = PureComponent; - exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals$1; - exports.cloneElement = cloneElement$1; - exports.createContext = createContext; - exports.createElement = createElement$1; - exports.createFactory = createFactory; - exports.createRef = createRef; - exports.forwardRef = forwardRef; - exports.isValidElement = isValidElement; - exports.lazy = lazy; - exports.memo = memo; - exports.useCallback = useCallback; - exports.useContext = useContext; - exports.useDebugValue = useDebugValue; - exports.useEffect = useEffect; - exports.useImperativeHandle = useImperativeHandle; - exports.useLayoutEffect = useLayoutEffect; - exports.useMemo = useMemo; - exports.useReducer = useReducer; - exports.useRef = useRef; - exports.useState = useState; - exports.version = ReactVersion; - -}))); diff --git a/res/script/react.production.min.js b/res/script/react.production.min.js deleted file mode 100644 index 95f2ce7af..000000000 --- a/res/script/react.production.min.js +++ /dev/null @@ -1,31 +0,0 @@ -/** @license React v17.0.2 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=Y&&a[Y]||a["@@iterator"];return"function"===typeof a?a:null}function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,e=1;e<arguments.length;e++)b+="&args[]="+encodeURIComponent(arguments[e]);return"Minified React error #"+ -a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function v(a,b,e){this.props=a;this.context=b;this.refs=Z;this.updater=e||aa}function ba(){}function K(a,b,e){this.props=a;this.context=b;this.refs=Z;this.updater=e||aa}function ca(a,b,e){var l,f={},c=null,da=null;if(null!=b)for(l in void 0!==b.ref&&(da=b.ref),void 0!==b.key&&(c=""+b.key),b)ea.call(b,l)&&!fa.hasOwnProperty(l)&&(f[l]=b[l]);var k=arguments.length-2;if(1=== -k)f.children=e;else if(1<k){for(var h=Array(k),d=0;d<k;d++)h[d]=arguments[d+2];f.children=h}if(a&&a.defaultProps)for(l in k=a.defaultProps,k)void 0===f[l]&&(f[l]=k[l]);return{$$typeof:w,type:a,key:c,ref:da,props:f,_owner:L.current}}function va(a,b){return{$$typeof:w,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===w}function wa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function N(a,b){return"object"=== -typeof a&&null!==a&&null!=a.key?wa(""+a.key):b.toString(36)}function C(a,b,e,l,f){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var d=!1;if(null===a)d=!0;else switch(c){case "string":case "number":d=!0;break;case "object":switch(a.$$typeof){case w:case ha:d=!0}}if(d)return d=a,f=f(d),a=""===l?"."+N(d,0):l,Array.isArray(f)?(e="",null!=a&&(e=a.replace(ia,"$&/")+"/"),C(f,b,e,"",function(a){return a})):null!=f&&(M(f)&&(f=va(f,e+(!f.key||d&&d.key===f.key?"":(""+f.key).replace(ia,"$&/")+"/")+ -a)),b.push(f)),1;d=0;l=""===l?".":l+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){c=a[k];var h=l+N(c,k);d+=C(c,b,e,h,f)}else if(h=x(a),"function"===typeof h)for(a=h.call(a),k=0;!(c=a.next()).done;)c=c.value,h=l+N(c,k++),d+=C(c,b,e,h,f);else if("object"===c)throw b=""+a,Error(y(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return d}function D(a,b,e){if(null==a)return a;var l=[],c=0;C(a,l,"","",function(a){return b.call(e,a,c++)});return l}function xa(a){if(-1=== -a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}function n(){var a=ja.current;if(null===a)throw Error(y(321));return a}function O(a,b){var e=a.length;a.push(b);a:for(;;){var c=e-1>>>1,f=a[c];if(void 0!==f&&0<E(f,b))a[c]=b,a[e]=f,e=c;else break a}}function p(a){a=a[0];return void 0===a?null:a}function F(a){var b= -a[0];if(void 0!==b){var e=a.pop();if(e!==b){a[0]=e;a:for(var c=0,f=a.length;c<f;){var d=2*(c+1)-1,g=a[d],k=d+1,h=a[k];if(void 0!==g&&0>E(g,e))void 0!==h&&0>E(h,g)?(a[c]=h,a[k]=e,c=k):(a[c]=g,a[d]=e,c=d);else if(void 0!==h&&0>E(h,e))a[c]=h,a[k]=e,c=k;else break a}}return b}return null}function E(a,b){var e=a.sortIndex-b.sortIndex;return 0!==e?e:a.id-b.id}function P(a){for(var b=p(r);null!==b;){if(null===b.callback)F(r);else if(b.startTime<=a)F(r),b.sortIndex=b.expirationTime,O(q,b);else break;b=p(r)}} -function Q(a){z=!1;P(a);if(!u)if(null!==p(q))u=!0,A(R);else{var b=p(r);null!==b&&G(Q,b.startTime-a)}}function R(a,b){u=!1;z&&(z=!1,S());H=!0;var e=g;try{P(b);for(m=p(q);null!==m&&(!(m.expirationTime>b)||a&&!T());){var c=m.callback;if("function"===typeof c){m.callback=null;g=m.priorityLevel;var f=c(m.expirationTime<=b);b=t();"function"===typeof f?m.callback=f:m===p(q)&&F(q);P(b)}else F(q);m=p(q)}if(null!==m)var d=!0;else{var n=p(r);null!==n&&G(Q,n.startTime-b);d=!1}return d}finally{m=null,g=e,H=!1}} -var w=60103,ha=60106;c.Fragment=60107;c.StrictMode=60108;c.Profiler=60114;var ka=60109,la=60110,ma=60112;c.Suspense=60113;var na=60115,oa=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;w=d("react.element");ha=d("react.portal");c.Fragment=d("react.fragment");c.StrictMode=d("react.strict_mode");c.Profiler=d("react.profiler");ka=d("react.provider");la=d("react.context");ma=d("react.forward_ref");c.Suspense=d("react.suspense");na=d("react.memo");oa=d("react.lazy")}var Y="function"=== -typeof Symbol&&Symbol.iterator,ya=Object.prototype.hasOwnProperty,U=Object.assign||function(a,b){if(null==a)throw new TypeError("Object.assign target cannot be null or undefined");for(var e=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(null!=d){var g=void 0;d=Object(d);for(g in d)ya.call(d,g)&&(e[g]=d[g])}}return e},aa={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}},Z={};v.prototype.isReactComponent= -{};v.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(y(85));this.updater.enqueueSetState(this,a,b,"setState")};v.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};ba.prototype=v.prototype;d=K.prototype=new ba;d.constructor=K;U(d,v.prototype);d.isPureReactComponent=!0;var L={current:null},ea=Object.prototype.hasOwnProperty,fa={key:!0,ref:!0,__self:!0,__source:!0},ia=/\/+/g,ja={current:null},V;if("object"===typeof performance&& -"function"===typeof performance.now){var za=performance;var t=function(){return za.now()}}else{var pa=Date,Aa=pa.now();t=function(){return pa.now()-Aa}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var B=null,qa=null,ra=function(){if(null!==B)try{var a=t();B(!0,a);B=null}catch(b){throw setTimeout(ra,0),b;}};var A=function(a){null!==B?setTimeout(A,0,a):(B=a,setTimeout(ra,0))};var G=function(a,b){qa=setTimeout(a,b)};var S=function(){clearTimeout(qa)};var T=function(){return!1}; -d=V=function(){}}else{var Ba=window.setTimeout,Ca=window.clearTimeout;"undefined"!==typeof console&&(d=window.cancelAnimationFrame,"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof d&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")); -var I=!1,J=null,W=-1,sa=5,ta=0;T=function(){return t()>=ta};d=function(){};V=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):sa=0<a?Math.floor(1E3/a):5};var ua=new MessageChannel,X=ua.port2;ua.port1.onmessage=function(){if(null!==J){var a=t();ta=a+sa;try{J(!0,a)?X.postMessage(null):(I=!1,J=null)}catch(b){throw X.postMessage(null),b;}}else I=!1};A=function(a){J=a;I||(I=!0,X.postMessage(null))};G= -function(a,b){W=Ba(function(){a(t())},b)};S=function(){Ca(W);W=-1}}var q=[],r=[],Da=1,m=null,g=3,H=!1,u=!1,z=!1,Ea=0;d={ReactCurrentDispatcher:ja,ReactCurrentOwner:L,IsSomeRendererActing:{current:!1},ReactCurrentBatchConfig:{transition:0},assign:U,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a= -3}var c=g;g=a;try{return b()}finally{g=c}},unstable_next:function(a){switch(g){case 1:case 2:case 3:var b=3;break;default:b=g}var c=g;g=b;try{return a()}finally{g=c}},unstable_scheduleCallback:function(a,b,c){var d=t();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:Da++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex= -c,O(r,a),null===p(q)&&a===p(r)&&(z?S():z=!0,G(Q,c-d))):(a.sortIndex=e,O(q,a),u||H||(u=!0,A(R)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=g;return function(){var c=g;g=b;try{return a.apply(this,arguments)}finally{g=c}}},unstable_getCurrentPriorityLevel:function(){return g},get unstable_shouldYield(){return T},unstable_requestPaint:d,unstable_continueExecution:function(){u||H||(u=!0,A(R))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)}, -get unstable_now(){return t},get unstable_forceFrameRate(){return V},unstable_Profiling:null},SchedulerTracing:{__proto__:null,__interactionsRef:null,__subscriberRef:null,unstable_clear:function(a){return a()},unstable_getCurrent:function(){return null},unstable_getThreadID:function(){return++Ea},unstable_trace:function(a,b,c){return c()},unstable_wrap:function(a){return a},unstable_subscribe:function(a){},unstable_unsubscribe:function(a){}}};c.Children={map:D,forEach:function(a,b,c){D(a,function(){b.apply(this, -arguments)},c)},count:function(a){var b=0;D(a,function(){b++});return b},toArray:function(a){return D(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error(y(143));return a}};c.Component=v;c.PureComponent=K;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d;c.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(y(267,a));var d=U({},a.props),e=a.key,g=a.ref,n=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,n=L.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var k= -a.type.defaultProps;for(h in b)ea.call(b,h)&&!fa.hasOwnProperty(h)&&(d[h]=void 0===b[h]&&void 0!==k?k[h]:b[h])}var h=arguments.length-2;if(1===h)d.children=c;else if(1<h){k=Array(h);for(var m=0;m<h;m++)k[m]=arguments[m+2];d.children=k}return{$$typeof:w,type:a.type,key:e,ref:g,props:d,_owner:n}};c.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:la,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:ka,_context:a};return a.Consumer= -a};c.createElement=ca;c.createFactory=function(a){var b=ca.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.forwardRef=function(a){return{$$typeof:ma,render:a}};c.isValidElement=M;c.lazy=function(a){return{$$typeof:oa,_payload:{_status:-1,_result:a},_init:xa}};c.memo=function(a,b){return{$$typeof:na,type:a,compare:void 0===b?null:b}};c.useCallback=function(a,b){return n().useCallback(a,b)};c.useContext=function(a,b){return n().useContext(a,b)};c.useDebugValue=function(a, -b){};c.useEffect=function(a,b){return n().useEffect(a,b)};c.useImperativeHandle=function(a,b,c){return n().useImperativeHandle(a,b,c)};c.useLayoutEffect=function(a,b){return n().useLayoutEffect(a,b)};c.useMemo=function(a,b){return n().useMemo(a,b)};c.useReducer=function(a,b,c){return n().useReducer(a,b,c)};c.useRef=function(a){return n().useRef(a)};c.useState=function(a){return n().useState(a)};c.version="17.0.2"}); -})(); diff --git a/res/style/main.css b/res/style/main.css deleted file mode 100644 index 1898c40e0..000000000 --- a/res/style/main.css +++ /dev/null @@ -1,15 +0,0 @@ -#mainTextWindow{ - background-color: rgba(0,0,0,0.5); - padding: 5px 5px 5px 5px; - width: 96%; - margin: 0 3% 0 3%; -} - -#bottomBox{ - position: fixed; - bottom: 15px; - display: flex; - justify-content: center; - width: 100%; - height: 20%; -} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000..65bfe7411 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,5970 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.1", "@babel/code-frame@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.2.tgz#718b4b19841809a58b29b68cde80bc5e1aa6d9ae" + integrity sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ== + dependencies: + "@babel/highlight" "^7.24.2" + picocolors "^1.0.0" + +"@babel/compat-data@^7.23.5": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.1.tgz#31c1f66435f2a9c329bb5716a6d6186c516c3742" + integrity sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA== + +"@babel/core@^7.23.5": + version "7.24.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.3.tgz#568864247ea10fbd4eff04dda1e05f9e2ea985c3" + integrity sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.2" + "@babel/generator" "^7.24.1" + "@babel/helper-compilation-targets" "^7.23.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.24.1" + "@babel/parser" "^7.24.1" + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.1" + "@babel/types" "^7.24.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" + integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== + dependencies: + "@babel/types" "^7.18.2" + "@jridgewell/gen-mapping" "^0.3.0" + jsesc "^2.5.1" + +"@babel/generator@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.1.tgz#e67e06f68568a4ebf194d1c6014235344f0476d0" + integrity sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A== + dependencies: + "@babel/types" "^7.24.0" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + +"@babel/helper-compilation-targets@^7.23.6": + version "7.23.6" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz#4d79069b16cbcf1461289eccfbbd81501ae39991" + integrity sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-validator-option" "^7.23.5" + browserslist "^4.22.2" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== + +"@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== + dependencies: + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" + +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.22.15": + version "7.24.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz#6ac476e6d168c7c23ff3ba3cf4f7841d46ac8128" + integrity sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg== + dependencies: + "@babel/types" "^7.24.0" + +"@babel/helper-module-transforms@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" + integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== + dependencies: + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" + +"@babel/helper-plugin-utils@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz#945681931a52f15ce879fd5b86ce2dae6d3d7f2a" + integrity sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w== + +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.18.10", "@babel/helper-string-parser@^7.23.4": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz#f99c36d3593db9540705d0739a1f10b5e20c696e" + integrity sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ== + +"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== + +"@babel/helpers@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.1.tgz#183e44714b9eba36c3038e442516587b1e0a1a94" + integrity sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg== + dependencies: + "@babel/template" "^7.24.0" + "@babel/traverse" "^7.24.1" + "@babel/types" "^7.24.0" + +"@babel/highlight@^7.24.2": + version "7.24.2" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.2.tgz#3f539503efc83d3c59080a10e6634306e0370d26" + integrity sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/parser@7.18.4": + version "7.18.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" + integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow== + +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.24.0", "@babel/parser@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.1.tgz#1e416d3627393fab1cb5b0f2f1796a100ae9133a" + integrity sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg== + +"@babel/plugin-transform-react-jsx-self@^7.23.3": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.1.tgz#a21d866d8167e752c6a7c4555dba8afcdfce6268" + integrity sha512-kDJgnPujTmAZ/9q2CN4m2/lRsUUPDvsG3+tSHWUJIzMGTt5U/b/fwWd3RO3n+5mjLrsBrVa5eKFRVSQbi3dF1w== + dependencies: + "@babel/helper-plugin-utils" "^7.24.0" + +"@babel/plugin-transform-react-jsx-source@^7.23.3": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.1.tgz#a2dedb12b09532846721b5df99e52ef8dc3351d0" + integrity sha512-1v202n7aUq4uXAieRTKcwPzNyphlCuqHHDcdSNc+vdhoTEZcFMh+L5yZuCmGaIO7bs1nJUNfHB89TZyoL48xNA== + dependencies: + "@babel/helper-plugin-utils" "^7.24.0" + +"@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.9.2": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.1.tgz#431f9a794d173b53720e69a6464abc6f0e2a5c57" + integrity sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.22.15", "@babel/template@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50" + integrity sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/parser" "^7.24.0" + "@babel/types" "^7.24.0" + +"@babel/traverse@^7.24.1": + version "7.24.1" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.1.tgz#d65c36ac9dd17282175d1e4a3c49d5b7988f530c" + integrity sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ== + dependencies: + "@babel/code-frame" "^7.24.1" + "@babel/generator" "^7.24.1" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.24.1" + "@babel/types" "^7.24.0" + debug "^4.3.1" + globals "^11.1.0" + +"@babel/types@7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.0.tgz#75f21d73d73dc0351f3368d28db73465f4814600" + integrity sha512-YuGopBq3ke25BVSiS6fgF49Ul9gH1x70Bcr6bqRLjWCkcX8Hre1/5+z+IiWOIerRMSSEfGZVB9z9kyq7wVs9YA== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + +"@babel/types@^7.0.0", "@babel/types@^7.18.2", "@babel/types@^7.20.7", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.24.0": + version "7.24.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.0.tgz#3b951f435a92e7333eba05b7566fd297960ea1bf" + integrity sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w== + dependencies: + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" + to-fast-properties "^2.0.0" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@chevrotain/cst-dts-gen@10.5.0": + version "10.5.0" + resolved "https://registry.yarnpkg.com/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.5.0.tgz#922ebd8cc59d97241bb01b1b17561a5c1ae0124e" + integrity sha512-lhmC/FyqQ2o7pGK4Om+hzuDrm9rhFYIJ/AXoQBeongmn870Xeb0L6oGEiuR8nohFNL5sMaQEJWCxr1oIVIVXrw== + dependencies: + "@chevrotain/gast" "10.5.0" + "@chevrotain/types" "10.5.0" + lodash "4.17.21" + +"@chevrotain/gast@10.5.0": + version "10.5.0" + resolved "https://registry.yarnpkg.com/@chevrotain/gast/-/gast-10.5.0.tgz#e4e614bc46d17a8892742f38e56cd33f1f3ad162" + integrity sha512-pXdMJ9XeDAbgOWKuD1Fldz4ieCs6+nLNmyVhe2gZVqoO7v8HXuHYs5OV2EzUtbuai37TlOAQHrTDvxMnvMJz3A== + dependencies: + "@chevrotain/types" "10.5.0" + lodash "4.17.21" + +"@chevrotain/types@10.5.0": + version "10.5.0" + resolved "https://registry.yarnpkg.com/@chevrotain/types/-/types-10.5.0.tgz#52a97d74a8cfbc197f054636d93ecd8912d33d21" + integrity sha512-f1MAia0x/pAVPWH/T73BJVyO2XU5tI4/iE7cnxb7tqdNTNhQI3Uq3XkqcoteTmD4t1aM0LbHCJOhgIDn07kl2A== + +"@chevrotain/utils@10.5.0": + version "10.5.0" + resolved "https://registry.yarnpkg.com/@chevrotain/utils/-/utils-10.5.0.tgz#0ee36f65b49b447fbac71b9e5af5c5c6c98ac057" + integrity sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ== + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@emotion/babel-plugin@^11.11.0": + version "11.11.0" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz#c2d872b6a7767a9d176d007f5b31f7d504bb5d6c" + integrity sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ== + dependencies: + "@babel/helper-module-imports" "^7.16.7" + "@babel/runtime" "^7.18.3" + "@emotion/hash" "^0.9.1" + "@emotion/memoize" "^0.8.1" + "@emotion/serialize" "^1.1.2" + babel-plugin-macros "^3.1.0" + convert-source-map "^1.5.0" + escape-string-regexp "^4.0.0" + find-root "^1.1.0" + source-map "^0.5.7" + stylis "4.2.0" + +"@emotion/cache@^11.11.0": + version "11.11.0" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.11.0.tgz#809b33ee6b1cb1a625fef7a45bc568ccd9b8f3ff" + integrity sha512-P34z9ssTCBi3e9EI1ZsWpNHcfY1r09ZO0rZbRO2ob3ZQMnFI35jB536qoXbkdesr5EUhYi22anuEJuyxifaqAQ== + dependencies: + "@emotion/memoize" "^0.8.1" + "@emotion/sheet" "^1.2.2" + "@emotion/utils" "^1.2.1" + "@emotion/weak-memoize" "^0.3.1" + stylis "4.2.0" + +"@emotion/css@^11.11.2": + version "11.11.2" + resolved "https://registry.yarnpkg.com/@emotion/css/-/css-11.11.2.tgz#e5fa081d0c6e335352e1bc2b05953b61832dca5a" + integrity sha512-VJxe1ucoMYMS7DkiMdC2T7PWNbrEI0a39YRiyDvK2qq4lXwjRbVP/z4lpG+odCsRzadlR+1ywwrTzhdm5HNdew== + dependencies: + "@emotion/babel-plugin" "^11.11.0" + "@emotion/cache" "^11.11.0" + "@emotion/serialize" "^1.1.2" + "@emotion/sheet" "^1.2.2" + "@emotion/utils" "^1.2.1" + +"@emotion/hash@^0.9.1": + version "0.9.1" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.1.tgz#4ffb0055f7ef676ebc3a5a91fb621393294e2f43" + integrity sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ== + +"@emotion/memoize@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" + integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== + +"@emotion/serialize@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.3.tgz#84b77bfcfe3b7bb47d326602f640ccfcacd5ffb0" + integrity sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA== + dependencies: + "@emotion/hash" "^0.9.1" + "@emotion/memoize" "^0.8.1" + "@emotion/unitless" "^0.8.1" + "@emotion/utils" "^1.2.1" + csstype "^3.0.2" + +"@emotion/sheet@^1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.2.tgz#d58e788ee27267a14342303e1abb3d508b6d0fec" + integrity sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA== + +"@emotion/unitless@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.1.tgz#182b5a4704ef8ad91bde93f7a860a88fd92c79a3" + integrity sha512-KOEGMu6dmJZtpadb476IsZBclKvILjopjUii3V+7MnXIQCYh8W3NgNcgwo21n9LXZX6EDIKvqfjYxXebDwxKmQ== + +"@emotion/utils@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.1.tgz#bbab58465738d31ae4cb3dbb6fc00a5991f755e4" + integrity sha512-Y2tGf3I+XVnajdItskUCn6LX+VUDmP6lTL4fcqsXAv43dnlbZiuW4MWQW38rW/BVWSE7Q/7+XQocmpnRYILUmg== + +"@emotion/weak-memoize@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6" + integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww== + +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + +"@esbuild/android-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" + integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== + +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + +"@esbuild/android-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" + integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== + +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + +"@esbuild/android-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" + integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== + +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + +"@esbuild/darwin-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" + integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== + +"@esbuild/darwin-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" + integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== + +"@esbuild/darwin-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" + integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== + +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + +"@esbuild/freebsd-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" + integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== + +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + +"@esbuild/freebsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" + integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== + +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + +"@esbuild/linux-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" + integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== + +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + +"@esbuild/linux-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" + integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== + +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + +"@esbuild/linux-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" + integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== + +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + +"@esbuild/linux-loong64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" + integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== + +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + +"@esbuild/linux-mips64el@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" + integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== + +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + +"@esbuild/linux-ppc64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" + integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== + +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + +"@esbuild/linux-riscv64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" + integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== + +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + +"@esbuild/linux-s390x@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" + integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== + +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + +"@esbuild/linux-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== + +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + +"@esbuild/netbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" + integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== + +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + +"@esbuild/openbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" + integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== + +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + +"@esbuild/sunos-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" + integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== + +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + +"@esbuild/win32-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" + integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== + +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + +"@esbuild/win32-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" + integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== + +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== + +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== + +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.57.0": + version "8.57.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" + integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== + +"@humanwhocodes/config-array@^0.11.14": + version "0.11.14" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" + integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== + dependencies: + "@humanwhocodes/object-schema" "^2.0.2" + debug "^4.3.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz#d9fae00a2d5cb40f92cfe64b47ad749fbc38f917" + integrity sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw== + +"@icon-park/react@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@icon-park/react/-/react-1.4.2.tgz#db761ebc0e685702b80c4aaf5b59af5ccda40ecc" + integrity sha512-+MtQLjNiRuia3fC/NfpSCTIy5KH5b+NkMB9zYd7p3R4aAIK61AjK0OSraaICJdkKooU9jpzk8m0fY4g9A3JqhQ== + +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.6.tgz#9d71ca886e32502eb9362c9a74a46787c36df81a" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@pixi-spine/base@~3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@pixi-spine/base/-/base-3.1.2.tgz#0bf9ec7a1367d8d8474004f0784d990300328310" + integrity sha512-sMOZsCJQW4O11QR7afuHcuu8cSUgJv3paSNzZOh+imxvYB/cOcyG7K+f5sWqlGe+z3J2CLEYCX2WfXeeJi6pHg== + +"@pixi-spine/loader-base@~3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@pixi-spine/loader-base/-/loader-base-3.1.2.tgz#b208f14f2cd4b29ff575fc5a32c4f5328e6008f1" + integrity sha512-llg0RuuWiqVkyoQA+ceORV0sfUtrWGJj4jQ6erDFn2hMnob+QGzh+qwHSTMAnTNZTINEMfiUxmcwbmUYwTd8Ag== + dependencies: + "@pixi-spine/base" "~3.1.2" + +"@pixi-spine/loader-uni@~3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@pixi-spine/loader-uni/-/loader-uni-3.1.2.tgz#3671675dba01d655f5c207b10723823313e09d00" + integrity sha512-5th9gXqNQWMSuOu3euMw2kHETlncxU7LIFvOYqTMsKnwrOAIsPjHSF/4Sat1d3EAvvdMrYm4LmhHklgrAfk6UA== + dependencies: + "@pixi-spine/base" "~3.1.2" + "@pixi-spine/loader-base" "~3.1.2" + "@pixi-spine/runtime-3.7" "~3.1.2" + "@pixi-spine/runtime-3.8" "~3.1.2" + "@pixi-spine/runtime-4.1" "~3.1.2" + +"@pixi-spine/runtime-3.7@~3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@pixi-spine/runtime-3.7/-/runtime-3.7-3.1.2.tgz#909ee4b906fe3e1faf8df996025d29c05f2c68b4" + integrity sha512-dMcw5x9jG+0itzzbPsJUn8hvhxzRXRzbm/kCUQ51iyFfLZQIK1LoPck4XPVuXckwFjU1qCT+tDZSEGBMYs5//A== + dependencies: + "@pixi-spine/base" "~3.1.2" + +"@pixi-spine/runtime-3.8@~3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@pixi-spine/runtime-3.8/-/runtime-3.8-3.1.2.tgz#be0fe73ce75384d3815a729c826b09c43a9c3db4" + integrity sha512-AgS3mUC+5HQ/ehJO5Wo4oBoLg8F+tssF5WXi3FnnjqOaMcO+Ag232ForoL2iYHW40TKx0xMi5MpXsSafgS1i1A== + dependencies: + "@pixi-spine/base" "~3.1.2" + +"@pixi-spine/runtime-4.1@~3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@pixi-spine/runtime-4.1/-/runtime-4.1-3.1.2.tgz#43aa99b71dca01a962db7dee04a38e2fe167d33e" + integrity sha512-XtaKAuLTtJ3o3llcUTr0d94dnRTyYHlss+x4VsYm1H38r4DUmQTBS13nisW0pgS3fY60D8AbEJkYVW7mwokxag== + dependencies: + "@pixi-spine/base" "~3.1.2" + +"@pixi/accessibility@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/accessibility/-/accessibility-6.5.10.tgz#53727df881251ad0db545de93f8b273c5b34ff67" + integrity sha512-URrI1H+1kjjHSyhY1QXcUZ8S3omdVTrXg5y0gndtpOhIelErBTC9NWjJfw6s0Rlmv5+x5VAitQTgw9mRiatDgw== + +"@pixi/app@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/app/-/app-6.5.10.tgz#4877929bd53595484c1d334e4cda43bb9d27eca1" + integrity sha512-VsNHLajZ5Dbc/Zrj7iWmIl3eu6Fec+afjW/NXXezD8Sp3nTDF0bv5F+GDgN/zSc2gqIvPHyundImT7hQGBDghg== + +"@pixi/compressed-textures@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/compressed-textures/-/compressed-textures-6.5.10.tgz#3d2f8973f504af1f8db5c2a1338028d9b9f84ece" + integrity sha512-41NT5mkfam47DrkB8xMp3HUZDt7139JMB6rVNOmb3u2vm+2mdy9tzi5s9nN7bG9xgXlchxcFzytTURk+jwXVJA== + +"@pixi/constants@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/constants/-/constants-6.5.10.tgz#ac0a9c55db0d3dadcd85aa31a251db493c3bd80b" + integrity sha512-PUF2Y9YISRu5eVrVVHhHCWpc/KmxQTg3UH8rIUs8UI9dCK41/wsPd3pEahzf7H47v7x1HCohVZcFO3XQc1bUDw== + +"@pixi/core@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/core/-/core-6.5.10.tgz#b92207164526fa4a6d285ccd13cb62bdee50b493" + integrity sha512-Gdzp5ENypyglvsh5Gv3teUZnZnmizo4xOsL+QqmWALdFlJXJwLJMVhKVThV/q/095XR6i4Ou54oshn+m4EkuFw== + dependencies: + "@types/offscreencanvas" "^2019.6.4" + +"@pixi/display@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/display/-/display-6.5.10.tgz#3ebe4c56556086160087946d5437808b6fadae08" + integrity sha512-NxFdDDxlbH5fQkzGHraLGoTMucW9pVgXqQm13TSmkA3NWIi/SItHL4qT2SI8nmclT9Vid1VDEBCJFAbdeuQw1Q== + +"@pixi/extensions@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/extensions/-/extensions-6.5.10.tgz#5909d0b3f3c5ecfdc74efe5db2869a64a9cecb8c" + integrity sha512-EIUGza+E+sCy3dupuIjvRK/WyVyfSzHb5XsxRaxNrPwvG1iIUIqNqZ3owLYCo4h17fJWrj/yXVufNNtUKQccWQ== + +"@pixi/extract@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/extract/-/extract-6.5.10.tgz#0d198b437aecb1bc358b59a70a268c816e6ca810" + integrity sha512-hXFIc4EGs14GFfXAjT1+6mzopzCMWeXeai38/Yod3vuBXkkp8+ksen6kE09vTnB9l1IpcIaCM+XZEokuqoGX2A== + +"@pixi/filter-adjustment@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-adjustment/-/filter-adjustment-4.2.0.tgz#1648f705f856619835184dae42299138bf964c83" + integrity sha512-3Pvo5WyUb8X5GQ69X3/Tj6rHl0q7gArvcIYKeV2+/PzHaMypVF4Lsr3I3zYSyWWokxOQ0bFCAtNWm1WwDRA41g== + +"@pixi/filter-advanced-bloom@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-advanced-bloom/-/filter-advanced-bloom-4.2.0.tgz#384759dfd78e138623d945e4d3e81a05bd7d2a84" + integrity sha512-c/mF9twWhpLUOhr205Vup9EnXl0FMX6ClUnoSgCYJnE3hTWsJ5ewo5HSQfcv/VwFGIyLOFOx+Nz7KVEuFfNPow== + dependencies: + "@pixi/filter-kawase-blur" "4.2.0" + +"@pixi/filter-alpha@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/filter-alpha/-/filter-alpha-6.5.10.tgz#0eada7e25bc896e89e173ac318a617d09e280bea" + integrity sha512-GWHLJvY0QOIDRjVx0hdUff6nl/PePQg84i8XXPmANrvA+gJ/eSRTQRmQcdgInQfawENADB/oRqpcCct6IAcKpQ== + +"@pixi/filter-ascii@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-ascii/-/filter-ascii-4.2.0.tgz#c7afbc23cdc237d583d54579cc4dc3b99e8bb889" + integrity sha512-rZ5buM3Jeg65vtCPlqNg9p+Np2SZ9uEX1CpwMLtAV0BYHPsSx801ul5qGFtFu/XxssFR3ovfKdGszFLuebSqQQ== + +"@pixi/filter-bevel@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-bevel/-/filter-bevel-4.2.0.tgz#930fa803b42dc9a9bc5d5b9656fe15890ccb795c" + integrity sha512-8AxBZlyfrCnm3PK4CSp0QmWcm07Aq/RDcmOAxOjzCIOo+ecE0LWlXG4SVQOovlFiolB6ZLPjXVdt7JoAxaxOUg== + +"@pixi/filter-bloom@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-bloom/-/filter-bloom-4.2.0.tgz#d5333a6fdbc2976c555bd2539509857b6e2d06e2" + integrity sha512-bz5OZQLgztZosnK0YvTZnwSEytHtRnC8HFGIYw8fZ1TPNP2EBH72DPgV8A3GI28JAgxGSi4FDOQelEmQIdBHvQ== + +"@pixi/filter-blur@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/filter-blur/-/filter-blur-6.5.10.tgz#255cfde383218ddc40b2d0aa8dc6a864435723d1" + integrity sha512-LJsRocVOdM9hTzZKjP+jmkfoL1nrJi5XpR0ItgRN8fflOC7A7Ln4iPe7nukbbq3H7QhZSunbygMubbO6xhThZw== + +"@pixi/filter-bulge-pinch@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-bulge-pinch/-/filter-bulge-pinch-4.2.0.tgz#0c25795d0f76d8a80169acd97e827049902afca9" + integrity sha512-7e2MHpHuBCWKCbuwLxgbVOXpcl24Ljoa0JvcsgC7lAeQZwWVvRhSU8X4kT8Ita4zlI7g4ly6ieqC98ChsGrqBA== + +"@pixi/filter-color-map@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-color-map/-/filter-color-map-4.2.0.tgz#66d3cc61e725ea44ee9ea07024a09387aadf0a94" + integrity sha512-IxabGTBt9qGCqc/q0s/DWOzi+E07fK4ujUjTEFLphe6SKymxInVMQDJyTAiK4iNRxd/RV4NeTxl2z59Dv6qdgQ== + +"@pixi/filter-color-matrix@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/filter-color-matrix/-/filter-color-matrix-6.5.10.tgz#5410e85b194631096725ba256d54ec5d7de4e5f0" + integrity sha512-C2S44/EoWTrhqedLWOZTq9GZV5loEq1+MhyK9AUzEubWGMHhou1Juhn2mRZ7R6flKPCRQNKrXpStUwCAouud3Q== + +"@pixi/filter-color-overlay@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-color-overlay/-/filter-color-overlay-4.2.0.tgz#ff6e187653ada43193edbede22605abb508d0ff3" + integrity sha512-+xqUIyaRLf35ZRZAybO3tTW0eXMeWTpvPH9nFxucpo7pOeJNc/Z59jPgbtu1N3nTLCEBDtwwq3rGdVSWnSVuVw== + +"@pixi/filter-color-replace@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-color-replace/-/filter-color-replace-4.2.0.tgz#fea7eb112a28dbe5e44c2bc3fbd802b57c6f972b" + integrity sha512-gRZFaI6o9u0Lb44+NXwln/vyyrJNXZUjMHicrfY1jDlbfBDwAiQrhpvaF7Faf/ph8zWviRvhh90G6dGTUsb1yg== + +"@pixi/filter-convolution@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-convolution/-/filter-convolution-4.2.0.tgz#4a5dc0427a1160d30e29c2975bd62ac1871978a7" + integrity sha512-zGmHN925aNz2c6PAaGATzS4xAvMT7aP0hz8M4auADXAHAkU/WqK+nIG+goQsszdGmit7ArAzcd6gIyJKeFxNug== + +"@pixi/filter-cross-hatch@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-cross-hatch/-/filter-cross-hatch-4.2.0.tgz#a50818835055a00c1d884ed5955c129ecc5a3b9a" + integrity sha512-1fo28Y3CtaRIU+U6jm2V462S6Whzvu+0IjepeOMRlvgT+28wVMYneEJFmBF3BK8FLMRXfgg/5wR0lnGbE9TN4g== + +"@pixi/filter-crt@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-crt/-/filter-crt-4.2.0.tgz#ba497027eb59ee98f18014ea2340200589d0b6f4" + integrity sha512-27o5orTxXRPLmQZAo+8nsCMqtOG1lF2bZQJGsC68bi2m90/LQARFWkB1+AvBuwczCB0+MuHu0/txAbEX0h53Cg== + +"@pixi/filter-displacement@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/filter-displacement/-/filter-displacement-6.5.10.tgz#4888a20c3680f4535dd72f92bd140211f3422176" + integrity sha512-fbblMYyPX/hO3Tpoaa4tOBYxqp4TxjNrz6xyt15tKSVxWQElk+Tx98GJ+aaBoiHOKt8ezzHplStWoHG++JIv/w== + +"@pixi/filter-dot@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-dot/-/filter-dot-4.2.0.tgz#b40f972b413b29ec277bb6540c8bdefb592cf1d2" + integrity sha512-El+bBlUEK0Sj5yT/h8C+H83F1vV7Zh4jCt5zrouDDFs8I7ALPeZJ9QaRPjOcPVBJGBHIhHUiA05dj3rEzQef9w== + +"@pixi/filter-drop-shadow@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-drop-shadow/-/filter-drop-shadow-4.2.0.tgz#15094162363547b37e0c2076b9c9042af859c988" + integrity sha512-VJr5OsPBwm2+k3RCyHK5CPv0GD2qNVc30VzYMhpm17OpLp3BJ4UBK5hTorWbhRqS1Q38zf6e5pG/LBnkX69E6Q== + dependencies: + "@pixi/filter-kawase-blur" "4.2.0" + +"@pixi/filter-emboss@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-emboss/-/filter-emboss-4.2.0.tgz#bf3e2ad02b9637f2473a1803a4553767aab84317" + integrity sha512-tJOx4asPhMIPHWE8SpuC7NWyU3FKQjetDK1PBRwO2FN6p+A7jmKpgmAe94sWnRLbs+NR+a1LTPsn/UoR4yU/Jw== + +"@pixi/filter-fxaa@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/filter-fxaa/-/filter-fxaa-6.5.10.tgz#838699992e5a77ff0bd54232f8d0ac3561405189" + integrity sha512-wbHL9UtY3g7jTyvO8JaZks6DqV8AO5c96Hfu0zfndWBPs79Ul6/sq3LD2eE+yq5vK5T2R9Sr4s54ls1JT3Sppg== + +"@pixi/filter-glitch@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-glitch/-/filter-glitch-4.2.0.tgz#7831565cbaea0e3af1a67d0bf83c754ff649b47b" + integrity sha512-aDyk1zFIchxQfl1aWAa7vxOGKUjicO2+aSysyR5TZWtO8p5u7P9EAoJ4YfzoEEcbcJ4LjLaJgmVy68jVj524vQ== + +"@pixi/filter-glow@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-glow/-/filter-glow-4.2.0.tgz#44612ecc237f22482da02b66ad8fbd4bd0100f09" + integrity sha512-HVyursUy3artw/tDjbLOdXzSufz/i6bYQwavjkiN2Yswzqs0GwD8hscwbHMqMO4ny+D3q6DfsmlwiQe/kY5ymQ== + +"@pixi/filter-godray@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-godray/-/filter-godray-4.2.0.tgz#3ac5aadcb9039a03111413a4b5500a2d54895d7d" + integrity sha512-U+eifhkwzo9PhgMRbH68YADaqTnWmyulCDM8IUhjxmGs2CKRE4t7X4rwAY4M1Qom5AcOdebO0fhDh8G02lBjfg== + +"@pixi/filter-kawase-blur@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-kawase-blur/-/filter-kawase-blur-4.2.0.tgz#7f2ac8e896b8338133b80b0b8bded6e65e33b096" + integrity sha512-1QeZqdUD3vh6HtiH930scI9mN/lDvfKW8rmwoE295tj5kbX6OeyRqXDr6KnEaRh/Jzm1hPB6ryRjHDS54x0QpQ== + +"@pixi/filter-motion-blur@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-motion-blur/-/filter-motion-blur-4.2.0.tgz#37171a32ba56228a3c1effada765c5ba745ef7f6" + integrity sha512-hbJR1cDXimkqUsnzwKWsqIJyqj8dvG3bGMrkKG8ZPRb/bMu+C5BDEvoDt5Jia6cTMpxLb32J49eHehnL1GYQug== + +"@pixi/filter-multi-color-replace@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-multi-color-replace/-/filter-multi-color-replace-4.2.0.tgz#1cb2b078ce24697eb0ef19e4abb421dbc30ed149" + integrity sha512-frlOKlBdQhDcYMTWyiXCyoiPi8CFkRRxyCPNKmW/P67wnOhahVuQCvBkdZ4X3f0wTL1JXRIE8mlWr0TQIzCdfA== + +"@pixi/filter-noise@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/filter-noise/-/filter-noise-6.5.10.tgz#b32c0761d8489657b07eae6af7837a518cc50586" + integrity sha512-CX+/06NVaw3HsjipZVb7aemkca0TC8I6qfKI4lx2ugxS/6G6zkY5zqd8+nVSXW4DpUXB6eT0emwfRv6N00NvuA== + +"@pixi/filter-old-film@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-old-film/-/filter-old-film-4.2.0.tgz#b013f0f352e32a68667c93321a76b0899da567df" + integrity sha512-bHZgID3pUgAQXgg6ZJHardZYRcWchTIE5oc6I5KSqpXoOOaS2HRk89XMCgF2LG1Y+4UPbYkKOy1Twds+I3dNng== + +"@pixi/filter-outline@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-outline/-/filter-outline-4.2.0.tgz#87ffe8235515019e5958e8772fe7d91d4dcde487" + integrity sha512-aaO60rlycAZtvcxLYxBYizPE05LykXcUs6goK4AH009RDOILZ/KQBLiAwLcaE5hKmg0xC6BmjmxI9kViBIwKTw== + +"@pixi/filter-pixelate@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-pixelate/-/filter-pixelate-4.2.0.tgz#b3edcde01b368a0bcad12d96a421fe37e2f8c86c" + integrity sha512-QNcPf5+64lMOCb7jQnlcLzMbVelS/fRZNQRusQ3uxy8bcG9WwixW2Ykes4mv9yDN/HhGlC1XQqzsUXsYFQWqZQ== + +"@pixi/filter-radial-blur@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-radial-blur/-/filter-radial-blur-4.2.0.tgz#d2f9e02c6de6efd41be67a1df633639ceb0196f0" + integrity sha512-PfeI22QhO+MMRbvMc/NNKWr2cqff/H7puVbveDCxUTiKzMETgWD2BTYJCDoFhVe4+RkjD8OtW0ZNyCDzHNz9Xg== + +"@pixi/filter-reflection@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-reflection/-/filter-reflection-4.2.0.tgz#a6eab22bbc5df76fb6f843748ee2c94deeebfc83" + integrity sha512-AW9mEBdO5BIx8C1wOZ/SZxO1YTQMYiqfMbl9R/geWNlcuUpSoaTA5XahzV07oc6MW0ry+/f19QmmqbT1J2a9MQ== + +"@pixi/filter-rgb-split@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-rgb-split/-/filter-rgb-split-4.2.0.tgz#d5209ed06646ed93ccda71955d625caa6ad40ef4" + integrity sha512-E72MwQglNu91rkD6uKG6i5RRrigZK8u1uvq/85UgIEr8hs1Rn3NAPPDeDPcOCv/gD2iVzLd0RrgiVPGyAjFdpA== + +"@pixi/filter-shockwave@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-shockwave/-/filter-shockwave-4.2.0.tgz#7511b9e3b136c4bce915eee35cccd8c58ebe3888" + integrity sha512-A5vdOUZCNBa5M3TtBzVevq460YhCWcb37EEHquPmIAE5FrMdO1OL0VJqj06d7XoO9q0sNJ+oyfwLY7ZwJkYgkg== + +"@pixi/filter-simple-lightmap@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-simple-lightmap/-/filter-simple-lightmap-4.2.0.tgz#69d7b59c8f327bc64d2e481d1842b5b533838669" + integrity sha512-mUziYtzyINB9xuVX1lKziuQkMq+hsoJyBjozPgodjHvinzKw3RbUW1RjpYXaWu56yct4OKsmFPRF7W1+sHndTA== + +"@pixi/filter-tilt-shift@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-tilt-shift/-/filter-tilt-shift-4.2.0.tgz#8ffb31ff8afcba51bb3b222626adbe925154dba1" + integrity sha512-8c8avkzqW+RLSkgNYbdrSsRGBN9A7f4y2Ig4yrqXLldsNn8/iSHtrsM+W4o5cO/P98c8tKhru6HGudd3rpb2cA== + +"@pixi/filter-twist@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-twist/-/filter-twist-4.2.0.tgz#5e0f88b8285eb16a6cbc6cec0bb2e440205a385f" + integrity sha512-jtLu5tyYWHsow8LKX5qg5Y17RvVHAY0hKKsQluMoymBweR1sFncXCouVqZFxCuaQx3bT38YYuYF1m4FxHmqRbg== + +"@pixi/filter-zoom-blur@4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@pixi/filter-zoom-blur/-/filter-zoom-blur-4.2.0.tgz#99665a4cf4e3fbae893a4bdc10ecde1701d06088" + integrity sha512-mt/hD8LcvgJUjMNINhQVETEkrZvqvix+KyjXJCOnaHhbUHjfthtgx+N0jvs80miiShBIXSWjWNJgr1kY1rC0OA== + +"@pixi/graphics@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/graphics/-/graphics-6.5.10.tgz#7a5a5d263a612629b8df59479b99ce938353ced2" + integrity sha512-KPHGJ910fi8bRQQ+VcTIgrK+bKIm8yAQaZKPqMtm14HzHPGcES6HkgeNY1sd7m8J4aS9btm5wOSyFu0p5IzTpA== + +"@pixi/interaction@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/interaction/-/interaction-6.5.10.tgz#c477d42206f3a2ed11bf06f3147bcd3906a872fa" + integrity sha512-v809pJmXA2B9dV/vdrDMUqJT+fBB/ARZli2YRmI2dPbEbkaYr8FNmxCAJnwT8o+ymTx044Ie820hn9tVrtMtfA== + +"@pixi/loaders@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/loaders/-/loaders-6.5.10.tgz#7d7bdc1686eae2842e4d701abd4b480f9fcd5930" + integrity sha512-AuK7mXBmyVsDFL9DDFPB8sqP8fwQ2NOktvu98bQuJl0/p/UeK/0OAQnF3wcf3FeBv5YGXfNHL21c2DCisjKfTg== + +"@pixi/math@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/math/-/math-6.5.10.tgz#0d9b9e12a7e9a920306e1425901348b9c7f054ad" + integrity sha512-fxeu7ykVbMGxGV2S3qRTupHToeo1hdWBm8ihyURn3BMqJZe2SkZEECPd5RyvIuuNUtjRnmhkZRnF3Jsz2S+L0g== + +"@pixi/mesh-extras@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/mesh-extras/-/mesh-extras-6.5.10.tgz#2cfe5ee4bff233bbe71fd9731e493b3abb4e1fdb" + integrity sha512-UCG7OOPPFeikrX09haCibCMR0jPQ4UJ+4HiYiAv/3dahq5eEzBx+yAwVtxcVCjonkTf/lu5SzmHdzpsbHLx5aw== + +"@pixi/mesh@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/mesh/-/mesh-6.5.10.tgz#8a08326e60e191d9058cdf18468be2007284b376" + integrity sha512-tUNPsdp5/t/yRsCmfxIcufIfbQVzgAlMNgQ1igWOkSxzhB7vlEbZ8ZLLW5tQcNyM/r7Nhjz+RoB+RD+/BCtvlA== + +"@pixi/mixin-cache-as-bitmap@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/mixin-cache-as-bitmap/-/mixin-cache-as-bitmap-6.5.10.tgz#5f8a7ee6620c9734bcce091508004a4a818f13e9" + integrity sha512-HV4qPZt8R7uuPZf1XE5S0e3jbN4+/EqgAIkueIyK3Em+0IO1rCmIbzzYxFPxkElMUu5VvN1r4hXK846z9ITnhw== + +"@pixi/mixin-get-child-by-name@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/mixin-get-child-by-name/-/mixin-get-child-by-name-6.5.10.tgz#2fa1002998381be562ec0aa35b44d866d2d435e3" + integrity sha512-YYd9wjnI/4aKY0H5Ij413UppVZn3YE1No2CZrNevV6WbhylsJucowY3hJihtl9mxkpwtaUIyWMjmphkbOinbzA== + +"@pixi/mixin-get-global-position@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/mixin-get-global-position/-/mixin-get-global-position-6.5.10.tgz#963395e60c58bc2631f7eb4c4fd479dedbf7a1ec" + integrity sha512-A83gTZP9CdQAyrAvOZl1P707Q0QvIC0V8UnBAMd4GxuhMOXJtXVPCdmfPVXUrfoywgnH+/Bgimq5xhsXTf8Hzg== + +"@pixi/particle-container@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/particle-container/-/particle-container-6.5.10.tgz#863bc03fa45f30090ad90890be0ad74031aa3ed3" + integrity sha512-CCNAdYGzKoOc3FtK2kyWCNjygdHppeOEqqK189yhg3yRSsvby+HMms/cM6bLK/4Vf6mFoAy1na3w/oXpqTR2Ag== + +"@pixi/polyfill@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/polyfill/-/polyfill-6.5.10.tgz#4a74cf5c709e429f2220b840944ce3215a871aa5" + integrity sha512-KDTWyr285VvPM8GGTVIZAhmxGrOlTznUGK/9kWS3GtrogwLWn41S/86Yej1gYvotVyUomCcOok33Jzahb+vX1w== + dependencies: + object-assign "^4.1.1" + promise-polyfill "^8.2.0" + +"@pixi/prepare@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/prepare/-/prepare-6.5.10.tgz#25b57593005f4ebf14abbb381139b5d6191336b9" + integrity sha512-PHMApz/GPg7IX/7+2S98criN2+Mp+fgiKpojV9cnl0SlW2zMxfAHBBi8zik9rHBgjx8X6d6bR0MG1rPtb6vSxQ== + +"@pixi/runner@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/runner/-/runner-6.5.10.tgz#a103dcb70025f13523995b80728077c8071f5ba7" + integrity sha512-4HiHp6diCmigJT/DSbnqQP62OfWKmZB7zPWMdV1AEdr4YT1QxzXAW1wHg7dkoEfyTHqZKl0tm/zcqKq/iH7tMA== + +"@pixi/settings@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/settings/-/settings-6.5.10.tgz#11de6bd63b8a1182cd3bd7ea3df698de92d18e9a" + integrity sha512-ypAS5L7pQ2Qb88yQK72bXtc7sD8OrtLWNXdZ/gnw5kwSWCFaOSoqhKqJCXrR5DQtN98+RQefwbEAmMvqobhFyw== + +"@pixi/sprite-animated@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/sprite-animated/-/sprite-animated-6.5.10.tgz#8966d88e536919d7f6380d2853555b038b997136" + integrity sha512-x1kayucAqpVbNk+j+diC/7sQGQsAl6NCH1J2/EEaiQjlV3GOx1MXS9Tft1N1Y1y7otbg1XsnBd60/Yzcp05pxA== + +"@pixi/sprite-tiling@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/sprite-tiling/-/sprite-tiling-6.5.10.tgz#b4d692a49145f174e399dc2c7ed6b290f5f73a9a" + integrity sha512-lDFcPuwExrdJhli+WmjPivChjeCG6NiRl36iQ8n2zVi/MYVv9qfKCA6IdU7HBWk1AZdsg6KUTpwfmVLUI+qz3w== + +"@pixi/sprite@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/sprite/-/sprite-6.5.10.tgz#2acdf87f8f12e5bf6077117b5e383c07d6803e52" + integrity sha512-UiK+8LgM9XQ/SBDKjRgZ8WggdOSlFRXqiWjEZVmNkiyU8HvXeFzWPRhpc8RR1zDwAUhZWKtMhF8X/ba9m+z2lg== + +"@pixi/spritesheet@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/spritesheet/-/spritesheet-6.5.10.tgz#c725d85206eec0ea36d60ff3ff138c01a9201bb0" + integrity sha512-7uOZ1cYyYtPb0ZEgXV1SZ8ujtluZNY0TL5z3+Qc8cgGGZK/MaWG7N6Wf+uR4BR2x8FLNwcyN5IjbQDKCpblrmg== + +"@pixi/text-bitmap@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/text-bitmap/-/text-bitmap-6.5.10.tgz#bd9ca59f091dbb24c60b8eb463c24cfab93d142b" + integrity sha512-g/iFIMGp6Pfi0BvX6Ykp48Z6JXVgKOrc7UCIR9CM21wYcCiQGqtdFwstV236xk6/D8NToUtSOcifhtQ28dVTdQ== + +"@pixi/text@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/text/-/text-6.5.10.tgz#5e6f62343d9148d29a861836ac81c8f5fe7b36d0" + integrity sha512-ikwkonLJ+6QmEVW8Ji9fS5CjrKNbU4mHzYuwRQas/VJQuSWgd0myCcaw6ZbF1oSfQe70HgbNOR0sH8Q3Com0qg== + +"@pixi/ticker@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/ticker/-/ticker-6.5.10.tgz#e9d47bb7fe32600d7febe0487c2afb8a3c7abc70" + integrity sha512-UqX1XYtzqFSirmTOy8QAK4Ccg4KkIZztrBdRPKwFSOEiKAJoGDCSBmyQBo/9aYQKGObbNnrJ7Hxv3/ucg3/1GA== + +"@pixi/utils@6.5.10": + version "6.5.10" + resolved "https://registry.yarnpkg.com/@pixi/utils/-/utils-6.5.10.tgz#05969e4e86ebfdf023de25d53b8270f04ba0c5a6" + integrity sha512-4f4qDMmAz9IoSAe08G2LAxUcEtG9jSdudfsMQT2MG+OpfToirboE6cNoO0KnLCvLzDVE/mfisiQ9uJbVA9Ssdw== + dependencies: + "@types/earcut" "^2.1.0" + earcut "^2.2.4" + eventemitter3 "^3.1.0" + url "^0.11.0" + +"@reduxjs/toolkit@^1.8.1": + version "1.9.7" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.9.7.tgz#7fc07c0b0ebec52043f8cb43510cf346405f78a6" + integrity sha512-t7v8ZPxhhKgOKtU+uyJT13lu4vL7az5aFi4IdoDs/eS548edn2M8Ik9h8fxgvMjGoAUVFSt6ZC1P5cWmQ014QQ== + dependencies: + immer "^9.0.21" + redux "^4.2.1" + redux-thunk "^2.4.2" + reselect "^4.1.8" + +"@rollup/plugin-commonjs@^23.0.2": + version "23.0.7" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-23.0.7.tgz#7d26d879caa54283086de1974b66f512ef60abdc" + integrity sha512-hsSD5Qzyuat/swzrExGG5l7EuIlPhwTsT7KwKbSCQzIcJWjRxiimi/0tyMYY2bByitNb3i1p+6JWEDGa0NvT0Q== + dependencies: + "@rollup/pluginutils" "^5.0.1" + commondir "^1.0.1" + estree-walker "^2.0.2" + glob "^8.0.3" + is-reference "1.2.1" + magic-string "^0.27.0" + +"@rollup/plugin-json@^5.0.1": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-5.0.2.tgz#d7dbbac62ff74064876b3e5d0d863cb3ad1e7cdb" + integrity sha512-D1CoOT2wPvadWLhVcmpkDnesTzjhNIQRWLsc3fA49IFOP2Y84cFOOJ+nKGYedvXHKUsPeq07HR4hXpBBr+CHlA== + dependencies: + "@rollup/pluginutils" "^5.0.1" + +"@rollup/plugin-node-resolve@^15.0.1": + version "15.2.3" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz#e5e0b059bd85ca57489492f295ce88c2d4b0daf9" + integrity sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ== + dependencies: + "@rollup/pluginutils" "^5.0.1" + "@types/resolve" "1.20.2" + deepmerge "^4.2.2" + is-builtin-module "^3.2.1" + is-module "^1.0.0" + resolve "^1.22.1" + +"@rollup/plugin-typescript@^9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-9.0.2.tgz#c0cdfa39e267f306ff7316405a35406d5821eaa7" + integrity sha512-/sS93vmHUMjzDUsl5scNQr1mUlNE1QjBBvOhmRwJCH8k2RRhDIm3c977B3wdu3t3Ap17W6dDeXP3hj1P1Un1bA== + dependencies: + "@rollup/pluginutils" "^5.0.1" + resolve "^1.22.1" + +"@rollup/pluginutils@^4.1.2": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" + integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== + dependencies: + estree-walker "^2.0.1" + picomatch "^2.2.2" + +"@rollup/pluginutils@^5.0.1": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.0.tgz#7e53eddc8c7f483a4ad0b94afb1f7f5fd3c771e0" + integrity sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + +"@tsconfig/node10@^1.0.7": + version "1.0.10" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.10.tgz#b7ebd3adfa7750628d100594f6726b054d2c33b2" + integrity sha512-PiaIWIoPvO6qm6t114ropMCagj6YAF24j9OkCA2mJDXFnlionEwhsBCJ8yek4aib575BI3OkART/90WsgHgLWw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/babel__core@^7.20.5": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== + dependencies: + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" + "@types/babel__generator" "*" + "@types/babel__template" "*" + "@types/babel__traverse" "*" + +"@types/babel__generator@*": + version "7.6.8" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" + integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== + dependencies: + "@babel/types" "^7.0.0" + +"@types/babel__template@*": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== + dependencies: + "@babel/parser" "^7.1.0" + "@babel/types" "^7.0.0" + +"@types/babel__traverse@*": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.5.tgz#7b7502be0aa80cc4ef22978846b983edaafcd4dd" + integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== + dependencies: + "@babel/types" "^7.20.7" + +"@types/chai-subset@^1.3.3": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.5.tgz#3fc044451f26985f45625230a7f22284808b0a9a" + integrity sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.3.4": + version "4.3.14" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.14.tgz#ae3055ea2be43c91c9fd700a36d67820026d96e6" + integrity sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w== + +"@types/earcut@^2.1.0": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@types/earcut/-/earcut-2.1.4.tgz#5811d7d333048f5a7573b22ddc84923e69596da6" + integrity sha512-qp3m9PPz4gULB9MhjGID7wpo3gJ4bTGXm7ltNDsmOvsPduTeHp8wSW9YckBj3mljeOh4F0m2z/0JKAALRKbmLQ== + +"@types/estree@*", "@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + +"@types/hoist-non-react-statics@^3.3.1": + version "3.3.5" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz#dab7867ef789d87e2b4b0003c9d65c49cc44a494" + integrity sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + +"@types/istanbul-lib-coverage@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/json-schema@^7.0.9": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + +"@types/lodash@^4.14.180", "@types/lodash@^4.14.189": + version "4.17.0" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3" + integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA== + +"@types/node@*": + version "20.11.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.30.tgz#9c33467fc23167a347e73834f788f4b9f399d66f" + integrity sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw== + dependencies: + undici-types "~5.26.4" + +"@types/node@^17.0.23": + version "17.0.45" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" + integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== + +"@types/node@^18.14.0": + version "18.19.26" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.26.tgz#18991279d0a0e53675285e8cf4a0823766349729" + integrity sha512-+wiMJsIwLOYCvUqSdKTrfkS8mpTp+MPINe6+Np4TAGFWWRWiBQ5kSq9nZGCSPkzx9mvT+uEukzpX4MOSCydcvw== + dependencies: + undici-types "~5.26.4" + +"@types/offscreencanvas@^2019.6.4": + version "2019.7.3" + resolved "https://registry.yarnpkg.com/@types/offscreencanvas/-/offscreencanvas-2019.7.3.tgz#90267db13f64d6e9ccb5ae3eac92786a7c77a516" + integrity sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A== + +"@types/parse-json@^4.0.0": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.2.tgz#5950e50960793055845e956c427fc2b0d70c5239" + integrity sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw== + +"@types/prop-types@*": + version "15.7.12" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" + integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== + +"@types/react-dom@^17.0.10": + version "17.0.25" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.25.tgz#e0e5b3571e1069625b3a3da2b279379aa33a0cb5" + integrity sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA== + dependencies: + "@types/react" "^17" + +"@types/react@*": + version "18.2.71" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.71.tgz#77c3b97b02014bf351b21b684f80273a3a343f96" + integrity sha512-PxEsB9OjmQeYGffoWnYAd/r5FiJuUw2niFQHPc2v2idwh8wGPkkYzOHuinNJJY6NZqfoTCiOIizDOz38gYNsyw== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + +"@types/react@^17", "@types/react@^17.0.33": + version "17.0.80" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.80.tgz#a5dfc351d6a41257eb592d73d3a85d3b7dbcbb41" + integrity sha512-LrgHIu2lEtIo8M7d1FcI3BdwXWoRQwMoXOZ7+dPTW0lYREjmlHl3P0U1VD0i/9tppOuv8/sam7sOjx34TxSFbA== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "^0.16" + csstype "^3.0.2" + +"@types/resolve@1.20.2": + version "1.20.2" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" + integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== + +"@types/scheduler@*": + version "0.23.0" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.23.0.tgz#0a6655b3e2708eaabca00b7372fafd7a792a7b09" + integrity sha512-YIoDCTH3Af6XM5VuwGG/QL/CJqga1Zm3NkU3HZ4ZHK2fRMPYP1VczsTUqtsf43PH/iJNVlPHAo2oWX7BSdB2Hw== + +"@types/scheduler@^0.16": + version "0.16.8" + resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff" + integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A== + +"@types/semver@^7.3.12": + version "7.5.8" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" + integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== + +"@types/use-sync-external-store@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" + integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA== + +"@types/uuid@^8.3.4": + version "8.3.4" + resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" + integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== + +"@typescript-eslint/eslint-plugin@^5.18.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.18.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== + dependencies: + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== + dependencies: + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== + +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + eslint-scope "^5.1.1" + semver "^7.3.7" + +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== + dependencies: + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" + +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + +"@vitejs/plugin-react@^4.0.4": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.2.1.tgz#744d8e4fcb120fc3dbaa471dadd3483f5a304bb9" + integrity sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ== + dependencies: + "@babel/core" "^7.23.5" + "@babel/plugin-transform-react-jsx-self" "^7.23.3" + "@babel/plugin-transform-react-jsx-source" "^7.23.3" + "@types/babel__core" "^7.20.5" + react-refresh "^0.14.0" + +"@vitest/coverage-c8@^0.28.5": + version "0.28.5" + resolved "https://registry.yarnpkg.com/@vitest/coverage-c8/-/coverage-c8-0.28.5.tgz#762555eaf7789650026b2f2de5b5131cdf2c0ffa" + integrity sha512-zCNyurjudoG0BAqAgknvlBhkV2V9ZwyYLWOAGtHSDhL/St49MJT+V2p1G0yPaoqBbKOTATVnP5H2p1XL15H75g== + dependencies: + c8 "^7.12.0" + picocolors "^1.0.0" + std-env "^3.3.1" + vitest "0.28.5" + +"@vitest/expect@0.28.5": + version "0.28.5" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.28.5.tgz#d5a6eccd014e9ad66fe87a20d16426a2815c0e8a" + integrity sha512-gqTZwoUTwepwGIatnw4UKpQfnoyV0Z9Czn9+Lo2/jLIt4/AXLTn+oVZxlQ7Ng8bzcNkR+3DqLJ08kNr8jRmdNQ== + dependencies: + "@vitest/spy" "0.28.5" + "@vitest/utils" "0.28.5" + chai "^4.3.7" + +"@vitest/runner@0.28.5": + version "0.28.5" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.28.5.tgz#4a18fe0e40b25569763f9f1f64b799d1629b3026" + integrity sha512-NKkHtLB+FGjpp5KmneQjTcPLWPTDfB7ie+MmF1PnUBf/tGe2OjGxWyB62ySYZ25EYp9krR5Bw0YPLS/VWh1QiA== + dependencies: + "@vitest/utils" "0.28.5" + p-limit "^4.0.0" + pathe "^1.1.0" + +"@vitest/spy@0.28.5": + version "0.28.5" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.28.5.tgz#b69affa0786200251b9e5aac5c58bbfb1b3273c9" + integrity sha512-7if6rsHQr9zbmvxN7h+gGh2L9eIIErgf8nSKYDlg07HHimCxp4H6I/X/DPXktVPPLQfiZ1Cw2cbDIx9fSqDjGw== + dependencies: + tinyspy "^1.0.2" + +"@vitest/utils@0.28.5": + version "0.28.5" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.28.5.tgz#7b82b528df86adfbd4a1f6a3b72c39790e81de0d" + integrity sha512-UyZdYwdULlOa4LTUSwZ+Paz7nBHGTT72jKwdFSV4IjHF1xsokp+CabMdhjvVhYwkLfO88ylJT46YMilnkSARZA== + dependencies: + cli-truncate "^3.1.0" + diff "^5.1.0" + loupe "^2.3.6" + picocolors "^1.0.0" + pretty-format "^27.5.1" + +accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== + dependencies: + mime-types "~2.1.34" + negotiator "0.6.3" + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn-walk@^8.1.1, acorn-walk@^8.2.0: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + +acorn@^8.10.0, acorn@^8.11.3, acorn@^8.4.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +angular-expressions@^1.1.5: + version "1.2.1" + resolved "https://registry.yarnpkg.com/angular-expressions/-/angular-expressions-1.2.1.tgz#b0647a01ed564fa1a6a1b8400f3d50633208d452" + integrity sha512-pUnlViwIJ0L3KXh1a5gJGuMuGvxwbTbxkGINt7F6259p5UtksRpQ9Q5GhYb6VyfVfKtR65QAJgDhml3zpgmFuA== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +ansi-styles@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-buffer-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" + integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== + dependencies: + call-bind "^1.0.5" + is-array-buffer "^3.0.4" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== + +array-includes@^3.1.6, array-includes@^3.1.7: + version "3.1.8" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" + integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + is-string "^1.0.7" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng== + dependencies: + array-uniq "^1.0.1" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== + +array.prototype.findlast@^1.2.4: + version "1.2.5" + resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904" + integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-shim-unscopables "^1.0.2" + +array.prototype.flat@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.toreversed@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz#b989a6bf35c4c5051e1dc0325151bf8088954eba" + integrity sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.tosorted@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz#c8c89348337e51b8a3c48a9227f9ce93ceedcba8" + integrity sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.1.0" + es-shim-unscopables "^1.0.2" + +arraybuffer.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6" + integrity sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A== + dependencies: + array-buffer-byte-length "^1.0.1" + call-bind "^1.0.5" + define-properties "^1.2.1" + es-abstract "^1.22.3" + es-errors "^1.2.1" + get-intrinsic "^1.2.3" + is-array-buffer "^3.0.4" + is-shared-array-buffer "^1.0.2" + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async@^2.6.1: + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + +axios@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" + integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== + dependencies: + follow-redirects "^1.14.4" + +axios@^0.28.0: + version "0.28.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.28.0.tgz#801a4d991d0404961bccef46800e1170f8278c89" + integrity sha512-Tu7NYoGY4Yoc7I+Npf9HhUMtEEpV7ZiLH9yndTCoNhcpBH0kwcvFbzYN9/u5QKI5A6uefjsNNWaz5olJVYS62Q== + dependencies: + follow-redirects "^1.15.0" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + +babel-plugin-macros@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" + integrity sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== + dependencies: + "@babel/runtime" "^7.12.5" + cosmiconfig "^7.0.0" + resolve "^1.19.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +binary-extensions@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== + +bl@^4.0.3: + version "4.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + +body-parser@1.20.3: + version "1.20.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" + integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== + dependencies: + bytes "3.1.2" + content-type "~1.0.5" + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" + iconv-lite "0.4.24" + on-finished "2.4.1" + qs "6.13.0" + raw-body "2.5.2" + type-is "~1.6.18" + unpipe "1.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browserslist@^4.22.2: + version "4.23.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +builtin-modules@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" + integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +c8@^7.12.0: + version "7.14.0" + resolved "https://registry.yarnpkg.com/c8/-/c8-7.14.0.tgz#f368184c73b125a80565e9ab2396ff0be4d732f3" + integrity sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw== + dependencies: + "@bcoe/v8-coverage" "^0.2.3" + "@istanbuljs/schema" "^0.1.3" + find-up "^5.0.0" + foreground-child "^2.0.0" + istanbul-lib-coverage "^3.2.0" + istanbul-lib-report "^3.0.0" + istanbul-reports "^3.1.4" + rimraf "^3.0.2" + test-exclude "^6.0.0" + v8-to-istanbul "^9.0.0" + yargs "^16.2.0" + yargs-parser "^20.2.9" + +cac@^6.7.14: + version "6.7.14" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== + +call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +caniuse-lite@^1.0.30001587: + version "1.0.30001600" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001600.tgz#93a3ee17a35aa6a9f0c6ef1b2ab49507d1ab9079" + integrity sha512-+2S9/2JFhYmYaDpZvo0lKkfvuKIglrx68MwOBqMGHhQsNkLjB5xtc/TGoEPs+MxjSyN/72qer2g97nzR641mOQ== + +chai@^4.3.7: + version "4.4.1" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" + integrity sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.0.8" + +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-error@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + +chevrotain@^10.5.0: + version "10.5.0" + resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-10.5.0.tgz#9c1dc62ef0753bb562dbe521b5f72d041bad624e" + integrity sha512-Pkv5rBY3+CsHOYfV5g/Vs5JY9WTHHDEKOlohI2XeygaZhUeqhAlldZ8Hz9cRmxu709bvS08YzxHdTPHhffc13A== + dependencies: + "@chevrotain/cst-dts-gen" "10.5.0" + "@chevrotain/gast" "10.5.0" + "@chevrotain/types" "10.5.0" + "@chevrotain/utils" "10.5.0" + lodash "4.17.21" + regexp-to-ast "0.5.0" + +"chokidar@>=3.0.0 <4.0.0": + version "3.6.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + +cli-truncate@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389" + integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== + dependencies: + slice-ansi "^5.0.0" + string-width "^5.0.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +cloudlogjs@^1.0.11, cloudlogjs@^1.0.9: + version "1.0.12" + resolved "https://registry.yarnpkg.com/cloudlogjs/-/cloudlogjs-1.0.12.tgz#b684658c7a8ace2b4efe62ecb033c390e04ce94e" + integrity sha512-mAE6QXLAzDj9fg1g3PguXC25MKkve8433hu+Af7BuGT5+7VSB8W9aSeh/LsZW2TscDYOJg/5PLhR9/Q4zxyp+Q== + dependencies: + axios "^0.24.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^2.0.16: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^2.18.0, commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^9.3.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== + dependencies: + safe-buffer "5.2.1" + +content-type@~1.0.4, content-type@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== + +convert-source-map@^1.5.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" + integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== + +cookie@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.6.0.tgz#2798b04b071b0ecbff0dbb62a505a8efa4e19051" + integrity sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +cosmiconfig@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" + integrity sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + +cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +csstype@^3.0.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" + integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== + +data-view-buffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz#8ea6326efec17a2e42620696e671d7d5a8bc66b2" + integrity sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz#90721ca95ff280677eb793749fce1011347669e2" + integrity sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +data-view-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz#5e0bbfb4828ed2d1b9b400cd8a7d119bca0ff18a" + integrity sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-data-view "^1.0.1" + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4, debug@^4.1.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decompress-response@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" + integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== + dependencies: + mimic-response "^3.1.0" + +deep-eql@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== + dependencies: + type-detect "^4.0.0" + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +deepmerge@^4.2.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-data-property@^1.0.1, define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +detect-libc@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" + integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diff@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" + integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +earcut@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a" + integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ== + +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== + +electron-to-chromium@^1.4.668: + version "1.4.717" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.717.tgz#99db370cae8cd090d5b01f8748e9ad369924d0f8" + integrity sha512-6Fmg8QkkumNOwuZ/5mIbMU9WI3H2fmn5ajcVya64I5Yr5CcNmO7vcLt0Y7c96DCiMO5/9G+4sI2r6eEvdg1F7A== + +email-addresses@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/email-addresses/-/email-addresses-3.1.0.tgz#cabf7e085cbdb63008a70319a74e6136188812fb" + integrity sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== + +encodeurl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" + integrity sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg== + +end-of-stream@^1.1.0, end-of-stream@^1.4.1: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2: + version "1.23.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.2.tgz#693312f3940f967b8dd3eebacb590b01712622e0" + integrity sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w== + dependencies: + array-buffer-byte-length "^1.0.1" + arraybuffer.prototype.slice "^1.0.3" + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + data-view-buffer "^1.0.1" + data-view-byte-length "^1.0.1" + data-view-byte-offset "^1.0.0" + es-define-property "^1.0.0" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + es-set-tostringtag "^2.0.3" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.4" + get-symbol-description "^1.0.2" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + hasown "^2.0.2" + internal-slot "^1.0.7" + is-array-buffer "^3.0.4" + is-callable "^1.2.7" + is-data-view "^1.0.1" + is-negative-zero "^2.0.3" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.3" + is-string "^1.0.7" + is-typed-array "^1.1.13" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.5" + regexp.prototype.flags "^1.5.2" + safe-array-concat "^1.1.2" + safe-regex-test "^1.0.3" + string.prototype.trim "^1.2.9" + string.prototype.trimend "^1.0.8" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.2" + typed-array-byte-length "^1.0.1" + typed-array-byte-offset "^1.0.2" + typed-array-length "^1.0.5" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.15" + +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-iterator-helpers@^1.0.17: + version "1.0.18" + resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz#4d3424f46b24df38d064af6fbbc89274e29ea69d" + integrity sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-errors "^1.3.0" + es-set-tostringtag "^2.0.3" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + globalthis "^1.0.3" + has-property-descriptors "^1.0.2" + has-proto "^1.0.3" + has-symbols "^1.0.3" + internal-slot "^1.0.7" + iterator.prototype "^1.1.2" + safe-array-concat "^1.1.2" + +es-object-atoms@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941" + integrity sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" + integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== + dependencies: + get-intrinsic "^1.2.4" + has-tostringtag "^1.0.2" + hasown "^2.0.1" + +es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +esbuild@^0.18.10, esbuild@~0.18.20: + version "0.18.20" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" + integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== + optionalDependencies: + "@esbuild/android-arm" "0.18.20" + "@esbuild/android-arm64" "0.18.20" + "@esbuild/android-x64" "0.18.20" + "@esbuild/darwin-arm64" "0.18.20" + "@esbuild/darwin-x64" "0.18.20" + "@esbuild/freebsd-arm64" "0.18.20" + "@esbuild/freebsd-x64" "0.18.20" + "@esbuild/linux-arm" "0.18.20" + "@esbuild/linux-arm64" "0.18.20" + "@esbuild/linux-ia32" "0.18.20" + "@esbuild/linux-loong64" "0.18.20" + "@esbuild/linux-mips64el" "0.18.20" + "@esbuild/linux-ppc64" "0.18.20" + "@esbuild/linux-riscv64" "0.18.20" + "@esbuild/linux-s390x" "0.18.20" + "@esbuild/linux-x64" "0.18.20" + "@esbuild/netbsd-x64" "0.18.20" + "@esbuild/openbsd-x64" "0.18.20" + "@esbuild/sunos-x64" "0.18.20" + "@esbuild/win32-arm64" "0.18.20" + "@esbuild/win32-ia32" "0.18.20" + "@esbuild/win32-x64" "0.18.20" + +esbuild@~0.23.0: + version "0.23.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" + integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.23.1" + "@esbuild/android-arm" "0.23.1" + "@esbuild/android-arm64" "0.23.1" + "@esbuild/android-x64" "0.23.1" + "@esbuild/darwin-arm64" "0.23.1" + "@esbuild/darwin-x64" "0.23.1" + "@esbuild/freebsd-arm64" "0.23.1" + "@esbuild/freebsd-x64" "0.23.1" + "@esbuild/linux-arm" "0.23.1" + "@esbuild/linux-arm64" "0.23.1" + "@esbuild/linux-ia32" "0.23.1" + "@esbuild/linux-loong64" "0.23.1" + "@esbuild/linux-mips64el" "0.23.1" + "@esbuild/linux-ppc64" "0.23.1" + "@esbuild/linux-riscv64" "0.23.1" + "@esbuild/linux-s390x" "0.23.1" + "@esbuild/linux-x64" "0.23.1" + "@esbuild/netbsd-x64" "0.23.1" + "@esbuild/openbsd-arm64" "0.23.1" + "@esbuild/openbsd-x64" "0.23.1" + "@esbuild/sunos-x64" "0.23.1" + "@esbuild/win32-arm64" "0.23.1" + "@esbuild/win32-ia32" "0.23.1" + "@esbuild/win32-x64" "0.23.1" + +escalade@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-config-alloy@^4.5.1: + version "4.9.0" + resolved "https://registry.yarnpkg.com/eslint-config-alloy/-/eslint-config-alloy-4.9.0.tgz#44ed777e8eb0ee595baabeb5d6cb568c2e6461c2" + integrity sha512-4DfiN0sXByf5WuXioZrrZJdfzZw+lgdoQfFTuQyFenJ2XeIKrsXYctArLiZAoAsTxyZnmUFYqrgwUIXx26q0gg== + +eslint-config-prettier@^8.5.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== + +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-react@^7.29.4: + version "7.34.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.34.1.tgz#6806b70c97796f5bbfb235a5d3379ece5f4da997" + integrity sha512-N97CxlouPT1AHt8Jn0mhhN2RrADlUAsk1/atcT2KyA/l9Q/E6ll7OIGwNumFmWfZ9skV3XXccYS19h80rHtgkw== + dependencies: + array-includes "^3.1.7" + array.prototype.findlast "^1.2.4" + array.prototype.flatmap "^1.3.2" + array.prototype.toreversed "^1.1.2" + array.prototype.tosorted "^1.1.3" + doctrine "^2.1.0" + es-iterator-helpers "^1.0.17" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.7" + object.fromentries "^2.0.7" + object.hasown "^1.1.3" + object.values "^1.1.7" + prop-types "^15.8.1" + resolve "^2.0.0-next.5" + semver "^6.3.1" + string.prototype.matchall "^4.0.10" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.13.0: + version "8.57.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" + integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.0" + "@humanwhocodes/config-array" "^0.11.14" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estree-walker@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" + integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== + +estree-walker@^2.0.1, estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== + +eventemitter3@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" + integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== + +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + +express@^4.20.0: + version "4.21.0" + resolved "https://registry.yarnpkg.com/express/-/express-4.21.0.tgz#d57cb706d49623d4ac27833f1cbc466b668eb915" + integrity sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng== + dependencies: + accepts "~1.3.8" + array-flatten "1.1.1" + body-parser "1.20.3" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.6.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "2.0.0" + encodeurl "~2.0.0" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.3.1" + fresh "0.5.2" + http-errors "2.0.0" + merge-descriptors "1.0.3" + methods "~1.1.2" + on-finished "2.4.1" + parseurl "~1.3.3" + path-to-regexp "0.1.10" + proxy-addr "~2.0.7" + qs "6.13.0" + range-parser "~1.2.1" + safe-buffer "5.2.1" + send "0.19.0" + serve-static "1.16.2" + setprototypeof "1.2.0" + statuses "2.0.1" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + +fast-glob@^3.2.9: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +filename-reserved-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz#abf73dfab735d045440abfea2d91f389ebbfa229" + integrity sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ== + +filenamify@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-4.3.0.tgz#62391cb58f02b09971c9d4f9d63b3cf9aba03106" + integrity sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg== + dependencies: + filename-reserved-regex "^2.0.0" + strip-outer "^1.0.1" + trim-repeated "^1.0.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.3.1.tgz#0c575f1d1d324ddd1da35ad7ece3df7d19088019" + integrity sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ== + dependencies: + debug "2.6.9" + encodeurl "~2.0.0" + escape-html "~1.0.3" + on-finished "2.4.1" + parseurl "~1.3.3" + statuses "2.0.1" + unpipe "~1.0.0" + +find-cache-dir@^3.3.1, find-cache-dir@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" + integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + +find-root@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" + integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== + +find-up@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== + +follow-redirects@^1.14.4, follow-redirects@^1.15.0: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +foreground-child@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" + integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^3.0.2" + +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +framesync@6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/framesync/-/framesync-6.1.2.tgz#755eff2fb5b8f3b4d2b266dd18121b300aefea27" + integrity sha512-jBTqhX6KaQVDyus8muwZbBeGGP0XgujBRbQ7gM7BRdS3CadCZIHiawyzYLnafYcvZIh5j8WE7cxZKFn7dXhu9g== + dependencies: + tslib "2.4.0" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== + +from2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g== + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + +fs-extra@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +function.prototype.name@^1.1.5, function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== + +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-symbol-description@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.2.tgz#533744d5aa20aca4e079c8e5daf7fd44202821f5" + integrity sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg== + dependencies: + call-bind "^1.0.5" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + +get-tsconfig@^4.7.2: + version "4.7.3" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.3.tgz#0498163d98f7b58484dd4906999c0c9d5f103f83" + integrity sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg== + dependencies: + resolve-pkg-maps "^1.0.0" + +get-tsconfig@^4.7.5: + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== + dependencies: + resolve-pkg-maps "^1.0.0" + +gh-pages@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-4.0.0.tgz#bd7447bab7eef008f677ac8cc4f6049ab978f4a6" + integrity sha512-p8S0T3aGJc68MtwOcZusul5qPSNZCalap3NWbhRUZYu1YOdp+EjZ+4kPmRM8h3NNRdqw00yuevRjlkuSzCn7iQ== + dependencies: + async "^2.6.1" + commander "^2.18.0" + email-addresses "^3.0.1" + filenamify "^4.3.0" + find-cache-dir "^3.3.1" + fs-extra "^8.1.0" + globby "^6.1.0" + +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== + +glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.0.3, glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^8.0.3: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^13.19.0: + version "13.24.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== + dependencies: + type-fest "^0.20.2" + +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + integrity sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw== + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + +has-proto@^1.0.1, has-proto@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" + integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0, has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + +has@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" + integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== + +hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + +hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +html-parse-stringify@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz#dfc1017347ce9f77c8141a507f233040c59c55d2" + integrity sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg== + dependencies: + void-elements "3.1.0" + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + +i18next@^22.4.15: + version "22.5.1" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.5.1.tgz#99df0b318741a506000c243429a7352e5f44d424" + integrity sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA== + dependencies: + "@babel/runtime" "^7.20.6" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + +immer@^9.0.21: + version "9.0.21" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" + integrity sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA== + +immutable@^4.0.0: + version "4.3.5" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.5.tgz#f8b436e66d59f99760dc577f5c99a4fd2a5cc5a0" + integrity sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw== + +import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + +internal-slot@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" + integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== + dependencies: + es-errors "^1.3.0" + hasown "^2.0.0" + side-channel "^1.0.4" + +into-stream@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-6.0.0.tgz#4bfc1244c0128224e18b8870e85b2de8e66c6702" + integrity sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA== + dependencies: + from2 "^2.3.0" + p-is-promise "^3.0.0" + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-array-buffer@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" + integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-async-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646" + integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA== + dependencies: + has-tostringtag "^1.0.0" + +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-builtin-module@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== + dependencies: + builtin-modules "^3.3.0" + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + +is-core-module@2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + dependencies: + has "^1.0.3" + +is-core-module@^2.13.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + +is-data-view@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-data-view/-/is-data-view-1.0.1.tgz#4b4d3a511b70f3dc26d42c03ca9ca515d847759f" + integrity sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w== + dependencies: + is-typed-array "^1.1.13" + +is-date-object@^1.0.1, is-date-object@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-finalizationregistry@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz#c8749b65f17c133313e661b1289b95ad3dbd62e6" + integrity sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw== + dependencies: + call-bind "^1.0.2" + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-fullwidth-code-point@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + +is-generator-function@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" + integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== + +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g== + +is-negative-zero@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.3.tgz#ced903a027aca6381b777a5743069d7376a49747" + integrity sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + +is-reference@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + dependencies: + "@types/estree" "*" + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-set@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" + integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== + +is-shared-array-buffer@^1.0.2, is-shared-array-buffer@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz#1237f1cba059cdb62431d378dcc37d9680181688" + integrity sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg== + dependencies: + call-bind "^1.0.7" + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + +is-weakmap@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd" + integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w== + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +is-weakset@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007" + integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-report@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-reports@^3.1.4: + version "3.1.7" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +iterator.prototype@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0" + integrity sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w== + dependencies: + define-properties "^1.2.1" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + reflect.getprototypeof "^1.0.4" + set-function-name "^2.0.1" + +jest-worker@^26.2.1: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^7.0.0" + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json5@^2.2.3: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +jsonc-parser@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a" + integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA== + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +"jsx-ast-utils@^2.4.1 || ^3.0.0": + version "3.3.5" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" + integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + object.assign "^4.1.4" + object.values "^1.1.6" + +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lie@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" + integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw== + dependencies: + immediate "~3.0.5" + +lilconfig@2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" + integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +lint-staged@^12.3.7: + version "12.5.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.5.0.tgz#d6925747480ae0e380d13988522f9dd8ef9126e3" + integrity sha512-BKLUjWDsKquV/JuIcoQW4MSAI3ggwEImF1+sB4zaKvyVx1wBk3FsG7UK9bpnmBTN1pm7EH2BBcMwINJzCRv12g== + dependencies: + cli-truncate "^3.1.0" + colorette "^2.0.16" + commander "^9.3.0" + debug "^4.3.4" + execa "^5.1.1" + lilconfig "2.0.5" + listr2 "^4.0.5" + micromatch "^4.0.5" + normalize-path "^3.0.0" + object-inspect "^1.12.2" + pidtree "^0.5.0" + string-argv "^0.3.1" + supports-color "^9.2.2" + yaml "^1.10.2" + +listr2@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" + integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.16" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.5.5" + through "^2.3.8" + wrap-ansi "^7.0.0" + +local-pkg@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" + integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== + +localforage@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4" + integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg== + dependencies: + lie "3.1.1" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + +loose-envify@^1.1.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loupe@^2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +magic-string@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" + integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" + +make-dir@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== + +merge-descriptors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.3.tgz#d80319a65f3c7935351e5cfdac8f9318504dbed5" + integrity sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== + +micromatch@^4.0.4, micromatch@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-response@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" + integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== + +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mitt@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" + integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== + +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + +mlly@^1.1.0, mlly@^1.2.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.6.1.tgz#0983067dc3366d6314fc5e12712884e6978d028f" + integrity sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA== + dependencies: + acorn "^8.11.3" + pathe "^1.1.2" + pkg-types "^1.0.3" + ufo "^1.3.2" + +modern-css-reset@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/modern-css-reset/-/modern-css-reset-1.4.0.tgz#5bee4d11eeca2ff19b882c6e8f1769773e792d04" + integrity sha512-0crZmSFmrxkI7159rvQWjpDhy0u4+Awg/iOycJdlVn0RSeft/a+6BrQHR3IqvmdK25sqt0o6Z5Ap7cWgUee2rw== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multistream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8" + integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw== + dependencies: + once "^1.4.0" + readable-stream "^3.6.0" + +nanoid@^3.3.7: + version "3.3.7" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" + integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== + +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== + +node-abi@^3.3.0: + version "3.56.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.56.0.tgz#ca807d5ff735ac6bbbd684ae3ff2debc1c2a40a7" + integrity sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q== + dependencies: + semver "^7.3.5" + +node-fetch@^2.6.6: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + +object-assign@^4.0.1, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-inspect@^1.12.2, object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.4, object.assign@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0" + integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ== + dependencies: + call-bind "^1.0.5" + define-properties "^1.2.1" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.entries@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41" + integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +object.fromentries@^2.0.7: + version "2.0.8" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" + integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +object.hasown@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.4.tgz#e270ae377e4c120cdcb7656ce66884a6218283dc" + integrity sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg== + dependencies: + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-object-atoms "^1.0.0" + +object.values@^1.1.6, object.values@^1.1.7: + version "1.2.0" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" + integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + +open@^8.4.0: + version "8.4.2" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" + integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + +p-is-promise@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-3.0.0.tgz#58e78c7dfe2e163cf2a04ff869e7c1dba64a5971" + integrity sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ== + +p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.0.0, path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.10.tgz#67e9108c5c0551b9e5326064387de4763c4d5f8b" + integrity sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pathe@^1.1.0, pathe@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pidtree@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.5.0.tgz#ad5fbc1de78b8a5f99d6fbdd4f6e4eee21d1aca1" + integrity sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA== + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== + +pixi-filters@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pixi-filters/-/pixi-filters-4.2.0.tgz#83bbde260ff487820fc5a0aed7f301f0020cc070" + integrity sha512-1ImDMPblvy/nafKbl+kACXqWcQY8jixq6ZID1jwcQW5wAEhuKmTtsLv4KU1Ui2qxj8Gor6/WUe3UaqfSR0OYpw== + dependencies: + "@pixi/filter-adjustment" "4.2.0" + "@pixi/filter-advanced-bloom" "4.2.0" + "@pixi/filter-ascii" "4.2.0" + "@pixi/filter-bevel" "4.2.0" + "@pixi/filter-bloom" "4.2.0" + "@pixi/filter-bulge-pinch" "4.2.0" + "@pixi/filter-color-map" "4.2.0" + "@pixi/filter-color-overlay" "4.2.0" + "@pixi/filter-color-replace" "4.2.0" + "@pixi/filter-convolution" "4.2.0" + "@pixi/filter-cross-hatch" "4.2.0" + "@pixi/filter-crt" "4.2.0" + "@pixi/filter-dot" "4.2.0" + "@pixi/filter-drop-shadow" "4.2.0" + "@pixi/filter-emboss" "4.2.0" + "@pixi/filter-glitch" "4.2.0" + "@pixi/filter-glow" "4.2.0" + "@pixi/filter-godray" "4.2.0" + "@pixi/filter-kawase-blur" "4.2.0" + "@pixi/filter-motion-blur" "4.2.0" + "@pixi/filter-multi-color-replace" "4.2.0" + "@pixi/filter-old-film" "4.2.0" + "@pixi/filter-outline" "4.2.0" + "@pixi/filter-pixelate" "4.2.0" + "@pixi/filter-radial-blur" "4.2.0" + "@pixi/filter-reflection" "4.2.0" + "@pixi/filter-rgb-split" "4.2.0" + "@pixi/filter-shockwave" "4.2.0" + "@pixi/filter-simple-lightmap" "4.2.0" + "@pixi/filter-tilt-shift" "4.2.0" + "@pixi/filter-twist" "4.2.0" + "@pixi/filter-zoom-blur" "4.2.0" + +pixi-live2d-display-webgal@^0.5.8: + version "0.5.8" + resolved "https://registry.yarnpkg.com/pixi-live2d-display-webgal/-/pixi-live2d-display-webgal-0.5.8.tgz#1ff7b5016559ff56a5cfaa96abeac84c878a2bbf" + integrity sha512-yekmPckXykqziyFcmmgYlZU4ad42rRGGmUFvrm96YJrdRIi+V9uv/xKOrRBMxD/tr3Sckqp6hOr9Wi3UX6NNLw== + dependencies: + gh-pages "^4.0.0" + +pixi-spine@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pixi-spine/-/pixi-spine-3.1.2.tgz#f63c5c566c2e74eae3e0c99da172f67404227398" + integrity sha512-rTTwXhBl5gZFZ793zdM/to0bifU8K4aa1gD0ilOiCqC/pgw5OxCcKnoRW3i05ythjzI3GlN6G0MDblOe2myr3w== + dependencies: + "@pixi-spine/base" "~3.1.2" + "@pixi-spine/loader-base" "~3.1.2" + "@pixi-spine/loader-uni" "~3.1.2" + "@pixi-spine/runtime-3.7" "~3.1.2" + "@pixi-spine/runtime-3.8" "~3.1.2" + "@pixi-spine/runtime-4.1" "~3.1.2" + +pixi.js@^6.3.0: + version "6.5.10" + resolved "https://registry.yarnpkg.com/pixi.js/-/pixi.js-6.5.10.tgz#a82638e0b7afc5bf7f3ab70d960521477276e866" + integrity sha512-Z2mjeoISml2iuVwT1e/BQwERYM2yKoiR08ZdGrg8y5JjeuVptfTrve4DbPMRN/kEDodesgQZGV/pFv0fE9Q2SA== + dependencies: + "@pixi/accessibility" "6.5.10" + "@pixi/app" "6.5.10" + "@pixi/compressed-textures" "6.5.10" + "@pixi/constants" "6.5.10" + "@pixi/core" "6.5.10" + "@pixi/display" "6.5.10" + "@pixi/extensions" "6.5.10" + "@pixi/extract" "6.5.10" + "@pixi/filter-alpha" "6.5.10" + "@pixi/filter-blur" "6.5.10" + "@pixi/filter-color-matrix" "6.5.10" + "@pixi/filter-displacement" "6.5.10" + "@pixi/filter-fxaa" "6.5.10" + "@pixi/filter-noise" "6.5.10" + "@pixi/graphics" "6.5.10" + "@pixi/interaction" "6.5.10" + "@pixi/loaders" "6.5.10" + "@pixi/math" "6.5.10" + "@pixi/mesh" "6.5.10" + "@pixi/mesh-extras" "6.5.10" + "@pixi/mixin-cache-as-bitmap" "6.5.10" + "@pixi/mixin-get-child-by-name" "6.5.10" + "@pixi/mixin-get-global-position" "6.5.10" + "@pixi/particle-container" "6.5.10" + "@pixi/polyfill" "6.5.10" + "@pixi/prepare" "6.5.10" + "@pixi/runner" "6.5.10" + "@pixi/settings" "6.5.10" + "@pixi/sprite" "6.5.10" + "@pixi/sprite-animated" "6.5.10" + "@pixi/sprite-tiling" "6.5.10" + "@pixi/spritesheet" "6.5.10" + "@pixi/text" "6.5.10" + "@pixi/text-bitmap" "6.5.10" + "@pixi/ticker" "6.5.10" + "@pixi/utils" "6.5.10" + +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +pkg-fetch@3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.2.tgz#6f68ebc54842b73f8c0808959a9df3739dcb28b7" + integrity sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA== + dependencies: + chalk "^4.1.2" + fs-extra "^9.1.0" + https-proxy-agent "^5.0.0" + node-fetch "^2.6.6" + progress "^2.0.3" + semver "^7.3.5" + tar-fs "^2.1.1" + yargs "^16.2.0" + +pkg-types@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868" + integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A== + dependencies: + jsonc-parser "^3.2.0" + mlly "^1.2.0" + pathe "^1.1.0" + +pkg@^5.8.0: + version "5.8.1" + resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.1.tgz#862020f3c0575638ef7d1146f951a54d65ddc984" + integrity sha512-CjBWtFStCfIiT4Bde9QpJy0KeH19jCfwZRJqHFDFXfhUklCx8JoFmMj3wgnEYIwGmZVNkhsStPHEOnrtrQhEXA== + dependencies: + "@babel/generator" "7.18.2" + "@babel/parser" "7.18.4" + "@babel/types" "7.19.0" + chalk "^4.1.2" + fs-extra "^9.1.0" + globby "^11.1.0" + into-stream "^6.0.0" + is-core-module "2.9.0" + minimist "^1.2.6" + multistream "^4.1.0" + pkg-fetch "3.4.2" + prebuild-install "7.1.1" + resolve "^1.22.0" + stream-meter "^1.0.4" + +popmotion@^11.0.5: + version "11.0.5" + resolved "https://registry.yarnpkg.com/popmotion/-/popmotion-11.0.5.tgz#8e3e014421a0ffa30ecd722564fd2558954e1f7d" + integrity sha512-la8gPM1WYeFznb/JqF4GiTkRRPZsfaj2+kCxqQgr2MJylMmIKUwBfWW8Wa5fml/8gmtlD5yI01MP1QCZPWmppA== + dependencies: + framesync "6.1.2" + hey-listen "^1.0.8" + style-value-types "5.1.2" + tslib "2.4.0" + +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + +postcss@^8.4.27: + version "8.4.38" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e" + integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A== + dependencies: + nanoid "^3.3.7" + picocolors "^1.0.0" + source-map-js "^1.2.0" + +prebuild-install@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-7.1.1.tgz#de97d5b34a70a0c81334fd24641f2a1702352e45" + integrity sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw== + dependencies: + detect-libc "^2.0.0" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^3.3.0" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^4.0.0" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.6.2: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + +pretty-format@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +progress@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +promise-polyfill@^8.2.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.3.0.tgz#9284810268138d103807b11f4e23d5e945a4db63" + integrity sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg== + +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== + +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== + dependencies: + side-channel "^1.0.6" + +qs@^6.11.2: + version "6.12.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.0.tgz#edd40c3b823995946a8a0b1f208669c7a200db77" + integrity sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg== + dependencies: + side-channel "^1.0.6" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" + integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dom@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" + integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + scheduler "^0.20.2" + +react-i18next@^12.2.2: + version "12.3.1" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-12.3.1.tgz#30134a41a2a71c61dc69c6383504929aed1c99e7" + integrity sha512-5v8E2XjZDFzK7K87eSwC7AJcAkcLt5xYZ4+yTPDAW1i7C93oOY1dnr4BaQM7un4Hm+GmghuiPvevWwlca5PwDA== + dependencies: + "@babel/runtime" "^7.20.6" + html-parse-stringify "^3.0.1" + +react-is@^16.13.1, react-is@^16.7.0: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +react-is@^17.0.1: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== + +react-redux@^8.0.1: + version "8.1.3" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.1.3.tgz#4fdc0462d0acb59af29a13c27ffef6f49ab4df46" + integrity sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw== + dependencies: + "@babel/runtime" "^7.12.1" + "@types/hoist-non-react-statics" "^3.3.1" + "@types/use-sync-external-store" "^0.0.3" + hoist-non-react-statics "^3.3.2" + react-is "^18.0.0" + use-sync-external-store "^1.0.0" + +react-refresh@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e" + integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== + +react@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" + integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +readable-stream@^2.0.0, readable-stream@^2.1.4: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +redux-thunk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" + integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== + +redux@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" + integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== + dependencies: + "@babel/runtime" "^7.9.2" + +reflect.getprototypeof@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz#3ab04c32a8390b770712b7a8633972702d278859" + integrity sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.1" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + globalthis "^1.0.3" + which-builtin-type "^1.1.3" + +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== + +regexp-to-ast@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz#56c73856bee5e1fef7f73a00f1473452ab712a24" + integrity sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw== + +regexp.prototype.flags@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334" + integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw== + dependencies: + call-bind "^1.0.6" + define-properties "^1.2.1" + es-errors "^1.3.0" + set-function-name "^2.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +reselect@^4.1.8: + version "4.1.8" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.8.tgz#3f5dc671ea168dccdeb3e141236f69f02eaec524" + integrity sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + +resolve@^1.19.0, resolve@^1.22.0, resolve@^1.22.1: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^2.0.0-next.5: + version "2.0.0-next.5" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" + integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rfdc@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rollup-plugin-babel@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.4.0.tgz#d15bd259466a9d1accbdb2fe2fff17c52d030acb" + integrity sha512-Lek/TYp1+7g7I+uMfJnnSJ7YWoD58ajo6Oarhlex7lvUce+RCKRuGRSgztDO3/MF/PuGKmUL5iTHKf208UNszw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + rollup-pluginutils "^2.8.1" + +rollup-plugin-terser@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" + integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== + dependencies: + "@babel/code-frame" "^7.10.4" + jest-worker "^26.2.1" + serialize-javascript "^4.0.0" + terser "^5.0.0" + +rollup-plugin-typescript2@^0.34.1: + version "0.34.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.34.1.tgz#c457f155a71d133c142689213fce78694e30d0be" + integrity sha512-P4cHLtGikESmqi1CA+tdMDUv8WbQV48mzPYt77TSTOPJpERyZ9TXdDgjSDix8Fkqce6soYz3+fa4lrC93IEkcw== + dependencies: + "@rollup/pluginutils" "^4.1.2" + find-cache-dir "^3.3.2" + fs-extra "^10.0.0" + semver "^7.3.7" + tslib "^2.4.0" + +rollup-plugin-visualizer@^5.6.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.12.0.tgz#661542191ce78ee4f378995297260d0c1efb1302" + integrity sha512-8/NU9jXcHRs7Nnj07PF2o4gjxmm9lXIrZ8r175bT9dK8qoLlvKTwRMArRCMgpMGlq8CTLugRvEmyMeMXIU2pNQ== + dependencies: + open "^8.4.0" + picomatch "^2.3.1" + source-map "^0.7.4" + yargs "^17.5.1" + +rollup-pluginutils@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" + integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== + dependencies: + estree-walker "^0.6.1" + +rollup@^3.27.1, rollup@^3.29.5: + version "3.29.5" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.5.tgz#8a2e477a758b520fb78daf04bca4c522c1da8a54" + integrity sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w== + optionalDependencies: + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rxjs@^7.5.5: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== + dependencies: + tslib "^2.1.0" + +safe-array-concat@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.1.2.tgz#81d77ee0c4e8b863635227c721278dd524c20edb" + integrity sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q== + dependencies: + call-bind "^1.0.7" + get-intrinsic "^1.2.4" + has-symbols "^1.0.3" + isarray "^2.0.5" + +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex-test@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.3.tgz#a5b4c0f06e0ab50ea2c395c14d8371232924c377" + integrity sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw== + dependencies: + call-bind "^1.0.6" + es-errors "^1.3.0" + is-regex "^1.1.4" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sass@^1.49.9: + version "1.72.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.72.0.tgz#5b9978943fcfb32b25a6a5acb102fc9dabbbf41c" + integrity sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA== + dependencies: + chokidar ">=3.0.0 <4.0.0" + immutable "^4.0.0" + source-map-js ">=0.6.2 <2.0.0" + +scheduler@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" + integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +semver@^6.0.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.3.5, semver@^7.3.7, semver@^7.5.3: + version "7.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + +send@0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.19.0.tgz#bbc5a388c8ea6c048967049dbeac0e4a3f09d7f8" + integrity sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw== + dependencies: + debug "2.6.9" + depd "2.0.0" + destroy "1.2.0" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "2.0.0" + mime "1.6.0" + ms "2.1.3" + on-finished "2.4.1" + range-parser "~1.2.1" + statuses "2.0.1" + +serialize-javascript@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" + integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== + dependencies: + randombytes "^2.1.0" + +serve-static@1.16.2: + version "1.16.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.16.2.tgz#b6a5343da47f6bdd2673848bf45754941e803296" + integrity sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw== + dependencies: + encodeurl "~2.0.0" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.19.0" + +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + +set-function-name@^2.0.1, set-function-name@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985" + integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.2" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4, side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + +siginfo@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.1.tgz#4a39db549287c979d352112fa03fd99fd6bc3543" + integrity sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA== + dependencies: + decompress-response "^6.0.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + +"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af" + integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg== + +source-map-support@^0.5.21, source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +source-map@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + +stackback@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +std-env@^3.3.1: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== + +stream-meter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" + integrity sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ== + dependencies: + readable-stream "^2.1.4" + +string-argv@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +string.prototype.matchall@^4.0.10: + version "4.0.11" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a" + integrity sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.2" + es-errors "^1.3.0" + es-object-atoms "^1.0.0" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.7" + regexp.prototype.flags "^1.5.2" + set-function-name "^2.0.2" + side-channel "^1.0.6" + +string.prototype.trim@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" + integrity sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-object-atoms "^1.0.0" + +string.prototype.trimend@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz#3651b8513719e8a9f48de7f2f77640b26652b229" + integrity sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +string.prototype.trimstart@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz#7ee834dda8c7c17eff3118472bb35bfedaa34dde" + integrity sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-object-atoms "^1.0.0" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +strip-literal@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.3.0.tgz#db3942c2ec1699e6836ad230090b84bb458e3a07" + integrity sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg== + dependencies: + acorn "^8.10.0" + +strip-outer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" + integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg== + dependencies: + escape-string-regexp "^1.0.2" + +style-value-types@5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/style-value-types/-/style-value-types-5.1.2.tgz#6be66b237bd546048a764883528072ed95713b62" + integrity sha512-Vs9fNreYF9j6W2VvuDTP7kepALi7sk0xtk2Tu8Yxi9UoajJdEVpNpCov0HsLTqXvNGKX+Uv09pkozVITi1jf3Q== + dependencies: + hey-listen "^1.0.8" + tslib "2.4.0" + +stylis@4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.2.0.tgz#79daee0208964c8fe695a42fcffcac633a211a51" + integrity sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.0.0, supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-color@^9.2.2: + version "9.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.4.0.tgz#17bfcf686288f531db3dea3215510621ccb55954" + integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== + +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tar-fs@^2.0.0, tar-fs@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + +terser@^5.0.0: + version "5.29.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.29.2.tgz#c17d573ce1da1b30f21a877bffd5655dd86fdb35" + integrity sha512-ZiGkhUBIM+7LwkNjXYJq8svgkd+QK3UUr0wJqY4MieaezBSAIPgbSPZyIx0idM6XWK5CMzSWa8MJIzmRcB8Caw== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tinybench@^2.3.1: + version "2.6.0" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.6.0.tgz#1423284ee22de07c91b3752c048d2764714b341b" + integrity sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA== + +tinypool@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.3.1.tgz#a99c2e446aba9be05d3e1cb756d6aed7af4723b6" + integrity sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ== + +tinyspy@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-1.1.1.tgz#0cb91d5157892af38cb2d217f5c7e8507a5bf092" + integrity sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g== + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +trim-repeated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" + integrity sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg== + dependencies: + escape-string-regexp "^1.0.2" + +ts-node@^10.9.1: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + +tslib@^1.8.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.1.0, tslib@^2.4.0, tslib@^2.4.1: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +tsx@^3.12.7: + version "3.14.0" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-3.14.0.tgz#be6e2176b6f210fe8f48124fb6e22e0f075e927b" + integrity sha512-xHtFaKtHxM9LOklMmJdI3BEnQq/D5F73Of2E1GDrITi9sgoVkvIsrQUTY1G8FlmGtA+awCI4EBlTRRYxkL2sRg== + dependencies: + esbuild "~0.18.20" + get-tsconfig "^4.7.2" + source-map-support "^0.5.21" + optionalDependencies: + fsevents "~2.3.3" + +tsx@^4.19.0: + version "4.19.1" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.1.tgz#b7bffdf4b565813e4dea14b90872af279cd0090b" + integrity sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA== + dependencies: + esbuild "~0.23.0" + get-tsconfig "^4.7.5" + optionalDependencies: + fsevents "~2.3.3" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== + dependencies: + safe-buffer "^5.0.1" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-detect@^4.0.0, type-detect@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typed-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" + integrity sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + is-typed-array "^1.1.13" + +typed-array-byte-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz#d92972d3cff99a3fa2e765a28fcdc0f1d89dec67" + integrity sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-byte-offset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz#f9ec1acb9259f395093e4567eb3c28a580d02063" + integrity sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + +typed-array-length@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.6.tgz#57155207c76e64a3457482dfdc1c9d1d3c4c73a3" + integrity sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g== + dependencies: + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-proto "^1.0.3" + is-typed-array "^1.1.13" + possible-typed-array-names "^1.0.0" + +typescript@^4.5.4, typescript@^4.9.3: + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== + +ufo@^1.3.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" + integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +url@^0.11.0: + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== + dependencies: + punycode "^1.4.1" + qs "^6.11.2" + +use-sync-external-store@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" + integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== + +uuid@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +v8-to-istanbul@^9.0.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" + integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== + dependencies: + "@jridgewell/trace-mapping" "^0.3.12" + "@types/istanbul-lib-coverage" "^2.0.1" + convert-source-map "^2.0.0" + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== + +vite-node@0.28.5: + version "0.28.5" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.28.5.tgz#56d0f78846ea40fddf2e28390899df52a4738006" + integrity sha512-LmXb9saMGlrMZbXTvOveJKwMTBTNUH66c8rJnQ0ZPNX+myPEol64+szRzXtV5ORb0Hb/91yq+/D3oERoyAt6LA== + dependencies: + cac "^6.7.14" + debug "^4.3.4" + mlly "^1.1.0" + pathe "^1.1.0" + picocolors "^1.0.0" + source-map "^0.6.1" + source-map-support "^0.5.21" + vite "^3.0.0 || ^4.0.0" + +vite-plugin-package-version@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/vite-plugin-package-version/-/vite-plugin-package-version-1.1.0.tgz#7d8088955aa21e4ec93353c98992b3f58c4bf13c" + integrity sha512-TPoFZXNanzcaKCIrC3e2L/TVRkkRLB6l4RPN/S7KbG7rWfyLcCEGsnXvxn6qR7fyZwXalnnSN/I9d6pSFjHpEA== + +"vite@^3.0.0 || ^4.0.0", vite@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.5.tgz#639b9feca5c0a3bfe3c60cb630ef28bf219d742e" + integrity sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ== + dependencies: + esbuild "^0.18.10" + postcss "^8.4.27" + rollup "^3.27.1" + optionalDependencies: + fsevents "~2.3.2" + +vitest@0.28.5, vitest@^0.28.5: + version "0.28.5" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.28.5.tgz#94410a8924cd7189e4f1adffa8c5cde809cbf2f9" + integrity sha512-pyCQ+wcAOX7mKMcBNkzDwEHRGqQvHUl0XnoHR+3Pb1hytAHISgSxv9h0gUiSiYtISXUU3rMrKiKzFYDrI6ZIHA== + dependencies: + "@types/chai" "^4.3.4" + "@types/chai-subset" "^1.3.3" + "@types/node" "*" + "@vitest/expect" "0.28.5" + "@vitest/runner" "0.28.5" + "@vitest/spy" "0.28.5" + "@vitest/utils" "0.28.5" + acorn "^8.8.1" + acorn-walk "^8.2.0" + cac "^6.7.14" + chai "^4.3.7" + debug "^4.3.4" + local-pkg "^0.4.2" + pathe "^1.1.0" + picocolors "^1.0.0" + source-map "^0.6.1" + std-env "^3.3.1" + strip-literal "^1.0.0" + tinybench "^2.3.1" + tinypool "^0.3.1" + tinyspy "^1.0.2" + vite "^3.0.0 || ^4.0.0" + vite-node "0.28.5" + why-is-node-running "^2.2.2" + +void-elements@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-3.1.0.tgz#614f7fbf8d801f0bb5f0661f5b2f5785750e4f09" + integrity sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-builtin-type@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.3.tgz#b1b8443707cc58b6e9bf98d32110ff0c2cbd029b" + integrity sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw== + dependencies: + function.prototype.name "^1.1.5" + has-tostringtag "^1.0.0" + is-async-function "^2.0.0" + is-date-object "^1.0.5" + is-finalizationregistry "^1.0.2" + is-generator-function "^1.0.10" + is-regex "^1.1.4" + is-weakref "^1.0.2" + isarray "^2.0.5" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.9" + +which-collection@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0" + integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw== + dependencies: + is-map "^2.0.3" + is-set "^2.0.3" + is-weakmap "^2.0.2" + is-weakset "^2.0.3" + +which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.9: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +why-is-node-running@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e" + integrity sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA== + dependencies: + siginfo "^2.0.0" + stackback "0.0.2" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@^1.10.0, yaml@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + +yargs-parser@^20.2.2, yargs-parser@^20.2.9: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^17.5.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +yocto-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==