diff --git a/.editorconfig b/.editorconfig index 6f47929bcc..86a7f55e72 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,7 +6,7 @@ root = true [*] charset = utf-8 end_of_line = lf -indent_size = 2 +indent_size = 4 indent_style = space insert_final_newline = true trim_trailing_whitespace = false diff --git a/.github/README.md b/.github/README.md index 593ed2f3fb..cb29562d8e 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,5 +1,45 @@



+ license + last-commit + repo-top-language + repo-language-count +

+

+ Developed with the software and tools below. +

+

+ electronbuilder + GNU%20Bash + esbuild + Astro + Svelte + JavaScript + HTML5 + PostCSS + Sass + YAML + Jest + sharp + Webpack + Vite + React + Axios + ESLint + Electron + SemVer + Python + Lodash + TypeScript + Rome + Docker + GitHub%20Actions + Socket.io + Go + JSON +

+ +

CodeFactor @@ -45,7 +85,7 @@ ## 🌐 兼容性 - + diff --git a/.github/README_Sillot.md b/.github/README_Sillot.md index e58b9a8d0a..5f7c27511f 100644 --- a/.github/README_Sillot.md +++ b/.github/README_Sillot.md @@ -30,11 +30,8 @@ ## 彖乄驱动 -汐洛始终代表先进恣产力,始终拥护全球先进开源力量,坚定不移推动新彖乄面向未来持续发展。 +汐洛始终代表先进恣产力,始终拥抱全球先进开源力量,坚定不移推动新彖乄面向未来持续发展。 -

-framework -

## 极致优雅 diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d98a132695..ceabe519fb 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -10,6 +10,12 @@ jobs: create_release: name: Create Release runs-on: ubuntu-latest + strategy: + matrix: + string: + - repo_name_android: "Sillot-android" + repo_name: "Sillot" + repo_owner: "Hi-Windom" outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} release_version: ${{ steps.release_info.outputs.release_version }} @@ -62,9 +68,9 @@ jobs: run: | echo "release_title=$(git show --format=%s --no-patch | head -1)" >> $GITHUB_OUTPUT echo "release_version=v${{ steps.version.outputs.value }}_$(TZ=Asia/Shanghai date +'%Y%m%d')_syv${{ steps.syv.outputs.value }}" >> $GITHUB_OUTPUT - changelog1=$(python scripts/parse-changelog-HEAD.py -t ${{ github.ref }} -b ${{ steps.thislatestR.outputs.release }} Hi-Windom/Sillot) - changelog2=$(python scripts/parse-changelog-sillot.py -t ${{ github.ref }} Hi-Windom/Sillot) - changelog3=$(python scripts/parse-changelog-sillot.py -t ${{ github.ref }} Hi-Windom/Sillot-android) + changelog1=$(python scripts/parse-changelog-HEAD.py -t ${{ github.ref }} -b ${{ steps.thislatestR.outputs.release }} ${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}) + changelog2=$(python scripts/parse-changelog-sillot.py -t ${{ github.ref }} ${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}) + changelog3=$(python scripts/parse-changelog-sillot.py -t ${{ github.ref }} ${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name_android }}) EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) echo "release_body_sillot<<$EOF" >> $GITHUB_ENV echo "$changelog1" >> $GITHUB_ENV @@ -89,9 +95,10 @@ jobs: id: create_release uses: ncipollo/release-action@v1 with: - release_name: ${{ steps.release_info.outputs.release_version }} - tag_name: ${{ github.ref }} - body: "${{ env.release_body_sillot }}\n---\n${{ env.release_body_siyuan }}" + name: ${{ steps.release_info.outputs.release_version }} + tag: ${{ github.ref }} + body: "${{ env.release_body_sillot }}\n---\n${{ env.release_body_siyuan }}\n---\n\n\n" + generateReleaseNotes: true draft: false prerelease: true token: ${{ secrets.GITHUB_TOKEN }} @@ -101,6 +108,10 @@ jobs: needs: create_release strategy: matrix: + string: + - repo_name_android: "Sillot-android" + repo_name: "Sillot" + repo_owner: "Hi-Windom" config: - os: ubuntu-20.04 kernel_path: "../app/kernel-linux/SiYuan-Sillot-Kernel" @@ -145,13 +156,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot - - - name: Checkout subtree PSP - uses: actions/checkout@v4 - with: - repository: K-Sillot/sillot-plugin-system - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/PSP + path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }} - name: Set up MingGW uses: msys2/setup-msys2@v2 @@ -160,7 +165,7 @@ jobs: install: p7zip mingw-w64-x86_64-lua - name: Set up TDM-GCC - run: msys2 -c "bash go/src/github.com/Hi-Windom/Sillot/scripts/get-tdm-gcc.sh tdm https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm-1/tdm-gcc-10.3.0.exe" && echo "CC=${{ github.workspace }}/tdm/bin/gcc.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + run: msys2 -c "bash go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/scripts/get-tdm-gcc.sh tdm https://github.com/jmeubank/tdm-gcc/releases/download/v10.3.0-tdm-1/tdm-gcc-10.3.0.exe" && echo "CC=${{ github.workspace }}/tdm/bin/gcc.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append if: contains( matrix.config.goarch, '386') working-directory: ${{ github.workspace }} @@ -172,7 +177,7 @@ jobs: - name: Set up goversioninfo run: go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo && go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo if: contains( matrix.config.goos, 'windows') - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/kernel + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/kernel env: GO111MODULE: on CGO_ENABLED: 1 @@ -187,52 +192,52 @@ jobs: - name: Install Node pnpm run: npm install -g pnpm - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app - name: Change NPMRC File run: pnpm config set registry https://registry.npmjs.org/ --location project - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app - name: Install Node Dependencies run: pnpm install --no-frozen-lockfile - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app - name: Building UI run: pnpm run build - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app - name: Remove Build Directory uses: JesseTG/rm@v1.0.2 with: - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/build + path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app/build - name: Remove Kernel Directory for Linux uses: JesseTG/rm@v1.0.2 with: - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/kernel-linux + path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app/kernel-linux - name: Remove Kernel Directory for Windows uses: JesseTG/rm@v1.0.2 with: - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/kernel + path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app/kernel # - name: Remove Kernel Directory for macOS # uses: JesseTG/rm@v1.0.2 # with: - # path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/kernel-darwin + # path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app/kernel-darwin # - name: Remove Kernel Directory for macOS ARM64 # uses: JesseTG/rm@v1.0.2 # with: - # path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/kernel-darwin-arm64 + # path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app/kernel-darwin-arm64 - name: Generate Icon Resource and Properties/Version Info For Windows run: ${{ github.workspace }}\go\${{ matrix.config.gobin }}\goversioninfo -platform-specific=true -icon="resource\icon.ico" -manifest="resource\goversioninfo.exe.manifest" if: contains( matrix.config.goos, 'windows') - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/kernel + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/kernel - name: Building Kernel run: go build --tags fts5 -o "${{ matrix.config.kernel_path }}" -v -ldflags "${{ matrix.config.build_args }}" - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/kernel + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/kernel env: GO111MODULE: on CGO_ENABLED: 1 @@ -242,44 +247,40 @@ jobs: - name: Building Electron run: pnpm run ${{ matrix.config.electron_args }} - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app - - name: Upload Release - uses: actions/upload-release-asset@v1 + - name: Upload Release Asset for Windows & Linux + uses: shogo82148/actions-upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # 这里使用 bot + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: Sillot-${{ needs.create_release.outputs.release_version }}-${{ matrix.config.suffix }} - asset_path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/build/Sillot-${{ needs.create_release.outputs.version }}-${{ matrix.config.suffix }} - asset_content_type: application/octet-stream + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_name: ${{ matrix.string.repo_name }}-${{ needs.create_release.outputs.release_version }}-${{ matrix.config.suffix }} + asset_path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app/build/${{ matrix.string.repo_name }}-${{ needs.create_release.outputs.version }}-${{ matrix.config.suffix }} - name: zip WinPortable uses: thedoctor0/zip-release@0.7.1 if: contains( matrix.config.goos, 'windows') with: type: 'zip' - filename: Sillot-${{ needs.create_release.outputs.release_version }}-win_Portable_.zip - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot/app/build/win-unpacked/ + filename: ${{ matrix.string.repo_name }}-${{ needs.create_release.outputs.release_version }}-win_Portable_.zip + path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }}/app/build/win-unpacked/ exclusions: '*.git*' recursive_exclusions: 'LICENSES.chromium.html' - - name: Upload WinPortable to release - uses: actions/upload-release-asset@v1 - if: contains( matrix.config.goos, 'windows') + - name: Upload WinPortable to release asset + if: contains(matrix.config.goos, 'windows') + uses: shogo82148/actions-upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # 这里使用 bot + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: Sillot-${{ needs.create_release.outputs.release_version }}-win_Portable_.zip - asset_path: Sillot-${{ needs.create_release.outputs.release_version }}-win_Portable_.zip - asset_content_type: application/octet-stream + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_name: ${{ matrix.string.repo_name }}-${{ needs.create_release.outputs.release_version }}-win_Portable_.zip + asset_path: ${{ matrix.string.repo_name }}-${{ needs.create_release.outputs.release_version }}-win_Portable_.zip # Manual setup is required when the built-in version does not work correctly in windows2022 - - name: Setup JDK 11 + - name: Setup JDK uses: actions/setup-java@v3 if: contains( matrix.config.goos, 'windows') continue-on-error: true @@ -300,49 +301,48 @@ jobs: uses: JesseTG/rm@v1.0.2 if: contains( matrix.config.goos, 'windows') with: - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/SillotAndroid + path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name_android }} - name: Checkout android repo uses: actions/checkout@v4 if: contains( matrix.config.goos, 'windows') with: - repository: Hi-Windom/Sillot-android - path: ${{ github.workspace }}/go/src/github.com/Hi-Windom/SillotAndroid + repository: ${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name_android }} + path: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name_android }} - name: Before android build if: contains( matrix.config.goos, 'windows') run: | - cd ${{ github.workspace }}/go/src/github.com/Hi-Windom/Sillot + cd ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name }} .\scripts\sillot-android-build-action.bat continue-on-error: false - name: Build with Gradle if: contains( matrix.config.goos, 'windows') - working-directory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/SillotAndroid + working-directory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name_android }} run: ./gradlew assembleAction --quiet --stacktrace continue-on-error: false - - uses: r0adkll/sign-android-release@v1 + - uses: noriban/sign-android-release@v5 if: contains( matrix.config.goos, 'windows') name: Sign APK id: sign_app with: - releaseDirectory: ${{ github.workspace }}/go/src/github.com/Hi-Windom/SillotAndroid/app/build/outputs/apk/action + releaseDirectory: ${{ github.workspace }}/go/src/github.com/${{ matrix.string.repo_owner }}/${{ matrix.string.repo_name_android }}/app/build/outputs/apk/action signingKeyBase64: ${{ secrets.APK_SIGN_KEY_JKS_BASE64 }} alias: ${{ secrets.APK_SIGN_KEY_ALIAS }} keyStorePassword: ${{ secrets.APK_SIGN_KEY_JKS_PW }} keyPassword: ${{ secrets.APK_SIGN_KEY_PW }} env: # override default build-tools version -- optional - BUILD_TOOLS_VERSION: "30.0.3" + BUILD_TOOLS_VERSION: "34.0.0" - - name: Upload APK to release - uses: actions/upload-release-asset@v1 - if: contains( matrix.config.goos, 'windows') + - name: Upload APK to release asset + if: contains(matrix.config.goos, 'windows') + uses: shogo82148/actions-upload-release-asset@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: Sillot-${{ needs.create_release.outputs.release_version }}-debug.apk - asset_path: ${{steps.sign_app.outputs.signedReleaseFile}} - asset_content_type: application/octet-stream + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_name: ${{ matrix.string.repo_name }}-${{ needs.create_release.outputs.release_version }}-beta_github.apk + asset_path: ${{steps.sign_app.outputs.signedReleaseFile}} diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index e3e9ef1c84..69b7142586 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -53,7 +53,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_PWD }} - - name: Build the Docker image + - name: Build the Docker image # amd64 就是 x86_64 run: | docker buildx build --push --platform linux/amd64 -t soltus/sillot:latest -t soltus/sillot:${{ github.event.inputs.image_tag }}-sillot . diff --git a/app/PSP/.gitignore b/app/PSP/.gitignore deleted file mode 100644 index d7ef6b48f6..0000000000 --- a/app/PSP/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -temp/ -/.history \ No newline at end of file diff --git a/app/PSP/.npmignore b/app/PSP/.npmignore deleted file mode 100644 index ace653834d..0000000000 --- a/app/PSP/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -type/ -.* -src/ -examples/ -doc/ -vite.config.js diff --git a/app/PSP/.npmrc b/app/PSP/.npmrc deleted file mode 100644 index b0b1c31f23..0000000000 --- a/app/PSP/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -shell-emulator=true -registry=http://mirrors.cloud.tencent.com/npm/ \ No newline at end of file diff --git a/app/PSP/.vscode/settings.json b/app/PSP/.vscode/settings.json deleted file mode 100644 index 22761a0339..0000000000 --- a/app/PSP/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "svelte.plugin.svelte.defaultScriptLanguage": "ts", - "[svelte]": { - "editor.defaultFormatter": "svelte.svelte-vscode" - }, -} \ No newline at end of file diff --git a/app/PSP/CHANGELOG.md b/app/PSP/CHANGELOG.md deleted file mode 100644 index 338ddb647e..0000000000 --- a/app/PSP/CHANGELOG.md +++ /dev/null @@ -1,43 +0,0 @@ -# Changelog - -## v0.7.0 -1. 添加版本自动判断 -2. 添加插件系统内置配置页面支持插件注入 -3. 修复export classes - -## v0.5.0 -1. 插件系统国际化 -2. 插件支持卸载 -3. 插件商店预览功能 - -## v0.4.0 -1. 插件系统已支持浏览器使用,需思源2.8.1及以上版本。 **注意:大量插件目前对web的支持并不好,需要等待插件开发者进行适配。建议还是在桌面端使用。** -2. 升级过程中将原版代码挂件loader迁移到挂件版路径,但不会下载挂件。 -3. 挂件版用户记得更新到最新版本挂件 - -## v0.3.21 -+ 挂件版本不进行自动升级,即使勾选了自动升级功能 - -## v0.3.20 -+ 新增功能:命令面板 -+ 重构:修改vite构建脚本,移除dist - -## v0.3.19 -+ 修改图标 -+ eslint重构代码 - -## v0.3.13 -+ 增加插件商店,并可配置插件商店地址 -+ 暴露PluginSystem及Ioc容器到window对象 - -## v0.3.12 -+ 重构API接口,支持自动化导出api类型声明 - -## v0.3.11 -+ 增加通过Plugin继承调用registerCommand,实现插件快捷键注册。未来将通过此方式开发命令面板。 - -## v0.3.10 -+ 修复没有plugins时初次安装遇到的问题 - -## v0.3.9 -+ 适配思源2.7.7,调整配置界面布局 \ No newline at end of file diff --git a/app/PSP/LICENSE b/app/PSP/LICENSE deleted file mode 100644 index bae94e189e..0000000000 --- a/app/PSP/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. \ No newline at end of file diff --git a/app/PSP/README.md b/app/PSP/README.md deleted file mode 100644 index e160f0db71..0000000000 --- a/app/PSP/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Siyuan Plugin System - -[中文版本](./README_zh.md) - -A plugin system based on 'Code Snippet' function in Siyuan, which a local note system like 'Notion'. - -![Stargazers over time](https://starchart.cc/zuoez02/siyuan-plugin-system.svg) - -## Install -Add the [`load.js`](./load.js) content to JS snippets in setting and enable it. Reload the Siyuan to finish auto install. - -## Plugins -[zuoez02/siyuan-plugins](https://github.com/zuoez02/siyuan-plugins) - -Here are some plugins maybe you can use. :) - -## Roadmap - -[Project Siyuan Plugin System](https://github.com/users/zuoez02/projects/1) - -## Preview - -*Plugin system entry* -![Pic1](./assets/pic-1.png) - -*Plugin system setting* -![Pic2](./assets/pic-2.png) - -*Plugin system plugin list* -![Pic3](./assets/pic-3.png) diff --git a/app/PSP/README_zh.md b/app/PSP/README_zh.md deleted file mode 100644 index 84418f75d7..0000000000 --- a/app/PSP/README_zh.md +++ /dev/null @@ -1,26 +0,0 @@ -# 思源插件系统 - -思源插件系统,依赖于“代码片段”功能。 - -## 安装方法 -在代码片段中引入[load.js](./load.js)中的内容,并开启。然后重启思源,即可完成插件系统的自动安装。 - -## 插件列表 -[zuoez02/siyuan-plugins](https://github.com/zuoez02/siyuan-plugins) - -这里有一些我写的插件列表,也许你用的上:) - -## 路线图 - -[Project Siyuan Plugin System](https://github.com/users/zuoez02/projects/1) - -## 预览 - -*系统入口* -![Pic1](./assets/pic-1.png) - -*插件系统设置* -![Pic2](./assets/pic-2.png) - -*插件列表* -![Pic3](./assets/pic-3.png) \ No newline at end of file diff --git a/app/PSP/VERSION b/app/PSP/VERSION deleted file mode 100644 index bcaffe19b5..0000000000 --- a/app/PSP/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.7.0 \ No newline at end of file diff --git a/app/PSP/assets/pic-1.png b/app/PSP/assets/pic-1.png deleted file mode 100644 index 15646314de..0000000000 Binary files a/app/PSP/assets/pic-1.png and /dev/null differ diff --git a/app/PSP/assets/pic-2.png b/app/PSP/assets/pic-2.png deleted file mode 100644 index a31f211f2e..0000000000 Binary files a/app/PSP/assets/pic-2.png and /dev/null differ diff --git a/app/PSP/assets/pic-3.png b/app/PSP/assets/pic-3.png deleted file mode 100644 index e9c0669707..0000000000 Binary files a/app/PSP/assets/pic-3.png and /dev/null differ diff --git a/app/PSP/build.cjs b/app/PSP/build.cjs deleted file mode 100644 index e9ad5c2ce2..0000000000 --- a/app/PSP/build.cjs +++ /dev/null @@ -1,12 +0,0 @@ -const vite = require('vite'); -const fs = require('fs'); - -(async function () { - await vite.build(); - const files = fs.readdirSync('dist/assets'); - const f = files[0]; - fs.renameSync('dist/assets/' + f, 'dist/assets/main.js'); - const content = fs.readFileSync('dist/assets/main.js').toString('utf-8'); - fs.writeFileSync('dist/assets/main.js', `(function(){${content}})()`); - fs.copyFileSync('dist/assets/main.js', 'main.js'); -})(); diff --git a/app/PSP/doc/core.md b/app/PSP/doc/core.md deleted file mode 100644 index 6874788626..0000000000 --- a/app/PSP/doc/core.md +++ /dev/null @@ -1,7 +0,0 @@ -## 文件系统设计 - -siyuan-workspace/data/plugin/为插件系统文件的根目录,内部包括所有的插件 - -每个插件名称为插件名,内置 -+ manifest.json // 插件信息 -+ main.js // 入口 \ No newline at end of file diff --git "a/app/PSP/doc/\345\274\200\345\217\221\346\265\201\347\250\213.md" "b/app/PSP/doc/\345\274\200\345\217\221\346\265\201\347\250\213.md" deleted file mode 100644 index 3d1e3869c1..0000000000 --- "a/app/PSP/doc/\345\274\200\345\217\221\346\265\201\347\250\213.md" +++ /dev/null @@ -1,44 +0,0 @@ -## 项目构建 - -### 推荐方案:clone 插件模板 - -插件系统使用 pnpm, vite 以及 typescript 用于基本工具,并提供了基本的样例仓库,开发者可以将其克隆到本地后用于开发。 - -- [Github](https://github.com/zuoez02/siyuan-plugin-sample) -- [Gitee](https://gitee.com/zuoez02/siyuan-plugin-sample) - -1. git clone 到本地 -2. 使用 `pnpm install` 安装依赖 -3. 在入口文件 `src/index.ts` 中进行开发 -4. 运行 `pnpm build` 编译 -5. 编译结果为 `dist/main.js` - -发布的时候,请将给定的 `manifest.json` 和编译的结果 `main.js` 还有可选的 README.md 文件放在某文件夹 下。该文件夹就是插件的发行版。 - -### 关于 `npm install siyuan` - -模板项目会通过 npm 安装 `siyuan` 依赖,该 module 只是一个单纯的 `d.ts` 接口声明。 - -需要注意的是 npm 下安装的 `siyuan` 不一定是最新版本的(取决于作者是否记得发布到 npm),如果发现 npm 安装的 `siyuan` 版本过低,也可以手动到 [Github仓库](https://github.com/zuoez02/siyuan-plugin-system) 中复制最新的接口声明文件。 - -### 关于编译 - -请注意:在思源中运行的 main.js 只支持 CommonJs 标准。若希望在项目中安装别的依赖,请注意做好相关配置。 - -## 调试插件 - -由于开发环境下安装的 `siyuan` 包只是一个 `d.ts` 的接口声明,因此不具备调试功能。 -如果需要调试,建议编写脚本,将发行版文件夹 复制到 `data/plugins` 目录下,然后在思源中的插件系统面板中启用该插件。 - -## 发布插件 - -官方的插件仓库存储于 https://github.com/zuoez02/siyuan-plugins ,发布请遵守以下流程: - -1. fork 该仓库到自己的空间内 -2. clone 仓库到本地 -3. 将自己编写的新插件文件夹加入其中,参照其他的文件夹,修改你的manifest.json,添加key属性 -4. 修改 plugins.json,添加你的插件 -5. 注意检查:key名称、plugins.json、文件夹名称 须保持一致,且大小写一致 -6. 发起 pull request - - diff --git a/app/PSP/examples/test-plugin/main.js b/app/PSP/examples/test-plugin/main.js deleted file mode 100644 index ff388b7020..0000000000 --- a/app/PSP/examples/test-plugin/main.js +++ /dev/null @@ -1,54 +0,0 @@ -const siyuan = require('siyuan'); -const { Plugin, Menu, MenuItem } = siyuan; - -class TestPlugin extends Plugin { - constructor() { - super(); - } - - onload() { - const button = document.createElement('button'); - button.textContent = 'left'; - button.addEventListener('click', () => { - new Menu('internalSettingButton') - .addItem( - new MenuItem({ - label: 'Hello World', - icon: 'iconEdit', - click: () => console.log('hello world'), - }) - ) - .showAtMouseEvent(event); - event.stopPropagation(); - }); - siyuan.clientApi.addToolbarLeft(button); - this.el = button; - - this.registerCommand({ - command: 'SayHello', - shortcut: 'ctrl+a', - callback: () => { - console.log('hello'); - }, - }); - - this.registerSettingRender((el) => { - const hello = document.createElement('div'); - hello.innerText = '????'; - el.appendChild(hello); - hello.addEventListener('click', () => { - this.writeStorage('hello.txt', 'world' + Math.random().toFixed(2)); - console.log('saved'); - }); - }); - } - - onunload() { - console.log('TestRemotePluginUnload'); - this.el?.remove(); - } -} - -module.exports = { - default: TestPlugin, -}; diff --git a/app/PSP/examples/test-plugin/manifest.json b/app/PSP/examples/test-plugin/manifest.json deleted file mode 100644 index b9f8608ddd..0000000000 --- a/app/PSP/examples/test-plugin/manifest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "测试插件", - "description": "这是一个测试插件", - "author": "zuoez02", - "url": "https://github.com/zuoez02/sy-excalidraw", - "version": "1.2.0" -} \ No newline at end of file diff --git a/app/PSP/load.js b/app/PSP/load.js deleted file mode 100644 index 304eae5234..0000000000 --- a/app/PSP/load.js +++ /dev/null @@ -1,32 +0,0 @@ -/* SiYuanPluginSystem */ -(function () { - const path = require('path'); - const getCrossPlatformAppDataFolder = () => { - let configFilePath; - if (process.platform === "darwin") { - configFilePath = path.join( - process.env.HOME, - "/Library/Application Support" - ); - } else if (process.platform === "win32") { - // Roaming包含在APPDATA中了 - configFilePath = process.env.APPDATA; - } else if (process.platform === "linux") { - configFilePath = process.env.HOME; - } - return configFilePath; - }; - try { - const data = require('fs').readFileSync(path.join(getCrossPlatformAppDataFolder(), '.siyuan', 'plugin.js')); - const script = data.toString('utf8'); - console.log('local plugin system found, loading...'); - eval(script); - - } catch (e) { - console.log('local plugin system not found, load online'); - return fetch('https://gitee.com/zuoez02/siyuan-plugin-system/raw/main/main.js', { cache: 'no-cache' }).then((res) => res.text()).then((sc) => { - window.siyuanPluginScript = sc; - eval(sc); - }); - } -})(); diff --git a/app/PSP/out/main.esm.js b/app/PSP/out/main.esm.js deleted file mode 100644 index 36e06153ec..0000000000 --- a/app/PSP/out/main.esm.js +++ /dev/null @@ -1,14114 +0,0 @@ -!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".command.svelte-1bq7axd{padding:8px 12px}.command.svelte-1bq7axd:hover{cursor:pointer;background-color:#0003;color:var(--b3-theme-primary)}.command-selected.svelte-1bq7axd{color:var(--b3-theme-primary);background-color:#0003}.command-plugin.svelte-1bq7axd{font-size:14px}.command-shortcut.svelte-1bq7axd{font-size:12px;color:var(--color-text-3)}.plugin.svelte-bwhxpp span.remove.svelte-bwhxpp{display:none;color:var(--b3-theme-error);margin-left:4px}.plugin.svelte-bwhxpp:hover span.remove.svelte-bwhxpp{display:inline;cursor:pointer}.plugin.svelte-bwhxpp:hover span.remove.svelte-bwhxpp:hover{text-decoration:underline}.plugin-info.svelte-bj9chc{display:flex;align-items:center}.plugin-detail.svelte-bj9chc{margin-top:12px;width:100%}.plugin-name.svelte-bj9chc{display:inline;margin-right:6px;font-size:24px}.plugin-key.svelte-bj9chc{display:inline;font-size:16px}.plugin-manifest.svelte-bj9chc{margin-top:12px}.plugin-readme.svelte-bj9chc{margin-top:20px}.go-back.svelte-bj9chc{margin-left:12px;font-size:12px;height:24px}.go-back-icon.svelte-bj9chc{height:12px;width:12px;margin-right:4px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); -var _a; -var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; -/*! ***************************************************************************** -Copyright (C) Microsoft. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var Reflect$1; -(function(Reflect2) { - (function(factory2) { - var root = typeof commonjsGlobal === "object" ? commonjsGlobal : typeof self === "object" ? self : typeof this === "object" ? this : Function("return this;")(); - var exporter = makeExporter(Reflect2); - if (typeof root.Reflect === "undefined") { - root.Reflect = Reflect2; - } else { - exporter = makeExporter(root.Reflect, exporter); - } - factory2(exporter); - function makeExporter(target, previous) { - return function(key, value) { - if (typeof target[key] !== "function") { - Object.defineProperty(target, key, { configurable: true, writable: true, value }); - } - if (previous) - previous(key, value); - }; - } - })(function(exporter) { - var hasOwn = Object.prototype.hasOwnProperty; - var supportsSymbol = typeof Symbol === "function"; - var toPrimitiveSymbol = supportsSymbol && typeof Symbol.toPrimitive !== "undefined" ? Symbol.toPrimitive : "@@toPrimitive"; - var iteratorSymbol = supportsSymbol && typeof Symbol.iterator !== "undefined" ? Symbol.iterator : "@@iterator"; - var supportsCreate = typeof Object.create === "function"; - var supportsProto = { __proto__: [] } instanceof Array; - var downLevel = !supportsCreate && !supportsProto; - var HashMap = { - // create an object in dictionary mode (a.k.a. "slow" mode in v8) - create: supportsCreate ? function() { - return MakeDictionary(/* @__PURE__ */ Object.create(null)); - } : supportsProto ? function() { - return MakeDictionary({ __proto__: null }); - } : function() { - return MakeDictionary({}); - }, - has: downLevel ? function(map, key) { - return hasOwn.call(map, key); - } : function(map, key) { - return key in map; - }, - get: downLevel ? function(map, key) { - return hasOwn.call(map, key) ? map[key] : void 0; - } : function(map, key) { - return map[key]; - } - }; - var functionPrototype = Object.getPrototypeOf(Function); - var usePolyfill = typeof process === "object" && process.env && process.env["REFLECT_METADATA_USE_MAP_POLYFILL"] === "true"; - var _Map = !usePolyfill && typeof Map === "function" && typeof Map.prototype.entries === "function" ? Map : CreateMapPolyfill(); - var _Set = !usePolyfill && typeof Set === "function" && typeof Set.prototype.entries === "function" ? Set : CreateSetPolyfill(); - var _WeakMap = !usePolyfill && typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill(); - var Metadata2 = new _WeakMap(); - function decorate(decorators, target, propertyKey, attributes) { - if (!IsUndefined(propertyKey)) { - if (!IsArray(decorators)) - throw new TypeError(); - if (!IsObject(target)) - throw new TypeError(); - if (!IsObject(attributes) && !IsUndefined(attributes) && !IsNull(attributes)) - throw new TypeError(); - if (IsNull(attributes)) - attributes = void 0; - propertyKey = ToPropertyKey(propertyKey); - return DecorateProperty(decorators, target, propertyKey, attributes); - } else { - if (!IsArray(decorators)) - throw new TypeError(); - if (!IsConstructor(target)) - throw new TypeError(); - return DecorateConstructor(decorators, target); - } - } - exporter("decorate", decorate); - function metadata(metadataKey, metadataValue) { - function decorator(target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey) && !IsPropertyKey(propertyKey)) - throw new TypeError(); - OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); - } - return decorator; - } - exporter("metadata", metadata); - function defineMetadata(metadataKey, metadataValue, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey); - } - exporter("defineMetadata", defineMetadata); - function hasMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryHasMetadata(metadataKey, target, propertyKey); - } - exporter("hasMetadata", hasMetadata); - function hasOwnMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey); - } - exporter("hasOwnMetadata", hasOwnMetadata); - function getMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryGetMetadata(metadataKey, target, propertyKey); - } - exporter("getMetadata", getMetadata); - function getOwnMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey); - } - exporter("getOwnMetadata", getOwnMetadata); - function getMetadataKeys(target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryMetadataKeys(target, propertyKey); - } - exporter("getMetadataKeys", getMetadataKeys); - function getOwnMetadataKeys(target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - return OrdinaryOwnMetadataKeys(target, propertyKey); - } - exporter("getOwnMetadataKeys", getOwnMetadataKeys); - function deleteMetadata(metadataKey, target, propertyKey) { - if (!IsObject(target)) - throw new TypeError(); - if (!IsUndefined(propertyKey)) - propertyKey = ToPropertyKey(propertyKey); - var metadataMap = GetOrCreateMetadataMap( - target, - propertyKey, - /*Create*/ - false - ); - if (IsUndefined(metadataMap)) - return false; - if (!metadataMap.delete(metadataKey)) - return false; - if (metadataMap.size > 0) - return true; - var targetMetadata = Metadata2.get(target); - targetMetadata.delete(propertyKey); - if (targetMetadata.size > 0) - return true; - Metadata2.delete(target); - return true; - } - exporter("deleteMetadata", deleteMetadata); - function DecorateConstructor(decorators, target) { - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - var decorated = decorator(target); - if (!IsUndefined(decorated) && !IsNull(decorated)) { - if (!IsConstructor(decorated)) - throw new TypeError(); - target = decorated; - } - } - return target; - } - function DecorateProperty(decorators, target, propertyKey, descriptor) { - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - var decorated = decorator(target, propertyKey, descriptor); - if (!IsUndefined(decorated) && !IsNull(decorated)) { - if (!IsObject(decorated)) - throw new TypeError(); - descriptor = decorated; - } - } - return descriptor; - } - function GetOrCreateMetadataMap(O, P2, Create) { - var targetMetadata = Metadata2.get(O); - if (IsUndefined(targetMetadata)) { - if (!Create) - return void 0; - targetMetadata = new _Map(); - Metadata2.set(O, targetMetadata); - } - var metadataMap = targetMetadata.get(P2); - if (IsUndefined(metadataMap)) { - if (!Create) - return void 0; - metadataMap = new _Map(); - targetMetadata.set(P2, metadataMap); - } - return metadataMap; - } - function OrdinaryHasMetadata(MetadataKey, O, P2) { - var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P2); - if (hasOwn2) - return true; - var parent = OrdinaryGetPrototypeOf(O); - if (!IsNull(parent)) - return OrdinaryHasMetadata(MetadataKey, parent, P2); - return false; - } - function OrdinaryHasOwnMetadata(MetadataKey, O, P2) { - var metadataMap = GetOrCreateMetadataMap( - O, - P2, - /*Create*/ - false - ); - if (IsUndefined(metadataMap)) - return false; - return ToBoolean(metadataMap.has(MetadataKey)); - } - function OrdinaryGetMetadata(MetadataKey, O, P2) { - var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P2); - if (hasOwn2) - return OrdinaryGetOwnMetadata(MetadataKey, O, P2); - var parent = OrdinaryGetPrototypeOf(O); - if (!IsNull(parent)) - return OrdinaryGetMetadata(MetadataKey, parent, P2); - return void 0; - } - function OrdinaryGetOwnMetadata(MetadataKey, O, P2) { - var metadataMap = GetOrCreateMetadataMap( - O, - P2, - /*Create*/ - false - ); - if (IsUndefined(metadataMap)) - return void 0; - return metadataMap.get(MetadataKey); - } - function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P2) { - var metadataMap = GetOrCreateMetadataMap( - O, - P2, - /*Create*/ - true - ); - metadataMap.set(MetadataKey, MetadataValue); - } - function OrdinaryMetadataKeys(O, P2) { - var ownKeys = OrdinaryOwnMetadataKeys(O, P2); - var parent = OrdinaryGetPrototypeOf(O); - if (parent === null) - return ownKeys; - var parentKeys = OrdinaryMetadataKeys(parent, P2); - if (parentKeys.length <= 0) - return ownKeys; - if (ownKeys.length <= 0) - return parentKeys; - var set = new _Set(); - var keys = []; - for (var _i = 0, ownKeys_1 = ownKeys; _i < ownKeys_1.length; _i++) { - var key = ownKeys_1[_i]; - var hasKey = set.has(key); - if (!hasKey) { - set.add(key); - keys.push(key); - } - } - for (var _a2 = 0, parentKeys_1 = parentKeys; _a2 < parentKeys_1.length; _a2++) { - var key = parentKeys_1[_a2]; - var hasKey = set.has(key); - if (!hasKey) { - set.add(key); - keys.push(key); - } - } - return keys; - } - function OrdinaryOwnMetadataKeys(O, P2) { - var keys = []; - var metadataMap = GetOrCreateMetadataMap( - O, - P2, - /*Create*/ - false - ); - if (IsUndefined(metadataMap)) - return keys; - var keysObj = metadataMap.keys(); - var iterator2 = GetIterator(keysObj); - var k2 = 0; - while (true) { - var next = IteratorStep(iterator2); - if (!next) { - keys.length = k2; - return keys; - } - var nextValue = IteratorValue(next); - try { - keys[k2] = nextValue; - } catch (e) { - try { - IteratorClose(iterator2); - } finally { - throw e; - } - } - k2++; - } - } - function Type(x) { - if (x === null) - return 1; - switch (typeof x) { - case "undefined": - return 0; - case "boolean": - return 2; - case "string": - return 3; - case "symbol": - return 4; - case "number": - return 5; - case "object": - return x === null ? 1 : 6; - default: - return 6; - } - } - function IsUndefined(x) { - return x === void 0; - } - function IsNull(x) { - return x === null; - } - function IsSymbol(x) { - return typeof x === "symbol"; - } - function IsObject(x) { - return typeof x === "object" ? x !== null : typeof x === "function"; - } - function ToPrimitive(input, PreferredType) { - switch (Type(input)) { - case 0: - return input; - case 1: - return input; - case 2: - return input; - case 3: - return input; - case 4: - return input; - case 5: - return input; - } - var hint = PreferredType === 3 ? "string" : PreferredType === 5 ? "number" : "default"; - var exoticToPrim = GetMethod(input, toPrimitiveSymbol); - if (exoticToPrim !== void 0) { - var result = exoticToPrim.call(input, hint); - if (IsObject(result)) - throw new TypeError(); - return result; - } - return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint); - } - function OrdinaryToPrimitive(O, hint) { - if (hint === "string") { - var toString_1 = O.toString; - if (IsCallable(toString_1)) { - var result = toString_1.call(O); - if (!IsObject(result)) - return result; - } - var valueOf = O.valueOf; - if (IsCallable(valueOf)) { - var result = valueOf.call(O); - if (!IsObject(result)) - return result; - } - } else { - var valueOf = O.valueOf; - if (IsCallable(valueOf)) { - var result = valueOf.call(O); - if (!IsObject(result)) - return result; - } - var toString_2 = O.toString; - if (IsCallable(toString_2)) { - var result = toString_2.call(O); - if (!IsObject(result)) - return result; - } - } - throw new TypeError(); - } - function ToBoolean(argument) { - return !!argument; - } - function ToString(argument) { - return "" + argument; - } - function ToPropertyKey(argument) { - var key = ToPrimitive( - argument, - 3 - /* String */ - ); - if (IsSymbol(key)) - return key; - return ToString(key); - } - function IsArray(argument) { - return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]"; - } - function IsCallable(argument) { - return typeof argument === "function"; - } - function IsConstructor(argument) { - return typeof argument === "function"; - } - function IsPropertyKey(argument) { - switch (Type(argument)) { - case 3: - return true; - case 4: - return true; - default: - return false; - } - } - function GetMethod(V, P2) { - var func = V[P2]; - if (func === void 0 || func === null) - return void 0; - if (!IsCallable(func)) - throw new TypeError(); - return func; - } - function GetIterator(obj) { - var method = GetMethod(obj, iteratorSymbol); - if (!IsCallable(method)) - throw new TypeError(); - var iterator2 = method.call(obj); - if (!IsObject(iterator2)) - throw new TypeError(); - return iterator2; - } - function IteratorValue(iterResult) { - return iterResult.value; - } - function IteratorStep(iterator2) { - var result = iterator2.next(); - return result.done ? false : result; - } - function IteratorClose(iterator2) { - var f = iterator2["return"]; - if (f) - f.call(iterator2); - } - function OrdinaryGetPrototypeOf(O) { - var proto = Object.getPrototypeOf(O); - if (typeof O !== "function" || O === functionPrototype) - return proto; - if (proto !== functionPrototype) - return proto; - var prototype2 = O.prototype; - var prototypeProto = prototype2 && Object.getPrototypeOf(prototype2); - if (prototypeProto == null || prototypeProto === Object.prototype) - return proto; - var constructor = prototypeProto.constructor; - if (typeof constructor !== "function") - return proto; - if (constructor === O) - return proto; - return constructor; - } - function CreateMapPolyfill() { - var cacheSentinel = {}; - var arraySentinel = []; - var MapIterator = ( - /** @class */ - function() { - function MapIterator2(keys, values, selector) { - this._index = 0; - this._keys = keys; - this._values = values; - this._selector = selector; - } - MapIterator2.prototype["@@iterator"] = function() { - return this; - }; - MapIterator2.prototype[iteratorSymbol] = function() { - return this; - }; - MapIterator2.prototype.next = function() { - var index = this._index; - if (index >= 0 && index < this._keys.length) { - var result = this._selector(this._keys[index], this._values[index]); - if (index + 1 >= this._keys.length) { - this._index = -1; - this._keys = arraySentinel; - this._values = arraySentinel; - } else { - this._index++; - } - return { value: result, done: false }; - } - return { value: void 0, done: true }; - }; - MapIterator2.prototype.throw = function(error2) { - if (this._index >= 0) { - this._index = -1; - this._keys = arraySentinel; - this._values = arraySentinel; - } - throw error2; - }; - MapIterator2.prototype.return = function(value) { - if (this._index >= 0) { - this._index = -1; - this._keys = arraySentinel; - this._values = arraySentinel; - } - return { value, done: true }; - }; - return MapIterator2; - }() - ); - return ( - /** @class */ - function() { - function Map2() { - this._keys = []; - this._values = []; - this._cacheKey = cacheSentinel; - this._cacheIndex = -2; - } - Object.defineProperty(Map2.prototype, "size", { - get: function() { - return this._keys.length; - }, - enumerable: true, - configurable: true - }); - Map2.prototype.has = function(key) { - return this._find( - key, - /*insert*/ - false - ) >= 0; - }; - Map2.prototype.get = function(key) { - var index = this._find( - key, - /*insert*/ - false - ); - return index >= 0 ? this._values[index] : void 0; - }; - Map2.prototype.set = function(key, value) { - var index = this._find( - key, - /*insert*/ - true - ); - this._values[index] = value; - return this; - }; - Map2.prototype.delete = function(key) { - var index = this._find( - key, - /*insert*/ - false - ); - if (index >= 0) { - var size = this._keys.length; - for (var i = index + 1; i < size; i++) { - this._keys[i - 1] = this._keys[i]; - this._values[i - 1] = this._values[i]; - } - this._keys.length--; - this._values.length--; - if (key === this._cacheKey) { - this._cacheKey = cacheSentinel; - this._cacheIndex = -2; - } - return true; - } - return false; - }; - Map2.prototype.clear = function() { - this._keys.length = 0; - this._values.length = 0; - this._cacheKey = cacheSentinel; - this._cacheIndex = -2; - }; - Map2.prototype.keys = function() { - return new MapIterator(this._keys, this._values, getKey3); - }; - Map2.prototype.values = function() { - return new MapIterator(this._keys, this._values, getValue); - }; - Map2.prototype.entries = function() { - return new MapIterator(this._keys, this._values, getEntry); - }; - Map2.prototype["@@iterator"] = function() { - return this.entries(); - }; - Map2.prototype[iteratorSymbol] = function() { - return this.entries(); - }; - Map2.prototype._find = function(key, insert2) { - if (this._cacheKey !== key) { - this._cacheIndex = this._keys.indexOf(this._cacheKey = key); - } - if (this._cacheIndex < 0 && insert2) { - this._cacheIndex = this._keys.length; - this._keys.push(key); - this._values.push(void 0); - } - return this._cacheIndex; - }; - return Map2; - }() - ); - function getKey3(key, _2) { - return key; - } - function getValue(_2, value) { - return value; - } - function getEntry(key, value) { - return [key, value]; - } - } - function CreateSetPolyfill() { - return ( - /** @class */ - function() { - function Set2() { - this._map = new _Map(); - } - Object.defineProperty(Set2.prototype, "size", { - get: function() { - return this._map.size; - }, - enumerable: true, - configurable: true - }); - Set2.prototype.has = function(value) { - return this._map.has(value); - }; - Set2.prototype.add = function(value) { - return this._map.set(value, value), this; - }; - Set2.prototype.delete = function(value) { - return this._map.delete(value); - }; - Set2.prototype.clear = function() { - this._map.clear(); - }; - Set2.prototype.keys = function() { - return this._map.keys(); - }; - Set2.prototype.values = function() { - return this._map.values(); - }; - Set2.prototype.entries = function() { - return this._map.entries(); - }; - Set2.prototype["@@iterator"] = function() { - return this.keys(); - }; - Set2.prototype[iteratorSymbol] = function() { - return this.keys(); - }; - return Set2; - }() - ); - } - function CreateWeakMapPolyfill() { - var UUID_SIZE = 16; - var keys = HashMap.create(); - var rootKey = CreateUniqueKey(); - return ( - /** @class */ - function() { - function WeakMap2() { - this._key = CreateUniqueKey(); - } - WeakMap2.prototype.has = function(target) { - var table = GetOrCreateWeakMapTable( - target, - /*create*/ - false - ); - return table !== void 0 ? HashMap.has(table, this._key) : false; - }; - WeakMap2.prototype.get = function(target) { - var table = GetOrCreateWeakMapTable( - target, - /*create*/ - false - ); - return table !== void 0 ? HashMap.get(table, this._key) : void 0; - }; - WeakMap2.prototype.set = function(target, value) { - var table = GetOrCreateWeakMapTable( - target, - /*create*/ - true - ); - table[this._key] = value; - return this; - }; - WeakMap2.prototype.delete = function(target) { - var table = GetOrCreateWeakMapTable( - target, - /*create*/ - false - ); - return table !== void 0 ? delete table[this._key] : false; - }; - WeakMap2.prototype.clear = function() { - this._key = CreateUniqueKey(); - }; - return WeakMap2; - }() - ); - function CreateUniqueKey() { - var key; - do - key = "@@WeakMap@@" + CreateUUID(); - while (HashMap.has(keys, key)); - keys[key] = true; - return key; - } - function GetOrCreateWeakMapTable(target, create) { - if (!hasOwn.call(target, rootKey)) { - if (!create) - return void 0; - Object.defineProperty(target, rootKey, { value: HashMap.create() }); - } - return target[rootKey]; - } - function FillRandomBytes(buffer, size) { - for (var i = 0; i < size; ++i) - buffer[i] = Math.random() * 255 | 0; - return buffer; - } - function GenRandomBytes(size) { - if (typeof Uint8Array === "function") { - if (typeof crypto !== "undefined") - return crypto.getRandomValues(new Uint8Array(size)); - if (typeof msCrypto !== "undefined") - return msCrypto.getRandomValues(new Uint8Array(size)); - return FillRandomBytes(new Uint8Array(size), size); - } - return FillRandomBytes(new Array(size), size); - } - function CreateUUID() { - var data = GenRandomBytes(UUID_SIZE); - data[6] = data[6] & 79 | 64; - data[8] = data[8] & 191 | 128; - var result = ""; - for (var offset = 0; offset < UUID_SIZE; ++offset) { - var byte = data[offset]; - if (offset === 4 || offset === 6 || offset === 8) - result += "-"; - if (byte < 16) - result += "0"; - result += byte.toString(16).toLowerCase(); - } - return result; - } - } - function MakeDictionary(obj) { - obj.__ = void 0; - delete obj.__; - return obj; - } - }); -})(Reflect$1 || (Reflect$1 = {})); -const VERSION$1 = "0.7.1"; -const config = () => ({ token: window.siyuan.config.api.token }); -const TYPES = { - StorageManager: "StorageManager", - PluginSystem: "PluginSystem", - SystemManager: "PluginSystemLocalManager", - PluginLoader: "PluginLoader", - PluginFileManager: "PluginFileManager", - EventBus: "EventBus", - Shortcut: "Shortcut", - CommandManager: "CommandManager", - Store: "Store", - SettingManager: "SettingManager" -}; -async function request$1(url2, data) { - let resData = null; - await fetch(url2, { - body: JSON.stringify(data), - method: "POST", - headers: { - Authorization: `Token ${config().token}` - } - }).then(function(response) { - resData = response.json(); - }); - return resData; -} -async function parseBody(response) { - let r = await response; - return r.code === 0 ? r.data : null; -} -async function transactions(protyle, transactions2 = []) { - const url2 = "/api/transactions"; - const ws_url = new URL(protyle.ws.ws.url); - const data = { - app: ws_url.searchParams.get("app"), - session: ws_url.searchParams.get("id"), - transactions: transactions2 - }; - return parseBody(request$1(url2, data)); -} -async function sql(sql2) { - let sqldata = { - stmt: sql2 - }; - let url2 = "/api/query/sql"; - return parseBody(request$1(url2, sqldata)); -} -async function lsNotebooks(sql2) { - let sqldata = { stmt: sql2 }; - let url2 = "/api/notebook/lsNotebooks"; - return parseBody(request$1(url2, sqldata)); -} -async function getAnchor(anchorText, name2) { - anchorText = anchorText.replace("((", "").replace("))", ""); - let sqlScript = `select * from blocks where id = '${anchorText}'`; - let sqlRes = await sql(sqlScript); - let anchor = ""; - if (sqlRes) { - try { - if (sqlRes[0][name2]) { - anchor = sqlRes[0][name2]; - } else if (sqlRes[0]["content"]) { - anchor = sqlRes[0]["content"]; - } else { - anchor = anchorText; - } - } catch (e) { - anchor = "解析错误"; - } - } - return anchor; -} -async function openNotebook(notebookId) { - let data = { - notebook: notebookId - }; - let url2 = "/api/notebook/openNotebook"; - return parseBody(request$1(url2, data)); -} -async function closeNotebook(notebookId) { - let data = { - notebook: notebookId - }; - let url2 = "/api/notebook/closeNotebook"; - return parseBody(request$1(url2, data)); -} -async function renameNotebook(notebookId, notebookNewName) { - let data = { - notebook: notebookId, - name: notebookNewName - }; - let url2 = "/api/notebook/renameNotebook"; - return parseBody(request$1(url2, data)); -} -async function createNotebook(notebookName) { - let data = { - name: notebookName - }; - let url2 = "/api/notebook/createNotebook"; - return parseBody(request$1(url2, data)); -} -async function removeNotebook(notebookId) { - let data = { notebook: notebookId }; - let url2 = "/api/notebook/removeNotebook"; - return parseBody(request$1(url2, data)); -} -async function getNotebookConf(notebookId) { - let data = { notebook: notebookId }; - let url2 = "/api/notebook/getNotebookConf"; - return parseBody(request$1(url2, data)); -} -async function setNotebookConf(notebookId) { - let data = { notebook: notebookId }; - let url2 = "/api/notebook/setNotebookConf"; - return parseBody(request$1(url2, data)); -} -async function renameDoc(notebookId, path, title) { - let data = { - notebook: notebookId, - path, - title - }; - let url2 = "/api/filetree/renameDoc"; - return parseBody(request$1(url2, data)); -} -async function removeDoc(notebookId, path) { - let data = { - notebook: notebookId, - path - }; - let url2 = "/api/filetree/removeDoc"; - return parseBody(request$1(url2, data)); -} -async function moveDoc(srcNotebookId, srcPath, targetNotebookId, targetPath) { - let data = { - fromNotebook: srcNotebookId, - fromPath: srcPath, - toNotebook: targetNotebookId, - toPath: targetPath - }; - let url2 = "/api/filetree/moveDoc"; - return parseBody(request$1(url2, data)); -} -async function getHPathByPath(notebookId, path) { - let data = { - Notebook: notebookId, - Path: path - }; - let url2 = "/api/filetree/getHPathByPath"; - return parseBody(request$1(url2, data)); -} -async function getHPathByID(ID) { - let data = { - id: ID - }; - let url2 = "/api/filetree/getHPathByID"; - return parseBody(request$1(url2, data)); -} -async function getBlockAttrs(blockId) { - let data = { - id: blockId - }; - let url2 = "/api/attr/getBlockAttrs"; - return parseBody(request$1(url2, data)); -} -async function getBlockByID(blockId) { - let sqlScript = `select * from blocks where id ='${blockId}'`; - let data = await sql(sqlScript); - return data[0]; -} -async function getBlockKramdown(blockId) { - const data = { - id: blockId - }; - const url2 = "/api/block/getBlockKramdown"; - return parseBody(request$1(url2, data)); -} -async function getBlockBreadcrumb(ID) { - const data = { - id: ID - }; - const url2 = "/api/block/getBlockBreadcrumb"; - return parseBody(request$1(url2, data)); -} -async function setBlockAttrs(blockId, attrs) { - let url2 = "/api/attr/setBlockAttrs"; - return parseBody( - request$1(url2, { - id: blockId, - attrs - }) - ); -} -async function exportMdContent(docId) { - let data = { - id: docId - }; - let url2 = "/api/export/exportMdContent"; - return parseBody(request$1(url2, data)); -} -async function getDocOutline(docId) { - let data = { - id: docId - }; - let url2 = "/api/outline/getDocOutline"; - return parseBody(request$1(url2, data)); -} -async function listDocsByPath(path) { - let data = { - path - }; - let url2 = "/api/filetree/listDocsByPath"; - return parseBody(request$1(url2, data)); -} -async function getBacklink(id2) { - let data = { - id: id2, - beforeLen: 10, - k: "", - mk: "" - }; - let url2 = "/api/ref/getBacklink"; - return parseBody(request$1(url2, data)); -} -async function searchEmbedBlock(excludeIds, sql2) { - let data = { - stmt: sql2, - excludeIDs: excludeIds - }; - let url2 = "/api/search/searchEmbedBlock"; - return parseBody(request$1(url2, data)); -} -async function getDoc(id2) { - let data = { - id: id2, - k: "", - mode: 2, - size: 36 - }; - let url2 = "/api/filetree/getDoc"; - return parseBody(request$1(url2, data)); -} -async function getFocusedDoc(id2) { - let data = { - id: id2, - k: "", - mode: 0, - size: 36 - }; - let url2 = "/api/filetree/getDoc"; - return parseBody(request$1(url2, data)); -} -async function getTag() { - let data = {}; - let url2 = "/api/tag/getTag"; - return parseBody(request$1(url2, data)); -} -async function getLocalGraph(k2, id2, conf, reqId) { - let data = { - id: id2, - k: k2, - conf, - reqId - }; - let url2 = "/api/graph/getLocalGraph"; - return parseBody(request$1(url2, data)); -} -async function getGraph(k2, conf, reqId) { - let data = { - k: k2, - conf, - reqId - }; - let url2 = "/api/graph/getGraph"; - return parseBody(request$1(url2, data)); -} -async function searchDocs(k2) { - let data = { - k: k2 - }; - let url2 = "/api/filetree/searchDocs"; - return parseBody(request$1(url2, data)); -} -async function searchBlock(query) { - let data = { - query - }; - let url2 = "/api/search/searchBlock"; - return parseBody(request$1(url2, data)); -} -async function searchTemplate(k2) { - let data = { - k: k2 - }; - let url2 = "/api/search/searchTemplate"; - return parseBody(request$1(url2, data)); -} -async function createDocWithMd(notebook, path, markdown) { - let data = { - notebook, - path, - markdown - }; - let url2 = "/api/filetree/createDocWithMd"; - return parseBody(request$1(url2, data)); -} -async function docSaveAsTemplate(id2, overwrite = false) { - let url2 = "/api/template/docSaveAsTemplate"; - let data = { - id: id2, - overwrite - }; - return parseBody(request$1(url2, data)); -} -async function render(data) { - let url2 = "/api/template/render"; - return parseBody(request$1(url2, data)); -} -async function insertBlock(previousID, dataType, data) { - let url2 = "/api/block/insertBlock"; - return parseBody( - request$1( - url2 = url2, - data = { - previousID, - dataType, - data - } - ) - ); -} -async function prependBlock(parentID, dataType, data) { - let url2 = "/api/block/prependBlock"; - return parseBody( - request$1( - url2 = url2, - data = { - parentID, - dataType, - data - } - ) - ); -} -async function appendBlock(parentID, dataType, data) { - let url2 = "/api/block/appendBlock"; - return parseBody( - request$1( - url2 = url2, - data = { - parentID, - dataType, - data - } - ) - ); -} -async function updateBlock(id2, dataType, data) { - let url2 = "/api/block/updateBlock"; - return parseBody( - request$1( - url2 = url2, - data = { - id: id2, - dataType, - data - } - ) - ); -} -async function deleteBlock(id2) { - let url2 = "/api/block/deleteBlock"; - return parseBody(request$1(url2, { id: id2 })); -} -async function moveBlock(id2, previousID, parentID) { - let url2 = "/api/block/moveBlock"; - return parseBody( - request$1(url2, { id: id2, previousID, parentID }) - ); -} -async function getSysFonts() { - let url2 = "/api/system/getSysFonts"; - return parseBody(request$1(url2, null)); -} -async function getFile(path, type = "text") { - const response = await fetch("/api/file/getFile", { - method: "POST", - headers: { - Authorization: `Token ${config().token}` - }, - body: JSON.stringify({ - path - }) - }); - if (response.status === 200) { - if (type === "text") { - return await response.text(); - } - if (type === "json") { - return (await response.json()).data; - } - } - return null; -} -async function putFile(path, filedata, isDir = false, modTime = Date.now()) { - let blob = new Blob([filedata]); - let file = new File([blob], path.split("/").pop()); - let formdata = new FormData(); - formdata.append("path", path); - formdata.append("file", file); - formdata.append("isDir", String(isDir)); - formdata.append("modTime", String(modTime)); - const response = await fetch("/api/file/putFile", { - body: formdata, - method: "POST", - headers: { - Authorization: `Token ${config().token}` - } - }); - if (response.status === 200) - return await response.json(); - else - return null; -} -async function readDir(path) { - const response = await fetch("/api/file/readDir", { - method: "POST", - headers: { - Authorization: `Token ${config().token}` - }, - body: JSON.stringify({ - path - }) - }); - if (response.status === 200) { - return (await response.json()).data; - } - return null; -} -async function removeFile(path) { - const response = await fetch("/api/file/removeFile", { - method: "POST", - headers: { - Authorization: `Token ${config().token}` - }, - body: JSON.stringify({ - path - }) - }); - if (response.status === 200) - return; - else - return null; -} -const language = (_a = window.theme) == null ? void 0 : _a.languageMode; -async function pushMsg(message = null, text2 = null, timeout = 7e3) { - const url2 = "/api/notification/pushMsg"; - const data = { - msg: message ? message[language] || message.other : text2, - timeout - }; - return parseBody(request$1(url2, data)); -} -async function pushErrMsg(message = null, text2 = null, timeout = 7e3) { - const url2 = "/api/notification/pushErrMsg"; - const data = { - msg: message ? message[language] || message.other : text2, - timeout - }; - return parseBody(request$1(url2, data)); -} -async function setStorageVal(key, val) { - const url2 = "/api/storage/setLocalStorageVal"; - const data = { - app: genUUID(), - key, - val - }; - return parseBody(request$1(url2, data)); -} -async function getLocalStorage() { - const url2 = "/api/storage/getLocalStorage"; - return parseBody(request$1(url2, null)); -} -async function renderSprig(sprig) { - let url2 = "/api/template/renderSprig"; - return parseBody(request$1(url2, { template: sprig })); -} -async function getBazzarWidget() { - const url2 = "/api/bazaar/getBazaarWidget"; - return parseBody(request$1(url2, null)); -} -const serverApi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - appendBlock, - closeNotebook, - createDocWithMd, - createNotebook, - deleteBlock, - docSaveAsTemplate, - exportMdContent, - getAnchor, - getBacklink, - getBazzarWidget, - getBlockAttrs, - getBlockBreadcrumb, - getBlockByID, - getBlockKramdown, - getDoc, - getDocOutline, - getFile, - getFocusedDoc, - getGraph, - getHPathByID, - getHPathByPath, - getLocalGraph, - getLocalStorage, - getNotebookConf, - getSysFonts, - getTag, - insertBlock, - listDocsByPath, - lsNotebooks, - moveBlock, - moveDoc, - openNotebook, - parseBody, - prependBlock, - pushErrMsg, - pushMsg, - putFile, - readDir, - removeDoc, - removeFile, - removeNotebook, - renameDoc, - renameNotebook, - render, - renderSprig, - request: request$1, - searchBlock, - searchDocs, - searchEmbedBlock, - searchTemplate, - setBlockAttrs, - setNotebookConf, - setStorageVal, - sql, - transactions, - updateBlock -}, Symbol.toStringTag, { value: "Module" })); -class Notification { - constructor(option) { - this.option = option; - } - show() { - if (this.option.type === "error") { - pushErrMsg(null, this.option.message, this.option.timeout); - } else { - pushMsg(null, this.option.message, this.option.timeout); - } - } -} -var z = Object.defineProperty; -var D = (i, e, t2) => e in i ? z(i, e, { enumerable: true, configurable: true, writable: true, value: t2 }) : i[e] = t2; -var _$1 = (i, e, t2) => (D(i, typeof e != "symbol" ? e + "" : e, t2), t2); -var P = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, b = {}, W = { - get exports() { - return b; - }, - set exports(i) { - b = i; - } -}; -(function(i) { - (function(e, t2) { - i.exports ? i.exports = t2() : e.log = t2(); - })(P, function() { - var e = function() { - }, t2 = "undefined", l = typeof window !== t2 && typeof window.navigator !== t2 && /Trident\/|MSIE /.test(window.navigator.userAgent), p = [ - "trace", - "debug", - "info", - "warn", - "error" - ]; - function c(a2, s) { - var f = a2[s]; - if (typeof f.bind == "function") - return f.bind(a2); - try { - return Function.prototype.bind.call(f, a2); - } catch { - return function() { - return Function.prototype.apply.apply(f, [a2, arguments]); - }; - } - } - function g() { - console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace(); - } - function w(a2) { - return a2 === "debug" && (a2 = "log"), typeof console === t2 ? false : a2 === "trace" && l ? g : console[a2] !== void 0 ? c(console, a2) : console.log !== void 0 ? c(console, "log") : e; - } - function E(a2, s) { - for (var f = 0; f < p.length; f++) { - var o = p[f]; - this[o] = f < a2 ? e : this.methodFactory(o, a2, s); - } - this.log = this.debug; - } - function F(a2, s, f) { - return function() { - typeof console !== t2 && (E.call(this, s, f), this[a2].apply(this, arguments)); - }; - } - function r(a2, s, f) { - return w(a2) || F.apply(this, arguments); - } - function v(a2, s, f) { - var o = this, O; - s = s ?? "WARN"; - var u = "loglevel"; - typeof a2 == "string" ? u += ":" + a2 : typeof a2 == "symbol" && (u = void 0); - function C(n) { - var d = (p[n] || "silent").toUpperCase(); - if (!(typeof window === t2 || !u)) { - try { - window.localStorage[u] = d; - return; - } catch { - } - try { - window.document.cookie = encodeURIComponent(u) + "=" + d + ";"; - } catch { - } - } - } - function k2() { - var n; - if (!(typeof window === t2 || !u)) { - try { - n = window.localStorage[u]; - } catch { - } - if (typeof n === t2) - try { - var d = window.document.cookie, m = d.indexOf( - encodeURIComponent(u) + "=" - ); - m !== -1 && (n = /^([^;]+)/.exec(d.slice(m))[1]); - } catch { - } - return o.levels[n] === void 0 && (n = void 0), n; - } - } - function V() { - if (!(typeof window === t2 || !u)) { - try { - window.localStorage.removeItem(u); - return; - } catch { - } - try { - window.document.cookie = encodeURIComponent(u) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; - } catch { - } - } - } - o.name = a2, o.levels = { - TRACE: 0, - DEBUG: 1, - INFO: 2, - WARN: 3, - ERROR: 4, - SILENT: 5 - }, o.methodFactory = f || r, o.getLevel = function() { - return O; - }, o.setLevel = function(n, d) { - if (typeof n == "string" && o.levels[n.toUpperCase()] !== void 0 && (n = o.levels[n.toUpperCase()]), typeof n == "number" && n >= 0 && n <= o.levels.SILENT) { - if (O = n, d !== false && C(n), E.call(o, n, a2), typeof console === t2 && n < o.levels.SILENT) - return "No console available for logging"; - } else - throw "log.setLevel() called with invalid level: " + n; - }, o.setDefaultLevel = function(n) { - s = n, k2() || o.setLevel(n, false); - }, o.resetLevel = function() { - o.setLevel(s, false), V(); - }, o.enableAll = function(n) { - o.setLevel(o.levels.TRACE, n); - }, o.disableAll = function(n) { - o.setLevel(o.levels.SILENT, n); - }; - var y = k2(); - y == null && (y = s), o.setLevel(y, false); - } - var L = new v(), h = {}; - L.getLogger = function(s) { - if (typeof s != "symbol" && typeof s != "string" || s === "") - throw new TypeError("You must supply a name when creating a logger."); - var f = h[s]; - return f || (f = h[s] = new v( - s, - L.getLevel(), - L.methodFactory - )), f; - }; - var G = typeof window !== t2 ? window.log : void 0; - return L.noConflict = function() { - return typeof window !== t2 && window.log === L && (window.log = G), L; - }, L.getLoggers = function() { - return h; - }, L.default = L, L; - }); -})(W); -var R = {}, B = { - get exports() { - return R; - }, - set exports(i) { - R = i; - } -}; -(function(i) { - (function(e, t2) { - i.exports ? i.exports = t2() : e.prefix = t2(e); - })(P, function(e) { - var t2 = function(r) { - for (var v = 1, L = arguments.length, h; v < L; v++) - for (h in arguments[v]) - Object.prototype.hasOwnProperty.call(arguments[v], h) && (r[h] = arguments[v][h]); - return r; - }, l = { - template: "[%t] %l:", - levelFormatter: function(r) { - return r.toUpperCase(); - }, - nameFormatter: function(r) { - return r || "root"; - }, - timestampFormatter: function(r) { - return r.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"); - }, - format: void 0 - }, p, c = {}, g = function(r) { - if (!r || !r.getLogger) - throw new TypeError("Argument is not a root logger"); - p = r; - }, w = function(r, v) { - if (!r || !r.setLevel) - throw new TypeError("Argument is not a logger"); - var L = r.methodFactory, h = r.name || "", G = c[h] || c[""] || l; - function a2(s, f, o) { - var O = L(s, f, o), u = c[o] || c[""], C = u.template.indexOf("%t") !== -1, k2 = u.template.indexOf("%l") !== -1, V = u.template.indexOf("%n") !== -1; - return function() { - for (var y = "", n = arguments.length, d = Array(n), m = 0; m < n; m++) - d[m] = arguments[m]; - if (h || !c[o]) { - var x = u.timestampFormatter(new Date()), U = u.levelFormatter(s), A = u.nameFormatter(o); - u.format ? y += u.format(U, A, x) : (y += u.template, C && (y = y.replace(/%t/, x)), k2 && (y = y.replace(/%l/, U)), V && (y = y.replace(/%n/, A))), d.length && typeof d[0] == "string" ? d[0] = y + " " + d[0] : d.unshift(y); - } - O.apply(void 0, d); - }; - } - return c[h] || (r.methodFactory = a2), v = v || {}, v.template && (v.format = void 0), c[h] = t2({}, G, v), r.setLevel(r.getLevel()), p || r.warn( - "It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md" - ), r; - }, E = { - reg: g, - apply: w - }, F; - return e && (F = e.prefix, E.noConflict = function() { - return e.prefix === E && (e.prefix = F), E; - }), E; - }); -})(B); -class T { -} -_$1(T, "LOG_LEVEL_KEY", "VITE_LOG_LEVEL"), _$1(T, "LOG_PREFIX_KEY", "VITE_LOG_PREFIX"); -var S = /* @__PURE__ */ ((i) => (i.LOG_LEVEL_DEBUG = "DEBUG", i.LOG_LEVEL_INFO = "INFO", i.LOG_LEVEL_WARN = "WARN", i.LOG_LEVEL_ERROR = "ERROR", i))(S || {}); -function K() { - const i = Error.prepareStackTrace; - Error.prepareStackTrace = (t2, l) => l; - const e = new Error().stack.slice(1); - return Error.prepareStackTrace = i, e; -} -class I { - /** - * 解析日志级别为枚举 - * - * @param enumObj 枚举对象 - * @param value 配置的值 - */ - static stringToEnumValue(e, t2) { - return e[Object.keys(e).filter( - (l) => e[l].toString() === t2 - )[0]]; - } - /** - * 获取配置的日志级别 - */ - static getEnvLevel(e) { - if (!e) - return; - const t2 = e.getEnvOrDefault( - T.LOG_LEVEL_KEY, - S.LOG_LEVEL_INFO - ), l = I.stringToEnumValue( - S, - t2.toUpperCase() - ); - return l || console.warn( - "[zhi-log] LOG_LEVEL is invalid in you .env file.Must be either debug, info, warn or error, fallback to default info level" - ), l; - } - /** - * 获取默认日志 - */ - static getEnvLogger(e) { - if (e) - return e.getEnv(T.LOG_PREFIX_KEY); - } -} -class Y { - constructor(e, t2, l) { - _$1(this, "consoleLogger", "console"); - _$1(this, "stackSize", 1); - _$1(this, "getLogger", (e2) => { - let t3; - if (e2) - t3 = e2; - else { - const l2 = this.getCallStack(), p2 = [], c2 = []; - for (let g = 0; g < l2.length; g++) { - const w = l2[g], E = w.getFileName() ?? "none"; - if (g > this.stackSize - 1) - break; - const F = E + "-" + w.getLineNumber() + ":" + w.getColumnNumber(); - p2.push(F); - } - c2.length > 0 && (t3 = p2.join(" -> ")); - } - return (!t3 || t3.trim().length === 0) && (t3 = this.consoleLogger), b.getLogger(t3); - }); - this.stackSize = 1; - let p; - e ? p = e : p = I.getEnvLevel(l), p = p ?? S.LOG_LEVEL_INFO, b.setLevel(p); - const c = { - gray: (g) => g.toString(), - green: (g) => g.toString(), - yellow: (g) => g.toString(), - red: (g) => g.toString() - }; - R.reg(b), R.apply(b, { - format(g, w, E) { - const r = ["[" + (t2 ?? I.getEnvLogger(l) ?? "zhi") + "]"]; - switch (r.push( - c.gray("[") + c.green(E).toString() + c.gray("]") - ), g) { - case S.LOG_LEVEL_DEBUG: - r.push(c.gray(g.toUpperCase().toString())); - break; - case S.LOG_LEVEL_INFO: - r.push(c.green(g.toUpperCase().toString())); - break; - case S.LOG_LEVEL_WARN: - r.push(c.yellow(g.toUpperCase().toString())); - break; - case S.LOG_LEVEL_ERROR: - r.push(c.red(g.toUpperCase().toString())); - break; - } - return r.push(c.green(w).toString()), r.push(c.gray(":")), r.join(" "); - } - }); - } - /** - * 设置输出栈的深度,默认1 - * - * @param stackSize - 栈的深度 - */ - setStackSize(e) { - this.stackSize = e ?? 1; - } - /** - * 获取调用堆栈,若未获取到直接返回空数组 - * - * @author terwer - * @since 1.6.0 - */ - getCallStack() { - let e; - try { - e = K(); - } catch { - e = []; - } - return e; - } -} -class X { - /** - * 默认日志级别 - * - * @param level - 可选,未设置默认INFO - * @param sign - 可选前缀,默认zhi - * @param env - 可选环境变量实例 - */ - constructor(e, t2, l) { - _$1(this, "logger"); - this.logger = new Y(e, t2, l); - } - /** - * 获取日志记录器 - * - * @param loggerName - 日志记录器名称 - * @param stackSize - 打印栈的深度 - * @protected - */ - getLogger(e, t2) { - return this.logger.setStackSize(t2), this.logger.getLogger(e); - } -} -class N extends X { - constructor(e, t2, l) { - super(e, t2, l); - } - /** - * 获取默认的日志记录器 - * - * @param loggerName - 日志记录器名称 - * @param stackSize - 打印栈的深度 - */ - getLogger(e, t2) { - return super.getLogger(e, t2); - } -} -class M { - /** - * 默认日志记录器 - * - * @param stackSize - 栈的深度 - * @param env - 环境变量实例 - */ - static defaultLogger(e, t2) { - return M.customLogFactory(void 0, void 0, e).getLogger( - void 0, - t2 - ); - } - /** - * 自定义日志工厂 - */ - static customLogFactory(e, t2, l) { - return new N(e, t2, l); - } - /** - * 自定义日志工厂,自定义前缀 - */ - static customSignLogFactory(e, t2) { - return new N(void 0, e, t2); - } -} -function insertBefore(positionEl, el) { - return positionEl.insertAdjacentElement("beforebegin", el); -} -function insertAfter(positionEl, el) { - return positionEl.insertAdjacentElement("afterend", el); -} -function addToolbarLeft(el) { - var _a2; - const title = (_a2 = document.getElementById("toolbar")) == null ? void 0 : _a2.getElementsByClassName("fn__ellipsis"); - if (!title) { - return; - } - insertBefore(title[0], el); -} -function addToolbarRight(el) { - var _a2; - const title = (_a2 = document.getElementById("toolbar")) == null ? void 0 : _a2.getElementsByClassName("fn__ellipsis"); - if (!title) { - return; - } - insertAfter(title[0], el); -} -const createLogger = (name2) => getLogger(name2); -const clientApi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - addToolbarLeft, - addToolbarRight, - createLogger -}, Symbol.toStringTag, { value: "Module" })); -class Menu { - constructor(id2) { - var _a2, _b; - const menu = (_b = (_a2 = window.siyuan) == null ? void 0 : _a2.menus) == null ? void 0 : _b.menu; - if (!menu) { - throw Error("Siyuan internal menu not found!"); - } - this.menu = menu; - if (!id2) { - throw Error("Menu must has an id, got empty or undefined!"); - } - menu.remove(); - menu.element.setAttribute("data-name", id2); - } - addItem(item) { - this.menu.append(item.element); - return this; - } - addSeparator() { - this.addItem(new MenuItem({ type: "separator" })); - return this; - } - showAtMouseEvent(event) { - this.menu.popup({ x: event.clientX, y: event.clientY }); - return this; - } - showAtPosition(position) { - this.menu.popup({ x: position.x, y: position.y }); - return this; - } - close() { - this.menu.remove(); - } -} -class MenuItem { - constructor(options) { - this.element = document.createElement("button"); - if (options.disabled) { - this.element.setAttribute("disabled", "disabled"); - } - if (options.type === "separator") { - this.element.classList.add("b3-menu__separator"); - return; - } - this.element.classList.add("b3-menu__item"); - if (options.current) { - this.element.classList.add("b3-menu__item--selected"); - } - if (options.click) { - this.element.addEventListener("click", (event) => { - if (this.element.getAttribute("disabled")) { - return; - } - options.click(this.element); - event.preventDefault(); - event.stopImmediatePropagation(); - event.stopPropagation(); - window.siyuan.menus.menu.remove(); - }); - } - let html = `${options.label}`; - if (options.iconHTML) { - html = options.iconHTML + html; - } else { - html = `${html}`; - } - if (options.action) { - html += ``; - } - if (options.id) { - this.element.setAttribute("data-id", options.id); - } - if (options.type === "readonly") { - this.element.classList.add("b3-menu__item--readonly"); - } - this.element.innerHTML = html; - if (options.bind) { - this.element.classList.add("b3-menu__item--custom"); - options.bind(this.element); - } - if (options.submenu) { - const submenuElement = document.createElement("div"); - submenuElement.classList.add("b3-menu__submenu"); - options.submenu.forEach((item) => { - submenuElement.append(new MenuItem(item).element); - }); - this.element.insertAdjacentHTML("beforeend", ''); - this.element.append(submenuElement); - } - } -} -class MenuSeparator { -} -class Dialog { - constructor(options) { - this.disableClose = options.disableClose; - this.id = genUUID(); - window.siyuan.dialogs.push(this); - this.destroyCallback = options.destroyCallback; - this.element = document.createElement("div"); - this.element.innerHTML = `
-
-
- -
${options.title || ""}
-
${options.content}
-
`; - this.element.querySelector(".b3-dialog__scrim").addEventListener("click", (event) => { - if (!this.disableClose) { - this.destroy(); - } - event.preventDefault(); - event.stopPropagation(); - window.siyuan.menus.menu.remove(); - }); - if (!this.disableClose) { - this.element.querySelector(".b3-dialog__close").addEventListener("click", (event) => { - this.destroy(); - event.preventDefault(); - event.stopPropagation(); - }); - } - document.body.append(this.element); - if (options.disableAnimation) { - this.element.classList.add("b3-dialog--open"); - } else { - setTimeout(() => { - this.element.classList.add("b3-dialog--open"); - }); - } - window.siyuan.menus.menu.remove(); - } - static destroyAll() { - window.siyuan.dialogs.forEach((p) => p.destroy()); - } - destroy() { - this.element.remove(); - window.siyuan.menus.menu.remove(); - if (this.destroyCallback) { - this.destroyCallback(); - } - window.siyuan.dialogs.find((item, index) => { - if (item.id === this.id) { - window.siyuan.dialogs.splice(index, 1); - return true; - } - }); - } - bindInput(inputElement, enterEvent) { - inputElement.focus(); - inputElement.addEventListener("keydown", (event) => { - if (event.isComposing) { - event.preventDefault(); - return; - } - if (event.key === "Escape") { - this.destroy(); - event.preventDefault(); - event.stopPropagation(); - return; - } - if (event.key === "Enter" && enterEvent) { - enterEvent(); - event.preventDefault(); - } - }); - } -} -class Plugin { - onload() { - } - onunload() { - } - registerCommand(command) { - } - registerSettingRender(settingRender) { - } - async loadStorage(filename) { - return null; - } - async writeStorage(filename, content) { - } -} -const api = { - clientApi, - serverApi, - Plugin, - Menu, - MenuItem, - MenuSeparator, - Notification, - Dialog -}; -class FileClient { - constructor() { - this.electronApi = { - readDir(p) { - const fs = window.require("fs"); - const path = window.require("path"); - const SIYUAN_WORKSPACE = path.join(window.siyuan.config.system.dataDir, ".."); - return new Promise((resolve2) => { - fs.readdir(path.join(SIYUAN_WORKSPACE, p), (err, files) => { - if (err) { - resolve2([]); - return; - } - const result = files.map((f) => ({ - isDir: fs.statSync(path.join(SIYUAN_WORKSPACE, p, f)).isDirectory(), - name: f - })); - resolve2(result); - }); - }); - }, - getFile(f, type = "text") { - return new Promise((resolve2, reject) => { - const fs = window.require("fs"); - const path = window.require("path"); - const SIYUAN_WORKSPACE = path.join(window.siyuan.config.system.dataDir, ".."); - fs.readFile(path.join(SIYUAN_WORKSPACE, f), (err, data) => { - if (err) { - return reject(err); - } - const text2 = data.toString("utf8"); - if (type === "json") { - try { - return resolve2(JSON.parse(text2)); - } catch (e) { - reject(e); - return; - } - } - return resolve2(text2); - }); - }); - }, - putFile, - removeFile(f) { - return new Promise((resolve2, reject) => { - const fs = window.require("fs"); - const path = window.require("path"); - const SIYUAN_WORKSPACE = path.join(window.siyuan.config.system.dataDir, ".."); - const p = path.join(SIYUAN_WORKSPACE, f); - log("Remove files from", p); - fs.rm(p, { recursive: true, force: true }, (err) => { - if (err) { - return reject(err); - } - resolve2(null); - }); - }); - } - }; - this.serverApi = { - readDir, - getFile, - putFile, - removeFile - }; - this.fileApi = this.serverApi; - } - getVersion() { - return window.siyuan.config.system.kernelVersion; - } - static getInstanceApi() { - if (!this.fileClient) { - this.fileClient = new FileClient(); - } - return this.fileClient; - } -} -const author$1 = "作者"; -const version$1 = "版本"; -const description$1 = "描述"; -const goBack$1 = "返回"; -const url$1 = "地址"; -const readme$1 = "README"; -const loading$1 = "加载中"; -const downloading$1 = "下载中"; -const downloaded$1 = "已下载"; -const download$1 = "下载"; -const upgrade$1 = "升级"; -const nodescription$1 = "无描述内容"; -const safemode$1 = "安全模式"; -const safemodetip$1 = "关闭安全模式允许第三方插件加载"; -const autoupgrade$1 = "自动更新"; -const autoupgradetip$1 = "从固定位置获取版本并更新本地存储的插件系统脚本"; -const store_url$1 = "插件商店地址"; -const store_url_tip$1 = "线上插件系统仓库地址, 默认为"; -const menu_common$1 = "通用配置"; -const menu_list$1 = "插件列表"; -const menu_store$1 = "插件商店"; -const plugin_system$1 = "插件系统"; -const plugin_system_setting$1 = "插件系统设置"; -const reload$1 = "重载"; -const show_plugin_system_config$1 = "显示插件系统配置"; -const reload_window$1 = "重载当前窗口"; -const shortcut$1 = "快捷键"; -const show_command_panel$1 = "显示控制面板"; -const uninstall$1 = "卸载"; -const new_version_widget$1 = "集市发现新版本的插件系统,请前往更新并重载"; -const zh_CN = { - author: author$1, - version: version$1, - description: description$1, - goBack: goBack$1, - url: url$1, - readme: readme$1, - loading: loading$1, - downloading: downloading$1, - downloaded: downloaded$1, - download: download$1, - upgrade: upgrade$1, - nodescription: nodescription$1, - safemode: safemode$1, - safemodetip: safemodetip$1, - autoupgrade: autoupgrade$1, - autoupgradetip: autoupgradetip$1, - store_url: store_url$1, - store_url_tip: store_url_tip$1, - menu_common: menu_common$1, - menu_list: menu_list$1, - menu_store: menu_store$1, - plugin_system: plugin_system$1, - plugin_system_setting: plugin_system_setting$1, - reload: reload$1, - show_plugin_system_config: show_plugin_system_config$1, - reload_window: reload_window$1, - shortcut: shortcut$1, - show_command_panel: show_command_panel$1, - uninstall: uninstall$1, - new_version_widget: new_version_widget$1 -}; -const author = "Author"; -const version = "Version"; -const description = "Description"; -const goBack = "Go Back"; -const url = "URL"; -const readme = "README"; -const loading = "Loading"; -const downloading = "Downloading"; -const downloaded = "Downloaded"; -const download = "Download"; -const upgrade = "Upgrade"; -const nodescription = "No Description content"; -const safemode = "Safe Mode"; -const safemodetip = "Turn off safe mode to enable third party plugins."; -const autoupgrade = "Auto Upgrade"; -const autoupgradetip = "Auto upgrade plugin system online."; -const store_url = "Plugin Store URL"; -const store_url_tip = "Plugin Store URL, default is"; -const menu_common = "Common Setting"; -const menu_list = "Plugins"; -const menu_store = "Store"; -const plugin_system = "Plugin System"; -const plugin_system_setting = "Plugin System Setting"; -const reload = "Reload"; -const show_plugin_system_config = "Show plugin system config"; -const reload_window = "Reload current window"; -const shortcut = "Shortcut"; -const show_command_panel = "Show command panel"; -const uninstall = "Uninstall"; -const new_version_widget = "New version plugin system found in Bazzar, please upgrade and reload."; -const en_US = { - author, - version, - description, - goBack, - url, - readme, - loading, - downloading, - downloaded, - download, - upgrade, - nodescription, - safemode, - safemodetip, - autoupgrade, - autoupgradetip, - store_url, - store_url_tip, - menu_common, - menu_list, - menu_store, - plugin_system, - plugin_system_setting, - reload, - show_plugin_system_config, - reload_window, - shortcut, - show_command_panel, - uninstall, - new_version_widget -}; -function bind(fn, thisArg) { - return function wrap() { - return fn.apply(thisArg, arguments); - }; -} -const { toString } = Object.prototype; -const { getPrototypeOf } = Object; -const kindOf = ((cache) => (thing) => { - const str = toString.call(thing); - return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); -})(/* @__PURE__ */ Object.create(null)); -const kindOfTest = (type) => { - type = type.toLowerCase(); - return (thing) => kindOf(thing) === type; -}; -const typeOfTest = (type) => (thing) => typeof thing === type; -const { isArray } = Array; -const isUndefined = typeOfTest("undefined"); -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); -} -const isArrayBuffer = kindOfTest("ArrayBuffer"); -function isArrayBufferView(val) { - let result; - if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { - result = ArrayBuffer.isView(val); - } else { - result = val && val.buffer && isArrayBuffer(val.buffer); - } - return result; -} -const isString = typeOfTest("string"); -const isFunction = typeOfTest("function"); -const isNumber = typeOfTest("number"); -const isObject = (thing) => thing !== null && typeof thing === "object"; -const isBoolean = (thing) => thing === true || thing === false; -const isPlainObject = (val) => { - if (kindOf(val) !== "object") { - return false; - } - const prototype2 = getPrototypeOf(val); - return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); -}; -const isDate = kindOfTest("Date"); -const isFile = kindOfTest("File"); -const isBlob = kindOfTest("Blob"); -const isFileList = kindOfTest("FileList"); -const isStream = (val) => isObject(val) && isFunction(val.pipe); -const isFormData = (thing) => { - const pattern = "[object FormData]"; - return thing && (typeof FormData === "function" && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern); -}; -const isURLSearchParams = kindOfTest("URLSearchParams"); -const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); -function forEach(obj, fn, { allOwnKeys = false } = {}) { - if (obj === null || typeof obj === "undefined") { - return; - } - let i; - let l; - if (typeof obj !== "object") { - obj = [obj]; - } - if (isArray(obj)) { - for (i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - fn.call(null, obj[key], key, obj); - } - } -} -function findKey(obj, key) { - key = key.toLowerCase(); - const keys = Object.keys(obj); - let i = keys.length; - let _key; - while (i-- > 0) { - _key = keys[i]; - if (key === _key.toLowerCase()) { - return _key; - } - } - return null; -} -const _global = (() => { - if (typeof globalThis !== "undefined") - return globalThis; - return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; -})(); -const isContextDefined = (context) => !isUndefined(context) && context !== _global; -function merge() { - const { caseless } = isContextDefined(this) && this || {}; - const result = {}; - const assignValue = (val, key) => { - const targetKey = caseless && findKey(result, key) || key; - if (isPlainObject(result[targetKey]) && isPlainObject(val)) { - result[targetKey] = merge(result[targetKey], val); - } else if (isPlainObject(val)) { - result[targetKey] = merge({}, val); - } else if (isArray(val)) { - result[targetKey] = val.slice(); - } else { - result[targetKey] = val; - } - }; - for (let i = 0, l = arguments.length; i < l; i++) { - arguments[i] && forEach(arguments[i], assignValue); - } - return result; -} -const extend = (a2, b2, thisArg, { allOwnKeys } = {}) => { - forEach(b2, (val, key) => { - if (thisArg && isFunction(val)) { - a2[key] = bind(val, thisArg); - } else { - a2[key] = val; - } - }, { allOwnKeys }); - return a2; -}; -const stripBOM = (content) => { - if (content.charCodeAt(0) === 65279) { - content = content.slice(1); - } - return content; -}; -const inherits = (constructor, superConstructor, props, descriptors2) => { - constructor.prototype = Object.create(superConstructor.prototype, descriptors2); - constructor.prototype.constructor = constructor; - Object.defineProperty(constructor, "super", { - value: superConstructor.prototype - }); - props && Object.assign(constructor.prototype, props); -}; -const toFlatObject = (sourceObj, destObj, filter3, propFilter) => { - let props; - let i; - let prop; - const merged = {}; - destObj = destObj || {}; - if (sourceObj == null) - return destObj; - do { - props = Object.getOwnPropertyNames(sourceObj); - i = props.length; - while (i-- > 0) { - prop = props[i]; - if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { - destObj[prop] = sourceObj[prop]; - merged[prop] = true; - } - } - sourceObj = filter3 !== false && getPrototypeOf(sourceObj); - } while (sourceObj && (!filter3 || filter3(sourceObj, destObj)) && sourceObj !== Object.prototype); - return destObj; -}; -const endsWith = (str, searchString, position) => { - str = String(str); - if (position === void 0 || position > str.length) { - position = str.length; - } - position -= searchString.length; - const lastIndex = str.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; -}; -const toArray = (thing) => { - if (!thing) - return null; - if (isArray(thing)) - return thing; - let i = thing.length; - if (!isNumber(i)) - return null; - const arr = new Array(i); - while (i-- > 0) { - arr[i] = thing[i]; - } - return arr; -}; -const isTypedArray = ((TypedArray) => { - return (thing) => { - return TypedArray && thing instanceof TypedArray; - }; -})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); -const forEachEntry = (obj, fn) => { - const generator = obj && obj[Symbol.iterator]; - const iterator2 = generator.call(obj); - let result; - while ((result = iterator2.next()) && !result.done) { - const pair = result.value; - fn.call(obj, pair[0], pair[1]); - } -}; -const matchAll = (regExp, str) => { - let matches; - const arr = []; - while ((matches = regExp.exec(str)) !== null) { - arr.push(matches); - } - return arr; -}; -const isHTMLForm = kindOfTest("HTMLFormElement"); -const toCamelCase = (str) => { - return str.toLowerCase().replace( - /[-_\s]([a-z\d])(\w*)/g, - function replacer(m, p1, p2) { - return p1.toUpperCase() + p2; - } - ); -}; -const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype); -const isRegExp = kindOfTest("RegExp"); -const reduceDescriptors = (obj, reducer) => { - const descriptors2 = Object.getOwnPropertyDescriptors(obj); - const reducedDescriptors = {}; - forEach(descriptors2, (descriptor, name2) => { - if (reducer(descriptor, name2, obj) !== false) { - reducedDescriptors[name2] = descriptor; - } - }); - Object.defineProperties(obj, reducedDescriptors); -}; -const freezeMethods = (obj) => { - reduceDescriptors(obj, (descriptor, name2) => { - if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name2) !== -1) { - return false; - } - const value = obj[name2]; - if (!isFunction(value)) - return; - descriptor.enumerable = false; - if ("writable" in descriptor) { - descriptor.writable = false; - return; - } - if (!descriptor.set) { - descriptor.set = () => { - throw Error("Can not rewrite read-only method '" + name2 + "'"); - }; - } - }); -}; -const toObjectSet = (arrayOrString, delimiter) => { - const obj = {}; - const define = (arr) => { - arr.forEach((value) => { - obj[value] = true; - }); - }; - isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - return obj; -}; -const noop$1 = () => { -}; -const toFiniteNumber = (value, defaultValue) => { - value = +value; - return Number.isFinite(value) ? value : defaultValue; -}; -const ALPHA = "abcdefghijklmnopqrstuvwxyz"; -const DIGIT = "0123456789"; -const ALPHABET = { - DIGIT, - ALPHA, - ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT -}; -const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { - let str = ""; - const { length } = alphabet; - while (size--) { - str += alphabet[Math.random() * length | 0]; - } - return str; -}; -function isSpecCompliantForm(thing) { - return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]); -} -const toJSONObject = (obj) => { - const stack = new Array(10); - const visit = (source, i) => { - if (isObject(source)) { - if (stack.indexOf(source) >= 0) { - return; - } - if (!("toJSON" in source)) { - stack[i] = source; - const target = isArray(source) ? [] : {}; - forEach(source, (value, key) => { - const reducedValue = visit(value, i + 1); - !isUndefined(reducedValue) && (target[key] = reducedValue); - }); - stack[i] = void 0; - return target; - } - } - return source; - }; - return visit(obj, 0); -}; -const utils = { - isArray, - isArrayBuffer, - isBuffer, - isFormData, - isArrayBufferView, - isString, - isNumber, - isBoolean, - isObject, - isPlainObject, - isUndefined, - isDate, - isFile, - isBlob, - isRegExp, - isFunction, - isStream, - isURLSearchParams, - isTypedArray, - isFileList, - forEach, - merge, - extend, - trim, - stripBOM, - inherits, - toFlatObject, - kindOf, - kindOfTest, - endsWith, - toArray, - forEachEntry, - matchAll, - isHTMLForm, - hasOwnProperty, - hasOwnProp: hasOwnProperty, - // an alias to avoid ESLint no-prototype-builtins detection - reduceDescriptors, - freezeMethods, - toObjectSet, - toCamelCase, - noop: noop$1, - toFiniteNumber, - findKey, - global: _global, - isContextDefined, - ALPHABET, - generateString, - isSpecCompliantForm, - toJSONObject -}; -function AxiosError(message, code3, config2, request2, response) { - Error.call(this); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error().stack; - } - this.message = message; - this.name = "AxiosError"; - code3 && (this.code = code3); - config2 && (this.config = config2); - request2 && (this.request = request2); - response && (this.response = response); -} -utils.inherits(AxiosError, Error, { - toJSON: function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: utils.toJSONObject(this.config), - code: this.code, - status: this.response && this.response.status ? this.response.status : null - }; - } -}); -const prototype$1 = AxiosError.prototype; -const descriptors = {}; -[ - "ERR_BAD_OPTION_VALUE", - "ERR_BAD_OPTION", - "ECONNABORTED", - "ETIMEDOUT", - "ERR_NETWORK", - "ERR_FR_TOO_MANY_REDIRECTS", - "ERR_DEPRECATED", - "ERR_BAD_RESPONSE", - "ERR_BAD_REQUEST", - "ERR_CANCELED", - "ERR_NOT_SUPPORT", - "ERR_INVALID_URL" - // eslint-disable-next-line func-names -].forEach((code3) => { - descriptors[code3] = { value: code3 }; -}); -Object.defineProperties(AxiosError, descriptors); -Object.defineProperty(prototype$1, "isAxiosError", { value: true }); -AxiosError.from = (error2, code3, config2, request2, response, customProps) => { - const axiosError = Object.create(prototype$1); - utils.toFlatObject(error2, axiosError, function filter3(obj) { - return obj !== Error.prototype; - }, (prop) => { - return prop !== "isAxiosError"; - }); - AxiosError.call(axiosError, error2.message, code3, config2, request2, response); - axiosError.cause = error2; - axiosError.name = error2.name; - customProps && Object.assign(axiosError, customProps); - return axiosError; -}; -const httpAdapter = null; -function isVisitable(thing) { - return utils.isPlainObject(thing) || utils.isArray(thing); -} -function removeBrackets(key) { - return utils.endsWith(key, "[]") ? key.slice(0, -2) : key; -} -function renderKey(path, key, dots) { - if (!path) - return key; - return path.concat(key).map(function each(token, i) { - token = removeBrackets(token); - return !dots && i ? "[" + token + "]" : token; - }).join(dots ? "." : ""); -} -function isFlatArray(arr) { - return utils.isArray(arr) && !arr.some(isVisitable); -} -const predicates = utils.toFlatObject(utils, {}, null, function filter2(prop) { - return /^is[A-Z]/.test(prop); -}); -function toFormData(obj, formData, options) { - if (!utils.isObject(obj)) { - throw new TypeError("target must be an object"); - } - formData = formData || new FormData(); - options = utils.toFlatObject(options, { - metaTokens: true, - dots: false, - indexes: false - }, false, function defined(option, source) { - return !utils.isUndefined(source[option]); - }); - const metaTokens = options.metaTokens; - const visitor = options.visitor || defaultVisitor; - const dots = options.dots; - const indexes = options.indexes; - const _Blob = options.Blob || typeof Blob !== "undefined" && Blob; - const useBlob = _Blob && utils.isSpecCompliantForm(formData); - if (!utils.isFunction(visitor)) { - throw new TypeError("visitor must be a function"); - } - function convertValue(value) { - if (value === null) - return ""; - if (utils.isDate(value)) { - return value.toISOString(); - } - if (!useBlob && utils.isBlob(value)) { - throw new AxiosError("Blob is not supported. Use a Buffer instead."); - } - if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) { - return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value); - } - return value; - } - function defaultVisitor(value, key, path) { - let arr = value; - if (value && !path && typeof value === "object") { - if (utils.endsWith(key, "{}")) { - key = metaTokens ? key : key.slice(0, -2); - value = JSON.stringify(value); - } else if (utils.isArray(value) && isFlatArray(value) || (utils.isFileList(value) || utils.endsWith(key, "[]")) && (arr = utils.toArray(value))) { - key = removeBrackets(key); - arr.forEach(function each(el, index) { - !(utils.isUndefined(el) || el === null) && formData.append( - // eslint-disable-next-line no-nested-ternary - indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", - convertValue(el) - ); - }); - return false; - } - } - if (isVisitable(value)) { - return true; - } - formData.append(renderKey(path, key, dots), convertValue(value)); - return false; - } - const stack = []; - const exposedHelpers = Object.assign(predicates, { - defaultVisitor, - convertValue, - isVisitable - }); - function build(value, path) { - if (utils.isUndefined(value)) - return; - if (stack.indexOf(value) !== -1) { - throw Error("Circular reference detected in " + path.join(".")); - } - stack.push(value); - utils.forEach(value, function each(el, key) { - const result = !(utils.isUndefined(el) || el === null) && visitor.call( - formData, - el, - utils.isString(key) ? key.trim() : key, - path, - exposedHelpers - ); - if (result === true) { - build(el, path ? path.concat(key) : [key]); - } - }); - stack.pop(); - } - if (!utils.isObject(obj)) { - throw new TypeError("data must be an object"); - } - build(obj); - return formData; -} -function encode$1(str) { - const charMap = { - "!": "%21", - "'": "%27", - "(": "%28", - ")": "%29", - "~": "%7E", - "%20": "+", - "%00": "\0" - }; - return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { - return charMap[match]; - }); -} -function AxiosURLSearchParams(params, options) { - this._pairs = []; - params && toFormData(params, this, options); -} -const prototype = AxiosURLSearchParams.prototype; -prototype.append = function append2(name2, value) { - this._pairs.push([name2, value]); -}; -prototype.toString = function toString2(encoder) { - const _encode = encoder ? function(value) { - return encoder.call(this, value, encode$1); - } : encode$1; - return this._pairs.map(function each(pair) { - return _encode(pair[0]) + "=" + _encode(pair[1]); - }, "").join("&"); -}; -function encode(val) { - return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); -} -function buildURL(url2, params, options) { - if (!params) { - return url2; - } - const _encode = options && options.encode || encode; - const serializeFn = options && options.serialize; - let serializedParams; - if (serializeFn) { - serializedParams = serializeFn(params, options); - } else { - serializedParams = utils.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode); - } - if (serializedParams) { - const hashmarkIndex = url2.indexOf("#"); - if (hashmarkIndex !== -1) { - url2 = url2.slice(0, hashmarkIndex); - } - url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; - } - return url2; -} -class InterceptorManager { - constructor() { - this.handlers = []; - } - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - use(fulfilled, rejected, options) { - this.handlers.push({ - fulfilled, - rejected, - synchronous: options ? options.synchronous : false, - runWhen: options ? options.runWhen : null - }); - return this.handlers.length - 1; - } - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - * - * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise - */ - eject(id2) { - if (this.handlers[id2]) { - this.handlers[id2] = null; - } - } - /** - * Clear all interceptors from the stack - * - * @returns {void} - */ - clear() { - if (this.handlers) { - this.handlers = []; - } - } - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - * - * @returns {void} - */ - forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - } -} -const InterceptorManager$1 = InterceptorManager; -const transitionalDefaults = { - silentJSONParsing: true, - forcedJSONParsing: true, - clarifyTimeoutError: false -}; -const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams; -const FormData$1 = typeof FormData !== "undefined" ? FormData : null; -const Blob$1 = typeof Blob !== "undefined" ? Blob : null; -const isStandardBrowserEnv = (() => { - let product; - if (typeof navigator !== "undefined" && ((product = navigator.product) === "ReactNative" || product === "NativeScript" || product === "NS")) { - return false; - } - return typeof window !== "undefined" && typeof document !== "undefined"; -})(); -const isStandardBrowserWebWorkerEnv = (() => { - return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef - self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; -})(); -const platform = { - isBrowser: true, - classes: { - URLSearchParams: URLSearchParams$1, - FormData: FormData$1, - Blob: Blob$1 - }, - isStandardBrowserEnv, - isStandardBrowserWebWorkerEnv, - protocols: ["http", "https", "file", "blob", "url", "data"] -}; -function toURLEncodedForm(data, options) { - return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ - visitor: function(value, key, path, helpers) { - if (platform.isNode && utils.isBuffer(value)) { - this.append(key, value.toString("base64")); - return false; - } - return helpers.defaultVisitor.apply(this, arguments); - } - }, options)); -} -function parsePropPath(name2) { - return utils.matchAll(/\w+|\[(\w*)]/g, name2).map((match) => { - return match[0] === "[]" ? "" : match[1] || match[0]; - }); -} -function arrayToObject(arr) { - const obj = {}; - const keys = Object.keys(arr); - let i; - const len = keys.length; - let key; - for (i = 0; i < len; i++) { - key = keys[i]; - obj[key] = arr[key]; - } - return obj; -} -function formDataToJSON(formData) { - function buildPath(path, value, target, index) { - let name2 = path[index++]; - const isNumericKey = Number.isFinite(+name2); - const isLast = index >= path.length; - name2 = !name2 && utils.isArray(target) ? target.length : name2; - if (isLast) { - if (utils.hasOwnProp(target, name2)) { - target[name2] = [target[name2], value]; - } else { - target[name2] = value; - } - return !isNumericKey; - } - if (!target[name2] || !utils.isObject(target[name2])) { - target[name2] = []; - } - const result = buildPath(path, value, target[name2], index); - if (result && utils.isArray(target[name2])) { - target[name2] = arrayToObject(target[name2]); - } - return !isNumericKey; - } - if (utils.isFormData(formData) && utils.isFunction(formData.entries)) { - const obj = {}; - utils.forEachEntry(formData, (name2, value) => { - buildPath(parsePropPath(name2), value, obj, 0); - }); - return obj; - } - return null; -} -const DEFAULT_CONTENT_TYPE = { - "Content-Type": void 0 -}; -function stringifySafely(rawValue, parser, encoder) { - if (utils.isString(rawValue)) { - try { - (parser || JSON.parse)(rawValue); - return utils.trim(rawValue); - } catch (e) { - if (e.name !== "SyntaxError") { - throw e; - } - } - } - return (encoder || JSON.stringify)(rawValue); -} -const defaults = { - transitional: transitionalDefaults, - adapter: ["xhr", "http"], - transformRequest: [function transformRequest(data, headers) { - const contentType = headers.getContentType() || ""; - const hasJSONContentType = contentType.indexOf("application/json") > -1; - const isObjectPayload = utils.isObject(data); - if (isObjectPayload && utils.isHTMLForm(data)) { - data = new FormData(data); - } - const isFormData2 = utils.isFormData(data); - if (isFormData2) { - if (!hasJSONContentType) { - return data; - } - return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; - } - if (utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); - return data.toString(); - } - let isFileList2; - if (isObjectPayload) { - if (contentType.indexOf("application/x-www-form-urlencoded") > -1) { - return toURLEncodedForm(data, this.formSerializer).toString(); - } - if ((isFileList2 = utils.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { - const _FormData = this.env && this.env.FormData; - return toFormData( - isFileList2 ? { "files[]": data } : data, - _FormData && new _FormData(), - this.formSerializer - ); - } - } - if (isObjectPayload || hasJSONContentType) { - headers.setContentType("application/json", false); - return stringifySafely(data); - } - return data; - }], - transformResponse: [function transformResponse(data) { - const transitional2 = this.transitional || defaults.transitional; - const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing; - const JSONRequested = this.responseType === "json"; - if (data && utils.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) { - const silentJSONParsing = transitional2 && transitional2.silentJSONParsing; - const strictJSONParsing = !silentJSONParsing && JSONRequested; - try { - return JSON.parse(data); - } catch (e) { - if (strictJSONParsing) { - if (e.name === "SyntaxError") { - throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response); - } - throw e; - } - } - } - return data; - }], - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - xsrfCookieName: "XSRF-TOKEN", - xsrfHeaderName: "X-XSRF-TOKEN", - maxContentLength: -1, - maxBodyLength: -1, - env: { - FormData: platform.classes.FormData, - Blob: platform.classes.Blob - }, - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - }, - headers: { - common: { - "Accept": "application/json, text/plain, */*" - } - } -}; -utils.forEach(["delete", "get", "head"], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); -utils.forEach(["post", "put", "patch"], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); -const defaults$1 = defaults; -const ignoreDuplicateOf = utils.toObjectSet([ - "age", - "authorization", - "content-length", - "content-type", - "etag", - "expires", - "from", - "host", - "if-modified-since", - "if-unmodified-since", - "last-modified", - "location", - "max-forwards", - "proxy-authorization", - "referer", - "retry-after", - "user-agent" -]); -const parseHeaders = (rawHeaders) => { - const parsed = {}; - let key; - let val; - let i; - rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { - i = line.indexOf(":"); - key = line.substring(0, i).trim().toLowerCase(); - val = line.substring(i + 1).trim(); - if (!key || parsed[key] && ignoreDuplicateOf[key]) { - return; - } - if (key === "set-cookie") { - if (parsed[key]) { - parsed[key].push(val); - } else { - parsed[key] = [val]; - } - } else { - parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; - } - }); - return parsed; -}; -const $internals = Symbol("internals"); -function normalizeHeader(header) { - return header && String(header).trim().toLowerCase(); -} -function normalizeValue(value) { - if (value === false || value == null) { - return value; - } - return utils.isArray(value) ? value.map(normalizeValue) : String(value); -} -function parseTokens(str) { - const tokens = /* @__PURE__ */ Object.create(null); - const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; - let match; - while (match = tokensRE.exec(str)) { - tokens[match[1]] = match[2]; - } - return tokens; -} -function isValidHeaderName(str) { - return /^[-_a-zA-Z]+$/.test(str.trim()); -} -function matchHeaderValue(context, value, header, filter3, isHeaderNameFilter) { - if (utils.isFunction(filter3)) { - return filter3.call(this, value, header); - } - if (isHeaderNameFilter) { - value = header; - } - if (!utils.isString(value)) - return; - if (utils.isString(filter3)) { - return value.indexOf(filter3) !== -1; - } - if (utils.isRegExp(filter3)) { - return filter3.test(value); - } -} -function formatHeader(header) { - return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { - return char.toUpperCase() + str; - }); -} -function buildAccessors(obj, header) { - const accessorName = utils.toCamelCase(" " + header); - ["get", "set", "has"].forEach((methodName) => { - Object.defineProperty(obj, methodName + accessorName, { - value: function(arg1, arg2, arg3) { - return this[methodName].call(this, header, arg1, arg2, arg3); - }, - configurable: true - }); - }); -} -class AxiosHeaders { - constructor(headers) { - headers && this.set(headers); - } - set(header, valueOrRewrite, rewrite) { - const self2 = this; - function setHeader(_value, _header, _rewrite) { - const lHeader = normalizeHeader(_header); - if (!lHeader) { - throw new Error("header name must be a non-empty string"); - } - const key = utils.findKey(self2, lHeader); - if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) { - self2[key || _header] = normalizeValue(_value); - } - } - const setHeaders = (headers, _rewrite) => utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); - if (utils.isPlainObject(header) || header instanceof this.constructor) { - setHeaders(header, valueOrRewrite); - } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { - setHeaders(parseHeaders(header), valueOrRewrite); - } else { - header != null && setHeader(valueOrRewrite, header, rewrite); - } - return this; - } - get(header, parser) { - header = normalizeHeader(header); - if (header) { - const key = utils.findKey(this, header); - if (key) { - const value = this[key]; - if (!parser) { - return value; - } - if (parser === true) { - return parseTokens(value); - } - if (utils.isFunction(parser)) { - return parser.call(this, value, key); - } - if (utils.isRegExp(parser)) { - return parser.exec(value); - } - throw new TypeError("parser must be boolean|regexp|function"); - } - } - } - has(header, matcher) { - header = normalizeHeader(header); - if (header) { - const key = utils.findKey(this, header); - return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); - } - return false; - } - delete(header, matcher) { - const self2 = this; - let deleted = false; - function deleteHeader(_header) { - _header = normalizeHeader(_header); - if (_header) { - const key = utils.findKey(self2, _header); - if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) { - delete self2[key]; - deleted = true; - } - } - } - if (utils.isArray(header)) { - header.forEach(deleteHeader); - } else { - deleteHeader(header); - } - return deleted; - } - clear(matcher) { - const keys = Object.keys(this); - let i = keys.length; - let deleted = false; - while (i--) { - const key = keys[i]; - if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { - delete this[key]; - deleted = true; - } - } - return deleted; - } - normalize(format) { - const self2 = this; - const headers = {}; - utils.forEach(this, (value, header) => { - const key = utils.findKey(headers, header); - if (key) { - self2[key] = normalizeValue(value); - delete self2[header]; - return; - } - const normalized = format ? formatHeader(header) : String(header).trim(); - if (normalized !== header) { - delete self2[header]; - } - self2[normalized] = normalizeValue(value); - headers[normalized] = true; - }); - return this; - } - concat(...targets) { - return this.constructor.concat(this, ...targets); - } - toJSON(asStrings) { - const obj = /* @__PURE__ */ Object.create(null); - utils.forEach(this, (value, header) => { - value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(", ") : value); - }); - return obj; - } - [Symbol.iterator]() { - return Object.entries(this.toJSON())[Symbol.iterator](); - } - toString() { - return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); - } - get [Symbol.toStringTag]() { - return "AxiosHeaders"; - } - static from(thing) { - return thing instanceof this ? thing : new this(thing); - } - static concat(first, ...targets) { - const computed = new this(first); - targets.forEach((target) => computed.set(target)); - return computed; - } - static accessor(header) { - const internals = this[$internals] = this[$internals] = { - accessors: {} - }; - const accessors = internals.accessors; - const prototype2 = this.prototype; - function defineAccessor(_header) { - const lHeader = normalizeHeader(_header); - if (!accessors[lHeader]) { - buildAccessors(prototype2, _header); - accessors[lHeader] = true; - } - } - utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); - return this; - } -} -AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); -utils.freezeMethods(AxiosHeaders.prototype); -utils.freezeMethods(AxiosHeaders); -const AxiosHeaders$1 = AxiosHeaders; -function transformData(fns, response) { - const config2 = this || defaults$1; - const context = response || config2; - const headers = AxiosHeaders$1.from(context.headers); - let data = context.data; - utils.forEach(fns, function transform(fn) { - data = fn.call(config2, data, headers.normalize(), response ? response.status : void 0); - }); - headers.normalize(); - return data; -} -function isCancel(value) { - return !!(value && value.__CANCEL__); -} -function CanceledError(message, config2, request2) { - AxiosError.call(this, message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config2, request2); - this.name = "CanceledError"; -} -utils.inherits(CanceledError, AxiosError, { - __CANCEL__: true -}); -function settle(resolve2, reject, response) { - const validateStatus2 = response.config.validateStatus; - if (!response.status || !validateStatus2 || validateStatus2(response.status)) { - resolve2(response); - } else { - reject(new AxiosError( - "Request failed with status code " + response.status, - [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], - response.config, - response.request, - response - )); - } -} -const cookies = platform.isStandardBrowserEnv ? ( - // Standard browser envs support document.cookie - function standardBrowserEnv() { - return { - write: function write(name2, value, expires, path, domain, secure) { - const cookie = []; - cookie.push(name2 + "=" + encodeURIComponent(value)); - if (utils.isNumber(expires)) { - cookie.push("expires=" + new Date(expires).toGMTString()); - } - if (utils.isString(path)) { - cookie.push("path=" + path); - } - if (utils.isString(domain)) { - cookie.push("domain=" + domain); - } - if (secure === true) { - cookie.push("secure"); - } - document.cookie = cookie.join("; "); - }, - read: function read(name2) { - const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name2 + ")=([^;]*)")); - return match ? decodeURIComponent(match[3]) : null; - }, - remove: function remove(name2) { - this.write(name2, "", Date.now() - 864e5); - } - }; - }() -) : ( - // Non standard browser env (web workers, react-native) lack needed support. - function nonStandardBrowserEnv() { - return { - write: function write() { - }, - read: function read() { - return null; - }, - remove: function remove() { - } - }; - }() -); -function isAbsoluteURL(url2) { - return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); -} -function combineURLs(baseURL, relativeURL) { - return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL; -} -function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -} -const isURLSameOrigin = platform.isStandardBrowserEnv ? ( - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - function standardBrowserEnv2() { - const msie = /(msie|trident)/i.test(navigator.userAgent); - const urlParsingNode = document.createElement("a"); - let originURL; - function resolveURL(url2) { - let href = url2; - if (msie) { - urlParsingNode.setAttribute("href", href); - href = urlParsingNode.href; - } - urlParsingNode.setAttribute("href", href); - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, "") : "", - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, "") : "", - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, "") : "", - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: urlParsingNode.pathname.charAt(0) === "/" ? urlParsingNode.pathname : "/" + urlParsingNode.pathname - }; - } - originURL = resolveURL(window.location.href); - return function isURLSameOrigin2(requestURL) { - const parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL; - return parsed.protocol === originURL.protocol && parsed.host === originURL.host; - }; - }() -) : ( - // Non standard browser envs (web workers, react-native) lack needed support. - function nonStandardBrowserEnv2() { - return function isURLSameOrigin2() { - return true; - }; - }() -); -function parseProtocol(url2) { - const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2); - return match && match[1] || ""; -} -function speedometer(samplesCount, min) { - samplesCount = samplesCount || 10; - const bytes = new Array(samplesCount); - const timestamps = new Array(samplesCount); - let head = 0; - let tail = 0; - let firstSampleTS; - min = min !== void 0 ? min : 1e3; - return function push(chunkLength) { - const now = Date.now(); - const startedAt = timestamps[tail]; - if (!firstSampleTS) { - firstSampleTS = now; - } - bytes[head] = chunkLength; - timestamps[head] = now; - let i = tail; - let bytesCount = 0; - while (i !== head) { - bytesCount += bytes[i++]; - i = i % samplesCount; - } - head = (head + 1) % samplesCount; - if (head === tail) { - tail = (tail + 1) % samplesCount; - } - if (now - firstSampleTS < min) { - return; - } - const passed = startedAt && now - startedAt; - return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; - }; -} -function progressEventReducer(listener, isDownloadStream) { - let bytesNotified = 0; - const _speedometer = speedometer(50, 250); - return (e) => { - const loaded = e.loaded; - const total = e.lengthComputable ? e.total : void 0; - const progressBytes = loaded - bytesNotified; - const rate = _speedometer(progressBytes); - const inRange = loaded <= total; - bytesNotified = loaded; - const data = { - loaded, - total, - progress: total ? loaded / total : void 0, - bytes: progressBytes, - rate: rate ? rate : void 0, - estimated: rate && total && inRange ? (total - loaded) / rate : void 0, - event: e - }; - data[isDownloadStream ? "download" : "upload"] = true; - listener(data); - }; -} -const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; -const xhrAdapter = isXHRAdapterSupported && function(config2) { - return new Promise(function dispatchXhrRequest(resolve2, reject) { - let requestData = config2.data; - const requestHeaders = AxiosHeaders$1.from(config2.headers).normalize(); - const responseType = config2.responseType; - let onCanceled; - function done() { - if (config2.cancelToken) { - config2.cancelToken.unsubscribe(onCanceled); - } - if (config2.signal) { - config2.signal.removeEventListener("abort", onCanceled); - } - } - if (utils.isFormData(requestData) && (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv)) { - requestHeaders.setContentType(false); - } - let request2 = new XMLHttpRequest(); - if (config2.auth) { - const username = config2.auth.username || ""; - const password = config2.auth.password ? unescape(encodeURIComponent(config2.auth.password)) : ""; - requestHeaders.set("Authorization", "Basic " + btoa(username + ":" + password)); - } - const fullPath = buildFullPath(config2.baseURL, config2.url); - request2.open(config2.method.toUpperCase(), buildURL(fullPath, config2.params, config2.paramsSerializer), true); - request2.timeout = config2.timeout; - function onloadend() { - if (!request2) { - return; - } - const responseHeaders = AxiosHeaders$1.from( - "getAllResponseHeaders" in request2 && request2.getAllResponseHeaders() - ); - const responseData = !responseType || responseType === "text" || responseType === "json" ? request2.responseText : request2.response; - const response = { - data: responseData, - status: request2.status, - statusText: request2.statusText, - headers: responseHeaders, - config: config2, - request: request2 - }; - settle(function _resolve(value) { - resolve2(value); - done(); - }, function _reject(err) { - reject(err); - done(); - }, response); - request2 = null; - } - if ("onloadend" in request2) { - request2.onloadend = onloadend; - } else { - request2.onreadystatechange = function handleLoad() { - if (!request2 || request2.readyState !== 4) { - return; - } - if (request2.status === 0 && !(request2.responseURL && request2.responseURL.indexOf("file:") === 0)) { - return; - } - setTimeout(onloadend); - }; - } - request2.onabort = function handleAbort() { - if (!request2) { - return; - } - reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config2, request2)); - request2 = null; - }; - request2.onerror = function handleError() { - reject(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config2, request2)); - request2 = null; - }; - request2.ontimeout = function handleTimeout() { - let timeoutErrorMessage = config2.timeout ? "timeout of " + config2.timeout + "ms exceeded" : "timeout exceeded"; - const transitional2 = config2.transitional || transitionalDefaults; - if (config2.timeoutErrorMessage) { - timeoutErrorMessage = config2.timeoutErrorMessage; - } - reject(new AxiosError( - timeoutErrorMessage, - transitional2.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, - config2, - request2 - )); - request2 = null; - }; - if (platform.isStandardBrowserEnv) { - const xsrfValue = (config2.withCredentials || isURLSameOrigin(fullPath)) && config2.xsrfCookieName && cookies.read(config2.xsrfCookieName); - if (xsrfValue) { - requestHeaders.set(config2.xsrfHeaderName, xsrfValue); - } - } - requestData === void 0 && requestHeaders.setContentType(null); - if ("setRequestHeader" in request2) { - utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { - request2.setRequestHeader(key, val); - }); - } - if (!utils.isUndefined(config2.withCredentials)) { - request2.withCredentials = !!config2.withCredentials; - } - if (responseType && responseType !== "json") { - request2.responseType = config2.responseType; - } - if (typeof config2.onDownloadProgress === "function") { - request2.addEventListener("progress", progressEventReducer(config2.onDownloadProgress, true)); - } - if (typeof config2.onUploadProgress === "function" && request2.upload) { - request2.upload.addEventListener("progress", progressEventReducer(config2.onUploadProgress)); - } - if (config2.cancelToken || config2.signal) { - onCanceled = (cancel) => { - if (!request2) { - return; - } - reject(!cancel || cancel.type ? new CanceledError(null, config2, request2) : cancel); - request2.abort(); - request2 = null; - }; - config2.cancelToken && config2.cancelToken.subscribe(onCanceled); - if (config2.signal) { - config2.signal.aborted ? onCanceled() : config2.signal.addEventListener("abort", onCanceled); - } - } - const protocol = parseProtocol(fullPath); - if (protocol && platform.protocols.indexOf(protocol) === -1) { - reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config2)); - return; - } - request2.send(requestData || null); - }); -}; -const knownAdapters = { - http: httpAdapter, - xhr: xhrAdapter -}; -utils.forEach(knownAdapters, (fn, value) => { - if (fn) { - try { - Object.defineProperty(fn, "name", { value }); - } catch (e) { - } - Object.defineProperty(fn, "adapterName", { value }); - } -}); -const adapters = { - getAdapter: (adapters2) => { - adapters2 = utils.isArray(adapters2) ? adapters2 : [adapters2]; - const { length } = adapters2; - let nameOrAdapter; - let adapter; - for (let i = 0; i < length; i++) { - nameOrAdapter = adapters2[i]; - if (adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter) { - break; - } - } - if (!adapter) { - if (adapter === false) { - throw new AxiosError( - `Adapter ${nameOrAdapter} is not supported by the environment`, - "ERR_NOT_SUPPORT" - ); - } - throw new Error( - utils.hasOwnProp(knownAdapters, nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Unknown adapter '${nameOrAdapter}'` - ); - } - if (!utils.isFunction(adapter)) { - throw new TypeError("adapter is not a function"); - } - return adapter; - }, - adapters: knownAdapters -}; -function throwIfCancellationRequested(config2) { - if (config2.cancelToken) { - config2.cancelToken.throwIfRequested(); - } - if (config2.signal && config2.signal.aborted) { - throw new CanceledError(null, config2); - } -} -function dispatchRequest(config2) { - throwIfCancellationRequested(config2); - config2.headers = AxiosHeaders$1.from(config2.headers); - config2.data = transformData.call( - config2, - config2.transformRequest - ); - if (["post", "put", "patch"].indexOf(config2.method) !== -1) { - config2.headers.setContentType("application/x-www-form-urlencoded", false); - } - const adapter = adapters.getAdapter(config2.adapter || defaults$1.adapter); - return adapter(config2).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config2); - response.data = transformData.call( - config2, - config2.transformResponse, - response - ); - response.headers = AxiosHeaders$1.from(response.headers); - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config2); - if (reason && reason.response) { - reason.response.data = transformData.call( - config2, - config2.transformResponse, - reason.response - ); - reason.response.headers = AxiosHeaders$1.from(reason.response.headers); - } - } - return Promise.reject(reason); - }); -} -const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing; -function mergeConfig(config1, config2) { - config2 = config2 || {}; - const config3 = {}; - function getMergedValue(target, source, caseless) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge.call({ caseless }, target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - function mergeDeepProperties(a2, b2, caseless) { - if (!utils.isUndefined(b2)) { - return getMergedValue(a2, b2, caseless); - } else if (!utils.isUndefined(a2)) { - return getMergedValue(void 0, a2, caseless); - } - } - function valueFromConfig2(a2, b2) { - if (!utils.isUndefined(b2)) { - return getMergedValue(void 0, b2); - } - } - function defaultToConfig2(a2, b2) { - if (!utils.isUndefined(b2)) { - return getMergedValue(void 0, b2); - } else if (!utils.isUndefined(a2)) { - return getMergedValue(void 0, a2); - } - } - function mergeDirectKeys(a2, b2, prop) { - if (prop in config2) { - return getMergedValue(a2, b2); - } else if (prop in config1) { - return getMergedValue(void 0, a2); - } - } - const mergeMap = { - url: valueFromConfig2, - method: valueFromConfig2, - data: valueFromConfig2, - baseURL: defaultToConfig2, - transformRequest: defaultToConfig2, - transformResponse: defaultToConfig2, - paramsSerializer: defaultToConfig2, - timeout: defaultToConfig2, - timeoutMessage: defaultToConfig2, - withCredentials: defaultToConfig2, - adapter: defaultToConfig2, - responseType: defaultToConfig2, - xsrfCookieName: defaultToConfig2, - xsrfHeaderName: defaultToConfig2, - onUploadProgress: defaultToConfig2, - onDownloadProgress: defaultToConfig2, - decompress: defaultToConfig2, - maxContentLength: defaultToConfig2, - maxBodyLength: defaultToConfig2, - beforeRedirect: defaultToConfig2, - transport: defaultToConfig2, - httpAgent: defaultToConfig2, - httpsAgent: defaultToConfig2, - cancelToken: defaultToConfig2, - socketPath: defaultToConfig2, - responseEncoding: defaultToConfig2, - validateStatus: mergeDirectKeys, - headers: (a2, b2) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), true) - }; - utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) { - const merge2 = mergeMap[prop] || mergeDeepProperties; - const configValue = merge2(config1[prop], config2[prop], prop); - utils.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue); - }); - return config3; -} -const VERSION = "1.3.4"; -const validators$1 = {}; -["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => { - validators$1[type] = function validator2(thing) { - return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type; - }; -}); -const deprecatedWarnings = {}; -validators$1.transitional = function transitional(validator2, version2, message) { - function formatMessage(opt, desc) { - return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : ""); - } - return (value, opt, opts2) => { - if (validator2 === false) { - throw new AxiosError( - formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")), - AxiosError.ERR_DEPRECATED - ); - } - if (version2 && !deprecatedWarnings[opt]) { - deprecatedWarnings[opt] = true; - console.warn( - formatMessage( - opt, - " has been deprecated since v" + version2 + " and will be removed in the near future" - ) - ); - } - return validator2 ? validator2(value, opt, opts2) : true; - }; -}; -function assertOptions(options, schema, allowUnknown) { - if (typeof options !== "object") { - throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE); - } - const keys = Object.keys(options); - let i = keys.length; - while (i-- > 0) { - const opt = keys[i]; - const validator2 = schema[opt]; - if (validator2) { - const value = options[opt]; - const result = value === void 0 || validator2(value, opt, options); - if (result !== true) { - throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE); - } - continue; - } - if (allowUnknown !== true) { - throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION); - } - } -} -const validator = { - assertOptions, - validators: validators$1 -}; -const validators = validator.validators; -class Axios { - constructor(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager$1(), - response: new InterceptorManager$1() - }; - } - /** - * Dispatch a request - * - * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) - * @param {?Object} config - * - * @returns {Promise} The Promise to be fulfilled - */ - request(configOrUrl, config2) { - if (typeof configOrUrl === "string") { - config2 = config2 || {}; - config2.url = configOrUrl; - } else { - config2 = configOrUrl || {}; - } - config2 = mergeConfig(this.defaults, config2); - const { transitional: transitional2, paramsSerializer, headers } = config2; - if (transitional2 !== void 0) { - validator.assertOptions(transitional2, { - silentJSONParsing: validators.transitional(validators.boolean), - forcedJSONParsing: validators.transitional(validators.boolean), - clarifyTimeoutError: validators.transitional(validators.boolean) - }, false); - } - if (paramsSerializer !== void 0) { - validator.assertOptions(paramsSerializer, { - encode: validators.function, - serialize: validators.function - }, true); - } - config2.method = (config2.method || this.defaults.method || "get").toLowerCase(); - let contextHeaders; - contextHeaders = headers && utils.merge( - headers.common, - headers[config2.method] - ); - contextHeaders && utils.forEach( - ["delete", "get", "head", "post", "put", "patch", "common"], - (method) => { - delete headers[method]; - } - ); - config2.headers = AxiosHeaders$1.concat(contextHeaders, headers); - const requestInterceptorChain = []; - let synchronousRequestInterceptors = true; - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) { - return; - } - synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; - requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - const responseInterceptorChain = []; - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); - }); - let promise; - let i = 0; - let len; - if (!synchronousRequestInterceptors) { - const chain = [dispatchRequest.bind(this), void 0]; - chain.unshift.apply(chain, requestInterceptorChain); - chain.push.apply(chain, responseInterceptorChain); - len = chain.length; - promise = Promise.resolve(config2); - while (i < len) { - promise = promise.then(chain[i++], chain[i++]); - } - return promise; - } - len = requestInterceptorChain.length; - let newConfig = config2; - i = 0; - while (i < len) { - const onFulfilled = requestInterceptorChain[i++]; - const onRejected = requestInterceptorChain[i++]; - try { - newConfig = onFulfilled(newConfig); - } catch (error2) { - onRejected.call(this, error2); - break; - } - } - try { - promise = dispatchRequest.call(this, newConfig); - } catch (error2) { - return Promise.reject(error2); - } - i = 0; - len = responseInterceptorChain.length; - while (i < len) { - promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); - } - return promise; - } - getUri(config2) { - config2 = mergeConfig(this.defaults, config2); - const fullPath = buildFullPath(config2.baseURL, config2.url); - return buildURL(fullPath, config2.params, config2.paramsSerializer); - } -} -utils.forEach(["delete", "get", "head", "options"], function forEachMethodNoData2(method) { - Axios.prototype[method] = function(url2, config2) { - return this.request(mergeConfig(config2 || {}, { - method, - url: url2, - data: (config2 || {}).data - })); - }; -}); -utils.forEach(["post", "put", "patch"], function forEachMethodWithData2(method) { - function generateHTTPMethod(isForm) { - return function httpMethod(url2, data, config2) { - return this.request(mergeConfig(config2 || {}, { - method, - headers: isForm ? { - "Content-Type": "multipart/form-data" - } : {}, - url: url2, - data - })); - }; - } - Axios.prototype[method] = generateHTTPMethod(); - Axios.prototype[method + "Form"] = generateHTTPMethod(true); -}); -const Axios$1 = Axios; -class CancelToken { - constructor(executor) { - if (typeof executor !== "function") { - throw new TypeError("executor must be a function."); - } - let resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve2) { - resolvePromise = resolve2; - }); - const token = this; - this.promise.then((cancel) => { - if (!token._listeners) - return; - let i = token._listeners.length; - while (i-- > 0) { - token._listeners[i](cancel); - } - token._listeners = null; - }); - this.promise.then = (onfulfilled) => { - let _resolve; - const promise = new Promise((resolve2) => { - token.subscribe(resolve2); - _resolve = resolve2; - }).then(onfulfilled); - promise.cancel = function reject() { - token.unsubscribe(_resolve); - }; - return promise; - }; - executor(function cancel(message, config2, request2) { - if (token.reason) { - return; - } - token.reason = new CanceledError(message, config2, request2); - resolvePromise(token.reason); - }); - } - /** - * Throws a `CanceledError` if cancellation has been requested. - */ - throwIfRequested() { - if (this.reason) { - throw this.reason; - } - } - /** - * Subscribe to the cancel signal - */ - subscribe(listener) { - if (this.reason) { - listener(this.reason); - return; - } - if (this._listeners) { - this._listeners.push(listener); - } else { - this._listeners = [listener]; - } - } - /** - * Unsubscribe from the cancel signal - */ - unsubscribe(listener) { - if (!this._listeners) { - return; - } - const index = this._listeners.indexOf(listener); - if (index !== -1) { - this._listeners.splice(index, 1); - } - } - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - static source() { - let cancel; - const token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token, - cancel - }; - } -} -const CancelToken$1 = CancelToken; -function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -} -function isAxiosError(payload) { - return utils.isObject(payload) && payload.isAxiosError === true; -} -const HttpStatusCode = { - Continue: 100, - SwitchingProtocols: 101, - Processing: 102, - EarlyHints: 103, - Ok: 200, - Created: 201, - Accepted: 202, - NonAuthoritativeInformation: 203, - NoContent: 204, - ResetContent: 205, - PartialContent: 206, - MultiStatus: 207, - AlreadyReported: 208, - ImUsed: 226, - MultipleChoices: 300, - MovedPermanently: 301, - Found: 302, - SeeOther: 303, - NotModified: 304, - UseProxy: 305, - Unused: 306, - TemporaryRedirect: 307, - PermanentRedirect: 308, - BadRequest: 400, - Unauthorized: 401, - PaymentRequired: 402, - Forbidden: 403, - NotFound: 404, - MethodNotAllowed: 405, - NotAcceptable: 406, - ProxyAuthenticationRequired: 407, - RequestTimeout: 408, - Conflict: 409, - Gone: 410, - LengthRequired: 411, - PreconditionFailed: 412, - PayloadTooLarge: 413, - UriTooLong: 414, - UnsupportedMediaType: 415, - RangeNotSatisfiable: 416, - ExpectationFailed: 417, - ImATeapot: 418, - MisdirectedRequest: 421, - UnprocessableEntity: 422, - Locked: 423, - FailedDependency: 424, - TooEarly: 425, - UpgradeRequired: 426, - PreconditionRequired: 428, - TooManyRequests: 429, - RequestHeaderFieldsTooLarge: 431, - UnavailableForLegalReasons: 451, - InternalServerError: 500, - NotImplemented: 501, - BadGateway: 502, - ServiceUnavailable: 503, - GatewayTimeout: 504, - HttpVersionNotSupported: 505, - VariantAlsoNegotiates: 506, - InsufficientStorage: 507, - LoopDetected: 508, - NotExtended: 510, - NetworkAuthenticationRequired: 511 -}; -Object.entries(HttpStatusCode).forEach(([key, value]) => { - HttpStatusCode[value] = key; -}); -const HttpStatusCode$1 = HttpStatusCode; -function createInstance(defaultConfig2) { - const context = new Axios$1(defaultConfig2); - const instance2 = bind(Axios$1.prototype.request, context); - utils.extend(instance2, Axios$1.prototype, context, { allOwnKeys: true }); - utils.extend(instance2, context, null, { allOwnKeys: true }); - instance2.create = function create(instanceConfig) { - return createInstance(mergeConfig(defaultConfig2, instanceConfig)); - }; - return instance2; -} -const axios = createInstance(defaults$1); -axios.Axios = Axios$1; -axios.CanceledError = CanceledError; -axios.CancelToken = CancelToken$1; -axios.isCancel = isCancel; -axios.VERSION = VERSION; -axios.toFormData = toFormData; -axios.AxiosError = AxiosError; -axios.Cancel = axios.CanceledError; -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = spread; -axios.isAxiosError = isAxiosError; -axios.mergeConfig = mergeConfig; -axios.AxiosHeaders = AxiosHeaders$1; -axios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing); -axios.HttpStatusCode = HttpStatusCode$1; -axios.default = axios; -const axios$1 = axios; -const factory = M.customLogFactory(S.LOG_LEVEL_INFO, "PluginSystem"); -const pluginSystemLogger = factory.getLogger("plugin system"); -const log = (...p) => { - pluginSystemLogger.info(...p); -}; -const request = axios$1.create({ - withCredentials: false, - headers: { - "Cache-Control": "no-cache", - Pragma: "no-cache", - Expires: "0" - } -}); -const sleep = async (t2) => { - return new Promise((resolve2) => { - setTimeout(() => resolve2(null), t2); - }); -}; -const error = (...p) => pluginSystemLogger.error(...p); -const genUUID = () => ([1e7].toString() + -1e3 + -4e3 + -8e3 + -1e11).replace( - /[018]/g, - (c) => (parseInt(c, 10) ^ window.crypto.getRandomValues(new Uint32Array(1))[0] & 15 >> parseInt(c, 10) / 4).toString(16) -); -async function isExists(p) { - try { - const res = await FileClient.getInstanceApi().fileApi.getFile(p); - return res !== null; - } catch { - return false; - } -} -let Error$1 = class Error2 { - constructor(message) { - this.message = message; - } -}; -class Warning { - constructor(message) { - this.message = message; - } -} -const showErrorMessage = (message, timeout) => new Notification({ type: "error", message, timeout }).show(); -const getLogger = (name2) => factory.getLogger(name2); -const langs = { - zh_CN, - en_US -}; -const _ = (v) => { - return langs[window.siyuan.config.lang][v] || "not defined"; -}; -var NAMED_TAG = "named"; -var NAME_TAG = "name"; -var UNMANAGED_TAG = "unmanaged"; -var OPTIONAL_TAG = "optional"; -var INJECT_TAG = "inject"; -var MULTI_INJECT_TAG = "multi_inject"; -var TAGGED = "inversify:tagged"; -var TAGGED_PROP = "inversify:tagged_props"; -var PARAM_TYPES = "inversify:paramtypes"; -var DESIGN_PARAM_TYPES = "design:paramtypes"; -var POST_CONSTRUCT = "post_construct"; -var PRE_DESTROY = "pre_destroy"; -function getNonCustomTagKeys() { - return [ - INJECT_TAG, - MULTI_INJECT_TAG, - NAME_TAG, - UNMANAGED_TAG, - NAMED_TAG, - OPTIONAL_TAG - ]; -} -var NON_CUSTOM_TAG_KEYS = getNonCustomTagKeys(); -var BindingScopeEnum = { - Request: "Request", - Singleton: "Singleton", - Transient: "Transient" -}; -var BindingTypeEnum = { - ConstantValue: "ConstantValue", - Constructor: "Constructor", - DynamicValue: "DynamicValue", - Factory: "Factory", - Function: "Function", - Instance: "Instance", - Invalid: "Invalid", - Provider: "Provider" -}; -var TargetTypeEnum = { - ClassProperty: "ClassProperty", - ConstructorArgument: "ConstructorArgument", - Variable: "Variable" -}; -var idCounter = 0; -function id() { - return idCounter++; -} -var Binding = function() { - function Binding2(serviceIdentifier, scope) { - this.id = id(); - this.activated = false; - this.serviceIdentifier = serviceIdentifier; - this.scope = scope; - this.type = BindingTypeEnum.Invalid; - this.constraint = function(request2) { - return true; - }; - this.implementationType = null; - this.cache = null; - this.factory = null; - this.provider = null; - this.onActivation = null; - this.onDeactivation = null; - this.dynamicValue = null; - } - Binding2.prototype.clone = function() { - var clone = new Binding2(this.serviceIdentifier, this.scope); - clone.activated = clone.scope === BindingScopeEnum.Singleton ? this.activated : false; - clone.implementationType = this.implementationType; - clone.dynamicValue = this.dynamicValue; - clone.scope = this.scope; - clone.type = this.type; - clone.factory = this.factory; - clone.provider = this.provider; - clone.constraint = this.constraint; - clone.onActivation = this.onActivation; - clone.onDeactivation = this.onDeactivation; - clone.cache = this.cache; - return clone; - }; - return Binding2; -}(); -var DUPLICATED_INJECTABLE_DECORATOR = "Cannot apply @injectable decorator multiple times."; -var DUPLICATED_METADATA = "Metadata key was used more than once in a parameter:"; -var NULL_ARGUMENT = "NULL argument"; -var KEY_NOT_FOUND = "Key Not Found"; -var AMBIGUOUS_MATCH = "Ambiguous match found for serviceIdentifier:"; -var CANNOT_UNBIND = "Could not unbind serviceIdentifier:"; -var NOT_REGISTERED = "No matching bindings found for serviceIdentifier:"; -var MISSING_INJECTABLE_ANNOTATION = "Missing required @injectable annotation in:"; -var MISSING_INJECT_ANNOTATION = "Missing required @inject or @multiInject annotation in:"; -var UNDEFINED_INJECT_ANNOTATION = function(name2) { - return "@inject called with undefined this could mean that the class " + name2 + " has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."; -}; -var CIRCULAR_DEPENDENCY = "Circular dependency found:"; -var INVALID_BINDING_TYPE = "Invalid binding type:"; -var NO_MORE_SNAPSHOTS_AVAILABLE = "No snapshot available to restore."; -var INVALID_MIDDLEWARE_RETURN = "Invalid return type in middleware. Middleware must return!"; -var INVALID_FUNCTION_BINDING = "Value provided to function binding must be a function!"; -var LAZY_IN_SYNC = function(key) { - return "You are attempting to construct '" + key + "' in a synchronous way\n but it has asynchronous dependencies."; -}; -var INVALID_TO_SELF_VALUE = "The toSelf function can only be applied when a constructor is used as service identifier"; -var INVALID_DECORATOR_OPERATION = "The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property."; -var ARGUMENTS_LENGTH_MISMATCH = function() { - var values = []; - for (var _i = 0; _i < arguments.length; _i++) { - values[_i] = arguments[_i]; - } - return "The number of constructor arguments in the derived class " + (values[0] + " must be >= than the number of constructor arguments of its base class."); -}; -var CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = "Invalid Container constructor argument. Container options must be an object."; -var CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = "Invalid Container option. Default scope must be a string ('singleton' or 'transient')."; -var CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = "Invalid Container option. Auto bind injectable must be a boolean"; -var CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = "Invalid Container option. Skip base check must be a boolean"; -var ASYNC_UNBIND_REQUIRED = "Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)"; -var POST_CONSTRUCT_ERROR = function(clazz, errorMessage) { - return "@postConstruct error in class " + clazz + ": " + errorMessage; -}; -var PRE_DESTROY_ERROR = function(clazz, errorMessage) { - return "@preDestroy error in class " + clazz + ": " + errorMessage; -}; -var ON_DEACTIVATION_ERROR = function(clazz, errorMessage) { - return "onDeactivation() error in class " + clazz + ": " + errorMessage; -}; -var CIRCULAR_DEPENDENCY_IN_FACTORY = function(factoryType, serviceIdentifier) { - return "It looks like there is a circular dependency in one of the '" + factoryType + "' bindings. Please investigate bindings with" + ("service identifier '" + serviceIdentifier + "'."); -}; -var STACK_OVERFLOW = "Maximum call stack size exceeded"; -var MetadataReader = function() { - function MetadataReader2() { - } - MetadataReader2.prototype.getConstructorMetadata = function(constructorFunc) { - var compilerGeneratedMetadata = Reflect.getMetadata(PARAM_TYPES, constructorFunc); - var userGeneratedMetadata = Reflect.getMetadata(TAGGED, constructorFunc); - return { - compilerGeneratedMetadata, - userGeneratedMetadata: userGeneratedMetadata || {} - }; - }; - MetadataReader2.prototype.getPropertiesMetadata = function(constructorFunc) { - var userGeneratedMetadata = Reflect.getMetadata(TAGGED_PROP, constructorFunc) || []; - return userGeneratedMetadata; - }; - return MetadataReader2; -}(); -var BindingCount = { - MultipleBindingsAvailable: 2, - NoBindingsAvailable: 0, - OnlyOneBindingAvailable: 1 -}; -function isStackOverflowExeption(error2) { - return error2 instanceof RangeError || error2.message === STACK_OVERFLOW; -} -var tryAndThrowErrorIfStackOverflow = function(fn, errorCallback) { - try { - return fn(); - } catch (error2) { - if (isStackOverflowExeption(error2)) { - error2 = errorCallback(); - } - throw error2; - } -}; -function getServiceIdentifierAsString(serviceIdentifier) { - if (typeof serviceIdentifier === "function") { - var _serviceIdentifier = serviceIdentifier; - return _serviceIdentifier.name; - } else if (typeof serviceIdentifier === "symbol") { - return serviceIdentifier.toString(); - } else { - var _serviceIdentifier = serviceIdentifier; - return _serviceIdentifier; - } -} -function listRegisteredBindingsForServiceIdentifier(container2, serviceIdentifier, getBindings2) { - var registeredBindingsList = ""; - var registeredBindings = getBindings2(container2, serviceIdentifier); - if (registeredBindings.length !== 0) { - registeredBindingsList = "\nRegistered bindings:"; - registeredBindings.forEach(function(binding) { - var name2 = "Object"; - if (binding.implementationType !== null) { - name2 = getFunctionName(binding.implementationType); - } - registeredBindingsList = registeredBindingsList + "\n " + name2; - if (binding.constraint.metaData) { - registeredBindingsList = registeredBindingsList + " - " + binding.constraint.metaData; - } - }); - } - return registeredBindingsList; -} -function alreadyDependencyChain(request2, serviceIdentifier) { - if (request2.parentRequest === null) { - return false; - } else if (request2.parentRequest.serviceIdentifier === serviceIdentifier) { - return true; - } else { - return alreadyDependencyChain(request2.parentRequest, serviceIdentifier); - } -} -function dependencyChainToString(request2) { - function _createStringArr(req, result) { - if (result === void 0) { - result = []; - } - var serviceIdentifier = getServiceIdentifierAsString(req.serviceIdentifier); - result.push(serviceIdentifier); - if (req.parentRequest !== null) { - return _createStringArr(req.parentRequest, result); - } - return result; - } - var stringArr = _createStringArr(request2); - return stringArr.reverse().join(" --> "); -} -function circularDependencyToException(request2) { - request2.childRequests.forEach(function(childRequest) { - if (alreadyDependencyChain(childRequest, childRequest.serviceIdentifier)) { - var services = dependencyChainToString(childRequest); - throw new Error(CIRCULAR_DEPENDENCY + " " + services); - } else { - circularDependencyToException(childRequest); - } - }); -} -function listMetadataForTarget(serviceIdentifierString, target) { - if (target.isTagged() || target.isNamed()) { - var m_1 = ""; - var namedTag = target.getNamedTag(); - var otherTags = target.getCustomTags(); - if (namedTag !== null) { - m_1 += namedTag.toString() + "\n"; - } - if (otherTags !== null) { - otherTags.forEach(function(tag) { - m_1 += tag.toString() + "\n"; - }); - } - return " " + serviceIdentifierString + "\n " + serviceIdentifierString + " - " + m_1; - } else { - return " " + serviceIdentifierString; - } -} -function getFunctionName(func) { - if (func.name) { - return func.name; - } else { - var name_1 = func.toString(); - var match = name_1.match(/^function\s*([^\s(]+)/); - return match ? match[1] : "Anonymous function: " + name_1; - } -} -function getSymbolDescription(symbol) { - return symbol.toString().slice(7, -1); -} -var Context = function() { - function Context2(container2) { - this.id = id(); - this.container = container2; - } - Context2.prototype.addPlan = function(plan2) { - this.plan = plan2; - }; - Context2.prototype.setCurrentRequest = function(currentRequest) { - this.currentRequest = currentRequest; - }; - return Context2; -}(); -var Metadata = function() { - function Metadata2(key, value) { - this.key = key; - this.value = value; - } - Metadata2.prototype.toString = function() { - if (this.key === NAMED_TAG) { - return "named: " + String(this.value).toString() + " "; - } else { - return "tagged: { key:" + this.key.toString() + ", value: " + String(this.value) + " }"; - } - }; - return Metadata2; -}(); -var Plan = function() { - function Plan2(parentContext, rootRequest) { - this.parentContext = parentContext; - this.rootRequest = rootRequest; - } - return Plan2; -}(); -var LazyServiceIdentifer = function() { - function LazyServiceIdentifer2(cb) { - this._cb = cb; - } - LazyServiceIdentifer2.prototype.unwrap = function() { - return this._cb(); - }; - return LazyServiceIdentifer2; -}(); -var QueryableString = function() { - function QueryableString2(str) { - this.str = str; - } - QueryableString2.prototype.startsWith = function(searchString) { - return this.str.indexOf(searchString) === 0; - }; - QueryableString2.prototype.endsWith = function(searchString) { - var reverseString = ""; - var reverseSearchString = searchString.split("").reverse().join(""); - reverseString = this.str.split("").reverse().join(""); - return this.startsWith.call({ str: reverseString }, reverseSearchString); - }; - QueryableString2.prototype.contains = function(searchString) { - return this.str.indexOf(searchString) !== -1; - }; - QueryableString2.prototype.equals = function(compareString) { - return this.str === compareString; - }; - QueryableString2.prototype.value = function() { - return this.str; - }; - return QueryableString2; -}(); -var Target = function() { - function Target2(type, identifier, serviceIdentifier, namedOrTagged) { - this.id = id(); - this.type = type; - this.serviceIdentifier = serviceIdentifier; - var queryableName = typeof identifier === "symbol" ? getSymbolDescription(identifier) : identifier; - this.name = new QueryableString(queryableName || ""); - this.identifier = identifier; - this.metadata = new Array(); - var metadataItem = null; - if (typeof namedOrTagged === "string") { - metadataItem = new Metadata(NAMED_TAG, namedOrTagged); - } else if (namedOrTagged instanceof Metadata) { - metadataItem = namedOrTagged; - } - if (metadataItem !== null) { - this.metadata.push(metadataItem); - } - } - Target2.prototype.hasTag = function(key) { - for (var _i = 0, _a2 = this.metadata; _i < _a2.length; _i++) { - var m = _a2[_i]; - if (m.key === key) { - return true; - } - } - return false; - }; - Target2.prototype.isArray = function() { - return this.hasTag(MULTI_INJECT_TAG); - }; - Target2.prototype.matchesArray = function(name2) { - return this.matchesTag(MULTI_INJECT_TAG)(name2); - }; - Target2.prototype.isNamed = function() { - return this.hasTag(NAMED_TAG); - }; - Target2.prototype.isTagged = function() { - return this.metadata.some(function(metadata) { - return NON_CUSTOM_TAG_KEYS.every(function(key) { - return metadata.key !== key; - }); - }); - }; - Target2.prototype.isOptional = function() { - return this.matchesTag(OPTIONAL_TAG)(true); - }; - Target2.prototype.getNamedTag = function() { - if (this.isNamed()) { - return this.metadata.filter(function(m) { - return m.key === NAMED_TAG; - })[0]; - } - return null; - }; - Target2.prototype.getCustomTags = function() { - if (this.isTagged()) { - return this.metadata.filter(function(metadata) { - return NON_CUSTOM_TAG_KEYS.every(function(key) { - return metadata.key !== key; - }); - }); - } else { - return null; - } - }; - Target2.prototype.matchesNamedTag = function(name2) { - return this.matchesTag(NAMED_TAG)(name2); - }; - Target2.prototype.matchesTag = function(key) { - var _this = this; - return function(value) { - for (var _i = 0, _a2 = _this.metadata; _i < _a2.length; _i++) { - var m = _a2[_i]; - if (m.key === key && m.value === value) { - return true; - } - } - return false; - }; - }; - return Target2; -}(); -var __spreadArray$2 = globalThis && globalThis.__spreadArray || function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -function getDependencies(metadataReader, func) { - var constructorName = getFunctionName(func); - return getTargets(metadataReader, constructorName, func, false); -} -function getTargets(metadataReader, constructorName, func, isBaseClass) { - var metadata = metadataReader.getConstructorMetadata(func); - var serviceIdentifiers = metadata.compilerGeneratedMetadata; - if (serviceIdentifiers === void 0) { - var msg = MISSING_INJECTABLE_ANNOTATION + " " + constructorName + "."; - throw new Error(msg); - } - var constructorArgsMetadata = metadata.userGeneratedMetadata; - var keys = Object.keys(constructorArgsMetadata); - var hasUserDeclaredUnknownInjections = func.length === 0 && keys.length > 0; - var hasOptionalParameters = keys.length > func.length; - var iterations = hasUserDeclaredUnknownInjections || hasOptionalParameters ? keys.length : func.length; - var constructorTargets = getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations); - var propertyTargets = getClassPropsAsTargets(metadataReader, func, constructorName); - var targets = __spreadArray$2(__spreadArray$2([], constructorTargets, true), propertyTargets, true); - return targets; -} -function getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata) { - var targetMetadata = constructorArgsMetadata[index.toString()] || []; - var metadata = formatTargetMetadata(targetMetadata); - var isManaged = metadata.unmanaged !== true; - var serviceIdentifier = serviceIdentifiers[index]; - var injectIdentifier = metadata.inject || metadata.multiInject; - serviceIdentifier = injectIdentifier ? injectIdentifier : serviceIdentifier; - if (serviceIdentifier instanceof LazyServiceIdentifer) { - serviceIdentifier = serviceIdentifier.unwrap(); - } - if (isManaged) { - var isObject2 = serviceIdentifier === Object; - var isFunction2 = serviceIdentifier === Function; - var isUndefined2 = serviceIdentifier === void 0; - var isUnknownType = isObject2 || isFunction2 || isUndefined2; - if (!isBaseClass && isUnknownType) { - var msg = MISSING_INJECT_ANNOTATION + " argument " + index + " in class " + constructorName + "."; - throw new Error(msg); - } - var target = new Target(TargetTypeEnum.ConstructorArgument, metadata.targetName, serviceIdentifier); - target.metadata = targetMetadata; - return target; - } - return null; -} -function getConstructorArgsAsTargets(isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata, iterations) { - var targets = []; - for (var i = 0; i < iterations; i++) { - var index = i; - var target = getConstructorArgsAsTarget(index, isBaseClass, constructorName, serviceIdentifiers, constructorArgsMetadata); - if (target !== null) { - targets.push(target); - } - } - return targets; -} -function _getServiceIdentifierForProperty(inject2, multiInject, propertyName, className) { - var serviceIdentifier = inject2 || multiInject; - if (serviceIdentifier === void 0) { - var msg = MISSING_INJECTABLE_ANNOTATION + " for property " + String(propertyName) + " in class " + className + "."; - throw new Error(msg); - } - return serviceIdentifier; -} -function getClassPropsAsTargets(metadataReader, constructorFunc, constructorName) { - var classPropsMetadata = metadataReader.getPropertiesMetadata(constructorFunc); - var targets = []; - var symbolKeys = Object.getOwnPropertySymbols(classPropsMetadata); - var stringKeys = Object.keys(classPropsMetadata); - var keys = stringKeys.concat(symbolKeys); - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var targetMetadata = classPropsMetadata[key]; - var metadata = formatTargetMetadata(targetMetadata); - var identifier = metadata.targetName || key; - var serviceIdentifier = _getServiceIdentifierForProperty(metadata.inject, metadata.multiInject, key, constructorName); - var target = new Target(TargetTypeEnum.ClassProperty, identifier, serviceIdentifier); - target.metadata = targetMetadata; - targets.push(target); - } - var baseConstructor = Object.getPrototypeOf(constructorFunc.prototype).constructor; - if (baseConstructor !== Object) { - var baseTargets = getClassPropsAsTargets(metadataReader, baseConstructor, constructorName); - targets = __spreadArray$2(__spreadArray$2([], targets, true), baseTargets, true); - } - return targets; -} -function getBaseClassDependencyCount(metadataReader, func) { - var baseConstructor = Object.getPrototypeOf(func.prototype).constructor; - if (baseConstructor !== Object) { - var baseConstructorName = getFunctionName(baseConstructor); - var targets = getTargets(metadataReader, baseConstructorName, baseConstructor, true); - var metadata = targets.map(function(t2) { - return t2.metadata.filter(function(m) { - return m.key === UNMANAGED_TAG; - }); - }); - var unmanagedCount = [].concat.apply([], metadata).length; - var dependencyCount = targets.length - unmanagedCount; - if (dependencyCount > 0) { - return dependencyCount; - } else { - return getBaseClassDependencyCount(metadataReader, baseConstructor); - } - } else { - return 0; - } -} -function formatTargetMetadata(targetMetadata) { - var targetMetadataMap = {}; - targetMetadata.forEach(function(m) { - targetMetadataMap[m.key.toString()] = m.value; - }); - return { - inject: targetMetadataMap[INJECT_TAG], - multiInject: targetMetadataMap[MULTI_INJECT_TAG], - targetName: targetMetadataMap[NAME_TAG], - unmanaged: targetMetadataMap[UNMANAGED_TAG] - }; -} -var Request = function() { - function Request2(serviceIdentifier, parentContext, parentRequest, bindings, target) { - this.id = id(); - this.serviceIdentifier = serviceIdentifier; - this.parentContext = parentContext; - this.parentRequest = parentRequest; - this.target = target; - this.childRequests = []; - this.bindings = Array.isArray(bindings) ? bindings : [bindings]; - this.requestScope = parentRequest === null ? /* @__PURE__ */ new Map() : null; - } - Request2.prototype.addChildRequest = function(serviceIdentifier, bindings, target) { - var child = new Request2(serviceIdentifier, this.parentContext, this, bindings, target); - this.childRequests.push(child); - return child; - }; - return Request2; -}(); -function getBindingDictionary(cntnr) { - return cntnr._bindingDictionary; -} -function _createTarget(isMultiInject, targetType, serviceIdentifier, name2, key, value) { - var metadataKey = isMultiInject ? MULTI_INJECT_TAG : INJECT_TAG; - var injectMetadata = new Metadata(metadataKey, serviceIdentifier); - var target = new Target(targetType, name2, serviceIdentifier, injectMetadata); - if (key !== void 0) { - var tagMetadata = new Metadata(key, value); - target.metadata.push(tagMetadata); - } - return target; -} -function _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target) { - var bindings = getBindings(context.container, target.serviceIdentifier); - var activeBindings = []; - if (bindings.length === BindingCount.NoBindingsAvailable && context.container.options.autoBindInjectable && typeof target.serviceIdentifier === "function" && metadataReader.getConstructorMetadata(target.serviceIdentifier).compilerGeneratedMetadata) { - context.container.bind(target.serviceIdentifier).toSelf(); - bindings = getBindings(context.container, target.serviceIdentifier); - } - if (!avoidConstraints) { - activeBindings = bindings.filter(function(binding) { - var request2 = new Request(binding.serviceIdentifier, context, parentRequest, binding, target); - return binding.constraint(request2); - }); - } else { - activeBindings = bindings; - } - _validateActiveBindingCount(target.serviceIdentifier, activeBindings, target, context.container); - return activeBindings; -} -function _validateActiveBindingCount(serviceIdentifier, bindings, target, container2) { - switch (bindings.length) { - case BindingCount.NoBindingsAvailable: - if (target.isOptional()) { - return bindings; - } else { - var serviceIdentifierString = getServiceIdentifierAsString(serviceIdentifier); - var msg = NOT_REGISTERED; - msg += listMetadataForTarget(serviceIdentifierString, target); - msg += listRegisteredBindingsForServiceIdentifier(container2, serviceIdentifierString, getBindings); - throw new Error(msg); - } - case BindingCount.OnlyOneBindingAvailable: - return bindings; - case BindingCount.MultipleBindingsAvailable: - default: - if (!target.isArray()) { - var serviceIdentifierString = getServiceIdentifierAsString(serviceIdentifier); - var msg = AMBIGUOUS_MATCH + " " + serviceIdentifierString; - msg += listRegisteredBindingsForServiceIdentifier(container2, serviceIdentifierString, getBindings); - throw new Error(msg); - } else { - return bindings; - } - } -} -function _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, parentRequest, target) { - var activeBindings; - var childRequest; - if (parentRequest === null) { - activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, null, target); - childRequest = new Request(serviceIdentifier, context, null, activeBindings, target); - var thePlan = new Plan(context, childRequest); - context.addPlan(thePlan); - } else { - activeBindings = _getActiveBindings(metadataReader, avoidConstraints, context, parentRequest, target); - childRequest = parentRequest.addChildRequest(target.serviceIdentifier, activeBindings, target); - } - activeBindings.forEach(function(binding) { - var subChildRequest = null; - if (target.isArray()) { - subChildRequest = childRequest.addChildRequest(binding.serviceIdentifier, binding, target); - } else { - if (binding.cache) { - return; - } - subChildRequest = childRequest; - } - if (binding.type === BindingTypeEnum.Instance && binding.implementationType !== null) { - var dependencies = getDependencies(metadataReader, binding.implementationType); - if (!context.container.options.skipBaseClassChecks) { - var baseClassDependencyCount = getBaseClassDependencyCount(metadataReader, binding.implementationType); - if (dependencies.length < baseClassDependencyCount) { - var error2 = ARGUMENTS_LENGTH_MISMATCH(getFunctionName(binding.implementationType)); - throw new Error(error2); - } - } - dependencies.forEach(function(dependency) { - _createSubRequests(metadataReader, false, dependency.serviceIdentifier, context, subChildRequest, dependency); - }); - } - }); -} -function getBindings(container2, serviceIdentifier) { - var bindings = []; - var bindingDictionary = getBindingDictionary(container2); - if (bindingDictionary.hasKey(serviceIdentifier)) { - bindings = bindingDictionary.get(serviceIdentifier); - } else if (container2.parent !== null) { - bindings = getBindings(container2.parent, serviceIdentifier); - } - return bindings; -} -function plan(metadataReader, container2, isMultiInject, targetType, serviceIdentifier, key, value, avoidConstraints) { - if (avoidConstraints === void 0) { - avoidConstraints = false; - } - var context = new Context(container2); - var target = _createTarget(isMultiInject, targetType, serviceIdentifier, "", key, value); - try { - _createSubRequests(metadataReader, avoidConstraints, serviceIdentifier, context, null, target); - return context; - } catch (error2) { - if (isStackOverflowExeption(error2)) { - circularDependencyToException(context.plan.rootRequest); - } - throw error2; - } -} -function createMockRequest(container2, serviceIdentifier, key, value) { - var target = new Target(TargetTypeEnum.Variable, "", serviceIdentifier, new Metadata(key, value)); - var context = new Context(container2); - var request2 = new Request(serviceIdentifier, context, null, [], target); - return request2; -} -function isPromise(object) { - var isObjectOrFunction = typeof object === "object" && object !== null || typeof object === "function"; - return isObjectOrFunction && typeof object.then === "function"; -} -function isPromiseOrContainsPromise(object) { - if (isPromise(object)) { - return true; - } - return Array.isArray(object) && object.some(isPromise); -} -var __awaiter$3 = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P2, generator) { - function adopt(value) { - return value instanceof P2 ? value : new P2(function(resolve2) { - resolve2(value); - }); - } - return new (P2 || (P2 = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator$3 = globalThis && globalThis.__generator || function(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f, y, t2, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_2) - try { - if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t2 = _2.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t2[1]) { - _2.label = t2[1]; - t2 = op; - break; - } - if (t2 && _2.label < t2[2]) { - _2.label = t2[2]; - _2.ops.push(op); - break; - } - if (t2[2]) - _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var tryGetFromScope = function(requestScope, binding) { - if (binding.scope === BindingScopeEnum.Singleton && binding.activated) { - return binding.cache; - } - if (binding.scope === BindingScopeEnum.Request && requestScope.has(binding.id)) { - return requestScope.get(binding.id); - } - return null; -}; -var saveToScope = function(requestScope, binding, result) { - if (binding.scope === BindingScopeEnum.Singleton) { - _saveToSingletonScope(binding, result); - } - if (binding.scope === BindingScopeEnum.Request) { - _saveToRequestScope(requestScope, binding, result); - } -}; -var _saveToRequestScope = function(requestScope, binding, result) { - if (!requestScope.has(binding.id)) { - requestScope.set(binding.id, result); - } -}; -var _saveToSingletonScope = function(binding, result) { - binding.cache = result; - binding.activated = true; - if (isPromise(result)) { - void _saveAsyncResultToSingletonScope(binding, result); - } -}; -var _saveAsyncResultToSingletonScope = function(binding, asyncResult) { - return __awaiter$3(void 0, void 0, void 0, function() { - var result, ex_1; - return __generator$3(this, function(_a2) { - switch (_a2.label) { - case 0: - _a2.trys.push([0, 2, , 3]); - return [4, asyncResult]; - case 1: - result = _a2.sent(); - binding.cache = result; - return [3, 3]; - case 2: - ex_1 = _a2.sent(); - binding.cache = null; - binding.activated = false; - throw ex_1; - case 3: - return [2]; - } - }); - }); -}; -var FactoryType; -(function(FactoryType2) { - FactoryType2["DynamicValue"] = "toDynamicValue"; - FactoryType2["Factory"] = "toFactory"; - FactoryType2["Provider"] = "toProvider"; -})(FactoryType || (FactoryType = {})); -var ensureFullyBound = function(binding) { - var boundValue = null; - switch (binding.type) { - case BindingTypeEnum.ConstantValue: - case BindingTypeEnum.Function: - boundValue = binding.cache; - break; - case BindingTypeEnum.Constructor: - case BindingTypeEnum.Instance: - boundValue = binding.implementationType; - break; - case BindingTypeEnum.DynamicValue: - boundValue = binding.dynamicValue; - break; - case BindingTypeEnum.Provider: - boundValue = binding.provider; - break; - case BindingTypeEnum.Factory: - boundValue = binding.factory; - break; - } - if (boundValue === null) { - var serviceIdentifierAsString = getServiceIdentifierAsString(binding.serviceIdentifier); - throw new Error(INVALID_BINDING_TYPE + " " + serviceIdentifierAsString); - } -}; -var getFactoryDetails = function(binding) { - switch (binding.type) { - case BindingTypeEnum.Factory: - return { factory: binding.factory, factoryType: FactoryType.Factory }; - case BindingTypeEnum.Provider: - return { factory: binding.provider, factoryType: FactoryType.Provider }; - case BindingTypeEnum.DynamicValue: - return { factory: binding.dynamicValue, factoryType: FactoryType.DynamicValue }; - default: - throw new Error("Unexpected factory type " + binding.type); - } -}; -var __assign$1 = globalThis && globalThis.__assign || function() { - __assign$1 = Object.assign || function(t2) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t2[p] = s[p]; - } - return t2; - }; - return __assign$1.apply(this, arguments); -}; -var __awaiter$2 = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P2, generator) { - function adopt(value) { - return value instanceof P2 ? value : new P2(function(resolve2) { - resolve2(value); - }); - } - return new (P2 || (P2 = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator$2 = globalThis && globalThis.__generator || function(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f, y, t2, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_2) - try { - if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t2 = _2.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t2[1]) { - _2.label = t2[1]; - t2 = op; - break; - } - if (t2 && _2.label < t2[2]) { - _2.label = t2[2]; - _2.ops.push(op); - break; - } - if (t2[2]) - _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArray$1 = globalThis && globalThis.__spreadArray || function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -function _resolveRequests(childRequests, resolveRequest) { - return childRequests.reduce(function(resolvedRequests, childRequest) { - var injection = resolveRequest(childRequest); - var targetType = childRequest.target.type; - if (targetType === TargetTypeEnum.ConstructorArgument) { - resolvedRequests.constructorInjections.push(injection); - } else { - resolvedRequests.propertyRequests.push(childRequest); - resolvedRequests.propertyInjections.push(injection); - } - if (!resolvedRequests.isAsync) { - resolvedRequests.isAsync = isPromiseOrContainsPromise(injection); - } - return resolvedRequests; - }, { constructorInjections: [], propertyInjections: [], propertyRequests: [], isAsync: false }); -} -function _createInstance(constr, childRequests, resolveRequest) { - var result; - if (childRequests.length > 0) { - var resolved = _resolveRequests(childRequests, resolveRequest); - var createInstanceWithInjectionsArg = __assign$1(__assign$1({}, resolved), { constr }); - if (resolved.isAsync) { - result = createInstanceWithInjectionsAsync(createInstanceWithInjectionsArg); - } else { - result = createInstanceWithInjections(createInstanceWithInjectionsArg); - } - } else { - result = new constr(); - } - return result; -} -function createInstanceWithInjections(args) { - var _a2; - var instance2 = new ((_a2 = args.constr).bind.apply(_a2, __spreadArray$1([void 0], args.constructorInjections, false)))(); - args.propertyRequests.forEach(function(r, index) { - var property = r.target.identifier; - var injection = args.propertyInjections[index]; - instance2[property] = injection; - }); - return instance2; -} -function createInstanceWithInjectionsAsync(args) { - return __awaiter$2(this, void 0, void 0, function() { - var constructorInjections, propertyInjections; - return __generator$2(this, function(_a2) { - switch (_a2.label) { - case 0: - return [4, possiblyWaitInjections(args.constructorInjections)]; - case 1: - constructorInjections = _a2.sent(); - return [4, possiblyWaitInjections(args.propertyInjections)]; - case 2: - propertyInjections = _a2.sent(); - return [2, createInstanceWithInjections(__assign$1(__assign$1({}, args), { constructorInjections, propertyInjections }))]; - } - }); - }); -} -function possiblyWaitInjections(possiblePromiseinjections) { - return __awaiter$2(this, void 0, void 0, function() { - var injections, _i, possiblePromiseinjections_1, injection; - return __generator$2(this, function(_a2) { - injections = []; - for (_i = 0, possiblePromiseinjections_1 = possiblePromiseinjections; _i < possiblePromiseinjections_1.length; _i++) { - injection = possiblePromiseinjections_1[_i]; - if (Array.isArray(injection)) { - injections.push(Promise.all(injection)); - } else { - injections.push(injection); - } - } - return [2, Promise.all(injections)]; - }); - }); -} -function _getInstanceAfterPostConstruct(constr, result) { - var postConstructResult = _postConstruct(constr, result); - if (isPromise(postConstructResult)) { - return postConstructResult.then(function() { - return result; - }); - } else { - return result; - } -} -function _postConstruct(constr, instance2) { - var _a2, _b; - if (Reflect.hasMetadata(POST_CONSTRUCT, constr)) { - var data = Reflect.getMetadata(POST_CONSTRUCT, constr); - try { - return (_b = (_a2 = instance2)[data.value]) === null || _b === void 0 ? void 0 : _b.call(_a2); - } catch (e) { - throw new Error(POST_CONSTRUCT_ERROR(constr.name, e.message)); - } - } -} -function _validateInstanceResolution(binding, constr) { - if (binding.scope !== BindingScopeEnum.Singleton) { - _throwIfHandlingDeactivation(binding, constr); - } -} -function _throwIfHandlingDeactivation(binding, constr) { - var scopeErrorMessage = "Class cannot be instantiated in " + (binding.scope === BindingScopeEnum.Request ? "request" : "transient") + " scope."; - if (typeof binding.onDeactivation === "function") { - throw new Error(ON_DEACTIVATION_ERROR(constr.name, scopeErrorMessage)); - } - if (Reflect.hasMetadata(PRE_DESTROY, constr)) { - throw new Error(PRE_DESTROY_ERROR(constr.name, scopeErrorMessage)); - } -} -function resolveInstance(binding, constr, childRequests, resolveRequest) { - _validateInstanceResolution(binding, constr); - var result = _createInstance(constr, childRequests, resolveRequest); - if (isPromise(result)) { - return result.then(function(resolvedResult) { - return _getInstanceAfterPostConstruct(constr, resolvedResult); - }); - } else { - return _getInstanceAfterPostConstruct(constr, result); - } -} -var __awaiter$1 = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P2, generator) { - function adopt(value) { - return value instanceof P2 ? value : new P2(function(resolve2) { - resolve2(value); - }); - } - return new (P2 || (P2 = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator$1 = globalThis && globalThis.__generator || function(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f, y, t2, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_2) - try { - if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t2 = _2.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t2[1]) { - _2.label = t2[1]; - t2 = op; - break; - } - if (t2 && _2.label < t2[2]) { - _2.label = t2[2]; - _2.ops.push(op); - break; - } - if (t2[2]) - _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var _resolveRequest = function(requestScope) { - return function(request2) { - request2.parentContext.setCurrentRequest(request2); - var bindings = request2.bindings; - var childRequests = request2.childRequests; - var targetIsAnArray = request2.target && request2.target.isArray(); - var targetParentIsNotAnArray = !request2.parentRequest || !request2.parentRequest.target || !request2.target || !request2.parentRequest.target.matchesArray(request2.target.serviceIdentifier); - if (targetIsAnArray && targetParentIsNotAnArray) { - return childRequests.map(function(childRequest) { - var _f = _resolveRequest(requestScope); - return _f(childRequest); - }); - } else { - if (request2.target.isOptional() && bindings.length === 0) { - return void 0; - } - var binding = bindings[0]; - return _resolveBinding(requestScope, request2, binding); - } - }; -}; -var _resolveFactoryFromBinding = function(binding, context) { - var factoryDetails = getFactoryDetails(binding); - return tryAndThrowErrorIfStackOverflow(function() { - return factoryDetails.factory.bind(binding)(context); - }, function() { - return new Error(CIRCULAR_DEPENDENCY_IN_FACTORY(factoryDetails.factoryType, context.currentRequest.serviceIdentifier.toString())); - }); -}; -var _getResolvedFromBinding = function(requestScope, request2, binding) { - var result; - var childRequests = request2.childRequests; - ensureFullyBound(binding); - switch (binding.type) { - case BindingTypeEnum.ConstantValue: - case BindingTypeEnum.Function: - result = binding.cache; - break; - case BindingTypeEnum.Constructor: - result = binding.implementationType; - break; - case BindingTypeEnum.Instance: - result = resolveInstance(binding, binding.implementationType, childRequests, _resolveRequest(requestScope)); - break; - default: - result = _resolveFactoryFromBinding(binding, request2.parentContext); - } - return result; -}; -var _resolveInScope = function(requestScope, binding, resolveFromBinding) { - var result = tryGetFromScope(requestScope, binding); - if (result !== null) { - return result; - } - result = resolveFromBinding(); - saveToScope(requestScope, binding, result); - return result; -}; -var _resolveBinding = function(requestScope, request2, binding) { - return _resolveInScope(requestScope, binding, function() { - var result = _getResolvedFromBinding(requestScope, request2, binding); - if (isPromise(result)) { - result = result.then(function(resolved) { - return _onActivation(request2, binding, resolved); - }); - } else { - result = _onActivation(request2, binding, result); - } - return result; - }); -}; -function _onActivation(request2, binding, resolved) { - var result = _bindingActivation(request2.parentContext, binding, resolved); - var containersIterator = _getContainersIterator(request2.parentContext.container); - var container2; - var containersIteratorResult = containersIterator.next(); - do { - container2 = containersIteratorResult.value; - var context_1 = request2.parentContext; - var serviceIdentifier = request2.serviceIdentifier; - var activationsIterator = _getContainerActivationsForService(container2, serviceIdentifier); - if (isPromise(result)) { - result = _activateContainerAsync(activationsIterator, context_1, result); - } else { - result = _activateContainer(activationsIterator, context_1, result); - } - containersIteratorResult = containersIterator.next(); - } while (containersIteratorResult.done !== true && !getBindingDictionary(container2).hasKey(request2.serviceIdentifier)); - return result; -} -var _bindingActivation = function(context, binding, previousResult) { - var result; - if (typeof binding.onActivation === "function") { - result = binding.onActivation(context, previousResult); - } else { - result = previousResult; - } - return result; -}; -var _activateContainer = function(activationsIterator, context, result) { - var activation = activationsIterator.next(); - while (!activation.done) { - result = activation.value(context, result); - if (isPromise(result)) { - return _activateContainerAsync(activationsIterator, context, result); - } - activation = activationsIterator.next(); - } - return result; -}; -var _activateContainerAsync = function(activationsIterator, context, resultPromise) { - return __awaiter$1(void 0, void 0, void 0, function() { - var result, activation; - return __generator$1(this, function(_a2) { - switch (_a2.label) { - case 0: - return [4, resultPromise]; - case 1: - result = _a2.sent(); - activation = activationsIterator.next(); - _a2.label = 2; - case 2: - if (!!activation.done) - return [3, 4]; - return [4, activation.value(context, result)]; - case 3: - result = _a2.sent(); - activation = activationsIterator.next(); - return [3, 2]; - case 4: - return [2, result]; - } - }); - }); -}; -var _getContainerActivationsForService = function(container2, serviceIdentifier) { - var activations = container2._activations; - return activations.hasKey(serviceIdentifier) ? activations.get(serviceIdentifier).values() : [].values(); -}; -var _getContainersIterator = function(container2) { - var containersStack = [container2]; - var parent = container2.parent; - while (parent !== null) { - containersStack.push(parent); - parent = parent.parent; - } - var getNextContainer = function() { - var nextContainer = containersStack.pop(); - if (nextContainer !== void 0) { - return { done: false, value: nextContainer }; - } else { - return { done: true, value: void 0 }; - } - }; - var containersIterator = { - next: getNextContainer - }; - return containersIterator; -}; -function resolve(context) { - var _f = _resolveRequest(context.plan.rootRequest.requestScope); - return _f(context.plan.rootRequest); -} -var traverseAncerstors = function(request2, constraint) { - var parent = request2.parentRequest; - if (parent !== null) { - return constraint(parent) ? true : traverseAncerstors(parent, constraint); - } else { - return false; - } -}; -var taggedConstraint = function(key) { - return function(value) { - var constraint = function(request2) { - return request2 !== null && request2.target !== null && request2.target.matchesTag(key)(value); - }; - constraint.metaData = new Metadata(key, value); - return constraint; - }; -}; -var namedConstraint = taggedConstraint(NAMED_TAG); -var typeConstraint = function(type) { - return function(request2) { - var binding = null; - if (request2 !== null) { - binding = request2.bindings[0]; - if (typeof type === "string") { - var serviceIdentifier = binding.serviceIdentifier; - return serviceIdentifier === type; - } else { - var constructor = request2.bindings[0].implementationType; - return type === constructor; - } - } - return false; - }; -}; -var BindingWhenSyntax = function() { - function BindingWhenSyntax2(binding) { - this._binding = binding; - } - BindingWhenSyntax2.prototype.when = function(constraint) { - this._binding.constraint = constraint; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenTargetNamed = function(name2) { - this._binding.constraint = namedConstraint(name2); - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenTargetIsDefault = function() { - this._binding.constraint = function(request2) { - if (request2 === null) { - return false; - } - var targetIsDefault = request2.target !== null && !request2.target.isNamed() && !request2.target.isTagged(); - return targetIsDefault; - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenTargetTagged = function(tag, value) { - this._binding.constraint = taggedConstraint(tag)(value); - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenInjectedInto = function(parent) { - this._binding.constraint = function(request2) { - return request2 !== null && typeConstraint(parent)(request2.parentRequest); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenParentNamed = function(name2) { - this._binding.constraint = function(request2) { - return request2 !== null && namedConstraint(name2)(request2.parentRequest); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenParentTagged = function(tag, value) { - this._binding.constraint = function(request2) { - return request2 !== null && taggedConstraint(tag)(value)(request2.parentRequest); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenAnyAncestorIs = function(ancestor) { - this._binding.constraint = function(request2) { - return request2 !== null && traverseAncerstors(request2, typeConstraint(ancestor)); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenNoAncestorIs = function(ancestor) { - this._binding.constraint = function(request2) { - return request2 !== null && !traverseAncerstors(request2, typeConstraint(ancestor)); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenAnyAncestorNamed = function(name2) { - this._binding.constraint = function(request2) { - return request2 !== null && traverseAncerstors(request2, namedConstraint(name2)); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenNoAncestorNamed = function(name2) { - this._binding.constraint = function(request2) { - return request2 !== null && !traverseAncerstors(request2, namedConstraint(name2)); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenAnyAncestorTagged = function(tag, value) { - this._binding.constraint = function(request2) { - return request2 !== null && traverseAncerstors(request2, taggedConstraint(tag)(value)); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenNoAncestorTagged = function(tag, value) { - this._binding.constraint = function(request2) { - return request2 !== null && !traverseAncerstors(request2, taggedConstraint(tag)(value)); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenAnyAncestorMatches = function(constraint) { - this._binding.constraint = function(request2) { - return request2 !== null && traverseAncerstors(request2, constraint); - }; - return new BindingOnSyntax(this._binding); - }; - BindingWhenSyntax2.prototype.whenNoAncestorMatches = function(constraint) { - this._binding.constraint = function(request2) { - return request2 !== null && !traverseAncerstors(request2, constraint); - }; - return new BindingOnSyntax(this._binding); - }; - return BindingWhenSyntax2; -}(); -var BindingOnSyntax = function() { - function BindingOnSyntax2(binding) { - this._binding = binding; - } - BindingOnSyntax2.prototype.onActivation = function(handler) { - this._binding.onActivation = handler; - return new BindingWhenSyntax(this._binding); - }; - BindingOnSyntax2.prototype.onDeactivation = function(handler) { - this._binding.onDeactivation = handler; - return new BindingWhenSyntax(this._binding); - }; - return BindingOnSyntax2; -}(); -var BindingWhenOnSyntax = function() { - function BindingWhenOnSyntax2(binding) { - this._binding = binding; - this._bindingWhenSyntax = new BindingWhenSyntax(this._binding); - this._bindingOnSyntax = new BindingOnSyntax(this._binding); - } - BindingWhenOnSyntax2.prototype.when = function(constraint) { - return this._bindingWhenSyntax.when(constraint); - }; - BindingWhenOnSyntax2.prototype.whenTargetNamed = function(name2) { - return this._bindingWhenSyntax.whenTargetNamed(name2); - }; - BindingWhenOnSyntax2.prototype.whenTargetIsDefault = function() { - return this._bindingWhenSyntax.whenTargetIsDefault(); - }; - BindingWhenOnSyntax2.prototype.whenTargetTagged = function(tag, value) { - return this._bindingWhenSyntax.whenTargetTagged(tag, value); - }; - BindingWhenOnSyntax2.prototype.whenInjectedInto = function(parent) { - return this._bindingWhenSyntax.whenInjectedInto(parent); - }; - BindingWhenOnSyntax2.prototype.whenParentNamed = function(name2) { - return this._bindingWhenSyntax.whenParentNamed(name2); - }; - BindingWhenOnSyntax2.prototype.whenParentTagged = function(tag, value) { - return this._bindingWhenSyntax.whenParentTagged(tag, value); - }; - BindingWhenOnSyntax2.prototype.whenAnyAncestorIs = function(ancestor) { - return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor); - }; - BindingWhenOnSyntax2.prototype.whenNoAncestorIs = function(ancestor) { - return this._bindingWhenSyntax.whenNoAncestorIs(ancestor); - }; - BindingWhenOnSyntax2.prototype.whenAnyAncestorNamed = function(name2) { - return this._bindingWhenSyntax.whenAnyAncestorNamed(name2); - }; - BindingWhenOnSyntax2.prototype.whenAnyAncestorTagged = function(tag, value) { - return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value); - }; - BindingWhenOnSyntax2.prototype.whenNoAncestorNamed = function(name2) { - return this._bindingWhenSyntax.whenNoAncestorNamed(name2); - }; - BindingWhenOnSyntax2.prototype.whenNoAncestorTagged = function(tag, value) { - return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value); - }; - BindingWhenOnSyntax2.prototype.whenAnyAncestorMatches = function(constraint) { - return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint); - }; - BindingWhenOnSyntax2.prototype.whenNoAncestorMatches = function(constraint) { - return this._bindingWhenSyntax.whenNoAncestorMatches(constraint); - }; - BindingWhenOnSyntax2.prototype.onActivation = function(handler) { - return this._bindingOnSyntax.onActivation(handler); - }; - BindingWhenOnSyntax2.prototype.onDeactivation = function(handler) { - return this._bindingOnSyntax.onDeactivation(handler); - }; - return BindingWhenOnSyntax2; -}(); -var BindingInSyntax = function() { - function BindingInSyntax2(binding) { - this._binding = binding; - } - BindingInSyntax2.prototype.inRequestScope = function() { - this._binding.scope = BindingScopeEnum.Request; - return new BindingWhenOnSyntax(this._binding); - }; - BindingInSyntax2.prototype.inSingletonScope = function() { - this._binding.scope = BindingScopeEnum.Singleton; - return new BindingWhenOnSyntax(this._binding); - }; - BindingInSyntax2.prototype.inTransientScope = function() { - this._binding.scope = BindingScopeEnum.Transient; - return new BindingWhenOnSyntax(this._binding); - }; - return BindingInSyntax2; -}(); -var BindingInWhenOnSyntax = function() { - function BindingInWhenOnSyntax2(binding) { - this._binding = binding; - this._bindingWhenSyntax = new BindingWhenSyntax(this._binding); - this._bindingOnSyntax = new BindingOnSyntax(this._binding); - this._bindingInSyntax = new BindingInSyntax(binding); - } - BindingInWhenOnSyntax2.prototype.inRequestScope = function() { - return this._bindingInSyntax.inRequestScope(); - }; - BindingInWhenOnSyntax2.prototype.inSingletonScope = function() { - return this._bindingInSyntax.inSingletonScope(); - }; - BindingInWhenOnSyntax2.prototype.inTransientScope = function() { - return this._bindingInSyntax.inTransientScope(); - }; - BindingInWhenOnSyntax2.prototype.when = function(constraint) { - return this._bindingWhenSyntax.when(constraint); - }; - BindingInWhenOnSyntax2.prototype.whenTargetNamed = function(name2) { - return this._bindingWhenSyntax.whenTargetNamed(name2); - }; - BindingInWhenOnSyntax2.prototype.whenTargetIsDefault = function() { - return this._bindingWhenSyntax.whenTargetIsDefault(); - }; - BindingInWhenOnSyntax2.prototype.whenTargetTagged = function(tag, value) { - return this._bindingWhenSyntax.whenTargetTagged(tag, value); - }; - BindingInWhenOnSyntax2.prototype.whenInjectedInto = function(parent) { - return this._bindingWhenSyntax.whenInjectedInto(parent); - }; - BindingInWhenOnSyntax2.prototype.whenParentNamed = function(name2) { - return this._bindingWhenSyntax.whenParentNamed(name2); - }; - BindingInWhenOnSyntax2.prototype.whenParentTagged = function(tag, value) { - return this._bindingWhenSyntax.whenParentTagged(tag, value); - }; - BindingInWhenOnSyntax2.prototype.whenAnyAncestorIs = function(ancestor) { - return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor); - }; - BindingInWhenOnSyntax2.prototype.whenNoAncestorIs = function(ancestor) { - return this._bindingWhenSyntax.whenNoAncestorIs(ancestor); - }; - BindingInWhenOnSyntax2.prototype.whenAnyAncestorNamed = function(name2) { - return this._bindingWhenSyntax.whenAnyAncestorNamed(name2); - }; - BindingInWhenOnSyntax2.prototype.whenAnyAncestorTagged = function(tag, value) { - return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value); - }; - BindingInWhenOnSyntax2.prototype.whenNoAncestorNamed = function(name2) { - return this._bindingWhenSyntax.whenNoAncestorNamed(name2); - }; - BindingInWhenOnSyntax2.prototype.whenNoAncestorTagged = function(tag, value) { - return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value); - }; - BindingInWhenOnSyntax2.prototype.whenAnyAncestorMatches = function(constraint) { - return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint); - }; - BindingInWhenOnSyntax2.prototype.whenNoAncestorMatches = function(constraint) { - return this._bindingWhenSyntax.whenNoAncestorMatches(constraint); - }; - BindingInWhenOnSyntax2.prototype.onActivation = function(handler) { - return this._bindingOnSyntax.onActivation(handler); - }; - BindingInWhenOnSyntax2.prototype.onDeactivation = function(handler) { - return this._bindingOnSyntax.onDeactivation(handler); - }; - return BindingInWhenOnSyntax2; -}(); -var BindingToSyntax = function() { - function BindingToSyntax2(binding) { - this._binding = binding; - } - BindingToSyntax2.prototype.to = function(constructor) { - this._binding.type = BindingTypeEnum.Instance; - this._binding.implementationType = constructor; - return new BindingInWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toSelf = function() { - if (typeof this._binding.serviceIdentifier !== "function") { - throw new Error("" + INVALID_TO_SELF_VALUE); - } - var self2 = this._binding.serviceIdentifier; - return this.to(self2); - }; - BindingToSyntax2.prototype.toConstantValue = function(value) { - this._binding.type = BindingTypeEnum.ConstantValue; - this._binding.cache = value; - this._binding.dynamicValue = null; - this._binding.implementationType = null; - this._binding.scope = BindingScopeEnum.Singleton; - return new BindingWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toDynamicValue = function(func) { - this._binding.type = BindingTypeEnum.DynamicValue; - this._binding.cache = null; - this._binding.dynamicValue = func; - this._binding.implementationType = null; - return new BindingInWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toConstructor = function(constructor) { - this._binding.type = BindingTypeEnum.Constructor; - this._binding.implementationType = constructor; - this._binding.scope = BindingScopeEnum.Singleton; - return new BindingWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toFactory = function(factory2) { - this._binding.type = BindingTypeEnum.Factory; - this._binding.factory = factory2; - this._binding.scope = BindingScopeEnum.Singleton; - return new BindingWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toFunction = function(func) { - if (typeof func !== "function") { - throw new Error(INVALID_FUNCTION_BINDING); - } - var bindingWhenOnSyntax = this.toConstantValue(func); - this._binding.type = BindingTypeEnum.Function; - this._binding.scope = BindingScopeEnum.Singleton; - return bindingWhenOnSyntax; - }; - BindingToSyntax2.prototype.toAutoFactory = function(serviceIdentifier) { - this._binding.type = BindingTypeEnum.Factory; - this._binding.factory = function(context) { - var autofactory = function() { - return context.container.get(serviceIdentifier); - }; - return autofactory; - }; - this._binding.scope = BindingScopeEnum.Singleton; - return new BindingWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toAutoNamedFactory = function(serviceIdentifier) { - this._binding.type = BindingTypeEnum.Factory; - this._binding.factory = function(context) { - return function(named) { - return context.container.getNamed(serviceIdentifier, named); - }; - }; - return new BindingWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toProvider = function(provider) { - this._binding.type = BindingTypeEnum.Provider; - this._binding.provider = provider; - this._binding.scope = BindingScopeEnum.Singleton; - return new BindingWhenOnSyntax(this._binding); - }; - BindingToSyntax2.prototype.toService = function(service) { - this.toDynamicValue(function(context) { - return context.container.get(service); - }); - }; - return BindingToSyntax2; -}(); -var ContainerSnapshot = function() { - function ContainerSnapshot2() { - } - ContainerSnapshot2.of = function(bindings, middleware, activations, deactivations, moduleActivationStore) { - var snapshot = new ContainerSnapshot2(); - snapshot.bindings = bindings; - snapshot.middleware = middleware; - snapshot.deactivations = deactivations; - snapshot.activations = activations; - snapshot.moduleActivationStore = moduleActivationStore; - return snapshot; - }; - return ContainerSnapshot2; -}(); -function isClonable(obj) { - return typeof obj === "object" && obj !== null && "clone" in obj && typeof obj.clone === "function"; -} -var Lookup = function() { - function Lookup2() { - this._map = /* @__PURE__ */ new Map(); - } - Lookup2.prototype.getMap = function() { - return this._map; - }; - Lookup2.prototype.add = function(serviceIdentifier, value) { - if (serviceIdentifier === null || serviceIdentifier === void 0) { - throw new Error(NULL_ARGUMENT); - } - if (value === null || value === void 0) { - throw new Error(NULL_ARGUMENT); - } - var entry = this._map.get(serviceIdentifier); - if (entry !== void 0) { - entry.push(value); - } else { - this._map.set(serviceIdentifier, [value]); - } - }; - Lookup2.prototype.get = function(serviceIdentifier) { - if (serviceIdentifier === null || serviceIdentifier === void 0) { - throw new Error(NULL_ARGUMENT); - } - var entry = this._map.get(serviceIdentifier); - if (entry !== void 0) { - return entry; - } else { - throw new Error(KEY_NOT_FOUND); - } - }; - Lookup2.prototype.remove = function(serviceIdentifier) { - if (serviceIdentifier === null || serviceIdentifier === void 0) { - throw new Error(NULL_ARGUMENT); - } - if (!this._map.delete(serviceIdentifier)) { - throw new Error(KEY_NOT_FOUND); - } - }; - Lookup2.prototype.removeIntersection = function(lookup) { - var _this = this; - this.traverse(function(serviceIdentifier, value) { - var lookupActivations = lookup.hasKey(serviceIdentifier) ? lookup.get(serviceIdentifier) : void 0; - if (lookupActivations !== void 0) { - var filteredValues = value.filter(function(lookupValue) { - return !lookupActivations.some(function(moduleActivation) { - return lookupValue === moduleActivation; - }); - }); - _this._setValue(serviceIdentifier, filteredValues); - } - }); - }; - Lookup2.prototype.removeByCondition = function(condition) { - var _this = this; - var removals = []; - this._map.forEach(function(entries, key) { - var updatedEntries = []; - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { - var entry = entries_1[_i]; - var remove = condition(entry); - if (remove) { - removals.push(entry); - } else { - updatedEntries.push(entry); - } - } - _this._setValue(key, updatedEntries); - }); - return removals; - }; - Lookup2.prototype.hasKey = function(serviceIdentifier) { - if (serviceIdentifier === null || serviceIdentifier === void 0) { - throw new Error(NULL_ARGUMENT); - } - return this._map.has(serviceIdentifier); - }; - Lookup2.prototype.clone = function() { - var copy = new Lookup2(); - this._map.forEach(function(value, key) { - value.forEach(function(b2) { - return copy.add(key, isClonable(b2) ? b2.clone() : b2); - }); - }); - return copy; - }; - Lookup2.prototype.traverse = function(func) { - this._map.forEach(function(value, key) { - func(key, value); - }); - }; - Lookup2.prototype._setValue = function(serviceIdentifier, value) { - if (value.length > 0) { - this._map.set(serviceIdentifier, value); - } else { - this._map.delete(serviceIdentifier); - } - }; - return Lookup2; -}(); -var ModuleActivationStore = function() { - function ModuleActivationStore2() { - this._map = /* @__PURE__ */ new Map(); - } - ModuleActivationStore2.prototype.remove = function(moduleId) { - if (this._map.has(moduleId)) { - var handlers = this._map.get(moduleId); - this._map.delete(moduleId); - return handlers; - } - return this._getEmptyHandlersStore(); - }; - ModuleActivationStore2.prototype.addDeactivation = function(moduleId, serviceIdentifier, onDeactivation) { - this._getModuleActivationHandlers(moduleId).onDeactivations.add(serviceIdentifier, onDeactivation); - }; - ModuleActivationStore2.prototype.addActivation = function(moduleId, serviceIdentifier, onActivation) { - this._getModuleActivationHandlers(moduleId).onActivations.add(serviceIdentifier, onActivation); - }; - ModuleActivationStore2.prototype.clone = function() { - var clone = new ModuleActivationStore2(); - this._map.forEach(function(handlersStore, moduleId) { - clone._map.set(moduleId, { - onActivations: handlersStore.onActivations.clone(), - onDeactivations: handlersStore.onDeactivations.clone() - }); - }); - return clone; - }; - ModuleActivationStore2.prototype._getModuleActivationHandlers = function(moduleId) { - var moduleActivationHandlers = this._map.get(moduleId); - if (moduleActivationHandlers === void 0) { - moduleActivationHandlers = this._getEmptyHandlersStore(); - this._map.set(moduleId, moduleActivationHandlers); - } - return moduleActivationHandlers; - }; - ModuleActivationStore2.prototype._getEmptyHandlersStore = function() { - var handlersStore = { - onActivations: new Lookup(), - onDeactivations: new Lookup() - }; - return handlersStore; - }; - return ModuleActivationStore2; -}(); -var __assign = globalThis && globalThis.__assign || function() { - __assign = Object.assign || function(t2) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t2[p] = s[p]; - } - return t2; - }; - return __assign.apply(this, arguments); -}; -var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P2, generator) { - function adopt(value) { - return value instanceof P2 ? value : new P2(function(resolve2) { - resolve2(value); - }); - } - return new (P2 || (P2 = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = globalThis && globalThis.__generator || function(thisArg, body) { - var _2 = { label: 0, sent: function() { - if (t2[0] & 1) - throw t2[1]; - return t2[1]; - }, trys: [], ops: [] }, f, y, t2, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { - return this; - }), g; - function verb(n) { - return function(v) { - return step([n, v]); - }; - } - function step(op) { - if (f) - throw new TypeError("Generator is already executing."); - while (_2) - try { - if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done) - return t2; - if (y = 0, t2) - op = [op[0] & 2, t2.value]; - switch (op[0]) { - case 0: - case 1: - t2 = op; - break; - case 4: - _2.label++; - return { value: op[1], done: false }; - case 5: - _2.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _2.ops.pop(); - _2.trys.pop(); - continue; - default: - if (!(t2 = _2.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _2 = 0; - continue; - } - if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) { - _2.label = op[1]; - break; - } - if (op[0] === 6 && _2.label < t2[1]) { - _2.label = t2[1]; - t2 = op; - break; - } - if (t2 && _2.label < t2[2]) { - _2.label = t2[2]; - _2.ops.push(op); - break; - } - if (t2[2]) - _2.ops.pop(); - _2.trys.pop(); - continue; - } - op = body.call(thisArg, _2); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t2 = 0; - } - if (op[0] & 5) - throw op[1]; - return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArray = globalThis && globalThis.__spreadArray || function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var Container = function() { - function Container2(containerOptions) { - var options = containerOptions || {}; - if (typeof options !== "object") { - throw new Error("" + CONTAINER_OPTIONS_MUST_BE_AN_OBJECT); - } - if (options.defaultScope === void 0) { - options.defaultScope = BindingScopeEnum.Transient; - } else if (options.defaultScope !== BindingScopeEnum.Singleton && options.defaultScope !== BindingScopeEnum.Transient && options.defaultScope !== BindingScopeEnum.Request) { - throw new Error("" + CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE); - } - if (options.autoBindInjectable === void 0) { - options.autoBindInjectable = false; - } else if (typeof options.autoBindInjectable !== "boolean") { - throw new Error("" + CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE); - } - if (options.skipBaseClassChecks === void 0) { - options.skipBaseClassChecks = false; - } else if (typeof options.skipBaseClassChecks !== "boolean") { - throw new Error("" + CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK); - } - this.options = { - autoBindInjectable: options.autoBindInjectable, - defaultScope: options.defaultScope, - skipBaseClassChecks: options.skipBaseClassChecks - }; - this.id = id(); - this._bindingDictionary = new Lookup(); - this._snapshots = []; - this._middleware = null; - this._activations = new Lookup(); - this._deactivations = new Lookup(); - this.parent = null; - this._metadataReader = new MetadataReader(); - this._moduleActivationStore = new ModuleActivationStore(); - } - Container2.merge = function(container1, container2) { - var containers = []; - for (var _i = 2; _i < arguments.length; _i++) { - containers[_i - 2] = arguments[_i]; - } - var container3 = new Container2(); - var targetContainers = __spreadArray([container1, container2], containers, true).map(function(targetContainer) { - return getBindingDictionary(targetContainer); - }); - var bindingDictionary = getBindingDictionary(container3); - function copyDictionary(origin, destination) { - origin.traverse(function(_key, value) { - value.forEach(function(binding) { - destination.add(binding.serviceIdentifier, binding.clone()); - }); - }); - } - targetContainers.forEach(function(targetBindingDictionary) { - copyDictionary(targetBindingDictionary, bindingDictionary); - }); - return container3; - }; - Container2.prototype.load = function() { - var modules = []; - for (var _i = 0; _i < arguments.length; _i++) { - modules[_i] = arguments[_i]; - } - var getHelpers = this._getContainerModuleHelpersFactory(); - for (var _a2 = 0, modules_1 = modules; _a2 < modules_1.length; _a2++) { - var currentModule = modules_1[_a2]; - var containerModuleHelpers = getHelpers(currentModule.id); - currentModule.registry(containerModuleHelpers.bindFunction, containerModuleHelpers.unbindFunction, containerModuleHelpers.isboundFunction, containerModuleHelpers.rebindFunction, containerModuleHelpers.unbindAsyncFunction, containerModuleHelpers.onActivationFunction, containerModuleHelpers.onDeactivationFunction); - } - }; - Container2.prototype.loadAsync = function() { - var modules = []; - for (var _i = 0; _i < arguments.length; _i++) { - modules[_i] = arguments[_i]; - } - return __awaiter(this, void 0, void 0, function() { - var getHelpers, _a2, modules_2, currentModule, containerModuleHelpers; - return __generator(this, function(_b) { - switch (_b.label) { - case 0: - getHelpers = this._getContainerModuleHelpersFactory(); - _a2 = 0, modules_2 = modules; - _b.label = 1; - case 1: - if (!(_a2 < modules_2.length)) - return [3, 4]; - currentModule = modules_2[_a2]; - containerModuleHelpers = getHelpers(currentModule.id); - return [4, currentModule.registry(containerModuleHelpers.bindFunction, containerModuleHelpers.unbindFunction, containerModuleHelpers.isboundFunction, containerModuleHelpers.rebindFunction, containerModuleHelpers.unbindAsyncFunction, containerModuleHelpers.onActivationFunction, containerModuleHelpers.onDeactivationFunction)]; - case 2: - _b.sent(); - _b.label = 3; - case 3: - _a2++; - return [3, 1]; - case 4: - return [2]; - } - }); - }); - }; - Container2.prototype.unload = function() { - var _this = this; - var modules = []; - for (var _i = 0; _i < arguments.length; _i++) { - modules[_i] = arguments[_i]; - } - modules.forEach(function(module2) { - var deactivations = _this._removeModuleBindings(module2.id); - _this._deactivateSingletons(deactivations); - _this._removeModuleHandlers(module2.id); - }); - }; - Container2.prototype.unloadAsync = function() { - var modules = []; - for (var _i = 0; _i < arguments.length; _i++) { - modules[_i] = arguments[_i]; - } - return __awaiter(this, void 0, void 0, function() { - var _a2, modules_3, module_1, deactivations; - return __generator(this, function(_b) { - switch (_b.label) { - case 0: - _a2 = 0, modules_3 = modules; - _b.label = 1; - case 1: - if (!(_a2 < modules_3.length)) - return [3, 4]; - module_1 = modules_3[_a2]; - deactivations = this._removeModuleBindings(module_1.id); - return [4, this._deactivateSingletonsAsync(deactivations)]; - case 2: - _b.sent(); - this._removeModuleHandlers(module_1.id); - _b.label = 3; - case 3: - _a2++; - return [3, 1]; - case 4: - return [2]; - } - }); - }); - }; - Container2.prototype.bind = function(serviceIdentifier) { - var scope = this.options.defaultScope || BindingScopeEnum.Transient; - var binding = new Binding(serviceIdentifier, scope); - this._bindingDictionary.add(serviceIdentifier, binding); - return new BindingToSyntax(binding); - }; - Container2.prototype.rebind = function(serviceIdentifier) { - this.unbind(serviceIdentifier); - return this.bind(serviceIdentifier); - }; - Container2.prototype.rebindAsync = function(serviceIdentifier) { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - return [4, this.unbindAsync(serviceIdentifier)]; - case 1: - _a2.sent(); - return [2, this.bind(serviceIdentifier)]; - } - }); - }); - }; - Container2.prototype.unbind = function(serviceIdentifier) { - if (this._bindingDictionary.hasKey(serviceIdentifier)) { - var bindings = this._bindingDictionary.get(serviceIdentifier); - this._deactivateSingletons(bindings); - } - this._removeServiceFromDictionary(serviceIdentifier); - }; - Container2.prototype.unbindAsync = function(serviceIdentifier) { - return __awaiter(this, void 0, void 0, function() { - var bindings; - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - if (!this._bindingDictionary.hasKey(serviceIdentifier)) - return [3, 2]; - bindings = this._bindingDictionary.get(serviceIdentifier); - return [4, this._deactivateSingletonsAsync(bindings)]; - case 1: - _a2.sent(); - _a2.label = 2; - case 2: - this._removeServiceFromDictionary(serviceIdentifier); - return [2]; - } - }); - }); - }; - Container2.prototype.unbindAll = function() { - var _this = this; - this._bindingDictionary.traverse(function(_key, value) { - _this._deactivateSingletons(value); - }); - this._bindingDictionary = new Lookup(); - }; - Container2.prototype.unbindAllAsync = function() { - return __awaiter(this, void 0, void 0, function() { - var promises; - var _this = this; - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - promises = []; - this._bindingDictionary.traverse(function(_key, value) { - promises.push(_this._deactivateSingletonsAsync(value)); - }); - return [4, Promise.all(promises)]; - case 1: - _a2.sent(); - this._bindingDictionary = new Lookup(); - return [2]; - } - }); - }); - }; - Container2.prototype.onActivation = function(serviceIdentifier, onActivation) { - this._activations.add(serviceIdentifier, onActivation); - }; - Container2.prototype.onDeactivation = function(serviceIdentifier, onDeactivation) { - this._deactivations.add(serviceIdentifier, onDeactivation); - }; - Container2.prototype.isBound = function(serviceIdentifier) { - var bound = this._bindingDictionary.hasKey(serviceIdentifier); - if (!bound && this.parent) { - bound = this.parent.isBound(serviceIdentifier); - } - return bound; - }; - Container2.prototype.isCurrentBound = function(serviceIdentifier) { - return this._bindingDictionary.hasKey(serviceIdentifier); - }; - Container2.prototype.isBoundNamed = function(serviceIdentifier, named) { - return this.isBoundTagged(serviceIdentifier, NAMED_TAG, named); - }; - Container2.prototype.isBoundTagged = function(serviceIdentifier, key, value) { - var bound = false; - if (this._bindingDictionary.hasKey(serviceIdentifier)) { - var bindings = this._bindingDictionary.get(serviceIdentifier); - var request_1 = createMockRequest(this, serviceIdentifier, key, value); - bound = bindings.some(function(b2) { - return b2.constraint(request_1); - }); - } - if (!bound && this.parent) { - bound = this.parent.isBoundTagged(serviceIdentifier, key, value); - } - return bound; - }; - Container2.prototype.snapshot = function() { - this._snapshots.push(ContainerSnapshot.of(this._bindingDictionary.clone(), this._middleware, this._activations.clone(), this._deactivations.clone(), this._moduleActivationStore.clone())); - }; - Container2.prototype.restore = function() { - var snapshot = this._snapshots.pop(); - if (snapshot === void 0) { - throw new Error(NO_MORE_SNAPSHOTS_AVAILABLE); - } - this._bindingDictionary = snapshot.bindings; - this._activations = snapshot.activations; - this._deactivations = snapshot.deactivations; - this._middleware = snapshot.middleware; - this._moduleActivationStore = snapshot.moduleActivationStore; - }; - Container2.prototype.createChild = function(containerOptions) { - var child = new Container2(containerOptions || this.options); - child.parent = this; - return child; - }; - Container2.prototype.applyMiddleware = function() { - var middlewares = []; - for (var _i = 0; _i < arguments.length; _i++) { - middlewares[_i] = arguments[_i]; - } - var initial = this._middleware ? this._middleware : this._planAndResolve(); - this._middleware = middlewares.reduce(function(prev, curr) { - return curr(prev); - }, initial); - }; - Container2.prototype.applyCustomMetadataReader = function(metadataReader) { - this._metadataReader = metadataReader; - }; - Container2.prototype.get = function(serviceIdentifier) { - var getArgs = this._getNotAllArgs(serviceIdentifier, false); - return this._getButThrowIfAsync(getArgs); - }; - Container2.prototype.getAsync = function(serviceIdentifier) { - return __awaiter(this, void 0, void 0, function() { - var getArgs; - return __generator(this, function(_a2) { - getArgs = this._getNotAllArgs(serviceIdentifier, false); - return [2, this._get(getArgs)]; - }); - }); - }; - Container2.prototype.getTagged = function(serviceIdentifier, key, value) { - var getArgs = this._getNotAllArgs(serviceIdentifier, false, key, value); - return this._getButThrowIfAsync(getArgs); - }; - Container2.prototype.getTaggedAsync = function(serviceIdentifier, key, value) { - return __awaiter(this, void 0, void 0, function() { - var getArgs; - return __generator(this, function(_a2) { - getArgs = this._getNotAllArgs(serviceIdentifier, false, key, value); - return [2, this._get(getArgs)]; - }); - }); - }; - Container2.prototype.getNamed = function(serviceIdentifier, named) { - return this.getTagged(serviceIdentifier, NAMED_TAG, named); - }; - Container2.prototype.getNamedAsync = function(serviceIdentifier, named) { - return this.getTaggedAsync(serviceIdentifier, NAMED_TAG, named); - }; - Container2.prototype.getAll = function(serviceIdentifier) { - var getArgs = this._getAllArgs(serviceIdentifier); - return this._getButThrowIfAsync(getArgs); - }; - Container2.prototype.getAllAsync = function(serviceIdentifier) { - var getArgs = this._getAllArgs(serviceIdentifier); - return this._getAll(getArgs); - }; - Container2.prototype.getAllTagged = function(serviceIdentifier, key, value) { - var getArgs = this._getNotAllArgs(serviceIdentifier, true, key, value); - return this._getButThrowIfAsync(getArgs); - }; - Container2.prototype.getAllTaggedAsync = function(serviceIdentifier, key, value) { - var getArgs = this._getNotAllArgs(serviceIdentifier, true, key, value); - return this._getAll(getArgs); - }; - Container2.prototype.getAllNamed = function(serviceIdentifier, named) { - return this.getAllTagged(serviceIdentifier, NAMED_TAG, named); - }; - Container2.prototype.getAllNamedAsync = function(serviceIdentifier, named) { - return this.getAllTaggedAsync(serviceIdentifier, NAMED_TAG, named); - }; - Container2.prototype.resolve = function(constructorFunction) { - var isBound = this.isBound(constructorFunction); - if (!isBound) { - this.bind(constructorFunction).toSelf(); - } - var resolved = this.get(constructorFunction); - if (!isBound) { - this.unbind(constructorFunction); - } - return resolved; - }; - Container2.prototype._preDestroy = function(constructor, instance2) { - if (Reflect.hasMetadata(PRE_DESTROY, constructor)) { - var data = Reflect.getMetadata(PRE_DESTROY, constructor); - return instance2[data.value](); - } - }; - Container2.prototype._removeModuleHandlers = function(moduleId) { - var moduleActivationsHandlers = this._moduleActivationStore.remove(moduleId); - this._activations.removeIntersection(moduleActivationsHandlers.onActivations); - this._deactivations.removeIntersection(moduleActivationsHandlers.onDeactivations); - }; - Container2.prototype._removeModuleBindings = function(moduleId) { - return this._bindingDictionary.removeByCondition(function(binding) { - return binding.moduleId === moduleId; - }); - }; - Container2.prototype._deactivate = function(binding, instance2) { - var _this = this; - var constructor = Object.getPrototypeOf(instance2).constructor; - try { - if (this._deactivations.hasKey(binding.serviceIdentifier)) { - var result = this._deactivateContainer(instance2, this._deactivations.get(binding.serviceIdentifier).values()); - if (isPromise(result)) { - return this._handleDeactivationError(result.then(function() { - return _this._propagateContainerDeactivationThenBindingAndPreDestroyAsync(binding, instance2, constructor); - }), constructor); - } - } - var propagateDeactivationResult = this._propagateContainerDeactivationThenBindingAndPreDestroy(binding, instance2, constructor); - if (isPromise(propagateDeactivationResult)) { - return this._handleDeactivationError(propagateDeactivationResult, constructor); - } - } catch (ex) { - throw new Error(ON_DEACTIVATION_ERROR(constructor.name, ex.message)); - } - }; - Container2.prototype._handleDeactivationError = function(asyncResult, constructor) { - return __awaiter(this, void 0, void 0, function() { - var ex_1; - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - _a2.trys.push([0, 2, , 3]); - return [4, asyncResult]; - case 1: - _a2.sent(); - return [3, 3]; - case 2: - ex_1 = _a2.sent(); - throw new Error(ON_DEACTIVATION_ERROR(constructor.name, ex_1.message)); - case 3: - return [2]; - } - }); - }); - }; - Container2.prototype._deactivateContainer = function(instance2, deactivationsIterator) { - var _this = this; - var deactivation = deactivationsIterator.next(); - while (deactivation.value) { - var result = deactivation.value(instance2); - if (isPromise(result)) { - return result.then(function() { - return _this._deactivateContainerAsync(instance2, deactivationsIterator); - }); - } - deactivation = deactivationsIterator.next(); - } - }; - Container2.prototype._deactivateContainerAsync = function(instance2, deactivationsIterator) { - return __awaiter(this, void 0, void 0, function() { - var deactivation; - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - deactivation = deactivationsIterator.next(); - _a2.label = 1; - case 1: - if (!deactivation.value) - return [3, 3]; - return [4, deactivation.value(instance2)]; - case 2: - _a2.sent(); - deactivation = deactivationsIterator.next(); - return [3, 1]; - case 3: - return [2]; - } - }); - }); - }; - Container2.prototype._getContainerModuleHelpersFactory = function() { - var _this = this; - var setModuleId = function(bindingToSyntax, moduleId) { - bindingToSyntax._binding.moduleId = moduleId; - }; - var getBindFunction = function(moduleId) { - return function(serviceIdentifier) { - var bindingToSyntax = _this.bind(serviceIdentifier); - setModuleId(bindingToSyntax, moduleId); - return bindingToSyntax; - }; - }; - var getUnbindFunction = function() { - return function(serviceIdentifier) { - return _this.unbind(serviceIdentifier); - }; - }; - var getUnbindAsyncFunction = function() { - return function(serviceIdentifier) { - return _this.unbindAsync(serviceIdentifier); - }; - }; - var getIsboundFunction = function() { - return function(serviceIdentifier) { - return _this.isBound(serviceIdentifier); - }; - }; - var getRebindFunction = function(moduleId) { - return function(serviceIdentifier) { - var bindingToSyntax = _this.rebind(serviceIdentifier); - setModuleId(bindingToSyntax, moduleId); - return bindingToSyntax; - }; - }; - var getOnActivationFunction = function(moduleId) { - return function(serviceIdentifier, onActivation) { - _this._moduleActivationStore.addActivation(moduleId, serviceIdentifier, onActivation); - _this.onActivation(serviceIdentifier, onActivation); - }; - }; - var getOnDeactivationFunction = function(moduleId) { - return function(serviceIdentifier, onDeactivation) { - _this._moduleActivationStore.addDeactivation(moduleId, serviceIdentifier, onDeactivation); - _this.onDeactivation(serviceIdentifier, onDeactivation); - }; - }; - return function(mId) { - return { - bindFunction: getBindFunction(mId), - isboundFunction: getIsboundFunction(), - onActivationFunction: getOnActivationFunction(mId), - onDeactivationFunction: getOnDeactivationFunction(mId), - rebindFunction: getRebindFunction(mId), - unbindFunction: getUnbindFunction(), - unbindAsyncFunction: getUnbindAsyncFunction() - }; - }; - }; - Container2.prototype._getAll = function(getArgs) { - return Promise.all(this._get(getArgs)); - }; - Container2.prototype._get = function(getArgs) { - var planAndResolveArgs = __assign(__assign({}, getArgs), { contextInterceptor: function(context) { - return context; - }, targetType: TargetTypeEnum.Variable }); - if (this._middleware) { - var middlewareResult = this._middleware(planAndResolveArgs); - if (middlewareResult === void 0 || middlewareResult === null) { - throw new Error(INVALID_MIDDLEWARE_RETURN); - } - return middlewareResult; - } - return this._planAndResolve()(planAndResolveArgs); - }; - Container2.prototype._getButThrowIfAsync = function(getArgs) { - var result = this._get(getArgs); - if (isPromiseOrContainsPromise(result)) { - throw new Error(LAZY_IN_SYNC(getArgs.serviceIdentifier)); - } - return result; - }; - Container2.prototype._getAllArgs = function(serviceIdentifier) { - var getAllArgs = { - avoidConstraints: true, - isMultiInject: true, - serviceIdentifier - }; - return getAllArgs; - }; - Container2.prototype._getNotAllArgs = function(serviceIdentifier, isMultiInject, key, value) { - var getNotAllArgs = { - avoidConstraints: false, - isMultiInject, - serviceIdentifier, - key, - value - }; - return getNotAllArgs; - }; - Container2.prototype._planAndResolve = function() { - var _this = this; - return function(args) { - var context = plan(_this._metadataReader, _this, args.isMultiInject, args.targetType, args.serviceIdentifier, args.key, args.value, args.avoidConstraints); - context = args.contextInterceptor(context); - var result = resolve(context); - return result; - }; - }; - Container2.prototype._deactivateIfSingleton = function(binding) { - var _this = this; - if (!binding.activated) { - return; - } - if (isPromise(binding.cache)) { - return binding.cache.then(function(resolved) { - return _this._deactivate(binding, resolved); - }); - } - return this._deactivate(binding, binding.cache); - }; - Container2.prototype._deactivateSingletons = function(bindings) { - for (var _i = 0, bindings_1 = bindings; _i < bindings_1.length; _i++) { - var binding = bindings_1[_i]; - var result = this._deactivateIfSingleton(binding); - if (isPromise(result)) { - throw new Error(ASYNC_UNBIND_REQUIRED); - } - } - }; - Container2.prototype._deactivateSingletonsAsync = function(bindings) { - return __awaiter(this, void 0, void 0, function() { - var _this = this; - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - return [4, Promise.all(bindings.map(function(b2) { - return _this._deactivateIfSingleton(b2); - }))]; - case 1: - _a2.sent(); - return [2]; - } - }); - }); - }; - Container2.prototype._propagateContainerDeactivationThenBindingAndPreDestroy = function(binding, instance2, constructor) { - if (this.parent) { - return this._deactivate.bind(this.parent)(binding, instance2); - } else { - return this._bindingDeactivationAndPreDestroy(binding, instance2, constructor); - } - }; - Container2.prototype._propagateContainerDeactivationThenBindingAndPreDestroyAsync = function(binding, instance2, constructor) { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - if (!this.parent) - return [3, 2]; - return [4, this._deactivate.bind(this.parent)(binding, instance2)]; - case 1: - _a2.sent(); - return [3, 4]; - case 2: - return [4, this._bindingDeactivationAndPreDestroyAsync(binding, instance2, constructor)]; - case 3: - _a2.sent(); - _a2.label = 4; - case 4: - return [2]; - } - }); - }); - }; - Container2.prototype._removeServiceFromDictionary = function(serviceIdentifier) { - try { - this._bindingDictionary.remove(serviceIdentifier); - } catch (e) { - throw new Error(CANNOT_UNBIND + " " + getServiceIdentifierAsString(serviceIdentifier)); - } - }; - Container2.prototype._bindingDeactivationAndPreDestroy = function(binding, instance2, constructor) { - var _this = this; - if (typeof binding.onDeactivation === "function") { - var result = binding.onDeactivation(instance2); - if (isPromise(result)) { - return result.then(function() { - return _this._preDestroy(constructor, instance2); - }); - } - } - return this._preDestroy(constructor, instance2); - }; - Container2.prototype._bindingDeactivationAndPreDestroyAsync = function(binding, instance2, constructor) { - return __awaiter(this, void 0, void 0, function() { - return __generator(this, function(_a2) { - switch (_a2.label) { - case 0: - if (!(typeof binding.onDeactivation === "function")) - return [3, 2]; - return [4, binding.onDeactivation(instance2)]; - case 1: - _a2.sent(); - _a2.label = 2; - case 2: - return [4, this._preDestroy(constructor, instance2)]; - case 3: - _a2.sent(); - return [2]; - } - }); - }); - }; - return Container2; -}(); -function getFirstArrayDuplicate(array) { - var seenValues = /* @__PURE__ */ new Set(); - for (var _i = 0, array_1 = array; _i < array_1.length; _i++) { - var entry = array_1[_i]; - if (seenValues.has(entry)) { - return entry; - } else { - seenValues.add(entry); - } - } - return void 0; -} -function targetIsConstructorFunction(target) { - return target.prototype !== void 0; -} -function _throwIfMethodParameter(parameterName) { - if (parameterName !== void 0) { - throw new Error(INVALID_DECORATOR_OPERATION); - } -} -function tagParameter(annotationTarget, parameterName, parameterIndex, metadata) { - _throwIfMethodParameter(parameterName); - _tagParameterOrProperty(TAGGED, annotationTarget, parameterIndex.toString(), metadata); -} -function tagProperty(annotationTarget, propertyName, metadata) { - if (targetIsConstructorFunction(annotationTarget)) { - throw new Error(INVALID_DECORATOR_OPERATION); - } - _tagParameterOrProperty(TAGGED_PROP, annotationTarget.constructor, propertyName, metadata); -} -function _ensureNoMetadataKeyDuplicates(metadata) { - var metadatas = []; - if (Array.isArray(metadata)) { - metadatas = metadata; - var duplicate = getFirstArrayDuplicate(metadatas.map(function(md) { - return md.key; - })); - if (duplicate !== void 0) { - throw new Error(DUPLICATED_METADATA + " " + duplicate.toString()); - } - } else { - metadatas = [metadata]; - } - return metadatas; -} -function _tagParameterOrProperty(metadataKey, annotationTarget, key, metadata) { - var metadatas = _ensureNoMetadataKeyDuplicates(metadata); - var paramsOrPropertiesMetadata = {}; - if (Reflect.hasOwnMetadata(metadataKey, annotationTarget)) { - paramsOrPropertiesMetadata = Reflect.getMetadata(metadataKey, annotationTarget); - } - var paramOrPropertyMetadata = paramsOrPropertiesMetadata[key]; - if (paramOrPropertyMetadata === void 0) { - paramOrPropertyMetadata = []; - } else { - var _loop_1 = function(m2) { - if (metadatas.some(function(md) { - return md.key === m2.key; - })) { - throw new Error(DUPLICATED_METADATA + " " + m2.key.toString()); - } - }; - for (var _i = 0, paramOrPropertyMetadata_1 = paramOrPropertyMetadata; _i < paramOrPropertyMetadata_1.length; _i++) { - var m = paramOrPropertyMetadata_1[_i]; - _loop_1(m); - } - } - paramOrPropertyMetadata.push.apply(paramOrPropertyMetadata, metadatas); - paramsOrPropertiesMetadata[key] = paramOrPropertyMetadata; - Reflect.defineMetadata(metadataKey, paramsOrPropertiesMetadata, annotationTarget); -} -function createTaggedDecorator(metadata) { - return function(target, targetKey, indexOrPropertyDescriptor) { - if (typeof indexOrPropertyDescriptor === "number") { - tagParameter(target, targetKey, indexOrPropertyDescriptor, metadata); - } else { - tagProperty(target, targetKey, metadata); - } - }; -} -function injectable() { - return function(target) { - if (Reflect.hasOwnMetadata(PARAM_TYPES, target)) { - throw new Error(DUPLICATED_INJECTABLE_DECORATOR); - } - var types = Reflect.getMetadata(DESIGN_PARAM_TYPES, target) || []; - Reflect.defineMetadata(PARAM_TYPES, types, target); - return target; - }; -} -function injectBase(metadataKey) { - return function(serviceIdentifier) { - return function(target, targetKey, indexOrPropertyDescriptor) { - if (serviceIdentifier === void 0) { - var className = typeof target === "function" ? target.name : target.constructor.name; - throw new Error(UNDEFINED_INJECT_ANNOTATION(className)); - } - return createTaggedDecorator(new Metadata(metadataKey, serviceIdentifier))(target, targetKey, indexOrPropertyDescriptor); - }; - }; -} -var inject = injectBase(INJECT_TAG); -const PLUGIN_SYSTEM_AUTO_UPDATE = "PLUGIN_SYSTEM_AUTO_UPDATE"; -const PLUGIN_SYSTEM_PLUGIN = "PLUGIN_SYSTEM_PLUGIN"; -const PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN = "PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN"; -const PLUGIN_SYSTEM_SAFE_MODE_ENABLED = "PLUGIN_SYSTEM_SAFE_MODE_ENABLED"; -const PLUGIN_STORE_URL = "PLUGIN_STORE_URL"; -const defaultConfig = { - [PLUGIN_SYSTEM_SAFE_MODE_ENABLED]: true, - [PLUGIN_SYSTEM_AUTO_UPDATE]: true, - [PLUGIN_SYSTEM_PLUGIN]: [{ key: "setting", enabled: true }], - [PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN]: [], - [PLUGIN_STORE_URL]: "https://bitbucket.org/hi-windom/sillot-plugins/raw/main/" -}; -function noop() { -} -function assign(tar, src) { - for (const k2 in src) - tar[k2] = src[k2]; - return tar; -} -function run(fn) { - return fn(); -} -function blank_object() { - return /* @__PURE__ */ Object.create(null); -} -function run_all(fns) { - fns.forEach(run); -} -function is_function(thing) { - return typeof thing === "function"; -} -function safe_not_equal(a2, b2) { - return a2 != a2 ? b2 == b2 : a2 !== b2 || (a2 && typeof a2 === "object" || typeof a2 === "function"); -} -function is_empty(obj) { - return Object.keys(obj).length === 0; -} -function create_slot(definition, ctx, $$scope, fn) { - if (definition) { - const slot_ctx = get_slot_context(definition, ctx, $$scope, fn); - return definition[0](slot_ctx); - } -} -function get_slot_context(definition, ctx, $$scope, fn) { - return definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx; -} -function get_slot_changes(definition, $$scope, dirty, fn) { - if (definition[2] && fn) { - const lets = definition[2](fn(dirty)); - if ($$scope.dirty === void 0) { - return lets; - } - if (typeof lets === "object") { - const merged = []; - const len = Math.max($$scope.dirty.length, lets.length); - for (let i = 0; i < len; i += 1) { - merged[i] = $$scope.dirty[i] | lets[i]; - } - return merged; - } - return $$scope.dirty | lets; - } - return $$scope.dirty; -} -function update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) { - if (slot_changes) { - const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn); - slot.p(slot_context, slot_changes); - } -} -function get_all_dirty_from_scope($$scope) { - if ($$scope.ctx.length > 32) { - const dirty = []; - const length = $$scope.ctx.length / 32; - for (let i = 0; i < length; i++) { - dirty[i] = -1; - } - return dirty; - } - return -1; -} -function null_to_empty(value) { - return value == null ? "" : value; -} -function append(target, node) { - target.appendChild(node); -} -function insert(target, node, anchor) { - target.insertBefore(node, anchor || null); -} -function detach(node) { - if (node.parentNode) { - node.parentNode.removeChild(node); - } -} -function destroy_each(iterations, detaching) { - for (let i = 0; i < iterations.length; i += 1) { - if (iterations[i]) - iterations[i].d(detaching); - } -} -function element(name2) { - return document.createElement(name2); -} -function svg_element(name2) { - return document.createElementNS("http://www.w3.org/2000/svg", name2); -} -function text(data) { - return document.createTextNode(data); -} -function space() { - return text(" "); -} -function empty() { - return text(""); -} -function listen(node, event, handler, options) { - node.addEventListener(event, handler, options); - return () => node.removeEventListener(event, handler, options); -} -function attr(node, attribute, value) { - if (value == null) - node.removeAttribute(attribute); - else if (node.getAttribute(attribute) !== value) - node.setAttribute(attribute, value); -} -function xlink_attr(node, attribute, value) { - node.setAttributeNS("http://www.w3.org/1999/xlink", attribute, value); -} -function children(element2) { - return Array.from(element2.childNodes); -} -function set_data(text2, data) { - data = "" + data; - if (text2.wholeText !== data) - text2.data = data; -} -function set_input_value(input, value) { - input.value = value == null ? "" : value; -} -function set_style(node, key, value, important) { - if (value === null) { - node.style.removeProperty(key); - } else { - node.style.setProperty(key, value, important ? "important" : ""); - } -} -function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) { - const e = document.createEvent("CustomEvent"); - e.initCustomEvent(type, bubbles, cancelable, detail); - return e; -} -class HtmlTag { - constructor(is_svg = false) { - this.is_svg = false; - this.is_svg = is_svg; - this.e = this.n = null; - } - c(html) { - this.h(html); - } - m(html, target, anchor = null) { - if (!this.e) { - if (this.is_svg) - this.e = svg_element(target.nodeName); - else - this.e = element(target.nodeName); - this.t = target; - this.c(html); - } - this.i(anchor); - } - h(html) { - this.e.innerHTML = html; - this.n = Array.from(this.e.childNodes); - } - i(anchor) { - for (let i = 0; i < this.n.length; i += 1) { - insert(this.t, this.n[i], anchor); - } - } - p(html) { - this.d(); - this.h(html); - this.i(this.a); - } - d() { - this.n.forEach(detach); - } -} -function construct_svelte_component(component, props) { - return new component(props); -} -let current_component; -function set_current_component(component) { - current_component = component; -} -function get_current_component() { - if (!current_component) - throw new Error("Function called outside component initialization"); - return current_component; -} -function onMount(fn) { - get_current_component().$$.on_mount.push(fn); -} -function createEventDispatcher() { - const component = get_current_component(); - return (type, detail, { cancelable = false } = {}) => { - const callbacks = component.$$.callbacks[type]; - if (callbacks) { - const event = custom_event(type, detail, { cancelable }); - callbacks.slice().forEach((fn) => { - fn.call(component, event); - }); - return !event.defaultPrevented; - } - return true; - }; -} -const dirty_components = []; -const binding_callbacks = []; -const render_callbacks = []; -const flush_callbacks = []; -const resolved_promise = Promise.resolve(); -let update_scheduled = false; -function schedule_update() { - if (!update_scheduled) { - update_scheduled = true; - resolved_promise.then(flush); - } -} -function add_render_callback(fn) { - render_callbacks.push(fn); -} -const seen_callbacks = /* @__PURE__ */ new Set(); -let flushidx = 0; -function flush() { - if (flushidx !== 0) { - return; - } - const saved_component = current_component; - do { - try { - while (flushidx < dirty_components.length) { - const component = dirty_components[flushidx]; - flushidx++; - set_current_component(component); - update(component.$$); - } - } catch (e) { - dirty_components.length = 0; - flushidx = 0; - throw e; - } - set_current_component(null); - dirty_components.length = 0; - flushidx = 0; - while (binding_callbacks.length) - binding_callbacks.pop()(); - for (let i = 0; i < render_callbacks.length; i += 1) { - const callback = render_callbacks[i]; - if (!seen_callbacks.has(callback)) { - seen_callbacks.add(callback); - callback(); - } - } - render_callbacks.length = 0; - } while (dirty_components.length); - while (flush_callbacks.length) { - flush_callbacks.pop()(); - } - update_scheduled = false; - seen_callbacks.clear(); - set_current_component(saved_component); -} -function update($$) { - if ($$.fragment !== null) { - $$.update(); - run_all($$.before_update); - const dirty = $$.dirty; - $$.dirty = [-1]; - $$.fragment && $$.fragment.p($$.ctx, dirty); - $$.after_update.forEach(add_render_callback); - } -} -const outroing = /* @__PURE__ */ new Set(); -let outros; -function group_outros() { - outros = { - r: 0, - c: [], - p: outros - // parent group - }; -} -function check_outros() { - if (!outros.r) { - run_all(outros.c); - } - outros = outros.p; -} -function transition_in(block, local) { - if (block && block.i) { - outroing.delete(block); - block.i(local); - } -} -function transition_out(block, local, detach2, callback) { - if (block && block.o) { - if (outroing.has(block)) - return; - outroing.add(block); - outros.c.push(() => { - outroing.delete(block); - if (callback) { - if (detach2) - block.d(1); - callback(); - } - }); - block.o(local); - } else if (callback) { - callback(); - } -} -function create_component(block) { - block && block.c(); -} -function mount_component(component, target, anchor, customElement) { - const { fragment, after_update } = component.$$; - fragment && fragment.m(target, anchor); - if (!customElement) { - add_render_callback(() => { - const new_on_destroy = component.$$.on_mount.map(run).filter(is_function); - if (component.$$.on_destroy) { - component.$$.on_destroy.push(...new_on_destroy); - } else { - run_all(new_on_destroy); - } - component.$$.on_mount = []; - }); - } - after_update.forEach(add_render_callback); -} -function destroy_component(component, detaching) { - const $$ = component.$$; - if ($$.fragment !== null) { - run_all($$.on_destroy); - $$.fragment && $$.fragment.d(detaching); - $$.on_destroy = $$.fragment = null; - $$.ctx = []; - } -} -function make_dirty(component, i) { - if (component.$$.dirty[0] === -1) { - dirty_components.push(component); - schedule_update(); - component.$$.dirty.fill(0); - } - component.$$.dirty[i / 31 | 0] |= 1 << i % 31; -} -function init(component, options, instance2, create_fragment2, not_equal, props, append_styles, dirty = [-1]) { - const parent_component = current_component; - set_current_component(component); - const $$ = component.$$ = { - fragment: null, - ctx: [], - // state - props, - update: noop, - not_equal, - bound: blank_object(), - // lifecycle - on_mount: [], - on_destroy: [], - on_disconnect: [], - before_update: [], - after_update: [], - context: new Map(options.context || (parent_component ? parent_component.$$.context : [])), - // everything else - callbacks: blank_object(), - dirty, - skip_bound: false, - root: options.target || parent_component.$$.root - }; - append_styles && append_styles($$.root); - let ready = false; - $$.ctx = instance2 ? instance2(component, options.props || {}, (i, ret, ...rest) => { - const value = rest.length ? rest[0] : ret; - if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { - if (!$$.skip_bound && $$.bound[i]) - $$.bound[i](value); - if (ready) - make_dirty(component, i); - } - return ret; - }) : []; - $$.update(); - ready = true; - run_all($$.before_update); - $$.fragment = create_fragment2 ? create_fragment2($$.ctx) : false; - if (options.target) { - if (options.hydrate) { - const nodes = children(options.target); - $$.fragment && $$.fragment.l(nodes); - nodes.forEach(detach); - } else { - $$.fragment && $$.fragment.c(); - } - if (options.intro) - transition_in(component.$$.fragment); - mount_component(component, options.target, options.anchor, options.customElement); - flush(); - } - set_current_component(parent_component); -} -class SvelteComponent { - $destroy() { - destroy_component(this, 1); - this.$destroy = noop; - } - $on(type, callback) { - if (!is_function(callback)) { - return noop; - } - const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); - callbacks.push(callback); - return () => { - const index = callbacks.indexOf(callback); - if (index !== -1) - callbacks.splice(index, 1); - }; - } - $set($$props) { - if (this.$$set && !is_empty($$props)) { - this.$$.skip_bound = true; - this.$$set($$props); - this.$$.skip_bound = false; - } - } -} -const commandPanel_svelte_svelte_type_style_lang = ""; -function get_each_context$4(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[11] = list[i]; - child_ctx[13] = i; - return child_ctx; -} -function create_if_block$5(ctx) { - let each_1_anchor; - let each_value = ( - /*result*/ - ctx[2] - ); - let each_blocks = []; - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i)); - } - return { - c() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - each_1_anchor = empty(); - }, - m(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - insert(target, each_1_anchor, anchor); - }, - p(ctx2, dirty) { - if (dirty & /*currentIndex, onClick, result, _*/ - 22) { - each_value = /*result*/ - ctx2[2]; - let i; - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$4(ctx2, each_value, i); - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block$4(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); - } - } - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - each_blocks.length = each_value.length; - } - }, - d(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) - detach(each_1_anchor); - } - }; -} -function create_if_block_1$4(ctx) { - let div; - let t0_value = _("shortcut") + ""; - let t0; - let t1; - let t2_value = ( - /*com*/ - ctx[11].shortcut + "" - ); - let t2; - return { - c() { - div = element("div"); - t0 = text(t0_value); - t1 = text(": "); - t2 = text(t2_value); - attr(div, "class", "command-shortcut svelte-1bq7axd"); - }, - m(target, anchor) { - insert(target, div, anchor); - append(div, t0); - append(div, t1); - append(div, t2); - }, - p(ctx2, dirty) { - if (dirty & /*result*/ - 4 && t2_value !== (t2_value = /*com*/ - ctx2[11].shortcut + "")) - set_data(t2, t2_value); - }, - d(detaching) { - if (detaching) - detach(div); - } - }; -} -function create_each_block$4(ctx) { - let div; - let span0; - let t0_value = ( - /*com*/ - ctx[11].pluginName + "" - ); - let t0; - let t1; - let t2_value = ":"; - let t2; - let t3; - let span1; - let t4_value = ( - /*com*/ - ctx[11].command + "" - ); - let t4; - let t5; - let t6_value = ( - /*com*/ - (ctx[11].description || "") + "" - ); - let t6; - let t7; - let t8; - let div_class_value; - let mounted; - let dispose; - let if_block = ( - /*com*/ - ctx[11].shortcut && create_if_block_1$4(ctx) - ); - function click_handler() { - return ( - /*click_handler*/ - ctx[7]( - /*i*/ - ctx[13] - ) - ); - } - return { - c() { - div = element("div"); - span0 = element("span"); - t0 = text(t0_value); - t1 = space(); - t2 = text(t2_value); - t3 = space(); - span1 = element("span"); - t4 = text(t4_value); - t5 = space(); - t6 = text(t6_value); - t7 = space(); - if (if_block) - if_block.c(); - t8 = space(); - attr(span0, "class", "command-plugin svelte-1bq7axd"); - attr(span1, "class", "command-description"); - attr(div, "class", div_class_value = null_to_empty( - /*i*/ - ctx[13] === /*currentIndex*/ - ctx[1] ? "command-selected command" : "command" - ) + " svelte-1bq7axd"); - }, - m(target, anchor) { - insert(target, div, anchor); - append(div, span0); - append(span0, t0); - append(span0, t1); - append(span0, t2); - append(div, t3); - append(div, span1); - append(span1, t4); - append(span1, t5); - append(span1, t6); - append(div, t7); - if (if_block) - if_block.m(div, null); - append(div, t8); - if (!mounted) { - dispose = listen(div, "click", click_handler); - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*result*/ - 4 && t0_value !== (t0_value = /*com*/ - ctx[11].pluginName + "")) - set_data(t0, t0_value); - if (dirty & /*result*/ - 4 && t4_value !== (t4_value = /*com*/ - ctx[11].command + "")) - set_data(t4, t4_value); - if (dirty & /*result*/ - 4 && t6_value !== (t6_value = /*com*/ - (ctx[11].description || "") + "")) - set_data(t6, t6_value); - if ( - /*com*/ - ctx[11].shortcut - ) { - if (if_block) { - if_block.p(ctx, dirty); - } else { - if_block = create_if_block_1$4(ctx); - if_block.c(); - if_block.m(div, t8); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - if (dirty & /*currentIndex*/ - 2 && div_class_value !== (div_class_value = null_to_empty( - /*i*/ - ctx[13] === /*currentIndex*/ - ctx[1] ? "command-selected command" : "command" - ) + " svelte-1bq7axd")) { - attr(div, "class", div_class_value); - } - }, - d(detaching) { - if (detaching) - detach(div); - if (if_block) - if_block.d(); - mounted = false; - dispose(); - } - }; -} -function create_fragment$7(ctx) { - let div1; - let div0; - let svg; - let path; - let t0; - let input; - let t1; - let mounted; - let dispose; - let if_block = ( - /*result*/ - ctx[2] && create_if_block$5(ctx) - ); - return { - c() { - div1 = element("div"); - div0 = element("div"); - svg = svg_element("svg"); - path = svg_element("path"); - t0 = space(); - input = element("input"); - t1 = space(); - if (if_block) - if_block.c(); - attr(path, "d", "M64 112v800h896V112H64z m846 750H114V162h796v700zM234.6 688.8L411.3 512 234.6 335.2l35.4-35.4L482.1 512 269.9 724.1l-35.3-35.3z m554.8-10.2h-300v-50h300v50z"); - set_style(svg, "left", "14px"); - attr(svg, "class", "b3-form__icon-icon"); - attr(svg, "viewBox", "0 0 1024 1024"); - attr(svg, "version", "1.1"); - attr(svg, "xmlns", "http://www.w3.org/2000/svg"); - attr(svg, "width", "200"); - attr(svg, "height", "200"); - attr(input, "id", "commandPanelInput"); - attr(input, "class", "b3-text-field b3-text-field--text fn__block b3-form__icon-input"); - attr(div0, "class", "b3-form__icon search__header"); - attr(div1, "class", "fn__flex-column"); - set_style(div1, "border-radius", "4px"); - set_style(div1, "overflow", "hidden"); - set_style(div1, "position", "relative"); - set_style(div1, "width", "max(80vw, 1000px)"); - }, - m(target, anchor) { - insert(target, div1, anchor); - append(div1, div0); - append(div0, svg); - append(svg, path); - append(div0, t0); - append(div0, input); - set_input_value( - input, - /*command*/ - ctx[0] - ); - append(div1, t1); - if (if_block) - if_block.m(div1, null); - if (!mounted) { - dispose = [ - listen( - input, - "input", - /*input_input_handler*/ - ctx[6] - ), - listen( - input, - "keydown", - /*onkeypress*/ - ctx[3] - ) - ]; - mounted = true; - } - }, - p(ctx2, [dirty]) { - if (dirty & /*command*/ - 1 && input.value !== /*command*/ - ctx2[0]) { - set_input_value( - input, - /*command*/ - ctx2[0] - ); - } - if ( - /*result*/ - ctx2[2] - ) { - if (if_block) { - if_block.p(ctx2, dirty); - } else { - if_block = create_if_block$5(ctx2); - if_block.c(); - if_block.m(div1, null); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - i: noop, - o: noop, - d(detaching) { - if (detaching) - detach(div1); - if (if_block) - if_block.d(); - mounted = false; - run_all(dispose); - } - }; -} -function instance$7($$self, $$props, $$invalidate) { - const commandManager = container.get("CommandManager"); - let commands = []; - let command = ""; - let currentIndex = 0; - let result = []; - const onkeypress = (e) => { - if (e.keyCode === 13) { - onEnter(); - return; - } - if (e.keyCode === 38) { - e.preventDefault(); - if (currentIndex === 0) { - return; - } - $$invalidate(1, currentIndex--, currentIndex); - return; - } - if (e.keyCode === 40) { - const len = result.length; - e.preventDefault(); - if (currentIndex >= len - 1) { - return; - } - $$invalidate(1, currentIndex++, currentIndex); - } - }; - const onEnter = () => { - const com = result[currentIndex]; - Dialog.destroyAll(); - com.callback(); - }; - const onClick = (i) => { - $$invalidate(1, currentIndex = i); - onEnter(); - }; - const hasContent = (v, c) => v && v.toLowerCase().indexOf(c.toLowerCase()) >= 0; - onMount(() => { - $$invalidate(5, commands = commandManager.getCommands()); - const el = document.getElementById("commandPanelInput"); - el.focus(); - }); - function input_input_handler() { - command = this.value; - $$invalidate(0, command); - } - const click_handler = (i) => onClick(i); - $$self.$$.update = () => { - if ($$self.$$.dirty & /*command, commands*/ - 33) { - { - $$invalidate(1, currentIndex = 0); - if (!command) { - $$invalidate(2, result = commands); - } else { - $$invalidate(2, result = commands.filter((c) => { - return hasContent(c.plugin, command) || hasContent(c.pluginName, command) || hasContent(c.command, command) || hasContent(c.description, command); - })); - } - } - } - }; - return [ - command, - currentIndex, - result, - onkeypress, - onClick, - commands, - input_input_handler, - click_handler - ]; -} -class Command_panel extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$7, create_fragment$7, safe_not_equal, {}); - } -} -class CommandPanelPlugin extends Plugin { - onload() { - this.registerCommand({ - command: "Show command panel", - description: _("show_command_panel"), - shortcut: "ctrl+shift+o,command+shift+o", - callback: () => { - this.showPanel(); - } - }); - } - showPanel() { - Dialog.destroyAll(); - new Dialog({ content: '
' }); - setImmediate(() => { - new Command_panel({ - target: document.getElementById("command-panel") - }); - }); - } -} -function get_each_context$3(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[5] = list[i]; - child_ctx[6] = list; - child_ctx[7] = i; - return child_ctx; -} -function create_if_block_1$3(ctx) { - let input; - let mounted; - let dispose; - function input_input_handler() { - ctx[2].call( - input, - /*each_value*/ - ctx[6], - /*config_index*/ - ctx[7] - ); - } - return { - c() { - input = element("input"); - attr(input, "class", "b3-text-field fn__flex-center fn__size200"); - attr(input, "type", "input"); - }, - m(target, anchor) { - insert(target, input, anchor); - set_input_value( - input, - /*config*/ - ctx[5].value - ); - if (!mounted) { - dispose = [ - listen(input, "input", input_input_handler), - listen(input, "change", function() { - if (is_function( - /*config*/ - ctx[5].onChange - )) - ctx[5].onChange.apply(this, arguments); - }) - ]; - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*configs*/ - 1) { - set_input_value( - input, - /*config*/ - ctx[5].value - ); - } - }, - d(detaching) { - if (detaching) - detach(input); - mounted = false; - run_all(dispose); - } - }; -} -function create_if_block$4(ctx) { - let input; - let mounted; - let dispose; - function input_change_handler() { - ctx[1].call( - input, - /*each_value*/ - ctx[6], - /*config_index*/ - ctx[7] - ); - } - return { - c() { - input = element("input"); - attr(input, "class", "b3-switch fn__flex-center"); - attr(input, "type", "checkbox"); - }, - m(target, anchor) { - insert(target, input, anchor); - input.checked = /*config*/ - ctx[5].checked; - if (!mounted) { - dispose = [ - listen(input, "change", input_change_handler), - listen(input, "change", function() { - if (is_function( - /*config*/ - ctx[5].onChange - )) - ctx[5].onChange.apply(this, arguments); - }) - ]; - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*configs*/ - 1) { - input.checked = /*config*/ - ctx[5].checked; - } - }, - d(detaching) { - if (detaching) - detach(input); - mounted = false; - run_all(dispose); - } - }; -} -function create_each_block$3(ctx) { - let label; - let div1; - let t0_value = ( - /*config*/ - ctx[5].label + "" - ); - let t0; - let t1; - let div0; - let t2_value = ( - /*config*/ - ctx[5].tip + "" - ); - let t2; - let t3; - let span; - let t4; - let t5; - function select_block_type(ctx2, dirty) { - if ( - /*config*/ - ctx2[5].type === "checkbox" - ) - return create_if_block$4; - if ( - /*config*/ - ctx2[5].type === "input" - ) - return create_if_block_1$3; - } - let current_block_type = select_block_type(ctx); - let if_block = current_block_type && current_block_type(ctx); - return { - c() { - label = element("label"); - div1 = element("div"); - t0 = text(t0_value); - t1 = space(); - div0 = element("div"); - t2 = text(t2_value); - t3 = space(); - span = element("span"); - t4 = space(); - if (if_block) - if_block.c(); - t5 = space(); - attr(div0, "class", "b3-label__text"); - attr(div1, "class", "fn__flex-1"); - attr(span, "class", "fn__space"); - attr(label, "class", "fn__flex b3-label config__item"); - }, - m(target, anchor) { - insert(target, label, anchor); - append(label, div1); - append(div1, t0); - append(div1, t1); - append(div1, div0); - append(div0, t2); - append(label, t3); - append(label, span); - append(label, t4); - if (if_block) - if_block.m(label, null); - append(label, t5); - }, - p(ctx2, dirty) { - if (dirty & /*configs*/ - 1 && t0_value !== (t0_value = /*config*/ - ctx2[5].label + "")) - set_data(t0, t0_value); - if (dirty & /*configs*/ - 1 && t2_value !== (t2_value = /*config*/ - ctx2[5].tip + "")) - set_data(t2, t2_value); - if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) { - if_block.p(ctx2, dirty); - } else { - if (if_block) - if_block.d(1); - if_block = current_block_type && current_block_type(ctx2); - if (if_block) { - if_block.c(); - if_block.m(label, t5); - } - } - }, - d(detaching) { - if (detaching) - detach(label); - if (if_block) { - if_block.d(); - } - } - }; -} -function create_fragment$6(ctx) { - let each_1_anchor; - let each_value = ( - /*configs*/ - ctx[0] - ); - let each_blocks = []; - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$3(get_each_context$3(ctx, each_value, i)); - } - return { - c() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - each_1_anchor = empty(); - }, - m(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - insert(target, each_1_anchor, anchor); - }, - p(ctx2, [dirty]) { - if (dirty & /*configs*/ - 1) { - each_value = /*configs*/ - ctx2[0]; - let i; - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$3(ctx2, each_value, i); - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block$3(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); - } - } - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - each_blocks.length = each_value.length; - } - }, - i: noop, - o: noop, - d(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) - detach(each_1_anchor); - } - }; -} -function instance$6($$self, $$props, $$invalidate) { - const storageManager = container.get(TYPES.StorageManager); - const pluginSystem = container.get(TYPES.PluginSystem); - let configs = [ - { - label: _("safemode"), - tip: _("safemodetip"), - checked: true, - type: "checkbox", - onChange: (event) => { - const checked = event.target.checked; - if (checked) { - pluginSystem.turnOnSafeMode(); - } else { - pluginSystem.turnOffSafeMode(); - } - } - }, - // { - // label: _('autoupgrade'), - // tip: _('autoupgradetip'), - // checked: true, - // type: 'checkbox', - // onChange: (event) => { - // storageManager.set(PLUGIN_SYSTEM_AUTO_UPDATE, event.target.checked); - // }, - // }, - { - label: _("store_url"), - tip: `${_("store_url_tip")} ${defaultConfig.PLUGIN_STORE_URL}`, - type: "input", - value: storageManager.get(PLUGIN_STORE_URL), - onChange: (event) => { - storageManager.set(PLUGIN_STORE_URL, event.target.value); - } - } - ]; - onMount(() => { - const securityMode = storageManager.get(PLUGIN_SYSTEM_SAFE_MODE_ENABLED); - $$invalidate(0, configs[0].checked = securityMode, configs); - const autoUpdate = storageManager.get(PLUGIN_SYSTEM_AUTO_UPDATE); - $$invalidate(0, configs[1].checked = autoUpdate, configs); - }); - function input_change_handler(each_value, config_index) { - each_value[config_index].checked = this.checked; - $$invalidate(0, configs); - } - function input_input_handler(each_value, config_index) { - each_value[config_index].value = this.value; - $$invalidate(0, configs); - } - return [configs, input_change_handler, input_input_handler]; -} -class Setting_common extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$6, create_fragment$6, safe_not_equal, {}); - } -} -const settingList_svelte_svelte_type_style_lang = ""; -function get_each_context$2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[10] = list[i]; - child_ctx[11] = list; - child_ctx[12] = i; - return child_ctx; -} -function create_if_block$3(ctx) { - let label; - let div1; - let t0_value = ( - /*plugin*/ - ctx[10].name + "" - ); - let t0; - let t1; - let t2_value = ( - /*plugin*/ - ctx[10].version + "" - ); - let t2; - let t3; - let span0; - let t5; - let div0; - let t6_value = ( - /*plugin*/ - (ctx[10].description || _("nodescription")) + "" - ); - let t6; - let t7; - let span1; - let t8; - let input; - let t9; - let mounted; - let dispose; - function click_handler(...args) { - return ( - /*click_handler*/ - ctx[4]( - /*plugin*/ - ctx[10], - ...args - ) - ); - } - function input_change_handler() { - ctx[5].call( - input, - /*each_value*/ - ctx[11], - /*plugin_index*/ - ctx[12] - ); - } - return { - c() { - label = element("label"); - div1 = element("div"); - t0 = text(t0_value); - t1 = space(); - t2 = text(t2_value); - t3 = space(); - span0 = element("span"); - span0.textContent = `${_("uninstall")}`; - t5 = space(); - div0 = element("div"); - t6 = text(t6_value); - t7 = space(); - span1 = element("span"); - t8 = space(); - input = element("input"); - t9 = space(); - attr(span0, "class", "remove svelte-bwhxpp"); - attr(div0, "class", "b3-label__text"); - attr(div1, "class", "plugin fn__flex-1 svelte-bwhxpp"); - attr(span1, "class", "fn__space"); - attr(input, "class", "b3-switch fn__flex-center"); - attr(input, "id", "fullWidth"); - attr(input, "type", "checkbox"); - attr(label, "class", "fn__flex b3-label"); - }, - m(target, anchor) { - insert(target, label, anchor); - append(label, div1); - append(div1, t0); - append(div1, t1); - append(div1, t2); - append(div1, t3); - append(div1, span0); - append(div1, t5); - append(div1, div0); - append(div0, t6); - append(label, t7); - append(label, span1); - append(label, t8); - append(label, input); - input.checked = /*plugin*/ - ctx[10].enabled; - append(label, t9); - if (!mounted) { - dispose = [ - listen(span0, "click", click_handler), - listen(input, "change", input_change_handler), - listen(input, "change", function() { - if (is_function( - /*onPluginEnabledChange*/ - ctx[1]( - /*plugin*/ - ctx[10].key - ) - )) - ctx[1]( - /*plugin*/ - ctx[10].key - ).apply(this, arguments); - }) - ]; - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*outsidePlugins*/ - 1 && t0_value !== (t0_value = /*plugin*/ - ctx[10].name + "")) - set_data(t0, t0_value); - if (dirty & /*outsidePlugins*/ - 1 && t2_value !== (t2_value = /*plugin*/ - ctx[10].version + "")) - set_data(t2, t2_value); - if (dirty & /*outsidePlugins*/ - 1 && t6_value !== (t6_value = /*plugin*/ - (ctx[10].description || _("nodescription")) + "")) - set_data(t6, t6_value); - if (dirty & /*outsidePlugins*/ - 1) { - input.checked = /*plugin*/ - ctx[10].enabled; - } - }, - d(detaching) { - if (detaching) - detach(label); - mounted = false; - run_all(dispose); - } - }; -} -function create_each_block$2(ctx) { - let if_block_anchor; - let if_block = !/*plugin*/ - ctx[10].hidden && create_if_block$3(ctx); - return { - c() { - if (if_block) - if_block.c(); - if_block_anchor = empty(); - }, - m(target, anchor) { - if (if_block) - if_block.m(target, anchor); - insert(target, if_block_anchor, anchor); - }, - p(ctx2, dirty) { - if (!/*plugin*/ - ctx2[10].hidden) { - if (if_block) { - if_block.p(ctx2, dirty); - } else { - if_block = create_if_block$3(ctx2); - if_block.c(); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - } else if (if_block) { - if_block.d(1); - if_block = null; - } - }, - d(detaching) { - if (if_block) - if_block.d(detaching); - if (detaching) - detach(if_block_anchor); - } - }; -} -function create_fragment$5(ctx) { - let label; - let div; - let each_value = ( - /*outsidePlugins*/ - ctx[0] - ); - let each_blocks = []; - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$2(get_each_context$2(ctx, each_value, i)); - } - return { - c() { - label = element("label"); - div = element("div"); - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - attr(div, "class", "fn__flex-1"); - attr(label, "class", "b3-label fn__flex"); - }, - m(target, anchor) { - insert(target, label, anchor); - append(label, div); - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div, null); - } - }, - p(ctx2, [dirty]) { - if (dirty & /*outsidePlugins, onPluginEnabledChange, _, uninstall*/ - 7) { - each_value = /*outsidePlugins*/ - ctx2[0]; - let i; - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$2(ctx2, each_value, i); - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block$2(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div, null); - } - } - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - each_blocks.length = each_value.length; - } - }, - i: noop, - o: noop, - d(detaching) { - if (detaching) - detach(label); - destroy_each(each_blocks, detaching); - } - }; -} -function instance$5($$self, $$props, $$invalidate) { - let outsidePlugins; - const storageManager = container.get(TYPES.StorageManager); - const pluginSystem = container.get(TYPES.PluginSystem); - let plugins = []; - const loadPlugins = () => { - $$invalidate(3, plugins = storageManager.getPlugins()); - }; - const dispatcher = createEventDispatcher(); - const onPluginEnabledChange = (key) => async (event) => { - const safeMode = storageManager.get(PLUGIN_SYSTEM_SAFE_MODE_ENABLED); - const checked = event.target.checked; - await storageManager.setPluginEnabled(key, checked); - if (safeMode) { - return; - } - if (checked) { - pluginSystem.loadPlugin(key); - } else { - pluginSystem.unloadPlugin(key); - } - dispatcher("update"); - }; - const uninstall2 = async (key, event) => { - event.preventDefault(); - event.stopPropagation(); - await pluginSystem.unloadPlugin(key); - await storageManager.uninstallPlugin(key); - await storageManager.initStorage(); - loadPlugins(); - }; - onMount(async () => { - await storageManager.initStorage(); - loadPlugins(); - }); - const click_handler = (plugin2, event) => uninstall2(plugin2.key, event); - function input_change_handler(each_value, plugin_index) { - each_value[plugin_index].enabled = this.checked; - $$invalidate(0, outsidePlugins), $$invalidate(3, plugins); - } - $$self.$$.update = () => { - if ($$self.$$.dirty & /*plugins*/ - 8) { - $$invalidate(0, outsidePlugins = plugins.filter((p) => p.script)); - } - }; - return [ - outsidePlugins, - onPluginEnabledChange, - uninstall2, - plugins, - click_handler, - input_change_handler - ]; -} -class Setting_list extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$5, create_fragment$5, safe_not_equal, {}); - } -} -var __defProp$9 = Object.defineProperty; -var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor; -var __decorateClass$9 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$9(target, key, result); - return result; -}; -var __decorateParam$6 = (index, decorator) => (target, key) => decorator(target, key, index); -let Store = class { - constructor(storageManager) { - this.storageManager = storageManager; - this.plugins = []; - this.pluginStatus = []; - } - async init() { - this.plugins = []; - this.pluginStatus = []; - await Promise.all([this.loadPluginsFromUrl(), this.storageManager.initStorage()]); - const plugins = this.storageManager.getPlugins(); - const storePlugins = []; - for (const plugin2 of this.plugins) { - const p = { ...plugin2, isExist: false, needUpgrade: false }; - plugins.find((p2) => p2.key === plugin2.key); - storePlugins.push(p); - } - this.pluginStatus = storePlugins; - } - getStoreUrl() { - return this.storageManager.get(PLUGIN_STORE_URL); - } - getPlugins() { - return this.plugins; - } - async loadPlugins() { - await this.init(); - return this.getPluginsWithStatus(); - } - getPluginsWithStatus() { - return this.pluginStatus; - } - async loadPluginsFromUrl() { - var _a2, _b; - const storeUrl = this.getStoreUrl(); - if (!storeUrl) { - return; - } - let res; - try { - res = await request.get(storeUrl + "/plugins.json", { - headers: { - "Cache-Control": "no-cache" - } - }); - } catch (e) { - console.error(e); - return; - } - const req = []; - if (Array.isArray((_a2 = res.data) == null ? void 0 : _a2.plugins)) { - for (const pluginKey of ((_b = res.data) == null ? void 0 : _b.plugins) || {}) { - const plugin2 = this.getPluginManifest(`${storeUrl}/${pluginKey}`); - req.push(plugin2); - } - } - this.plugins = await Promise.all(req); - } - async getPluginByUrl(url2) { - return Promise.all([this.getPluginManifest(url2), this.getPluginMainJs(url2)]).then((value) => { - return { - manifest: value[0], - mainJs: value[1] - }; - }); - } - async getPluginManifest(url2) { - try { - const manifest = await request.get(`${url2}/manifest.json`, { - headers: { - "Content-Type": "application/json", - "Cache-Control": "no-cache" - } - }); - return manifest.data; - } catch (e) { - console.error(e); - return null; - } - } - async getPluginMainJs(url2) { - try { - const res = await request.get(`${url2}/main.js`, { - headers: { - "Content-Type": "text/plain", - "Cache-Control": "no-cache" - } - }); - return res.data; - } catch (e) { - console.error(e); - return null; - } - } - async getPluginReadme(key) { - const url2 = `${this.getStoreUrl()}/${key}`; - try { - const res = await request.get(`${url2}/README.md`, { - headers: { - "Content-Type": "text/plain", - "Cache-Control": "no-cache" - } - }); - return res.data; - } catch (e) { - console.error(e); - return null; - } - } - async downloadPlugin(key) { - await sleep(500); - const files = await this.getPluginByUrl(`${this.getStoreUrl()}/${key}`); - const manifestJson = files.manifest; - const mainJs = files.mainJs; - return await Promise.all([ - FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${key}`, null, true), - FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${key}/manifest.json`, JSON.stringify(manifestJson), false), - FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${key}/main.js`, mainJs, false) - ]); - } -}; -Store = __decorateClass$9([ - injectable(), - __decorateParam$6(0, inject(TYPES.StorageManager)) -], Store); -function create_fragment$4(ctx) { - let button; - let current; - let mounted; - let dispose; - const default_slot_template = ( - /*#slots*/ - ctx[3].default - ); - const default_slot = create_slot( - default_slot_template, - ctx, - /*$$scope*/ - ctx[2], - null - ); - return { - c() { - button = element("button"); - if (default_slot) - default_slot.c(); - button.disabled = /*disabled*/ - ctx[1]; - attr(button, "class", "b3-button"); - }, - m(target, anchor) { - insert(target, button, anchor); - if (default_slot) { - default_slot.m(button, null); - } - current = true; - if (!mounted) { - dispose = listen(button, "click", function() { - if (is_function( - /*onClick*/ - ctx[0] - )) - ctx[0].apply(this, arguments); - }); - mounted = true; - } - }, - p(new_ctx, [dirty]) { - ctx = new_ctx; - if (default_slot) { - if (default_slot.p && (!current || dirty & /*$$scope*/ - 4)) { - update_slot_base( - default_slot, - default_slot_template, - ctx, - /*$$scope*/ - ctx[2], - !current ? get_all_dirty_from_scope( - /*$$scope*/ - ctx[2] - ) : get_slot_changes( - default_slot_template, - /*$$scope*/ - ctx[2], - dirty, - null - ), - null - ); - } - } - if (!current || dirty & /*disabled*/ - 2) { - button.disabled = /*disabled*/ - ctx[1]; - } - }, - i(local) { - if (current) - return; - transition_in(default_slot, local); - current = true; - }, - o(local) { - transition_out(default_slot, local); - current = false; - }, - d(detaching) { - if (detaching) - detach(button); - if (default_slot) - default_slot.d(detaching); - mounted = false; - dispose(); - } - }; -} -function instance$4($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - let { onClick = null } = $$props; - let { disabled = false } = $$props; - $$self.$$set = ($$props2) => { - if ("onClick" in $$props2) - $$invalidate(0, onClick = $$props2.onClick); - if ("disabled" in $$props2) - $$invalidate(1, disabled = $$props2.disabled); - if ("$$scope" in $$props2) - $$invalidate(2, $$scope = $$props2.$$scope); - }; - return [onClick, disabled, $$scope, slots]; -} -class Button extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$4, create_fragment$4, safe_not_equal, { onClick: 0, disabled: 1 }); - } -} -const settingPreview_svelte_svelte_type_style_lang = ""; -function create_if_block_4$1(ctx) { - let div; - let t0_value = _("url") + ""; - let t0; - let t1; - let a2; - let t2_value = ( - /*plugin*/ - ctx[0].url + "" - ); - let t2; - let a_href_value; - return { - c() { - div = element("div"); - t0 = text(t0_value); - t1 = text(": "); - a2 = element("a"); - t2 = text(t2_value); - attr(a2, "href", a_href_value = /*plugin*/ - ctx[0].url); - attr(a2, "target", "_blank"); - attr(a2, "rel", "noreferrer"); - attr(div, "class", "plugin-item"); - }, - m(target, anchor) { - insert(target, div, anchor); - append(div, t0); - append(div, t1); - append(div, a2); - append(a2, t2); - }, - p(ctx2, dirty) { - if (dirty & /*plugin*/ - 1 && t2_value !== (t2_value = /*plugin*/ - ctx2[0].url + "")) - set_data(t2, t2_value); - if (dirty & /*plugin*/ - 1 && a_href_value !== (a_href_value = /*plugin*/ - ctx2[0].url)) { - attr(a2, "href", a_href_value); - } - }, - d(detaching) { - if (detaching) - detach(div); - } - }; -} -function create_if_block_3$1(ctx) { - let div; - let t0_value = _("author") + ""; - let t0; - let t1; - let t2_value = ( - /*plugin*/ - ctx[0].author + "" - ); - let t2; - return { - c() { - div = element("div"); - t0 = text(t0_value); - t1 = text(": "); - t2 = text(t2_value); - attr(div, "class", "plugin-item"); - }, - m(target, anchor) { - insert(target, div, anchor); - append(div, t0); - append(div, t1); - append(div, t2); - }, - p(ctx2, dirty) { - if (dirty & /*plugin*/ - 1 && t2_value !== (t2_value = /*plugin*/ - ctx2[0].author + "")) - set_data(t2, t2_value); - }, - d(detaching) { - if (detaching) - detach(div); - } - }; -} -function create_if_block_2$1(ctx) { - let div; - let t0_value = _("version") + ""; - let t0; - let t1; - let t2_value = ( - /*plugin*/ - ctx[0].version + "" - ); - let t2; - return { - c() { - div = element("div"); - t0 = text(t0_value); - t1 = text(": "); - t2 = text(t2_value); - attr(div, "class", "plugin-item"); - }, - m(target, anchor) { - insert(target, div, anchor); - append(div, t0); - append(div, t1); - append(div, t2); - }, - p(ctx2, dirty) { - if (dirty & /*plugin*/ - 1 && t2_value !== (t2_value = /*plugin*/ - ctx2[0].version + "")) - set_data(t2, t2_value); - }, - d(detaching) { - if (detaching) - detach(div); - } - }; -} -function create_if_block_1$2(ctx) { - let div; - let t0_value = _("description") + ""; - let t0; - let t1; - let t2_value = ( - /*plugin*/ - ctx[0].description + "" - ); - let t2; - return { - c() { - div = element("div"); - t0 = text(t0_value); - t1 = text(": "); - t2 = text(t2_value); - attr(div, "class", "plugin-item"); - }, - m(target, anchor) { - insert(target, div, anchor); - append(div, t0); - append(div, t1); - append(div, t2); - }, - p(ctx2, dirty) { - if (dirty & /*plugin*/ - 1 && t2_value !== (t2_value = /*plugin*/ - ctx2[0].description + "")) - set_data(t2, t2_value); - }, - d(detaching) { - if (detaching) - detach(div); - } - }; -} -function create_else_block$2(ctx) { - let html_tag; - let raw_value = ( - /*previewHTML*/ - ctx[2]() + "" - ); - let html_anchor; - return { - c() { - html_tag = new HtmlTag(false); - html_anchor = empty(); - html_tag.a = html_anchor; - }, - m(target, anchor) { - html_tag.m(raw_value, target, anchor); - insert(target, html_anchor, anchor); - }, - p(ctx2, dirty) { - if (dirty & /*previewHTML*/ - 4 && raw_value !== (raw_value = /*previewHTML*/ - ctx2[2]() + "")) - html_tag.p(raw_value); - }, - d(detaching) { - if (detaching) - detach(html_anchor); - if (detaching) - html_tag.d(); - } - }; -} -function create_if_block$2(ctx) { - let span; - return { - c() { - span = element("span"); - span.textContent = `${_("readme")}`; - }, - m(target, anchor) { - insert(target, span, anchor); - }, - p: noop, - d(detaching) { - if (detaching) - detach(span); - } - }; -} -function create_fragment$3(ctx) { - let div6; - let div4; - let div2; - let div0; - let t0_value = ( - /*plugin*/ - ctx[0].name + "" - ); - let t0; - let t1; - let div1; - let t2; - let t3_value = ( - /*plugin*/ - ctx[0].key + "" - ); - let t3; - let t4; - let t5; - let button; - let svg; - let use; - let t6_value = _("goBack") + ""; - let t6; - let t7; - let div3; - let t8; - let t9; - let t10; - let t11; - let hr; - let t12; - let div5; - let mounted; - let dispose; - let if_block0 = ( - /*plugin*/ - ctx[0].url && create_if_block_4$1(ctx) - ); - let if_block1 = ( - /*plugin*/ - ctx[0].author && create_if_block_3$1(ctx) - ); - let if_block2 = ( - /*plugin*/ - ctx[0].version && create_if_block_2$1(ctx) - ); - let if_block3 = ( - /*plugin*/ - ctx[0].description && create_if_block_1$2(ctx) - ); - function select_block_type(ctx2, dirty) { - if ( - /*loading*/ - ctx2[1] - ) - return create_if_block$2; - return create_else_block$2; - } - let current_block_type = select_block_type(ctx); - let if_block4 = current_block_type(ctx); - return { - c() { - div6 = element("div"); - div4 = element("div"); - div2 = element("div"); - div0 = element("div"); - t0 = text(t0_value); - t1 = space(); - div1 = element("div"); - t2 = text("("); - t3 = text(t3_value); - t4 = text(")"); - t5 = space(); - button = element("button"); - svg = svg_element("svg"); - use = svg_element("use"); - t6 = text(t6_value); - t7 = space(); - div3 = element("div"); - if (if_block0) - if_block0.c(); - t8 = space(); - if (if_block1) - if_block1.c(); - t9 = space(); - if (if_block2) - if_block2.c(); - t10 = space(); - if (if_block3) - if_block3.c(); - t11 = space(); - hr = element("hr"); - t12 = space(); - div5 = element("div"); - if_block4.c(); - attr(div0, "class", "plugin-name svelte-bj9chc"); - attr(div1, "class", "plugin-key svelte-bj9chc"); - xlink_attr(use, "xlink:href", "#iconBack"); - attr(svg, "class", "go-back-icon svelte-bj9chc"); - attr(button, "class", "go-back b3-button svelte-bj9chc"); - attr(div2, "class", "plugin-info svelte-bj9chc"); - attr(div3, "class", "plugin-manifest svelte-bj9chc"); - attr(div4, "class", "plugin-basic"); - attr(div5, "class", "plugin-readme b3-typography svelte-bj9chc"); - attr(div6, "class", "plugin-detail svelte-bj9chc"); - }, - m(target, anchor) { - insert(target, div6, anchor); - append(div6, div4); - append(div4, div2); - append(div2, div0); - append(div0, t0); - append(div2, t1); - append(div2, div1); - append(div1, t2); - append(div1, t3); - append(div1, t4); - append(div2, t5); - append(div2, button); - append(button, svg); - append(svg, use); - append(button, t6); - append(div4, t7); - append(div4, div3); - if (if_block0) - if_block0.m(div3, null); - append(div3, t8); - if (if_block1) - if_block1.m(div3, null); - append(div3, t9); - if (if_block2) - if_block2.m(div3, null); - append(div3, t10); - if (if_block3) - if_block3.m(div3, null); - append(div6, t11); - append(div6, hr); - append(div6, t12); - append(div6, div5); - if_block4.m(div5, null); - if (!mounted) { - dispose = listen( - button, - "click", - /*click_handler*/ - ctx[5] - ); - mounted = true; - } - }, - p(ctx2, [dirty]) { - if (dirty & /*plugin*/ - 1 && t0_value !== (t0_value = /*plugin*/ - ctx2[0].name + "")) - set_data(t0, t0_value); - if (dirty & /*plugin*/ - 1 && t3_value !== (t3_value = /*plugin*/ - ctx2[0].key + "")) - set_data(t3, t3_value); - if ( - /*plugin*/ - ctx2[0].url - ) { - if (if_block0) { - if_block0.p(ctx2, dirty); - } else { - if_block0 = create_if_block_4$1(ctx2); - if_block0.c(); - if_block0.m(div3, t8); - } - } else if (if_block0) { - if_block0.d(1); - if_block0 = null; - } - if ( - /*plugin*/ - ctx2[0].author - ) { - if (if_block1) { - if_block1.p(ctx2, dirty); - } else { - if_block1 = create_if_block_3$1(ctx2); - if_block1.c(); - if_block1.m(div3, t9); - } - } else if (if_block1) { - if_block1.d(1); - if_block1 = null; - } - if ( - /*plugin*/ - ctx2[0].version - ) { - if (if_block2) { - if_block2.p(ctx2, dirty); - } else { - if_block2 = create_if_block_2$1(ctx2); - if_block2.c(); - if_block2.m(div3, t10); - } - } else if (if_block2) { - if_block2.d(1); - if_block2 = null; - } - if ( - /*plugin*/ - ctx2[0].description - ) { - if (if_block3) { - if_block3.p(ctx2, dirty); - } else { - if_block3 = create_if_block_1$2(ctx2); - if_block3.c(); - if_block3.m(div3, null); - } - } else if (if_block3) { - if_block3.d(1); - if_block3 = null; - } - if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block4) { - if_block4.p(ctx2, dirty); - } else { - if_block4.d(1); - if_block4 = current_block_type(ctx2); - if (if_block4) { - if_block4.c(); - if_block4.m(div5, null); - } - } - }, - i: noop, - o: noop, - d(detaching) { - if (detaching) - detach(div6); - if (if_block0) - if_block0.d(); - if (if_block1) - if_block1.d(); - if (if_block2) - if_block2.d(); - if (if_block3) - if_block3.d(); - if_block4.d(); - mounted = false; - dispose(); - } - }; -} -function instance$3($$self, $$props, $$invalidate) { - let previewHTML; - const dispatch2 = createEventDispatcher(); - let loading2 = true; - let { plugin: plugin2 } = $$props; - const getPluginReadme = async () => { - $$invalidate(4, readme2 = await container.get("Store").getPluginReadme(plugin2.key)); - $$invalidate(1, loading2 = false); - }; - let readme2; - const LuteMdConverter = window.Lute.New(); - onMount(() => { - getPluginReadme(); - }); - const goBack2 = () => { - dispatch2("goback"); - }; - const click_handler = () => goBack2(); - $$self.$$set = ($$props2) => { - if ("plugin" in $$props2) - $$invalidate(0, plugin2 = $$props2.plugin); - }; - $$self.$$.update = () => { - if ($$self.$$.dirty & /*readme*/ - 16) { - $$invalidate(2, previewHTML = () => { - return readme2 ? LuteMdConverter.Md2HTML(readme2) : ""; - }); - } - }; - return [plugin2, loading2, previewHTML, goBack2, readme2, click_handler]; -} -class Setting_preview extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$3, create_fragment$3, safe_not_equal, { plugin: 0 }); - } -} -function get_each_context$1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[11] = list[i]; - return child_ctx; -} -function create_else_block_2(ctx) { - let settingpreview; - let current; - settingpreview = new Setting_preview({ - props: { plugin: ( - /*selectedPlugin*/ - ctx[3] - ) } - }); - settingpreview.$on( - "goback", - /*goback_handler*/ - ctx[9] - ); - return { - c() { - create_component(settingpreview.$$.fragment); - }, - m(target, anchor) { - mount_component(settingpreview, target, anchor); - current = true; - }, - p(ctx2, dirty) { - const settingpreview_changes = {}; - if (dirty & /*selectedPlugin*/ - 8) - settingpreview_changes.plugin = /*selectedPlugin*/ - ctx2[3]; - settingpreview.$set(settingpreview_changes); - }, - i(local) { - if (current) - return; - transition_in(settingpreview.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(settingpreview.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(settingpreview, detaching); - } - }; -} -function create_if_block_1$1(ctx) { - let div; - let current; - let each_value = ( - /*plugins*/ - ctx[0] - ); - let each_blocks = []; - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); - } - const out = (i) => transition_out(each_blocks[i], 1, 1, () => { - each_blocks[i] = null; - }); - return { - c() { - div = element("div"); - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - attr(div, "class", "fn__flex-1"); - }, - m(target, anchor) { - insert(target, div, anchor); - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div, null); - } - current = true; - }, - p(ctx2, dirty) { - if (dirty & /*_, loadingMap, plugins, downloadPlugin, previewPlugin*/ - 53) { - each_value = /*plugins*/ - ctx2[0]; - let i; - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context$1(ctx2, each_value, i); - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - transition_in(each_blocks[i], 1); - } else { - each_blocks[i] = create_each_block$1(child_ctx); - each_blocks[i].c(); - transition_in(each_blocks[i], 1); - each_blocks[i].m(div, null); - } - } - group_outros(); - for (i = each_value.length; i < each_blocks.length; i += 1) { - out(i); - } - check_outros(); - } - }, - i(local) { - if (current) - return; - for (let i = 0; i < each_value.length; i += 1) { - transition_in(each_blocks[i]); - } - current = true; - }, - o(local) { - each_blocks = each_blocks.filter(Boolean); - for (let i = 0; i < each_blocks.length; i += 1) { - transition_out(each_blocks[i]); - } - current = false; - }, - d(detaching) { - if (detaching) - detach(div); - destroy_each(each_blocks, detaching); - } - }; -} -function create_if_block$1(ctx) { - let div; - return { - c() { - div = element("div"); - div.textContent = `${_("loading")}`; - }, - m(target, anchor) { - insert(target, div, anchor); - }, - p: noop, - i: noop, - o: noop, - d(detaching) { - if (detaching) - detach(div); - } - }; -} -function create_else_block_1(ctx) { - let button; - let current; - function func_1() { - return ( - /*func_1*/ - ctx[8]( - /*plugin*/ - ctx[11] - ) - ); - } - button = new Button({ - props: { - onClick: func_1, - $$slots: { default: [create_default_slot_3] }, - $$scope: { ctx } - } - }); - return { - c() { - create_component(button.$$.fragment); - }, - m(target, anchor) { - mount_component(button, target, anchor); - current = true; - }, - p(new_ctx, dirty) { - ctx = new_ctx; - const button_changes = {}; - if (dirty & /*plugins*/ - 1) - button_changes.onClick = func_1; - if (dirty & /*$$scope*/ - 16384) { - button_changes.$$scope = { dirty, ctx }; - } - button.$set(button_changes); - }, - i(local) { - if (current) - return; - transition_in(button.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(button.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(button, detaching); - } - }; -} -function create_if_block_3(ctx) { - let current_block_type_index; - let if_block; - let if_block_anchor; - let current; - const if_block_creators = [create_if_block_4, create_else_block$1]; - const if_blocks = []; - function select_block_type_2(ctx2, dirty) { - if ( - /*plugin*/ - ctx2[11].needUpgrade - ) - return 0; - return 1; - } - current_block_type_index = select_block_type_2(ctx); - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - return { - c() { - if_block.c(); - if_block_anchor = empty(); - }, - m(target, anchor) { - if_blocks[current_block_type_index].m(target, anchor); - insert(target, if_block_anchor, anchor); - current = true; - }, - p(ctx2, dirty) { - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type_2(ctx2); - if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(ctx2, dirty); - } else { - group_outros(); - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - check_outros(); - if_block = if_blocks[current_block_type_index]; - if (!if_block) { - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); - if_block.c(); - } else { - if_block.p(ctx2, dirty); - } - transition_in(if_block, 1); - if_block.m(if_block_anchor.parentNode, if_block_anchor); - } - }, - i(local) { - if (current) - return; - transition_in(if_block); - current = true; - }, - o(local) { - transition_out(if_block); - current = false; - }, - d(detaching) { - if_blocks[current_block_type_index].d(detaching); - if (detaching) - detach(if_block_anchor); - } - }; -} -function create_if_block_2(ctx) { - let button; - let current; - button = new Button({ - props: { - disabled: true, - $$slots: { default: [create_default_slot] }, - $$scope: { ctx } - } - }); - return { - c() { - create_component(button.$$.fragment); - }, - m(target, anchor) { - mount_component(button, target, anchor); - current = true; - }, - p(ctx2, dirty) { - const button_changes = {}; - if (dirty & /*$$scope*/ - 16384) { - button_changes.$$scope = { dirty, ctx: ctx2 }; - } - button.$set(button_changes); - }, - i(local) { - if (current) - return; - transition_in(button.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(button.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(button, detaching); - } - }; -} -function create_default_slot_3(ctx) { - let t_value = _("download") + ""; - let t2; - return { - c() { - t2 = text(t_value); - }, - m(target, anchor) { - insert(target, t2, anchor); - }, - p: noop, - d(detaching) { - if (detaching) - detach(t2); - } - }; -} -function create_else_block$1(ctx) { - let button; - let current; - button = new Button({ - props: { - disabled: true, - $$slots: { default: [create_default_slot_2] }, - $$scope: { ctx } - } - }); - return { - c() { - create_component(button.$$.fragment); - }, - m(target, anchor) { - mount_component(button, target, anchor); - current = true; - }, - p(ctx2, dirty) { - const button_changes = {}; - if (dirty & /*$$scope*/ - 16384) { - button_changes.$$scope = { dirty, ctx: ctx2 }; - } - button.$set(button_changes); - }, - i(local) { - if (current) - return; - transition_in(button.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(button.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(button, detaching); - } - }; -} -function create_if_block_4(ctx) { - let button; - let current; - function func() { - return ( - /*func*/ - ctx[7]( - /*plugin*/ - ctx[11] - ) - ); - } - button = new Button({ - props: { - onClick: func, - $$slots: { default: [create_default_slot_1] }, - $$scope: { ctx } - } - }); - return { - c() { - create_component(button.$$.fragment); - }, - m(target, anchor) { - mount_component(button, target, anchor); - current = true; - }, - p(new_ctx, dirty) { - ctx = new_ctx; - const button_changes = {}; - if (dirty & /*plugins*/ - 1) - button_changes.onClick = func; - if (dirty & /*$$scope*/ - 16384) { - button_changes.$$scope = { dirty, ctx }; - } - button.$set(button_changes); - }, - i(local) { - if (current) - return; - transition_in(button.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(button.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(button, detaching); - } - }; -} -function create_default_slot_2(ctx) { - let t_value = _("downloaded") + ""; - let t2; - return { - c() { - t2 = text(t_value); - }, - m(target, anchor) { - insert(target, t2, anchor); - }, - p: noop, - d(detaching) { - if (detaching) - detach(t2); - } - }; -} -function create_default_slot_1(ctx) { - let t_value = _("upgrade") + ""; - let t2; - return { - c() { - t2 = text(t_value); - }, - m(target, anchor) { - insert(target, t2, anchor); - }, - p: noop, - d(detaching) { - if (detaching) - detach(t2); - } - }; -} -function create_default_slot(ctx) { - let t_value = _("downloading") + ""; - let t2; - return { - c() { - t2 = text(t_value); - }, - m(target, anchor) { - insert(target, t2, anchor); - }, - p: noop, - d(detaching) { - if (detaching) - detach(t2); - } - }; -} -function create_each_block$1(ctx) { - let label; - let div1; - let a2; - let t0_value = ( - /*plugin*/ - ctx[11].name + "" - ); - let t0; - let t1; - let t2_value = ( - /*plugin*/ - ctx[11].version + "" - ); - let t2; - let t3; - let div0; - let t4_value = ( - /*plugin*/ - (ctx[11].description || "") + "" - ); - let t4; - let t5; - let span; - let t6; - let current_block_type_index; - let if_block; - let t7; - let current; - let mounted; - let dispose; - function click_handler(...args) { - return ( - /*click_handler*/ - ctx[6]( - /*plugin*/ - ctx[11], - ...args - ) - ); - } - const if_block_creators = [create_if_block_2, create_if_block_3, create_else_block_1]; - const if_blocks = []; - function select_block_type_1(ctx2, dirty) { - if ( - /*loadingMap*/ - ctx2[2][ - /*plugin*/ - ctx2[11].key - ] - ) - return 0; - if ( - /*plugin*/ - ctx2[11].isExist - ) - return 1; - return 2; - } - current_block_type_index = select_block_type_1(ctx); - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - return { - c() { - label = element("label"); - div1 = element("div"); - a2 = element("a"); - t0 = text(t0_value); - t1 = space(); - t2 = text(t2_value); - t3 = space(); - div0 = element("div"); - t4 = text(t4_value); - t5 = space(); - span = element("span"); - t6 = space(); - if_block.c(); - t7 = space(); - attr(a2, "href", "javascript:void(0)"); - attr(a2, "class", ""); - attr(div0, "class", "b3-label__text"); - attr(div1, "class", "fn__flex-1"); - attr(span, "class", "fn__space"); - attr(label, "class", "fn__flex b3-label"); - }, - m(target, anchor) { - insert(target, label, anchor); - append(label, div1); - append(div1, a2); - append(a2, t0); - append(div1, t1); - append(div1, t2); - append(div1, t3); - append(div1, div0); - append(div0, t4); - append(label, t5); - append(label, span); - append(label, t6); - if_blocks[current_block_type_index].m(label, null); - append(label, t7); - current = true; - if (!mounted) { - dispose = listen(a2, "click", click_handler); - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - if ((!current || dirty & /*plugins*/ - 1) && t0_value !== (t0_value = /*plugin*/ - ctx[11].name + "")) - set_data(t0, t0_value); - if ((!current || dirty & /*plugins*/ - 1) && t2_value !== (t2_value = /*plugin*/ - ctx[11].version + "")) - set_data(t2, t2_value); - if ((!current || dirty & /*plugins*/ - 1) && t4_value !== (t4_value = /*plugin*/ - (ctx[11].description || "") + "")) - set_data(t4, t4_value); - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type_1(ctx); - if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(ctx, dirty); - } else { - group_outros(); - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - check_outros(); - if_block = if_blocks[current_block_type_index]; - if (!if_block) { - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - if_block.c(); - } else { - if_block.p(ctx, dirty); - } - transition_in(if_block, 1); - if_block.m(label, t7); - } - }, - i(local) { - if (current) - return; - transition_in(if_block); - current = true; - }, - o(local) { - transition_out(if_block); - current = false; - }, - d(detaching) { - if (detaching) - detach(label); - if_blocks[current_block_type_index].d(); - mounted = false; - dispose(); - } - }; -} -function create_fragment$2(ctx) { - let div; - let current_block_type_index; - let if_block; - let current; - const if_block_creators = [create_if_block$1, create_if_block_1$1, create_else_block_2]; - const if_blocks = []; - function select_block_type(ctx2, dirty) { - if ( - /*loading*/ - ctx2[1] - ) - return 0; - if (!/*selectedPlugin*/ - ctx2[3]) - return 1; - return 2; - } - current_block_type_index = select_block_type(ctx); - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - return { - c() { - div = element("div"); - if_block.c(); - attr(div, "class", "b3-label fn__flex"); - }, - m(target, anchor) { - insert(target, div, anchor); - if_blocks[current_block_type_index].m(div, null); - current = true; - }, - p(ctx2, [dirty]) { - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type(ctx2); - if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(ctx2, dirty); - } else { - group_outros(); - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - check_outros(); - if_block = if_blocks[current_block_type_index]; - if (!if_block) { - if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); - if_block.c(); - } else { - if_block.p(ctx2, dirty); - } - transition_in(if_block, 1); - if_block.m(div, null); - } - }, - i(local) { - if (current) - return; - transition_in(if_block); - current = true; - }, - o(local) { - transition_out(if_block); - current = false; - }, - d(detaching) { - if (detaching) - detach(div); - if_blocks[current_block_type_index].d(); - } - }; -} -function instance$2($$self, $$props, $$invalidate) { - const store = container.get(TYPES.Store); - let plugins = []; - let loading2 = true; - const loadingMap = {}; - onMount(async () => { - $$invalidate(0, plugins = await store.loadPlugins()); - $$invalidate(1, loading2 = false); - }); - const downloadPlugin = async (key) => { - if (loadingMap[key]) { - return; - } - try { - $$invalidate(2, loadingMap[key] = true, loadingMap); - await store.downloadPlugin(key); - const p = plugins.find((k2) => k2.key === key); - if (p) { - p.isExist = true; - p.needUpgrade = false; - } - } finally { - $$invalidate(2, loadingMap[key] = false, loadingMap); - } - }; - let selectedPlugin = null; - const previewPlugin = (event, plugin2) => { - $$invalidate(3, selectedPlugin = plugin2); - event.stopPropagation(); - event.preventDefault(); - }; - const click_handler = (plugin2, event) => previewPlugin(event, plugin2); - const func = (plugin2) => downloadPlugin(plugin2.key); - const func_1 = (plugin2) => downloadPlugin(plugin2.key); - const goback_handler = () => $$invalidate(3, selectedPlugin = null); - return [ - plugins, - loading2, - loadingMap, - selectedPlugin, - downloadPlugin, - previewPlugin, - click_handler, - func, - func_1, - goback_handler - ]; -} -class Setting_store extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$2, create_fragment$2, safe_not_equal, {}); - } -} -function create_fragment$1(ctx) { - let div; - return { - c() { - div = element("div"); - attr(div, "id", "setting-custom-render"); - }, - m(target, anchor) { - insert(target, div, anchor); - }, - p: noop, - i: noop, - o: noop, - d(detaching) { - if (detaching) - detach(div); - } - }; -} -function instance$1($$self, $$props, $$invalidate) { - let root; - let { render: render2 } = $$props; - onMount(() => { - $$invalidate(1, root = document.createElement("div")); - document.getElementById("setting-custom-render").appendChild(root); - render2(root); - }); - $$self.$$set = ($$props2) => { - if ("render" in $$props2) - $$invalidate(0, render2 = $$props2.render); - }; - $$self.$$.update = () => { - if ($$self.$$.dirty & /*root, render*/ - 3) { - { - const el = document.getElementById("setting-custom-render"); - if (el) { - if (root) { - root.remove(); - } - $$invalidate(1, root = document.createElement("div")); - document.getElementById("setting-custom-render").appendChild(root); - render2(root); - } - } - } - }; - return [render2, root]; -} -class Setting_custom extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance$1, create_fragment$1, safe_not_equal, { render: 0 }); - } -} -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[13] = list[i]; - return child_ctx; -} -function get_each_context_1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[13] = list[i]; - return child_ctx; -} -function create_each_block_1(ctx) { - let li; - let span; - let t_value = ( - /*menu*/ - ctx[13].name + "" - ); - let t2; - let li_class_value; - let mounted; - let dispose; - function click_handler() { - return ( - /*click_handler*/ - ctx[6]( - /*menu*/ - ctx[13] - ) - ); - } - return { - c() { - li = element("li"); - span = element("span"); - t2 = text(t_value); - attr(span, "class", "b3-list-item__text"); - attr( - li, - "data-name", - /*menu*/ - ctx[13].key - ); - attr(li, "class", li_class_value = /*currentSelection*/ - ctx[0].key === /*menu*/ - ctx[13].key ? "b3-list-item--focus b3-list-item b3-list-item--big" : "b3-list-item b3-list-item--big"); - }, - m(target, anchor) { - insert(target, li, anchor); - append(li, span); - append(span, t2); - if (!mounted) { - dispose = listen(li, "click", click_handler); - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*currentSelection*/ - 1 && li_class_value !== (li_class_value = /*currentSelection*/ - ctx[0].key === /*menu*/ - ctx[13].key ? "b3-list-item--focus b3-list-item b3-list-item--big" : "b3-list-item b3-list-item--big")) { - attr(li, "class", li_class_value); - } - }, - d(detaching) { - if (detaching) - detach(li); - mounted = false; - dispose(); - } - }; -} -function create_if_block_1(ctx) { - let hr; - return { - c() { - hr = element("hr"); - set_style(hr, "margin", "12px"); - }, - m(target, anchor) { - insert(target, hr, anchor); - }, - d(detaching) { - if (detaching) - detach(hr); - } - }; -} -function create_each_block(ctx) { - let li; - let span; - let t0_value = ( - /*menu*/ - ctx[13].name + "" - ); - let t0; - let t1; - let li_data_name_value; - let li_class_value; - let mounted; - let dispose; - function click_handler_1() { - return ( - /*click_handler_1*/ - ctx[7]( - /*menu*/ - ctx[13] - ) - ); - } - return { - c() { - li = element("li"); - span = element("span"); - t0 = text(t0_value); - t1 = space(); - attr(span, "class", "b3-list-item__text"); - attr(li, "data-name", li_data_name_value = /*menu*/ - ctx[13].key); - attr(li, "class", li_class_value = /*currentSelection*/ - ctx[0].key === /*menu*/ - ctx[13].key ? "b3-list-item--focus b3-list-item b3-list-item--big" : "b3-list-item b3-list-item--big"); - }, - m(target, anchor) { - insert(target, li, anchor); - append(li, span); - append(span, t0); - append(li, t1); - if (!mounted) { - dispose = listen(li, "click", click_handler_1); - mounted = true; - } - }, - p(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*thirdMenus*/ - 2 && t0_value !== (t0_value = /*menu*/ - ctx[13].name + "")) - set_data(t0, t0_value); - if (dirty & /*thirdMenus*/ - 2 && li_data_name_value !== (li_data_name_value = /*menu*/ - ctx[13].key)) { - attr(li, "data-name", li_data_name_value); - } - if (dirty & /*currentSelection, thirdMenus*/ - 3 && li_class_value !== (li_class_value = /*currentSelection*/ - ctx[0].key === /*menu*/ - ctx[13].key ? "b3-list-item--focus b3-list-item b3-list-item--big" : "b3-list-item b3-list-item--big")) { - attr(li, "class", li_class_value); - } - }, - d(detaching) { - if (detaching) - detach(li); - mounted = false; - dispose(); - } - }; -} -function create_else_block(ctx) { - let settingcustom; - let current; - settingcustom = new Setting_custom({ - props: { - render: ( - /*currentSelection*/ - ctx[0].render - ) - } - }); - return { - c() { - create_component(settingcustom.$$.fragment); - }, - m(target, anchor) { - mount_component(settingcustom, target, anchor); - current = true; - }, - p(ctx2, dirty) { - const settingcustom_changes = {}; - if (dirty & /*currentSelection*/ - 1) - settingcustom_changes.render = /*currentSelection*/ - ctx2[0].render; - settingcustom.$set(settingcustom_changes); - }, - i(local) { - if (current) - return; - transition_in(settingcustom.$$.fragment, local); - current = true; - }, - o(local) { - transition_out(settingcustom.$$.fragment, local); - current = false; - }, - d(detaching) { - destroy_component(settingcustom, detaching); - } - }; -} -function create_if_block(ctx) { - let switch_instance; - let switch_instance_anchor; - let current; - var switch_value = ( - /*currentSelection*/ - ctx[0].component - ); - function switch_props(ctx2) { - return {}; - } - if (switch_value) { - switch_instance = construct_svelte_component(switch_value, switch_props()); - switch_instance.$on( - "update", - /*update_handler*/ - ctx[8] - ); - } - return { - c() { - if (switch_instance) - create_component(switch_instance.$$.fragment); - switch_instance_anchor = empty(); - }, - m(target, anchor) { - if (switch_instance) - mount_component(switch_instance, target, anchor); - insert(target, switch_instance_anchor, anchor); - current = true; - }, - p(ctx2, dirty) { - if (switch_value !== (switch_value = /*currentSelection*/ - ctx2[0].component)) { - if (switch_instance) { - group_outros(); - const old_component = switch_instance; - transition_out(old_component.$$.fragment, 1, 0, () => { - destroy_component(old_component, 1); - }); - check_outros(); - } - if (switch_value) { - switch_instance = construct_svelte_component(switch_value, switch_props()); - switch_instance.$on( - "update", - /*update_handler*/ - ctx2[8] - ); - create_component(switch_instance.$$.fragment); - transition_in(switch_instance.$$.fragment, 1); - mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor); - } else { - switch_instance = null; - } - } - }, - i(local) { - if (current) - return; - if (switch_instance) - transition_in(switch_instance.$$.fragment, local); - current = true; - }, - o(local) { - if (switch_instance) - transition_out(switch_instance.$$.fragment, local); - current = false; - }, - d(detaching) { - if (detaching) - detach(switch_instance_anchor); - if (switch_instance) - destroy_component(switch_instance, detaching); - } - }; -} -function create_fragment(ctx) { - let div2; - let div1; - let ul; - let t0; - let t1; - let t2; - let div0; - let current_block_type_index; - let if_block1; - let div0_data_name_value; - let current; - let each_value_1 = ( - /*menus*/ - ctx[2] - ); - let each_blocks_1 = []; - for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks_1[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); - } - let if_block0 = ( - /*thirdMenus*/ - ctx[1].length > 0 && create_if_block_1() - ); - let each_value = ( - /*thirdMenus*/ - ctx[1] - ); - let each_blocks = []; - for (let i = 0; i < each_value.length; i += 1) { - each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); - } - const if_block_creators = [create_if_block, create_else_block]; - const if_blocks = []; - function select_block_type(ctx2, dirty) { - if ( - /*currentSelection*/ - ctx2[0].type === "internal" - ) - return 0; - return 1; - } - current_block_type_index = select_block_type(ctx); - if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx); - return { - c() { - div2 = element("div"); - div1 = element("div"); - ul = element("ul"); - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].c(); - } - t0 = space(); - if (if_block0) - if_block0.c(); - t1 = space(); - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - t2 = space(); - div0 = element("div"); - if_block1.c(); - attr(ul, "class", "b3-tab-bar b3-list b3-list--background"); - set_style(ul, "height", "unset", 1); - attr(div0, "class", "config__tab-container"); - set_style(div0, "height", "unset", 1); - attr(div0, "data-name", div0_data_name_value = /*currentSelection*/ - ctx[0].key); - attr(div1, "class", "fn__flex-1 fn__flex config__panel"); - attr(div2, "class", "fn__flex-column"); - set_style(div2, "border-radius", "4px"); - set_style(div2, "overflow", "auto"); - set_style(div2, "position", "relative"); - set_style(div2, "height", "80vh"); - }, - m(target, anchor) { - insert(target, div2, anchor); - append(div2, div1); - append(div1, ul); - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].m(ul, null); - } - append(ul, t0); - if (if_block0) - if_block0.m(ul, null); - append(ul, t1); - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(ul, null); - } - append(div1, t2); - append(div1, div0); - if_blocks[current_block_type_index].m(div0, null); - current = true; - }, - p(ctx2, [dirty]) { - if (dirty & /*menus, currentSelection, setCurrentSelection*/ - 13) { - each_value_1 = /*menus*/ - ctx2[2]; - let i; - for (i = 0; i < each_value_1.length; i += 1) { - const child_ctx = get_each_context_1(ctx2, each_value_1, i); - if (each_blocks_1[i]) { - each_blocks_1[i].p(child_ctx, dirty); - } else { - each_blocks_1[i] = create_each_block_1(child_ctx); - each_blocks_1[i].c(); - each_blocks_1[i].m(ul, t0); - } - } - for (; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].d(1); - } - each_blocks_1.length = each_value_1.length; - } - if ( - /*thirdMenus*/ - ctx2[1].length > 0 - ) { - if (if_block0) - ; - else { - if_block0 = create_if_block_1(); - if_block0.c(); - if_block0.m(ul, t1); - } - } else if (if_block0) { - if_block0.d(1); - if_block0 = null; - } - if (dirty & /*thirdMenus, currentSelection, setCurrentSelection*/ - 11) { - each_value = /*thirdMenus*/ - ctx2[1]; - let i; - for (i = 0; i < each_value.length; i += 1) { - const child_ctx = get_each_context(ctx2, each_value, i); - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(ul, null); - } - } - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - each_blocks.length = each_value.length; - } - let previous_block_index = current_block_type_index; - current_block_type_index = select_block_type(ctx2); - if (current_block_type_index === previous_block_index) { - if_blocks[current_block_type_index].p(ctx2, dirty); - } else { - group_outros(); - transition_out(if_blocks[previous_block_index], 1, 1, () => { - if_blocks[previous_block_index] = null; - }); - check_outros(); - if_block1 = if_blocks[current_block_type_index]; - if (!if_block1) { - if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2); - if_block1.c(); - } else { - if_block1.p(ctx2, dirty); - } - transition_in(if_block1, 1); - if_block1.m(div0, null); - } - if (!current || dirty & /*currentSelection*/ - 1 && div0_data_name_value !== (div0_data_name_value = /*currentSelection*/ - ctx2[0].key)) { - attr(div0, "data-name", div0_data_name_value); - } - }, - i(local) { - if (current) - return; - transition_in(if_block1); - current = true; - }, - o(local) { - transition_out(if_block1); - current = false; - }, - d(detaching) { - if (detaching) - detach(div2); - destroy_each(each_blocks_1, detaching); - if (if_block0) - if_block0.d(); - destroy_each(each_blocks, detaching); - if_blocks[current_block_type_index].d(); - } - }; -} -function instance($$self, $$props, $$invalidate) { - let thirdMenus; - const menus = [ - { - key: "common", - name: _("menu_common"), - type: "internal", - component: Setting_common - }, - { - key: "list", - name: _("menu_list"), - type: "internal", - component: Setting_list - }, - { - key: "store", - name: _("menu_store"), - type: "internal", - component: Setting_store - } - ]; - const sm = container.get(TYPES.SettingManager); - const sm1 = container.get(TYPES.StorageManager); - const plugins = sm1.getThirdPartyPlugins(); - let settingRenders = sm.getSettingRenders(); - const getName = (key) => { - var _a2; - return (_a2 = plugins.find((p) => p.key === key)) == null ? void 0 : _a2.name; - }; - const setCurrentSelection = (menu) => $$invalidate(0, currentSelection = menu); - const updateMenus = () => { - $$invalidate(5, settingRenders = [...sm.getSettingRenders()]); - }; - let currentSelection = menus[0]; - const click_handler = (menu) => setCurrentSelection(menu); - const click_handler_1 = (menu) => setCurrentSelection(menu); - const update_handler = () => updateMenus(); - $$self.$$.update = () => { - if ($$self.$$.dirty & /*settingRenders*/ - 32) { - $$invalidate(1, thirdMenus = settingRenders.map((s) => { - return { - key: s.key, - name: getName(s.key), - component: Setting_common, - type: "custom", - render: s.value - }; - })); - } - }; - return [ - currentSelection, - thirdMenus, - menus, - setCurrentSelection, - updateMenus, - settingRenders, - click_handler, - click_handler_1, - update_handler - ]; -} -class Setting extends SvelteComponent { - constructor(options) { - super(); - init(this, options, instance, create_fragment, safe_not_equal, {}); - } -} -class InternalSettingPlugin extends Plugin { - constructor() { - super(); - this.svg = ''; - } - onload() { - const internalSettingButton = document.createElement("button"); - internalSettingButton.setAttribute("aria-label", _("plugin_system")); - internalSettingButton.classList.add("toolbar__item", "b3-tooltips", "b3-tooltips__sw"); - internalSettingButton.insertAdjacentHTML("beforeend", this.svg); - internalSettingButton.addEventListener("click", (event) => { - new Menu("internalSettingButton").addItem( - new MenuItem({ - label: _("plugin_system_setting"), - icon: "iconEdit", - click: () => showSettingDialog() - }) - ).addSeparator().addItem( - new MenuItem({ - label: _("reload"), - icon: "iconRefresh", - click: () => window.location.reload() - }) - ).showAtMouseEvent(event); - event.stopPropagation(); - }); - addToolbarRight(internalSettingButton); - this.registerCommand({ - command: "Show plugin system conifg", - description: _("show_plugin_system_config"), - shortcut: "command+option+p", - callback: () => showSettingDialog() - }); - this.registerCommand({ - command: "Reload Window", - description: _("reload_window"), - callback: () => window.location.reload() - }); - } -} -function showSettingDialog() { - new Dialog({ - title: _("plugin_system_setting"), - content: '
', - width: "90vw", - height: "80vh" - }); - setTimeout(() => { - new Setting({ - target: document.getElementById("plugin-settings") - }); - }); -} -const internalPlugins = [ - { key: "setting", name: "setting", plugin: InternalSettingPlugin, enabled: true, hidden: true, version: "1.0.0" }, - { key: "commandPanel", name: "commandPanel", plugin: CommandPanelPlugin, enabled: true, hidden: true, version: "1.0.0" } -]; -function isHighSurrogate$1(codePoint) { - return codePoint >= 55296 && codePoint <= 56319; -} -function isLowSurrogate$1(codePoint) { - return codePoint >= 56320 && codePoint <= 57343; -} -var truncate$2 = function truncate2(getLength2, string, byteLength) { - if (typeof string !== "string") { - throw new Error("Input must be string"); - } - var charLength = string.length; - var curByteLength = 0; - var codePoint; - var segment; - for (var i = 0; i < charLength; i += 1) { - codePoint = string.charCodeAt(i); - segment = string[i]; - if (isHighSurrogate$1(codePoint) && isLowSurrogate$1(string.charCodeAt(i + 1))) { - i += 1; - segment += string[i]; - } - curByteLength += getLength2(segment); - if (curByteLength === byteLength) { - return string.slice(0, i + 1); - } else if (curByteLength > byteLength) { - return string.slice(0, i - segment.length + 1); - } - } - return string; -}; -function isHighSurrogate(codePoint) { - return codePoint >= 55296 && codePoint <= 56319; -} -function isLowSurrogate(codePoint) { - return codePoint >= 56320 && codePoint <= 57343; -} -var browser$1 = function getByteLength(string) { - if (typeof string !== "string") { - throw new Error("Input must be string"); - } - var charLength = string.length; - var byteLength = 0; - var codePoint = null; - var prevCodePoint = null; - for (var i = 0; i < charLength; i++) { - codePoint = string.charCodeAt(i); - if (isLowSurrogate(codePoint)) { - if (prevCodePoint != null && isHighSurrogate(prevCodePoint)) { - byteLength += 1; - } else { - byteLength += 3; - } - } else if (codePoint <= 127) { - byteLength += 1; - } else if (codePoint >= 128 && codePoint <= 2047) { - byteLength += 2; - } else if (codePoint >= 2048 && codePoint <= 65535) { - byteLength += 3; - } - prevCodePoint = codePoint; - } - return byteLength; -}; -var truncate$1 = truncate$2; -var getLength = browser$1; -var browser = truncate$1.bind(null, getLength); -var truncate = browser; -var illegalRe = /[\/\?<>\\:\*\|"]/g; -var controlRe = /[\x00-\x1f\x80-\x9f]/g; -var reservedRe = /^\.+$/; -var windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i; -var windowsTrailingRe = /[\. ]+$/; -function sanitize(input, replacement) { - if (typeof input !== "string") { - throw new Error("Input must be string"); - } - var sanitized = input.replace(illegalRe, replacement).replace(controlRe, replacement).replace(reservedRe, replacement).replace(windowsReservedRe, replacement).replace(windowsTrailingRe, replacement); - return truncate(sanitized, 255); -} -var sanitizeFilename = function(input, options) { - var replacement = options && options.replacement || ""; - var output = sanitize(input, replacement); - if (replacement === "") { - return output; - } - return sanitize(output, ""); -}; -var __defProp$8 = Object.defineProperty; -var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor; -var __decorateClass$8 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$8(target, key, result); - return result; -}; -var __decorateParam$5 = (index, decorator) => (target, key) => decorator(target, key, index); -let StorageManager = class { - constructor(pluginFileManager) { - this.config = Object.assign({}, defaultConfig); - this.pluginFileManager = pluginFileManager; - } - get(key) { - return this.config[key]; - } - async set(key, val) { - this.config[key] = val; - return setStorageVal(key, val); - } - async initStorage() { - const all2 = await getLocalStorage(); - const configKeys = Object.keys(defaultConfig); - for (const key of configKeys) { - if (all2[key] !== void 0) { - this.config[key] = all2[key]; - } else { - await setStorageVal(key, defaultConfig[key]); - } - } - this.thirdPartyPlugins = await this.pluginFileManager.getAllPlugins(); - this.internalPlugins = [...internalPlugins]; - this.init3rdPartyEnabled(); - this.initInternalEnabled(); - await this.savePluginsEnabled(); - return this; - } - init3rdPartyEnabled() { - const enabledPlugins = this.get(PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN); - for (const ep of enabledPlugins) { - for (const p of this.thirdPartyPlugins) { - if (p.key === ep.key) { - p.enabled = ep.enabled || false; - break; - } - } - } - } - initInternalEnabled() { - const enabledPlugins = this.get(PLUGIN_SYSTEM_PLUGIN); - for (const ep of enabledPlugins) { - for (const p of this.internalPlugins) { - if (p.key === ep.key) { - p.enabled = ep.enabled || false; - break; - } - } - } - } - getPlugins() { - return [...this.internalPlugins, ...this.thirdPartyPlugins]; - } - getInternalPlugins() { - return this.internalPlugins; - } - getThirdPartyPlugins() { - return this.thirdPartyPlugins; - } - getPluginByKey(key) { - return this.getPlugins().find((p) => p.key === key); - } - async setPluginEnabled(key, enabled) { - for (const p of [...this.internalPlugins, ...this.thirdPartyPlugins]) { - if (p.key === key) { - p.enabled = enabled; - break; - } - } - await this.savePluginsEnabled(); - } - async setSafeModeEnabled(enabled) { - return this.set(PLUGIN_SYSTEM_SAFE_MODE_ENABLED, enabled); - } - async savePluginsEnabled() { - await this.set( - PLUGIN_SYSTEM_PLUGIN, - this.internalPlugins.map((p) => ({ key: p.key, enabled: p.enabled })) - ); - return this.set( - PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN, - this.thirdPartyPlugins.map((p) => ({ key: p.key, enabled: p.enabled })) - ); - } - async setPluginStorage(pluginKey, filename, content) { - try { - if (this.isFileNameIllegal(filename)) { - showErrorMessage(`插件${pluginKey}存储文件名不合法`); - return; - } - await this.addPluginStorageFolderIfNotExist(pluginKey); - await FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/.storage/${pluginKey}/${filename}`, content); - } catch (e) { - showErrorMessage(`插件${pluginKey}存储保存失败`, 2e3); - } - } - async getPluginStorage(pluginKey, filename) { - try { - return await FileClient.getInstanceApi().fileApi.getFile(`/data/plugins/.storage/${pluginKey}/${filename}`); - } catch (e) { - showErrorMessage(`插件${pluginKey}存储保存失败`, 2e3); - return null; - } - } - async uninstallPlugin(pluginKey) { - await FileClient.getInstanceApi().fileApi.removeFile(`/data/plugins/${pluginKey}`); - await FileClient.getInstanceApi().fileApi.removeFile(`/data/plugins//.storage/${pluginKey}`); - } - async addPluginStorageFolderIfNotExist(pluginKey) { - const folder = `/data/plugins/.storage/${pluginKey}`; - await FileClient.getInstanceApi().fileApi.putFile(folder, null, true); - } - isFileNameIllegal(filename) { - return filename !== sanitizeFilename(filename); - } -}; -StorageManager = __decorateClass$8([ - injectable(), - __decorateParam$5(0, inject(TYPES.PluginFileManager)) -], StorageManager); -var __defProp$7 = Object.defineProperty; -var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor; -var __decorateClass$7 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$7(target, key, result); - return result; -}; -var __decorateParam$4 = (index, decorator) => (target, key) => decorator(target, key, index); -let PluginSystem = class { - constructor(pluginLoader, pslm, storageManager, commandManager, store) { - this.pluginLoader = pluginLoader; - this.pslm = pslm; - this.storageManager = storageManager; - this.commandManager = commandManager; - this.store = store; - this.version = VERSION$1; - } - async init() { - await this.storageManager.initStorage(); - const internalPlugins2 = this.storageManager.getInternalPlugins(); - this.pluginLoader.loadEnabledPlugins(internalPlugins2); - log(`Loading internal enabled plugins: ${internalPlugins2.map((p) => p.key).join(",")}`); - const securityModeEnabled = this.storageManager.get(PLUGIN_SYSTEM_SAFE_MODE_ENABLED); - if (!securityModeEnabled) { - const plugins = this.storageManager.getThirdPartyPlugins(); - log(`Loading 3rd party enabled plugins: ${plugins.map((p) => p.key).join(",")}`); - this.pluginLoader.loadEnabledPlugins(plugins); - } - this.pslm.localCacheInit(); - return this; - } - async loadPlugin(key) { - this.storageManager.setPluginEnabled(key, true); - const plugin2 = this.storageManager.getPluginByKey(key); - this.pluginLoader.loadPlugin(plugin2); - } - async unloadPlugin(key) { - this.storageManager.setPluginEnabled(key, false); - this.pluginLoader.unloadPlugin(key); - } - async turnOffSafeMode() { - this.storageManager.setSafeModeEnabled(false); - const plugins = this.storageManager.getThirdPartyPlugins(); - return this.pluginLoader.loadEnabledPlugins(plugins); - } - async turnOnSafeMode() { - this.storageManager.setSafeModeEnabled(true); - const plugins = this.storageManager.getThirdPartyPlugins(); - return this.pluginLoader.unloadThirdPartyPlugins(plugins); - } -}; -PluginSystem = __decorateClass$7([ - injectable(), - __decorateParam$4(0, inject(TYPES.PluginLoader)), - __decorateParam$4(1, inject(TYPES.SystemManager)), - __decorateParam$4(2, inject(TYPES.StorageManager)), - __decorateParam$4(3, inject(TYPES.CommandManager)), - __decorateParam$4(4, inject(TYPES.Store)) -], PluginSystem); -var reExports = {}; -var re$3 = { - get exports() { - return reExports; - }, - set exports(v) { - reExports = v; - } -}; -const SEMVER_SPEC_VERSION = "2.0.0"; -const MAX_LENGTH$2 = 256; -const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ -9007199254740991; -const MAX_SAFE_COMPONENT_LENGTH = 16; -var constants$1 = { - SEMVER_SPEC_VERSION, - MAX_LENGTH: MAX_LENGTH$2, - MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1, - MAX_SAFE_COMPONENT_LENGTH -}; -const debug$1 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { -}; -var debug_1 = debug$1; -(function(module2, exports2) { - const { MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH2 } = constants$1; - const debug2 = debug_1; - exports2 = module2.exports = {}; - const re2 = exports2.re = []; - const src = exports2.src = []; - const t2 = exports2.t = {}; - let R2 = 0; - const createToken = (name2, value, isGlobal) => { - const index = R2++; - debug2(name2, index, value); - t2[name2] = index; - src[index] = value; - re2[index] = new RegExp(value, isGlobal ? "g" : void 0); - }; - createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); - createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+"); - createToken("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"); - createToken("MAINVERSION", `(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src[t2.NUMERICIDENTIFIER]}|${src[t2.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t2.NUMERICIDENTIFIERLOOSE]}|${src[t2.NONNUMERICIDENTIFIER]})`); - createToken("PRERELEASE", `(?:-(${src[t2.PRERELEASEIDENTIFIER]}(?:\\.${src[t2.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src[t2.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t2.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken("BUILDIDENTIFIER", "[0-9A-Za-z-]+"); - createToken("BUILD", `(?:\\+(${src[t2.BUILDIDENTIFIER]}(?:\\.${src[t2.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src[t2.MAINVERSION]}${src[t2.PRERELEASE]}?${src[t2.BUILD]}?`); - createToken("FULL", `^${src[t2.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src[t2.MAINVERSIONLOOSE]}${src[t2.PRERELEASELOOSE]}?${src[t2.BUILD]}?`); - createToken("LOOSE", `^${src[t2.LOOSEPLAIN]}$`); - createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src[t2.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src[t2.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:${src[t2.PRERELEASE]})?${src[t2.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:${src[t2.PRERELEASELOOSE]})?${src[t2.BUILD]}?)?)?`); - createToken("XRANGE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAINLOOSE]}$`); - createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH2}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH2}}))?(?:$|[^\\d])`); - createToken("COERCERTL", src[t2.COERCE], true); - createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src[t2.LONETILDE]}\\s+`, true); - exports2.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAINLOOSE]}$`); - createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src[t2.LONECARET]}\\s+`, true); - exports2.caretTrimReplace = "$1^"; - createToken("CARET", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src[t2.GTLT]}\\s*(${src[t2.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]}|${src[t2.XRANGEPLAIN]})`, true); - exports2.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src[t2.XRANGEPLAIN]})\\s+-\\s+(${src[t2.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src[t2.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t2.XRANGEPLAINLOOSE]})\\s*$`); - createToken("STAR", "(<|>)?=?\\s*\\*"); - createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); - createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); -})(re$3, reExports); -const opts = ["includePrerelease", "loose", "rtl"]; -const parseOptions$2 = (options) => !options ? {} : typeof options !== "object" ? { loose: true } : opts.filter((k2) => options[k2]).reduce((o, k2) => { - o[k2] = true; - return o; -}, {}); -var parseOptions_1 = parseOptions$2; -const numeric = /^[0-9]+$/; -const compareIdentifiers$1 = (a2, b2) => { - const anum = numeric.test(a2); - const bnum = numeric.test(b2); - if (anum && bnum) { - a2 = +a2; - b2 = +b2; - } - return a2 === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a2 < b2 ? -1 : 1; -}; -const rcompareIdentifiers = (a2, b2) => compareIdentifiers$1(b2, a2); -var identifiers$1 = { - compareIdentifiers: compareIdentifiers$1, - rcompareIdentifiers -}; -const debug = debug_1; -const { MAX_LENGTH: MAX_LENGTH$1, MAX_SAFE_INTEGER } = constants$1; -const { re: re$2, t: t$2 } = reExports; -const parseOptions$1 = parseOptions_1; -const { compareIdentifiers } = identifiers$1; -let SemVer$d = class SemVer2 { - constructor(version2, options) { - options = parseOptions$1(options); - if (version2 instanceof SemVer2) { - if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { - return version2; - } else { - version2 = version2.version; - } - } else if (typeof version2 !== "string") { - throw new TypeError(`Invalid Version: ${version2}`); - } - if (version2.length > MAX_LENGTH$1) { - throw new TypeError( - `version is longer than ${MAX_LENGTH$1} characters` - ); - } - debug("SemVer", version2, options); - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - const m = version2.trim().match(options.loose ? re$2[t$2.LOOSE] : re$2[t$2.FULL]); - if (!m) { - throw new TypeError(`Invalid Version: ${version2}`); - } - this.raw = version2; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError("Invalid major version"); - } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError("Invalid minor version"); - } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError("Invalid patch version"); - } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split(".").map((id2) => { - if (/^[0-9]+$/.test(id2)) { - const num = +id2; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num; - } - } - return id2; - }); - } - this.build = m[5] ? m[5].split(".") : []; - this.format(); - } - format() { - this.version = `${this.major}.${this.minor}.${this.patch}`; - if (this.prerelease.length) { - this.version += `-${this.prerelease.join(".")}`; - } - return this.version; - } - toString() { - return this.version; - } - compare(other) { - debug("SemVer.compare", this.version, this.options, other); - if (!(other instanceof SemVer2)) { - if (typeof other === "string" && other === this.version) { - return 0; - } - other = new SemVer2(other, this.options); - } - if (other.version === this.version) { - return 0; - } - return this.compareMain(other) || this.comparePre(other); - } - compareMain(other) { - if (!(other instanceof SemVer2)) { - other = new SemVer2(other, this.options); - } - return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch); - } - comparePre(other) { - if (!(other instanceof SemVer2)) { - other = new SemVer2(other, this.options); - } - if (this.prerelease.length && !other.prerelease.length) { - return -1; - } else if (!this.prerelease.length && other.prerelease.length) { - return 1; - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0; - } - let i = 0; - do { - const a2 = this.prerelease[i]; - const b2 = other.prerelease[i]; - debug("prerelease compare", i, a2, b2); - if (a2 === void 0 && b2 === void 0) { - return 0; - } else if (b2 === void 0) { - return 1; - } else if (a2 === void 0) { - return -1; - } else if (a2 === b2) { - continue; - } else { - return compareIdentifiers(a2, b2); - } - } while (++i); - } - compareBuild(other) { - if (!(other instanceof SemVer2)) { - other = new SemVer2(other, this.options); - } - let i = 0; - do { - const a2 = this.build[i]; - const b2 = other.build[i]; - debug("prerelease compare", i, a2, b2); - if (a2 === void 0 && b2 === void 0) { - return 0; - } else if (b2 === void 0) { - return 1; - } else if (a2 === void 0) { - return -1; - } else if (a2 === b2) { - continue; - } else { - return compareIdentifiers(a2, b2); - } - } while (++i); - } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc(release, identifier) { - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier); - this.inc("pre", identifier); - break; - case "prerelease": - if (this.prerelease.length === 0) { - this.inc("patch", identifier); - } - this.inc("pre", identifier); - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break; - case "pre": - if (this.prerelease.length === 0) { - this.prerelease = [0]; - } else { - let i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === "number") { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) { - this.prerelease.push(0); - } - } - if (identifier) { - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0]; - } - } else { - this.prerelease = [identifier, 0]; - } - } - break; - default: - throw new Error(`invalid increment argument: ${release}`); - } - this.format(); - this.raw = this.version; - return this; - } -}; -var semver$1 = SemVer$d; -const { MAX_LENGTH } = constants$1; -const { re: re$1, t: t$1 } = reExports; -const SemVer$c = semver$1; -const parseOptions = parseOptions_1; -const parse$6 = (version2, options) => { - options = parseOptions(options); - if (version2 instanceof SemVer$c) { - return version2; - } - if (typeof version2 !== "string") { - return null; - } - if (version2.length > MAX_LENGTH) { - return null; - } - const r = options.loose ? re$1[t$1.LOOSE] : re$1[t$1.FULL]; - if (!r.test(version2)) { - return null; - } - try { - return new SemVer$c(version2, options); - } catch (er) { - return null; - } -}; -var parse_1 = parse$6; -const parse$5 = parse_1; -const valid$2 = (version2, options) => { - const v = parse$5(version2, options); - return v ? v.version : null; -}; -var valid_1 = valid$2; -const parse$4 = parse_1; -const clean$1 = (version2, options) => { - const s = parse$4(version2.trim().replace(/^[=v]+/, ""), options); - return s ? s.version : null; -}; -var clean_1 = clean$1; -const SemVer$b = semver$1; -const inc$1 = (version2, release, options, identifier) => { - if (typeof options === "string") { - identifier = options; - options = void 0; - } - try { - return new SemVer$b( - version2 instanceof SemVer$b ? version2.version : version2, - options - ).inc(release, identifier).version; - } catch (er) { - return null; - } -}; -var inc_1 = inc$1; -const SemVer$a = semver$1; -const compare$b = (a2, b2, loose) => new SemVer$a(a2, loose).compare(new SemVer$a(b2, loose)); -var compare_1 = compare$b; -const compare$a = compare_1; -const eq$3 = (a2, b2, loose) => compare$a(a2, b2, loose) === 0; -var eq_1 = eq$3; -const parse$3 = parse_1; -const eq$2 = eq_1; -const diff$1 = (version1, version2) => { - if (eq$2(version1, version2)) { - return null; - } else { - const v1 = parse$3(version1); - const v2 = parse$3(version2); - const hasPre = v1.prerelease.length || v2.prerelease.length; - const prefix = hasPre ? "pre" : ""; - const defaultResult = hasPre ? "prerelease" : ""; - for (const key in v1) { - if (key === "major" || key === "minor" || key === "patch") { - if (v1[key] !== v2[key]) { - return prefix + key; - } - } - } - return defaultResult; - } -}; -var diff_1 = diff$1; -const SemVer$9 = semver$1; -const major$1 = (a2, loose) => new SemVer$9(a2, loose).major; -var major_1 = major$1; -const SemVer$8 = semver$1; -const minor$1 = (a2, loose) => new SemVer$8(a2, loose).minor; -var minor_1 = minor$1; -const SemVer$7 = semver$1; -const patch$1 = (a2, loose) => new SemVer$7(a2, loose).patch; -var patch_1 = patch$1; -const parse$2 = parse_1; -const prerelease$1 = (version2, options) => { - const parsed = parse$2(version2, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; -}; -var prerelease_1 = prerelease$1; -const compare$9 = compare_1; -const rcompare$1 = (a2, b2, loose) => compare$9(b2, a2, loose); -var rcompare_1 = rcompare$1; -const compare$8 = compare_1; -const compareLoose$1 = (a2, b2) => compare$8(a2, b2, true); -var compareLoose_1 = compareLoose$1; -const SemVer$6 = semver$1; -const compareBuild$3 = (a2, b2, loose) => { - const versionA = new SemVer$6(a2, loose); - const versionB = new SemVer$6(b2, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); -}; -var compareBuild_1 = compareBuild$3; -const compareBuild$2 = compareBuild_1; -const sort$1 = (list, loose) => list.sort((a2, b2) => compareBuild$2(a2, b2, loose)); -var sort_1 = sort$1; -const compareBuild$1 = compareBuild_1; -const rsort$1 = (list, loose) => list.sort((a2, b2) => compareBuild$1(b2, a2, loose)); -var rsort_1 = rsort$1; -const compare$7 = compare_1; -const gt$4 = (a2, b2, loose) => compare$7(a2, b2, loose) > 0; -var gt_1 = gt$4; -const compare$6 = compare_1; -const lt$3 = (a2, b2, loose) => compare$6(a2, b2, loose) < 0; -var lt_1 = lt$3; -const compare$5 = compare_1; -const neq$2 = (a2, b2, loose) => compare$5(a2, b2, loose) !== 0; -var neq_1 = neq$2; -const compare$4 = compare_1; -const gte$3 = (a2, b2, loose) => compare$4(a2, b2, loose) >= 0; -var gte_1 = gte$3; -const compare$3 = compare_1; -const lte$3 = (a2, b2, loose) => compare$3(a2, b2, loose) <= 0; -var lte_1 = lte$3; -const eq$1 = eq_1; -const neq$1 = neq_1; -const gt$3 = gt_1; -const gte$2 = gte_1; -const lt$2 = lt_1; -const lte$2 = lte_1; -const cmp$1 = (a2, op, b2, loose) => { - switch (op) { - case "===": - if (typeof a2 === "object") { - a2 = a2.version; - } - if (typeof b2 === "object") { - b2 = b2.version; - } - return a2 === b2; - case "!==": - if (typeof a2 === "object") { - a2 = a2.version; - } - if (typeof b2 === "object") { - b2 = b2.version; - } - return a2 !== b2; - case "": - case "=": - case "==": - return eq$1(a2, b2, loose); - case "!=": - return neq$1(a2, b2, loose); - case ">": - return gt$3(a2, b2, loose); - case ">=": - return gte$2(a2, b2, loose); - case "<": - return lt$2(a2, b2, loose); - case "<=": - return lte$2(a2, b2, loose); - default: - throw new TypeError(`Invalid operator: ${op}`); - } -}; -var cmp_1 = cmp$1; -const SemVer$5 = semver$1; -const parse$1 = parse_1; -const { re, t } = reExports; -const coerce$1 = (version2, options) => { - if (version2 instanceof SemVer$5) { - return version2; - } - if (typeof version2 === "number") { - version2 = String(version2); - } - if (typeof version2 !== "string") { - return null; - } - options = options || {}; - let match = null; - if (!options.rtl) { - match = version2.match(re[t.COERCE]); - } else { - let next; - while ((next = re[t.COERCERTL].exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; - } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length; - } - re[t.COERCERTL].lastIndex = -1; - } - if (match === null) { - return null; - } - return parse$1(`${match[2]}.${match[3] || "0"}.${match[4] || "0"}`, options); -}; -var coerce_1 = coerce$1; -var iterator; -var hasRequiredIterator; -function requireIterator() { - if (hasRequiredIterator) - return iterator; - hasRequiredIterator = 1; - iterator = function(Yallist) { - Yallist.prototype[Symbol.iterator] = function* () { - for (let walker = this.head; walker; walker = walker.next) { - yield walker.value; - } - }; - }; - return iterator; -} -var yallist; -var hasRequiredYallist; -function requireYallist() { - if (hasRequiredYallist) - return yallist; - hasRequiredYallist = 1; - yallist = Yallist; - Yallist.Node = Node; - Yallist.create = Yallist; - function Yallist(list) { - var self2 = this; - if (!(self2 instanceof Yallist)) { - self2 = new Yallist(); - } - self2.tail = null; - self2.head = null; - self2.length = 0; - if (list && typeof list.forEach === "function") { - list.forEach(function(item) { - self2.push(item); - }); - } else if (arguments.length > 0) { - for (var i = 0, l = arguments.length; i < l; i++) { - self2.push(arguments[i]); - } - } - return self2; - } - Yallist.prototype.removeNode = function(node) { - if (node.list !== this) { - throw new Error("removing node which does not belong to this list"); - } - var next = node.next; - var prev = node.prev; - if (next) { - next.prev = prev; - } - if (prev) { - prev.next = next; - } - if (node === this.head) { - this.head = next; - } - if (node === this.tail) { - this.tail = prev; - } - node.list.length--; - node.next = null; - node.prev = null; - node.list = null; - return next; - }; - Yallist.prototype.unshiftNode = function(node) { - if (node === this.head) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var head = this.head; - node.list = this; - node.next = head; - if (head) { - head.prev = node; - } - this.head = node; - if (!this.tail) { - this.tail = node; - } - this.length++; - }; - Yallist.prototype.pushNode = function(node) { - if (node === this.tail) { - return; - } - if (node.list) { - node.list.removeNode(node); - } - var tail = this.tail; - node.list = this; - node.prev = tail; - if (tail) { - tail.next = node; - } - this.tail = node; - if (!this.head) { - this.head = node; - } - this.length++; - }; - Yallist.prototype.push = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - push(this, arguments[i]); - } - return this.length; - }; - Yallist.prototype.unshift = function() { - for (var i = 0, l = arguments.length; i < l; i++) { - unshift(this, arguments[i]); - } - return this.length; - }; - Yallist.prototype.pop = function() { - if (!this.tail) { - return void 0; - } - var res = this.tail.value; - this.tail = this.tail.prev; - if (this.tail) { - this.tail.next = null; - } else { - this.head = null; - } - this.length--; - return res; - }; - Yallist.prototype.shift = function() { - if (!this.head) { - return void 0; - } - var res = this.head.value; - this.head = this.head.next; - if (this.head) { - this.head.prev = null; - } else { - this.tail = null; - } - this.length--; - return res; - }; - Yallist.prototype.forEach = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.head, i = 0; walker !== null; i++) { - fn.call(thisp, walker.value, i, this); - walker = walker.next; - } - }; - Yallist.prototype.forEachReverse = function(fn, thisp) { - thisp = thisp || this; - for (var walker = this.tail, i = this.length - 1; walker !== null; i--) { - fn.call(thisp, walker.value, i, this); - walker = walker.prev; - } - }; - Yallist.prototype.get = function(n) { - for (var i = 0, walker = this.head; walker !== null && i < n; i++) { - walker = walker.next; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist.prototype.getReverse = function(n) { - for (var i = 0, walker = this.tail; walker !== null && i < n; i++) { - walker = walker.prev; - } - if (i === n && walker !== null) { - return walker.value; - } - }; - Yallist.prototype.map = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.head; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.next; - } - return res; - }; - Yallist.prototype.mapReverse = function(fn, thisp) { - thisp = thisp || this; - var res = new Yallist(); - for (var walker = this.tail; walker !== null; ) { - res.push(fn.call(thisp, walker.value, this)); - walker = walker.prev; - } - return res; - }; - Yallist.prototype.reduce = function(fn, initial) { - var acc; - var walker = this.head; - if (arguments.length > 1) { - acc = initial; - } else if (this.head) { - walker = this.head.next; - acc = this.head.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = 0; walker !== null; i++) { - acc = fn(acc, walker.value, i); - walker = walker.next; - } - return acc; - }; - Yallist.prototype.reduceReverse = function(fn, initial) { - var acc; - var walker = this.tail; - if (arguments.length > 1) { - acc = initial; - } else if (this.tail) { - walker = this.tail.prev; - acc = this.tail.value; - } else { - throw new TypeError("Reduce of empty list with no initial value"); - } - for (var i = this.length - 1; walker !== null; i--) { - acc = fn(acc, walker.value, i); - walker = walker.prev; - } - return acc; - }; - Yallist.prototype.toArray = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.head; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.next; - } - return arr; - }; - Yallist.prototype.toArrayReverse = function() { - var arr = new Array(this.length); - for (var i = 0, walker = this.tail; walker !== null; i++) { - arr[i] = walker.value; - walker = walker.prev; - } - return arr; - }; - Yallist.prototype.slice = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = 0, walker = this.head; walker !== null && i < from; i++) { - walker = walker.next; - } - for (; walker !== null && i < to; i++, walker = walker.next) { - ret.push(walker.value); - } - return ret; - }; - Yallist.prototype.sliceReverse = function(from, to) { - to = to || this.length; - if (to < 0) { - to += this.length; - } - from = from || 0; - if (from < 0) { - from += this.length; - } - var ret = new Yallist(); - if (to < from || to < 0) { - return ret; - } - if (from < 0) { - from = 0; - } - if (to > this.length) { - to = this.length; - } - for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) { - walker = walker.prev; - } - for (; walker !== null && i > from; i--, walker = walker.prev) { - ret.push(walker.value); - } - return ret; - }; - Yallist.prototype.splice = function(start, deleteCount, ...nodes) { - if (start > this.length) { - start = this.length - 1; - } - if (start < 0) { - start = this.length + start; - } - for (var i = 0, walker = this.head; walker !== null && i < start; i++) { - walker = walker.next; - } - var ret = []; - for (var i = 0; walker && i < deleteCount; i++) { - ret.push(walker.value); - walker = this.removeNode(walker); - } - if (walker === null) { - walker = this.tail; - } - if (walker !== this.head && walker !== this.tail) { - walker = walker.prev; - } - for (var i = 0; i < nodes.length; i++) { - walker = insert2(this, walker, nodes[i]); - } - return ret; - }; - Yallist.prototype.reverse = function() { - var head = this.head; - var tail = this.tail; - for (var walker = head; walker !== null; walker = walker.prev) { - var p = walker.prev; - walker.prev = walker.next; - walker.next = p; - } - this.head = tail; - this.tail = head; - return this; - }; - function insert2(self2, node, value) { - var inserted = node === self2.head ? new Node(value, null, node, self2) : new Node(value, node, node.next, self2); - if (inserted.next === null) { - self2.tail = inserted; - } - if (inserted.prev === null) { - self2.head = inserted; - } - self2.length++; - return inserted; - } - function push(self2, item) { - self2.tail = new Node(item, self2.tail, null, self2); - if (!self2.head) { - self2.head = self2.tail; - } - self2.length++; - } - function unshift(self2, item) { - self2.head = new Node(item, null, self2.head, self2); - if (!self2.tail) { - self2.tail = self2.head; - } - self2.length++; - } - function Node(value, prev, next, list) { - if (!(this instanceof Node)) { - return new Node(value, prev, next, list); - } - this.list = list; - this.value = value; - if (prev) { - prev.next = this; - this.prev = prev; - } else { - this.prev = null; - } - if (next) { - next.prev = this; - this.next = next; - } else { - this.next = null; - } - } - try { - requireIterator()(Yallist); - } catch (er) { - } - return yallist; -} -var lruCache; -var hasRequiredLruCache; -function requireLruCache() { - if (hasRequiredLruCache) - return lruCache; - hasRequiredLruCache = 1; - const Yallist = requireYallist(); - const MAX = Symbol("max"); - const LENGTH = Symbol("length"); - const LENGTH_CALCULATOR = Symbol("lengthCalculator"); - const ALLOW_STALE = Symbol("allowStale"); - const MAX_AGE = Symbol("maxAge"); - const DISPOSE = Symbol("dispose"); - const NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet"); - const LRU_LIST = Symbol("lruList"); - const CACHE = Symbol("cache"); - const UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet"); - const naiveLength = () => 1; - class LRUCache { - constructor(options) { - if (typeof options === "number") - options = { max: options }; - if (!options) - options = {}; - if (options.max && (typeof options.max !== "number" || options.max < 0)) - throw new TypeError("max must be a non-negative number"); - this[MAX] = options.max || Infinity; - const lc = options.length || naiveLength; - this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc; - this[ALLOW_STALE] = options.stale || false; - if (options.maxAge && typeof options.maxAge !== "number") - throw new TypeError("maxAge must be a number"); - this[MAX_AGE] = options.maxAge || 0; - this[DISPOSE] = options.dispose; - this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false; - this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false; - this.reset(); - } - // resize the cache when the max changes. - set max(mL) { - if (typeof mL !== "number" || mL < 0) - throw new TypeError("max must be a non-negative number"); - this[MAX] = mL || Infinity; - trim2(this); - } - get max() { - return this[MAX]; - } - set allowStale(allowStale) { - this[ALLOW_STALE] = !!allowStale; - } - get allowStale() { - return this[ALLOW_STALE]; - } - set maxAge(mA) { - if (typeof mA !== "number") - throw new TypeError("maxAge must be a non-negative number"); - this[MAX_AGE] = mA; - trim2(this); - } - get maxAge() { - return this[MAX_AGE]; - } - // resize the cache when the lengthCalculator changes. - set lengthCalculator(lC) { - if (typeof lC !== "function") - lC = naiveLength; - if (lC !== this[LENGTH_CALCULATOR]) { - this[LENGTH_CALCULATOR] = lC; - this[LENGTH] = 0; - this[LRU_LIST].forEach((hit) => { - hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key); - this[LENGTH] += hit.length; - }); - } - trim2(this); - } - get lengthCalculator() { - return this[LENGTH_CALCULATOR]; - } - get length() { - return this[LENGTH]; - } - get itemCount() { - return this[LRU_LIST].length; - } - rforEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].tail; walker !== null; ) { - const prev = walker.prev; - forEachStep(this, fn, walker, thisp); - walker = prev; - } - } - forEach(fn, thisp) { - thisp = thisp || this; - for (let walker = this[LRU_LIST].head; walker !== null; ) { - const next = walker.next; - forEachStep(this, fn, walker, thisp); - walker = next; - } - } - keys() { - return this[LRU_LIST].toArray().map((k2) => k2.key); - } - values() { - return this[LRU_LIST].toArray().map((k2) => k2.value); - } - reset() { - if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) { - this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value)); - } - this[CACHE] = /* @__PURE__ */ new Map(); - this[LRU_LIST] = new Yallist(); - this[LENGTH] = 0; - } - dump() { - return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : { - k: hit.key, - v: hit.value, - e: hit.now + (hit.maxAge || 0) - }).toArray().filter((h) => h); - } - dumpLru() { - return this[LRU_LIST]; - } - set(key, value, maxAge) { - maxAge = maxAge || this[MAX_AGE]; - if (maxAge && typeof maxAge !== "number") - throw new TypeError("maxAge must be a number"); - const now = maxAge ? Date.now() : 0; - const len = this[LENGTH_CALCULATOR](value, key); - if (this[CACHE].has(key)) { - if (len > this[MAX]) { - del(this, this[CACHE].get(key)); - return false; - } - const node = this[CACHE].get(key); - const item = node.value; - if (this[DISPOSE]) { - if (!this[NO_DISPOSE_ON_SET]) - this[DISPOSE](key, item.value); - } - item.now = now; - item.maxAge = maxAge; - item.value = value; - this[LENGTH] += len - item.length; - item.length = len; - this.get(key); - trim2(this); - return true; - } - const hit = new Entry(key, value, len, now, maxAge); - if (hit.length > this[MAX]) { - if (this[DISPOSE]) - this[DISPOSE](key, value); - return false; - } - this[LENGTH] += hit.length; - this[LRU_LIST].unshift(hit); - this[CACHE].set(key, this[LRU_LIST].head); - trim2(this); - return true; - } - has(key) { - if (!this[CACHE].has(key)) - return false; - const hit = this[CACHE].get(key).value; - return !isStale(this, hit); - } - get(key) { - return get(this, key, true); - } - peek(key) { - return get(this, key, false); - } - pop() { - const node = this[LRU_LIST].tail; - if (!node) - return null; - del(this, node); - return node.value; - } - del(key) { - del(this, this[CACHE].get(key)); - } - load(arr) { - this.reset(); - const now = Date.now(); - for (let l = arr.length - 1; l >= 0; l--) { - const hit = arr[l]; - const expiresAt = hit.e || 0; - if (expiresAt === 0) - this.set(hit.k, hit.v); - else { - const maxAge = expiresAt - now; - if (maxAge > 0) { - this.set(hit.k, hit.v, maxAge); - } - } - } - } - prune() { - this[CACHE].forEach((value, key) => get(this, key, false)); - } - } - const get = (self2, key, doUse) => { - const node = self2[CACHE].get(key); - if (node) { - const hit = node.value; - if (isStale(self2, hit)) { - del(self2, node); - if (!self2[ALLOW_STALE]) - return void 0; - } else { - if (doUse) { - if (self2[UPDATE_AGE_ON_GET]) - node.value.now = Date.now(); - self2[LRU_LIST].unshiftNode(node); - } - } - return hit.value; - } - }; - const isStale = (self2, hit) => { - if (!hit || !hit.maxAge && !self2[MAX_AGE]) - return false; - const diff2 = Date.now() - hit.now; - return hit.maxAge ? diff2 > hit.maxAge : self2[MAX_AGE] && diff2 > self2[MAX_AGE]; - }; - const trim2 = (self2) => { - if (self2[LENGTH] > self2[MAX]) { - for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) { - const prev = walker.prev; - del(self2, walker); - walker = prev; - } - } - }; - const del = (self2, node) => { - if (node) { - const hit = node.value; - if (self2[DISPOSE]) - self2[DISPOSE](hit.key, hit.value); - self2[LENGTH] -= hit.length; - self2[CACHE].delete(hit.key); - self2[LRU_LIST].removeNode(node); - } - }; - class Entry { - constructor(key, value, length, now, maxAge) { - this.key = key; - this.value = value; - this.length = length; - this.now = now; - this.maxAge = maxAge || 0; - } - } - const forEachStep = (self2, fn, node, thisp) => { - let hit = node.value; - if (isStale(self2, hit)) { - del(self2, node); - if (!self2[ALLOW_STALE]) - hit = void 0; - } - if (hit) - fn.call(thisp, hit.value, hit.key, self2); - }; - lruCache = LRUCache; - return lruCache; -} -var range; -var hasRequiredRange; -function requireRange() { - if (hasRequiredRange) - return range; - hasRequiredRange = 1; - class Range2 { - constructor(range2, options) { - options = parseOptions2(options); - if (range2 instanceof Range2) { - if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) { - return range2; - } else { - return new Range2(range2.raw, options); - } - } - if (range2 instanceof Comparator2) { - this.raw = range2.value; - this.set = [[range2]]; - this.format(); - return this; - } - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range2; - this.set = range2.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${range2}`); - } - if (this.set.length > 1) { - const first = this.set[0]; - this.set = this.set.filter((c) => !isNullSet(c[0])); - if (this.set.length === 0) { - this.set = [first]; - } else if (this.set.length > 1) { - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c]; - break; - } - } - } - } - this.format(); - } - format() { - this.range = this.set.map((comps) => { - return comps.join(" ").trim(); - }).join("||").trim(); - return this.range; - } - toString() { - return this.range; - } - parseRange(range2) { - range2 = range2.trim(); - const memoOpts = Object.keys(this.options).join(","); - const memoKey = `parseRange:${memoOpts}:${range2}`; - const cached = cache.get(memoKey); - if (cached) { - return cached; - } - const loose = this.options.loose; - const hr = loose ? re2[t2.HYPHENRANGELOOSE] : re2[t2.HYPHENRANGE]; - range2 = range2.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug2("hyphen replace", range2); - range2 = range2.replace(re2[t2.COMPARATORTRIM], comparatorTrimReplace); - debug2("comparator trim", range2); - range2 = range2.replace(re2[t2.TILDETRIM], tildeTrimReplace); - range2 = range2.replace(re2[t2.CARETTRIM], caretTrimReplace); - range2 = range2.split(/\s+/).join(" "); - let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); - if (loose) { - rangeList = rangeList.filter((comp) => { - debug2("loose invalid filter", comp, this.options); - return !!comp.match(re2[t2.COMPARATORLOOSE]); - }); - } - debug2("range list", rangeList); - const rangeMap = /* @__PURE__ */ new Map(); - const comparators = rangeList.map((comp) => new Comparator2(comp, this.options)); - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp]; - } - rangeMap.set(comp.value, comp); - } - if (rangeMap.size > 1 && rangeMap.has("")) { - rangeMap.delete(""); - } - const result = [...rangeMap.values()]; - cache.set(memoKey, result); - return result; - } - intersects(range2, options) { - if (!(range2 instanceof Range2)) { - throw new TypeError("a Range is required"); - } - return this.set.some((thisComparators) => { - return isSatisfiable(thisComparators, options) && range2.set.some((rangeComparators) => { - return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); - } - // if ANY of the sets match ALL of its comparators, then pass - test(version2) { - if (!version2) { - return false; - } - if (typeof version2 === "string") { - try { - version2 = new SemVer3(version2, this.options); - } catch (er) { - return false; - } - } - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version2, this.options)) { - return true; - } - } - return false; - } - } - range = Range2; - const LRU = requireLruCache(); - const cache = new LRU({ max: 1e3 }); - const parseOptions2 = parseOptions_1; - const Comparator2 = requireComparator(); - const debug2 = debug_1; - const SemVer3 = semver$1; - const { - re: re2, - t: t2, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace - } = reExports; - const isNullSet = (c) => c.value === "<0.0.0-0"; - const isAny = (c) => c.value === ""; - const isSatisfiable = (comparators, options) => { - let result = true; - const remainingComparators = comparators.slice(); - let testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); - } - return result; - }; - const parseComparator = (comp, options) => { - debug2("comp", comp, options); - comp = replaceCarets(comp, options); - debug2("caret", comp); - comp = replaceTildes(comp, options); - debug2("tildes", comp); - comp = replaceXRanges(comp, options); - debug2("xrange", comp); - comp = replaceStars(comp, options); - debug2("stars", comp); - return comp; - }; - const isX = (id2) => !id2 || id2.toLowerCase() === "x" || id2 === "*"; - const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c) => { - return replaceTilde(c, options); - }).join(" "); - const replaceTilde = (comp, options) => { - const r = options.loose ? re2[t2.TILDELOOSE] : re2[t2.TILDE]; - return comp.replace(r, (_2, M2, m, p, pr) => { - debug2("tilde", comp, _2, M2, m, p, pr); - let ret; - if (isX(M2)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`; - } else if (isX(p)) { - ret = `>=${M2}.${m}.0 <${M2}.${+m + 1}.0-0`; - } else if (pr) { - debug2("replaceTilde pr", pr); - ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${+m + 1}.0-0`; - } else { - ret = `>=${M2}.${m}.${p} <${M2}.${+m + 1}.0-0`; - } - debug2("tilde return", ret); - return ret; - }); - }; - const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c) => { - return replaceCaret(c, options); - }).join(" "); - const replaceCaret = (comp, options) => { - debug2("caret", comp, options); - const r = options.loose ? re2[t2.CARETLOOSE] : re2[t2.CARET]; - const z2 = options.includePrerelease ? "-0" : ""; - return comp.replace(r, (_2, M2, m, p, pr) => { - debug2("caret", comp, _2, M2, m, p, pr); - let ret; - if (isX(M2)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M2}.0.0${z2} <${+M2 + 1}.0.0-0`; - } else if (isX(p)) { - if (M2 === "0") { - ret = `>=${M2}.${m}.0${z2} <${M2}.${+m + 1}.0-0`; - } else { - ret = `>=${M2}.${m}.0${z2} <${+M2 + 1}.0.0-0`; - } - } else if (pr) { - debug2("replaceCaret pr", pr); - if (M2 === "0") { - if (m === "0") { - ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M2}.${m}.${p}-${pr} <${+M2 + 1}.0.0-0`; - } - } else { - debug2("no pr"); - if (M2 === "0") { - if (m === "0") { - ret = `>=${M2}.${m}.${p}${z2} <${M2}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M2}.${m}.${p}${z2} <${M2}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M2}.${m}.${p} <${+M2 + 1}.0.0-0`; - } - } - debug2("caret return", ret); - return ret; - }); - }; - const replaceXRanges = (comp, options) => { - debug2("replaceXRanges", comp, options); - return comp.split(/\s+/).map((c) => { - return replaceXRange(c, options); - }).join(" "); - }; - const replaceXRange = (comp, options) => { - comp = comp.trim(); - const r = options.loose ? re2[t2.XRANGELOOSE] : re2[t2.XRANGE]; - return comp.replace(r, (ret, gtlt, M2, m, p, pr) => { - debug2("xRange", comp, ret, gtlt, M2, m, p, pr); - const xM = isX(M2); - const xm = xM || isX(m); - const xp = xm || isX(p); - const anyX = xp; - if (gtlt === "=" && anyX) { - gtlt = ""; - } - pr = options.includePrerelease ? "-0" : ""; - if (xM) { - if (gtlt === ">" || gtlt === "<") { - ret = "<0.0.0-0"; - } else { - ret = "*"; - } - } else if (gtlt && anyX) { - if (xm) { - m = 0; - } - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M2 = +M2 + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) { - M2 = +M2 + 1; - } else { - m = +m + 1; - } - } - if (gtlt === "<") { - pr = "-0"; - } - ret = `${gtlt + M2}.${m}.${p}${pr}`; - } else if (xm) { - ret = `>=${M2}.0.0${pr} <${+M2 + 1}.0.0-0`; - } else if (xp) { - ret = `>=${M2}.${m}.0${pr} <${M2}.${+m + 1}.0-0`; - } - debug2("xRange return", ret); - return ret; - }); - }; - const replaceStars = (comp, options) => { - debug2("replaceStars", comp, options); - return comp.trim().replace(re2[t2.STAR], ""); - }; - const replaceGTE0 = (comp, options) => { - debug2("replaceGTE0", comp, options); - return comp.trim().replace(re2[options.includePrerelease ? t2.GTE0PRE : t2.GTE0], ""); - }; - const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => { - if (isX(fM)) { - from = ""; - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? "-0" : ""}`; - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; - } else if (fpr) { - from = `>=${from}`; - } else { - from = `>=${from}${incPr ? "-0" : ""}`; - } - if (isX(tM)) { - to = ""; - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0`; - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0`; - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}`; - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0`; - } else { - to = `<=${to}`; - } - return `${from} ${to}`.trim(); - }; - const testSet = (set, version2, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version2)) { - return false; - } - } - if (version2.prerelease.length && !options.includePrerelease) { - for (let i = 0; i < set.length; i++) { - debug2(set[i].semver); - if (set[i].semver === Comparator2.ANY) { - continue; - } - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver; - if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { - return true; - } - } - } - return false; - } - return true; - }; - return range; -} -var comparator; -var hasRequiredComparator; -function requireComparator() { - if (hasRequiredComparator) - return comparator; - hasRequiredComparator = 1; - const ANY2 = Symbol("SemVer ANY"); - class Comparator2 { - static get ANY() { - return ANY2; - } - constructor(comp, options) { - options = parseOptions2(options); - if (comp instanceof Comparator2) { - if (comp.loose === !!options.loose) { - return comp; - } else { - comp = comp.value; - } - } - debug2("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY2) { - this.value = ""; - } else { - this.value = this.operator + this.semver.version; - } - debug2("comp", this); - } - parse(comp) { - const r = this.options.loose ? re2[t2.COMPARATORLOOSE] : re2[t2.COMPARATOR]; - const m = comp.match(r); - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`); - } - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") { - this.operator = ""; - } - if (!m[2]) { - this.semver = ANY2; - } else { - this.semver = new SemVer3(m[2], this.options.loose); - } - } - toString() { - return this.value; - } - test(version2) { - debug2("Comparator.test", version2, this.options.loose); - if (this.semver === ANY2 || version2 === ANY2) { - return true; - } - if (typeof version2 === "string") { - try { - version2 = new SemVer3(version2, this.options); - } catch (er) { - return false; - } - } - return cmp2(version2, this.operator, this.semver, this.options); - } - intersects(comp, options) { - if (!(comp instanceof Comparator2)) { - throw new TypeError("a Comparator is required"); - } - if (!options || typeof options !== "object") { - options = { - loose: !!options, - includePrerelease: false - }; - } - if (this.operator === "") { - if (this.value === "") { - return true; - } - return new Range2(comp.value, options).test(this.value); - } else if (comp.operator === "") { - if (comp.value === "") { - return true; - } - return new Range2(this.value, options).test(comp.semver); - } - const sameDirectionIncreasing = (this.operator === ">=" || this.operator === ">") && (comp.operator === ">=" || comp.operator === ">"); - const sameDirectionDecreasing = (this.operator === "<=" || this.operator === "<") && (comp.operator === "<=" || comp.operator === "<"); - const sameSemVer = this.semver.version === comp.semver.version; - const differentDirectionsInclusive = (this.operator === ">=" || this.operator === "<=") && (comp.operator === ">=" || comp.operator === "<="); - const oppositeDirectionsLessThan = cmp2(this.semver, "<", comp.semver, options) && (this.operator === ">=" || this.operator === ">") && (comp.operator === "<=" || comp.operator === "<"); - const oppositeDirectionsGreaterThan = cmp2(this.semver, ">", comp.semver, options) && (this.operator === "<=" || this.operator === "<") && (comp.operator === ">=" || comp.operator === ">"); - return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; - } - } - comparator = Comparator2; - const parseOptions2 = parseOptions_1; - const { re: re2, t: t2 } = reExports; - const cmp2 = cmp_1; - const debug2 = debug_1; - const SemVer3 = semver$1; - const Range2 = requireRange(); - return comparator; -} -const Range$9 = requireRange(); -const satisfies$4 = (version2, range2, options) => { - try { - range2 = new Range$9(range2, options); - } catch (er) { - return false; - } - return range2.test(version2); -}; -var satisfies_1 = satisfies$4; -const Range$8 = requireRange(); -const toComparators$1 = (range2, options) => new Range$8(range2, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); -var toComparators_1 = toComparators$1; -const SemVer$4 = semver$1; -const Range$7 = requireRange(); -const maxSatisfying$1 = (versions, range2, options) => { - let max = null; - let maxSV = null; - let rangeObj = null; - try { - rangeObj = new Range$7(range2, options); - } catch (er) { - return null; - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer$4(max, options); - } - } - }); - return max; -}; -var maxSatisfying_1 = maxSatisfying$1; -const SemVer$3 = semver$1; -const Range$6 = requireRange(); -const minSatisfying$1 = (versions, range2, options) => { - let min = null; - let minSV = null; - let rangeObj = null; - try { - rangeObj = new Range$6(range2, options); - } catch (er) { - return null; - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer$3(min, options); - } - } - }); - return min; -}; -var minSatisfying_1 = minSatisfying$1; -const SemVer$2 = semver$1; -const Range$5 = requireRange(); -const gt$2 = gt_1; -const minVersion$1 = (range2, loose) => { - range2 = new Range$5(range2, loose); - let minver = new SemVer$2("0.0.0"); - if (range2.test(minver)) { - return minver; - } - minver = new SemVer$2("0.0.0-0"); - if (range2.test(minver)) { - return minver; - } - minver = null; - for (let i = 0; i < range2.set.length; ++i) { - const comparators = range2.set[i]; - let setMin = null; - comparators.forEach((comparator2) => { - const compver = new SemVer$2(comparator2.semver.version); - switch (comparator2.operator) { - case ">": - if (compver.prerelease.length === 0) { - compver.patch++; - } else { - compver.prerelease.push(0); - } - compver.raw = compver.format(); - case "": - case ">=": - if (!setMin || gt$2(compver, setMin)) { - setMin = compver; - } - break; - case "<": - case "<=": - break; - default: - throw new Error(`Unexpected operation: ${comparator2.operator}`); - } - }); - if (setMin && (!minver || gt$2(minver, setMin))) { - minver = setMin; - } - } - if (minver && range2.test(minver)) { - return minver; - } - return null; -}; -var minVersion_1 = minVersion$1; -const Range$4 = requireRange(); -const validRange$1 = (range2, options) => { - try { - return new Range$4(range2, options).range || "*"; - } catch (er) { - return null; - } -}; -var valid$1 = validRange$1; -const SemVer$1 = semver$1; -const Comparator$2 = requireComparator(); -const { ANY: ANY$1 } = Comparator$2; -const Range$3 = requireRange(); -const satisfies$3 = satisfies_1; -const gt$1 = gt_1; -const lt$1 = lt_1; -const lte$1 = lte_1; -const gte$1 = gte_1; -const outside$3 = (version2, range2, hilo, options) => { - version2 = new SemVer$1(version2, options); - range2 = new Range$3(range2, options); - let gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case ">": - gtfn = gt$1; - ltefn = lte$1; - ltfn = lt$1; - comp = ">"; - ecomp = ">="; - break; - case "<": - gtfn = lt$1; - ltefn = gte$1; - ltfn = gt$1; - comp = "<"; - ecomp = "<="; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - if (satisfies$3(version2, range2, options)) { - return false; - } - for (let i = 0; i < range2.set.length; ++i) { - const comparators = range2.set[i]; - let high = null; - let low = null; - comparators.forEach((comparator2) => { - if (comparator2.semver === ANY$1) { - comparator2 = new Comparator$2(">=0.0.0"); - } - high = high || comparator2; - low = low || comparator2; - if (gtfn(comparator2.semver, high.semver, options)) { - high = comparator2; - } else if (ltfn(comparator2.semver, low.semver, options)) { - low = comparator2; - } - }); - if (high.operator === comp || high.operator === ecomp) { - return false; - } - if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version2, low.semver)) { - return false; - } - } - return true; -}; -var outside_1 = outside$3; -const outside$2 = outside_1; -const gtr$1 = (version2, range2, options) => outside$2(version2, range2, ">", options); -var gtr_1 = gtr$1; -const outside$1 = outside_1; -const ltr$1 = (version2, range2, options) => outside$1(version2, range2, "<", options); -var ltr_1 = ltr$1; -const Range$2 = requireRange(); -const intersects$1 = (r1, r2, options) => { - r1 = new Range$2(r1, options); - r2 = new Range$2(r2, options); - return r1.intersects(r2); -}; -var intersects_1 = intersects$1; -const satisfies$2 = satisfies_1; -const compare$2 = compare_1; -var simplify = (versions, range2, options) => { - const set = []; - let first = null; - let prev = null; - const v = versions.sort((a2, b2) => compare$2(a2, b2, options)); - for (const version2 of v) { - const included = satisfies$2(version2, range2, options); - if (included) { - prev = version2; - if (!first) { - first = version2; - } - } else { - if (prev) { - set.push([first, prev]); - } - prev = null; - first = null; - } - } - if (first) { - set.push([first, null]); - } - const ranges = []; - for (const [min, max] of set) { - if (min === max) { - ranges.push(min); - } else if (!max && min === v[0]) { - ranges.push("*"); - } else if (!max) { - ranges.push(`>=${min}`); - } else if (min === v[0]) { - ranges.push(`<=${max}`); - } else { - ranges.push(`${min} - ${max}`); - } - } - const simplified = ranges.join(" || "); - const original = typeof range2.raw === "string" ? range2.raw : String(range2); - return simplified.length < original.length ? simplified : range2; -}; -const Range$1 = requireRange(); -const Comparator$1 = requireComparator(); -const { ANY } = Comparator$1; -const satisfies$1 = satisfies_1; -const compare$1 = compare_1; -const subset$1 = (sub, dom, options = {}) => { - if (sub === dom) { - return true; - } - sub = new Range$1(sub, options); - dom = new Range$1(dom, options); - let sawNonNull = false; - OUTER: - for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options); - sawNonNull = sawNonNull || isSub !== null; - if (isSub) { - continue OUTER; - } - } - if (sawNonNull) { - return false; - } - } - return true; -}; -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true; - } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true; - } else if (options.includePrerelease) { - sub = [new Comparator$1(">=0.0.0-0")]; - } else { - sub = [new Comparator$1(">=0.0.0")]; - } - } - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true; - } else { - dom = [new Comparator$1(">=0.0.0")]; - } - } - const eqSet = /* @__PURE__ */ new Set(); - let gt2, lt2; - for (const c of sub) { - if (c.operator === ">" || c.operator === ">=") { - gt2 = higherGT(gt2, c, options); - } else if (c.operator === "<" || c.operator === "<=") { - lt2 = lowerLT(lt2, c, options); - } else { - eqSet.add(c.semver); - } - } - if (eqSet.size > 1) { - return null; - } - let gtltComp; - if (gt2 && lt2) { - gtltComp = compare$1(gt2.semver, lt2.semver, options); - if (gtltComp > 0) { - return null; - } else if (gtltComp === 0 && (gt2.operator !== ">=" || lt2.operator !== "<=")) { - return null; - } - } - for (const eq2 of eqSet) { - if (gt2 && !satisfies$1(eq2, String(gt2), options)) { - return null; - } - if (lt2 && !satisfies$1(eq2, String(lt2), options)) { - return null; - } - for (const c of dom) { - if (!satisfies$1(eq2, String(c), options)) { - return false; - } - } - return true; - } - let higher, lower; - let hasDomLT, hasDomGT; - let needDomLTPre = lt2 && !options.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false; - let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false; - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false; - } - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; - hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; - if (gt2) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false; - } - } - if (c.operator === ">" || c.operator === ">=") { - higher = higherGT(gt2, c, options); - if (higher === c && higher !== gt2) { - return false; - } - } else if (gt2.operator === ">=" && !satisfies$1(gt2.semver, String(c), options)) { - return false; - } - } - if (lt2) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false; - } - } - if (c.operator === "<" || c.operator === "<=") { - lower = lowerLT(lt2, c, options); - if (lower === c && lower !== lt2) { - return false; - } - } else if (lt2.operator === "<=" && !satisfies$1(lt2.semver, String(c), options)) { - return false; - } - } - if (!c.operator && (lt2 || gt2) && gtltComp !== 0) { - return false; - } - } - if (gt2 && hasDomLT && !lt2 && gtltComp !== 0) { - return false; - } - if (lt2 && hasDomGT && !gt2 && gtltComp !== 0) { - return false; - } - if (needDomGTPre || needDomLTPre) { - return false; - } - return true; -}; -const higherGT = (a2, b2, options) => { - if (!a2) { - return b2; - } - const comp = compare$1(a2.semver, b2.semver, options); - return comp > 0 ? a2 : comp < 0 ? b2 : b2.operator === ">" && a2.operator === ">=" ? b2 : a2; -}; -const lowerLT = (a2, b2, options) => { - if (!a2) { - return b2; - } - const comp = compare$1(a2.semver, b2.semver, options); - return comp < 0 ? a2 : comp > 0 ? b2 : b2.operator === "<" && a2.operator === "<=" ? b2 : a2; -}; -var subset_1 = subset$1; -const internalRe = reExports; -const constants = constants$1; -const SemVer = semver$1; -const identifiers = identifiers$1; -const parse = parse_1; -const valid = valid_1; -const clean = clean_1; -const inc = inc_1; -const diff = diff_1; -const major = major_1; -const minor = minor_1; -const patch = patch_1; -const prerelease = prerelease_1; -const compare = compare_1; -const rcompare = rcompare_1; -const compareLoose = compareLoose_1; -const compareBuild = compareBuild_1; -const sort = sort_1; -const rsort = rsort_1; -const gt = gt_1; -const lt = lt_1; -const eq = eq_1; -const neq = neq_1; -const gte = gte_1; -const lte = lte_1; -const cmp = cmp_1; -const coerce = coerce_1; -const Comparator = requireComparator(); -const Range = requireRange(); -const satisfies = satisfies_1; -const toComparators = toComparators_1; -const maxSatisfying = maxSatisfying_1; -const minSatisfying = minSatisfying_1; -const minVersion = minVersion_1; -const validRange = valid$1; -const outside = outside_1; -const gtr = gtr_1; -const ltr = ltr_1; -const intersects = intersects_1; -const simplifyRange = simplify; -const subset = subset_1; -var semver = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers -}; -var __defProp$6 = Object.defineProperty; -var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor; -var __decorateClass$6 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$6(target, key, result); - return result; -}; -var __decorateParam$3 = (index, decorator) => (target, key) => decorator(target, key, index); -let SystemManager = class { - constructor(storageManager) { - this.storageMangager = storageManager; - } - async saveToLocal(p, content) { - FileClient.getInstanceApi().fileApi.putFile(p, content); - } - async localCacheInit() { - } - delayAutoUpgrade() { - return false; - } - async tryUpgrade() { - } - async getOnlineVersion() { - return VERSION$1; - } - async upgrade() { - } - async compareWidgetVersion() { - const res = await getBazzarWidget(); - const packages = res.packages; - const ps = packages.find((p) => p.name === "插件系统"); - if (!ps) { - return; - } - const latestVersion = ps.version; - const result = new semver.SemVer(VERSION$1).compare(latestVersion); - if (result < 0) { - new Notification({ message: _("new_version_widget"), type: "info" }).show(); - } - } -}; -SystemManager = __decorateClass$6([ - injectable(), - __decorateParam$3(0, inject(TYPES.StorageManager)) -], SystemManager); -var __defProp$5 = Object.defineProperty; -var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor; -var __decorateClass$5 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$5(target, key, result); - return result; -}; -var __decorateParam$2 = (index, decorator) => (target, key) => decorator(target, key, index); -let components; -let PluginLoader = class { - constructor(pluginFileManager) { - this.pluginFileManager = pluginFileManager; - this.loadedPlugins = /* @__PURE__ */ new Map(); - } - async loadEnabledPlugins(plugins) { - if (!plugins || !plugins.length) { - return; - } - for (const p of plugins) { - if (!p.enabled) { - continue; - } - await this.loadPlugin(p); - } - } - async loadAllInternalPlugins() { - internalPlugins.forEach(async (p) => { - const plug2 = new p.plugin(); - if (!(plug2 instanceof Plugin)) { - throw new Error(`Failed to load plugin ${p.name}`); - } - log(`Load internal plugin: ${p.key}(${p.name})`); - this.addAdditionalMethod(plug2, p.key, p.name); - await plug2.onload(); - this.loadedPlugins.set(p.key, plug2); - }); - } - async loadAllLocalPlugins() { - const plugins = await this.pluginFileManager.getAllPlugins(); - if (!plugins) { - return; - } - for (const p of plugins) { - await this.loadPlugin(p); - } - } - async loadPlugin(plugin) { - if (!components) { - this.generateRequiredModules(); - } - if (!plugin.enabled || !plugin.plugin && !plugin.script) { - return; - } - if (plugin.plugin) { - const plug2 = new plugin.plugin(); - if (!(plug2 instanceof Plugin)) { - throw new Error(`Failed to load plugin ${plugin.name}`); - } - log(`Load internal plugin: ${plugin.key}(${plugin.name})`); - this.addAdditionalMethod(plug2, plugin.key, plugin.name); - await plug2.onload(); - this.loadedPlugins.set(plugin.key, plug2); - return; - } - const exports = {}; - const module = { exports }; - function run(script, name) { - return eval("(function anonymous(require,module,exports){".concat(script, "\n})\n//# sourceURL=").concat(name, "\n")); - } - const __require = (name2) => { - if (components[name2]) { - return components[name2]; - } - throw new Error(`module ${name2} not found`); - }; - const pluginName = plugin.key; - try { - run(plugin.script, plugin.key)(__require, module, exports); - } catch (e) { - error("Error plugin:" + plugin.key + " ->", e); - return; - } - let pluginConstructor; - if (!(pluginConstructor = (module.exports || exports).default || module.exports)) { - throw new Error(`Failed to load plugin ${pluginName}. No exports detected.`); - } - const plug = new pluginConstructor(); - if (!(plug instanceof Plugin)) { - throw new Error(`Failed to load plugin ${pluginName}`); - } - this.addAdditionalMethod(plug, plugin.key, pluginName); - try { - await plug.onload(); - this.loadedPlugins.set(plugin.key, plug); - } catch (e) { - error("Error plugin:" + plugin.key + " ->", e); - } - } - async unloadPlugin(key) { - const plugin2 = this.loadedPlugins.get(key); - if (!plugin2) { - return; - } - plugin2.onunload(); - container.get(TYPES.CommandManager).unregisterCommandByPlugin(key); - container.get(TYPES.SettingManager).unregisterSetting(key); - this.loadedPlugins.delete(key); - } - async unloadThirdPartyPlugins(plugins) { - const keys = plugins.filter((p) => p.enabled).map((p) => p.key); - for (const k2 of keys) { - log(`unload third party plugin: ${k2}`); - await this.unloadPlugin(k2); - } - } - async loadThirdPartyEnabledPlugins(plugins) { - return this.loadEnabledPlugins(plugins); - } - generateRequiredModules() { - components = { - siyuan: api, - axios: axios$1 - }; - } - addAdditionalMethod(plugin2, pluginKey, pluginName2) { - plugin2.registerCommand = (command) => { - const cm = container.get(TYPES.CommandManager); - cm.registerCommand({ - ...command, - plugin: pluginKey, - pluginName: pluginName2 - }); - }; - const sm = container.get(TYPES.StorageManager); - plugin2.writeStorage = async (filename, content) => { - return await sm.setPluginStorage(pluginKey, filename, content); - }; - plugin2.loadStorage = async (filename) => { - return await sm.getPluginStorage(pluginKey, filename); - }; - plugin2.registerSettingRender = (settingRender) => { - const cm = container.get(TYPES.SettingManager); - cm.registerSetting(pluginKey, settingRender); - }; - } -}; -PluginLoader = __decorateClass$5([ - injectable(), - __decorateParam$2(0, inject(TYPES.PluginFileManager)) -], PluginLoader); -var __defProp$4 = Object.defineProperty; -var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor; -var __decorateClass$4 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$4(target, key, result); - return result; -}; -let PluginFileManager = class { - async scanPlugins(pluginFolder) { - const res = await FileClient.getInstanceApi().fileApi.readDir(pluginFolder); - if (!res) { - return []; - } - const files = res; - const result = []; - for (const f of files) { - if (f.name.startsWith(".")) { - continue; - } - if (f.isDir && await isExists(`/data/plugins/${f.name}/manifest.json`) && await isExists(`/data/plugins/${f.name}/main.js`)) { - result.push(`/data/plugins/${f.name}`); - } - } - return result; - } - async getFileContent(f) { - const res = await FileClient.getInstanceApi().fileApi.getFile(f); - return res || ""; - } - async getManifest(manifest) { - const content = await this.getFileContent(manifest); - try { - return JSON.parse(content); - } catch (e) { - error("loading manifest: " + manifest, e); - return null; - } - } - async getScript(script2) { - return await this.getFileContent(script2); - } - async getAllPlugins() { - const plugins = await this.scanPlugins("/data/plugins"); - if (!plugins || !plugins.length) { - log("No plugin found in /data/plugins"); - return []; - } - const req = []; - for (const p of plugins) { - log("Reading plugin from filesystem: " + p); - const key = this.getFolderName(p); - const f = async () => { - const [manifest, script2] = await Promise.all([this.getManifest(`${p}/manifest.json`), this.getScript(`${p}/main.js`)]); - return { ...manifest, script: script2, enabled: false, key }; - }; - req.push(f()); - } - const result = await Promise.all(req); - return result || []; - } - getFolderName(p) { - const f = p.split("/"); - for (let i = f.length - 1; i >= 0; i--) { - if (f[i]) { - return f[i]; - } - } - return ""; - } -}; -PluginFileManager = __decorateClass$4([ - injectable() -], PluginFileManager); -var __defProp$3 = Object.defineProperty; -var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor; -var __decorateClass$3 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$3(target, key, result); - return result; -}; -let EventBus = class { - constructor() { - this.eventListeners = {}; - } - destroy() { - delete this.eventListeners; - } - on(eventName, callback) { - if (!this.eventListeners[eventName]) { - this.eventListeners[eventName] = []; - } - this.eventListeners[eventName].push(callback); - return () => this.off(eventName, callback); - } - off(eventName, callback) { - if (!callback) { - delete this.eventListeners[eventName]; - return; - } - for (let i = 0; i < this.eventListeners[eventName].length; i++) { - if (this.eventListeners[eventName][i] === callback) { - this.eventListeners[eventName].splice(i, 1); - return; - } - } - } - emit(eventName, ...args) { - if (this.eventListeners[eventName]) { - this.eventListeners[eventName].forEach((cb) => { - cb(...args); - }); - } - } -}; -EventBus = __decorateClass$3([ - injectable() -], EventBus); -var __defProp$2 = Object.defineProperty; -var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor; -var __decorateClass$2 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$2(target, key, result); - return result; -}; -var __decorateParam$1 = (index, decorator) => (target, key) => decorator(target, key, index); -let CommandManager = class { - constructor(shortcut2) { - this.commandList = []; - this.shortcut = shortcut2; - } - registerCommand(command) { - if (this.commandList.some((com) => { - com.plugin === command.plugin && com.command === command.command; - })) { - return new Error$1("Command is already registered, do not register command repeatly"); - } - if (command.shortcut && this.commandList.some((com) => { - com.shortcut === command.shortcut; - })) { - return new Warning("shortcut has already registered"); - } - this.commandList.push(command); - this.shortcut.registerKeyboardEventFromPlugin(command); - log(`Register plugin: ${command.plugin} command: ${command.command}`); - } - unregisterCommandByPlugin(plugin2) { - for (let i = 0; i < this.commandList.length; i++) { - if (plugin2 === this.commandList[i].plugin) { - const com = this.commandList[i]; - log(`Unregister plugin: ${plugin2} command: ${com.command}`); - this.commandList.splice(i, 1); - if (com.shortcut) { - this.shortcut.unregisterKeyboardEvent(com.shortcut); - } - } - } - } - unregisterCommand(command) { - for (let i = 0; i < this.commandList.length; i++) { - if (command.command === this.commandList[i].command && command.plugin === this.commandList[i].plugin) { - this.commandList.splice(i, 1); - break; - } - } - this.shortcut.registerKeyboardEventFromPlugin(command); - } - getCommands() { - return this.commandList; - } -}; -CommandManager = __decorateClass$2([ - injectable(), - __decorateParam$1(0, inject(TYPES.Shortcut)) -], CommandManager); -var isff = typeof navigator !== "undefined" ? navigator.userAgent.toLowerCase().indexOf("firefox") > 0 : false; -function addEvent(object, event, method, useCapture) { - if (object.addEventListener) { - object.addEventListener(event, method, useCapture); - } else if (object.attachEvent) { - object.attachEvent("on".concat(event), function() { - method(window.event); - }); - } -} -function getMods(modifier, key) { - var mods = key.slice(0, key.length - 1); - for (var i = 0; i < mods.length; i++) { - mods[i] = modifier[mods[i].toLowerCase()]; - } - return mods; -} -function getKeys(key) { - if (typeof key !== "string") - key = ""; - key = key.replace(/\s/g, ""); - var keys = key.split(","); - var index = keys.lastIndexOf(""); - for (; index >= 0; ) { - keys[index - 1] += ","; - keys.splice(index, 1); - index = keys.lastIndexOf(""); - } - return keys; -} -function compareArray(a1, a2) { - var arr1 = a1.length >= a2.length ? a1 : a2; - var arr2 = a1.length >= a2.length ? a2 : a1; - var isIndex = true; - for (var i = 0; i < arr1.length; i++) { - if (arr2.indexOf(arr1[i]) === -1) - isIndex = false; - } - return isIndex; -} -var _keyMap = { - backspace: 8, - "⌫": 8, - tab: 9, - clear: 12, - enter: 13, - "↩": 13, - return: 13, - esc: 27, - escape: 27, - space: 32, - left: 37, - up: 38, - right: 39, - down: 40, - del: 46, - delete: 46, - ins: 45, - insert: 45, - home: 36, - end: 35, - pageup: 33, - pagedown: 34, - capslock: 20, - num_0: 96, - num_1: 97, - num_2: 98, - num_3: 99, - num_4: 100, - num_5: 101, - num_6: 102, - num_7: 103, - num_8: 104, - num_9: 105, - num_multiply: 106, - num_add: 107, - num_enter: 108, - num_subtract: 109, - num_decimal: 110, - num_divide: 111, - "⇪": 20, - ",": 188, - ".": 190, - "/": 191, - "`": 192, - "-": isff ? 173 : 189, - "=": isff ? 61 : 187, - ";": isff ? 59 : 186, - "'": 222, - "[": 219, - "]": 221, - "\\": 220 -}; -var _modifier = { - // shiftKey - "⇧": 16, - shift: 16, - // altKey - "⌥": 18, - alt: 18, - option: 18, - // ctrlKey - "⌃": 17, - ctrl: 17, - control: 17, - // metaKey - "⌘": 91, - cmd: 91, - command: 91 -}; -var modifierMap = { - 16: "shiftKey", - 18: "altKey", - 17: "ctrlKey", - 91: "metaKey", - shiftKey: 16, - ctrlKey: 17, - altKey: 18, - metaKey: 91 -}; -var _mods = { - 16: false, - 18: false, - 17: false, - 91: false -}; -var _handlers = {}; -for (var k = 1; k < 20; k++) { - _keyMap["f".concat(k)] = 111 + k; -} -var _downKeys = []; -var winListendFocus = false; -var _scope = "all"; -var elementHasBindEvent = []; -var code = function code2(x) { - return _keyMap[x.toLowerCase()] || _modifier[x.toLowerCase()] || x.toUpperCase().charCodeAt(0); -}; -var getKey = function getKey2(x) { - return Object.keys(_keyMap).find(function(k2) { - return _keyMap[k2] === x; - }); -}; -var getModifier = function getModifier2(x) { - return Object.keys(_modifier).find(function(k2) { - return _modifier[k2] === x; - }); -}; -function setScope(scope) { - _scope = scope || "all"; -} -function getScope() { - return _scope || "all"; -} -function getPressedKeyCodes() { - return _downKeys.slice(0); -} -function getPressedKeyString() { - return _downKeys.map(function(c) { - return getKey(c) || getModifier(c) || String.fromCharCode(c); - }); -} -function filter(event) { - var target = event.target || event.srcElement; - var tagName = target.tagName; - var flag = true; - if (target.isContentEditable || (tagName === "INPUT" || tagName === "TEXTAREA" || tagName === "SELECT") && !target.readOnly) { - flag = false; - } - return flag; -} -function isPressed(keyCode) { - if (typeof keyCode === "string") { - keyCode = code(keyCode); - } - return _downKeys.indexOf(keyCode) !== -1; -} -function deleteScope(scope, newScope) { - var handlers; - var i; - if (!scope) - scope = getScope(); - for (var key in _handlers) { - if (Object.prototype.hasOwnProperty.call(_handlers, key)) { - handlers = _handlers[key]; - for (i = 0; i < handlers.length; ) { - if (handlers[i].scope === scope) - handlers.splice(i, 1); - else - i++; - } - } - } - if (getScope() === scope) - setScope(newScope || "all"); -} -function clearModifier(event) { - var key = event.keyCode || event.which || event.charCode; - var i = _downKeys.indexOf(key); - if (i >= 0) { - _downKeys.splice(i, 1); - } - if (event.key && event.key.toLowerCase() === "meta") { - _downKeys.splice(0, _downKeys.length); - } - if (key === 93 || key === 224) - key = 91; - if (key in _mods) { - _mods[key] = false; - for (var k2 in _modifier) { - if (_modifier[k2] === key) - hotkeys[k2] = false; - } - } -} -function unbind(keysInfo) { - if (typeof keysInfo === "undefined") { - Object.keys(_handlers).forEach(function(key) { - return delete _handlers[key]; - }); - } else if (Array.isArray(keysInfo)) { - keysInfo.forEach(function(info) { - if (info.key) - eachUnbind(info); - }); - } else if (typeof keysInfo === "object") { - if (keysInfo.key) - eachUnbind(keysInfo); - } else if (typeof keysInfo === "string") { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - var scope = args[0], method = args[1]; - if (typeof scope === "function") { - method = scope; - scope = ""; - } - eachUnbind({ - key: keysInfo, - scope, - method, - splitKey: "+" - }); - } -} -var eachUnbind = function eachUnbind2(_ref) { - var key = _ref.key, scope = _ref.scope, method = _ref.method, _ref$splitKey = _ref.splitKey, splitKey = _ref$splitKey === void 0 ? "+" : _ref$splitKey; - var multipleKeys = getKeys(key); - multipleKeys.forEach(function(originKey) { - var unbindKeys = originKey.split(splitKey); - var len = unbindKeys.length; - var lastKey = unbindKeys[len - 1]; - var keyCode = lastKey === "*" ? "*" : code(lastKey); - if (!_handlers[keyCode]) - return; - if (!scope) - scope = getScope(); - var mods = len > 1 ? getMods(_modifier, unbindKeys) : []; - _handlers[keyCode] = _handlers[keyCode].filter(function(record) { - var isMatchingMethod = method ? record.method === method : true; - return !(isMatchingMethod && record.scope === scope && compareArray(record.mods, mods)); - }); - }); -}; -function eventHandler(event, handler, scope, element2) { - if (handler.element !== element2) { - return; - } - var modifiersMatch; - if (handler.scope === scope || handler.scope === "all") { - modifiersMatch = handler.mods.length > 0; - for (var y in _mods) { - if (Object.prototype.hasOwnProperty.call(_mods, y)) { - if (!_mods[y] && handler.mods.indexOf(+y) > -1 || _mods[y] && handler.mods.indexOf(+y) === -1) { - modifiersMatch = false; - } - } - } - if (handler.mods.length === 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91] || modifiersMatch || handler.shortcut === "*") { - if (handler.method(event, handler) === false) { - if (event.preventDefault) - event.preventDefault(); - else - event.returnValue = false; - if (event.stopPropagation) - event.stopPropagation(); - if (event.cancelBubble) - event.cancelBubble = true; - } - } - } -} -function dispatch(event, element2) { - var asterisk = _handlers["*"]; - var key = event.keyCode || event.which || event.charCode; - if (!hotkeys.filter.call(this, event)) - return; - if (key === 93 || key === 224) - key = 91; - if (_downKeys.indexOf(key) === -1 && key !== 229) - _downKeys.push(key); - ["ctrlKey", "altKey", "shiftKey", "metaKey"].forEach(function(keyName) { - var keyNum = modifierMap[keyName]; - if (event[keyName] && _downKeys.indexOf(keyNum) === -1) { - _downKeys.push(keyNum); - } else if (!event[keyName] && _downKeys.indexOf(keyNum) > -1) { - _downKeys.splice(_downKeys.indexOf(keyNum), 1); - } else if (keyName === "metaKey" && event[keyName] && _downKeys.length === 3) { - if (!(event.ctrlKey || event.shiftKey || event.altKey)) { - _downKeys = _downKeys.slice(_downKeys.indexOf(keyNum)); - } - } - }); - if (key in _mods) { - _mods[key] = true; - for (var k2 in _modifier) { - if (_modifier[k2] === key) - hotkeys[k2] = true; - } - if (!asterisk) - return; - } - for (var e in _mods) { - if (Object.prototype.hasOwnProperty.call(_mods, e)) { - _mods[e] = event[modifierMap[e]]; - } - } - if (event.getModifierState && !(event.altKey && !event.ctrlKey) && event.getModifierState("AltGraph")) { - if (_downKeys.indexOf(17) === -1) { - _downKeys.push(17); - } - if (_downKeys.indexOf(18) === -1) { - _downKeys.push(18); - } - _mods[17] = true; - _mods[18] = true; - } - var scope = getScope(); - if (asterisk) { - for (var i = 0; i < asterisk.length; i++) { - if (asterisk[i].scope === scope && (event.type === "keydown" && asterisk[i].keydown || event.type === "keyup" && asterisk[i].keyup)) { - eventHandler(event, asterisk[i], scope, element2); - } - } - } - if (!(key in _handlers)) - return; - for (var _i = 0; _i < _handlers[key].length; _i++) { - if (event.type === "keydown" && _handlers[key][_i].keydown || event.type === "keyup" && _handlers[key][_i].keyup) { - if (_handlers[key][_i].key) { - var record = _handlers[key][_i]; - var splitKey = record.splitKey; - var keyShortcut = record.key.split(splitKey); - var _downKeysCurrent = []; - for (var a2 = 0; a2 < keyShortcut.length; a2++) { - _downKeysCurrent.push(code(keyShortcut[a2])); - } - if (_downKeysCurrent.sort().join("") === _downKeys.sort().join("")) { - eventHandler(event, record, scope, element2); - } - } - } - } -} -function isElementBind(element2) { - return elementHasBindEvent.indexOf(element2) > -1; -} -function hotkeys(key, option, method) { - _downKeys = []; - var keys = getKeys(key); - var mods = []; - var scope = "all"; - var element2 = document; - var i = 0; - var keyup = false; - var keydown = true; - var splitKey = "+"; - var capture = false; - if (method === void 0 && typeof option === "function") { - method = option; - } - if (Object.prototype.toString.call(option) === "[object Object]") { - if (option.scope) - scope = option.scope; - if (option.element) - element2 = option.element; - if (option.keyup) - keyup = option.keyup; - if (option.keydown !== void 0) - keydown = option.keydown; - if (option.capture !== void 0) - capture = option.capture; - if (typeof option.splitKey === "string") - splitKey = option.splitKey; - } - if (typeof option === "string") - scope = option; - for (; i < keys.length; i++) { - key = keys[i].split(splitKey); - mods = []; - if (key.length > 1) - mods = getMods(_modifier, key); - key = key[key.length - 1]; - key = key === "*" ? "*" : code(key); - if (!(key in _handlers)) - _handlers[key] = []; - _handlers[key].push({ - keyup, - keydown, - scope, - mods, - shortcut: keys[i], - method, - key: keys[i], - splitKey, - element: element2 - }); - } - if (typeof element2 !== "undefined" && !isElementBind(element2) && window) { - elementHasBindEvent.push(element2); - addEvent(element2, "keydown", function(e) { - dispatch(e, element2); - }, capture); - if (!winListendFocus) { - winListendFocus = true; - addEvent(window, "focus", function() { - _downKeys = []; - }, capture); - } - addEvent(element2, "keyup", function(e) { - dispatch(e, element2); - clearModifier(e); - }, capture); - } -} -function trigger(shortcut2) { - var scope = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "all"; - Object.keys(_handlers).forEach(function(key) { - var dataList = _handlers[key].filter(function(item) { - return item.scope === scope && item.shortcut === shortcut2; - }); - dataList.forEach(function(data) { - if (data && data.method) { - data.method(); - } - }); - }); -} -var _api = { - getPressedKeyString, - setScope, - getScope, - deleteScope, - getPressedKeyCodes, - isPressed, - filter, - trigger, - unbind, - keyMap: _keyMap, - modifier: _modifier, - modifierMap -}; -for (var a in _api) { - if (Object.prototype.hasOwnProperty.call(_api, a)) { - hotkeys[a] = _api[a]; - } -} -if (typeof window !== "undefined") { - var _hotkeys = window.hotkeys; - hotkeys.noConflict = function(deep) { - if (deep && window.hotkeys === hotkeys) { - window.hotkeys = _hotkeys; - } - return hotkeys; - }; - window.hotkeys = hotkeys; -} -var __defProp$1 = Object.defineProperty; -var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor; -var __decorateClass$1 = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp$1(target, key, result); - return result; -}; -var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index); -hotkeys.filter = function() { - return true; -}; -let Shortcut = class { - constructor(eventBus) { - this.option = { - capture: true - }; - log("Initialize shortcut subsystem"); - this.eventBus = eventBus; - } - registerKeyboardEvent(shortcut2, callback) { - hotkeys(shortcut2, this.option, callback); - this.eventBus.on(shortcut2.toString(), callback); - } - unregisterKeyboardEvent(shortcut2) { - hotkeys.unbind(shortcut2); - this.eventBus.off(shortcut2.toString()); - } - registerKeyboardEventFromPlugin(command) { - if (command.shortcut && command.callback) { - this.registerKeyboardEvent(command.shortcut, command.callback); - } - } - unregisterKeyboardEventFromPlugin(command) { - if (command.shortcut && command.callback) { - this.unregisterKeyboardEvent(command.shortcut); - } - } -}; -Shortcut = __decorateClass$1([ - injectable(), - __decorateParam(0, inject(TYPES.EventBus)) -], Shortcut); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __decorateClass = (decorators, target, key, kind) => { - var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target; - for (var i = decorators.length - 1, decorator; i >= 0; i--) - if (decorator = decorators[i]) - result = (kind ? decorator(target, key, result) : decorator(result)) || result; - if (kind && result) - __defProp(target, key, result); - return result; -}; -let SettingManager = class { - constructor() { - this.settingRenders = /* @__PURE__ */ new Map(); - } - registerSetting(pluginKey, settingRender) { - this.settingRenders.set(pluginKey, settingRender); - } - unregisterSetting(key) { - this.settingRenders.delete(key); - } - getSettingRenders() { - const result = []; - this.settingRenders.forEach((value, key) => { - result.push({ key, value }); - }); - return result; - } -}; -SettingManager = __decorateClass([ - injectable() -], SettingManager); -const container = new Container(); -container.bind(TYPES.StorageManager).to(StorageManager).inSingletonScope(); -container.bind(TYPES.SystemManager).to(SystemManager).inSingletonScope(); -container.bind(TYPES.PluginSystem).to(PluginSystem).inSingletonScope(); -container.bind(TYPES.PluginLoader).to(PluginLoader).inSingletonScope(); -container.bind(TYPES.PluginFileManager).to(PluginFileManager).inSingletonScope(); -container.bind(TYPES.EventBus).to(EventBus); -container.bind(TYPES.Shortcut).to(Shortcut).inSingletonScope(); -container.bind(TYPES.CommandManager).to(CommandManager).inSingletonScope(); -container.bind(TYPES.Store).to(Store).inSingletonScope(); -container.bind(TYPES.SettingManager).to(SettingManager).inSingletonScope(); -function initPluginSystem() { - if (!window.pluginSystem) { - log("Siyuan Plugin System loading..."); - window.pluginSystemVersion = VERSION$1; - window.pluginSystem = container.get(TYPES.PluginSystem).init(); - window.pluginSystemIocContainer = container; - } -} -export { - initPluginSystem as default, - initPluginSystem -}; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5lc20uanMiLCJzb3VyY2VzIjpbIi4uL25vZGVfbW9kdWxlcy8ucG5wbS9yZWZsZWN0LW1ldGFkYXRhQDAuMS4xMy9ub2RlX21vZHVsZXMvcmVmbGVjdC1tZXRhZGF0YS9SZWZsZWN0LmpzIiwiLi4vc3JjL2NvbmZpZy50cyIsIi4uL3NyYy9hcGkvc2VydmVyLWFwaS50cyIsIi4uL3NyYy9pbnRlcm5hbC9jbGFzc2VzL25vdGlmaWNhdGlvbi50cyIsIi4uL25vZGVfbW9kdWxlcy8ucG5wbS96aGktbG9nQDEuNi4xL25vZGVfbW9kdWxlcy96aGktbG9nL2xpYi9pbmRleC5qcyIsIi4uL3NyYy9hcGkvY2xpZW50LWFwaS50cyIsIi4uL3NyYy9pbnRlcm5hbC9jbGFzc2VzL21lbnUudHMiLCIuLi9zcmMvaW50ZXJuYWwvY2xhc3Nlcy9kaWFsb2cudHMiLCIuLi9zcmMvYXBpL3BsdWdpbi50cyIsIi4uL3NyYy9hcGkudHMiLCIuLi9zcmMvYXBpL2ZpbGUtYXBpLnRzIiwiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL2F4aW9zQDEuMy40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9iaW5kLmpzIiwiLi4vbm9kZV9tb2R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geyBfX3Byb3RvX186IFtdIH0gaW5zdGFuY2VvZiBBcnJheTsgLy8gZmVhdHVyZSB0ZXN0IGZvciBfX3Byb3RvX18gc3VwcG9ydFxuICAgICAgICB2YXIgZG93bkxldmVsID0gIXN1cHBvcnRzQ3JlYXRlICYmICFzdXBwb3J0c1Byb3RvO1xuICAgICAgICB2YXIgSGFzaE1hcCA9IHtcbiAgICAgICAgICAgIC8vIGNyZWF0ZSBhbiBvYmplY3QgaW4gZGljdGlvbmFyeSBtb2RlIChhLmsuYS4gXCJzbG93XCIgbW9kZSBpbiB2OClcbiAgICAgICAgICAgIGNyZWF0ZTogc3VwcG9ydHNDcmVhdGVcbiAgICAgICAgICAgICAgICA/IGZ1bmN0aW9uICgpIHsgcmV0dXJuIE1ha2VEaWN0aW9uYXJ5KE9iamVjdC5jcmVhdGUobnVsbCkpOyB9XG4gICAgICAgICAgICAgICAgOiBzdXBwb3J0c1Byb3RvXG4gICAgICAgICAgICAgICAgICAgID8gZnVuY3Rpb24gKCkgeyByZXR1cm4gTWFrZURpY3Rpb25hcnkoeyBfX3Byb3RvX186IG51bGwgfSk7IH1cbiAgICAgICAgICAgICAgICAgICAgOiBmdW5jdGlvbiAoKSB7IHJldHVybiBNYWtlRGljdGlvbmFyeSh7fSk7IH0sXG4gICAgICAgICAgICBoYXM6IGRvd25MZXZlbFxuICAgICAgICAgICAgICAgID8gZnVuY3Rpb24gKG1hcCwga2V5KSB7IHJldHVybiBoYXNPd24uY2FsbChtYXAsIGtleSk7IH1cbiAgICAgICAgICAgICAgICA6IGZ1bmN0aW9uIChtYXAsIGtleSkgeyByZXR1cm4ga2V5IGluIG1hcDsgfSxcbiAgICAgICAgICAgIGdldDogZG93bkxldmVsXG4gICAgICAgICAgICAgICAgPyBmdW5jdGlvbiAobWFwLCBrZXkpIHsgcmV0dXJuIGhhc093bi5jYWxsKG1hcCwga2V5KSA/IG1hcFtrZXldIDogdW5kZWZpbmVkOyB9XG4gICAgICAgICAgICAgICAgOiBm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hdGEvI29yZGluYXJ5LW9iamVjdC1pbnRlcm5hbC1tZXRob2RzLWFuZC1pbnRlcm5hbC1zbG90c1xuICAgICAgICB2YXIgTWV0YWRhdGEgPSBuZXcgX1dlYWtNYXAoKTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEFwcGxpZXMgYSBzZXQgb2YgZGVjb3JhdG9ycyB0byBhIHByb3BlcnR5IG9mIGEgdGFyZ2V0IG9iamVjdC5cbiAgICAgICAgICogQHBhcmFtIGRlY29yYXRvcnMgQW4gYXJyYXkgb2YgZGVjb3JhdG9ycy5cbiAgICAgICAgICogQHBhcmFtIHRhcmdldCBUaGUgdGFyZ2V0IG9iamVjdC5cbiAgICAgICAgICogQHBhcmFtIHByb3BlcnR5S2V5IChPcHRpb25hbCkgVGhlIHByb3BlcnR5IGtleSB0byBkZWNvcmF0ZS5cbiAgICAgICAgICogQHBhcmFtIGF0dHJpYnV0ZXMgKE9wdGlvbmFsKSBUaGUgcHJvcGVydHkgZGVzY3JpcHRvciBmb3IgdGhlIHRhcmdldCBrZXkuXG4gICAgICAgICAqIEByZW1hcmtzIERlY29yYXRvcnMgYXJlIGFwcGxpZWQgaW4gcmV2ZXJzZSBvcmRlci5cbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5IGRlY2xhcmF0aW9ucyBhcmUgbm90IHBhcnQgb2YgRVM2LCB0aG91Z2ggdGhleSBhcmUgdmFsaWQgaW4gVHlwZVNjcmlwdDpcbiAgICAgICAgICogICAgICAgICAvLyBzdGF0aWMgc3RhdGljUHJvcGVydHk7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAgICAgY29uc3RydWN0b3IocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgc3RhdGljIHN0YXRpY01ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgICAgICBtZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgRXhhbXBsZSA9IFJlZmxlY3QuZGVjb3JhdGUoZGVjb3JhdG9yc0FycmF5LCBFeGFtcGxlKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIFJlZmxlY3QuZGVjb3JhdGUoZGVjb3JhdG9yc0FycmF5LCBFeGFtcGxlLCBcInN0YXRpY1Byb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIFJlZmxlY3QuZGVjb3JhdGUoZGVjb3JhdG9yc0FycmF5LCBFeGFtcGxlLnByb3RvdHlwZSwgXCJwcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoRXhhbXBsZSwgXCJzdGF0aWNNZXRob2RcIixcbiAgICAgICAgICogICAgICAgICBSZWZsZWN0LmRlY29yYXRlKGRlY29yYXRvcnNBcnJheSwgRXhhbXBsZSwgXCJzdGF0aWNNZXRob2RcIixcbiAgICAgICAgICogICAgICAgICAgICAgT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihFeGFtcGxlLCBcInN0YXRpY01ldGhvZFwiKSkpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoRXhhbXBsZS5wcm90b3R5cGUsIFwibWV0aG9kXCIsXG4gICAgICAgICAqICAgICAgICAgUmVmbGVjdC5kZWNvcmF0ZShkZWNvcmF0b3JzQXJyYXksIEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiLFxuICAgICAgICAgKiAgICAgICAgICAgICBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiKSkpO1xuICAgICAgICAgKlxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gZGVjb3JhdGUoZGVjb3JhdG9ycywgdGFyZ2V0LCBwcm9wZXJ0eUtleSwgYXR0cmlidXRlcykge1xuICAgICAgICAgICAgaWYgKCFJc1VuZGVmaW5lZChwcm9wZXJ0eUtleSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoIUlzQXJyYXkoZGVjb3JhdG9ycykpXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgICAgICBpZiAoIUlzT2JqZWN0KHRhcmdldCkpXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgICAgICBpZiAoIUlzT2JqZWN0KGF0dHJpYnV0ZXMpICYmICFJc1VuZGVmaW5lZChhdHRyaWJ1dGVzKSAmJiAhSXNOdWxsKGF0dHJpYnV0ZXMpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgaWYgKElzTnVsbChhdHRyaWJ1dGVzKSlcbiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlcyA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eUtleSA9IFRvUHJvcGVydHlLZXkocHJvcGVydHlLZXkpO1xuICAgICAgICAgICAgICAgIHJldHVybiBEZWNvcmF0ZVByb3BlcnR5KGRlY29yYXRvcnMsIHRhcmdldCwgcHJvcGVydHlLZXksIGF0dHJpYnV0ZXM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mVhZHkgZGVmaW5lZCBmb3IgdGhlIHRhcmdldCBhbmQgdGFyZ2V0IGtleSwgdGhlXG4gICAgICAgICAqIG1ldGFkYXRhVmFsdWUgZm9yIHRoYXQga2V5IHdpbGwgYmUgb3ZlcndyaXR0ZW4uXG4gICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgQFJlZmxlY3QubWV0YWRhdGEoa2V5LCB2YWx1ZSlcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIGNvbnN0cnVjdG9yLCBUeXBlU2NyaXB0IG9ubHkpXG4gICAgICAgICAqICAgICBjbGFzcyBFeGFtcGxlIHtcbiAgICAgICAgICogICAgICAgICBAUmVmbGVjdC5tZXRhZGF0YShrZXksIHZhbHVlKVxuICAgICAgICAgKiAgICAgICAgIHN0YXRpYyBzdGF0aWNQcm9wZXJ0eTtcbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBwcm90b3R5cGUsIFR5cGVTY3JpcHQgb25seSlcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIEBSZWZsZWN0Lm1ldGFkYXRhKGtleSwgdmFsdWUpXG4gICAgICAgICAqICAgICAgICAgcHJvcGVydHk7XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgY2xhc3MgRXhhbXBsZSB7XG4gICAgICAgICAqICAgICAgICAgQFJlZmxlY3QubWV0YWRhdGEoa2V5LCB2YWx1ZSlcbiAgICAgICAgICogICAgICAgICBzdGF0aWMgc3RhdGljTWV0aG9kKCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIEBSZWZsZWN0Lm1ldGFkYXRhKGtleSwgdmFsdWUpXG4gICAgICAgICAqICAgICAgICAgbWV0aG9kKCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqL1xuICAgICAgICBmdW5jdGlvbiBtZXRhZGF0YShtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSkge1xuICAgICAgICAgICAgZnVuY3Rpb24gZGVjb3JhdG9yKHRhcmdldCwgcHJvcGVydHlLZXkpIHtcbiAgICAgICAgICAgICAgICBpZiAoIUlzT2JqZWN0KHRhcmdldCkpXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgICAgICBpZiAoIUlzVW5kZWZpbmVkKHByb3BlcnR5S2V5KSAmJiAhSXNQcm9wZXJ0eUtleShwcm9wZXJ0eUtleSkpXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgICAgICBPcmRpbmFyeURlZmluZU93bk1ldGFkYXRhKG1ldGFkYXRhS2V5LCBtZXRhZGF0YVZhbHVlLCB0YXJnZXQsIHByb3BlcnR5S2V5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkZWNvcmF0b3I7XG4gICAgICAgIH1cbiAgICAgICAgZXhwb3J0ZXIoXCJtZXRhZGF0YVwiLCBtZXRhZGF0YSk7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBEZWZpbmUgYSB1bmlxdWUgbWV0YWRhdGEgZW50cnkgb24gdGhlIHRhcmdldC5cbiAgICAgICAgICogQHBhcmFtIG1ldGFkYXRhS2V5IEEga2V5IHVzZWQgdG8gc3RvcmUgYW5kIHJldHJpZXZlIG1ldGFkYXRhLlxuICAgICAgICAgKiBAcGFyYW0gbWV0YWRhdGFWYWx1ZSBBIHZhbHVlIHRoYXQgY29udGFpbnMgYXR0YWNoZWQgbWV0YWRhdGEuXG4gICAgICAgICAqIEBwYXJhbSB0YXJnZXQgVGhlIHRhcmdldCBvYmplY3Qgb24gd2hpY2ggdG8gZGVmaW5lIG1ldGFkYXRhLlxuICAgICAgICAgKiBAcGFyYW0gcHJvcGVydHlLZXkgKE9wdGlvbmFsKSBUaGUgcHJvcGVydHkga2V5IGZvciB0aGUgdGFyZ2V0LlxuICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgY2xhc3MgRXhhbXBsZSB7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHkgZGVjbGFyYXRpb25zIGFyZSBub3QgcGFydCBvZiBFUzYsIHRob3VnaCB0aGV5IGFyZSB2YWxpZCBpbiBUeXBlU2NyaXB0OlxuICAgICAgICAgKiAgICAgICAgIC8vIHN0YXRpYyBzdGF0aWNQcm9wZXJ0eTtcbiAgICAgICAgICogICAgICAgICAvLyBwcm9wZXJ0eTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgICAgICBjb25zdHJ1Y3RvcihwKSB7IH1cbiAgICAgICAgICogICAgICAgICBzdGF0aWMgc3RhdGljTWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIG1ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIGNvbnN0cnVjdG9yXG4gICAgICAgICAqICAgICBSZWZsZWN0LmRlZmluZU1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgb3B0aW9ucywgRXhhbXBsZSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICBSZWZsZWN0LmRlZmluZU1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgb3B0aW9ucywgRXhhbXBsZSwgXCJzdGF0aWNQcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICBSZWZsZWN0LmRlZmluZU1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgb3B0aW9ucywgRXhhbXBsZS5wcm90b3R5cGUsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgUmVmbGVjdC5kZWZpbmVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIG9wdGlvbnMsIEV4YW1wbGUsIFwic3RhdGljTWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICBSZWZsZWN0LmRlZmluZU1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgb3B0aW9ucywgRXhhbXBsZS5wcm90b3R5cGUsIFwibWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gZGVjb3JhdG9yIGZhY3RvcnkgYXMgbWV0YWRhdGEtcHJvZHVjaW5nIGFubm90YXRpb24uXG4gICAgICAgICAqICAgICBmdW5jdGlvbiBNeUFubm90YXRpb24ob3B0aW9ucyk6IERlY29yYXRvciB7XG4gICAgICAgICAqICAgICAgICAgcmV0dXJuICh0YXJnZXQsIGtleT8pID0+IFJlZmxlY3QuZGVmaW5lTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBvcHRpb25zLCB0YXJnZXQsIGtleSk7XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAg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dHJ1ZWAgaWYgdGhlIG1ldGFkYXRhIGtleSB3YXMgZGVmaW5lZCBvbiB0aGUgdGFyZ2V0IG9iamVjdCBvciBpdHMgcHJvdG90eXBlIGNoYWluOyBvdGhlcndpc2UsIGBmYWxzZWAuXG4gICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAqXG4gICAgICAgICAqICAgICBjbGFzcyBFeGFtcGxlIHtcbiAgICAgICAgICogICAgICAgICAvLyBwcm9wZXJ0eSBkZWNsYXJhdGlvbnMgYXJlIG5vdCBwYXJ0IG9mIEVTNiwgdGhvdWdoIHRoZXkgYXJlIHZhbGlkIGluIFR5cGVTY3JpcHQ6XG4gICAgICAgICAqICAgICAgICAgLy8gc3RhdGljIHN0YXRpY1Byb3BlcnR5O1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5O1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgICAgIGNvbnN0cnVjdG9yKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIHN0YXRpYyBzdGF0aWNNZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgbWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gY29uc3RydWN0b3JcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuaGFzTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuaGFzTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLCBcInN0YXRpY1Byb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3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V0aGVyIHRoZSB0YXJnZXQgb2JqZWN0IGhhcyB0aGUgcHJvdmlkZWQgbWV0YWRhdGEga2V5IGRlZmluZWQuXG4gICAgICAgICAqIEBwYXJhbSBtZXRhZGF0YUtleSBBIGtleSB1c2VkIHRvIHN0b3JlIGFuZCByZXRyaWV2ZSBtZXRhZGF0YS5cbiAgICAgICAgICogQHBhcmFtIHRhcmdldCBUaGUgdGFyZ2V0IG9iamVjdCBvbiB3aGljaCB0aGUgbWV0YWRhdGEgaXMgZGVmaW5lZC5cbiAgICAgICAgICogQHBhcmFtIHByb3BlcnR5S2V5IChPcHRpb25hbCkgVGhlIHByb3BlcnR5IGtleSBmb3IgdGhlIHRhcmdldC5cbiAgICAgICAgICogQHJldHVybnMgYHRydWVgIGlmIHRoZSBtZXRhZGF0YSBrZXkgd2FzIGRlZmluZWQgb24gdGhlIHRhcmdldCBvYmplY3Q7IG90aGVyd2lzZSwgYGZhbHNlYC5cbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5IGRlY2xhcmF0aW9ucyBhcmUgbm90IHBhcnQgb2YgRVM2LCB0aG91Z2ggdGhleSBhcmUgdmFsaWQgaW4gVHlwZVNjcmlwdDpcbiAgICAgICAgICogICAgICAgICAvLyBzdGF0aWMgc3RhdGljUHJvcGVydHk7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAgICAgY29uc3RydWN0b3IocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgc3RhdGljIHN0YXRpY01ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgICAgICBtZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5oYXNPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5oYXNPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUsIFwic3RhdGljUHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5oYXNPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUucHJvdG90eXBlLCBcInByb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuaGFzT3duTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLCBcInN0YXRpY01ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5oYXNPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIGhhc093bk1ldGFkYXRhKG1ldGFkYXRhS2V5LCB0YXJnZXQsIHByb3BlcnR5S2V5KSB7XG4gICAgICAgICAgICBpZiAoIUlzT2JqZWN0KHRhcmdldCkpXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJ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GV5IGFyZSB2YWxpZCBpbiBUeXBlU2NyaXB0OlxuICAgICAgICAgKiAgICAgICAgIC8vIHN0YXRpYyBzdGF0aWNQcm9wZXJ0eTtcbiAgICAgICAgICogICAgICAgICAvLyBwcm9wZXJ0eTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgICAgICBjb25zdHJ1Y3RvcihwKSB7IH1cbiAgICAgICAgICogICAgICAgICBzdGF0aWMgc3RhdGljTWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIG1ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIGNvbnN0cnVjdG9yXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSwgXCJzdGF0aWNQcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZS5wcm90b3R5cGUsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUsIFwic3RhdGljTWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAg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3BlcnR5IGtleSBmb3IgdGhlIHRhcmdldC5cbiAgICAgICAgICogQHJldHVybnMgVGhlIG1ldGFkYXRhIHZhbHVlIGZvciB0aGUgbWV0YWRhdGEga2V5IGlmIGZvdW5kOyBvdGhlcndpc2UsIGB1bmRlZmluZWRgLlxuICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgY2xhc3MgRXhhbXBsZSB7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHkgZGVjbGFyYXRpb25zIGFyZSBub3QgcGFydCBvZiBFUzYsIHRob3VnaCB0aGV5IGFyZSB2YWxpZCBpbiBUeXBlU2NyaXB0OlxuICAgICAgICAgKiAgICAgICAgIC8vIHN0YXRpYyBzdGF0aWNQcm9wZXJ0eTtcbiAgICAgICAgICogICAgICAgICAvLyBwcm9wZXJ0eTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgICAgICBjb25zdHJ1Y3RvcihwKSB7IH1cbiAgICAgICAgICogICAgICAgICBzdGF0aWMgc3RhdGljTWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIG1ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIGNvbnN0cnVjdG9yXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE93bk1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE93bk1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSwgXCJzdGF0aWNQcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE93bk1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZS5wcm90b3R5cGUsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUsIFwic3RhdGljTWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE93bk1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZS5wcm90b3R5cGUsIFwibWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gZ2V0T3duTWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCwgcHJvcGVydHlLZXkpIHtcbiAgICAgICAgICAgIGlmICghSXNPYmplY3QodGFyZ2V0KSlcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICBpZiAoIUlzVW5kZWZpbmVkKHByb3BlcnR5S2V5KSlcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eUtleSA9IFRvUHJvcGVydHlLZXkocHJvcGVydHlLZXkpO1xuICAgICAgICAgICAgcmV0dXJuIE9yZGluYXJ5R2V0T3duTWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCwgcHJvcGVydHlLZXkpO1xuICAgICAgICB9XG4gICAgICAgIGV4cG9ydGVyKFwiZ2V0T3duTWV0YWRhdGFcIiwgZ2V0T3duTWV0YWRhdGEpO1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0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AgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0TWV0YWRhdGFLZXlzKEV4YW1wbGUsIFwic3RhdGljUHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRNZXRhZGF0YUtleXMoRXhhbXBsZS5wcm90b3R5cGUsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRNZXRhZGF0YUtleXMoRXhhbXBsZSwgXCJzdGF0aWNNZXRob2RcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0TWV0YWRhdGFLZXlzKEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIGdldE1ldGFkYXRhS2V5cyh0YXJnZXQsIHByb3BlcnR5S2V5KSB7XG4gICAgICAgICAgICBpZiAoIUlzT2JqZWN0KHRhcmdldCkpXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpO1xuICAgICAgICAgICAgaWYgKCFJc1VuZGVmaW5lZChwcm9wZXJ0eUtleSkpXG4gICAgICAgICAgICAgICAgcHJvcGVydHlLZXkgPSBUb1Byb3BlcnR5S2V5KHByb3BlcnR5S2V5KTtcbiAgICAgICAgICAgIHJldHVybiBPcmRpbmFyeU1ldGFkYXRhS2V5cyh0YXJnZXQsIHByb3BlcnR5S2V5KTtcbiAgICAgICAgfVxuICAgICAgICBleHBvcnRlcihcImdldE1ldGFkYXRhS2V5c1wiLCBnZXRNZXRhZGF0YUtleXMpO1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0cyB0aGUgdW5pcXVlIG1ldGFkYXRhIGtleXMgZGVmaW5lZCBvbiB0aGUgdGFyZ2V0IG9iamVjdC5cbiAgICAgICAgICogQHBhcmFtIHRhcmdldCBUaGUgdGFyZ2V0IG9iamVjdCBvbiB3aGljaCB0aGUgbWV0YWRhdGEgaXMgZGVmaW5lZC5cbiAgICAgICAgICogQHBhcmFtIHByb3BlcnR5S2V5IChPcHRpb25hbCkgVGhlIHByb3BlcnR5IGtleSBmb3IgdGhlIHRhcmdldC5cbiAgICAgICAgICogQHJldHVybnMgQW4gYXJyYXkgb2YgdW5pcXVlIG1ldGFkYXRhIGtleXMuXG4gICAgICAgICAqIEBleGFtcGxlXG4gICAgICAgICAqXG4gICAgICAgICAqICAgICBjbGFzcyBFeGFtcGxlIHtcbiAgICAgICAgICogICAgICAgICAvLyBwcm9wZXJ0eSBkZWNsYXJhdGlvbnMgYXJlIG5vdCBwYXJ0IG9mIEVTNiwgdGhvdWdoIHRoZXkgYXJlIHZhbGlkIGluIFR5cGVTY3JpcHQ6XG4gICAgICAgICAqICAgICAgICAgLy8gc3RhdGljIHN0YXRpY1Byb3BlcnR5O1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5O1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgICAgIGNvbnN0cnVjdG9yKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIHN0YXRpYyBzdGF0aWNNZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgbWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gY29uc3RydWN0b3JcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0T3duTWV0YWRhdGFLZXlzKEV4YW1wbGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YUtleXMoRXhhbXBsZSwgXCJzdGF0aWNQcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE93bk1ldGFkYXRhS2V5cyhFeGFtcGxlLnByb3RvdHlwZSwgXCJwcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE93bk1ldGFkYXRhS2V5cyhFeGFtcGxlLCBcInN0YXRpY01ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YUtleXMoRXhhbXBsZS5wcm90b3R5cGUsIFwibWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gZ2V0T3duTWV0YWRhdGFLZXlzKHRhcmdldCwgcHJvcGVydHlLZXkpIHtcbiAgICAgICAgICAgIGlmICghSXNPYmplY3QodGFyZ2V0KSlcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICBpZiAoIUlzVW5kZWZpbmVkKHByb3BlcnR5S2V5KSlcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eUtleSA9IFRvUHJvcGVydHlLZXkocHJvcGVydHlLZXkpO1xuICAgICAgICAgICAgcmV0dXJuIE9yZGluYXJ5T3duTWV0YWRhdGFLZXlzKHRhcmdldCwgcHJvcGVydHlLZXkpO1xuICA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AgICAgICAgICogICAgICAgICBtZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5kZWxldGVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5kZWxldGVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUsIFwic3RhdGljUHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5kZWxldGVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUucHJvdG90eXBlLCBcInByb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZGVsZXRlTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLCBcInN0YXRpY01ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5kZWxldGVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIGRlbGV0ZU1ldGFk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GEpO1xuICAgICAgICBmdW5jdGlvbiBEZWNvcmF0ZUNvbnN0cnVjdG9yKGRlY29yYXRvcnMsIHRhcmdldCkge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IGRlY29yYXRvcnMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICB2YXIgZGVjb3JhdG9yID0gZGVjb3JhdG9yc1tpXTtcbiAgICAgICAgICAgICAgICB2YXIgZGVjb3JhdGVkID0gZGVjb3JhdG9yKHRhcmdldCk7XG4gICAgICAgICAgICAgICAgaWYgKCFJc1VuZGVmaW5lZChkZWNvcmF0ZWQpICYmICFJc051bGwoZGVjb3JhdGVkKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIUlzQ29uc3RydWN0b3IoZGVjb3JhdGVkKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0ID0gZGVjb3JhdGVkO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0YXJnZXQ7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gRGVjb3JhdGVQcm9wZXJ0eShkZWNvcmF0b3JzLCB0YXJnZXQsIHByb3BlcnR5S2V5LCBkZXNjcmlwdG9yKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gZGVjb3JhdG9ycy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICAgICAgICAgIHZhciBkZWNvcmF0b3IgPSBkZWNvcmF0b3JzW2ldO1xuICAgICAgICAgICAgICAgIHZhciBkZWNvcmF0ZWQgPSBkZWNvcmF0b3IodGFyZ2V0LCBwcm9wZXJ0eUtleSwgZGVzY3JpcHRvcik7XG4gICAgICAgICAgICAgICAgaWYgKCFJc1VuZGVmaW5lZChkZWNvcmF0ZWQpICYmICFJc051bGwoZGVjb3JhdGVkKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIUlzT2JqZWN0KGRlY29yYXRlZCkpXG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgICAgIGRlc2NyaXB0b3IgPSBkZWNvcmF0ZWQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlc2NyaXB0b3I7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gR2V0T3JDcmVhdGVNZXRhZGF0YU1hcChPLCBQLCBDcmVhdGUpIHtcbiAgICAgICAgICAgIHZhciB0YXJnZXRNZXRhZGF0YSA9IE1ldGFkYXRhLmdldChPKTtcbiAgICAgICAgICAgIGlmIChJc1VuZGVmaW5lZCh0YXJnZXRNZXRhZGF0YSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoIUNyZWF0ZSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB0YXJnZXRNZXRhZGF0YSA9IG5ldyBfTWFwKCk7XG4gICAgICAgICAgICAgICAgTWV0YWRhdGEuc2V0KE8sIHRhcmdldE1ldGFkYXRhKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBtZXRhZGF0YU1hcCA9IHRhcmdldE1ldGFkYXRhLmdldChQKTtcbiAgICAgICAgICAgIGlmIChJc1VuZGVmaW5lZChtZXRhZGF0YU1hcCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoIUNyZWF0ZSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBtZXRhZGF0YU1hcCA9IG5ldyBfTWFwKCk7XG4gICAgICAgICAgICAgICAgdGFyZ2V0TWV0YWRhdGEuc2V0KFAsIG1ldGFkYXRhTWFwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgI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hS2V5cyhPLCBQKSB7XG4gICAgICAgICAgICB2YXIgb3duS2V5cyA9IE9yZGluYXJ5T3duTWV0YWRhdGFLZXlzKE8sIFApO1xuICAgICAgICAgICAgdmFyIHBhcmVudCA9IE9yZGluYXJ5R2V0UHJvdG90eXBlT2YoTyk7XG4gICAgICAgICAgICBpZiAocGFyZW50ID09PSBudWxsKVxuICAgICAgICAgICAgICAgIHJldHVybiBvd25LZXlzO1xuICAgICAgICAgICAgdmFyIHBhcmVudEtleXMgPSBPcmRpbmFyeU1ldGFkYXRhS2V5cyhwYXJlbnQsIFApO1xuICAgICAgICAgICAgaWYgKHBhcmVudEtleXMubGVuZ3RoIDw9IDApXG4gICAgICAgICAgICAgICAgcmV0dXJuIG93bktleXM7XG4gICAgICAgICAgICBpZiAob3duS2V5cy5sZW5ndGggPD0gMClcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50S2V5cztcbiAgICAgICAgICAgIHZhciBzZXQgPSBuZXcgX1NldCgpO1xuICAgICAgICAgICAgdmFyIGtleXMgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMCwgb3duS2V5c18xID0gb3duS2V5czsgX2kgPCBvd25LZXlzXzEubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGtleSA9IG93bktleXNfMVtfaV07XG4gICAgICAgICAgICAgICAgdmFyIGhhc0tleSA9IHNldC5oYXMoa2V5KTtcbiAgICAgICAgICAgICAgICBpZiAoIWhhc0tleSkge1xuICAgICAgICAgICAgICAgICAgICBzZXQuYWRkKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIGtleXMucHVzaChrZXkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAodmFyIF9hID0gMCwgcGFyZW50S2V5c18xID0gcGFyZW50S2V5czsgX2EgPCBwYXJlbnRLZXlzXzEubGVuZ3RoOyBfYSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGtleSA9IHBhcmVudEtleXNfMVtfYV07XG4gICAgICAgICAgICAgICAgdmFyIGhhc0tleSA9IHNldC5oYXMoa2V5KTtcbiAgICAgICAgICAgICAgICBpZiAoIWhhc0tleSkge1xuICAgICAgICAgICAgICAgICAgICBzZXQuYWRkKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIGtleXMucHVzaChrZXkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBrZXlzO1xuICAgICAgICB9XG4gICAgICAgIC8vIDMuMS43LjEgT3JkaW5hcnlPd25NZXRhZGF0YUtleXMoTywgUClcbiAgICAgICAgLy8gaHR0cHM6Ly9yYnVja3Rvbi5naXRodWIuaW8vcmVmbGVjdC1tZXRhZGF0YS8jb3JkaW5hcnlvd25tZXRhZGF0YWtleXNcbiAgICAgICAgZnVuY3Rpb24gT3JkaW5hcnlPd25NZXRhZGF0YUtleXMoTywgUCkge1xuICAgICAgICAgICAgdmFyIGtleXMgPSBbXTtcbiAgICAgICAgICAgIHZhciBtZXRhZGF0YU1hcCA9IEdldE9yQ3JlYXRlTWV0YWRhdGFNYXAoTywgUCwgLypDcmVhdGUqLyBmYWxzZSk7XG4gICAgICAgICAgICBpZiAoSXNVbmRlZmluZWQobWV0YWRhdGFNYXApKVxuICAgICAgICAgICAgICAgIHJldHVybiBrZXlzO1xuICAgICAgICAgICAgdmFyIGtleXNPYmogPSBtZXRhZGF0YU1hcC5rZXlzKCk7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBHZXRJdGVyYXRvcihrZXlzT2JqKTtcbiAgICAgICAgICAgIHZhciBrID0gMDtcbiAgICAgICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICAgICAgdmFyIG5leHQgPSBJdGVyYXRvclN0ZXAoaXRlcmF0b3IpO1xuICAgICAgICAgICAgICAgIGlmICghbmV4dCkge1xuICAgICAgICAgICAgICAgICAgICBrZXlzLmxlbmd0aCA9IGs7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBrZXlzO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgbmV4dFZhbHVlID0gSXRlcmF0b3JWYWx1ZShuZXh0KTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBrZXlzW2tdID0gbmV4dFZhbHVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgSXRlcmF0b3JDbG9zZShpdGVyYXRvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGsrKztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyA2IEVDTUFTY3JpcHQgRGF0YSBUeXAwZXMgYW5kIFZhbHVlc1xuICAgICAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1lY21hc2NyaXB0LWRhdGEtdHlwZXMtYW5kLXZhbHVlc1xuICAgICAgICBmdW5jdGlvbiBUeXBlKHgpIHtcbiAgICAgICAgICAgIGlmICh4ID09PSBudWxsKVxuICAgICAgICAgICAgICAgIHJldHVybiAxIC8qIE51bGwgKi87XG4gICAgICAgICAgICBzd2l0Y2ggKHR5cGVvZiB4KSB7XG4gICAgICAgICAgICAgICAgY2FzZSBcInVuZGVmaW5lZFwiOiByZXR1cm4gMCAvKiBVbmRlZmluZWQgKi87XG4gICAgICAgICAgICAgICAgY2FzZSBcImJvb2xlYW5cIjogcmV0dXJuIDIgLyogQm9vbGVhbiAqLztcbiAgICAgICAgICAgICAgICBjYXNlIFwic3RyaW5nXCI6IHJldHVybiAzIC8qIFN0cmluZyAqLztcbiAgICAgICAgICAgICAgICBjYXNlIFwic3ltYm9sXCI6IHJldHVybiA0IC8qIFN5bWJvbCAqLztcbiAgICAgICAgICAgICAgICBjYXNlIFwibnVtYmVyXCI6IHJldHVybiA1IC8qIE51bWJlciAqLztcbiAgICAgICAgICAgICAgICBjYXNlIFwib2JqZWN0XCI6IHJldHVybiB4ID09PSBudWxsID8gMSAvKiBOdWxsICovIDogNiAvKiBPYmplY3QgKi87XG4gICAgICAgICAgICAgICAgZGVmYXVsdDogcmV0dXJuIDYgLyogT2JqZWN0ICovO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIDYuMS4xIFRoZSBVbmRlZmluZWQgVHlwZVxuICAgICAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1lY21hc2NyaXB0LWxhbmd1YWdlLXR5cGVzLXVuZGVmaW5lZC10eXBlXG4gICAgICAgIGZ1bmN0aW9uIElzVW5kZWZpbmVkKHgpIHtcbiAgICAgICAgICAgIHJldHVybiB4ID09PSB1bmRlZmluZWQ7XG4gICAgICAgIH1cbiAgICAgICAgLy8gNi4xLjIgVGhlIE51bGwgVHlwZVxuICAgICAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1lY21hc2NyaXB0LWxhbmd1YWdlLXR5cGVzLW51bGwtdHlwZVxuICAgICAgICBmdW5jdGlvbiBJc051bGwoeCkge1xuICAgICAgICAgICAgcmV0dXJuIHggPT09IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgLy8gNi4xLjUgVGhlIFN5bWJvbCBUeXBlXG4gICAgICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWVjbWFzY3JpcHQtbGFuZ3VhZ2UtdHlwZXMtc3ltYm9sLXR5cGVcbiAgICAgICAgZnVuY3Rpb24gSXNTeW1ib2woeCkge1xuICAgICAgICAgICAgcmV0dXJuIHR5cGVvZiB4ID09PSBcInN5bWJvbFwiO1xuICAgICAgICB9XG4gICAgICAgIC8vIDYuMS43IFRoZSBPYmplY3QgVHlwZVxuICAgICAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1vYmplY3QtdHlwZVxuICAgICAgICBmdW5jdGlvbiBJc09iamVjdCh4KSB7XG4gICAgICAgICAgICByZXR1cm4gdHlwZW9mIHggPT09IFwib2JqZWN0XCIgPyB4ICE9PSBudWxsIDogdHlwZW9mIHggPT09IFwiZnVuY3Rpb25cIjtcbiAgICAgICAgfVxuICAgICAgICAvLyA3LjEgVHlwZSBDb252ZXJzaW9uXG4gICAgICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXR5cGUtY29udmVyc2lvblxuICAgICAgICAvLyA3LjEuMSBUb1ByaW1pdGl2ZShpbnB1dCBbLCBQcmVmZXJyZWRUeXBlXSlcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtdG9wcmltaXRpdmVcbiAgICAgICAgZnVuY3Rpb24gVG9QcmltaXRpdmUoaW5wdXQsIFByZWZlcnJlZFR5cGUpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoVHlwZShpbnB1dCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDAgLyogVW5kZWZpbmVkICovOiByZXR1cm4gaW5wdXQ7XG4gICAgICAgICAgICAgICAgY2FzZSAxIC8qIE51bGwgKi86IHJldHVybiBpbnB1dDtcbiAgICAgICAgICAgICAgICBjYXNlIDIgLyogQm9vbGVhbiAqLzogcmV0dXJuIGlucHV0O1xuICAgICAgICAgICAgICAgIGNhc2UgMyAvKiBTdHJpbmcgKi86IHJldHVybiBpbnB1dDtcbiAgICAgICAgICAgICAgICBjYXNlIDQgLyogU3ltYm9sICovOiByZXR1cm4gaW5wdXQ7XG4gICAgICAgICAgICAgICAgY2FzZSA1IC8qIE51bWJlciAqLzogcmV0dXJuIGlucHV0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGhpbnQgPSBQcmVmZXJyZWRUeXBlID09PSAzIC8qIFN0cmluZyAqLyA/IFwic3RyaW5nXCIgOiBQcmVmZXJyZWRUeXBlID09PSA1IC8qIE51bWJlciAqLyA/IFwibnVtYmVyXCIgOiBcImRlZmF1bHRcIjtcbiAgICAgICAgICAgIHZhciBleG90aWNUb1ByaW0gPSBHZXRNZXRob2QoaW5wdXQsIHRvUHJpbWl0aXZlU3ltYm9sKTtcbiAgICAgICAgICAgIGlmIChleG90aWNUb1ByaW0gIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBleG90aWNUb1ByaW0uY2FsbChpbnB1dCwgaGludCk7XG4gICAgICAgICAgICAgICAgaWYgKElzT2JqZWN0KHJlc3VsdCkpXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIE9yZGluYXJ5VG9QcmltaXRpdmUoaW5wdXQsIGhpbnQgPT09IFwiZGVmYXVsdFwiID8gXCJudW1iZXJcIiA6IGhpbnQpO1xuICAgICAgICB9XG4gICAgICAgIC8vIDcuMS4xLjEgT3JkaW5hcnlUb1ByaW1pdGl2ZShPLCBoaW50KVxuICAgICAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy1vcmRpbmFyeXRvcHJpbWl0aXZlXG4gICAgICAgIGZ1bmN0aW9uIE9yZGluYXJ5VG9QcmltaXRpdmUoTywgaGludCkge1xuICAgICAgICAgICAgaWYgKGhpbnQgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgdG9TdHJpbmdfMSA9IE8udG9TdHJpbmc7XG4gICAgICAgICAgICAgICAgaWYgKElzQ2FsbGFibGUodG9TdHJpbmdfMSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHRvU3RyaW5nXzEuY2FsbChPKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdChyZXN1bHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlT2YgPSBPLnZhbHVlT2Y7XG4gICAgICAgICAgICAgICAgaWYgKElzQ2FsbGFibGUodmFsdWVPZikpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHZhbHVlT2YuY2FsbChPKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdChyZXN1bHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWVPZiA9IE8udmFsdWVPZjtcbiAgICAgICAgICAgICAgICBpZiAoSXNDYWxsYWJsZSh2YWx1ZU9mKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gdmFsdWVPZi5jYWxsKE8pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIUlzT2JqZWN0KHJlc3VsdCkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgdG9TdHJpbmdfMiA9IE8udG9TdHJpbmc7XG4gICAgICAgICAgICAgICAgaWYgKElzQ2FsbGFibGUodG9TdHJpbmdfMikpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHRvU3RyaW5nXzIuY2FsbChPKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdChyZXN1bHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gNy4xLjIgVG9Cb29sZWFuKGFyZ3VtZW50KVxuICAgICAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvMjAxNi8jc2VjLXRvYm9vbGVhblxuICAgICAgICBmdW5jdGlvbiBUb0Jvb2xlYW4oYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHJldHVybiAhIWFyZ3VtZW50O1xuICAgICAgICB9XG4gICAgICAgIC8vIDcuMS4xMiBUb1N0cmluZyhhcmd1bWVudClcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtdG9zdHJpbmdcbiAgICAgICAgZnVuY3Rpb24gVG9TdHJpbmcoYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHJldHVybiBcIlwiICsgYXJndW1lbnQ7XG4gICAgICAgIH1cbiAgICAgICAgLy8gNy4xLjE0IFRvUHJvcGVydHlLZXkoYXJndW1lbnQpXG4gICAgICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXRvcHJvcGVydHlrZXlcbiAgICAgICAgZnVuY3Rpb24gVG9Qcm9wZXJ0eUtleShhcmd1bWVudCkge1xuICAgICAgICAgICAgdmFyIGtleSA9IFRvUHJpbWl0aXZlKGFyZ3VtZW50LCAzIC8qIFN0cmluZyAqLyk7XG4gICAgICAgICAgICBpZiAoSXNTeW1ib2woa2V5KSlcbiAgICAgICAgICAgICAgICByZXR1cm4ga2V5O1xuICAgICAgICAgICAgcmV0dXJuIFRvU3RyaW5nKGtleSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8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vLyBUaGlzIGlzIHRoZSBjYXNlIHdoZW4gaW4gRVM2IG9yIHdoZW4gdXNpbmcgX19wcm90b19fIGluIGEgY29tcGF0aWJsZSBicm93c2VyLlxuICAgICAgICAgICAgaWYgKHByb3RvICE9PSBmdW5jdGlvblByb3RvdHlwZSlcbiAgICAgICAgICAgICAgICByZXR1cm4gcHJvdG87XG4gICAgICAgICAgICAvLyBJZiB0aGUgc3VwZXIgcHJvdG90eXBlIGlzIE9iamVjdC5wcm90b3R5cGUsIG51bGwsIG9yIHVuZGVmaW5lZCwgdGhlbiB3ZSBjYW5ub3QgZGV0ZXJtaW5lIHRoZSBoZXJpdGFnZS5cbiAgICAgICAgICAgIHZhciBwcm90b3R5cGUgPSBPLnByb3RvdHlwZTtcbiAgICAgICAgICAgIHZhciBwcm90b3R5cGVQcm90byA9IHByb3RvdHlwZSAmJiBPYmplY3QuZ2V0UHJvdG90eXBlT2YocHJvdG90eXBlKTtcbiAgICAgICAgICAgIGlmIChwcm90b3R5cGVQcm90byA9PSBudWxsIHx8IHByb3RvdHlwZVByb3RvID09PSBPYmplY3QucHJvdG90eXBlKVxuICAgICAgICAgICAgICAgIHJldHVybiBwcm90bztcbiAgICAgICAgICAgIC8vIElmIHRoZSBjb25zdHJ1Y3RvciB3YXMgbm90IGEgZnVuY3Rpb24sIHRoZW4gd2UgY2Fubm90IGRldGVybWluZSB0aGUgaGVyaXRhZ2UuXG4gICAgICAgICAgICB2YXIgY29uc3RydWN0b3IgPSBwcm90b3R5cGVQcm90by5jb25zdHJ1Y3RvcjtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29uc3RydWN0b3IgIT09IFwiZnVuY3Rpb25cIilcbiAgICAgICAgICAgICAgICByZXR1cm4gcHJvdG87XG4gICAgICAgICAgICAvLyBJZiB3ZSBoYXZlIHNvbWUga2luZCBvZiBzZWxmLXJlZmVyZW5jZSwgdGhlbiB3ZSBjYW5ub3QgZGV0ZXJtaW5lIHRoZSBoZXJpdGFnZS5cbiAgICAgICAgICAgIGlmIChjb25zdHJ1Y3RvciA9PT0gTylcbiAgICAgICAgICAgICAgICByZXR1cm4gcHJvdG87XG4gICAgICAgICAgICAvLyB3ZSBoYXZlIGEgcHJldHR5IGdvb2QgZ3Vlc3MgYXQgdGhlIGhlcml0YWdlLlxuICAgICAgICAgICAgcmV0dXJuIGNvbnN0cnVjdG9yO1xuICAgICAgICB9XG4gICAgICAgIC8vIG5haXZlIE1hcCBzaGltXG4gICAgICAgIGZ1bmN0aW9uIENyZWF0ZU1hcFBvbHlmaWxsKCkge1xuICAgICAgICAgICAgdmFyIGNhY2hlU2VudGluZWwgPSB7fTtcbiAgICAgICAgICAgIHZhciBhcnJheVNlbnRpbmVsID0gW107XG4gICAgICAgICAgICB2YXIgTWFwSXRlcmF0b3IgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gTWFwSXRlcmF0b3Ioa2V5cywgdmFsdWVzLCBzZWxlY3Rvcikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleXMgPSBrZXlzO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXMgPSB2YWx1ZXM7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3NlbGVjdG9yID0gc2VsZWN0b3I7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIE1hcEl0ZXJhdG9yLnByb3RvdHlwZVtcIkBAaXRlcmF0b3JcIl0gPSBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9O1xuICAgICAgICAgICAgICAgIE1hcEl0ZXJhdG9yLnByb3RvdHlwZVtpdGVyYXRvclN5bWJvbF0gPSBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzOyB9O1xuICAgICAgICAgICAgICAgIE1hcEl0ZXJhdG9yLnByb3RvdHlwZS5uZXh0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSB0aGlzLl9pbmRleDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID49IDAgJiYgaW5kZXggPCB0aGlzLl9rZXlzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHRoaXMuX3NlbGVjdG9yKHRoaXMuX2tleXNbaW5kZXhdLCB0aGlzLl92YWx1ZXNbaW5kZXhdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCArIDEgPj0gdGhpcy5fa2V5cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbmRleCA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleXMgPSBhcnJheVNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcyA9IGFycmF5U2VudGluZWw7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbmRleCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgdmFsdWU6IHJlc3VsdCwgZG9uZTogZmFsc2UgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBNYXBJdGVyYXRvci5wcm90b3R5cGUudGhyb3cgPSBmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuX2luZGV4ID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2luZGV4ID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlzID0gYXJyYXlTZW50aW5lbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcyA9IGFycmF5U2VudGluZWw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyb3I7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBNYXBJdGVyYXRvci5wcm90b3R5cGUucmV0dXJuID0gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pbmRleCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbmRleCA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5cyA9IGFycmF5U2VudGluZWw7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXMgPSBhcnJheVNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHZhbHVlOiB2YWx1ZSwgZG9uZTogdHJ1ZSB9O1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmV0dXJuIE1hcEl0ZXJhdG9yO1xuICAgICAgICAgICAgfSgpKTtcbiAgICAgICAgICAgIHJldHVybiAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gTWFwKCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlzID0gW107XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZUtleSA9IGNhY2hlU2VudGluZWw7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlSW5kZXggPSAtMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KE1hcC5wcm90b3R5cGUsIFwic2l6ZVwiLCB7XG4gICAgICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpcy5fa2V5cy5sZW5ndGg7IH0sXG4gICAgICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGUuaGFzID0gZnVuY3Rpb24gKGtleSkgeyByZXR1cm4gdGhpcy5fZmluZChrZXksIC8qaW5zZXJ0Ki8gZmFsc2UpID49IDA7IH07XG4gICAgICAgICAgICAgICAgTWFwLnByb3RvdHlwZS5nZXQgPSBmdW5jdGlvbiAoa2V5KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbmRleCA9IHRoaXMuX2ZpbmQoa2V5LCAvKmluc2VydCovIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluZGV4ID49IDAgPyB0aGlzLl92YWx1ZXNbaW5kZXhdIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgTWFwLnByb3RvdHlwZS5zZXQgPSBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kKGtleSwgLyppbnNlcnQqLyB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmFsdWVzW2luZGV4XSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGUuZGVsZXRlID0gZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kKGtleSwgLyppbnNlcnQqLyBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2l6ZSA9IHRoaXMuX2tleXMubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IGluZGV4ICsgMTsgaSA8IHNpemU7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleXNbaSAtIDFdID0gdGhpcy5fa2V5c1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXNbaSAtIDFdID0gdGhpcy5fdmFsdWVzW2ldO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5cy5sZW5ndGgtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcy5sZW5ndGgtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChrZXkgPT09IHRoaXMuX2NhY2hlS2V5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FjaGVLZXkgPSBjYWNoZVNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlSW5kZXggPSAtMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGUuY2xlYXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleXMubGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdG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ZXlzLmluZGV4T2YodGhpcy5fY2FjaGVLZXkgPSBrZXkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jYWNoZUluZGV4IDwgMCAmJiBpbnNlcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlSW5kZXggPSB0aGlzLl9rZXlzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleXMucHVzaChrZXkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmFsdWVzLnB1c2godW5kZWZpbmVkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fY2FjaGVJbmRleDtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiBNYXA7XG4gICAgICAgICAgICB9KCkpO1xuICAgICAgICAgICAgZnVuY3Rpb24gZ2V0S2V5KGtleSwgXykge1xuICAgICAgICAgICAgICAgIHJldHVybiBrZXk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBnZXRWYWx1ZShfLCB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldEVudHJ5KGtleSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gW2tleSwgdmFsdWVdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIG5haXZlIFNldCBzaGltXG4gICAgICAgIGZ1bmN0aW9uIENyZWF0ZVNldFBvbHlmaWxsKCkge1xuICAgICAgICAgICAgcmV0dXJuIC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBTZXQoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX21h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JldHVybiB0aGlzLl9tYXAuZW50cmllcygpOyB9O1xuICAgICAgICAgICAgICAgIFNldC5wcm90b3R5cGVbXCJAQGl0ZXJhdG9yXCJdID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpcy5rZXlzKCk7IH07XG4gICAgICAgICAgICAgICAgU2V0LnByb3RvdHlwZVtpdGVyYXRvclN5bWJvbF0gPSBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzLmtleXMoKTsgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4gU2V0O1xuICAgICAgICAgICAgfSgpKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBuYWl2ZSBXZWFrTWFwIHNoaW1cbiAgICAgICAgZnVuY3Rpb24gQ3JlYXRlV2Vha01hcFBvbHlmaWxsKCkge1xuICAgICAgICAgICAgdmFyIFVVSURfU0laRSA9IDE2O1xuICAgICAgICAgICAgdmFyIGtleXMgPSBIYXNoTWFwLmNyZWF0ZSgpO1xuICAgICAgICAgICAgdmFyIHJvb3RLZXkgPSBDcmVhdGVVbmlxdWVLZXkoKTtcbiAgICAgICAgICAgIHJldHVybiAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gV2Vha01hcCgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5ID0gQ3JlYXRlVW5pcXVlS2V5KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFdlYWtNYXAucHJvdG90eXBlLmhhcyA9IGZ1bmN0aW9uICh0YXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhYmxlID0gR2V0T3JDcmVhdGVXZWFrTWFwVGFibGUodGFyZ2V0LCAvKmNyZWF0ZSovIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhYmxlICE9PSB1bmRlZmluZWQgPyBIYXNoTWFwLmhhcyh0YWJsZSwgdGhpcy5fa2V5KSA6IGZhbHNlO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgV2Vha01hcC5wcm90b3R5cGUuZ2V0ID0gZnVuY3Rpb24gKHRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGFibGUgPSBHZXRPckNyZWF0ZVdlYWtNYXBUYWJsZSh0YXJnZXQsIC8qY3JlYXRlKi8gZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGFibGUgIT09IHVuZGVmaW5lZCA/IEhhc2hNYXAuZ2V0KHRhYmxlLCB0aGlzLl9rZXkpIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgV2Vha01hcC5wcm90b3R5cGUuc2V0ID0gZnVuY3Rpb24gKHRhcmdldCwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhYmxlID0gR2V0T3JDcmVhdGVXZWFrTWFwVGFibGUodGFyZ2V0LCAvKmNyZWF0ZSovIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICB0YWJsZVt0aGlzLl9rZXldID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgV2Vha01hcC5wcm90b3R5cGUuZGVsZXRlID0gZnVuY3Rpb24gKHRhcmdldCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGFibGUgPSBHZXRPckNyZWF0ZVdlYWtNYXBUYWJsZSh0YXJnZXQsIC8qY3JlYXRlKi8gZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGFibGUgIT09IHVuZGVmaW5lZCA/IGRlbGV0ZSB0YWJsZVt0aGlzLl9rZXldIDogZmFsc2U7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBXZWFrTWFwLnByb3RvdHlwZS5jbGVhciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gTk9URTogbm90IGEgcmVhbCBjbGVhciwganVzdCBtYWtlcyB0aGUgcHJldmlvdXMgZGF0YSB1bnJlYWNoYWJsZVxuICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXkgPSBDcmVhdGVVbmlxdWVLZXkoKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiBXZWFrTWFwO1xuICAgICAgICAgICAgfSgpKTtcbiAgICAgICAgICAgIGZ1bmN0aW9uIENyZWF0ZVVuaXF1ZUtleSgpIHtcbiAgICAgICAgICAgICAgICB2YXIga2V5O1xuICAgICAgICAgICAgICAgIGRvXG4gICAgICAgICAgICAgICAgICAgIGtleSA9IFwiQEBXZWFrTWFwQEBcIiArIENyZWF0ZVVVSUQoKTtcbiAgICAgICAgICAgICAgICB3aGlsZSAoSGFzaE1hcC5oYXMoa2V5cywga2V5KSk7XG4gICAgICAgICAgICAgICAga2V5c1trZXldID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICByZXR1cm4ga2V5O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gR2V0T3JDcmVhdGVXZWFrTWFwVGFibGUodGFyZ2V0LCBjcmVhdGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWhhc093bi5jYWxsKHRhcmdldCwgcm9vdEtleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjcmVhdGUpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGFyZ2V0LCByb290S2V5LCB7IHZhbHVlOiBIYXNoTWFwLmNyZWF0ZSgpIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdGFyZ2V0W3Jvb3RLZXldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gRmlsbFJhbmRvbUJ5dGVzKGJ1ZmZlciwgc2l6ZSkge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc2l6ZTsgKytpKVxuICAgICAgICAgICAgICAgICAgICBidWZmZXJbaV0gPSBNYXRoLnJhbmRvbSgpICogMHhmZiB8IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGJ1ZmZlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIEdlblJhbmRvbUJ5dGVzKHNpemUpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIFVpbnQ4QXJyYXkgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNyeXB0byAhPT0gXCJ1bmRlZmluZWRcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjcnlwdG8uZ2V0UmFuZG9tVmFsdWVzKG5ldyBVaW50OEFycmF5KHNpemUpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBtc0NyeXB0byAhPT0gXCJ1bmRlZmluZWRcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBtc0NyeXB0by5nZXRSYW5kb21WYWx1ZXMobmV3IFVpbnQ4QXJyYXkoc2l6ZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRmlsbFJhbmRvbUJ5dGVzKG5ldyBVaW50OEFycmF5KHNpemUpLCBzaXplKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZpbGxSYW5kb21CeXRlcyhuZXcgQXJyYXkoc2l6ZSksIHNpemUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gQ3JlYXRlVVVJRCgpIHtcbiAgICAgICAgICAgICAgICB2YXIgZGF0YSA9IEdlblJhbmRvbUJ5dGVzKFVVSURfU0laRSk7XG4gICAgICAgICAgICAgICAgLy8gbWFyayBhcyByYW5kb20gLSBSRkMgNDEyMiDCpyA0LjRcbiAgICAgICAgICAgICAgICBkYXRhWzZdID0gZGF0YVs2XSAmIDB4NGYgfCAweDQwO1xuICAgICAgICAgICAgICAgIGRhdGFbOF0gPSBkYXRhWzhdICYgMHhiZiB8IDB4ODA7XG4gICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IFwiXCI7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgb2Zmc2V0ID0gMDsgb2Zmc2V0IDwgVVVJRF9TSVpFOyArK29mZnNldCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYnl0ZSA9IGRhdGFbb2Zmc2V0XTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9mZnNldCA9PT0gNCB8fCBvZmZzZXQgPT09IDYgfHwgb2Zmc2V0ID09PSA4KVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IFwiLVwiO1xuICAgICAgICAgICAgICAgICAgICBpZiAoYnl0ZSA8IDE2KVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IFwiMFwiO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gYnl0ZS50b1N0cmluZygxNikudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyB1c2VzIGEgaGV1cmlzdGljIHVzZWQgYnkgdjggYW5kIGNoYWtyYSB0byBmb3JjZSBhbiBvYmplY3QgaW50byBkaWN0aW9uYXJ5IG1vZGUuXG4gICAgICAgIGZ1bmN0aW9uIE1ha2VEaWN0aW9uYXJ5KG9iaikge1xuICAgICAgICAgICAgb2JqLl9fID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgZGVsZXRlIG9iai5fXztcbiAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgIH1cbiAgICB9KTtcbn0pKFJlZmxlY3QgfHwgKFJlZmxlY3Q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iAgICBsZXQgc3FsUmVzID0gYXdhaXQgc3FsKHNxbFNjcmlwdCk7XHJcbiAgICBsZXQgYW5jaG9yID0gJyc7XHJcbiAgICBpZiAoc3FsUmVzKSB7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKHNxbFJlc1swXVtuYW1lXSkge1xyXG4gICAgICAgICAgICAgICAgYW5jaG9yID0gc3FsUmVzWzBdW25hbWVdO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHNxbFJlc1swXVsnY29udGVudCddKSB7XHJcbiAgICAgICAgICAgICAgICBhbmNob3IgPSBzcWxSZXNbMF1bJ2NvbnRlbnQnXTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGFuY2hvciA9IGFuY2hvclRleHQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgIGFuY2hvciA9ICfop6PmnpDplJnor68nO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBhbmNob3I7XHJcbn1cclxuXHJcbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBvcGVuTm90ZWJvb2sobm90ZWJvb2tJZCkge1xyXG4gICAgbGV0IGRhdGEgPSB7XHJcbiAgICAgICAgbm90ZWJvb2s6IG5vdGVib29rSWQsXHJcbiAgICB9O1xyXG4gICAgbGV0IHVybCA9ICcvYXBpL25vdGVib29rL29wZW5Ob3RlYm9vayc7XHJcbiAgICByZXR1cm4gcGFyc2VCb2R5KHJlcXVlc3QodXJsLCBkYXRhKSk7XHJcbiAgICAvL+i/lOWbnuepuuaVsOaNrlxyXG59XHJcblxyXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gY2xvc2VOb3RlYm9vayhub3RlYm9va0lkKSB7XHJcbiAgICBsZXQgZGF0YSA9IHtcclxuICAgICAgICBub3RlYm9vazogbm90ZWJvb2tJZCxcclxuICAgIH07XHJcbiAgICBsZXQg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cnNlQm9keShyZXF1ZXN0KHVybCwgZGF0YSkpO1xyXG59XHJcblxyXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gcmVuZGVyKGRhdGEpIHtcclxuICAgIGxldCB1cmwgPSAnL2FwaS90ZW1wbGF0ZS9yZW5kZXInO1xyXG4gICAgcmV0dXJuIHBhcnNlQm9keShyZXF1ZXN0KHVybCwgZGF0YSkpO1xyXG59XHJcblxyXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gaW5zZXJ0QmxvY2socHJldmlvdXNJRCwgZGF0YVR5cGUsIGRhdGEpIHtcclxuICAgIGxldCB1cmwgPSAnL2FwaS9ibG9jay9pbnNlcnRCbG9jayc7XHJcbiAgICByZXR1cm4gcGFyc2VCb2R5KFxyXG4gICAgICAgIHJlcXVlc3QoXHJcbiAgICAgICAgICAgICh1cmwgPSB1cmwpLFxyXG4gICAgICAgICAgICAoZGF0YSA9IHtcclxuICAgICAgICAgICAgICAgIHByZXZpb3VzSUQ6IHByZXZpb3VzSUQsXHJcbiAgICAgICAgICAgICAgICBkYXRhVHlwZTogZGF0YVR5cGUsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiBkYXRhLFxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgIClcclxuICAgICk7XHJcbn1cclxuXHJcbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBwcmVwZW5kQmxvY2socGFyZW50SUQsIGRhdGFUeXBlLCBkYXRhKSB7XHJcbiAgICBsZXQgdXJsID0gJy9hcGkvYmxvY2svcHJlcGVuZEJsb2NrJztcclxuICAgIHJldHVybiBwYXJzZUJvZHkoXHJcbiAgICAgICAgcmVxdWVzdChcclxuICAgICAgICAgICAgKHVybCA9IHVybCksXHJcbiAgICAgICAgICAgIChkYXRhID0ge1xyXG4gICAgICAgICAgICAgICAgcGFyZW50SUQ6IHBhcmVudElELFxyXG4gICAgICAgICAgICAgICAgZGF0YVR5cGU6IGRhdGFUeXBlLFxyXG4gICAgICAgICAgICAgICAgZGF0YTogZGF0YSxcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICApXHJcbiAgICApO1xyXG59XHJcbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBhcHBlbmRCbG9jayhwYXJlbnRJRCwgZGF0YVR5cGUsIGRhdGEpIHtcclxuICAgIGxldCB1cmwgPSAnL2FwaS9ibG9jay9hcHBlbmRCbG9jayc7XHJcbiAgICByZXR1cm4gcGFyc2VCb2R5KFxyXG4gICAgICAgIHJlcXVlc3QoXHJcbiAgICAgICAgICAgICh1cmwgPSB1cmwpLFxyXG4gICAgICAgICAgICAoZGF0YSA9IHtcclxuICAgICAgICAgICAgICAgIHBhcmVudElEOiBwYXJlbnRJRCxcclxuICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBkYXRhVHlwZSxcclxuICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEsXHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgKVxyXG4gICAgKTtcclxufVxyXG5cclxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIHVwZGF0ZUJsb2NrKGlkLCBkYXRhVHlwZSwgZGF0YSkge1xyXG4gICAgbGV0IHVybCA9ICcvYXBpL2Jsb2NrL3VwZGF0ZUJsb2NrJztcclxuICAgIHJldHVybiBwYXJzZUJvZHkoXHJcbiAgICAgICAgcmVxdWVzdChcclxuICAgICAgICAgICAgKHVybCA9IHVybCksXHJcbiAgICAgICAgICAgIChkYXRhID0ge1xyXG4gICAgICAgICAgICAgICAgaWQ6IGlkLFxyXG4gICAgICAgICAgICAgICAgZGF0YVR5cGU6IGRhdGFUeXBlLFxyXG4gICAgICAgICAgICAgICAgZGF0YTogZGF0YSxcclxuICAgICAgICAgICAgfSlcclxuICAgICAgICApXHJcbiAgICApO1xyXG59XHJcblxyXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gZGVsZXRlQmxvY2soaWQpIHtcclxuICAgIGxldCB1cmwgPSAnL2FwaS9ibG9jay9kZWxldGVCbG9jayc7XHJ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gICAgdmFyIG8gPSB0aGlzLCBPO1xuICAgICAgcyA9IHMgPz8gXCJXQVJOXCI7XG4gICAgICB2YXIgdSA9IFwibG9nbGV2ZWxcIjtcbiAgICAgIHR5cGVvZiBhID09IFwic3RyaW5nXCIgPyB1ICs9IFwiOlwiICsgYSA6IHR5cGVvZiBhID09IFwic3ltYm9sXCIgJiYgKHUgPSB2b2lkIDApO1xuICAgICAgZnVuY3Rpb24gQyhuKSB7XG4gICAgICAgIHZhciBkID0gKHBbbl0gfHwgXCJzaWxlbnRcIikudG9VcHBlckNhc2UoKTtcbiAgICAgICAgaWYgKCEodHlwZW9mIHdpbmRvdyA9PT0gdCB8fCAhdSkpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgd2luZG93LmxvY2FsU3RvcmFnZVt1XSA9IGQ7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICB3aW5kb3cuZG9jdW1lbnQuY29va2llID0gZW5jb2RlVVJJQ29tcG9uZW50KHUpICsgXCI9XCIgKyBkICsgXCI7XCI7XG4gICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBrKCkge1xuICAgICAgICB2YXIgbjtcbiAgICAgICAgaWYgKCEodHlwZW9mIHdpbmRvdyA9PT0gdCB8fCAhdSkpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgbiA9IHdpbmRvdy5sb2NhbFN0b3JhZ2VbdV07XG4gICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmICh0eXBlb2YgbiA9PT0gdClcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHZhciBkID0gd2luZG93LmRvY3VtZW50LmNvb2tpZSwgbSA9IGQuaW5kZXhPZihcbiAgICAgICAgICAgICAgICBlbmNvZGVVUklDb21wb25lbnQodSkgKyBcIj1cIlxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICBtICE9PSAtMSAmJiAobiA9IC9eKFteO10rKS8uZXhlYyhkLnNsaWNlKG0pKVsxXSk7XG4gICAgICAgICAgICB9IGNhdGNoIHtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICByZXR1cm4gby5sZXZlbHNbbl0gPT09IHZvaWQgMCAmJiAobiA9IHZvaWQgMCksIG47XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGZ1bmN0aW9uIFYoKSB7XG4gICAgICAgIGlmICghKHR5cGVvZiB3aW5kb3cgPT09IHQgfHwgIXUpKSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHdpbmRvdy5sb2NhbFN0b3JhZ2UucmVtb3ZlSXRlbSh1KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICB9IGNhdGNoIHtcbiAgICAgICAgICB9XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHdpbmRvdy5kb2N1bWVudC5jb29raWUgPSBlbmNvZGVVUklDb21wb25lbnQodSkgKyBcIj07IGV4cGlyZXM9VGh1LCAwMSBKYW4gMTk3MCAwMDowMDowMCBVVENcIjtcbiAgICAgICAgICB9IGNhdGNoIHtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIG8ubmFtZSA9IGEsIG8ubGV2ZWxzID0ge1xuICAgICAgICBUUkFDRTogMCxcbiAgICAgICAgREVCVUc6IDEsXG4gICAgICAgIElORk86IDIsXG4gICAgICAgIFdBUk46IDMsXG4gICAgICAgIEVSUk9SOiA0LFxuICAgICAgICBTSUxFTlQ6IDVcbiAgICAgIH0sIG8ubWV0aG9kRmFjdG9yeSA9IGYgfHwgciwgby5nZXRMZXZlbCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gTztcbiAgICAgIH0sIG8uc2V0TGV2ZWwgPSBmdW5jdGlv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XCJub25lXCI7XG4gICAgICAgICAgaWYgKGcgPiB0aGlzLnN0YWNrU2l6ZSAtIDEpXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjb25zdCBGID0gRSArIFwiLVwiICsgdy5nZXRMaW5lTnVtYmVyKCkgKyBcIjpcIiArIHcuZ2V0Q29sdW1uTnVtYmVyKCk7XG4gICAgICAgICAgcC5wdXNoKEYpO1xuICAgICAgICB9XG4gICAgICAgIGMubGVuZ3RoID4gMCAmJiAodCA9IHAuam9pbihcIiAtPiBcIikpO1xuICAgICAgfVxuICAgICAgcmV0dXJuICghdCB8fCB0LnRyaW0oKS5sZW5ndGggPT09IDApICYmICh0ID0gdGhpcy5jb25zb2xlTG9nZ2VyKSwgYi5nZXRMb2dnZXIodCk7XG4gICAgfSk7XG4gICAgdGhpcy5zdGFja1NpemUgPSAxO1xuICAgIGxldCBwO1xuICAgIGUgPyBwID0gZSA6IHAgPSBJLmdldEVudkxldmVsKGwpLCBwID0gcCA/PyBTLkxPR19MRVZFTF9JTkZPLCBiLnNldExldmVsKHApO1xuICAgIGNvbnN0IGMgPSB7XG4gICAgICBncmF5OiAoZykgPT4gZy50b1N0cmluZygpLFxuICAgICAgZ3JlZW46IChnKSA9PiBnLnRvU3RyaW5nKCksXG4gICAgICB5ZWxsb3c6IChnKSA9PiBnLnRvU3RyaW5nKCksXG4gICAgICByZWQ6IChnKSA9PiBnLnRvU3RyaW5nKClcbiAgICB9O1xuICAgIFIucmVnKGIpLCBSLmFwcGx5KGIsIHtcbiAgICAgIGZvcm1hdChnLCB3LCBFKSB7XG4gICAgICAgIGNvbnN0IHIgPSBbXCJbXCIgKyAodCA/PyBJLmdldEVudkxvZ2dlcihsKSA/PyBcInpoaVwiKSArIFwiXVwiXTtcbiAgICAgICAgc3dpdGNoIChyLnB1c2goXG4gICAgICAgICAgYy5ncmF5KFwiW1wiKSArIGMuZ3JlZW4oRSkudG9TdHJpbmcoKSArIGMuZ3JheShcIl1cIilcbiAgICAgICAgKSwgZykge1xuICAgICAgICAgIGNhc2UgUy5MT0dfTEVWRUxfREVCVUc6XG4gICAgICAgICAgICByLnB1c2goYy5ncmF5KGcudG9VcHBlckNhc2UoKS50b1N0cmluZygpKSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIFMuTE9HX0xFVkVMX0lORk86XG4gICAgICAgICAgICByLnB1c2goYy5ncmVlbihnLnRvVXBwZXJDYXNlKCkudG9TdHJpbmcoKSkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSBTLkxPR19MRVZFTF9XQVJOOlxuICAgICAgICAgICAgci5wdXNoKGMueWVsbG93KGcudG9VcHBlckNhc2UoKS50b1N0cmluZygpKSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIFMuTE9HX0xFVkVMX0VSUk9SOlxuICAgICAgICAgICAgci5wdXNoKGMucmVkKGcudG9VcHBlckNhc2UoKS50b1N0cmluZygpKSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gci5wdXNoKGMuZ3JlZW4odykudG9TdHJpbmcoKSksIHIucHVzaChjLmdyYXkoXCI6XCIpKSwgci5qb2luKFwiIFwiKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxuICAvKipcbiAgICog6K6+572u6L6T5Ye65qCI55qE5rex5bqm77yM6buY6K6kMVxuICAgKlxuICAgKiBAcGFyYW0gc3RhY2tTaXplIC0g5qCI55qE5rex5bqmXG4gICAqL1xuICBzZXRTdGFja1NpemUoZSkge1xuICAgIHRoaXMuc3RhY2tTaXplID0gZSA/PyAxO1xuICB9XG4gIC8qKlxuICAgKiDojrflj5bosIPnlKjloIbmoIjvvIzoi6XmnKrojrflj5bliLDnm7TmjqXov5Tlm57nqbrmlbDnu4RcbiAgICpcbiAgICogQGF1dGhvciB0ZXJ3ZXJcbiAgICogQHNpbmNlIDEuNi4wXG4gICAqL1xuICBnZXRDYWxsU3RhY2so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jZSBJTWVudUl0ZW1PcHRpb24ge1xyXG4gICAgbGFiZWw/OiBzdHJpbmc7XHJcbiAgICBjbGljaz86IChlbGVtZW50OiBIVE1MRWxlbWVudCkgPT4gdm9pZDtcclxuICAgIHR5cGU/OiAnc2VwYXJhdG9yJyB8ICdzdWJtZW51JyB8ICdyZWFkb25seSc7XHJcbiAgICBhY2NlbGVyYXRvcj86IHN0cmluZztcclxuICAgIGFjdGlvbj86IHN0cmluZztcclxuICAgIGlkPzogc3RyaW5nO1xyXG4gICAgc3VibWVudT86IElNZW51SXRlbU9wdGlvbltdO1xyXG4gICAgZGlzYWJsZWQ/OiBib29sZWFuO1xyXG4gICAgaWNvbj86IHN0cmluZztcclxuICAgIGljb25IVE1MPzogc3RyaW5nO1xyXG4gICAgY3VycmVudD86IGJvb2xlYW47XHJcbiAgICBiaW5kPzogKGVsZW1lbnQ6IEhUTUxFbGVtZW50KSA9PiB2b2lkO1xyXG59XHJcblxyXG5leHBvcnQgY2xhc3MgTWVudSB7XHJcbiAgICBtZW51OiBhbnk7XHJcblxyXG4gICAgY29uc3RydWN0b3IoaWQ6IHN0cmluZykge1xyXG4gICAgICAgIGNvbnN0IG1lbnUgPSB3aW5kb3cuc2l5dWFuPy5tZW51cz8ubWVudTtcclxuICAgICAgICBpZiAoIW1lbnUpIHtcclxuICAgICAgICAgICAgdGhyb3cgRXJyb3IoJ1NpeXVhbiBpbnRlcm5hbCBtZW51IG5vdCBmb3VuZCEnKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5tZW51ID0gbWVudTtcclxuICAgICAgICBpZiAoIWlkKSB7XHJcbiAgICAgICAgICAgIHRocm93IEVycm9yKCdNZW51IG11c3QgaGFzIGFuIGlkLCBnb3QgZW1wdHkgb3IgdW5kZWZpbmVkIScpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBtZW51LnJlbW92ZSgpO1xyXG4gICAgICAgIG1lbnUuZWxlbWVudC5zZXRBdHRyaWJ1dGUoJ2RhdGE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lYXRlRWxlbWVudCgnYnV0dG9uJyk7XHJcbiAgICAgICAgaWYgKG9wdGlvbnMuZGlzYWJsZWQpIHtcclxuICAgICAgICAgICAgdGhpcy5lbGVtZW50LnNldEF0dHJpYnV0ZSgnZGlzYWJsZWQnLCAnZGlzYWJsZWQnKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKG9wdGlvbnMudHlwZSA9PT0gJ3NlcGFyYXRvcicpIHtcclxuICAgICAgICAgICAgdGhpcy5lbGVtZW50LmNsYXNzTGlzdC5hZGQoJ2IzLW1lbnVfX3NlcGFyYXRvcicpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMuZWxlbWVudC5jbGFzc0xpc3QuYWRkKCdiMy1tZW51X19pdGVtJyk7XHJcbiAgICAgICAgaWYgKG9wdGlvbnMuY3VycmVudCkge1xyXG4gICAgICAgICAgICB0aGlzLmVsZW1lbnQuY2xhc3NMaXN0LmFkZCgnYjMtbWVudV9faXRlbS0tc2VsZWN0ZWQnKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKG9wdGlvbnMuY2xpY2spIHtcclxuICAgICAgICAgICAgLy8g6ZyA5L2/55SoIGNsaWNr77yM5ZCm5YiZ56e75Yqo56uv5peg5rOV5rua5YqoXHJcbiAgICAgICAgICAgIHRoaXMuZWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIChldmVudCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZWxlbWVudC5nZXRBdHRyaWJ1dGUoJ2Rpc2FibGVkJykpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBvcHRpb25zLmNsaWNrKHRoaXMuZWxlbWVudCk7XHJcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgZXZlb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xyXG4gICAgICAgIGlmICh0aGlzLmRlc3Ryb3lDYWxsYmFjaykge1xyXG4gICAgICAgICAgICB0aGlzLmRlc3Ryb3lDYWxsYmFjaygpO1xyXG4gICAgICAgIH1cclxuICAgICAgICB3aW5kb3cuc2l5dWFuLmRpYWxvZ3MuZmluZCgoaXRlbSwgaW5kZXgpID0+IHtcclxuICAgICAgICAgICAgaWYgKGl0ZW0uaWQgPT09IHRoaXMuaWQpIHtcclxuICAgICAgICAgICAgICAgIHdpbmRvdy5zaXl1YW4uZGlhbG9ncy5zcGxpY2UoaW5kZXgsIDEpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYmluZElucHV0KGlucHV0RWxlbWVudDogSFRNTElucHV0RWxlbWVudCB8IEhUTUxUZXh0QXJlYUVsZW1lbnQsIGVudGVyRXZlbnQ/OiAoKSA9PiB2b2lkKSB7XHJcbiAgICAgICAgaW5wdXRFbGVtZW50LmZvY3VzKCk7XHJcbiAgICAgICAgaW5wdXRFbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2tleWRvd24nLCAoZXZlbnQ6IEtleWJvYXJkRXZlbnQpID0+IHtcclxuICAgICAgICAgICAgaWYgKGV2ZW50LmlzQ29tcG9zaW5nKSB7XHJcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGlmIChldmVudC5rZXkgPT09ICdFc2NhcGUnKSB7XHJcbiAgICAgICAgICAgICAgICB0aGlzLmRlc3Ryb3koKTtcclxuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcclxuICAgICAgICAgICAg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gICAgIHJldHVybiB0aGlzLmZpbGVDbGllbnQ7XHJcbiAgICB9XHJcblxyXG4gICAgZWxlY3Ryb25BcGkgPSB7XHJcbiAgICAgICAgcmVhZERpcihwOiBzdHJpbmcpOiBQcm9taXNlPEFycmF5PHsgaXNEaXI6IGJvb2xlYW47IG5hbWU6IHN0cmluZyB9Pj4ge1xyXG4gICAgICAgICAgICBjb25zdCBmcyA9IHdpbmRvdy5yZXF1aXJlKCdmcycpO1xyXG4gICAgICAgICAgICBjb25zdCBwYXRoID0gd2luZG93LnJlcXVpcmUoJ3BhdGgnKTtcclxuICAgICAgICAgICAgY29uc3QgU0lZVUFOX1dPUktTUEFDRSA9IHBhdGguam9pbih3aW5kb3cuc2l5dWFuLmNvbmZpZy5zeXN0ZW0uZGF0YURpciwgJy4uJyk7XHJcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgZnMucmVhZGRpcihwYXRoLmpvaW4oU0lZVUFOX1dPUktTUEFDRSwgcCksIChlcnIsIGZpbGVzOiBzdHJpbmdbXSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShbXSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gZmlsZXMubWFwPHsgaXNEaXI6IGJvb2xlYW47IG5hbWU6IHN0cmluZyB9PigoZjogc3RyaW5nKSA9PiAoe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpc0RpcjogKGZzLnN0YXRTeW5jKHBhdGguam9pbihTSVlVQU5fV09SS1NQQUNFLCBwLCBmKSkgYXMgU3RhdHMpLmlzRGlyZWN0b3J5KCksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGYsXHJcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xyXG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzdWx0KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIGdldEZpbGUoZjogc3RyaW5nLCB0eXBlOiAnanNvbicgfCAndGV4dCcgPSAndGV4dCcpIHtcclxuICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGZzID0gd2luZG93LnJlcXVpcmUoJ2ZzJyk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBwYXRoID0gd2luZG93LnJlcXVpcmUoJ3BhdGgnKTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IFNJWVVBTl9XT1JLU1BBQ0UgPSBwYXRoLmpvaW4od2luZG93LnNpeXVhbi5jb25maWcuc3lzdGVtLmRhdGFEaXIsICcuLicpO1xyXG4gICAgICAgICAgICAgICAgZnMucmVhZEZpbGUocGF0aC5qb2luKFNJWVVBTl9XT1JLU1BBQ0UsIGYpLCAoZXJyLCBkYXRhKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVqZWN0KGVycik7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRleHQgPSBkYXRhLnRvU3RyaW5nKCd1dGY4Jyk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdqc29uJykge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUoSlNPTi5wYXJzZSh0ZXh0KSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZSh0ZXh0KTtcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9LFxyXG4gICAgICAgIHB1dEZpbGU6IHNlcnZlckFwaS5wdXRGaWxlLFxyXG4gICAgICAgIHJlbW92ZUZpbGUoZjogc3RyaW5nKTogUHJvbWlzZTx2b2lkPiB7XHJcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBmcyA9IHdpbmRvdy5yZXF1aXJlKCdmcycpO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgcGF0aCA9IHdpbmRvdy5yZXF1aXJlKCdwYXRoJyk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBTSVlVQU5fV09SS1NQQUNFID0gcGF0aC5qb2luKHdpbmRvdy5zaXl1YW4uY29uZmlnLnN5c3RlbS5kYXRhRGlyLCAnLi4nKTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHAgPSBwYXRoLmpvaW4oU0lZVUFOX1dPUktTUEFDRSwgZik7XHJcbiAgICAgICAgICAgICAgICBsb2coJ1JlbW92ZSBmaWxlcyBmcm9tJywgcCk7XHJcbiAgICAgICAgICAgICAgICBmcy5ybShwLCB7IHJlY3Vyc2l2ZTogdHJ1ZSwgZm9yY2U6IHRydWUgfSwgKGVycikgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICAg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QpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XG4gICAgICAgICAgICBzd2l0Y2ggKG9wWzBdKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOiBjYXNlIDE6IHQgPSBvcDsgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6IF8ubGFiZWwrKzsgeSA9IG9wWzFdOyBvcCA9IFswXTsgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OiBvcCA9IF8ub3BzLnBvcCgpOyBfLnRyeXMucG9wKCk7IGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICghKHQgPSBfLnRyeXMsIHQgPSB0Lmxlbmd0aCA+IDAgJiYgdFt0Lmxlbmd0aCAtIDFdKSAmJiAob3BbMF0gPT09IDYgfHwgb3BbMF0gPT09IDIpKSB7IF8gPSAwOyBjb250aW51ZTsgfVxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDMgJiYgKCF0IHx8IChvcFsxXSA+IHRbMF0gJiYgb3BbMV0gPCB0WzNdKSkpIHsgXy5sYWJlbCA9IG9wWzFdOyBicmVhazsgfVxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHQgJiYgXy5sYWJlbCA8IHRbMl0pIHsgXy5sYWJlbCA9IHRbMl07IF8ub3BzLnB1c2gob3ApOyBicmVhazsgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodFsyXSkgXy5vcHMucG9wKCk7XG4gICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGlud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MucHJvcGVydHlJbmplY3Rpb25zKV07XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eUluamVjdGlvbnMgPSBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbMiwgY3JlYXRlSW5zdGFuY2VXaXRoSW5qZWN0aW9ucyhfX2Fzc2lnbihfX2Fzc2lnbih7fSwgYXJncyksIHsgY29uc3RydWN0b3JJbmplY3Rpb25zOiBjb25zdHJ1Y3RvckluamVjdGlvbnMsIHByb3BlcnR5SW5qZWN0aW9uczogcHJvcGVydHlJbmplY3Rpb25zIH0pKV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0pO1xufVxuZnVuY3Rpb24gcG9zc2libHlXYWl0SW5qZWN0aW9ucyhwb3NzaWJsZVByb21pc2VpbmplY3Rpb25zKSB7XG4gICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgaW5qZWN0aW9ucywgX2ksIHBvc3NpYmxlUHJvbWlzZWluamVjdGlvbnNfMSwgaW5qZWN0aW9uO1xuICAgICAgICByZXR1cm4gX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICBpbmplY3Rpb25zID0gW107XG4gICAgICAgICAgICBmb3IgKF9pID0gMCwgcG9zc2libGVQcm9taXNlaW5qZWN0aW9uc18xID0gcG9zc2libGVQcm9taXNlaW5qZWN0aW9uczsgX2kgPCBwb3NzaWJsZVByb21pc2VpbmplY3Rpb25zXzEubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgICAgICAgICAgaW5qZWN0aW9uID0gcG9zc2libGVQcm9taXNlaW5qZWN0aW9uc18xW19pXTtcbiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShpbmplY3Rpb24pKSB7XG4gICAgICAgICAgICAgICAgICAg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FjdGl2YXRpb25zSXRlcmF0b3IubmV4dCgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBbMywgMl07XG4gICAgICAgICAgICBjYXNlIDQ6IHJldHVybiBbMiwgcmVzdWx0XTtcbiAgICAgICAgfVxuICAgIH0pO1xufSk7IH07XG52YXIgX2dldENvbnRhaW5lckFjdGl2YXRpb25zRm9yU2VydmljZSA9IGZ1bmN0aW9uIChjb250YWluZXIsIHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgdmFyIGFjdGl2YXRpb25zID0gY29udGFpbmVyLl9hY3RpdmF0aW9ucztcbiAgICByZXR1cm4gYWN0aXZhdGlvbnMuaGFzS2V5KHNlcnZpY2VJZGVudGlmaWVyKSA/IGFjdGl2YXRpb25zLmdldChzZXJ2aWNlSWRlbnRpZmllcikudmFsdWVzKCkgOiBbXS52YWx1ZXMoKTtcbn07XG52YXIgX2dldENvbnRhaW5lcnNJdGVyYXRvciA9IGZ1bmN0aW9uIChjb250YWluZXIpIHtcbiAgICB2YXIgY29udGFpbmVyc1N0YWNrID0gW2NvbnRhaW5lcl07XG4gICAgdmFyIHBhcmVudCA9IGNvbnRhaW5lci5wYXJlbnQ7XG4gICAgd2hpbGUgKHBhcmVudCAhPT0gbnVsbCkge1xuICAgICAgICBjb250YWluZXJzU3RhY2sucHVzaChwYXJlbnQpO1xuICAgICAgICBwYXJlbnQgPSBwYXJlbnQucGFyZW50O1xuICAgIH1cbiAgICB2YXIgZ2V0TmV4dENvbnRhaW5lciA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIG5leHRDb250YWluZXIgPSBjb250YWluZXJzU3RhY2sucG9wKCk7XG4gICAgICAgIGlmIChuZXh0Q29udGFpbmVyICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHJldHVybiB7IGRvbmU6IGZhbHNlLCB2YWx1ZTogbmV4dENvbnRhaW5lciB9O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcm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RpbmcuY29uc3RyYWludCA9IGZ1bmN0aW9uIChyZXF1ZXN0KSB7XG4gICAgICAgICAgICBpZiAocmVxdWVzdCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB0YXJnZXRJc0RlZmF1bHQgPSAocmVxdWVzdC50YXJnZXQgIT09IG51bGwpICYmXG4gICAgICAgICAgICAgICAgKCFyZXF1ZXN0LnRhcmdldC5pc05hbWVkKCkpICYmXG4gICAgICAgICAgICAgICAgKCFyZXF1ZXN0LnRhcmdldC5pc1RhZ2dlZCgpKTtcbiAgICAgICAgICAgIHJldHVybiB0YXJnZXRJc0RlZmF1bHQ7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBuZXcgQmluZGluZ09uU3ludGF4KHRoaXMuX2JpbmRpbmcpO1xuICAgIH07XG4gICAgQmluZGluZ1doZW5TeW50YXgucHJvdG90eXBlLndoZW5UYXJnZXRUYWdnZWQgPSBmdW5jdGlvbiAodGFnLCB2YWx1ZSkge1xuICAgICAgICB0aGlzLl9iaW5kaW5nLmNvbnN0cmFpbnQgPSB0YWdnZWRDb25zdHJhaW50KHRhZykodmFsdWUpO1xuICAgICAgICByZXR1cm4gbmV3IEJpbmRpbmdPblN5bnRheCh0aGlzLl9iaW5kaW5nKTtcbiAgICB9O1xuICAgIEJpbmRpbmdXaGVuU3ludGF4LnByb3RvdHlwZS53aGVuSW5qZWN0ZWRJbnRvID0gZnVuY3Rpb24gKHBhcmVudCkge1xuICAgICAgICB0aGlzLl9iaW5kaW5nLmNvbnN0cmFpbnQgPSBmdW5jdGlvbiAocmVxdWVzdCkge1xuICAgICAgICAgICAgcmV0dXJuIHJlcXVlc3QgIT09IG51bGwgJiYgdHlwZUNvbnN0cmFpbnQocGFyZW50KShyZXF1ZXN0LnBhcmVudFJlcXVlc3QpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gbmV3IEJpbmRpb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Byb3RvdHlwZS5pblJlcXVlc3RTY29wZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2JpbmRpbmdJblN5bnRheC5pblJlcXVlc3RTY29wZSgpO1xuICAgIH07XG4gICAgQmluZGluZ0luV2hlbk9uU3ludGF4LnByb3RvdHlwZS5pblNpbmdsZXRvblNjb3BlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fYmluZGluZ0luU3ludGF4LmluU2luZ2xldG9uU2NvcGUoKTtcbiAgICB9O1xuICAgIEJpbmRpbmdJbldoZW5PblN5bnRheC5wcm90b3R5cGUuaW5UcmFuc2llbnRTY29wZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2JpbmRpbmdJblN5bnRheC5pblRyYW5zaWVudFNjb3BlKCk7XG4gICAgfTtcbiAgICBCaW5kaW5nSW5XaGVuT25TeW50YXgucHJvdG90eXBlLndoZW4gPSBmdW5jdGlvbiAoY29uc3RyYWludCkge1xuICAgICAgICByZXR1cm4gdGhpcy5fYmluZGluZ1doZW5TeW50YXgud2hlbihjb25zdHJhaW50KTtcbiAgICB9O1xuICAgIEJpbmRpbmdJbldoZW5PblN5bnRheC5wcm90b3R5cGUud2hlblRhcmdldE5hbWVkID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2JpbmRpbmdXaGVuU3ludGF4LndoZW5UYXJnZXROYW1lZChuYW1lKTtcbiAgICB9O1xuICAgIEJpbmRpbmdJbldoZW5PblN5bnRheC5wcm90b3R5cGUud2hlblRhcmdldElzRGVmYXVsdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX2JpbmRpbmdXaGVuU3ludGF4LndoZW5UYXJnZXRJc0RlZmF1bHQoKTtcbiAgICB9O1xuICAgIEJpbmRpbmdJbldoZW5PblN5bnRheC5wcm90b3R5cGUud2hlblRhcmdldF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AgICB9O1xuICAgIExvb2t1cC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyLCB2YWx1ZSkge1xuICAgICAgICBpZiAoc2VydmljZUlkZW50aWZpZXIgPT09IG51bGwgfHwgc2VydmljZUlkZW50aWZpZXIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKEVSUk9SX01TR1MuTlVMTF9BUkdVTUVOVCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHZhbHVlID09PSBudWxsIHx8IHZhbHVlID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihFUlJPUl9NU0dTLk5VTExfQVJHVU1FTlQpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMuX21hcC5nZXQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICBpZiAoZW50cnkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgZW50cnkucHVzaCh2YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLl9tYXAuc2V0KHNlcnZpY2VJZGVudGlmaWVyLCBbdmFsdWVdKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgTG9va3VwLnByb3RvdHlwZS5nZXQgPSBmdW5jdGlvbiAoc2VydmljZUlkZW50aWZpZXIpIHtcbiAgICAgICAgaWYgKHNlcnZpY2VJZGVudGlmaWVyID09PSBudWxsIHx8IHNlcnZpY2VJZGVudGlmaWVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihFUlJPUl9NU0dTLk5VTExfQVJHVU1FTlQpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMuX21hcC5nZXQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICBpZiAoZW50cnkgIT09IHVuZGVmaW5l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dGVyKGZ1bmN0aW9uIChsb29rdXBWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gIWxvb2t1cEFjdGl2YXRpb25zLnNvbWUoZnVuY3Rpb24gKG1vZHVsZUFjdGl2YXRpb24pIHsgcmV0dXJuIGxvb2t1cFZhbHVlID09PSBtb2R1bGVBY3RpdmF0aW9uOyB9KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBfdGhpcy5fc2V0VmFsdWUoc2VydmljZUlkZW50aWZpZXIsIGZpbHRlcmVkVmFsdWVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBMb29rdXAucHJvdG90eXBlLnJlbW92ZUJ5Q29uZGl0aW9uID0gZnVuY3Rpb24gKGNvbmRpdGlvbikge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB2YXIgcmVtb3ZhbHMgPSBbXTtcbiAgICAgICAgdGhpcy5fbWFwLmZvckVhY2goZnVuY3Rpb24gKGVudHJpZXMsIGtleSkge1xuICAgICAgICAgICAgdmFyIHVwZGF0ZWRFbnRyaWVzID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBfaSA9IDAsIGVudHJpZXNfMSA9IGVudHJpZXM7IF9pIDwgZW50cmllc18xLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgIHZhciBlbnRyeSA9IGVudHJpZXNfMVtfaV07XG4gICAgICAgICAgICAgICAgdmFyIHJlbW92ZSA9IGNvbmRpdGlvbihlbnRyeSk7XG4gICAgICAgICAgICAgICAgaWYgKHJlbW92ZSkge1xuICAgICAgICAgICAgICAgICAgICByZW1vdmFscy5wdXNoKGVudHJ5KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZWRFbnRyaWVzLnB1c2goZW50cnkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgIC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AgICAgICAgICAgICAgIHZhbHVlLmZvckVhY2goZnVuY3Rpb24gKGJpbmRpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVzdGluYXRpb24uYWRkKGJpbmRpbmcuc2VydmljZUlkZW50aWZpZXIsIGJpbmRpbmcuY2xvbmUoKSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICB0YXJnZXRDb250YWluZXJzLmZvckVhY2goZnVuY3Rpb24gKHRhcmdldEJpbmRpbmdEaWN0aW9uYXJ5KSB7XG4gICAgICAgICAgICBjb3B5RGljdGlvbmFyeSh0YXJnZXRCaW5kaW5nRGljdGlvbmFyeSwgYmluZGluZ0RpY3Rpb25hcnkpO1xuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIGNvbnRhaW5lcjtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUubG9hZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIG1vZHVsZXMgPSBbXTtcbiAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgIG1vZHVsZXNbX2ldID0gYXJndW1lbnRzW19pXTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgZ2V0SGVscGVycyA9IHRoaXMuX2dldENvbnRhaW5lck1vZHVsZUhlbHBlcnNGYWN0b3J5KCk7XG4gICAgICAgIGZvciAodmFyIF9hID0gMCwgbW9kdWxlc18xID0gbW9kdWxlczsgX2EgPCBtb2R1bGVzXzEubGVuZ3RoOyBfYSsrKSB7XG4gICAgICAgICAgICB2YXIgY3VycmVudE1vZHVsZSA9IG1vZHVsZXNfMVtfYV07XG4gICAgICAgICAgICB2YXIgY29udGFpbmVyTW9kdWxlSGVscGVycyA9IGdldEhlbHBlcnMoY3VycmVudE1vZHVsZS5pZCk7XG4gICAgICAgICAgICBjdXJyZW50TW9kdWxl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VIZWxwZXJzRmFjdG9yeSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgX2EgPSAwLCBtb2R1bGVzXzIgPSBtb2R1bGVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgX2IubGFiZWwgPSAxO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIShfYSA8IG1vZHVsZXNfMi5sZW5ndGgpKSByZXR1cm4gWzMsIDRdO1xuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudE1vZHVsZSA9IG1vZHVsZXNfMltfYV07XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250YWluZXJNb2R1bGVIZWxwZXJzID0gZ2V0SGVscGVycyhjdXJyZW50TW9kdWxlLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgY3VycmVudE1vZHVsZS5yZWdpc3RyeShjb250YWluZXJNb2R1bGVIZWxwZXJzLmJpbmRGdW5jdGlvbiwgY29udGFpbmVyTW9kdWxlSGVscGVycy51bmJpbmRGdW5jdGlvbiwgY29udGFpbmVyTW9kdWxlSGVscGVycy5pc2JvdW5kRnVuY3Rpb24sIGNvbnRhaW5lck1vZHVsZUhlbHBlcnMucmViaW5kRnVuY3Rpb24sIGNvbnRhaW5lck1vZHVsZUhlbHBlcnMudW5iaW5kQXN5bmNGdW5jdGlvbiwgY29udGFpbmVyTW9kdWxlSGVscGVycy5vbkFjdGl2YXRpb25GdW5jdGlvbiwgY29udGFpbmVyTW9kdWxlSGVscGVycy5vbkRlYWN0aXZhdGlvbkZ1bmN0aW9uKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9iLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9iLmxhYmVsID0gMztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2ErKztcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMywgMV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNDogcmV0dXJuIFsyXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLnVubG9hZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgdmFyIG1vZHVsZXMgPSBbXTtcbiAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgIG1vZHVsZXNbX2ldID0gYXJndW1lbnRzW19pXTtcbiAgICAgICAgfVxuICAgICAgICBtb2R1bGVzLmZvckVhY2goZnVuY3Rpb24gKG1vZHVsZSkge1xuICAgICAgICAgICAgdmFyIGRlYWN0aXZhdGlvbnMgPSBfdGhpcy5fcmVtb3ZlTW9kdWxlQmluZGluZ3MobW9kdWxlLmlkKTtcbiAgICAgICAgICAgIF90aGlzLl9kZWFjdGl2YXRlU2luZ2xldG9ucyhkZWFjdGl2YXRpb25zKTtcbiAgICAgICAgICAgIF90aGlzLl9yZW1vdmVNb2R1bGVIYW5kbGVycyhtb2R1bGUuaWQpO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUudW5sb2FkQXN5bmMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBtb2R1bGVzID0gW107XG4gICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgICAgICBtb2R1bGVzW19pXSA9IGFyZ3VtZW50c1tfaV07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIF9hLCBtb2R1bGVzXzMsIG1vZHVsZV8xLCBkZWFjdGl2YXRpb25zO1xuICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYikge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoX2IubGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2EgPSAwLCBtb2R1bGVzXzMgPSBtb2R1bGVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgX2IubGFiZWwgPSAxO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIShfYSA8IG1vZHVsZXNfMy5sZW5ndGgpKSByZXR1cm4gWzMsIDRdO1xuICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlXzEgPSBtb2R1bGVzXzNbX2FdO1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVhY3RpdmF0aW9ucyA9IHRoaXMuX3JlbW92ZU1vZHVsZUJpbmRpbmdzKG1vZHVsZV8xLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgdGhpcy5fZGVhY3RpdmF0ZVNpbmdsZXRvbnNBc3luYyhkZWFjdGl2YXRpb25zKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9iLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZU1vZHVsZUhhbmRsZXJzKG1vZHVsZV8xLmlkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9iLmxhYmVsID0gMztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2ErKztcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMywgMV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2Ug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2VJZGVudGlmaWVyKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMiwgdGhpcy5iaW5kKHNlcnZpY2VJZGVudGlmaWVyKV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS51bmJpbmQgPSBmdW5jdGlvbiAoc2VydmljZUlkZW50aWZpZXIpIHtcbiAgICAgICAgaWYgKHRoaXMuX2JpbmRpbmdEaWN0aW9uYXJ5Lmhhc0tleShzZXJ2aWNlSWRlbnRpZmllcikpIHtcbiAgICAgICAgICAgIHZhciBiaW5kaW5ncyA9IHRoaXMuX2JpbmRpbmdEaWN0aW9uYXJ5LmdldChzZXJ2aWNlSWRlbnRpZmllcik7XG4gICAgICAgICAgICB0aGlzLl9kZWFjdGl2YXRlU2luZ2xldG9ucyhiaW5kaW5ncyk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fcmVtb3ZlU2VydmljZUZyb21EaWN0aW9uYXJ5KHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUudW5iaW5kQXN5bmMgPSBmdW5jdGlvbiAoc2VydmljZUlkZW50aWZpZXIpIHtcbiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGJpbmRpbmdzO1xuICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoX2EubGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9iaW5kaW5nRGljdGlvbmFyeS5oYXNLZXkoc2VydmljZUlkZW50aWZpZXIpKSByZXR1cm4gWzMsIDJdO1xuICAgICAgICAgICAgICAgICAgICAgICAgYmluZGluZ3MgPSB0aGlzLl9iaW5kaW5nRGljdGlvbmFyeS5nZXQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFs0LCB0aGlzLl9kZWFjdGl2YXRlU2luZ2xldG9uc0FzeW5jKGJpbmRpbmdzKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLmxhYmVsID0gMjtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fcmVtb3ZlU2VydmljZUZyb21EaWN0aW9uYXJ5KHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS51bmJpbmRBbGwgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHRoaXMuX2JpbmRpbmdEaWN0aW9uYXJ5LnRyYXZlcnNlKGZ1bmN0aW9uIChfa2V5LCB2YWx1ZSkge1xuICAgICAgICAgICAgX3RoaXMuX2RlYWN0aXZhdGVTaW5nbGV0b25zKHZhbHVlKTtcbiAgICAgICAgfSk7XG4gICAgICAgIHRoaXMuX2JpbmRpbmdEaWN0aW9uYXJ5ID0gbmV3IExvb2t1cCgpO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS51bmJpbmRBbGxBc3luYyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIHByb21pc2VzO1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHJldHVybiBfX2dlbmVyYXRvcih0aGlzLCBmdW5jdGlvbiAoX2EpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKF9hLmxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb21pc2VzID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9iaW5kaW5nRGljdGlvbmFyeS50cmF2ZXJzZShmdW5jdGlvbiAoX2tleSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlcy5wdXNoKF90aGlzLl9kZWFjdGl2YXRlU2luZ2xldG9uc0FzeW5jKHZhbHVlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgUHJvbWlzZS5hbGwocHJvbWlzZXMpXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYmluZGluZ0RpY3Rpb25hcnkgPSBuZXcgTG9va3VwKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUub25BY3RpdmF0aW9uID0gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyLCBvbkFjdGl2YXRpb24pIHtcbiAgICAgICAgdGhpcy5fYWN0aXZ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gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIGFzeW5jUmVzdWx0XTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFszLCAzXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICAgICAgZXhfMSA9IF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihFUlJPUl9NU0dTLk9OX0RFQUNUSVZBVElPTl9FUlJPUihjb25zdHJ1Y3Rvci5uYW1lLCBleF8xLm1lc3NhZ2UpKTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOiByZXR1cm4gWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUuX2RlYWN0aXZhdGVDb250YWluZXIgPSBmdW5jdGlvbiAoaW5zdGFuY2UsIGRlYWN0aXZhdGlvbnNJdGVyYXRvcikge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB2YXIgZGVhY3RpdmF0aW9uID0gZGVhY3RpdmF0aW9uc0l0ZXJhdG9yLm5leHQoKTtcbiAgICAgICAgd2hpbGUgKGRlYWN0aXZhdGlvbi52YWx1ZSkge1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IGRlYWN0aXZhdGlvbi52YWx1ZShpbnN0YW5jZSk7XG4gICAgICAgICAgICBpZiAoaXNQcm9taXNlKHJlc3VsdCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0LnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuX2RlYWN0aXZhdGVDb250YWluZXJBc3luYyhpbnN0YW5jZSwgZGVhY3RpdmF0aW9uc0l0ZXJhdG9yKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRlYWN0aXZhdGlvbiA9IGRlYWN0aXZhdGlvbnNJdGVyYXRvci5uZXh0KCk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUuX2RlYWN0aXZhdGVDb250YWluZXJBc3luYyA9IGZ1bmN0aW9uIChpbnN0YW5jZSwgZGVhY3RpdmF0aW9uc0l0ZXJhdG9yKSB7XG4gICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBkZWFjdGl2YXRpb247XG4gICAgICAgICAgICByZXR1cm4gX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChfYS5sYWJlbCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWFjdGl2YXRpb24gPSBkZWFjdGl2YXRpb25zSXRlcmF0b3IubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgX2EubGFiZWwgPSAxO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRlYWN0aXZhdGlvbi52YWx1ZSkgcmV0dXJuIFszLCAzXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgZGVhY3RpdmF0aW9uLnZhbHVlKGluc3RhbmNlKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlYWN0aXZhdGlvbiA9IGRlYWN0aXZhdGlvbnNJdGVyYXRvci5uZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzMsIDFdO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDM6IHJldHVybiBbMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS5fZ2V0Q29udGFpbmVyTW9kdWxlSGVscGVyc0ZhY3RvcnkgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHZhciBzZXRNb2R1bGVJZCA9IGZ1bmN0aW9uIChiaW5kaW5nVG9TeW50YXgsIG1vZHVsZUlkKSB7XG4gICAgICAgICAgICBiaW5kaW5nVG9TeW50YXguX2JpbmRpbmcubW9kdWxlSWQgPSBtb2R1bGVJZDtcbiAgICAgICAgfTtcbiAgICAgICAgdmFyIGdldEJpbmRGdW5jdGlvbiA9IGZ1bmN0aW9uIChtb2R1bGVJZCkge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICAgICAgICAgIHZhciBiaW5kaW5nVG9TeW50YXggPSBfdGhpcy5iaW5kKHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICAgICAgICAgICAgICBzZXRNb2R1bGVJZChiaW5kaW5nVG9TeW50YXgsIG1vZHVsZUlkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYmluZGluZ1RvU3ludGF4O1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgdmFyIGdldFVuYmluZEZ1bmN0aW9uID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy51bmJpbmQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgdmFyIGdldFVuYmluZEFzeW5jRnVuY3Rpb24gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLnVuYmluZEFzeW5jKHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIHZhciBnZXRJc2JvdW5kRnVuY3Rpb24gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmlzQm91bmQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgdmFyIGdldFJlYmluZEZ1bmN0aW9uID0gZnVuY3Rpb24gKG1vZHVsZUlkKSB7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgICAgICAgICAgICAgdmFyIGJpbmRpbmdUb1N5bnRheCA9IF90aGlzLnJlYmluZChzZXJ2aWNlSWRlbnRpZmllcik7XG4gICAgICAgICAgICAgICAgc2V0TW9kdWxlSWQoYmluZGluZ1RvU3ludGF4LCBtb2R1bGVJZCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpbmRpbmdUb1N5bnRheDtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIHZhciBnZXRPbkFjdGl2YXRpb25GdW5jdGlvbiA9IGZ1bmN0aW9uIChtb2R1bGVJZCkge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllciwgb25BY3RpdmF0aW9uKSB7XG4gICAgICAgICAgICAgICAgX3RoaXMuX21vZHVsZUFjdGl2YXRpb25TdG9yZ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gICAgICAgICAga2V5OiBrZXksXG4gICAgICAgICAgICB2YWx1ZTogdmFsdWUsXG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBnZXROb3RBbGxBcmdzO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS5fcGxhbkFuZFJlc29sdmUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHJldHVybiBmdW5jdGlvbiAoYXJncykge1xuICAgICAgICAgICAgdmFyIGNvbnRleHQgPSBwbGFuKF90aGlzLl9tZXRhZGF0YVJlYWRlciwgX3RoaXMsIGFyZ3MuaXNNdWx0aUluamVjdCwgYXJncy50YXJnZXRUeXBlLCBhcmdzLnNlcnZpY2VJZGVudGlmaWVyLCBhcmdzLmtleSwgYXJncy52YWx1ZSwgYXJncy5hdm9pZENvbnN0cmFpbnRzKTtcbiAgICAgICAgICAgIGNvbnRleHQgPSBhcmdzLmNvbnRleHRJbnRlcmNlcHRvcihjb250ZXh0KTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSByZXNvbHZlKGNvbnRleHQpO1xuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUuX2RlYWN0aXZhdGVJZlNpbmdsZXRvbiA9IGZ1bmN0aW9uIChiaW5kaW5nKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIGlmICghYmluZGluZy5hY3RpdmF0ZWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNQcm9taXNlKGJpbmRpbmcuY2FjaGUpKSB7XG4gICAgICAgICAgICByZXR1cm4gYmluZGluZy5jYWNoZS50aGVuKGZ1bmN0aW9uIChyZXNvbHZlZCkgeyByZXR1cm4gX3RoaXMuX2RlYWN0aXZhdGUoYmluZGluZywgcmVzb2x2ZWQpOy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WFjdGl2YXRlSWZTaW5nbGV0b24oYik7IH0pKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS5fcHJvcGFnYXRlQ29udGFpbmVyRGVhY3RpdmF0aW9uVGhlbkJpbmRpbmdBbmRQcmVEZXN0cm95ID0gZnVuY3Rpb24gKGJpbmRpbmcsIGluc3RhbmNlLCBjb25zdHJ1Y3Rvcikge1xuICAgICAgICBpZiAodGhpcy5wYXJlbnQpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9kZWFjdGl2YXRlLmJpbmQodGhpcy5wYXJlbnQpKGJpbmRpbmcsIGluc3RhbmNlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9iaW5kaW5nRGVhY3RpdmF0aW9uQW5kUHJlRGVzdHJveShiaW5kaW5nLCBpbnN0YW5jZSwgY29uc3RydWN0b3IpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLl9wcm9wYWdhdGVDb250YWluZXJEZWFjdGl2YXRpb25UaGVuQmluZGluZ0FuZFByZURlc3Ryb3lBc3luYyA9IGZ1bmN0aW9uIChiaW5kaW5nLCBpbnN0YW5jZSwgY29uc3RydWN0b3IpIHtcbiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoX2EubGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF0aGlzLnBhcmVudCkgcmV0dXJuIFszLCAyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgdGhpcy5fZGVhY3RpdmF0ZS5iaW5kKHRoaXMucGFyZW50KShiaW5kaW5nLCBpbnN0YW5jZSldO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzMsIDRdO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6IHJldHVybiBbNCwgdGhpcy5fYmluZGluZ0RlYWN0aXZhdGlvbkFuZFByZURlc3Ryb3lBc3luYyhiaW5kaW5nLCBpbnN0YW5jZSwgY29uc3RydWN0b3IpXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgX2EubGFiZWwgPSA0O1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6IHJldHVybiBbMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS5fcmVtb3ZlU2VydmljZUZyb21EaWN0aW9uYXJ5ID0gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB0aGlzLl9iaW5kaW5nRGljdGlvbmFyeS5yZW1vdmUoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICB9XG4gICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoRVJST1JfTVNHUy5DQU5OT1RfVU5CSU5EICsgXCIgXCIgKyBnZXRTZXJ2aWN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4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoISh0eXBlb2YgYmluZGluZy5vbkRlYWN0aXZhdGlvbiA9PT0gXCJmdW5jdGlvblwiKSkgcmV0dXJuIFszLCAyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgYmluZGluZy5vbkRlYWN0aXZhdGlvbihpbnN0YW5jZSldO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5sYWJlbCA9IDI7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuIFs0LCB0aGlzLl9wcmVEZXN0cm95KGNvbnN0cnVjdG9yLCBpbnN0YW5jZSldO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIHJldHVybiBDb250YWluZXI7XG59KCkpO1xuZXhwb3J0IHsgQ29udGFpbmVyIH07XG4vLyMgc291cmNlTWFwcGluZ1VSTD1jb250YWluZXIuanMubWFwIiwiZXhwb3J0IGZ1bmN0aW9uIGdldEZpcnN0QXJyYXlEdXBsaWNhdGUoYXJyYXkpIHtcbiAgICB2YXIgc2VlblZhbHVlcyA9IG5ldyBTZXQoKTtcbiAgICBmb3IgKHZhciBfaSA9IDAsIGFycmF5XzEgPSBhcnJheTsgX2kgPCBhcnJheV8xLmxlbmd0aDsgX2krKykge1xuICAgICAgICB2YXIgZW50cnkgPSBhcnJheV8xW19pXTtcbiAgICAgICAgaWYgKHNlZW5WYWx1ZXMuaGFzKGVudHJ5KSkge1xuICAgICAgICAgICAgcmV0dXJuIGVudHJ5O1xuICAgICAgICB9XG4gICAgICAgI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gY29uc3QgZGVzY3JpcHRvcnMgPSBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9ycyhub2RlLl9fcHJvdG9fXyk7XG4gICAgZm9yIChjb25zdCBrZXkgaW4gYXR0cmlidXRlcykge1xuICAgICAgICBpZiAoYXR0cmlidXRlc1trZXldID09IG51bGwpIHtcbiAgICAgICAgICAgIG5vZGUucmVtb3ZlQXR0cmlidXRlKGtleSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoa2V5ID09PSAnc3R5bGUnKSB7XG4gICAgICAgICAgICBub2RlLnN0eWxlLmNzc1RleHQgPSBhdHRyaWJ1dGVzW2tleV07XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoa2V5ID09PSAnX192YWx1ZScpIHtcbiAgICAgICAgICAgIG5vZGUudmFsdWUgPSBub2RlW2tleV0gPSBhdHRyaWJ1dGVzW2tleV07XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoZGVzY3JpcHRvcnNba2V5XSAmJiBkZXNjcmlwdG9yc1trZXldLnNldCkge1xuICAgICAgICAgICAgbm9kZVtrZXldID0gYXR0cmlidXRlc1trZXldO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgYXR0cihub2RlLCBrZXksIGF0dHJpYnV0ZXNba2V5XSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5mdW5jdGlvbiBzZXRfc3ZnX2F0dHJpYnV0ZXMobm9kZSwgYXR0cmlidXRlcykge1xuICAgIGZvciAoY29uc3Qga2V5IGluIGF0dHJpYnV0ZXMpIHtcbiAgICAgICAgYXR0cihub2RlLCBrZXksIGF0dHJpYnV0ZXNba2V5XSk7XG4gICAgfVxufVxuZnVuY3Rpb24gc2V0X2N1c3RvbV9lbGVtZW50X2RhdGFfbWFwKG5vZGUsIGRhdGFfbWFwKSB7XG4gICAgT2JqZWN0LmtleXMoZGF0YV9tYXApLmZvckVhY2goKGtleSkgPT4ge1xuICA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gaSA8IG5vZGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBjb25zdCBub2RlID0gbm9kZXNbaV07XG4gICAgICAgICAgICBpZiAocHJlZGljYXRlKG5vZGUpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVwbGFjZW1lbnQgPSBwcm9jZXNzTm9kZShub2RlKTtcbiAgICAgICAgICAgICAgICBpZiAocmVwbGFjZW1lbnQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBub2Rlcy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBub2Rlc1tpXSA9IHJlcGxhY2VtZW50O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWRvbnRVcGRhdGVMYXN0SW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZXMuY2xhaW1faW5mby5sYXN0X2luZGV4ID0gaTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gT3RoZXJ3aXNlLCB3ZSB0cnkgdG8gZmluZCBvbmUgYmVmb3JlXG4gICAgICAgIC8vIFdlIGl0ZXJhdGUgaW4gcmV2ZXJzZSBzbyB0aGF0IHdlIGRvbid0IGdvIHRvbyBmYXIgYmFja1xuICAgICAgICBmb3IgKGxldCBpID0gbm9kZXMuY2xhaW1faW5mby5sYXN0X2luZGV4IC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgIGNvbnN0IG5vZGUgPSBub2Rlc1tpXTtcbiAgICAgICAgICAgIGlmIChwcmVkaWNhdGUobm9kZSkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXBsYWNlbWVudCA9IHByb2Nlc3NOb2RlKG5vZGUpO1xuICAgICAgICAgICAgICAgIGlmIChyZXBsYWNlbWVudCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGVzLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGVzW2ldID0gcmVwbGFjZW1lbnQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghZG9udFVwZGF0ZUxhc3RJbmRleCkge1xuICAgICAgICAgICAgICAgICAgICBub2Rlcy5jbGFpbV9pbmZvLmxhc3RfaW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChyZXBsYWNlbWVudCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFNpbmNlIHdlIHNwbGljZWQgYmVmb3JlIHRoZSBsYXN0X2luZGV4LCB3ZSBkZWNyZWFzZSBpdFxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5jbGFpbV9pbmZvLmxhc3RfaW5kZXgtLTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gSWYgd2UgY2FuJ3QgZmluZCBhbnkgbWF0Y2hpbmcgbm9kZSwgd2UgY3JlYXRlIGEgbmV3IG9uZVxuICAgICAgICByZXR1cm4gY3JlYXRlTm9kZSgpO1xuICAgIH0pKCk7XG4gICAgcmVzdWx0Tm9kZS5jbGFpbV9vcmRlciA9IG5vZGVzLmNsYWltX2luZm8udG90YWxfY2xhaW1lZDtcbiAgICBub2Rlcy5jbGFpbV9pbmZvLnRvdGFsX2NsYWltZWQgKz0gMTtcbiAgICByZXR1cm4gcmVzdWx0Tm9kZTtcbn1cbmZ1bmN0aW9uIGNsYWltX2VsZW1lbnRfYmFzZShub2RlcywgbmFtZSwgYXR0cmlidXRlc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XN1bHQucHVzaChub2RlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChzdGFydGVkID4gMCkge1xuICAgICAgICAgICAgcmVzdWx0LnB1c2gobm9kZSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJlc3VsdDtcbn1cbmNsYXNzIEh0bWxUYWcge1xuICAgIGNvbnN0cnVjdG9yKGlzX3N2ZyA9IGZhbHNlKSB7XG4gICAgICAgIHRoaXMuaXNfc3ZnID0gZmFsc2U7XG4gICAgICAgIHRoaXMuaXNfc3ZnID0gaXNfc3ZnO1xuICAgICAgICB0aGlzLmUgPSB0aGlzLm4gPSBudWxsO1xuICAgIH1cbiAgICBjKGh0bWwpIHtcbiAgICAgICAgdGhpcy5oKGh0bWwpO1xuICAgIH1cbiAgICBtKGh0bWwsIHRhcmdldCwgYW5jaG9yID0gbnVsbCkge1xuICAgICAgICBpZiAoIXRoaXMuZSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuaXNfc3ZnKVxuICAgICAgICAgICAgICAgIHRoaXMuZSA9IHN2Z19lbGVtZW50KHRhcmdldC5ub2RlTmFtZSk7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgdGhpcy5lID0gZWxlbWVudCh0YXJnZXQubm9kZU5hbWUpO1xuICAgICAgICAgICAgdGhpcy50ID0gdGFyZ2V0O1xuICAgICAgICAgICAgdGhpcy5jKGh0bWwpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuaShhbmNob3IpO1xuICAgIH1cbiAgICBoKGh0bWwpIHtcbiAgICAgICAgdGhpcy5lLmlubmVySFRNTCA9IGh0bWw7XG4gICAgICAgIHRoaXMubiA9IEFycmF5LmZyb20odGhpcy5lLmNoaWxkTm9kZXMpO1xuICAgIH1cbiAgICBpKGFuY2hvcikge1xuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMubi5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAg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G4gICAgY29uc3Qgc2F2ZWRfY29tcG9uZW50ID0gY3VycmVudF9jb21wb25lbnQ7XG4gICAgZG8ge1xuICAgICAgICAvLyBmaXJzdCwgY2FsbCBiZWZvcmVVcGRhdGUgZnVuY3Rpb25zXG4gICAgICAgIC8vIGFuZCB1cGRhdGUgY29tcG9uZW50c1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgd2hpbGUgKGZsdXNoaWR4IDwgZGlydHlfY29tcG9uZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkaXJ0eV9jb21wb25lbnRzW2ZsdXNoaWR4XTtcbiAgICAgICAgICAgICAgICBmbHVzaGlkeCsrO1xuICAgICAgICAgICAgICAgIHNldF9jdXJyZW50X2NvbXBvbmVudChjb21wb25lbnQpO1xuICAgICAgICAgICAgICAgIHVwZGF0ZShjb21wb25lbnQuJCQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAvLyByZXNldCBkaXJ0eSBzdGF0ZSB0byBub3QgZW5kIHVwIGluIGEgZGVhZGxvY2tlZCBzdGF0ZSBhbmQgdGhlbiByZXRocm93XG4gICAgICAgICAgICBkaXJ0eV9jb21wb25lbnRzLmxlbmd0aCA9IDA7XG4gICAgICAgICAgICBmbHVzaGlkeCA9IDA7XG4gICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9XG4gICAgICAgIHNldF9jdXJyZW50X2NvbXBvbmVudChudWxsKTtcbiAgICAgICAgZGlydHlfY29tcG9uZW50cy5sZW5ndGggPSAwO1xuICAgICAgICBmbHVzaGlkeCA9IDA7XG4gICAgICAgIHdoaWxlIChiaW5kaW5nX2NhbGxiYWNrcy5sZW5ndGgpXG4gICAgICAgICAgICBiaW5kaW5nX2NhbGxiYWNrcy5wb3AoKSgpO1xuICAgICAgICAvLyB0aGVuLCBvbmNlIGNvbXBvbmVudHMgYXJlIHVwZGF0Z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YmxvY2spO1xuICAgICAgICBibG9jay5pKGxvY2FsKTtcbiAgICB9XG59XG5mdW5jdGlvbiB0cmFuc2l0aW9uX291dChibG9jaywgbG9jYWwsIGRldGFjaCwgY2FsbGJhY2spIHtcbiAgICBpZiAoYmxvY2sgJiYgYmxvY2subykge1xuICAgICAgICBpZiAob3V0cm9pbmcuaGFzKGJsb2NrKSlcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgb3V0cm9pbmcuYWRkKGJsb2NrKTtcbiAgICAgICAgb3V0cm9zLmMucHVzaCgoKSA9PiB7XG4gICAgICAgICAgICBvdXRyb2luZy5kZWxldGUoYmxvY2spO1xuICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGRldGFjaClcbiAgICAgICAgICAgICAgICAgICAgYmxvY2suZCgxKTtcbiAgICAgICAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgYmxvY2subyhsb2NhbCk7XG4gICAgfVxuICAgIGVsc2UgaWYgKGNhbGxiYWNrKSB7XG4gICAgICAgIGNhbGxiYWNrKCk7XG4gICAgfVxufVxuY29uc3QgbnVsbF90cmFuc2l0aW9uID0geyBkdXJhdGlvbjogMCB9O1xuZnVuY3Rpb24gY3JlYXRlX2luX3RyYW5zaXRpb24obm9kZSwgZm4sIHBhcmFtcykge1xuICAgIGNvbnN0IG9wdGlvbnMgPSB7IGRpcmVjdGlvbjogJ2luJyB9O1xuICAgIGxldCBjb25maWcgPSBmbihub2RlLCBwYXJhbXMsIG9wdGlvbnMpO1xuICAgIGxldCBydW5uaW5nID0gZmFsc2U7XG4gICAgbGV0IGFuaW1hdGlvbl9uYW1lO1xuICAgIGxldCB0YXNrO1xuICAgIGxldCB1aWQgPSAwO1xuICAgIGZ1bmN0aW9uIGNsZWFudXAoKSB7XG4gICAgICAgIGlmIChhbmltYXRpb25fbmFtZSlcbiAgICAgICAgICAgIGRlbGV0ZV9ydWxlKG5vZGUsIGFuaW1hdGlvbl9uYW1lKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ28oKSB7XG4gICAgICAgIGNvbnN0IHsgZGVsYXkgPSAwLCBkdXJhdGlvbiA9IDMwMCwgZWFzaW5nID0gaWRlbnRpdHksIHRpY2sgPSBub29wLCBjc3MgfSA9IGNvbmZpZyB8fCBudWxsX3RyYW5zaXRpb247XG4gICAgICAgIGlmIChjc3MpXG4gICAgICAgICAgICBhbmltYXRpb25fbmFtZSA9IGNyZWF0ZV9ydWxlKG5vZGUsIDAsIDEsIGR1cmF0aW9uLCBkZWxheSwgZWFzaW5nLCBjc3MsIHVpZCsrKTtcbiAgICAgICAgdGljaygwLCAxKTtcbiAgICAgICAgY29uc3Qgc3RhcnRfdGltZSA9IG5vdygpICsgZGVsYXk7XG4gICAgICAgIGNvbnN0IGVuZF90aW1lID0gc3RhcnRfdGltZSArIGR1cmF0aW9uO1xuICAgICAgICBpZiAodGFzaylcbiAgICAgICAgICAgIHRhc2suYWJvcnQoKTtcbiAgICAgICAgcnVubmluZyA9IHRydWU7XG4gICAgICAgIGFkZF9yZW5kZXJfY2FsbGJhY2soKCkgPT4gZGlzcGF0Y2gobm9kZSwgdHJ1ZSwgJ3N0YXJ0JykpO1xuICAgICAgICB0YXNrID0gbG9vcChub3cgPT4ge1xuICAgICAgICAgICAgaWYgKHJ1bm5pbmcpIHtcbiAgICAgICAgICAgICAgICBpZiAobm93ID49IGVuZF90aW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIHRpY2soMSwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKG5vZGUsIHRydWUsICdlbmQnKTtcbiAgICAgICAgICAgICAgICAgICAgY2xlYW51cCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcnVubmluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobm93ID49IHN0YXJ0X3RpbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdCA9IGVhc2luZygobm93IC0gc3RhcnRfdGltZSkgLyBkdXJhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIHRpY2sodCwgMSAtIHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBydW5uaW5nO1xuICAgICAgICB9KTtcbiAgICB9XG4gICAgbGV0IHN0YXJ0ZWQgPSBmYWxzZTtcbiAgICByZXR1cm4ge1xuICAgICAgICBzdGFydCgpIHtcbiAgICAgICAgICAgIGlmIChzdGFydGVkKVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIHN0YXJ0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgZGVsZXRlX3J1bGUobm9kZSk7XG4gICAgICAgICAgICBpZiAoaXNfZnVuY3Rpb24oY29uZmlnKSkge1xuICAgICAgICAgICAgICAgIGNvbmZpZyA9IGNvbmZpZyhvcHRpb25zKTtcbiAgICAgICAgICAgICAgICB3YWl0KCkudGhlbihnbyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBnbygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpbnZhbGlkYXRlKCkge1xuICAgICAgICAgICAgc3RhcnRlZCA9IGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICBlbmQoKSB7XG4gICAgICAgICAgICBpZiAocnVubmluZykge1xuICAgICAgICAgICAgICAgIGNsZWFudXAoKTtcbiAgICAgICAgICAgICAgICBydW5uaW5nID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufVxuZnVuY3Rpb24gY3JlYXRlX291dF90cmFuc2l0aW9uKG5vZGUsIGZuLCBwYXJhbXMpIHtcbiAgICBjb25zdCBvcHRpb25zID0geyBkaXJlY3Rpb246ICdvdXQnIH07XG4gICAgbGV0IGNvbmZpZyA9IGZuKG5vZGUsIHBhcmFtcywgb3B0aW9ucyk7XG4gICAgbGV0IHJ1bm5pbmcgPSB0cnVlO1xuICAgIGxldCBhbmltYXRpb25fbmFtZTtcbiAgICBjb25zdCBncm91cCA9IG91dHJvcztcbiAgICBncm91cC5yICs9IDE7XG4gICAgZnVuY3Rpb24gZ28oKSB7XG4gICAgICAgIGNvbnN0IHsgZGVsYXkgPSAwLCBkdXJhdGlvbiA9IDMwMCwgZWFzaW5nID0gaWRlbnRpdHksIHRpY2sgPSBub29wLCBjc3MgfSA9IGNvbmZpZyB8fCBudWxsX3RyYW5zaXRpb247XG4gICAgICAgIGlmIChjc3MpXG4gICAgICAgICAgICBhbmltYXRpb25fbmFtZSA9IGNyZWF0ZV9ydWxlKG5vZGUsIDEsIDAsIGR1cmF0aW9uLCBkZWxheSwgZWFzaW5nLCBjc3MpO1xuICAgICAgICBjb25zdCBzdGFydF90aW1lID0gbm93KCkgKyBkZWxheTtcbiAgICAgICAgY29uc3QgZW5kX3RpbWUgPSBzdGFydF90aW1lICsgZHVyYXRpb247XG4gICAgICAgIGFkZF9yZW5kZXJfY2FsbGJhY2soKCkgPT4gZGlzcGF0Y2gobm9kZSwgZmFsc2UsICdzdGFydCcpKTtcbiAgICAgICAgbG9vcChub3cgPT4ge1xuICAgICAgICAgICAgaWYgKHJ1bm5pbmcpIHtcbiAgICAgICAgICAgICAgICBpZiAobm93ID49IGVuZF90aW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIHRpY2soMCwgMSk7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKG5vZGUsIGZhbHNlLCAnZW5kJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghLS1ncm91cC5yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIHdpbGwgcmVzdWx0IGluIGBlbmQoKWAgYmVpbmcgY2FsbGVkLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc28gd2UgZG9uJ3QgbmVlZCB0byBjbGVhbiB1cCBoZXJlXG4gICAgICAgICAgICAgICAgICAgICAgICBydW5fYWxsKGdyb3VwLmMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG5vdyA+PSBzdGFydF90aW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSBlYXNpbmcoKG5vdyAtIHN0YXJ0X3RpbWUpIC8gZHVyYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICB0aWNrKDEgLSB0LCB0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcnVubmluZztcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGlmIChpc19mdW5jdGlvbihjb25maWcpKSB7XG4gICAgICAgIHdhaXQoKS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgIGNvbmZpZyA9IGNvbmZpZyhvcHRpb25zKTtcbiAgICAgICAgICAgIGdvKCk7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBlbHNlIHtcbiAgICAgICAgZ28oKTtcbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgZW5kKHJlc2V0KSB7XG4gICAgICAgICAgICBpZiAocmVzZXQgJiYgY29uZmlnLnRpY2spIHtcbiAgICAgICAgICAgICAgICBjb25maWcudGljaygxLCAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChydW5uaW5nKSB7XG4gICAgICAgICAgICAgICAgaWYgKGFuaW1hdGlvbl9uYW1lKVxuICAgICAgICAgICAgICAgICAgICBkZWxldGVfcnVsZShub2RlLCBhbmltYXRpb25fbmFtZSk7XG4gICAgICAgICAgICAgICAgcnVubmluZyA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbn1c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gPSBub29wLCBjc3MgfSA9IGNvbmZpZyB8fCBudWxsX3RyYW5zaXRpb247XG4gICAgICAgIGNvbnN0IHByb2dyYW0gPSB7XG4gICAgICAgICAgICBzdGFydDogbm93KCkgKyBkZWxheSxcbiAgICAgICAgICAgIGJcbiAgICAgICAgfTtcbiAgICAgICAgaWYgKCFiKSB7XG4gICAgICAgICAgICAvLyBAdHMtaWdub3JlIHRvZG86IGltcHJvdmUgdHlwaW5nc1xuICAgICAgICAgICAgcHJvZ3JhbS5ncm91cCA9IG91dHJvcztcbiAgICAgICAgICAgIG91dHJvcy5yICs9IDE7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHJ1bm5pbmdfcHJvZ3JhbSB8fCBwZW5kaW5nX3Byb2dyYW0pIHtcbiAgICAgICAgICAgIHBlbmRpbmdfcHJvZ3JhbSA9IHByb2dyYW07XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAvLyBpZiB0aGlzIGlzIGFuIGludHJvLCBhbmQgdGhlcmUncyBhIGRlbGF5LCB3ZSBuZWVkIHRvIGRvXG4gICAgICAgICAgICAvLyBhbiBpbml0aWFsIHRpY2sgYW5kL29yIGFwcGx5IENTUyBhbmltYXRpb24gaW1tZWRpYXRlbHlcbiAgICAgICAgICAgIGlmIChjc3MpIHtcbiAgICAgICAgICAgICAgICBjbGVhcl9hbmltYXRpb24oKTtcbiAgICAgICAgICAgICAgICBhbmltYXRpb25fbmFtZSA9IGNyZWF0ZV9ydWxlKG5vZGUsIHQsIGIsIGR1cmF0aW9uLCBkZWxheSwgZWFzaW5nLCBjc3MpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGIpXG4gICAgICAgICAgICAgICAgdGljaygwLCAxKTtcbiAgICAgICAgICAgIHJ1bm5pbmdfcHJvZ3JhbSA9IGluaXQocHJvZ3JhbSwgZHVyYXRpb24pO1xuICAgICAgICAgICAgYWRkX3JlbmRlcl9jYWxsYmFjaygoKSA9PiBkaXNwYXRjaChub2RlLCBiLCAnc3RhcnQnKSk7XG4gICAgICAgICAgICBsb29wKG5vdyA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKHBlbmRpbmdfcHJvZ3JhbSAmJiBub3cgPiBwZW5kaW5nX3Byb2dyYW0uc3RhcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgcnVubmluZ19wcm9ncmFtID0gaW5pdChwZW5kaW5nX3Byb2dyYW0sIGR1cmF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgcGVuZGluZ19wcm9ncmFtID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2gobm9kZSwgcnVubmluZ19wcm9ncmFtLmIsICdzdGFydCcpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY3NzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhcl9hbmltYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbl9uYW1lID0gY3JlYXRlX3J1bGUobm9kZSwgdCwgcnVubmluZ19wcm9ncmFtLmIsIHJ1bm5pbmdfcHJvZ3JhbS5kdXJhdGlvbiwgMCwgZWFzaW5nLCBjb25maWcuY3NzKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocnVubmluZ19wcm9ncmFtKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChub3cgPj0gcnVubmluZ19wcm9ncmFtLmVuZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGljayh0ID0gcnVubmluZ19wcm9ncmFtLmIsIDEgLSB0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKG5vZGUsIHJ1bm5pbmdfcHJvZ3JhbS5iLCAnZW5kJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXBlbmRpbmdfcHJvZ3JhbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlJ3JlIGRvbmVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocnVubmluZ19wcm9ncmFtLmIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW50cm8g4oCUIHdlIGNhbiB0aWR5IHVwIGltbWVkaWF0ZWx5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyX2FuaW1hdGlvbigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gb3V0cm8g4oCUIG5lZWRzIHRvIGJlIGNvb3JkaW5hdGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghLS1ydW5uaW5nX3Byb2dyYW0uZ3JvdXAucilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bl9hbGwocnVubmluZ19wcm9ncmFtLmdyb3VwLmMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bm5pbmdfcHJvZ3JhbSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAobm93ID49IHJ1bm5pbmdfcHJvZ3JhbS5zdGFydCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcCA9IG5vdyAtIHJ1bm5pbmdfcHJvZ3JhbS5zdGFydDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBydW5uaW5nX3Byb2dyYW0uYSArIHJ1bm5pbmdfcHJvZ3JhbS5kICogZWFzaW5nKHAgLyBydW5uaW5nX3Byb2dyYW0uZHVyYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGljayh0LCAxIC0gdCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuICEhKHJ1bm5pbmdfcHJvZ3JhbSB8fCBwZW5kaW5nX3Byb2dyYW0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgcnVuKGIpIHtcbiAgICAgICAgICAgIGlmIChpc19mdW5jdGlvbihjb25maWcpKSB7XG4gICAgICAgICAgICAgICAgd2FpdCgpLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGNvbmZpZyhvcHRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgZ28oYik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBnbyhiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZW5kKCkge1xuICAgICAgICAgICAgY2xlYXJfYW5pbWF0aW9uKCk7XG4gICAgICAgICAgICBydW5uaW5nX3Byb2dyYW0gPSBwZW5kaW5nX3Byb2dyYW0gPSBudWxsO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gaGFuZGxlX3Byb21pc2UocHJvbWlzZSwgaW5mbykge1xuICAgIGNvbnN0IHRva2VuID0gaW5mby50b2tlbiA9IHt9O1xuICAgIGZ1bmN0aW9uIHVwZGF0ZSh0eXBlLCBpbmRleCwga2V5LCB2YWx1ZSkge1xuICAgICAgICBpZiAoaW5mby50b2tlbiAhPT0gdG9rZW4pXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGluZm8ucmVzb2x2ZWQgPSB2YWx1ZTtcbiAgICAgICAgbGV0IGNoaWxkX2N0eCA9IGluZm8uY3R4O1xuICAgICAgICBpZiAoa2V5ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGNoaWxkX2N0eCA9IGNoaWxkX2N0eC5zbGljZSgpO1xuICAgICAgICAgICAgY2hpbGRfY3R4W2tleV0gPSB2YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBibG9jayA9IHR5cGUgJiYgKGluZm8uY3VycmVudCA9IHR5cGUpKGNoaWxkX2N0eCk7XG4gICAgICAgIGxldCBuZWVkc19mbHVzaCA9IGZhbHNlO1xuICAgICAgICBpZiAoaW5mby5ibG9jaykge1xuICAgICAgICAgICAgaWYgKGluZm8uYmxvY2tzKSB7XG4gICAgICAgICAgICAgICAgaW5mby5ibG9ja3MuZm9yRWFjaCgoYmxvY2ssIGkpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT09IGluZGV4ICYmIGJsb2NrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBncm91cF9vdXRyb3MoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb25fb3V0KGJsb2NrLCAxLCAxLCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluZm8uYmxvY2tzW2ldID09PSBibG9jaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvLmJsb2Nrc1tpXSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGVja19vdXRyb3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgaW5mby5ibG9jay5kKDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYmxvY2suYygpO1xuICAgICAgICAgICAgdHJhbnNpdGlvbl9pbihibG9jaywgMSk7XG4gICAgICAgICAgICBibG9jay5tKGluZm8ubW91bnQoKSwgaW5mby5hbmNob3IpO1xuICAgICAgICAgICAgbmVlZHNfZmx1c2ggPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGluZm8uYmxvY2sgPSBibG9jaztcbiAgICAgICAgaWYgKGluZm8uYmxvY2tzKVxuICAgICAgICAgICAgaW5mby5ibG9ja3NbaW5kZXhdID0gYmxvY2s7XG4gICAgICAgIGlmIChuZWVkc19mbHVzaCkge1xuICAgICAgICAgICAgZmx1c2goKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBpZiAoaXNfcHJvbWlzZShwcm9taXNlKSkge1xuICAgICAgICBjb25zdCBjdXJyZW50X2NvbXBvbmVudCA9IGdldF9jdXJyZW50X2NvbXBvbmVudCgpO1xuICAgICAgICBwcm9taXNlLnRoZW4odmFsdWUgPT4ge1xuICAgICAgICAgICAgc2V0X2N1cnJlbnRfY29tcG9uZW50KGN1cnJlbnRfY29tcG9uZW50KTtcbiAgICAgICAgICAgIHVwZGF0ZShpbmZvLnRoZW4sIDEsIGluZm8udmFsdWUsIHZhbHVlKTtcbiAgICAgICAgICAgIHNldF9jdXJyZW50X2NvbXBvbmVudChudWxsKTtcbiAgICAgICAgfSwgZXJyb3IgPT4ge1xuICAgICAgICAgICAgc2V0X2N1cnJlbnRfY29tcG9uZW50KGN1cnJlbnRfY29tcG9uZW50KTtcbiAgICAgICAgICAgIHVwZGF0ZShpbmZvLmNhdGNoLCAyLCBpbmZvLmVycm9yLCBlcnJvcik7XG4gICAgICAgICAgICBzZXRfY3VycmVudF9jb21wb25lbnQobnVsbCk7XG4gICAgICAgICAgICBpZiAoIWluZm8uaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIC8vIGlmIHdlIHByZXZpb3VzbHkgaGFkIGEgdGhlbi9jYXRjaCBibG9jaywgZGVzdHJveSBpdFxuICAgICAgICBpZiAoaW5mby5jdXJyZW50ICE9PSBpbmZvLnBlbmR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Bjb25zdCBjaGlsZF9jdHggPSBnZXRfY29udGV4dChjdHgsIGxpc3QsIGkpO1xuICAgICAgICBjb25zdCBrZXkgPSBnZXRfa2V5KGNoaWxkX2N0eCk7XG4gICAgICAgIGxldCBibG9jayA9IGxvb2t1cC5nZXQoa2V5KTtcbiAgICAgICAgaWYgKCFibG9jaykge1xuICAgICAgICAgICAgYmxvY2sgPSBjcmVhdGVfZWFjaF9ibG9jayhrZXksIGNoaWxkX2N0eCk7XG4gICAgICAgICAgICBibG9jay5jKCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoZHluYW1pYykge1xuICAgICAgICAgICAgYmxvY2sucChjaGlsZF9jdHgsIGRpcnR5KTtcbiAgICAgICAgfVxuICAgICAgICBuZXdfbG9va3VwLnNldChrZXksIG5ld19ibG9ja3NbaV0gPSBibG9jayk7XG4gICAgICAgIGlmIChrZXkgaW4gb2xkX2luZGV4ZXMpXG4gICAgICAgICAgICBkZWx0YXMuc2V0KGtleSwgTWF0aC5hYnMoaSAtIG9sZF9pbmRleGVzW2tleV0pKTtcbiAgICB9XG4gICAgY29uc3Qgd2lsbF9tb3ZlID0gbmV3IFNldCgpO1xuICAgIGNvbnN0IGRpZF9tb3ZlID0gbmV3IFNldCgpO1xuICAgIGZ1bmN0aW9uIGluc2VydChibG9jaykge1xuICAgICAgICB0cmFuc2l0aW9uX2luKGJsb2NrLCAxKTtcbiAgICAgICAgYmxvY2subShub2RlLCBuZXh0KTtcbiAgICAgICAgbG9va3VwLnNldChibG9jay5rZXksIGJsb2NrKTtcbiAgICAgICAgbmV4dCA9IGJsb2NrLmZpcnN0O1xuICAgICAgICBuLS07XG4gICAgfVxuICAgIHdoaWxlIChvICYmIG4pIHtcbiAgICAgICAgY29uc3QgbmV3X2Jsb2NrID0gbmV3X2Jsb2Nrc1tuIC0gMV07XG4gICAgICAgIGNvbnN0IG9sZF9ibG9jayA9IG9sZF9ibG9ja3NbbyAtIDFdO1xuICAgICAgICBjb25zdCBuZXdfa2V5ID0gbmV3X2Jsb2NrLmtleTtcbiAgICAgICAgY29uc3Qgb2xkX2tleSA9IG9sZF9ibG9jay5rZXk7XG4gICAgICAgIGlmIChuZXdfYmxvY2sgPT09IG9sZF9ibG9jaykge1xuICAgICAgICAgICAgLy8gZG8gbm90aGluZ1xuICAgICAgICAgICAgbmV4dCA9IG5ld19ibG9jay5maXJzdDtcbiAgICAgICAgICAgIG8tLTtcbiAgICAgICAgICAgIG4tLTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICghbmV3X2xvb2t1cC5oYXMob2xkX2tleSkpIHtcbiAgICAgICAgICAgIC8vIHJlbW92ZSBvbGQgYmxvY2tcbiAgICAgICAgICAgIGRlc3Ryb3kob2xkX2Jsb2NrLCBsb29rdXApO1xuICAgICAgICAgICAgby0tO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKCFsb29rdXAuaGFzKG5ld19rZXkpIHx8IHdpbGxfbW92ZS5oYXMobmV3X2tleSkpIHtcbiAgICAgICAgICAgIGluc2VydChuZXdfYmxvY2spO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGRpZF9tb3ZlLmhhcyhvbGRfa2V5KSkge1xuICAgICAgICAgICAgby0tO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGRlbHRhcy5nZXQobmV3X2tleSkgPiBkZWx0YXMuZ2V0KG9sZF9rZXkpKSB7XG4gICAgICAgICAgICBkaWRfbW92ZS5hZGQobmV3X2tleSk7XG4gICAgICAgICAgICBpbnNlcnQobmV3X2Jsb2NrKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHdpbGxfbW92ZS5hZGQob2xkX2tleSk7XG4gICAgICAgICAgICBvLS07XG4gICAgICAgIH1cbiAgICB9XG4gICAgd2hpbGUgKG8tLSkge1xuICAgICAgICBjb25zdCBvbGRfYmxvY2sgPSBvbGRfYmxvY2tzW29dO1xuICAgICAgICBpZiAoIW5ld19s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luIG4pKVxuICAgICAgICAgICAgICAgICAgICB0b19udWxsX291dFtrZXldID0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIG4pIHtcbiAgICAgICAgICAgICAgICBpZiAoIWFjY291bnRlZF9mb3Jba2V5XSkge1xuICAgICAgICAgICAgICAgICAgICB1cGRhdGVba2V5XSA9IG5ba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgYWNjb3VudGVkX2ZvcltrZXldID0gMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsZXZlbHNbaV0gPSBuO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gbykge1xuICAgICAgICAgICAgICAgIGFjY291bnRlZF9mb3Jba2V5XSA9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChjb25zdCBrZXkgaW4gdG9fbnVsbF9vdXQpIHtcbiAgICAgICAgaWYgKCEoa2V5IGluIHVwZGF0ZSkpXG4gICAgICAgICAgICB1cGRhdGVba2V5XSA9IHVuZGVmaW5lZDtcbiAgICB9XG4gICAgcmV0dXJuIHVwZGF0ZTtcbn1cbmZ1bmN0aW9uIGdldF9zcHJlYWRfb2JqZWN0KHNwcmVhZF9wcm9wcykge1xuICAgIHJldHVybiB0eXBlb2Ygc3ByZWFkX3Byb3BzID09PSAnb2JqZWN0JyAmJiBzcHJlYWRfcHJvcHMgIT09IG51bGwgPyBzcHJlYWRfcHJvcHMgOiB7fTtcbn1cblxuLy8gc291cmNlOiBodHRwczovL2h0bWwuc3BlYy53aGF0d2cub3JnL211bHRpcGFnZS9pbmRpY2VzLmh0bWxcbmNvbnN0IGJvb2xlYW5fYXR0cmlidXRlcyA9IG5ldyBTZXQoW1xuICAgICdhbGxvd2Z1bGxzY3JlZW4nLFxuICAgICdhbGxvd3BheW1lbnRyZXF1ZXN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BpbGVkIG1vZHVsZXMuIE90aGVyd2lzZSB5b3UgbWF5IG5lZWQgdG8gZml4IGEgPCR7bmFtZX0+LmApO1xuICAgIH1cbiAgICByZXR1cm4gY29tcG9uZW50O1xufVxuZnVuY3Rpb24gZGVidWcoZmlsZSwgbGluZSwgY29sdW1uLCB2YWx1ZXMpIHtcbiAgICBjb25zb2xlLmxvZyhge0BkZWJ1Z30gJHtmaWxlID8gZmlsZSArICcgJyA6ICcnfSgke2xpbmV9OiR7Y29sdW1ufSlgKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgY29uc29sZS5sb2codmFsdWVzKTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb25zb2xlXG4gICAgcmV0dXJuICcnO1xufVxubGV0IG9uX2Rlc3Ryb3k7XG5mdW5jdGlvbiBjcmVhdGVfc3NyX2NvbXBvbmVudChmbikge1xuICAgIGZ1bmN0aW9uICQkcmVuZGVyKHJlc3VsdCwgcHJvcHMsIGJpbmRpbmdzLCBzbG90cywgY29udGV4dCkge1xuICAgICAgICBjb25zdCBwYXJlbnRfY29tcG9uZW50ID0gY3VycmVudF9jb21wb25lbnQ7XG4gICAgICAgIGNvbnN0ICQkID0ge1xuICAgICAgICAgICAgb25fZGVzdHJveSxcbiAgICAgICAgICAgIGNvbnRleHQ6IG5ldyBNYXAoY29udGV4dCB8fCAocGFyZW50X2NvbXBvbmVudCA/IHBhcmVudF9jb21wb25lbnQuJCQuY29udGV4dCA6IFtdKSksXG4gICAgICAgICAgICAvLyB0aGVzZSB3aWxsIGJlIGltbWVkaWF0ZWx5IGRpc2NhcmRlZFxuICAgICAgICAgICAgb25fbW91bnQ6IFtdLFxuICAgICAgICAgICAgYmVmb3JlX3VwZGF0ZTogW10sXG4gICAgICAgICAgICBhZnRlcl91cGRhdGU6IFtdLFxuICAgICAgICAgICAgY2FsbGJhY2tzOiBibGFua19vYmplY3QoKVxuICAgICAgICB9O1xuICAgICAgICBzZXRfY3VycmVudF9jb21wb25lbnQoeyAkJCB9KTtcbiAgICAgICAgY29uc3QgaHRtbCA9IGZuKHJlc3VsdCwgcHJvcHMsIGJpbmRpbmdzLCBzbG90cyk7XG4gICAgICAgIHNldF9jdXJyZW50X2NvbXBvbmVudChwYXJlbnRfY29tcG9uZW50KTtcbiAgICAgICAgcmV0dXJuIGh0bWw7XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIHJlbmRlcjogKHByb3BzID0ge30sIHsgJCRzbG90cyA9IHt9LCBjb250ZXh0ID0gbmV3IE1hcCgpIH0gPSB7fSkgPT4ge1xuICAgICAgICAgICAgb25fZGVzdHJveSA9IFtdO1xuICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0geyB0aXRsZTogJycsIGhlYWQ6ICcnLCBjc3M6IG5ldyBTZXQoKSB9O1xuICAgICAgICAgICAgY29uc3QgaHRtbCA9ICQkcmVuZGVyKHJlc3VsdCwgcHJvcHMsIHt9LCAkJHNsb3RzLCBjb250ZXh0KTtcbiAgICAgICAgICAgIHJ1bl9hbGwob25fZGVzdHJveSk7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGh0bWwsXG4gICAgICAgICAgICAgICAgY3NzOiB7XG4gICAgICAgICAgICAgICAgICAgIGNvZGU6IEFycmF5LmZyb20ocmVzdWx0LmNzcykubWFwKGNzcyA9PiBjc3MuY29kZSkuam9pbignXFxuJyksXG4gICAgICAgICAgICAgICAgICAgIG1hcDogbnVsbCAvLyBUT0RPXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBoZWFkOiByZXN1bHQudGl0bGUgKyByZXN1bHQuaGVhZFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSxcbiAgICAgICAgJCRyZW5kZXJcbiAgICB9O1xufVxuZnVuY3Rpb24gYWRkX2F0dHJpYnV0ZShuYW1lLCB2YWx1ZSwgYm9vbGVhbikge1xuICAgIGlmICh2YWx1ZSA9PSBudWxsIHx8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HQgOiBbXSkpLFxuICAgICAgICAvLyBldmVyeXRoaW5nIGVsc2VcbiAgICAgICAgY2FsbGJhY2tzOiBibGFua19vYmplY3QoKSxcbiAgICAgICAgZGlydHksXG4gICAgICAgIHNraXBfYm91bmQ6IGZhbHNlLFxuICAgICAgICByb290OiBvcHRpb25zLnRhcmdldCB8fCBwYXJlbnRfY29tcG9uZW50LiQkLnJvb3RcbiAgICB9O1xuICAgIGFwcGVuZF9zdHlsZXMgJiYgYXBwZW5kX3N0eWxlcygkJC5yb290KTtcbiAgICBsZXQgcmVhZHkgPSBmYWxzZTtcbiAgICAkJC5jdHggPSBpbnN0YW5jZVxuICAgICAgICA/IGluc3RhbmNlKGNvbXBvbmVudCwgb3B0aW9ucy5wcm9wcyB8fCB7fSwgKGksIHJldCwgLi4ucmVzdCkgPT4ge1xuICAgICAgICAgICAgY29uc3QgdmFsdWUgPSByZXN0Lmxlbmd0aCA/IHJlc3RbMF0gOiByZXQ7XG4gICAgICAgICAgICBpZiAoJCQuY3R4ICYmIG5vdF9lcXVhbCgkJC5jdHhbaV0sICQkLmN0eFtpXSA9IHZhbHVlKSkge1xuICAgICAgICAgICAgICAgIGlmICghJCQuc2tpcF9ib3VuZCAmJiAkJC5ib3VuZFtpXSlcbiAgICAgICAgICAgICAgICAgICAgJCQuYm91bmRbaV0odmFsdWUpO1xuICAgICAgICAgICAgICAgIGlmIChyZWFkeSlcbiAgICAgICAgICAgICAgICAgICAgbWFrZV9kaXJ0eShjb21wb25lbnQsIGkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgfSlcbiAgICAgICAgOiBbXTtcbiAgICAkJC51cGRhdGUoKTtcbiAgICByZWFkeSA9IHRydWU7XG4gICAgcnVuX2FsbCgkJC5iZWZvcmVfdXBkYXRlKTtcbiAgICAvLyBgZmFsc2VgIGFzIGEgc3BlY2lhbCBjYXNlIG9mIG5vIERPTSBjb21wb25lbnRcbiAgICAkJC5mcmF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XMsIDEpO1xuICAgICAgICAgICAgdGhpcy4kZGVzdHJveSA9IG5vb3A7XG4gICAgICAgIH1cbiAgICAgICAgJG9uKHR5cGUsIGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAvLyBUT0RPIHNob3VsZCB0aGlzIGRlbGVnYXRlIHRvIGFkZEV2ZW50TGlzdGVuZXI/XG4gICAgICAgICAgICBpZiAoIWlzX2Z1bmN0aW9uKGNhbGxiYWNrKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBub29wO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgY2FsbGJhY2tzID0gKHRoaXMuJCQuY2FsbGJhY2tzW3R5cGVdIHx8ICh0aGlzLiQkLmNhbGxiYWNrc1t0eXBlXSA9IFtdKSk7XG4gICAgICAgICAgICBjYWxsYmFja3MucHVzaChjYWxsYmFjayk7XG4gICAgICAgICAgICByZXR1cm4gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gY2FsbGJhY2tzLmluZGV4T2YoY2FsbGJhY2spO1xuICAgICAgICAgICAgICAgIGlmIChpbmRleCAhPT0gLTEpXG4gICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrcy5zcGxpY2UoaW5kZXgsIDEpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICAkc2V0KCQkcHJvcHMpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLiQkc2V0ICYmICFpc19lbXB0eSgkJHByb3BzKSkge1xuICAgICAgICAgICAgICAgIHRoaXMuJCQuc2tpcF9ib3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy4kJHNldCgkJHByb3BzKTtcbiAgICAgICAgICAgICAgICB0aGlzLiQkLnNraXBfYm91bmQgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG59XG4vKipcbiAqIEJhc2UgY2xhc3MgZm9yIFN2ZWx0ZSBjb21wb25lbnRzLiBVc2VkIH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bnRJbmRleCA9IDA7XHJcblxyXG4gICAgbGV0IHJlc3VsdDogQ29tbWFuZFtdID0gW107XHJcblxyXG4gICAgY29uc3Qgb25rZXlwcmVzcyA9IChlOiBLZXlib2FyZEV2ZW50KSA9PiB7XHJcbiAgICAgICAgaWYgKGUua2V5Q29kZSA9PT0gMTMpIHtcclxuICAgICAgICAgICAgb25FbnRlcigpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvLyBtb3ZlVXBcclxuICAgICAgICBpZiAoZS5rZXlDb2RlID09PSAzOCkge1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIGlmIChjdXJyZW50SW5kZXggPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjdXJyZW50SW5kZXgtLTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBtb3ZlRG93blxyXG4gICAgICAgIGlmIChlLmtleUNvZGUgPT09IDQwKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGxlbiA9IHJlc3VsdC5sZW5ndGg7XHJcbiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgaWYgKGN1cnJlbnRJbmRleCA+PSBsZW4gLSAxKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY3VycmVudEluZGV4Kys7XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxuXHJcbiAgICBjb25zdCBvbkVudGVyID0gKCkgPT4ge1xyXG4gICAgICAgIGNvbnN0IGNvbSA9IHJlc3VsdFtjdXJyZW50SW5kZXhdO1xyXG4gICAgICAgIERpYWxvZy5kZXN0cm95QWxsKCk7XHJcbiAgICAgICAgY29tLmNhbGxiYWNrKCk7XHJcbiAgICB9O1xyXG5cclxuICAgIGNvbnN0IG9uQ2xpY2sgPSAoaTogbnVtYmVyKSA9PiB7XHJcbiAgICAgICAgY3VycmVudEluZGV4ID0gaTtcclxuICAgICAgICBvbkVudGVyKCk7XHJcbiAgICB9O1xyXG5cclxuICAgIGNvbnN0IGhhc0NvbnRlbnQgPSAodjogc3RyaW5nIHwgdW5kZWZpbmVkLCBjOiBzdHJpbmcpID0+IHYgJiYgdi50b0xvd2VyQ2FzZSgpLmluZGV4T2YoYy50b0xvd2VyQ2FzZSgpKSA+PSAwO1xyXG5cclxuICAgICQ6IHtcclxuICAgICAgICBjdXJyZW50SW5kZXggPSAwO1xyXG4gICAgICAgIGlmICghY29tbWFuZCkge1xyXG4gICAgICAgICAgICByZXN1bHQgPSBjb21tYW5kcztcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICByZXN1bHQgPSBjb21tYW5kcy5maWx0ZXIoKGMpID0+IHtcclxuICAgICAgICAgICAgICAgIHJldHVybiAoXHJcbiAgICAgICAgICAgICAgICAgICAgaGFzQ29udGVudChjLnBsdWdpbiwgY29tbWFuZCkgfHxcclxuICAgICAgICAgICAgICAgICAgICBoYXNDb250ZW50KGMucGx1Z2luTmFtZSwgY29tbWFuZCkgfHxcclxuICAgICAgICAgICAgICAgICAgICBoYXNDb250ZW50KGMuY29tbWFuZCwgY29tbWFuZCkgfHxcclxuICAgICAgICAgICAgICAgICAgICBoYXNDb250ZW50KGMuZGVzY3JpcHRpb24sIGNvbW1hbmQpXHJcbiAgICAgICAgICAgICAgICApO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgb25Nb3VudCgoKSA9PiB7XHJcbiAgICAgICAgY29tbWFuZHMgPSBjb21tYW5kTWFuYWdlci5nZXRDb21tYW5kcygpO1xyXG4gICAgICAgIGNvbnN0IGVsID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2NvbW1hbmRQYW5lbElucH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gICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJiMy1sYWJlbF9fdGV4dFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3BsdWdpbi5kZXNjcmlwdGlvbiB8fCBfKCdub2Rlc2NyaXB0aW9uJyl9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiZm5fX3NwYWNlXCIgLz5cclxuICAgICAgICAgICAgICAgICAgICA8aW5wdXRcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJiMy1zd2l0Y2ggZm5fX2ZsZXgtY2VudGVyXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ9XCJmdWxsV2lkdGhcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlPVwiY2hlY2tib3hcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICBiaW5kOmNoZWNrZWQ9e3BsdWdpbi5lbmFibGVkfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvbjpjaGFuZ2U9e29uUGx1Z2luRW5hYmxlZENoYW5nZShwbHVnaW4ua2V5KX1cclxuICAgICAgICAgICAgICAgICAgICAvPlxyXG4gICAgICAgICAgICAgICAgPC9sYWJlbD5cclxuICAgICAgICAgICAgey9pZn1cclxuICAgICAgICB7L2VhY2h9XHJcbiAgICA8L2Rpdj5cclxuPC9sYWJlbD5cclxuXHJcbjxzdHlsZT5cclxuICAgIC5wbHVnaW4gc3Bhbi5yZW1vdmUge1xyXG4gICAgICAgIGRpc3BsYXk6IG5vbmU7XHJcbiAgICAgICAgY29sb3I6IHZhcigtLWIzLXRoZW1lLWVycm9yKTtcclxuICAgICAgICBtYXJnaW4tbGVmdDogNHB4O1xyXG4gICAgfVxyXG4gICAgLnBsdWdpbjpob3ZlciBzcGFuLnJlbW92ZSB7XHJcbiAgICAgICAgZGl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lcnNpb24pO1xyXG4gICAgICAgICAgICAvLyAgICAgaWYgKHBWLmNvbXBhcmUob2xkUGx1Z2luVikgPT09IDEpIHtcclxuICAgICAgICAgICAgLy8gICAgICAgICBwLm5lZWRVcGdyYWRlID0gdHJ1ZTtcclxuICAgICAgICAgICAgLy8gICAgIH1cclxuICAgICAgICAgICAgLy8gfVxyXG4gICAgICAgICAgICBzdG9yZVBsdWdpbnMucHVzaChwKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5wbHVnaW5TdGF0dXMgPSBzdG9yZVBsdWdpbnM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFN0b3JlVXJsKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnN0b3JhZ2VNYW5hZ2VyLmdldChQTFVHSU5fU1RPUkVfVVJMKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0UGx1Z2lucygpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5wbHVnaW5zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBsb2FkUGx1Z2lucygpIHtcclxuICAgICAgICBhd2FpdCB0aGlzLmluaXQoKTtcclxuICAgICAgICByZXR1cm4gdGhpcy5nZXRQbHVnaW5zV2l0aFN0YXR1cygpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRQbHVnaW5zV2l0aFN0YXR1cygpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5wbHVnaW5TdGF0dXM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIGxvYWRQbHVnaW5zRnJvbVVybCgpIHtcclxuICAgICAgICBjb25zdCBzdG9yZVVybCA9IHRoaXMuZ2V0U3RvcmVVcmwoKTtcclxuICAgICAgICBpZiAoIXN0b3JlVXJsKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IHJlczogQXhpb3NSZXNwb25zZTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICByZXMgPSBhd2FpdCByZXF1ZXN0LmdldChzdG9yZVVybCArICcvcGx1Z2lucy5qc29uJywge1xyXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xyXG4gICAgICAgICAgICAgICAgICAgICdDYWNoZS1Db250cm9sJzogJ25vLWNhY2hlJyxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgY29uc29sZS5lcnJvcihlKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICBjb25zdCByZXEgPSBbXTtcclxuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShyZXMuZGF0YT8ucGx1Z2lucykpIHtcclxuICAgICAgICAgICAgZm9yIChjb25zdCBwbHVnaW5LZXkgb2YgcmVzLmRhdGE/LnBsdWdpbnMgfHwge30pIHtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHBsdWdpbiA9IHRoaXMuZ2V0UGx1Z2luTWFuaWZlc3QoYCR7c3RvcmVVcmx9LyR7cGx1Z2luS2V5fWApO1xyXG4gICAgICAgICAgICAgICAgcmVxLnB1c2gocGx1Z2luKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLnBsdWdpbnMgPSBhd2FpdCBQcm9taXNlLmFsbChyZXEpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBnZXRQbHVnaW5CeVVybCh1cmw6IHN0cmluZykge1xyXG4gICAgICAgIHJldHVybiBQcm9taXNlLmFsbChbdGhpcy5nZXRQbHVnaW5NYW5pZmVzdCh1cmwpLCB0aGlzLmdldFBsdWdpbk1haW5Kcyh1cmwpXSkudGhlbigodmFsdWUpID0+IHtcclxuICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgIG1hbmlmZXN0OiB2YWx1ZVswXSxcclxuICAgICAgICAgICAgICAgIG1haW5KczogdmFsdWVbMV0sXHJcbiAgICAgICAgICAgIH07XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIGdldFBsdWdpbk1hbmlmZXN0KHVybDogc3RyaW5nKSB7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgY29uc3QgbWFuaWZlc3QgPSBhd2FpdCByZXF1ZXN0LmdldChgJHt1cmx9L21hbmlmZXN0Lmpzb25gLCB7XHJcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJyxcclxuICAgICAgICAgICAgICAgICAgICAnQ2FjaGUtQ29udHJvbCc6ICduby1jYWNoZScsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgcmV0dXJuIG1hbmlmZXN0LmRhdGE7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKGUpO1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIGdldFBsdWdpbk1haW5Kcyh1cmw6IHN0cmluZykge1xyXG4gICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IHJlcXVlc3QuZ2V0KGAke3VybH0vbWFpbi5qc2AsIHtcclxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcclxuICAgICAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ3RleHQvcGxhaW4nLFxyXG4gICAgICAgICAgICAgICAgICAgICdDYWNoZS1Db250cm9sJzogJ25vLWNhY2hlJyxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICByZXR1cm4gcmVzLmRhdGE7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKGUpO1xyXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIGdldFBsdWdpblJlYWRtZShrZXk6IHN0cmluZykge1xyXG4gICAgICAgIGNvbnN0IHVybCA9IGAke3RoaXMuZ2V0U3RvcmVVcmwoKX0vJHtrZXl9YDtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCByZXF1ZXN0LmdldChgJHt1cmx9L1JFQURNRS5tZGAsIHtcclxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcclxuICAgICAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ3RleHQvcGxhaW4nLFxyXG4gICAgICAgICAgICAgICAgICAgICdDYWNoZS1Db250cm9sJzogJ25vLWNhY2hlJyxcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICByZXR1cm4gcmVzLmRhdGEgYXMgc3RyaW5nO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgY29uc29sZS5lcnJvcihlKTtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBkb3dubG9hZFBsdWdpbihrZXk6IHN0cmluZykge1xyXG4gICAgICAgIGF3YWl0IHNsZWVwKDUwMCk7XHJcbiAgICAgICAgY29uc3QgZmlsZXMgPSBhd2FpdCB0aGlzLmdldFBsdWdpbkJ5VXJsKGAke3RoaXMuZ2V0U3RvcmVVcmwoKX0vJHtrZXl9YCk7XHJcbiAgICAgICAgY29uc3QgbWFuaWZlc3RKc29uID0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BTZXR0aW5nUHJldmlldyBmcm9tICcuL3NldHRpbmctcHJldmlldy5zdmVsdGUnO1xyXG5cclxuICAgIGNvbnN0IHN0b3JlID0gY29udGFpbmVyLmdldDxTdG9yZT4oVFlQRVMuU3RvcmUpO1xyXG4gICAgbGV0IHBsdWdpbnM6IFN0b3JlUGx1Z2luU3RhdHVzW10gPSBbXTtcclxuICAgIGxldCBsb2FkaW5nID0gdHJ1ZTtcclxuXHJcbiAgICBjb25zdCBsb2FkaW5nTWFwID0ge307XHJcblxyXG4gICAgb25Nb3VudChhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgcGx1Z2lucyA9IGF3YWl0IHN0b3JlLmxvYWRQbHVnaW5zKCk7XHJcbiAgICAgICAgbG9hZGluZyA9IGZhbHNlO1xyXG4gICAgfSk7XHJcblxyXG4gICAgY29uc3QgZG93bmxvYWRQbHVnaW4gPSBhc3luYyAoa2V5OiBzdHJpbmcpID0+IHtcclxuICAgICAgICBpZiAobG9hZGluZ01hcFtrZXldKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgbG9hZGluZ01hcFtrZXldID0gdHJ1ZTtcclxuICAgICAgICAgICAgYXdhaXQgc3RvcmUuZG93bmxvYWRQbHVnaW4oa2V5KTtcclxuICAgICAgICAgICAgY29uc3QgcCA9IHBsdWdpbnMuZmluZCgoaykgPT4gay5rZXkgPT09IGtleSk7XHJcbiAgICAgICAgICAgIGlmIChwKSB7XHJcbiAgICAgICAgICAgICAgICBwLmlzRXhpc3QgPSB0cnVlO1xyXG4gICAgICAgICAgICAgICAgcC5uZWVkVXBncmFkZSA9IGZhbHNlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSBmaW5hbGx5IHtcclxuICAgICAgICAgICAgbG9hZGluZ01hcFtrZXldID0gZmFsc2U7XHJcbiAgICAgICAgfVxyXG4gICAgfTtcclxuXHJcbiAgICBsZXQgc2Vs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xhIGhyZWY9XCJqYXZhc2NyaXB0OnZvaWQoMClcIiBjbGFzcz1cIlwiIG9uOmNsaWNrPXsoZXZlbnQpID0+IHByZXZpZXdQbHVnaW4oZXZlbnQsIHBsdWdpbil9PntwbHVnaW4ubmFtZX08L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHtwbHVnaW4udmVyc2lvbn1cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImIzLWxhYmVsX190ZXh0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7cGx1Z2luLmRlc2NyaXB0aW9uIHx8ICcnfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImZuX19zcGFjZVwiIC8+XHJcbiAgICAgICAgICAgICAgICAgICAgeyNpZiBsb2FkaW5nTWFwW3BsdWdpbi5rZXldfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8QnV0dG9uIGRpc2FibGVkPXt0cnVlfT57XygnZG93bmxvYWRpbmcnKX08L0J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICB7OmVsc2UgaWYgcGx1Z2luLmlzRXhpc3R9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHsjaWYgcGx1Z2luLm5lZWRVcGdyYWRlfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPEJ1dHRvbiBvbkNsaWNrPXsoKSA9PiBkb3dubG9hZFBsdWdpbihwbHVnaW4ua2V5KX0+e18oJ3VwZ3JhZGUnKX08L0J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgezplbHNlfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPEJ1dHRvbiBkaXNhYmxlZD17dHJ1ZX0+e18oJ2Rvd25sb2FkZWQnKX08L0J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICAg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GZyb20gJy4vc2V0dGluZy1jdXN0b20uc3ZlbHRlJztcclxuXHJcbiAgICB0eXBlIE1lbnUgPSB7IGtleTogc3RyaW5nOyBuYW1lOiBzdHJpbmc7IHR5cGU6ICdpbnRlcm5hbCcgfCAnY3VzdG9tJzsgY29tcG9uZW50PzogYW55OyByZW5kZXI/OiBTZXR0aW5nUmVuZGVyOyB9O1xyXG5cclxuICAgIGNvbnN0IG1lbnVzOiBNZW51W10gPSBbXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBrZXk6ICdjb21tb24nLFxyXG4gICAgICAgICAgICBuYW1lOiBfKCdtZW51X2NvbW1vbicpLFxyXG4gICAgICAgICAgICB0eXBlOiAnaW50ZXJuYWwnLFxyXG4gICAgICAgICAgICBjb21wb25lbnQ6IFNldHRpbmdDb21tb24sXHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIGtleTogJ2xpc3QnLFxyXG4gICAgICAgICAgICBuYW1lOiBfKCdtZW51X2xpc3QnKSxcclxuICAgICAgICAgICAgdHlwZTogJ2ludGVybmFsJyxcclxuICAgICAgICAgICAgY29tcG9uZW50OiBTZXR0aW5nTGlzdCxcclxuICAgICAgICB9LFxyXG4gICAgICAgIHtcclxuICAgICAgICAgICAga2V5OiAnc3RvcmUnLFxyXG4gICAgICAgICAgICBuYW1lOiBfKCdtZW51X3N0b3JlJyksXHJcbiAgICAgICAgICAgIHR5cGU6ICdpbnRlcm5hbCcsXHJcbiAgICAgICAgICAgIGNvbXBvbmVudDogU2V0dGluZ1N0b3JlLFxyXG4gICAgICAgIH0sXHJcbiAgICBdO1xyXG5cclxuICAgIGNvbnN0IHNtID0gY29udGFpbmVyLmdldDxJU2V0dGluZ01hbmFnZXI+KFRZUEVTLlNldHRpbmdNYW5hZ2VyKTtcclxuICAgIGNvbnN0IHNtMSA9IGNvbnRhaW5lci5nZXQ8SVN0b3JhZ2VNYW5hZ2VyPihUWVBFUy5TdG9yYWdlTWFuYWdlcik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MSBmbl9fZmxleCBjb25maWdfX3BhbmVsXCI+XHJcbiAgICAgICAgPHVsIGNsYXNzPVwiYjMtdGFiLWJhciBiMy1saXN0IGIzLWxpc3QtLWJhY2tncm91bmRcIiBzdHlsZT1cImhlaWdodDogdW5zZXQgIWltcG9ydGFudDtcIj5cclxuICAgICAgICAgICAgeyNlYWNoIG1lbnVzIGFzIG1lbnV9XHJcbiAgICAgICAgICAgICAgICA8IS0tIHN2ZWx0ZS1pZ25vcmUgYTExeS1jbGljay1ldmVudHMtaGF2ZS1rZXktZXZlbnRzIC0tPlxyXG4gICAgICAgICAgICAgICAgPGxpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS1uYW1lPXttZW51LmtleX1cclxuICAgICAgICAgICAgICAgICAgICBjbGFzcz17Y3VycmVudFNlbGVjdGlvbi5rZXkgPT09IG1lbnUua2V5XHJcbiAgICAgICAgICAgICAgICAgICAgICAgID8gJ2IzLWxpc3QtaXRlbS0tZm9jdXMgYjMtbGlzdC1pdGVtIGIzLWxpc3QtaXRlbS0tYmlnJ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICA6ICdiMy1saXN0LWl0ZW0gYjMtbGlzdC1pdGVtLS1iaWcnfSBcclxuICAgICAgICAgICAgICAgICAgICBvbjpjbGljaz17KCkgPT4gc2V0Q3VycmVudFNlbGVjdGlvbihtZW51KX1cclxuICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImIzLWxpc3QtaXRlbV9fdGV4dFwiPnttZW51Lm5hbWV9PC9zcGFuPlxyXG4gICAgICAgICAgICAgICAgPC9saT5cclxuICAgICAgICAgICAgey9lYWNofVxyXG4gICAgICAgICAgICB7I2lmIHRoaXJkTWVudXMubGVuZ3RoID4gMH1cclxuICAgICAgICAgICAgICAgIDxociBzdHlsZT1cIm1hcmdpbjogMTJweDtcIj5cclxuICAgICAgICAgICAgey9pZn1cclxuICAgICAgICAgICAgeyNlYWNoIHRoaXJkTWVudXMgYXMgbWVudX1cclxuICAgICAgICAgICAgICAgIDwhLS0gc3ZlbHRlLWlnbm9yZSBhMTF5LWNsaWNrLWV2ZW50cy1oYXZlLWtleS1ldmVudHMgLS0+XHJcbiAgICAgICAgICAgICAgICA8bGlcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLW5hbWU9e21lbnUua2V5fVxyXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzPXtjdXJyZW50U2VsZWN0aW9uLmtleSA9PT0gbWVudS5rZXlcclxuICAgICAgICAgICAgICAgICAgICAgICAgPyAnYjMtbGlzdC1pdGVtLS1mb2N1cyBiMy1saXN0LWl0ZW0gYjMtbGlzdC1pdGVtLS1iaWcnXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDogJ2IzLWxpc3QtaXRlbSBiMy1saXN0LWl0ZW0tLWJpZyd9IFxyXG4gICAgICAgICAgICAgICAgICAgIG9uOmNsaWNrPXsoKSA9PiBzZXRDdXJyZW50U2VsZWN0aW9uKG1lbnUpfVxyXG4gICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwiYjMtbGlzdC1pdGVtX190ZXh0XCI+e21lbnUubmFtZX08L3NwYW4+XHJcbiAgICAgICAgICAgICAgICA8L2xpPlxyXG4gICAgICAgICAgICB7L2VhY2h9XHJcbiAgICAgICAgPC91bD5cclxuICAgICAgICA8ZGl2IGNsYXNzPVwiY29uZmlnX190YWItY29udGFpbmVyXCIgc3R5bGU9XCJoZWlnaHQ6IHVuc2V0ICFpbXBvcnRhbnQ7XCIgZGF0YS1uYW1lPXtjdXJyZW50U2VsZWN0aW9uLmtleX0+XHJcbiAgICAgICAgICAgIHsjaWYgY3VycmVudFNlbGVjdGlvbi50eXBlID09PSAnaW50ZXJuYWwnfVxyXG4gICAgICAgICAgICAgICAgPHN2ZWx0ZTpjb21wb25lbnQgdGhpcz17Y3VycmVudFNlbGVjdGlvbi5jb21wb25lbnR9IG9uOnVwZ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k5IDEwNy41NTE5ODRMNTY1Ljc0Mzk5MiAxMDAxLjc3NTg0M0E3NS43NTk5ODggNzUuNzU5OTg4IDAgMCAxIDUxMiAxMDIzLjk5OTg0elwiIGZpbGw9XCJcIiBwLWlkPVwiMjQ3MTZcIj48L3BhdGg+PC9zdmc+JztcclxuICAgIG9ubG9hZCgpIHtcclxuICAgICAgICBjb25zdCBpbnRlcm5hbFNldHRpbmdCdXR0b24gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdidXR0b24nKTtcclxuICAgICAgICBpbnRlcm5hbFNldHRpbmdCdXR0b24uc2V0QXR0cmlidXRlKCdhcmlhLWxhYmVsJywgXygncGx1Z2luX3N5c3RlbScpKTtcclxuICAgICAgICBpbnRlcm5hbFNldHRpbmdCdXR0b24uY2xhc3NMaXN0LmFkZCgndG9vbGJhcl9faXRlbScsICdiMy10b29sdGlwcycsICdiMy10b29sdGlwc19fc3cnKTtcclxuICAgICAgICBpbnRlcm5hbFNldHRpbmdCdXR0b24uaW5zZXJ0QWRqYWNlbnRIVE1MKCdiZWZvcmVlbmQnLCB0aGlzLnN2Zyk7XHJcbiAgICAgICAgaW50ZXJuYWxTZXR0aW5nQnV0dG9uLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywgKGV2ZW50KSA9PiB7XHJcbiAgICAgICAgICAgIG5ldyBNZW51KCdpbnRlcm5hbFNldHRpbmdCdXR0b24nKVxyXG4gICAgICAgICAgICAgICAgLmFkZEl0ZW0oXHJcbiAgICAgICAgICAgICAgICAgICAgbmV3IE1lbnVJdGVtKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ3BsdWdpbl9zeXN0ZW1fc2V0dGluZycpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAnaWNvbkVkaXQnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogKCkgPT4gc2hvd1NldHRpbmdEaWFsb2coKSxcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgLmFkZFNlcGFyYXRvcigpXHJcbiAgICAgICAgICAgICAgICAuYWRkSXRlbShcclxuICAgICAgICAgICAgICAgICAgICBuZXcgTWVudUl0ZW0oe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbDogXygncmVsb2FkJyksXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGljb246ICdpY29uUmVmcmVzaCcsXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiAoKSA9PiB3aW5kb3cubG9jYXRpb24ucmVsb2FkKCksXHJcbiAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgIClcclxuICAgICAgICAgICAgICAgIC5zaG93QXRNb3VzZUV2ZW50KGV2ZW50KTtcclxuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgY2xpZW50QXBpLmFkZFRvb2xiYXJSaWdodChpbnRlcm5hbFNldHRpbmdCdXR0b24pO1xyXG5cclxuICAgICAgICB0aGlzLnJlZ2lzdGVyQ29tbWFuZCh7XHJcbiAgICAgICAgICAgIGNvbW1hbmQ6ICdTaG93IHBsdWdpbiBzeXN0ZW0gY29uaWZnJyxcclxuICAgICAgICAgICAgZGVzY3JpcHRpb246IF8oJ3Nob3dfcGx1Z2luX3N5c3RlbV9jb25maWcnKSxcclxuICAgICAgICAgICAgc2hvcnRjdXQ6ICdjb21tYW5kK29wdGlvbitwJyxcclxuICAgICAgICAgICAgY2FsbGJhY2s6ICgpID0+IHNob3dTZXR0aW5nRGlhbG9nKCksXHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgdGhpcy5yZWdpc3RlckNvbW1hbmQoe1xyXG4gICAgICAgICAgICBjb21tYW5kOiAnUmVsb2FkIFdpbmRvdycsXHJcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBfKCdyZW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RydWN0b3IoQGluamVjdChUWVBFUy5QbHVnaW5GaWxlTWFuYWdlcikgcGx1Z2luRmlsZU1hbmFnZXIpIHtcclxuICAgICAgICB0aGlzLmNvbmZpZyA9IE9iamVjdC5hc3NpZ24oe30sIGRlZmF1bHRDb25maWcpO1xyXG4gICAgICAgIHRoaXMucGx1Z2luRmlsZU1hbmFnZXIgPSBwbHVnaW5GaWxlTWFuYWdlcjtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0KGtleToga2V5b2YgUGx1Z2luQ29uZmlnKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuY29uZmlnW2tleV07XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIHNldChrZXk6IHN0cmluZywgdmFsOiBhbnkpIHtcclxuICAgICAgICB0aGlzLmNvbmZpZ1trZXldID0gdmFsO1xyXG4gICAgICAgIHJldHVybiBzZXRTdG9yYWdlVmFsKGtleSwgdmFsKTtcclxuICAgIH1cclxuXHJcbiAgICBhc3luYyBpbml0U3RvcmFnZSgpIHtcclxuICAgICAgICBjb25zdCBhbGwgPSBhd2FpdCBnZXRMb2NhbFN0b3JhZ2UoKTtcclxuICAgICAgICBjb25zdCBjb25maWdLZXlzID0gT2JqZWN0LmtleXMoZGVmYXVsdENvbmZpZyk7XHJcbiAgICAgICAgZm9yIChjb25zdCBrZXkgb2YgY29uZmlnS2V5cykge1xyXG4gICAgICAgICAgICBpZiAoYWxsW2tleV0gIT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jb25maWdba2V5XSA9IGFsbFtrZXldO1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgc2V0U3RvcmFnZVZhbChrZXksIGRlZmF1bHRDb25maWdba2V5XSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgLy8gbG9hZCBhbGwgcGx1Z2luc1xyXG4gICAgICAgI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IFBsdWdpbkVuYWJsZUNvbmZpZ1tdO1xyXG4gICAgICAgIGZvciAoY29uc3QgZXAgb2YgZW5hYmxlZFBsdWdpbnMpIHtcclxuICAgICAgICAgICAgZm9yIChjb25zdCBwIG9mIHRoaXMuaW50ZXJuYWxQbHVnaW5zKSB7XHJcbiAgICAgICAgICAgICAgICBpZiAocC5rZXkgPT09IGVwLmtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHAuZW5hYmxlZCA9IGVwLmVuYWJsZWQgfHwgZmFsc2U7XHJcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFBsdWdpbnMoKSB7XHJcbiAgICAgICAgcmV0dXJuIFsuLi50aGlzLmludGVybmFsUGx1Z2lucywgLi4udGhpcy50aGlyZFBhcnR5UGx1Z2luc107XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldEludGVybmFsUGx1Z2lucygpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5pbnRlcm5hbFBsdWdpbnM7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGdldFRoaXJkUGFydHlQbHVnaW5zKCkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnRoaXJkUGFydHlQbHVnaW5zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRQbHVnaW5CeUtleShrZXkpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5nZXRQbHVnaW5zKCkuZmluZCgocCkgPT4gcC5rZXkgPT09IGtleSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIHNldFBsdWdpbkVuYWJsZWQoa2V5OiBzdHJpbmcsIGVuYWJsZWQ6IGJvb2xlYW4pIHtcclxuICAgICAgICBmb3IgKGNvbnN0IHAgb2YgWy4uLnRoaXMuaW50ZXJuYWxQbHVnaW5zLCAuLi50aGlzLnRoaXJkUGFydHlQbHVnaW5zXSkge1xyXG4gICAgICAgICAgICBpZiAocC5rZXkgPT09IGtleSkge1xyXG4gICAgICAgICAgICAgICAgcC5lbmFibGVkID0gZW5hYmxlZDtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGF3YWl0IHRoaXMuc2F2ZVBsdWdpbnNFbmFibGVkKCk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGFzeW5jIHNldFNhZmVNb2RlRW5hYmxlZChlbmFibGVkOiBib29sZWFuKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuc2V0KFBMVUdJTl9TWVNURU1fU0FGRV9NT0RFX0VOQUJMRUQsIGVuYWJsZWQpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBzYXZlUGx1Z2luc0VuYWJsZWQoKSB7XHJcbiAgICAgICAgYXdhaXQgdGhpcy5zZXQoXHJcbiAgICAgICAgICAgIFBMVUdJTl9TWVNURU1fUExVR0lOLFxyXG4gICAgICAgICAgICB0aGlzLmludGVybmFsUGx1Z2lucy5tYXAoKHApID0+ICh7IGtleTogcC5rZXksIGVuYWJsZWQ6IHAuZW5hYmxlZCB9KSlcclxuICAgICAgICApO1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNldChcclxuICAgICAgICAgICAgUExVR0lOX1NZU1RFTV9USElSRF9QQVJUWV9QTFVHSU4sXHJcbiAgICAgICAgICAgIHRoaXMudGhpcmRQYXJ0eVBsdWdpbnMubWFwKChwKSA9PiAoeyBrZXk6IHAua2V5LCBlbmFibGVkOiBwLmVuYWJsZWQgfSkpXHJcbiAgICAgICAgKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYXN5bmMgc2V0UGx1Z2luU3RvcmFnZShwbHVnaW5LZXk6IHN0cmluZywgZmlsZW5hbWU6IHN0cmluZywgY29udGVudDogYW55KSB7XHJc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mZXIsIG1lYW5pbmcgXCJhbnkgdmVyc2lvblwiXG4vLyBPbmx5IHRoZSBmaXJzdCBpdGVtIGlzIHN0cmljdGx5IHJlcXVpcmVkLlxuY3JlYXRlVG9rZW4oJ1hSQU5HRUlERU5USUZJRVJMT09TRScsIGAke3NyY1t0Lk5VTUVSSUNJREVOVElGSUVSTE9PU0VdfXx4fFh8XFxcXCpgKVxuY3JlYXRlVG9rZW4oJ1hSQU5HRUlERU5USUZJRVInLCBgJHtzcmNbdC5OVU1FUklDSURFTlRJRklFUl19fHh8WHxcXFxcKmApXG5cbmNyZWF0ZVRva2VuKCdYUkFOR0VQTEFJTicsIGBbdj1cXFxcc10qKCR7c3JjW3QuWFJBTkdFSURFTlRJRklFUl19KWAgK1xuICAgICAgICAgICAgICAgICAgIGAoPzpcXFxcLigke3NyY1t0LlhSQU5HRUlERU5USUZJRVJdfSlgICtcbiAgICAgICAgICAgICAgICAgICBgKD86XFxcXC4oJHtzcmNbdC5YUkFOR0VJREVOVElGSUVSXX0pYCArXG4gICAgICAgICAgICAgICAgICAgYCg/OiR7c3JjW3QuUFJFUkVMRUFTRV19KT8ke1xuICAgICAgICAgICAgICAgICAgICAgc3JjW3QuQlVJTERdfT9gICtcbiAgICAgICAgICAgICAgICAgICBgKT8pP2ApXG5cbmNyZWF0ZVRva2VuKCdYUkFOR0VQTEFJTkxPT1NFJywgYFt2PVxcXFxzXSooJHtzcmNbdC5YUkFOR0VJREVOVElGSUVSTE9PU0VdfSlgICtcbiAgICAgICAgICAgICAgICAgICAgICAgIGAoPzpcXFxcLigke3NyY1t0LlhSQU5HRUlERU5USUZJRVJMT09TRV19KWAgK1xuICAgICAgICAgICAgICAgICAgICAgICAgYCg/OlxcXFwuKCR7c3JjW3QuWFJBTkdFSURFTlRJRklFUkxPT1NFXX0pYCArXG4gICAgICAgICAgICAgICAgICAgICAgICBgKD86JHtzcmNbdC5QUkVSRUxFQVNFTE9PU0VdfSk/JHtcbiAgICAgICAgICAgICAgICAg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UgaWYgKGIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gMVxuICAgICAgfSBlbHNlIGlmIChhID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgcmV0dXJuIC0xXG4gICAgICB9IGVsc2UgaWYgKGEgPT09IGIpIHtcbiAgICAgICAgY29udGludWVcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBjb21wYXJlSWRlbnRpZmllcnMoYSwgYilcbiAgICAgIH1cbiAgICB9IHdoaWxlICgrK2kpXG4gIH1cblxuICBjb21wYXJlQnVpbGQgKG90aGVyKSB7XG4gICAgaWYgKCEob3RoZXIgaW5zdGFuY2VvZiBTZW1WZXIpKSB7XG4gICAgICBvdGhlciA9IG5ldyBTZW1WZXIob3RoZXIsIHRoaXMub3B0aW9ucylcbiAgICB9XG5cbiAgICBsZXQgaSA9IDBcbiAgICBkbyB7XG4gICAgICBjb25zdCBhID0gdGhpcy5idWlsZFtpXVxuICAgICAgY29uc3QgYiA9IG90aGVyLmJ1aWxkW2ldXG4gICAgICBkZWJ1ZygncHJlcmVsZWFzZSBjb21wYXJlJywgaSwgYSwgYilcbiAgICAgIGlmIChhID09PSB1bmRlZmluZWQgJiYgYiA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiAwXG4gICAgICB9IGVsc2UgaWYgKGIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gMVxuICAgICAgfSBlbHNlIGlmIChhID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgcmV0dXJuIC0xXG4gICAgICB9IGVsc2UgaWYgKGEgPT09IGIpIHtcbiAgICAgICAgY29udGludWVcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBjb21wYXJlSWRlbnRpZmllcnMoYSwgYilcbiAgICAgIH1cbiAgICB9IHdoaWxlICgrK2kpXG4gIH1cblxuICAvLyBwcmVtaW5vciB3aWxsIGJ1bXAgdGhlIHZlcnNpb24gdXAgdG8g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GVhc2UubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgdGhpcy5wcmVyZWxlYXNlID0gWzBdXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbGV0IGkgPSB0aGlzLnByZXJlbGVhc2UubGVuZ3RoXG4gICAgICAgICAgd2hpbGUgKC0taSA+PSAwKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHRoaXMucHJlcmVsZWFzZVtpXSA9PT0gJ251bWJlcicpIHtcbiAgICAgICAgICAgICAgdGhpcy5wcmVyZWxlYXNlW2ldKytcbiAgICAgICAgICAgICAgaSA9IC0yXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChpID09PSAtMSkge1xuICAgICAgICAgICAgLy8gZGlkbid0IGluY3JlbWVudCBhbnl0aGluZ1xuICAgICAgICAgICAgdGhpcy5wcmVyZWxlYXNlLnB1c2goMClcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlkZW50aWZpZXIpIHtcbiAgICAgICAgICAvLyAxLjIuMC1iZXRhLjEgYnVtcHMgdG8gMS4yLjAtYmV0YS4yLFxuICAgICAgICAgIC8vIDEuMi4wLWJldGEuZm9vYmx6IG9yIDEuMi4wLWJldGEgYnVtcHMgdG8gMS4yLjAtYmV0YS4wXG4gICAgICAgICAgaWYgKGNvbXBhcmVJZGVudGlmaWVycyh0aGlzLnByZXJlbGVhc2VbMF0sIGlkZW50aWZpZXIpID09PSAwKSB7XG4gICAgICAgICAgICBpZiAoaXNOYU4odGhpcy5wcmVyZWxlYXNlWzFdKSkge1xuICAgICAgICAgICAgICB0aGlzLnByZXJlbGVhc2UgPSBbaWRlbnRpZmllciwgMF1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5wcmVyZWxlYXNlID0gW2lkZW50aWZpZXIsIDBdXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrXG5c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4gIHN3aXRjaCAob3ApIHtcbiAgICBjYXNlICc9PT0nOlxuICAgICAgaWYgKHR5cGVvZiBhID09PSAnb2JqZWN0Jykge1xuICAgICAgICBhID0gYS52ZXJzaW9uXG4gICAgICB9XG4gICAgICBpZiAodHlwZW9mIGIgPT09ICdvYmplY3QnKSB7XG4gICAgICAgIGIgPSBiLnZlcnNpb25cbiAgICAgIH1cbiAgICAgIHJldHVybiBhID09PSBiXG5cbiAgICBjYXNlICchPT0nOlxuICAgICAgaWYgKHR5cGVvZiBhID09PSAnb2JqZWN0Jykge1xuICAgICAgICBhID0gYS52ZXJzaW9uXG4gICAgICB9XG4gICAgICBpZiAodHlwZW9mIGIgPT09ICdvYmplY3QnKSB7XG4gICAgICAgIGIgPSBiLnZlcnNpb25cbiAgICAgIH1cbiAgICAgIHJldHVybiBhICE9PSBiXG5cbiAgICBjYXNlICcnOlxuICAgIGNhc2UgJz0nOlxuICAgIGNhc2UgJz09JzpcbiAgICAgIHJldHVybiBlcShhLCBiLCBsb29zZSlcblxuICAgIGNhc2UgJyE9JzpcbiAgICAgIHJldHVybiBuZXEoYSwgYiwgbG9vc2UpXG5cbiAgICBjYXNlICc+JzpcbiAgICAgIHJldHVybiBndChhLCBiLCBsb29zZSlcblxuICAgIGNhc2UgJz49JzpcbiAgICAgIHJldHVybiBndGUoYSwgYiwgbG9vc2UpXG5cbiAgICBjYXNlICc8JzpcbiAgICAgIHJldHVybiBsdChhLCBiLCBsb29zZSlcblxuICAgIGNhc2UgJzw9JzpcbiAgICAgIHJldHVybiBsdGUoYSwgYiwgbG9vc2UpXG5cbiAgICBkZWZhdWx0OlxuICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihgSW52YWxpZCBvcGVyYXRvcjogJHtvcH1gKVxuICB9XG59XG5tb2R1bGUuZXhwb3J0cyA9IGNtcFxuIiwiY29uc3QgU2VtVmVyID0gcmVxdWlyZSgnLi4vY2xhc3Nlcy9zZW12ZXInKVxuY29uc3QgcGFyc2UgPS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ke219LiR7K3AgKyAxfS0wYFxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldCA9IGA+PSR7TX0uJHttfS4ke3B9LSR7cHJcbiAgICAgICAgICB9IDwke019LiR7K20gKyAxfS4wLTBgXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldCA9IGA+PSR7TX0uJHttfS4ke3B9LSR7cHJcbiAgICAgICAgfSA8JHsrTSArIDF9LjAuMC0wYFxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBkZWJ1Zygnbm8gcHInKVxuICAgICAgaWYgKE0gPT09ICcwJykge1xuICAgICAgICBpZiAobSA9PT0gJzAnKSB7XG4gICAgICAgICAgcmV0ID0gYD49JHtNfS4ke219LiR7cFxuICAgICAgICAgIH0ke3p9IDwke019LiR7bX0uJHsrcCArIDF9LTBgXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0ID0gYD49JHtNfS4ke219LiR7cFxuICAgICAgICAgIH0ke3p9IDwke019LiR7K20gKyAxfS4wLTBgXG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldCA9IGA+PSR7TX0uJHttfS4ke3BcbiAgICAgICAgfSA8JHsrTSArIDF9LjAuMC0wYFxuICAgICAgfVxuICAgIH1cblxuICAgIGRlYnVnKCdjYXJldCByZXR1cm4nLCByZXQpXG4gICAgcmV0dXJuIHJldFxuICB9KVxufVxuXG5jb25zdCByZXBsYWNlWFJhbmdlcyA9IChjb21wLCBvcHRpb25zKSA9PiB7XG4gIGRlYnVnKCdyZXBsYWNlWFJhbmdlcycsIGNvbXAsIG9wdGlvbnMpXG4gIHJldHVybiBjb21wLnNwbGl0KC9cXHMrLykubWFwKChjKSA9PiB7XG4gICAgcmV0dXJuIHJlcGxhY2VYUmFuZ2UoYywgb3B0aW9ucylcbiAgfSkuam9pbignICcpXG59XG5cbmNvbnN0IHJlcGxhY2VYUmFuZ2UgPSAoY29tcCwgb3B0a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hbnkgeCBhdCBhbGwuXG4gICAgICAvLyByZXBsYWNlIFggd2l0aCAwXG4gICAgICBpZiAoeG0pIHtcbiAgICAgICAgbSA9IDBcbiAgICAgIH1cbiAgICAgIHAgPSAwXG5cbiAgICAgIGlmIChndGx0ID09PSAnPicpIHtcbiAgICAgICAgLy8gPjEgPT4gPj0yLjAuMFxuICAgICAgICAvLyA+MS4yID0+ID49MS4zLjBcbiAgICAgICAgZ3RsdCA9ICc+PSdcbiAgICAgICAgaWYgKHhtKSB7XG4gICAgICAgICAgTSA9ICtNICsgMVxuICAgICAgICAgIG0gPSAwXG4gICAgICAgICAgcCA9IDBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBtID0gK20gKyAxXG4gICAgICAgICAgcCA9IDBcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmIChndGx0ID09PSAnPD0nKSB7XG4gICAgICAgIC8vIDw9MC43LnggaXMgYWN0dWFsbHkgPDAuOC4wLCBzaW5jZSBhbnkgMC43Lnggc2hvdWxkXG4gICAgICAgIC8vIHBhc3MuICBTaW1pbGFybHksIDw9Ny54IGlzIGFjdHVhbGx5IDw4LjAuMCwgZXRjLlxuICAgICAgICBndGx0ID0gJzwnXG4gICAgICAgIGlmICh4bSkge1xuICAgICAgICAgIE0gPSArTSArIDFcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBtID0gK20gKyAxXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGd0bHQgPT09ICc8Jykge1xuICAgICAgICBwciA9ICctMCdcbiAgICAgIH1cblxuICAgICAgcmV0ID0gYCR7Z3RsdCArIE19LiR7bX0uJHtwfSR7cHJ9YFxuICAgIH0gZWxzZSBpZiAoeG0pIHtcbiAgICAgIHJldCA9IGA+PSR7TX0uMC4wJHtwcn0gPCR7K00gKyAxfS4wLjAtMGBcbiAgICB9IGVsc2UgaWYgKHhwKSB7XG4gICAgICByZXQgPSBgPj0ke019LiR7bX0uMCR7cHJcbiAg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xuICAgICAgICAgIGNvbXB2ZXIucmF3ID0gY29tcHZlci5mb3JtYXQoKVxuICAgICAgICAgIC8qIGZhbGx0aHJvdWdoICovXG4gICAgICAgIGNhc2UgJyc6XG4gICAgICAgIGNhc2UgJz49JzpcbiAgICAgICAgICBpZiAoIXNldE1pbiB8fCBndChjb21wdmVyLCBzZXRNaW4pKSB7XG4gICAgICAgICAgICBzZXRNaW4gPSBjb21wdmVyXG4gICAgICAgICAgfVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgJzwnOlxuICAgICAgICBjYXNlICc8PSc6XG4gICAgICAgICAgLyogSWdub3JlIG1heGltdW0gdmVyc2lvbnMgKi9cbiAgICAgICAgICBicmVha1xuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVW5leHBlY3RlZCBvcGVyYXRpb246ICR7Y29tcGFyYXRvci5vcGVyYXRvcn1gKVxuICAgICAgfVxuICAgIH0pXG4gICAgaWYgKHNldE1pbiAmJiAoIW1pbnZlciB8fCBndChtaW52ZXIsIHNldE1pbikpKSB7XG4gICAgICBtaW52ZXIgPSBzZXRNaW5cbiAgICB9XG4gIH1cblxuICBpZiAobWludmVyICYmIHJhbmdlLnRlc3QobWludmVyKSkge1xuICAgIHJldHVybiBtaW52ZXJcbiAgfVxuXG4gIHJldHVybiBudWxsXG59XG5tb2R1bGUuZXhwb3J0cyA9IG1pblZlcnNpb25cbiIsImNvbnN0IFJhbmdlID0gcmVxdWlyZSgnLi4vY2xhc3Nlcy9yYW5nZScpXG5jb25zdCB2YWxpZFJhbmdlID0gKHJhbmdlLCBvcHRpb25zKSA9PiB7XG4gIHRyeSB7XG4gICAgLy8gUmV0dXJuICcqJyBpbnN0ZWFkIG9mICcnIHNvIHRoYXQgdHJ1dGhpbmVzcyB3b3Jrcy5cbiAgICAvLyBUaGlzIHdpbGwgdGhyb3cgaW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VtIG5vdCBmb3VuZCcpO1xyXG4gICAgICAgIC8vIH1cclxuICAgICAgICAvLyBjb25zdCBzY3JpcHQgPSB3aW5kb3cuc2l5dWFuUGx1Z2luU2NyaXB0O1xyXG4gICAgICAgIC8vIGlmICghc2NyaXB0KSB7XHJcbiAgICAgICAgLy8gICAgIHJldHVybjtcclxuICAgICAgICAvLyB9XHJcbiAgICAgICAgLy8gYXdhaXQgdGhpcy5zYXZlVG9Mb2NhbChwbHVnaW5TY3JpcHRQb3NpdGlvbiwgc2NyaXB0KTtcclxuICAgICAgICAvLyB0aGlzLmRlbGF5QXV0b1VwZ3JhZGUoKTtcclxuICAgIH1cclxuXHJcbiAgICBkZWxheUF1dG9VcGdyYWRlKCkge1xyXG4gICAgICAgIHJldHVybiBmYWxzZTtcclxuICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcclxuICAgICAgICAgICAgY29uc3QgYXV0b1VwZGF0ZSA9IHRoaXMuc3RvcmFnZU1hbmdhZ2VyLmdldChQTFVHSU5fU1lTVEVNX0FVVE9fVVBEQVRFKTtcclxuICAgICAgICAgICAgaWYgKCFhdXRvVXBkYXRlKSB7XHJcbiAgICAgICAgICAgICAgICBsb2coJ0F1dG8gVXBkYXRlIHNraXBwZWQnKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHRoaXMudHJ5VXBncmFkZSgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSwgMTAwMCk7XHJcbiAgICB9XHJcblxyXG4gICAgYXN5bmMgdHJ5VXBncmFkZSgpIHtcclxuICAgICAgICAvLyBpZiAod2luZG93LnBsdWdpblN5c3RlbVNvdXJjZSA9PT0gJ2JhenphcicpIHtcclxuICAgICAgICAvLyAgICAgbG9nKCdQbHVnaW4gaW5zdGFsbGVkIGZyb20gYmF6emFyIHZlcnNpb24sIHVwZ3JhZGUgc2tpcCcpO1xyXG4gICAgICAgIC8vICAgICByZXR1cm47XHJcbiAgICAgICAgL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ZXcgRXJyb3IoYEZhaWxlZCB0byBsb2FkIHBsdWdpbiAke3AubmFtZX1gKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBsb2coYExvYWQgaW50ZXJuYWwgcGx1Z2luOiAke3Aua2V5fSgke3AubmFtZX0pYCk7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkQWRkaXRpb25hbE1ldGhvZChwbHVnLCBwLmtleSwgcC5uYW1lKTtcclxuICAgICAgICAgICAgYXdhaXQgcGx1Zy5vbmxvYWQoKTtcclxuICAgICAgICAgICAgdGhpcy5sb2FkZWRQbHVnaW5zLnNldChwLmtleSwgcGx1Zyk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgYXN5bmMgbG9hZEFsbExvY2FsUGx1Z2lucygpIHtcclxuICAgICAgICBjb25zdCBwbHVnaW5zID0gYXdhaXQgdGhpcy5wbHVnaW5GaWxlTWFuYWdlci5nZXRBbGxQbHVnaW5zKCk7XHJcbiAgICAgICAgaWYgKCFwbHVnaW5zKSB7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgZm9yIChjb25zdCBwIG9mIHBsdWdpbnMpIHtcclxuICAgICAgICAgICAgYXdhaXQgdGhpcy5sb2FkUGx1Z2luKHApO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBhc3luYyBsb2FkUGx1Z2luKHBsdWdpbjogUGx1Z2luTWFuaWZlc3QpIHtcclxuICAgICAgICBpZiAoIWNvbXBvbmVudHMpIHtcclxuICAgICAgICAgICAgdGhpcy5nZW5lcmF0ZVJlcXVpcmVkTW9kdWxlcygpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoIXBsdWdpbi5lbmFibGVkIHx8ICghcGx1Z2luLnBsdWdpbiAmJiAhcGx1Z2luLnNjcmlwdCkpIHtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAocGx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leXMgPSBwbHVnaW5zLmZpbHRlcigocCkgPT4gcC5lbmFibGVkKS5tYXAoKHApID0+IHAua2V5KTtcclxuICAgICAgICBmb3IgKGNvbnN0IGsgb2Yga2V5cykge1xyXG4gICAgICAgICAgICBsb2coYHVubG9hZCB0aGlyZCBwYXJ0eSBwbHVnaW46ICR7a31gKTtcclxuICAgICAgICAgICAgYXdhaXQgdGhpcy51bmxvYWRQbHVnaW4oayk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGxvYWRUaGlyZFBhcnR5RW5hYmxlZFBsdWdpbnMocGx1Z2luczogUGx1Z2luTWFuaWZlc3RbXSkge1xyXG4gICAgICAgIHJldHVybiB0aGlzLmxvYWRFbmFibGVkUGx1Z2lucyhwbHVnaW5zKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2VuZXJhdGVSZXF1aXJlZE1vZHVsZXMoKSB7XHJcbiAgICAgICAgY29tcG9uZW50cyA9IHtcclxuICAgICAgICAgICAgc2l5dWFuOiBhcGksXHJcbiAgICAgICAgICAgIGF4aW9zOiBheGlvcyxcclxuICAgICAgICB9O1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgYWRkQWRkaXRpb25hbE1ldGhvZChwbHVnaW46IFBsdWdpbiwgcGx1Z2luS2V5OiBzdHJpbmcsIHBsdWdpbk5hbWU6IHN0cmluZykge1xyXG4gICAgICAgIHBsdWdpbi5yZWdpc3RlckNvbW1hbmQgPSAoY29tbWFuZDogSVBsdWdpbkNvbW1hbmQpID0+IHtcclxuICAgICAgICAgICAgY29uc3QgY20gPSBjb250YWluZXIuZ2V0PElDb21tYW5kTWFuYWdlcj4oVFlQRVMuQ29tbWFuZE1hbmFnZXIpO1xyXG4gICAgICAgICAgICBjbS5yZWdpc3RlckNvbW1hbmQoe1xyXG4gICAgICAgICAgICAgICAgLi4uY29tbWFuZCxcclxuICAgICAgICAgICAgICAgIHBsdWdpbjogcGx1Z2luS2V5LF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AgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gcmVzdWx0O1xyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGdldEZpbGVDb250ZW50KGY6IHN0cmluZyk6IFByb21pc2U8c3RyaW5nPiB7XHJcbiAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgRmlsZUNsaWVudC5nZXRJbnN0YW5jZUFwaSgpLmZpbGVBcGkuZ2V0RmlsZShmKTtcclxuICAgICAgICByZXR1cm4gcmVzIHx8ICcnO1xyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGdldE1hbmlmZXN0KG1hbmlmZXN0OiBzdHJpbmcpIHtcclxuICAgICAgICBjb25zdCBjb250ZW50ID0gYXdhaXQgdGhpcy5nZXRGaWxlQ29udGVudChtYW5pZmVzdCk7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoY29udGVudCk7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkge1xyXG4gICAgICAgICAgICBlcnJvcignbG9hZGluZyBtYW5pZmVzdDogJyArIG1hbmlmZXN0LCBlKTtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGdldFNjcmlwdChzY3JpcHQ6IHN0cmluZykge1xyXG4gICAgICAgIHJldHVybiBhd2FpdCB0aGlzLmdldEZpbGVDb250ZW50KHNjcmlwdCk7XHJcbiAgICB9XHJcblxyXG4gICAgYXN5bmMgZ2V0QWxsUGx1Z2lucygpOiBQcm9taXNlPFBsdWdpbk1hbmlmZXN0W10+IHtcclxuICAgICAgICBjb25zdCBwbHVnaW5zID0gYXdhaXQgdGhpcy5zY2FuUGx1Z2lucygnL2RhdGEvcGx1Z2lucycpO1xyXG4gICAgICAgIGlmICghcGx1Z2lucyB8fCAhcGx1Z2lucy5sZW5ndGgpIHtcclxuICAgICAgICAgICAgbG9nKCdObyBwbHVnaW4gZm91bmQgaW4gJyArICcvZGF0YS9wbHVnaW5zJyk7XHJcbiAgICAgICAgICAgIHJldHVybiBbXTtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgcmVxID0gW107XHJcbiAgICAgICAgZm9yIChjb25zdCBwIG9mIHBsdWdpbnMpIHtcclxuICAgICAgICAgICAgbG9nKCdSZWFkaW5nIHBsdWdpbiBmcm9tIGZpbGVzeXN0ZW06ICcgKyBwKTtcclxuICAgICAgICAgICAgY29uc3Qga2V5ID0gdGhpcy5nZXRGb2xkZXJOYW1lKHApO1xyXG4gICAgICAgICAgICBjb25zdCBmID0gYXN5bmMgKCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgW21hbmlmZXN0LCBzY3JpcHRdID0gYXdhaXQgUHJvbWlzZS5hbGwoW3RoaXMuZ2V0TWFuaWZlc3QoYCR7cH0vbWFuaWZlc3QuanNvbmApLCB0aGlzLmdldFNjcmlwdChgJHtwfS9tYWluLmpzYCldKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiB7IC4uLm1hbmlmZXN0LCBzY3JpcHQsIGVuYWJsZWQ6IGZhbHNlLCBrZXkgfTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgcmVxLnB1c2goZigpKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgcmVzdWx0OiBQbHVnaW5NYW5pZmVzdFtdID0gYXdhaXQgUHJvbWlzZS5hbGwocmVxKTtcclxuICAgICAgICByZXR1cm4gcmVzdWx0IHx8IFtdO1xyXG4gICAgfVxyXG5cclxuICAgIGdldEZvbGRlck5hbWUocCkge1xyXG4gICAgICAgIGNvbnN0IGYgPSBwLnNwbGl0KCcvJyk7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IGYubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcclxuICAgICAgICAgICAgaWYgKGZbaV0pIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBmW2ldO1xyXG4gICAgICA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ZW5lcnNbZXZlbnROYW1lXTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMuZXZlbnRMaXN0ZW5lcnNbZXZlbnROYW1lXS5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAodGhpcy5ldmVudExpc3RlbmVyc1tldmVudE5hbWVdW2ldID09PSBjYWxsYmFjaykge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5ldmVudExpc3RlbmVyc1tldmVudE5hbWVdLnNwbGljZShpLCAxKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBlbWl0KGV2ZW50TmFtZTogc3RyaW5nLCAuLi5hcmdzOiBhbnkpIHtcclxuICAgICAgICBpZiAodGhpcy5ldmVudExpc3RlbmVyc1tldmVudE5hbWVdKSB7XHJcbiAgICAgICAgICAgIHRoaXMuZXZlbnRMaXN0ZW5lcnNbZXZlbnROYW1lXS5mb3JFYWNoKChjYikgPT4ge1xyXG4gICAgICAgICAgICAgICAgY2IoLi4uYXJncyk7XHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG4iLCJpbXBvcnQgeyBUWVBFUyB9IGZyb20gJ0AvY29uZmlnJztcclxuaW1wb3J0IHsgQ29tbWFuZCwgSUNvbW1hbmRNYW5hZ2VyIH0gZnJvbSAnQC90eXBlcyc7XHJcbi8vIHJvbWUtaWdub3JlIGxpbnQvc3VzcGljaW91cy9ub1NoYWRvd1Jlc3RyaWN0ZWROYW1lczogPGV4cGxhbmF0aW9uPlxyXG5pbXBvcnQgIHsgRXJyb3IsIGxvZywgV2FybmluZyB9IGZyb20gJ0AvdXRpbCc7XHJcbmltcG9ydCB7IGluamVjdCwgaW5qZWN0YWJsZSB9IGZyb20gJ2ludmVyc2lmeSc7XHJcbmltcG9ydCB7IFNob3J0Y3V0IH0gZnJvbSAnLi9zaG9ydGN1dCc7XHJcblxyXG5AaW5qZWN0YWJsZSgpXHJcbmV4cG9ydCBjbGFzcyBDb21tYW5kTWFuYWdlciBpbXBsZW1lbnRzIElDb21tYW5kTWFuYWdlciB7XHJcbiAgICBwcml2YXRlIHNob3J0Y3V0OiBTaG9ydGN1dDtcclxuICAgIHByaXZhdGUgY29tbWFuZExpc3Q6IENvbW1hbmRbXTtcclxuXHJcbiAgICBwdWJsaWMgY29uc3RydWN0b3IoQGluamVjdChUWVBFUy5TaG9ydGN1dCkgc2hvcnRjdXQpIHtcclxuICAgICAgICB0aGlzLmNvbW1hbmRMaXN0ID0gW107XHJcbiAgICAgICAgdGhpcy5zaG9ydGN1dCA9IHNob3J0Y3V0O1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyByZWdpc3RlckNvbW1hbmQoY29tbWFuZDogQ29tbWFuZCkge1xyXG4gICAgICAgIGlmIChcclxuICAgICAgICAgICAgdGhpcy5jb21tYW5kTGlzdC5zb21lKChjb20pID0+IHtcclxuICAgICAgICAgICAgICAgIGNvbS5wbHVnaW4gPT09IGNvbW1hbmQucGx1Z2luICYmIGNvbS5jb21tYW5kID09PSBjb21tYW5kLmNvbW1hbmQ7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBuZXcgRXJyb3IoJ0NvbW1hbmQgaXMgYWxyZWFkeSByZWdpc3RlcmVkLCBkbyBub3QgcmVnaXN0ZXIgY29tbWFuZCByZXBlYXRseScpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgIGNvbW1hbmQuc2hvcnRjdXQgJiZcclxuICAgICAgICAgICAgdGhpcy5jb21tYW5kTGlzdC5zb21lKChjb20pID0+IHtcclxuICAgICAgICAgICAgICAgIGNvbS5zaG9ydGN1dCA9PT0gY29tbWFuZC5zaG9ydGN1dDtcclxuICA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SxLQUFnQixNQUFNLFFBQVEsRUFBRSxHQUFHLFFBQVE7QUFDckQsVUFBVSxLQUFnQixNQUFNLFFBQVEsRUFBRSxHQUFHLFFBQVEsRUFBRTtBQUN2RCxVQUFVLEtBQXNCLE1BQU0sY0FBYyxFQUFFLEdBQUcsY0FBYyxFQUFFO0FBQ3pFLFVBQVUsS0FBYSxNQUFNLEtBQUssRUFBRSxHQUFHLEtBQUssRUFBRTtBQUM5QyxVQUFVLEtBQXNCLE1BQU0sY0FBYyxFQUFFLEdBQUcsY0FBYyxFQUFFLGlCQUFpQjtBQzNCMUYsU0FBUyxtQkFBbUI7QUFDcEIsTUFBQSxDQUFDLE9BQU8sY0FBYztBQUN0QixRQUFJLGlDQUFpQztBQUNyQyxXQUFPLHNCQUFzQjNJO0FBQzdCLFdBQU8sZUFBZSxVQUFVLElBQW1CLE1BQU0sWUFBWSxFQUFFO0FBQ3ZFLFdBQU8sMkJBQTJCO0FBQUEsRUFDdEM7QUFDSjsifQ== diff --git a/app/PSP/out/main.js b/app/PSP/out/main.js deleted file mode 100644 index f9d142541a..0000000000 --- a/app/PSP/out/main.js +++ /dev/null @@ -1,3 +0,0 @@ -!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".command.svelte-1bq7axd{padding:8px 12px}.command.svelte-1bq7axd:hover{cursor:pointer;background-color:#0003;color:var(--b3-theme-primary)}.command-selected.svelte-1bq7axd{color:var(--b3-theme-primary);background-color:#0003}.command-plugin.svelte-1bq7axd{font-size:14px}.command-shortcut.svelte-1bq7axd{font-size:12px;color:var(--color-text-3)}.plugin.svelte-bwhxpp span.remove.svelte-bwhxpp{display:none;color:var(--b3-theme-error);margin-left:4px}.plugin.svelte-bwhxpp:hover span.remove.svelte-bwhxpp{display:inline;cursor:pointer}.plugin.svelte-bwhxpp:hover span.remove.svelte-bwhxpp:hover{text-decoration:underline}.plugin-info.svelte-bj9chc{display:flex;align-items:center}.plugin-detail.svelte-bj9chc{margin-top:12px;width:100%}.plugin-name.svelte-bj9chc{display:inline;margin-right:6px;font-size:24px}.plugin-key.svelte-bj9chc{display:inline;font-size:16px}.plugin-manifest.svelte-bj9chc{margin-top:12px}.plugin-readme.svelte-bj9chc{margin-top:20px}.go-back.svelte-bj9chc{margin-left:12px;font-size:12px;height:24px}.go-back-icon.svelte-bj9chc{height:12px;width:12px;margin-right:4px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}(); -(function(){var _a,commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Reflect$1,Reflect2;Reflect2=Reflect$1||(Reflect$1={}),function(t){var n="object"==typeof commonjsGlobal?commonjsGlobal:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),r=i(Reflect2);function i(e,t){return function(n,r){"function"!=typeof e[n]&&Object.defineProperty(e,n,{configurable:!0,writable:!0,value:r}),t&&t(n,r)}}void 0===n.Reflect?n.Reflect=Reflect2:r=i(n.Reflect,r),function(t){var n=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,i=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,s={__proto__:[]}instanceof Array,c=!a&&!s,l={create:a?function(){return ie(Object.create(null))}:s?function(){return ie({__proto__:null})}:function(){return ie({})},has:c?function(e,t){return n.call(e,t)}:function(e,t){return t in e},get:c?function(e,t){return n.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),d="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,p=d||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?te():Map,f=d||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?ne():Set,h=new(d||"function"!=typeof WeakMap?re():WeakMap);function g(e,t,n,r){if(D(n)){if(!H(e))throw new TypeError;if(!Y(t))throw new TypeError;return A(e,t)}if(!H(e))throw new TypeError;if(!F(t))throw new TypeError;if(!F(r)&&!D(r)&&!B(r))throw new TypeError;return B(r)&&(r=void 0),T(e,t,n=V(n),r)}function m(e,t){function n(n,r){if(!F(n))throw new TypeError;if(!D(r)&&!W(r))throw new TypeError;k(e,t,n,r)}return n}function _(e,t,n,r){if(!F(n))throw new TypeError;return D(r)||(r=V(r)),k(e,t,n,r)}function y(e,t,n){if(!F(t))throw new TypeError;return D(n)||(n=V(n)),P(e,t,n)}function v(e,t,n){if(!F(t))throw new TypeError;return D(n)||(n=V(n)),I(e,t,n)}function b(e,t,n){if(!F(t))throw new TypeError;return D(n)||(n=V(n)),N(e,t,n)}function E(e,t,n){if(!F(t))throw new TypeError;return D(n)||(n=V(n)),R(e,t,n)}function w(e,t){if(!F(e))throw new TypeError;return D(t)||(t=V(t)),C(e,t)}function S(e,t){if(!F(e))throw new TypeError;return D(t)||(t=V(t)),x(e,t)}function $(e,t,n){if(!F(t))throw new TypeError;D(n)||(n=V(n));var r=O(t,n,!1);if(D(r))return!1;if(!r.delete(e))return!1;if(r.size>0)return!0;var i=h.get(t);return i.delete(n),i.size>0||h.delete(t),!0}function A(e,t){for(var n=e.length-1;n>=0;--n){var r=(0,e[n])(t);if(!D(r)&&!B(r)){if(!Y(r))throw new TypeError;t=r}}return t}function T(e,t,n,r){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,n,r);if(!D(o)&&!B(o)){if(!F(o))throw new TypeError;r=o}}return r}function O(e,t,n){var r=h.get(e);if(D(r)){if(!n)return;r=new p,h.set(e,r)}var i=r.get(t);if(D(i)){if(!n)return;i=new p,r.set(t,i)}return i}function P(e,t,n){if(I(e,t,n))return!0;var r=ee(t);return!B(r)&&P(e,r,n)}function I(e,t,n){var r=O(t,n,!1);return!D(r)&&q(r.has(e))}function N(e,t,n){if(I(e,t,n))return R(e,t,n);var r=ee(t);return B(r)?void 0:N(e,r,n)}function R(e,t,n){var r=O(t,n,!1);if(!D(r))return r.get(e)}function k(e,t,n,r){O(n,r,!0).set(e,t)}function C(e,t){var n=x(e,t),r=ee(e);if(null===r)return n;var i=C(r,t);if(i.length<=0)return n;if(n.length<=0)return i;for(var o=new f,a=[],s=0,c=n;s=0&&e=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:n,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var n=this._find(e,!0);return this._values[n]=t,this},t.prototype.delete=function(t){var n=this._find(t,!1);if(n>=0){for(var r=this._keys.length,i=n+1;i({token:window.siyuan.config.api.token}),TYPES={StorageManager:"StorageManager",PluginSystem:"PluginSystem",SystemManager:"PluginSystemLocalManager",PluginLoader:"PluginLoader",PluginFileManager:"PluginFileManager",EventBus:"EventBus",Shortcut:"Shortcut",CommandManager:"CommandManager",Store:"Store",SettingManager:"SettingManager"};async function request$1(e,t){let n=null;return await fetch(e,{body:JSON.stringify(t),method:"POST",headers:{Authorization:`Token ${config().token}`}}).then((function(e){n=e.json()})),n}async function parseBody(e){let t=await e;return 0===t.code?t.data:null}async function transactions(e,t=[]){const n=new URL(e.ws.ws.url);return parseBody(request$1("/api/transactions",{app:n.searchParams.get("app"),session:n.searchParams.get("id"),transactions:t}))}async function sql(e){return parseBody(request$1("/api/query/sql",{stmt:e}))}async function lsNotebooks(e){return parseBody(request$1("/api/notebook/lsNotebooks",{stmt:e}))}async function getAnchor(t,n){let r=`select * from blocks where id = '${t=t.replace("((","").replace("))","")}'`,i=await sql(r),o="";if(i)try{o=i[0][n]?i[0][n]:i[0].content?i[0].content:t}catch(e){o="解析错误"}return o}async function openNotebook(e){return parseBody(request$1("/api/notebook/openNotebook",{notebook:e}))}async function closeNotebook(e){return parseBody(request$1("/api/notebook/closeNotebook",{notebook:e}))}async function renameNotebook(e,t){return parseBody(request$1("/api/notebook/renameNotebook",{notebook:e,name:t}))}async function createNotebook(e){return parseBody(request$1("/api/notebook/createNotebook",{name:e}))}async function removeNotebook(e){return parseBody(request$1("/api/notebook/removeNotebook",{notebook:e}))}async function getNotebookConf(e){return parseBody(request$1("/api/notebook/getNotebookConf",{notebook:e}))}async function setNotebookConf(e){return parseBody(request$1("/api/notebook/setNotebookConf",{notebook:e}))}async function renameDoc(e,t,n){return parseBody(request$1("/api/filetree/renameDoc",{notebook:e,path:t,title:n}))}async function removeDoc(e,t){return parseBody(request$1("/api/filetree/removeDoc",{notebook:e,path:t}))}async function moveDoc(e,t,n,r){return parseBody(request$1("/api/filetree/moveDoc",{fromNotebook:e,fromPath:t,toNotebook:n,toPath:r}))}async function getHPathByPath(e,t){return parseBody(request$1("/api/filetree/getHPathByPath",{Notebook:e,Path:t}))}async function getHPathByID(e){return parseBody(request$1("/api/filetree/getHPathByID",{id:e}))}async function getBlockAttrs(e){return parseBody(request$1("/api/attr/getBlockAttrs",{id:e}))}async function getBlockByID(e){let t=`select * from blocks where id ='${e}'`;return(await sql(t))[0]}async function getBlockKramdown(e){return parseBody(request$1("/api/block/getBlockKramdown",{id:e}))}async function getBlockBreadcrumb(e){return parseBody(request$1("/api/block/getBlockBreadcrumb",{id:e}))}async function setBlockAttrs(e,t){return parseBody(request$1("/api/attr/setBlockAttrs",{id:e,attrs:t}))}async function exportMdContent(e){return parseBody(request$1("/api/export/exportMdContent",{id:e}))}async function getDocOutline(e){return parseBody(request$1("/api/outline/getDocOutline",{id:e}))}async function listDocsByPath(e){return parseBody(request$1("/api/filetree/listDocsByPath",{path:e}))}async function getBacklink(e){return parseBody(request$1("/api/ref/getBacklink",{id:e,beforeLen:10,k:"",mk:""}))}async function searchEmbedBlock(e,t){return parseBody(request$1("/api/search/searchEmbedBlock",{stmt:t,excludeIDs:e}))}async function getDoc(e){return parseBody(request$1("/api/filetree/getDoc",{id:e,k:"",mode:2,size:36}))}async function getFocusedDoc(e){return parseBody(request$1("/api/filetree/getDoc",{id:e,k:"",mode:0,size:36}))}async function getTag(){return parseBody(request$1("/api/tag/getTag",{}))}async function getLocalGraph(e,t,n,r){return parseBody(request$1("/api/graph/getLocalGraph",{id:t,k:e,conf:n,reqId:r}))}async function getGraph(e,t,n){return parseBody(request$1("/api/graph/getGraph",{k:e,conf:t,reqId:n}))}async function searchDocs(e){return parseBody(request$1("/api/filetree/searchDocs",{k:e}))}async function searchBlock(e){return parseBody(request$1("/api/search/searchBlock",{query:e}))}async function searchTemplate(e){return parseBody(request$1("/api/search/searchTemplate",{k:e}))}async function createDocWithMd(e,t,n){return parseBody(request$1("/api/filetree/createDocWithMd",{notebook:e,path:t,markdown:n}))}async function docSaveAsTemplate(e,t=!1){return parseBody(request$1("/api/template/docSaveAsTemplate",{id:e,overwrite:t}))}async function render(e){return parseBody(request$1("/api/template/render",e))}async function insertBlock(e,t,n){let r="/api/block/insertBlock";return parseBody(request$1(r,n={previousID:e,dataType:t,data:n}))}async function prependBlock(e,t,n){let r="/api/block/prependBlock";return parseBody(request$1(r,n={parentID:e,dataType:t,data:n}))}async function appendBlock(e,t,n){let r="/api/block/appendBlock";return parseBody(request$1(r,n={parentID:e,dataType:t,data:n}))}async function updateBlock(e,t,n){let r="/api/block/updateBlock";return parseBody(request$1(r,n={id:e,dataType:t,data:n}))}async function deleteBlock(e){return parseBody(request$1("/api/block/deleteBlock",{id:e}))}async function moveBlock(e,t,n){return parseBody(request$1("/api/block/moveBlock",{id:e,previousID:t,parentID:n}))}async function getSysFonts(){return parseBody(request$1("/api/system/getSysFonts",null))}async function getFile(e,t="text"){const n=await fetch("/api/file/getFile",{method:"POST",headers:{Authorization:`Token ${config().token}`},body:JSON.stringify({path:e})});if(200===n.status){if("text"===t)return await n.text();if("json"===t)return(await n.json()).data}return null}async function putFile(e,t,n=!1,r=Date.now()){let i=new Blob([t]),o=new File([i],e.split("/").pop()),a=new FormData;a.append("path",e),a.append("file",o),a.append("isDir",String(n)),a.append("modTime",String(r));const s=await fetch("/api/file/putFile",{body:a,method:"POST",headers:{Authorization:`Token ${config().token}`}});return 200===s.status?await s.json():null}async function readDir(e){const t=await fetch("/api/file/readDir",{method:"POST",headers:{Authorization:`Token ${config().token}`},body:JSON.stringify({path:e})});return 200===t.status?(await t.json()).data:null}async function removeFile(e){return 200===(await fetch("/api/file/removeFile",{method:"POST",headers:{Authorization:`Token ${config().token}`},body:JSON.stringify({path:e})})).status?void 0:null}const language=null==(_a=window.theme)?void 0:_a.languageMode;async function pushMsg(e=null,t=null,n=7e3){return parseBody(request$1("/api/notification/pushMsg",{msg:e?e[language]||e.other:t,timeout:n}))}async function pushErrMsg(e=null,t=null,n=7e3){return parseBody(request$1("/api/notification/pushErrMsg",{msg:e?e[language]||e.other:t,timeout:n}))}async function setStorageVal(e,t){return parseBody(request$1("/api/storage/setLocalStorageVal",{app:genUUID(),key:e,val:t}))}async function getLocalStorage(){return parseBody(request$1("/api/storage/getLocalStorage",null))}async function renderSprig(e){return parseBody(request$1("/api/template/renderSprig",{template:e}))}async function getBazzarWidget(){return parseBody(request$1("/api/bazaar/getBazaarWidget",null))}const serverApi=Object.freeze(Object.defineProperty({__proto__:null,appendBlock:appendBlock,closeNotebook:closeNotebook,createDocWithMd:createDocWithMd,createNotebook:createNotebook,deleteBlock:deleteBlock,docSaveAsTemplate:docSaveAsTemplate,exportMdContent:exportMdContent,getAnchor:getAnchor,getBacklink:getBacklink,getBazzarWidget:getBazzarWidget,getBlockAttrs:getBlockAttrs,getBlockBreadcrumb:getBlockBreadcrumb,getBlockByID:getBlockByID,getBlockKramdown:getBlockKramdown,getDoc:getDoc,getDocOutline:getDocOutline,getFile:getFile,getFocusedDoc:getFocusedDoc,getGraph:getGraph,getHPathByID:getHPathByID,getHPathByPath:getHPathByPath,getLocalGraph:getLocalGraph,getLocalStorage:getLocalStorage,getNotebookConf:getNotebookConf,getSysFonts:getSysFonts,getTag:getTag,insertBlock:insertBlock,listDocsByPath:listDocsByPath,lsNotebooks:lsNotebooks,moveBlock:moveBlock,moveDoc:moveDoc,openNotebook:openNotebook,parseBody:parseBody,prependBlock:prependBlock,pushErrMsg:pushErrMsg,pushMsg:pushMsg,putFile:putFile,readDir:readDir,removeDoc:removeDoc,removeFile:removeFile,removeNotebook:removeNotebook,renameDoc:renameDoc,renameNotebook:renameNotebook,render:render,renderSprig:renderSprig,request:request$1,searchBlock:searchBlock,searchDocs:searchDocs,searchEmbedBlock:searchEmbedBlock,searchTemplate:searchTemplate,setBlockAttrs:setBlockAttrs,setNotebookConf:setNotebookConf,setStorageVal:setStorageVal,sql:sql,transactions:transactions,updateBlock:updateBlock},Symbol.toStringTag,{value:"Module"}));class Notification{constructor(e){this.option=e}show(){"error"===this.option.type?pushErrMsg(null,this.option.message,this.option.timeout):pushMsg(null,this.option.message,this.option.timeout)}}var z=Object.defineProperty,D=(e,t,n)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_$1=(e,t,n)=>(D(e,"symbol"!=typeof t?t+"":t,n),n),P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},b={},W={get exports(){return b},set exports(e){b=e}},i,e,t2;i=W,e=P,t2=function(){var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function i(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch{return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(t,n){for(var i=0;i=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(o=n,!1!==i&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t&&l){try{return void(window.localStorage[l]=n)}catch{}try{window.document.cookie=encodeURIComponent(l)+"="+n+";"}catch{}}}(n),a.call(s,n,e),typeof console===t&&n(e.LOG_LEVEL_DEBUG="DEBUG",e.LOG_LEVEL_INFO="INFO",e.LOG_LEVEL_WARN="WARN",e.LOG_LEVEL_ERROR="ERROR",e))(S||{});function K(){const e=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t;const t=(new Error).stack.slice(1);return Error.prepareStackTrace=e,t}class I{static stringToEnumValue(e,t){return e[Object.keys(e).filter((n=>e[n].toString()===t))[0]]}static getEnvLevel(e){if(!e)return;const t=e.getEnvOrDefault(T.LOG_LEVEL_KEY,S.LOG_LEVEL_INFO),n=I.stringToEnumValue(S,t.toUpperCase());return n||console.warn("[zhi-log] LOG_LEVEL is invalid in you .env file.Must be either debug, info, warn or error, fallback to default info level"),n}static getEnvLogger(e){if(e)return e.getEnv(T.LOG_PREFIX_KEY)}}class Y{constructor(e,t,n){let r;_$1(this,"consoleLogger","console"),_$1(this,"stackSize",1),_$1(this,"getLogger",(e=>{let t;if(e)t=e;else{const e=this.getCallStack(),n=[],r=[];for(let t=0;tthis.stackSize-1)break;const o=i+"-"+r.getLineNumber()+":"+r.getColumnNumber();n.push(o)}r.length>0&&(t=n.join(" -> "))}return(!t||0===t.trim().length)&&(t=this.consoleLogger),b.getLogger(t)})),this.stackSize=1,r=e||I.getEnvLevel(n),r=r??S.LOG_LEVEL_INFO,b.setLevel(r);const i=e=>e.toString(),o=e=>e.toString(),a=e=>e.toString(),s=e=>e.toString();R.reg(b),R.apply(b,{format(e,r,c){const l=["["+(t??I.getEnvLogger(n)??"zhi")+"]"];switch(l.push(i("[")+o(c).toString()+i("]")),e){case S.LOG_LEVEL_DEBUG:l.push(i(e.toUpperCase().toString()));break;case S.LOG_LEVEL_INFO:l.push(o(e.toUpperCase().toString()));break;case S.LOG_LEVEL_WARN:l.push(a(e.toUpperCase().toString()));break;case S.LOG_LEVEL_ERROR:l.push(s(e.toUpperCase().toString()))}return l.push(o(r).toString()),l.push(i(":")),l.join(" ")}})}setStackSize(e){this.stackSize=e??1}getCallStack(){let e;try{e=K()}catch{e=[]}return e}}class X{constructor(e,t,n){_$1(this,"logger"),this.logger=new Y(e,t,n)}getLogger(e,t){return this.logger.setStackSize(t),this.logger.getLogger(e)}}class N extends X{constructor(e,t,n){super(e,t,n)}getLogger(e,t){return super.getLogger(e,t)}}class M{static defaultLogger(e,t){return M.customLogFactory(void 0,void 0,e).getLogger(void 0,t)}static customLogFactory(e,t,n){return new N(e,t,n)}static customSignLogFactory(e,t){return new N(void 0,e,t)}}function insertBefore(e,t){return e.insertAdjacentElement("beforebegin",t)}function insertAfter(e,t){return e.insertAdjacentElement("afterend",t)}function addToolbarLeft(e){var t;const n=null==(t=document.getElementById("toolbar"))?void 0:t.getElementsByClassName("fn__ellipsis");n&&insertBefore(n[0],e)}function addToolbarRight(e){var t;const n=null==(t=document.getElementById("toolbar"))?void 0:t.getElementsByClassName("fn__ellipsis");n&&insertAfter(n[0],e)}const createLogger=e=>getLogger(e),clientApi=Object.freeze(Object.defineProperty({__proto__:null,addToolbarLeft:addToolbarLeft,addToolbarRight:addToolbarRight,createLogger:createLogger},Symbol.toStringTag,{value:"Module"}));class Menu{constructor(e){var t,n;const r=null==(n=null==(t=window.siyuan)?void 0:t.menus)?void 0:n.menu;if(!r)throw Error("Siyuan internal menu not found!");if(this.menu=r,!e)throw Error("Menu must has an id, got empty or undefined!");r.remove(),r.element.setAttribute("data-name",e)}addItem(e){return this.menu.append(e.element),this}addSeparator(){return this.addItem(new MenuItem({type:"separator"})),this}showAtMouseEvent(e){return this.menu.popup({x:e.clientX,y:e.clientY}),this}showAtPosition(e){return this.menu.popup({x:e.x,y:e.y}),this}close(){this.menu.remove()}}class MenuItem{constructor(e){if(this.element=document.createElement("button"),e.disabled&&this.element.setAttribute("disabled","disabled"),"separator"===e.type)return void this.element.classList.add("b3-menu__separator");this.element.classList.add("b3-menu__item"),e.current&&this.element.classList.add("b3-menu__item--selected"),e.click&&this.element.addEventListener("click",(t=>{this.element.getAttribute("disabled")||(e.click(this.element),t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),window.siyuan.menus.menu.remove())}));let t=`${e.label}`;if(t=e.iconHTML?e.iconHTML+t:`${t}`,e.action&&(t+=``),e.id&&this.element.setAttribute("data-id",e.id),"readonly"===e.type&&this.element.classList.add("b3-menu__item--readonly"),this.element.innerHTML=t,e.bind&&(this.element.classList.add("b3-menu__item--custom"),e.bind(this.element)),e.submenu){const t=document.createElement("div");t.classList.add("b3-menu__submenu"),e.submenu.forEach((e=>{t.append(new MenuItem(e).element)})),this.element.insertAdjacentHTML("beforeend",''),this.element.append(t)}}}class MenuSeparator{}class Dialog{constructor(e){this.disableClose=e.disableClose,this.id=genUUID(),window.siyuan.dialogs.push(this),this.destroyCallback=e.destroyCallback,this.element=document.createElement("div"),this.element.innerHTML=`
\n
\n
\n \n
${e.title||""}
\n
${e.content}
\n
`,this.element.querySelector(".b3-dialog__scrim").addEventListener("click",(e=>{this.disableClose||this.destroy(),e.preventDefault(),e.stopPropagation(),window.siyuan.menus.menu.remove()})),this.disableClose||this.element.querySelector(".b3-dialog__close").addEventListener("click",(e=>{this.destroy(),e.preventDefault(),e.stopPropagation()})),document.body.append(this.element),e.disableAnimation?this.element.classList.add("b3-dialog--open"):setTimeout((()=>{this.element.classList.add("b3-dialog--open")})),window.siyuan.menus.menu.remove()}static destroyAll(){window.siyuan.dialogs.forEach((e=>e.destroy()))}destroy(){this.element.remove(),window.siyuan.menus.menu.remove(),this.destroyCallback&&this.destroyCallback(),window.siyuan.dialogs.find(((e,t)=>{if(e.id===this.id)return window.siyuan.dialogs.splice(t,1),!0}))}bindInput(e,t){e.focus(),e.addEventListener("keydown",(e=>{if(!e.isComposing)return"Escape"===e.key?(this.destroy(),e.preventDefault(),void e.stopPropagation()):void("Enter"===e.key&&t&&(t(),e.preventDefault()));e.preventDefault()}))}}class Plugin{onload(){}onunload(){}registerCommand(e){}registerSettingRender(e){}async loadStorage(e){return null}async writeStorage(e,t){}}const api={clientApi:clientApi,serverApi:serverApi,Plugin:Plugin,Menu:Menu,MenuItem:MenuItem,MenuSeparator:MenuSeparator,Notification:Notification,Dialog:Dialog};class FileClient{constructor(){this.electronApi={readDir(e){const t=window.require("fs"),n=window.require("path"),r=n.join(window.siyuan.config.system.dataDir,"..");return new Promise((i=>{t.readdir(n.join(r,e),((o,a)=>{if(o)return void i([]);const s=a.map((i=>({isDir:t.statSync(n.join(r,e,i)).isDirectory(),name:i})));i(s)}))}))},getFile:(t,n="text")=>new Promise(((r,i)=>{const o=window.require("fs"),a=window.require("path"),s=a.join(window.siyuan.config.system.dataDir,"..");o.readFile(a.join(s,t),((t,o)=>{if(t)return i(t);const a=o.toString("utf8");if("json"===n)try{return r(JSON.parse(a))}catch(e){return void i(e)}return r(a)}))})),putFile:putFile,removeFile:e=>new Promise(((t,n)=>{const r=window.require("fs"),i=window.require("path"),o=i.join(window.siyuan.config.system.dataDir,".."),a=i.join(o,e);log("Remove files from",a),r.rm(a,{recursive:!0,force:!0},(e=>{if(e)return n(e);t(null)}))}))},this.serverApi={readDir:readDir,getFile:getFile,putFile:putFile,removeFile:removeFile},this.fileApi=this.serverApi}getVersion(){return window.siyuan.config.system.kernelVersion}static getInstanceApi(){return this.fileClient||(this.fileClient=new FileClient),this.fileClient}}const author$1="作者",version$1="版本",description$1="描述",goBack$1="返回",url$1="地址",readme$1="README",loading$1="加载中",downloading$1="下载中",downloaded$1="已下载",download$1="下载",upgrade$1="升级",nodescription$1="无描述内容",safemode$1="安全模式",safemodetip$1="关闭安全模式允许第三方插件加载",autoupgrade$1="自动更新",autoupgradetip$1="从固定位置获取版本并更新本地存储的插件系统脚本",store_url$1="插件商店地址",store_url_tip$1="线上插件系统仓库地址, 默认为",menu_common$1="通用配置",menu_list$1="插件列表",menu_store$1="插件商店",plugin_system$1="插件系统",plugin_system_setting$1="插件系统设置",reload$1="重载",show_plugin_system_config$1="显示插件系统配置",reload_window$1="重载当前窗口",shortcut$1="快捷键",show_command_panel$1="显示控制面板",uninstall$1="卸载",new_version_widget$1="集市发现新版本的插件系统,请前往更新并重载",zh_CN={author:author$1,version:version$1,description:description$1,goBack:goBack$1,url:url$1,readme:readme$1,loading:loading$1,downloading:downloading$1,downloaded:downloaded$1,download:download$1,upgrade:upgrade$1,nodescription:nodescription$1,safemode:safemode$1,safemodetip:safemodetip$1,autoupgrade:autoupgrade$1,autoupgradetip:autoupgradetip$1,store_url:store_url$1,store_url_tip:store_url_tip$1,menu_common:menu_common$1,menu_list:menu_list$1,menu_store:menu_store$1,plugin_system:plugin_system$1,plugin_system_setting:plugin_system_setting$1,reload:reload$1,show_plugin_system_config:show_plugin_system_config$1,reload_window:reload_window$1,shortcut:shortcut$1,show_command_panel:show_command_panel$1,uninstall:uninstall$1,new_version_widget:new_version_widget$1},author="Author",version="Version",description="Description",goBack="Go Back",url="URL",readme="README",loading="Loading",downloading="Downloading",downloaded="Downloaded",download="Download",upgrade="Upgrade",nodescription="No Description content",safemode="Safe Mode",safemodetip="Turn off safe mode to enable third party plugins.",autoupgrade="Auto Upgrade",autoupgradetip="Auto upgrade plugin system online.",store_url="Plugin Store URL",store_url_tip="Plugin Store URL, default is",menu_common="Common Setting",menu_list="Plugins",menu_store="Store",plugin_system="Plugin System",plugin_system_setting="Plugin System Setting",reload="Reload",show_plugin_system_config="Show plugin system config",reload_window="Reload current window",shortcut="Shortcut",show_command_panel="Show command panel",uninstall="Uninstall",new_version_widget="New version plugin system found in Bazzar, please upgrade and reload.",en_US={author:author,version:version,description:description,goBack:goBack,url:url,readme:readme,loading:loading,downloading:downloading,downloaded:downloaded,download:download,upgrade:upgrade,nodescription:nodescription,safemode:safemode,safemodetip:safemodetip,autoupgrade:autoupgrade,autoupgradetip:autoupgradetip,store_url:store_url,store_url_tip:store_url_tip,menu_common:menu_common,menu_list:menu_list,menu_store:menu_store,plugin_system:plugin_system,plugin_system_setting:plugin_system_setting,reload:reload,show_plugin_system_config:show_plugin_system_config,reload_window:reload_window,shortcut:shortcut,show_command_panel:show_command_panel,uninstall:uninstall,new_version_widget:new_version_widget};function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString:toString}=Object.prototype,{getPrototypeOf:getPrototypeOf}=Object,kindOf=(cache=Object.create(null),e=>{const t=toString.call(e);return cache[t]||(cache[t]=t.slice(8,-1).toLowerCase())});var cache;const kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isBoolean=e=>!0===e||!1===e,isPlainObject=e=>{if("object"!==kindOf(e))return!1;const t=getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||toString.call(e)===t||isFunction(e.toString)&&e.toString()===t)},isURLSearchParams=kindOfTest("URLSearchParams"),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,i;if("object"!=typeof e&&(e=[e]),isArray(e))for(r=0,i=e.length;r0;)if(r=n[i],t===r.toLowerCase())return r;return null}const _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(n,r)=>{const i=e&&findKey(t,r)||r;isPlainObject(t[i])&&isPlainObject(n)?t[i]=merge(t[i],n):isPlainObject(n)?t[i]=merge({},n):isArray(n)?t[i]=n.slice():t[i]=n};for(let r=0,i=arguments.length;r(forEach(t,((t,r)=>{n&&isFunction(t)?e[r]=bind(t,n):e[r]=t}),{allOwnKeys:r}),e),stripBOM=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(TypedArray="undefined"!=typeof Uint8Array&&getPrototypeOf(Uint8Array),e=>TypedArray&&e instanceof TypedArray);var TypedArray;const forEachEntry=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll=(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,((n,i)=>{!1!==t(n,i,e)&&(r[i]=n)})),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,((t,n)=>{if(isFunction(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];isFunction(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet=(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return isArray(e)?r(e):r(String(e).split(t)),n},noop$1=()=>{},toFiniteNumber=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT:DIGIT,ALPHA:ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(e=16,t=ALPHABET.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const toJSONObject=e=>{const t=new Array(10),n=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const i=isArray(e)?[]:{};return forEach(e,((e,t)=>{const o=n(e,r+1);!isUndefined(o)&&(i[t]=o)})),t[r]=void 0,i}}return e};return n(e,0)},utils={isArray:isArray,isArrayBuffer:isArrayBuffer,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isBoolean:isBoolean,isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isRegExp:isRegExp,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isTypedArray:isTypedArray,isFileList:isFileList,forEach:forEach,merge:merge,extend:extend,trim:trim,stripBOM:stripBOM,inherits:inherits,toFlatObject:toFlatObject,kindOf:kindOf,kindOfTest:kindOfTest,endsWith:endsWith,toArray:toArray,forEachEntry:forEachEntry,matchAll:matchAll,isHTMLForm:isHTMLForm,hasOwnProperty:hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors:reduceDescriptors,freezeMethods:freezeMethods,toObjectSet:toObjectSet,toCamelCase:toCamelCase,noop:noop$1,toFiniteNumber:toFiniteNumber,findKey:findKey,global:_global,isContextDefined:isContextDefined,ALPHABET:ALPHABET,generateString:generateString,isSpecCompliantForm:isSpecCompliantForm,toJSONObject:toJSONObject};function AxiosError(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}utils.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{descriptors[e]={value:e}})),Object.defineProperties(AxiosError,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError.from=(e,t,n,r,i,o)=>{const a=Object.create(prototype$1);return utils.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const httpAdapter=null;function isVisitable(e){return utils.isPlainObject(e)||utils.isArray(e)}function removeBrackets(e){return utils.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map((function(e,t){return e=removeBrackets(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}function isFlatArray(e){return utils.isArray(e)&&!e.some(isVisitable)}const predicates=utils.toFlatObject(utils,{},null,(function(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,n){if(!utils.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=utils.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!utils.isUndefined(t[e])}))).metaTokens,i=n.visitor||l,o=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&utils.isSpecCompliantForm(t);if(!utils.isFunction(i))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(utils.isDate(e))return e.toISOString();if(!s&&utils.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils.isArrayBuffer(e)||utils.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(e&&!i&&"object"==typeof e)if(utils.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(utils.isArray(e)&&isFlatArray(e)||(utils.isFileList(e)||utils.endsWith(n,"[]"))&&(s=utils.toArray(e)))return n=removeBrackets(n),s.forEach((function(e,r){!utils.isUndefined(e)&&null!==e&&t.append(!0===a?renderKey([n],r,o):null===a?n:n+"[]",c(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(i,n,o),c(e)),!1)}const u=[],d=Object.assign(predicates,{defaultVisitor:l,convertValue:c,isVisitable:isVisitable});if(!utils.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!utils.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),utils.forEach(n,(function(n,o){!0===(!(utils.isUndefined(n)||null===n)&&i.call(t,n,utils.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),u.pop()}}(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const prototype=AxiosURLSearchParams.prototype;function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode,i=n&&n.serialize;let o;if(o=i?i(t,n):utils.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}prototype.append=function(e,t){this._pairs.push([e,t])},prototype.toString=function(e){const t=e?function(t){return e.call(this,t,encode$1)}:encode$1;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class InterceptorManager{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){utils.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const InterceptorManager$1=InterceptorManager,transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1="undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData$1="undefined"!=typeof FormData?FormData:null,Blob$1="undefined"!=typeof Blob?Blob:null,isStandardBrowserEnv=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,platform={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},isStandardBrowserEnv:isStandardBrowserEnv,isStandardBrowserWebWorkerEnv:isStandardBrowserWebWorkerEnv,protocols:["http","https","file","blob","url","data"]};function toURLEncodedForm(e,t){return toFormData(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return platform.isNode&&utils.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function arrayToObject(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=e.length;if(o=!o&&utils.isArray(r)?r.length:o,s)return utils.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!a;r[o]&&utils.isObject(r[o])||(r[o]=[]);return t(e,n,r[o],i)&&utils.isArray(r[o])&&(r[o]=arrayToObject(r[o])),!a}if(utils.isFormData(e)&&utils.isFunction(e.entries)){const n={};return utils.forEachEntry(e,((e,r)=>{t(parsePropPath(e),r,n,0)})),n}return null}const DEFAULT_CONTENT_TYPE={"Content-Type":void 0};function stringifySafely(t,n,r){if(utils.isString(t))try{return(n||JSON.parse)(t),utils.trim(t)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(t)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,i=utils.isObject(e);i&&utils.isHTMLForm(e)&&(e=new FormData(e));if(utils.isFormData(e))return r&&r?JSON.stringify(formDataToJSON(e)):e;if(utils.isArrayBuffer(e)||utils.isBuffer(e)||utils.isStream(e)||utils.isFile(e)||utils.isBlob(e))return e;if(utils.isArrayBufferView(e))return e.buffer;if(utils.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(e,this.formSerializer).toString();if((o=utils.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType("application/json",!1),stringifySafely(e)):e}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,i="json"===this.responseType;if(t&&utils.isString(t)&&(r&&!this.responseType||i)){const r=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};utils.forEach(["delete","get","head"],(function(e){defaults.headers[e]={}})),utils.forEach(["post","put","patch"],(function(e){defaults.headers[e]=utils.merge(DEFAULT_CONTENT_TYPE)}));const defaults$1=defaults,ignoreDuplicateOf=utils.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&ignoreDuplicateOf[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:utils.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function isValidHeaderName(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function matchHeaderValue(e,t,n,r,i){return utils.isFunction(r)?r.call(this,t,n):(i&&(t=n),utils.isString(t)?utils.isString(r)?-1!==t.indexOf(r):utils.isRegExp(r)?r.test(t):void 0:void 0)}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}function buildAccessors(e,t){const n=utils.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})}))}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){const i=normalizeHeader(t);if(!i)throw new Error("header name must be a non-empty string");const o=utils.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=normalizeValue(e))}const o=(e,t)=>utils.forEach(e,((e,n)=>i(e,n,t)));return utils.isPlainObject(e)||e instanceof this.constructor?o(e,t):utils.isString(e)&&(e=e.trim())&&!isValidHeaderName(e)?o(parseHeaders(e),t):null!=e&&i(t,e,n),this}get(e,t){if(e=normalizeHeader(e)){const n=utils.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return parseTokens(e);if(utils.isFunction(t))return t.call(this,e,n);if(utils.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const n=utils.findKey(this,e);return!(!n||void 0===this[n]||t&&!matchHeaderValue(this,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function i(e){if(e=normalizeHeader(e)){const i=utils.findKey(n,e);!i||t&&!matchHeaderValue(n,n[i],i,t)||(delete n[i],r=!0)}}return utils.isArray(e)?e.forEach(i):i(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const i=t[n];e&&!matchHeaderValue(this,this[i],i,e,!0)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return utils.forEach(this,((r,i)=>{const o=utils.findKey(n,i);if(o)return t[o]=normalizeValue(r),void delete t[i];const a=e?formatHeader(i):String(i).trim();a!==i&&delete t[i],t[a]=normalizeValue(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return utils.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&utils.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[$internals]=this[$internals]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=normalizeHeader(e);t[r]||(buildAccessors(n,e),t[r]=!0)}return utils.isArray(e)?e.forEach(r):r(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils.freezeMethods(AxiosHeaders.prototype),utils.freezeMethods(AxiosHeaders);const AxiosHeaders$1=AxiosHeaders;function transformData(e,t){const n=this||defaults$1,r=t||n,i=AxiosHeaders$1.from(r.headers);let o=r.data;return utils.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,n){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,n),this.name="CanceledError"}function settle(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new AxiosError("Request failed with status code "+n.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}utils.inherits(CanceledError,AxiosError,{__CANCEL__:!0});const cookies=platform.isStandardBrowserEnv?{write:function(e,t,n,r,i,o){const a=[];a.push(e+"="+encodeURIComponent(t)),utils.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),utils.isString(r)&&a.push("path="+r),utils.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t){return e&&!isAbsoluteURL(t)?combineURLs(e,t):t}const isURLSameOrigin=platform.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=utils.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),l=r[a];i||(i=c),n[o]=s,r[o]=c;let u=a,d=0;for(;u!==o;)d+=n[u++],u%=e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i{const o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,c=r(s);n=o;const l={loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&o<=a?(a-o)/c:void 0,event:i};l[t?"download":"upload"]=!0,e(l)}}const isXHRAdapterSupported="undefined"!=typeof XMLHttpRequest,xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise((function(t,n){let r=e.data;const i=AxiosHeaders$1.from(e.headers).normalize(),o=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}utils.isFormData(r)&&(platform.isStandardBrowserEnv||platform.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+n))}const l=buildFullPath(e.baseURL,e.url);function u(){if(!c)return;const r=AxiosHeaders$1.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());settle((function(e){t(e),s()}),(function(e){n(e),s()}),{data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),buildURL(l,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=u:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(u)},c.onabort=function(){c&&(n(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||transitionalDefaults;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new AxiosError(t,r.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,c)),c=null},platform.isStandardBrowserEnv){const t=(e.withCredentials||isURLSameOrigin(l))&&e.xsrfCookieName&&cookies.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===r&&i.setContentType(null),"setRequestHeader"in c&&utils.forEach(i.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),utils.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&"json"!==o&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{c&&(n(!t||t.type?new CanceledError(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=parseProtocol(l);d&&-1===platform.protocols.indexOf(d)?n(new AxiosError("Unsupported protocol "+d+":",AxiosError.ERR_BAD_REQUEST,e)):c.send(r||null)}))},knownAdapters={http:httpAdapter,xhr:xhrAdapter};utils.forEach(knownAdapters,((t,n)=>{if(t){try{Object.defineProperty(t,"name",{value:n})}catch(e){}Object.defineProperty(t,"adapterName",{value:n})}}));const adapters={getAdapter:e=>{e=utils.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof AxiosHeaders$1?e.toJSON():e;function mergeConfig(e,t){t=t||{};const n={};function r(e,t,n){return utils.isPlainObject(e)&&utils.isPlainObject(t)?utils.merge.call({caseless:n},e,t):utils.isPlainObject(t)?utils.merge({},t):utils.isArray(t)?t.slice():t}function i(e,t,n){return utils.isUndefined(t)?utils.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!utils.isUndefined(t))return r(void 0,t)}function a(e,t){return utils.isUndefined(t)?utils.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const c={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(headersToObject(e),headersToObject(t),!0)};return utils.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const o=c[r]||i,a=o(e[r],t[r],r);utils.isUndefined(a)&&o!==s||(n[r]=a)})),n}const VERSION="1.3.4",validators$1={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{validators$1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const deprecatedWarnings={};function assertOptions(e,t,n){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const t=e[o],n=void 0===t||a(t,o,e);if(!0!==n)throw new AxiosError("option "+o+" must be "+n,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new AxiosError("Unknown option "+o,AxiosError.ERR_BAD_OPTION)}}validators$1.transitional=function(e,t,n){function r(e,t){return"[Axios v"+VERSION+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new AxiosError(r(i," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!deprecatedWarnings[i]&&(deprecatedWarnings[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,o)}};const validator={assertOptions:assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new InterceptorManager$1,response:new InterceptorManager$1}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:i}=t;let o;void 0!==n&&validator.assertOptions(n,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),void 0!==r&&validator.assertOptions(r,{encode:validators.function,serialize:validators.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),o=i&&utils.merge(i.common,i[t.method]),o&&utils.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=AxiosHeaders$1.concat(o,i);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),u=e.length,l=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new CanceledError(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new CancelToken((function(t){e=t})),cancel:e}}}const CancelToken$1=CancelToken;function spread(e){return function(t){return e.apply(null,t)}}function isAxiosError(e){return utils.isObject(e)&&!0===e.isAxiosError}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach((([e,t])=>{HttpStatusCode[t]=e}));const HttpStatusCode$1=HttpStatusCode;function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return createInstance(mergeConfig(e,t))},n}const axios=createInstance(defaults$1);axios.Axios=Axios$1,axios.CanceledError=CanceledError,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel,axios.VERSION=VERSION,axios.toFormData=toFormData,axios.AxiosError=AxiosError,axios.Cancel=axios.CanceledError,axios.all=function(e){return Promise.all(e)},axios.spread=spread,axios.isAxiosError=isAxiosError,axios.mergeConfig=mergeConfig,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils.isHTMLForm(e)?new FormData(e):e),axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const axios$1=axios,factory=M.customLogFactory(S.LOG_LEVEL_INFO,"PluginSystem"),pluginSystemLogger=factory.getLogger("plugin system"),log=(...e)=>{pluginSystemLogger.info(...e)},request=axios$1.create({withCredentials:!1,headers:{"Cache-Control":"no-cache",Pragma:"no-cache",Expires:"0"}}),sleep=async e=>new Promise((t=>{setTimeout((()=>t(null)),e)})),error=(...e)=>pluginSystemLogger.error(...e),genUUID=()=>([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(parseInt(e,10)^window.crypto.getRandomValues(new Uint32Array(1))[0]&15>>parseInt(e,10)/4).toString(16)));async function isExists(e){try{return null!==await FileClient.getInstanceApi().fileApi.getFile(e)}catch{return!1}}let Error$1=class{constructor(e){this.message=e}};class Warning{constructor(e){this.message=e}}const showErrorMessage=(e,t)=>new Notification({type:"error",message:e,timeout:t}).show(),getLogger=e=>factory.getLogger(e),langs={zh_CN:zh_CN,en_US:en_US},_=e=>langs[window.siyuan.config.lang][e]||"not defined";var NAMED_TAG="named",NAME_TAG="name",UNMANAGED_TAG="unmanaged",OPTIONAL_TAG="optional",INJECT_TAG="inject",MULTI_INJECT_TAG="multi_inject",TAGGED="inversify:tagged",TAGGED_PROP="inversify:tagged_props",PARAM_TYPES="inversify:paramtypes",DESIGN_PARAM_TYPES="design:paramtypes",POST_CONSTRUCT="post_construct",PRE_DESTROY="pre_destroy";function getNonCustomTagKeys(){return[INJECT_TAG,MULTI_INJECT_TAG,NAME_TAG,UNMANAGED_TAG,NAMED_TAG,OPTIONAL_TAG]}var NON_CUSTOM_TAG_KEYS=getNonCustomTagKeys(),BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"},BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"},TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"},idCounter=0;function id(){return idCounter++}var Binding=function(){function e(e,t){this.id=id(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=BindingTypeEnum.Invalid,this.constraint=function(e){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.onDeactivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.onDeactivation=this.onDeactivation,t.cache=this.cache,t},e}(),DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",NULL_ARGUMENT="NULL argument",KEY_NOT_FOUND="Key Not Found",AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",CANNOT_UNBIND="Could not unbind serviceIdentifier:",NOT_REGISTERED="No matching bindings found for serviceIdentifier:",MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:",UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to overcome this limitation."},CIRCULAR_DEPENDENCY="Circular dependency found:",INVALID_BINDING_TYPE="Invalid binding type:",NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",LAZY_IN_SYNC=function(e){return"You are attempting to construct '"+e+"' in a synchronous way\n but it has asynchronous dependencies."},INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.",ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t= than the number of constructor arguments of its base class."},CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",ASYNC_UNBIND_REQUIRED="Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)",POST_CONSTRUCT_ERROR=function(e,t){return"@postConstruct error in class "+e+": "+t},PRE_DESTROY_ERROR=function(e,t){return"@preDestroy error in class "+e+": "+t},ON_DEACTIVATION_ERROR=function(e,t){return"onDeactivation() error in class "+e+": "+t},CIRCULAR_DEPENDENCY_IN_FACTORY=function(e,t){return"It looks like there is a circular dependency in one of the '"+e+"' bindings. Please investigate bindings withservice identifier '"+t+"'."},STACK_OVERFLOW="Maximum call stack size exceeded",MetadataReader=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.getMetadata(PARAM_TYPES,e),userGeneratedMetadata:Reflect.getMetadata(TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.getMetadata(TAGGED_PROP,e)||[]},e}(),BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1};function isStackOverflowExeption(e){return e instanceof RangeError||e.message===STACK_OVERFLOW}var tryAndThrowErrorIfStackOverflow=function(e,t){try{return e()}catch(n){throw isStackOverflowExeption(n)&&(n=t()),n}};function getServiceIdentifierAsString(e){return"function"==typeof e?e.name:"symbol"==typeof e?e.toString():e}function listRegisteredBindingsForServiceIdentifier(e,t,n){var r="",i=n(e,t);return 0!==i.length&&(r="\nRegistered bindings:",i.forEach((function(e){var t="Object";null!==e.implementationType&&(t=getFunctionName(e.implementationType)),r=r+"\n "+t,e.constraint.metaData&&(r=r+" - "+e.constraint.metaData)}))),r}function alreadyDependencyChain(e,t){return null!==e.parentRequest&&(e.parentRequest.serviceIdentifier===t||alreadyDependencyChain(e.parentRequest,t))}function dependencyChainToString(e){var t=function e(t,n){void 0===n&&(n=[]);var r=getServiceIdentifierAsString(t.serviceIdentifier);return n.push(r),null!==t.parentRequest?e(t.parentRequest,n):n}(e);return t.reverse().join(" --\x3e ")}function circularDependencyToException(e){e.childRequests.forEach((function(e){if(alreadyDependencyChain(e,e.serviceIdentifier)){var t=dependencyChainToString(e);throw new Error(CIRCULAR_DEPENDENCY+" "+t)}circularDependencyToException(e)}))}function listMetadataForTarget(e,t){if(t.isTagged()||t.isNamed()){var n="",r=t.getNamedTag(),i=t.getCustomTags();return null!==r&&(n+=r.toString()+"\n"),null!==i&&i.forEach((function(e){n+=e.toString()+"\n"}))," "+e+"\n "+e+" - "+n}return" "+e}function getFunctionName(e){if(e.name)return e.name;var t=e.toString(),n=t.match(/^function\s*([^\s(]+)/);return n?n[1]:"Anonymous function: "+t}function getSymbolDescription(e){return e.toString().slice(7,-1)}var Context=function(){function e(e){this.id=id(),this.container=e}return e.prototype.addPlan=function(e){this.plan=e},e.prototype.setCurrentRequest=function(e){this.currentRequest=e},e}(),Metadata=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===NAMED_TAG?"named: "+String(this.value).toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+String(this.value)+" }"},e}(),Plan=function(e,t){this.parentContext=e,this.rootRequest=t},LazyServiceIdentifer=function(){function e(e){this._cb=e}return e.prototype.unwrap=function(){return this._cb()},e}(),QueryableString=function(){function e(e){this.str=e}return e.prototype.startsWith=function(e){return 0===this.str.indexOf(e)},e.prototype.endsWith=function(e){var t,n=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},n)},e.prototype.contains=function(e){return-1!==this.str.indexOf(e)},e.prototype.equals=function(e){return this.str===e},e.prototype.value=function(){return this.str},e}(),Target=function(){function e(e,t,n,r){this.id=id(),this.type=e,this.serviceIdentifier=n;var i="symbol"==typeof t?getSymbolDescription(t):t;this.name=new QueryableString(i||""),this.identifier=t,this.metadata=new Array;var o=null;"string"==typeof r?o=new Metadata(NAMED_TAG,r):r instanceof Metadata&&(o=r),null!==o&&this.metadata.push(o)}return e.prototype.hasTag=function(e){for(var t=0,n=this.metadata;t0,l=s.length>n.length,u=getConstructorArgsAsTargets(r,t,o,a,c||l?s.length:n.length),d=getClassPropsAsTargets(e,n,t);return __spreadArray$2(__spreadArray$2([],u,!0),d,!0)}function getConstructorArgsAsTarget(e,t,n,r,i){var o=i[e.toString()]||[],a=formatTargetMetadata(o),s=!0!==a.unmanaged,c=r[e],l=a.inject||a.multiInject;if((c=l||c)instanceof LazyServiceIdentifer&&(c=c.unwrap()),s){if(!t&&(c===Object||c===Function||void 0===c))throw new Error(MISSING_INJECT_ANNOTATION+" argument "+e+" in class "+n+".");var u=new Target(TargetTypeEnum.ConstructorArgument,a.targetName,c);return u.metadata=o,u}return null}function getConstructorArgsAsTargets(e,t,n,r,i){for(var o=[],a=0;a0?a:getBaseClassDependencyCount(e,n)}return 0}function formatTargetMetadata(e){var t={};return e.forEach((function(e){t[e.key.toString()]=e.value})),{inject:t[INJECT_TAG],multiInject:t[MULTI_INJECT_TAG],targetName:t[NAME_TAG],unmanaged:t[UNMANAGED_TAG]}}var Request=function(){function e(e,t,n,r,i){this.id=id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=n,this.target=i,this.childRequests=[],this.bindings=Array.isArray(r)?r:[r],this.requestScope=null===n?new Map:null}return e.prototype.addChildRequest=function(t,n,r){var i=new e(t,this.parentContext,this,n,r);return this.childRequests.push(i),i},e}();function getBindingDictionary(e){return e._bindingDictionary}function _createTarget(e,t,n,r,i,o){var a=new Metadata(e?MULTI_INJECT_TAG:INJECT_TAG,n),s=new Target(t,r,n,a);if(void 0!==i){var c=new Metadata(i,o);s.metadata.push(c)}return s}function _getActiveBindings(e,t,n,r,i){var o=getBindings(n.container,i.serviceIdentifier),a=[];return o.length===BindingCount.NoBindingsAvailable&&n.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(n.container.bind(i.serviceIdentifier).toSelf(),o=getBindings(n.container,i.serviceIdentifier)),a=t?o:o.filter((function(e){var t=new Request(e.serviceIdentifier,n,r,e,i);return e.constraint(t)})),_validateActiveBindingCount(i.serviceIdentifier,a,i,n.container),a}function _validateActiveBindingCount(e,t,n,r){switch(t.length){case BindingCount.NoBindingsAvailable:if(n.isOptional())return t;var i=getServiceIdentifierAsString(e),o=NOT_REGISTERED;throw o+=listMetadataForTarget(i,n),o+=listRegisteredBindingsForServiceIdentifier(r,i,getBindings),new Error(o);case BindingCount.OnlyOneBindingAvailable:return t;case BindingCount.MultipleBindingsAvailable:default:if(n.isArray())return t;i=getServiceIdentifierAsString(e),o=AMBIGUOUS_MATCH+" "+i;throw o+=listRegisteredBindingsForServiceIdentifier(r,i,getBindings),new Error(o)}}function _createSubRequests(e,t,n,r,i,o){var a,s;if(null===i){a=_getActiveBindings(e,t,r,null,o),s=new Request(n,r,null,a,o);var c=new Plan(r,s);r.addPlan(c)}else a=_getActiveBindings(e,t,r,i,o),s=i.addChildRequest(o.serviceIdentifier,a,o);a.forEach((function(t){var n=null;if(o.isArray())n=s.addChildRequest(t.serviceIdentifier,t,o);else{if(t.cache)return;n=s}if(t.type===BindingTypeEnum.Instance&&null!==t.implementationType){var i=getDependencies(e,t.implementationType);if(!r.container.options.skipBaseClassChecks){var a=getBaseClassDependencyCount(e,t.implementationType);if(i.length0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0){var i=_resolveRequests(t,n),o=__assign$1(__assign$1({},i),{constr:e});r=i.isAsync?createInstanceWithInjectionsAsync(o):createInstanceWithInjections(o)}else r=new e;return r}function createInstanceWithInjections(e){var t,n=new((t=e.constr).bind.apply(t,__spreadArray$1([void 0],e.constructorInjections,!1)));return e.propertyRequests.forEach((function(t,r){var i=t.target.identifier,o=e.propertyInjections[r];n[i]=o})),n}function createInstanceWithInjectionsAsync(e){return __awaiter$2(this,void 0,void 0,(function(){var t,n;return __generator$2(this,(function(r){switch(r.label){case 0:return[4,possiblyWaitInjections(e.constructorInjections)];case 1:return t=r.sent(),[4,possiblyWaitInjections(e.propertyInjections)];case 2:return n=r.sent(),[2,createInstanceWithInjections(__assign$1(__assign$1({},e),{constructorInjections:t,propertyInjections:n}))]}}))}))}function possiblyWaitInjections(e){return __awaiter$2(this,void 0,void 0,(function(){var t,n,r,i;return __generator$2(this,(function(o){for(t=[],n=0,r=e;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0?this._map.set(e,t):this._map.delete(e)},e}(),ModuleActivationStore=function(){function e(){this._map=new Map}return e.prototype.remove=function(e){if(this._map.has(e)){var t=this._map.get(e);return this._map.delete(e),t}return this._getEmptyHandlersStore()},e.prototype.addDeactivation=function(e,t,n){this._getModuleActivationHandlers(e).onDeactivations.add(t,n)},e.prototype.addActivation=function(e,t,n){this._getModuleActivationHandlers(e).onActivations.add(t,n)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,n){t._map.set(n,{onActivations:e.onActivations.clone(),onDeactivations:e.onDeactivations.clone()})})),t},e.prototype._getModuleActivationHandlers=function(e){var t=this._map.get(e);return void 0===t&&(t=this._getEmptyHandlersStore(),this._map.set(e,t)),t},e.prototype._getEmptyHandlersStore=function(){return{onActivations:new Lookup,onDeactivations:new Lookup}},e}(),__assign=globalThis&&globalThis.__assign||function(){return __assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]32){const t=[],n=e.ctx.length/32;for(let e=0;ee.removeEventListener(t,n,r)}function attr(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function xlink_attr(e,t,n){e.setAttributeNS("http://www.w3.org/1999/xlink",t,n)}function children(e){return Array.from(e.childNodes)}function set_data(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function set_input_value(e,t){e.value=null==t?"":t}function set_style(e,t,n,r){null===n?e.style.removeProperty(t):e.style.setProperty(t,n,r?"important":"")}function custom_event(e,t,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,r,t),i}class HtmlTag{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.is_svg?this.e=svg_element(t.nodeName):this.e=element(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t{const i=e.$$.callbacks[t];if(i){const o=custom_event(t,n,{cancelable:r});return i.slice().forEach((t=>{t.call(e,o)})),!o.defaultPrevented}return!0}}const dirty_components=[],binding_callbacks=[],render_callbacks=[],flush_callbacks=[],resolved_promise=Promise.resolve();let update_scheduled=!1;function schedule_update(){update_scheduled||(update_scheduled=!0,resolved_promise.then(flush))}function add_render_callback(e){render_callbacks.push(e)}const seen_callbacks=new Set;let flushidx=0;function flush(){if(0!==flushidx)return;const t=current_component;do{try{for(;flushidx{outroing.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}function create_component(e){e&&e.c()}function mount_component(e,t,n,r){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),r||add_render_callback((()=>{const t=e.$$.on_mount.map(run).filter(is_function);e.$$.on_destroy?e.$$.on_destroy.push(...t):run_all(t),e.$$.on_mount=[]})),o.forEach(add_render_callback)}function destroy_component(e,t){const n=e.$$;null!==n.fragment&&(run_all(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function make_dirty(e,t){-1===e.$$.dirty[0]&&(dirty_components.push(e),schedule_update(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const o=r.length?r[0]:n;return l.ctx&&i(l.ctx[t],l.ctx[t]=o)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](o),u&&make_dirty(e,t)),n})):[],l.update(),u=!0,run_all(l.before_update),l.fragment=!!r&&r(l.ctx),t.target){if(t.hydrate){const e=children(t.target);l.fragment&&l.fragment.l(e),e.forEach(detach)}else l.fragment&&l.fragment.c();t.intro&&transition_in(e.$$.fragment),mount_component(e,t.target,t.anchor,t.customElement),flush()}set_current_component(c)}class SvelteComponent{$destroy(){destroy_component(this,1),this.$destroy=noop}$on(e,t){if(!is_function(t))return noop;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!is_empty(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const commandPanel_svelte_svelte_type_style_lang="";function get_each_context$4(e,t,n){const r=e.slice();return r[11]=t[n],r[13]=n,r}function create_if_block$5(e){let t,n=e[2],r=[];for(let i=0;i{const e=s[a];Dialog.destroyAll(),e.callback()},l=e=>{n(1,a=e),c()},u=(e,t)=>e&&e.toLowerCase().indexOf(t.toLowerCase())>=0;onMount((()=>{n(5,i=r.getCommands());document.getElementById("commandPanelInput").focus()}));return e.$$.update=()=>{33&e.$$.dirty&&(n(1,a=0),n(2,s=o?i.filter((e=>u(e.plugin,o)||u(e.pluginName,o)||u(e.command,o)||u(e.description,o))):i))},[o,a,s,e=>{if(13!==e.keyCode)if(38!==e.keyCode){if(40===e.keyCode){const t=s.length;if(e.preventDefault(),a>=t-1)return;n(1,a++,a)}}else{if(e.preventDefault(),0===a)return;n(1,a--,a)}else c()},l,i,function(){o=this.value,n(0,o)},e=>l(e)]}class Command_panel extends SvelteComponent{constructor(e){super(),init(this,e,instance$7,create_fragment$7,safe_not_equal,{})}}class CommandPanelPlugin extends Plugin{onload(){this.registerCommand({command:"Show command panel",description:_("show_command_panel"),shortcut:"ctrl+shift+o,command+shift+o",callback:()=>{this.showPanel()}})}showPanel(){Dialog.destroyAll(),new Dialog({content:'
'}),setImmediate((()=>{new Command_panel({target:document.getElementById("command-panel")})}))}}function get_each_context$3(e,t,n){const r=e.slice();return r[5]=t[n],r[6]=t,r[7]=n,r}function create_if_block_1$3(e){let t,n,r;function i(){e[2].call(t,e[6],e[7])}return{c(){t=element("input"),attr(t,"class","b3-text-field fn__flex-center fn__size200"),attr(t,"type","input")},m(o,a){insert(o,t,a),set_input_value(t,e[5].value),n||(r=[listen(t,"input",i),listen(t,"change",(function(){is_function(e[5].onChange)&&e[5].onChange.apply(this,arguments)}))],n=!0)},p(n,r){e=n,1&r&&set_input_value(t,e[5].value)},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_if_block$4(e){let t,n,r;function i(){e[1].call(t,e[6],e[7])}return{c(){t=element("input"),attr(t,"class","b3-switch fn__flex-center"),attr(t,"type","checkbox")},m(o,a){insert(o,t,a),t.checked=e[5].checked,n||(r=[listen(t,"change",i),listen(t,"change",(function(){is_function(e[5].onChange)&&e[5].onChange.apply(this,arguments)}))],n=!0)},p(n,r){e=n,1&r&&(t.checked=e[5].checked)},d(e){e&&detach(t),n=!1,run_all(r)}}}function create_each_block$3(e){let t,n,r,i,o,a,s,c,l,u,d=e[5].label+"",p=e[5].tip+"";function f(e,t){return"checkbox"===e[5].type?create_if_block$4:"input"===e[5].type?create_if_block_1$3:void 0}let h=f(e),g=h&&h(e);return{c(){t=element("label"),n=element("div"),r=text(d),i=space(),o=element("div"),a=text(p),s=space(),c=element("span"),l=space(),g&&g.c(),u=space(),attr(o,"class","b3-label__text"),attr(n,"class","fn__flex-1"),attr(c,"class","fn__space"),attr(t,"class","fn__flex b3-label config__item")},m(e,d){insert(e,t,d),append(t,n),append(n,r),append(n,i),append(n,o),append(o,a),append(t,s),append(t,c),append(t,l),g&&g.m(t,null),append(t,u)},p(e,n){1&n&&d!==(d=e[5].label+"")&&set_data(r,d),1&n&&p!==(p=e[5].tip+"")&&set_data(a,p),h===(h=f(e))&&g?g.p(e,n):(g&&g.d(1),g=h&&h(e),g&&(g.c(),g.m(t,u)))},d(e){e&&detach(t),g&&g.d()}}}function create_fragment$6(e){let t,n=e[0],r=[];for(let i=0;i{e.target.checked?i.turnOnSafeMode():i.turnOffSafeMode()}},{label:_("store_url"),tip:`${_("store_url_tip")} ${defaultConfig.PLUGIN_STORE_URL}`,type:"input",value:r.get(PLUGIN_STORE_URL),onChange:e=>{r.set(PLUGIN_STORE_URL,e.target.value)}}];return onMount((()=>{const e=r.get(PLUGIN_SYSTEM_SAFE_MODE_ENABLED);n(0,o[0].checked=e,o);const t=r.get(PLUGIN_SYSTEM_AUTO_UPDATE);n(0,o[1].checked=t,o)})),[o,function(e,t){e[t].checked=this.checked,n(0,o)},function(e,t){e[t].value=this.value,n(0,o)}]}class Setting_common extends SvelteComponent{constructor(e){super(),init(this,e,instance$6,create_fragment$6,safe_not_equal,{})}}const settingList_svelte_svelte_type_style_lang="";function get_each_context$2(e,t,n){const r=e.slice();return r[10]=t[n],r[11]=t,r[12]=n,r}function create_if_block$3(e){let t,n,r,i,o,a,s,c,l,u,d,p,f,h,g,m,y,v=e[10].name+"",b=e[10].version+"",E=(e[10].description||_("nodescription"))+"";function w(...t){return e[4](e[10],...t)}function S(){e[5].call(h,e[11],e[12])}return{c(){t=element("label"),n=element("div"),r=text(v),i=space(),o=text(b),a=space(),s=element("span"),s.textContent=`${_("uninstall")}`,c=space(),l=element("div"),u=text(E),d=space(),p=element("span"),f=space(),h=element("input"),g=space(),attr(s,"class","remove svelte-bwhxpp"),attr(l,"class","b3-label__text"),attr(n,"class","plugin fn__flex-1 svelte-bwhxpp"),attr(p,"class","fn__space"),attr(h,"class","b3-switch fn__flex-center"),attr(h,"id","fullWidth"),attr(h,"type","checkbox"),attr(t,"class","fn__flex b3-label")},m(_,v){insert(_,t,v),append(t,n),append(n,r),append(n,i),append(n,o),append(n,a),append(n,s),append(n,c),append(n,l),append(l,u),append(t,d),append(t,p),append(t,f),append(t,h),h.checked=e[10].enabled,append(t,g),m||(y=[listen(s,"click",w),listen(h,"change",S),listen(h,"change",(function(){is_function(e[1](e[10].key))&&e[1](e[10].key).apply(this,arguments)}))],m=!0)},p(t,n){e=t,1&n&&v!==(v=e[10].name+"")&&set_data(r,v),1&n&&b!==(b=e[10].version+"")&&set_data(o,b),1&n&&E!==(E=(e[10].description||_("nodescription"))+"")&&set_data(u,E),1&n&&(h.checked=e[10].enabled)},d(e){e&&detach(t),m=!1,run_all(y)}}}function create_each_block$2(e){let t,n=!e[10].hidden&&create_if_block$3(e);return{c(){n&&n.c(),t=empty()},m(e,r){n&&n.m(e,r),insert(e,t,r)},p(e,r){e[10].hidden?n&&(n.d(1),n=null):n?n.p(e,r):(n=create_if_block$3(e),n.c(),n.m(t.parentNode,t))},d(e){n&&n.d(e),e&&detach(t)}}}function create_fragment$5(e){let t,n,r=e[0],i=[];for(let o=0;o{n(3,a=i.getPlugins())},c=createEventDispatcher(),l=async(e,t)=>{t.preventDefault(),t.stopPropagation(),await o.unloadPlugin(e),await i.uninstallPlugin(e),await i.initStorage(),s()};onMount((async()=>{await i.initStorage(),s()}));return e.$$.update=()=>{8&e.$$.dirty&&n(0,r=a.filter((e=>e.script)))},[r,e=>async t=>{const n=i.get(PLUGIN_SYSTEM_SAFE_MODE_ENABLED),r=t.target.checked;await i.setPluginEnabled(e,r),n||(r?o.loadPlugin(e):o.unloadPlugin(e),c("update"))},l,a,(e,t)=>l(e.key,t),function(e,t){e[t].enabled=this.checked,n(0,r),n(3,a)}]}class Setting_list extends SvelteComponent{constructor(e){super(),init(this,e,instance$5,create_fragment$5,safe_not_equal,{})}}var __defProp$9=Object.defineProperty,__getOwnPropDesc$9=Object.getOwnPropertyDescriptor,__decorateClass$9=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$9(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$9(t,n,o),o},__decorateParam$6=(e,t)=>(n,r)=>t(n,r,e);let Store=class{constructor(e){this.storageManager=e,this.plugins=[],this.pluginStatus=[]}async init(){this.plugins=[],this.pluginStatus=[],await Promise.all([this.loadPluginsFromUrl(),this.storageManager.initStorage()]);const e=this.storageManager.getPlugins(),t=[];for(const n of this.plugins){const r={...n,isExist:!1,needUpgrade:!1};e.find((e=>e.key===n.key)),t.push(r)}this.pluginStatus=t}getStoreUrl(){return this.storageManager.get(PLUGIN_STORE_URL)}getPlugins(){return this.plugins}async loadPlugins(){return await this.init(),this.getPluginsWithStatus()}getPluginsWithStatus(){return this.pluginStatus}async loadPluginsFromUrl(){var t,n;const r=this.getStoreUrl();if(!r)return;let i;try{i=await request.get(r+"/plugins.json",{headers:{"Cache-Control":"no-cache"}})}catch(e){return void console.error(e)}const o=[];if(Array.isArray(null==(t=i.data)?void 0:t.plugins))for(const e of(null==(n=i.data)?void 0:n.plugins)||{}){const t=this.getPluginManifest(`${r}/${e}`);o.push(t)}this.plugins=await Promise.all(o)}async getPluginByUrl(e){return Promise.all([this.getPluginManifest(e),this.getPluginMainJs(e)]).then((e=>({manifest:e[0],mainJs:e[1]})))}async getPluginManifest(t){try{return(await request.get(`${t}/manifest.json`,{headers:{"Content-Type":"application/json","Cache-Control":"no-cache"}})).data}catch(e){return console.error(e),null}}async getPluginMainJs(t){try{return(await request.get(`${t}/main.js`,{headers:{"Content-Type":"text/plain","Cache-Control":"no-cache"}})).data}catch(e){return console.error(e),null}}async getPluginReadme(t){const n=`${this.getStoreUrl()}/${t}`;try{return(await request.get(`${n}/README.md`,{headers:{"Content-Type":"text/plain","Cache-Control":"no-cache"}})).data}catch(e){return console.error(e),null}}async downloadPlugin(e){await sleep(500);const t=await this.getPluginByUrl(`${this.getStoreUrl()}/${e}`),n=t.manifest,r=t.mainJs;return await Promise.all([FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${e}`,null,!0),FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${e}/manifest.json`,JSON.stringify(n),!1),FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${e}/main.js`,r,!1)])}};function create_fragment$4(e){let t,n,r,i;const o=e[3].default,a=create_slot(o,e,e[2],null);return{c(){t=element("button"),a&&a.c(),t.disabled=e[1],attr(t,"class","b3-button")},m(o,s){insert(o,t,s),a&&a.m(t,null),n=!0,r||(i=listen(t,"click",(function(){is_function(e[0])&&e[0].apply(this,arguments)})),r=!0)},p(r,[i]){e=r,a&&a.p&&(!n||4&i)&&update_slot_base(a,o,e,e[2],n?get_slot_changes(o,e[2],i,null):get_all_dirty_from_scope(e[2]),null),(!n||2&i)&&(t.disabled=e[1])},i(e){n||(transition_in(a,e),n=!0)},o(e){transition_out(a,e),n=!1},d(e){e&&detach(t),a&&a.d(e),r=!1,i()}}}function instance$4(e,t,n){let{$$slots:r={},$$scope:i}=t,{onClick:o=null}=t,{disabled:a=!1}=t;return e.$$set=e=>{"onClick"in e&&n(0,o=e.onClick),"disabled"in e&&n(1,a=e.disabled),"$$scope"in e&&n(2,i=e.$$scope)},[o,a,i,r]}Store=__decorateClass$9([injectable(),__decorateParam$6(0,inject(TYPES.StorageManager))],Store);class Button extends SvelteComponent{constructor(e){super(),init(this,e,instance$4,create_fragment$4,safe_not_equal,{onClick:0,disabled:1})}}const settingPreview_svelte_svelte_type_style_lang="";function create_if_block_4$1(e){let t,n,r,i,o,a,s=_("url")+"",c=e[0].url+"";return{c(){t=element("div"),n=text(s),r=text(": "),i=element("a"),o=text(c),attr(i,"href",a=e[0].url),attr(i,"target","_blank"),attr(i,"rel","noreferrer"),attr(t,"class","plugin-item")},m(e,a){insert(e,t,a),append(t,n),append(t,r),append(t,i),append(i,o)},p(e,t){1&t&&c!==(c=e[0].url+"")&&set_data(o,c),1&t&&a!==(a=e[0].url)&&attr(i,"href",a)},d(e){e&&detach(t)}}}function create_if_block_3$1(e){let t,n,r,i,o=_("author")+"",a=e[0].author+"";return{c(){t=element("div"),n=text(o),r=text(": "),i=text(a),attr(t,"class","plugin-item")},m(e,o){insert(e,t,o),append(t,n),append(t,r),append(t,i)},p(e,t){1&t&&a!==(a=e[0].author+"")&&set_data(i,a)},d(e){e&&detach(t)}}}function create_if_block_2$1(e){let t,n,r,i,o=_("version")+"",a=e[0].version+"";return{c(){t=element("div"),n=text(o),r=text(": "),i=text(a),attr(t,"class","plugin-item")},m(e,o){insert(e,t,o),append(t,n),append(t,r),append(t,i)},p(e,t){1&t&&a!==(a=e[0].version+"")&&set_data(i,a)},d(e){e&&detach(t)}}}function create_if_block_1$2(e){let t,n,r,i,o=_("description")+"",a=e[0].description+"";return{c(){t=element("div"),n=text(o),r=text(": "),i=text(a),attr(t,"class","plugin-item")},m(e,o){insert(e,t,o),append(t,n),append(t,r),append(t,i)},p(e,t){1&t&&a!==(a=e[0].description+"")&&set_data(i,a)},d(e){e&&detach(t)}}}function create_else_block$2(e){let t,n,r=e[2]()+"";return{c(){t=new HtmlTag(!1),n=empty(),t.a=n},m(e,i){t.m(r,e,i),insert(e,n,i)},p(e,n){4&n&&r!==(r=e[2]()+"")&&t.p(r)},d(e){e&&detach(n),e&&t.d()}}}function create_if_block$2(e){let t;return{c(){t=element("span"),t.textContent=`${_("readme")}`},m(e,n){insert(e,t,n)},p:noop,d(e){e&&detach(t)}}}function create_fragment$3(e){let t,n,r,i,o,a,s,c,l,u,d,p,f,h,g,m,y,v,b,E,w,S,$,A,T,O,P=e[0].name+"",I=e[0].key+"",N=_("goBack")+"",R=e[0].url&&create_if_block_4$1(e),k=e[0].author&&create_if_block_3$1(e),C=e[0].version&&create_if_block_2$1(e),x=e[0].description&&create_if_block_1$2(e);function L(e,t){return e[1]?create_if_block$2:create_else_block$2}let D=L(e),B=D(e);return{c(){t=element("div"),n=element("div"),r=element("div"),i=element("div"),o=text(P),a=space(),s=element("div"),c=text("("),l=text(I),u=text(")"),d=space(),p=element("button"),f=svg_element("svg"),h=svg_element("use"),g=text(N),m=space(),y=element("div"),R&&R.c(),v=space(),k&&k.c(),b=space(),C&&C.c(),E=space(),x&&x.c(),w=space(),S=element("hr"),$=space(),A=element("div"),B.c(),attr(i,"class","plugin-name svelte-bj9chc"),attr(s,"class","plugin-key svelte-bj9chc"),xlink_attr(h,"xlink:href","#iconBack"),attr(f,"class","go-back-icon svelte-bj9chc"),attr(p,"class","go-back b3-button svelte-bj9chc"),attr(r,"class","plugin-info svelte-bj9chc"),attr(y,"class","plugin-manifest svelte-bj9chc"),attr(n,"class","plugin-basic"),attr(A,"class","plugin-readme b3-typography svelte-bj9chc"),attr(t,"class","plugin-detail svelte-bj9chc")},m(_,P){insert(_,t,P),append(t,n),append(n,r),append(r,i),append(i,o),append(r,a),append(r,s),append(s,c),append(s,l),append(s,u),append(r,d),append(r,p),append(p,f),append(f,h),append(p,g),append(n,m),append(n,y),R&&R.m(y,null),append(y,v),k&&k.m(y,null),append(y,b),C&&C.m(y,null),append(y,E),x&&x.m(y,null),append(t,w),append(t,S),append(t,$),append(t,A),B.m(A,null),T||(O=listen(p,"click",e[5]),T=!0)},p(e,[t]){1&t&&P!==(P=e[0].name+"")&&set_data(o,P),1&t&&I!==(I=e[0].key+"")&&set_data(l,I),e[0].url?R?R.p(e,t):(R=create_if_block_4$1(e),R.c(),R.m(y,v)):R&&(R.d(1),R=null),e[0].author?k?k.p(e,t):(k=create_if_block_3$1(e),k.c(),k.m(y,b)):k&&(k.d(1),k=null),e[0].version?C?C.p(e,t):(C=create_if_block_2$1(e),C.c(),C.m(y,E)):C&&(C.d(1),C=null),e[0].description?x?x.p(e,t):(x=create_if_block_1$2(e),x.c(),x.m(y,null)):x&&(x.d(1),x=null),D===(D=L(e))&&B?B.p(e,t):(B.d(1),B=D(e),B&&(B.c(),B.m(A,null)))},i:noop,o:noop,d(e){e&&detach(t),R&&R.d(),k&&k.d(),C&&C.d(),x&&x.d(),B.d(),T=!1,O()}}}function instance$3(e,t,n){let r;const i=createEventDispatcher();let o=!0,{plugin:a}=t;let s;const c=window.Lute.New();onMount((()=>{(async()=>{n(4,s=await container.get("Store").getPluginReadme(a.key)),n(1,o=!1)})()}));const l=()=>{i("goback")};return e.$$set=e=>{"plugin"in e&&n(0,a=e.plugin)},e.$$.update=()=>{16&e.$$.dirty&&n(2,r=()=>s?c.Md2HTML(s):"")},[a,o,r,l,s,()=>l()]}class Setting_preview extends SvelteComponent{constructor(e){super(),init(this,e,instance$3,create_fragment$3,safe_not_equal,{plugin:0})}}function get_each_context$1(e,t,n){const r=e.slice();return r[11]=t[n],r}function create_else_block_2(e){let t,n;return t=new Setting_preview({props:{plugin:e[3]}}),t.$on("goback",e[9]),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(e,n){const r={};8&n&&(r.plugin=e[3]),t.$set(r)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_if_block_1$1(e){let t,n,r=e[0],i=[];for(let a=0;atransition_out(i[e],1,1,(()=>{i[e]=null}));return{c(){t=element("div");for(let e=0;e{a[c]=null})),check_outros(),n=a[t],n?n.p(e,i):(n=a[t]=o[t](e),n.c()),transition_in(n,1),n.m(r.parentNode,r))},i(e){i||(transition_in(n),i=!0)},o(e){transition_out(n),i=!1},d(e){a[t].d(e),e&&detach(r)}}}function create_if_block_2(e){let t,n;return t=new Button({props:{disabled:!0,$$slots:{default:[create_default_slot]},$$scope:{ctx:e}}}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(e,n){const r={};16384&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_default_slot_3(e){let t,n=_("download")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop,d(e){e&&detach(t)}}}function create_else_block$1(e){let t,n;return t=new Button({props:{disabled:!0,$$slots:{default:[create_default_slot_2]},$$scope:{ctx:e}}}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(e,n){const r={};16384&n&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_if_block_4(e){let t,n;function r(){return e[7](e[11])}return t=new Button({props:{onClick:r,$$slots:{default:[create_default_slot_1]},$$scope:{ctx:e}}}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(n,i){e=n;const o={};1&i&&(o.onClick=r),16384&i&&(o.$$scope={dirty:i,ctx:e}),t.$set(o)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_default_slot_2(e){let t,n=_("downloaded")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop,d(e){e&&detach(t)}}}function create_default_slot_1(e){let t,n=_("upgrade")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop,d(e){e&&detach(t)}}}function create_default_slot(e){let t,n=_("downloading")+"";return{c(){t=text(n)},m(e,n){insert(e,t,n)},p:noop,d(e){e&&detach(t)}}}function create_each_block$1(e){let t,n,r,i,o,a,s,c,l,u,d,p,f,h,g,m,_,y,v=e[11].name+"",b=e[11].version+"",E=(e[11].description||"")+"";function w(...t){return e[6](e[11],...t)}const S=[create_if_block_2,create_if_block_3,create_else_block_1],$=[];function A(e,t){return e[2][e[11].key]?0:e[11].isExist?1:2}return f=A(e),h=$[f]=S[f](e),{c(){t=element("label"),n=element("div"),r=element("a"),i=text(v),o=space(),a=text(b),s=space(),c=element("div"),l=text(E),u=space(),d=element("span"),p=space(),h.c(),g=space(),attr(r,"href","javascript:void(0)"),attr(r,"class",""),attr(c,"class","b3-label__text"),attr(n,"class","fn__flex-1"),attr(d,"class","fn__space"),attr(t,"class","fn__flex b3-label")},m(e,h){insert(e,t,h),append(t,n),append(n,r),append(r,i),append(n,o),append(n,a),append(n,s),append(n,c),append(c,l),append(t,u),append(t,d),append(t,p),$[f].m(t,null),append(t,g),m=!0,_||(y=listen(r,"click",w),_=!0)},p(n,r){e=n,(!m||1&r)&&v!==(v=e[11].name+"")&&set_data(i,v),(!m||1&r)&&b!==(b=e[11].version+"")&&set_data(a,b),(!m||1&r)&&E!==(E=(e[11].description||"")+"")&&set_data(l,E);let o=f;f=A(e),f===o?$[f].p(e,r):(group_outros(),transition_out($[o],1,1,(()=>{$[o]=null})),check_outros(),h=$[f],h?h.p(e,r):(h=$[f]=S[f](e),h.c()),transition_in(h,1),h.m(t,g))},i(e){m||(transition_in(h),m=!0)},o(e){transition_out(h),m=!1},d(e){e&&detach(t),$[f].d(),_=!1,y()}}}function create_fragment$2(e){let t,n,r,i;const o=[create_if_block$1,create_if_block_1$1,create_else_block_2],a=[];function s(e,t){return e[1]?0:e[3]?2:1}return n=s(e),r=a[n]=o[n](e),{c(){t=element("div"),r.c(),attr(t,"class","b3-label fn__flex")},m(e,r){insert(e,t,r),a[n].m(t,null),i=!0},p(e,[i]){let c=n;n=s(e),n===c?a[n].p(e,i):(group_outros(),transition_out(a[c],1,1,(()=>{a[c]=null})),check_outros(),r=a[n],r?r.p(e,i):(r=a[n]=o[n](e),r.c()),transition_in(r,1),r.m(t,null))},i(e){i||(transition_in(r),i=!0)},o(e){transition_out(r),i=!1},d(e){e&&detach(t),a[n].d()}}}function instance$2(e,t,n){const r=container.get(TYPES.Store);let i=[],o=!0;const a={};onMount((async()=>{n(0,i=await r.loadPlugins()),n(1,o=!1)}));const s=async e=>{if(!a[e])try{n(2,a[e]=!0,a),await r.downloadPlugin(e);const t=i.find((t=>t.key===e));t&&(t.isExist=!0,t.needUpgrade=!1)}finally{n(2,a[e]=!1,a)}};let c=null;const l=(e,t)=>{n(3,c=t),e.stopPropagation(),e.preventDefault()};return[i,o,a,c,s,l,(e,t)=>l(t,e),e=>s(e.key),e=>s(e.key),()=>n(3,c=null)]}class Setting_store extends SvelteComponent{constructor(e){super(),init(this,e,instance$2,create_fragment$2,safe_not_equal,{})}}function create_fragment$1(e){let t;return{c(){t=element("div"),attr(t,"id","setting-custom-render")},m(e,n){insert(e,t,n)},p:noop,i:noop,o:noop,d(e){e&&detach(t)}}}function instance$1(e,t,n){let r,{render:i}=t;return onMount((()=>{n(1,r=document.createElement("div")),document.getElementById("setting-custom-render").appendChild(r),i(r)})),e.$$set=e=>{"render"in e&&n(0,i=e.render)},e.$$.update=()=>{if(3&e.$$.dirty){document.getElementById("setting-custom-render")&&(r&&r.remove(),n(1,r=document.createElement("div")),document.getElementById("setting-custom-render").appendChild(r),i(r))}},[i,r]}class Setting_custom extends SvelteComponent{constructor(e){super(),init(this,e,instance$1,create_fragment$1,safe_not_equal,{render:0})}}function get_each_context(e,t,n){const r=e.slice();return r[13]=t[n],r}function get_each_context_1(e,t,n){const r=e.slice();return r[13]=t[n],r}function create_each_block_1(e){let t,n,r,i,o,a,s=e[13].name+"";function c(){return e[6](e[13])}return{c(){t=element("li"),n=element("span"),r=text(s),attr(n,"class","b3-list-item__text"),attr(t,"data-name",e[13].key),attr(t,"class",i=e[0].key===e[13].key?"b3-list-item--focus b3-list-item b3-list-item--big":"b3-list-item b3-list-item--big")},m(e,i){insert(e,t,i),append(t,n),append(n,r),o||(a=listen(t,"click",c),o=!0)},p(n,r){e=n,1&r&&i!==(i=e[0].key===e[13].key?"b3-list-item--focus b3-list-item b3-list-item--big":"b3-list-item b3-list-item--big")&&attr(t,"class",i)},d(e){e&&detach(t),o=!1,a()}}}function create_if_block_1(e){let t;return{c(){t=element("hr"),set_style(t,"margin","12px")},m(e,n){insert(e,t,n)},d(e){e&&detach(t)}}}function create_each_block(e){let t,n,r,i,o,a,s,c,l=e[13].name+"";function u(){return e[7](e[13])}return{c(){t=element("li"),n=element("span"),r=text(l),i=space(),attr(n,"class","b3-list-item__text"),attr(t,"data-name",o=e[13].key),attr(t,"class",a=e[0].key===e[13].key?"b3-list-item--focus b3-list-item b3-list-item--big":"b3-list-item b3-list-item--big")},m(e,o){insert(e,t,o),append(t,n),append(n,r),append(t,i),s||(c=listen(t,"click",u),s=!0)},p(n,i){e=n,2&i&&l!==(l=e[13].name+"")&&set_data(r,l),2&i&&o!==(o=e[13].key)&&attr(t,"data-name",o),3&i&&a!==(a=e[0].key===e[13].key?"b3-list-item--focus b3-list-item b3-list-item--big":"b3-list-item b3-list-item--big")&&attr(t,"class",a)},d(e){e&&detach(t),s=!1,c()}}}function create_else_block(e){let t,n;return t=new Setting_custom({props:{render:e[0].render}}),{c(){create_component(t.$$.fragment)},m(e,r){mount_component(t,e,r),n=!0},p(e,n){const r={};1&n&&(r.render=e[0].render),t.$set(r)},i(e){n||(transition_in(t.$$.fragment,e),n=!0)},o(e){transition_out(t.$$.fragment,e),n=!1},d(e){destroy_component(t,e)}}}function create_if_block(e){let t,n,r;var i=e[0].component;return i&&(t=construct_svelte_component(i,{}),t.$on("update",e[8])),{c(){t&&create_component(t.$$.fragment),n=empty()},m(e,i){t&&mount_component(t,e,i),insert(e,n,i),r=!0},p(e,r){if(i!==(i=e[0].component)){if(t){group_outros();const e=t;transition_out(e.$$.fragment,1,0,(()=>{destroy_component(e,1)})),check_outros()}i?(t=construct_svelte_component(i,{}),t.$on("update",e[8]),create_component(t.$$.fragment),transition_in(t.$$.fragment,1),mount_component(t,n.parentNode,n)):t=null}},i(e){r||(t&&transition_in(t.$$.fragment,e),r=!0)},o(e){t&&transition_out(t.$$.fragment,e),r=!1},d(e){e&&detach(n),t&&destroy_component(t,e)}}}function create_fragment(e){let t,n,r,i,o,a,s,c,l,u,d,p=e[2],f=[];for(let b=0;b0&&create_if_block_1(),g=e[1],m=[];for(let b=0;b0?h||(h=create_if_block_1(),h.c(),h.m(r,o)):h&&(h.d(1),h=null),11&t){let n;for(g=e[1],n=0;n{y[n]=null})),check_outros(),l=y[c],l?l.p(e,t):(l=y[c]=_[c](e),l.c()),transition_in(l,1),l.m(s,null)),(!d||1&t&&u!==(u=e[0].key))&&attr(s,"data-name",u)},i(e){d||(transition_in(l),d=!0)},o(e){transition_out(l),d=!1},d(e){e&&detach(t),destroy_each(f,e),h&&h.d(),destroy_each(m,e),y[c].d()}}}function instance(e,t,n){let r;const i=[{key:"common",name:_("menu_common"),type:"internal",component:Setting_common},{key:"list",name:_("menu_list"),type:"internal",component:Setting_list},{key:"store",name:_("menu_store"),type:"internal",component:Setting_store}],o=container.get(TYPES.SettingManager),a=container.get(TYPES.StorageManager).getThirdPartyPlugins();let s=o.getSettingRenders();const c=e=>n(0,u=e),l=()=>{n(5,s=[...o.getSettingRenders()])};let u=i[0];return e.$$.update=()=>{32&e.$$.dirty&&n(1,r=s.map((e=>{return{key:e.key,name:(t=e.key,null==(n=a.find((e=>e.key===t)))?void 0:n.name),component:Setting_common,type:"custom",render:e.value};var t,n})))},[u,r,i,c,l,s,e=>c(e),e=>c(e),()=>l()]}class Setting extends SvelteComponent{constructor(e){super(),init(this,e,instance,create_fragment,safe_not_equal,{})}}class InternalSettingPlugin extends Plugin{constructor(){super(),this.svg=''}onload(){const e=document.createElement("button");e.setAttribute("aria-label",_("plugin_system")),e.classList.add("toolbar__item","b3-tooltips","b3-tooltips__sw"),e.insertAdjacentHTML("beforeend",this.svg),e.addEventListener("click",(e=>{new Menu("internalSettingButton").addItem(new MenuItem({label:_("plugin_system_setting"),icon:"iconEdit",click:()=>showSettingDialog()})).addSeparator().addItem(new MenuItem({label:_("reload"),icon:"iconRefresh",click:()=>window.location.reload()})).showAtMouseEvent(e),e.stopPropagation()})),addToolbarRight(e),this.registerCommand({command:"Show plugin system conifg",description:_("show_plugin_system_config"),shortcut:"command+option+p",callback:()=>showSettingDialog()}),this.registerCommand({command:"Reload Window",description:_("reload_window"),callback:()=>window.location.reload()})}}function showSettingDialog(){new Dialog({title:_("plugin_system_setting"),content:'
',width:"90vw",height:"80vh"}),setTimeout((()=>{new Setting({target:document.getElementById("plugin-settings")})}))}const internalPlugins=[{key:"setting",name:"setting",plugin:InternalSettingPlugin,enabled:!0,hidden:!0,version:"1.0.0"},{key:"commandPanel",name:"commandPanel",plugin:CommandPanelPlugin,enabled:!0,hidden:!0,version:"1.0.0"}];function isHighSurrogate$1(e){return e>=55296&&e<=56319}function isLowSurrogate$1(e){return e>=56320&&e<=57343}var truncate$2=function(e,t,n){if("string"!=typeof t)throw new Error("Input must be string");for(var r,i,o=t.length,a=0,s=0;sn)return t.slice(0,s-i.length+1)}return t};function isHighSurrogate(e){return e>=55296&&e<=56319}function isLowSurrogate(e){return e>=56320&&e<=57343}var browser$1=function(e){if("string"!=typeof e)throw new Error("Input must be string");for(var t=e.length,n=0,r=null,i=null,o=0;o=128&&r<=2047?n+=2:r>=2048&&r<=65535&&(n+=3),i=r;return n},truncate$1=truncate$2,getLength=browser$1,browser=truncate$1.bind(null,getLength),truncate=browser,illegalRe=/[\/\?<>\\:\*\|"]/g,controlRe=/[\x00-\x1f\x80-\x9f]/g,reservedRe=/^\.+$/,windowsReservedRe=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,windowsTrailingRe=/[\. ]+$/;function sanitize(e,t){if("string"!=typeof e)throw new Error("Input must be string");var n=e.replace(illegalRe,t).replace(controlRe,t).replace(reservedRe,t).replace(windowsReservedRe,t).replace(windowsTrailingRe,t);return truncate(n,255)}var sanitizeFilename=function(e,t){var n=t&&t.replacement||"",r=sanitize(e,n);return""===n?r:sanitize(r,"")},__defProp$8=Object.defineProperty,__getOwnPropDesc$8=Object.getOwnPropertyDescriptor,__decorateClass$8=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$8(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$8(t,n,o),o},__decorateParam$5=(e,t)=>(n,r)=>t(n,r,e);let StorageManager=class{constructor(e){this.config=Object.assign({},defaultConfig),this.pluginFileManager=e}get(e){return this.config[e]}async set(e,t){return this.config[e]=t,setStorageVal(e,t)}async initStorage(){const e=await getLocalStorage(),t=Object.keys(defaultConfig);for(const n of t)void 0!==e[n]?this.config[n]=e[n]:await setStorageVal(n,defaultConfig[n]);return this.thirdPartyPlugins=await this.pluginFileManager.getAllPlugins(),this.internalPlugins=[...internalPlugins],this.init3rdPartyEnabled(),this.initInternalEnabled(),await this.savePluginsEnabled(),this}init3rdPartyEnabled(){const e=this.get(PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN);for(const t of e)for(const e of this.thirdPartyPlugins)if(e.key===t.key){e.enabled=t.enabled||!1;break}}initInternalEnabled(){const e=this.get(PLUGIN_SYSTEM_PLUGIN);for(const t of e)for(const e of this.internalPlugins)if(e.key===t.key){e.enabled=t.enabled||!1;break}}getPlugins(){return[...this.internalPlugins,...this.thirdPartyPlugins]}getInternalPlugins(){return this.internalPlugins}getThirdPartyPlugins(){return this.thirdPartyPlugins}getPluginByKey(e){return this.getPlugins().find((t=>t.key===e))}async setPluginEnabled(e,t){for(const n of[...this.internalPlugins,...this.thirdPartyPlugins])if(n.key===e){n.enabled=t;break}await this.savePluginsEnabled()}async setSafeModeEnabled(e){return this.set(PLUGIN_SYSTEM_SAFE_MODE_ENABLED,e)}async savePluginsEnabled(){return await this.set(PLUGIN_SYSTEM_PLUGIN,this.internalPlugins.map((e=>({key:e.key,enabled:e.enabled})))),this.set(PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN,this.thirdPartyPlugins.map((e=>({key:e.key,enabled:e.enabled}))))}async setPluginStorage(t,n,r){try{if(this.isFileNameIllegal(n))return void showErrorMessage(`插件${t}存储文件名不合法`);await this.addPluginStorageFolderIfNotExist(t),await FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/.storage/${t}/${n}`,r)}catch(e){showErrorMessage(`插件${t}存储保存失败`,2e3)}}async getPluginStorage(t,n){try{return await FileClient.getInstanceApi().fileApi.getFile(`/data/plugins/.storage/${t}/${n}`)}catch(e){return showErrorMessage(`插件${t}存储保存失败`,2e3),null}}async uninstallPlugin(e){await FileClient.getInstanceApi().fileApi.removeFile(`/data/plugins/${e}`),await FileClient.getInstanceApi().fileApi.removeFile(`/data/plugins//.storage/${e}`)}async addPluginStorageFolderIfNotExist(e){const t=`/data/plugins/.storage/${e}`;await FileClient.getInstanceApi().fileApi.putFile(t,null,!0)}isFileNameIllegal(e){return e!==sanitizeFilename(e)}};StorageManager=__decorateClass$8([injectable(),__decorateParam$5(0,inject(TYPES.PluginFileManager))],StorageManager);var __defProp$7=Object.defineProperty,__getOwnPropDesc$7=Object.getOwnPropertyDescriptor,__decorateClass$7=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$7(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$7(t,n,o),o},__decorateParam$4=(e,t)=>(n,r)=>t(n,r,e);let PluginSystem=class{constructor(e,t,n,r,i){this.pluginLoader=e,this.pslm=t,this.storageManager=n,this.commandManager=r,this.store=i,this.version=VERSION$1}async init(){await this.storageManager.initStorage();const e=this.storageManager.getInternalPlugins();this.pluginLoader.loadEnabledPlugins(e),log(`Loading internal enabled plugins: ${e.map((e=>e.key)).join(",")}`);if(!this.storageManager.get(PLUGIN_SYSTEM_SAFE_MODE_ENABLED)){const e=this.storageManager.getThirdPartyPlugins();log(`Loading 3rd party enabled plugins: ${e.map((e=>e.key)).join(",")}`),this.pluginLoader.loadEnabledPlugins(e)}return this.pslm.localCacheInit(),this}async loadPlugin(e){this.storageManager.setPluginEnabled(e,!0);const t=this.storageManager.getPluginByKey(e);this.pluginLoader.loadPlugin(t)}async unloadPlugin(e){this.storageManager.setPluginEnabled(e,!1),this.pluginLoader.unloadPlugin(e)}async turnOffSafeMode(){this.storageManager.setSafeModeEnabled(!1);const e=this.storageManager.getThirdPartyPlugins();return this.pluginLoader.loadEnabledPlugins(e)}async turnOnSafeMode(){this.storageManager.setSafeModeEnabled(!0);const e=this.storageManager.getThirdPartyPlugins();return this.pluginLoader.unloadThirdPartyPlugins(e)}};PluginSystem=__decorateClass$7([injectable(),__decorateParam$4(0,inject(TYPES.PluginLoader)),__decorateParam$4(1,inject(TYPES.SystemManager)),__decorateParam$4(2,inject(TYPES.StorageManager)),__decorateParam$4(3,inject(TYPES.CommandManager)),__decorateParam$4(4,inject(TYPES.Store))],PluginSystem);var reExports={},re$3={get exports(){return reExports},set exports(e){reExports=e}};const SEMVER_SPEC_VERSION="2.0.0",MAX_LENGTH$2=256,MAX_SAFE_INTEGER$1=Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH=16;var constants$1={SEMVER_SPEC_VERSION:SEMVER_SPEC_VERSION,MAX_LENGTH:MAX_LENGTH$2,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER$1,MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH};const debug$1="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var debug_1=debug$1;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=constants$1,r=debug_1,i=(t=e.exports={}).re=[],o=t.src=[],a=t.t={};let s=0;const c=(e,t,n)=>{const c=s++;r(e,c,t),a[e]=c,o[c]=t,i[c]=new RegExp(t,n?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),c("FULL",`^${o[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),c("LOOSE",`^${o[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),c("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",o[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})\\s+-\\s+(${o[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(re$3,reExports);const opts=["includePrerelease","loose","rtl"],parseOptions$2=e=>e?"object"!=typeof e?{loose:!0}:opts.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};var parseOptions_1=parseOptions$2;const numeric=/^[0-9]+$/,compareIdentifiers$1=(e,t)=>{const n=numeric.test(e),r=numeric.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:ecompareIdentifiers$1(t,e);var identifiers$1={compareIdentifiers:compareIdentifiers$1,rcompareIdentifiers:rcompareIdentifiers};const debug=debug_1,{MAX_LENGTH:MAX_LENGTH$1,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=constants$1,{re:re$2,t:t$2}=reExports,parseOptions$1=parseOptions_1,{compareIdentifiers:compareIdentifiers}=identifiers$1;let SemVer$d=class e{constructor(t,n){if(n=parseOptions$1(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid Version: ${t}`);if(t.length>MAX_LENGTH$1)throw new TypeError(`version is longer than ${MAX_LENGTH$1} characters`);debug("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?re$2[t$2.LOOSE]:re$2[t$2.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>MAX_SAFE_INTEGER||this.major<0)throw new TypeError("Invalid major version");if(this.minor>MAX_SAFE_INTEGER||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>MAX_SAFE_INTEGER||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===compareIdentifiers(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};var semver$1=SemVer$d;const{MAX_LENGTH:MAX_LENGTH}=constants$1,{re:re$1,t:t$1}=reExports,SemVer$c=semver$1,parseOptions=parseOptions_1,parse$6=(e,t)=>{if(t=parseOptions(t),e instanceof SemVer$c)return e;if("string"!=typeof e)return null;if(e.length>MAX_LENGTH)return null;if(!(t.loose?re$1[t$1.LOOSE]:re$1[t$1.FULL]).test(e))return null;try{return new SemVer$c(e,t)}catch(n){return null}};var parse_1=parse$6;const parse$5=parse_1,valid$2=(e,t)=>{const n=parse$5(e,t);return n?n.version:null};var valid_1=valid$2;const parse$4=parse_1,clean$1=(e,t)=>{const n=parse$4(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var clean_1=clean$1;const SemVer$b=semver$1,inc$1=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new SemVer$b(e instanceof SemVer$b?e.version:e,n).inc(t,r).version}catch(i){return null}};var inc_1=inc$1;const SemVer$a=semver$1,compare$b=(e,t,n)=>new SemVer$a(e,n).compare(new SemVer$a(t,n));var compare_1=compare$b;const compare$a=compare_1,eq$3=(e,t,n)=>0===compare$a(e,t,n);var eq_1=eq$3;const parse$3=parse_1,eq$2=eq_1,diff$1=(e,t)=>{if(eq$2(e,t))return null;{const n=parse$3(e),r=parse$3(t),i=n.prerelease.length||r.prerelease.length,o=i?"pre":"",a=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return o+e;return a}};var diff_1=diff$1;const SemVer$9=semver$1,major$1=(e,t)=>new SemVer$9(e,t).major;var major_1=major$1;const SemVer$8=semver$1,minor$1=(e,t)=>new SemVer$8(e,t).minor;var minor_1=minor$1;const SemVer$7=semver$1,patch$1=(e,t)=>new SemVer$7(e,t).patch;var patch_1=patch$1;const parse$2=parse_1,prerelease$1=(e,t)=>{const n=parse$2(e,t);return n&&n.prerelease.length?n.prerelease:null};var prerelease_1=prerelease$1;const compare$9=compare_1,rcompare$1=(e,t,n)=>compare$9(t,e,n);var rcompare_1=rcompare$1;const compare$8=compare_1,compareLoose$1=(e,t)=>compare$8(e,t,!0);var compareLoose_1=compareLoose$1;const SemVer$6=semver$1,compareBuild$3=(e,t,n)=>{const r=new SemVer$6(e,n),i=new SemVer$6(t,n);return r.compare(i)||r.compareBuild(i)};var compareBuild_1=compareBuild$3;const compareBuild$2=compareBuild_1,sort$1=(e,t)=>e.sort(((e,n)=>compareBuild$2(e,n,t)));var sort_1=sort$1;const compareBuild$1=compareBuild_1,rsort$1=(e,t)=>e.sort(((e,n)=>compareBuild$1(n,e,t)));var rsort_1=rsort$1;const compare$7=compare_1,gt$4=(e,t,n)=>compare$7(e,t,n)>0;var gt_1=gt$4;const compare$6=compare_1,lt$3=(e,t,n)=>compare$6(e,t,n)<0;var lt_1=lt$3;const compare$5=compare_1,neq$2=(e,t,n)=>0!==compare$5(e,t,n);var neq_1=neq$2;const compare$4=compare_1,gte$3=(e,t,n)=>compare$4(e,t,n)>=0;var gte_1=gte$3;const compare$3=compare_1,lte$3=(e,t,n)=>compare$3(e,t,n)<=0;var lte_1=lte$3;const eq$1=eq_1,neq$1=neq_1,gt$3=gt_1,gte$2=gte_1,lt$2=lt_1,lte$2=lte_1,cmp$1=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return eq$1(e,n,r);case"!=":return neq$1(e,n,r);case">":return gt$3(e,n,r);case">=":return gte$2(e,n,r);case"<":return lt$2(e,n,r);case"<=":return lte$2(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};var cmp_1=cmp$1;const SemVer$5=semver$1,parse$1=parse_1,{re:re,t:t}=reExports,coerce$1=(e,n)=>{if(e instanceof SemVer$5)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((n=n||{}).rtl){let n;for(;(n=re[t.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),re[t.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;re[t.COERCERTL].lastIndex=-1}else r=e.match(re[t.COERCE]);return null===r?null:parse$1(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,n)};var coerce_1=coerce$1,iterator,hasRequiredIterator,yallist,hasRequiredYallist,lruCache,hasRequiredLruCache,range,hasRequiredRange,comparator,hasRequiredComparator;function requireIterator(){return hasRequiredIterator?iterator:(hasRequiredIterator=1,iterator=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}})}function requireYallist(){if(hasRequiredYallist)return yallist;function e(t){var n=this;if(n instanceof e||(n=new e),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){n.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},e.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},e.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},e.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},e.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(nthis.length&&(n=this.length);for(var i=0,o=this.head;null!==o&&ithis.length&&(n=this.length);for(var i=this.length,o=this.tail;null!==o&&i>n;i--)o=o.prev;for(;null!==o&&i>t;i--,o=o.prev)r.push(o.value);return r},e.prototype.splice=function(e,n,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,o=this.head;null!==o&&i1;const p=(e,t,n)=>{const r=e[l].get(t);if(r){const t=r.value;if(f(e,t)){if(g(e,r),!e[i])return}else n&&(e[u]&&(r.value.now=Date.now()),e[c].unshiftNode(r));return t.value}},f=(e,t)=>{if(!t||!t.maxAge&&!e[o])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[o]&&n>e[o]},h=e=>{if(e[n]>e[t])for(let r=e[c].tail;e[n]>e[t]&&null!==r;){const t=r.prev;g(e,r),r=t}},g=(e,t)=>{if(t){const r=t.value;e[a]&&e[a](r.key,r.value),e[n]-=r.length,e[l].delete(r.key),e[c].removeNode(t)}};class m{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const _=(e,t,n,r)=>{let o=n.value;f(e,o)&&(g(e,n),e[i]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};return lruCache=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const n=e.length||d;if(this[r]="function"!=typeof n?d:n,this[i]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[o]=e.maxAge||0,this[a]=e.dispose,this[s]=e.noDisposeOnSet||!1,this[u]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,h(this)}get max(){return this[t]}set allowStale(e){this[i]=!!e}get allowStale(){return this[i]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[o]=e,h(this)}get maxAge(){return this[o]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[r]&&(this[r]=e,this[n]=0,this[c].forEach((e=>{e.length=this[r](e.value,e.key),this[n]+=e.length}))),h(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[c].length}rforEach(e,t){t=t||this;for(let n=this[c].tail;null!==n;){const r=n.prev;_(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[c].head;null!==n;){const r=n.next;_(this,e,n,t),n=r}}keys(){return this[c].toArray().map((e=>e.key))}values(){return this[c].toArray().map((e=>e.value))}reset(){this[a]&&this[c]&&this[c].length&&this[c].forEach((e=>this[a](e.key,e.value))),this[l]=new Map,this[c]=new e,this[n]=0}dump(){return this[c].map((e=>!f(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[c]}set(e,i,u){if((u=u||this[o])&&"number"!=typeof u)throw new TypeError("maxAge must be a number");const d=u?Date.now():0,p=this[r](i,e);if(this[l].has(e)){if(p>this[t])return g(this,this[l].get(e)),!1;const r=this[l].get(e).value;return this[a]&&(this[s]||this[a](e,r.value)),r.now=d,r.maxAge=u,r.value=i,this[n]+=p-r.length,r.length=p,this.get(e),h(this),!0}const f=new m(e,i,p,d,u);return f.length>this[t]?(this[a]&&this[a](e,i),!1):(this[n]+=f.length,this[c].unshift(f),this[l].set(e,this[c].head),h(this),!0)}has(e){if(!this[l].has(e))return!1;const t=this[l].get(e).value;return!f(this,t)}get(e){return p(this,e,!0)}peek(e){return p(this,e,!1)}pop(){const e=this[c].tail;return e?(g(this,e),e.value):null}del(e){g(this,this[l].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[l].forEach(((e,t)=>p(this,t,!1)))}}}function requireRange(){if(hasRequiredRange)return range;hasRequiredRange=1;class e{constructor(t,i){if(i=n(i),t instanceof e)return t.loose===!!i.loose&&t.includePrerelease===!!i.includePrerelease?t:new e(t.raw,i);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=t,this.set=t.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!d(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&p(t[0])){this.set=[t];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,o=t.get(n);if(o)return o;const p=this.options.loose,f=p?a[s.HYPHENRANGELOOSE]:a[s.HYPHENRANGE];e=e.replace(f,$(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(a[s.COMPARATORTRIM],c),i("comparator trim",e);let g=(e=(e=(e=e.replace(a[s.TILDETRIM],l)).replace(a[s.CARETTRIM],u)).split(/\s+/).join(" ")).split(" ").map((e=>h(e,this.options))).join(" ").split(/\s+/).map((e=>S(e,this.options)));p&&(g=g.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(a[s.COMPARATORLOOSE]))))),i("range list",g);const m=new Map,_=g.map((e=>new r(e,this.options)));for(const t of _){if(d(t))return[t];m.set(t.value,t)}m.size>1&&m.has("")&&m.delete("");const y=[...m.values()];return t.set(n,y),y}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>f(e,n)&&t.set.some((t=>f(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new o(e,this.options)}catch(t){return!1}for(let n=0;n"<0.0.0-0"===e.value,p=e=>""===e.value,f=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},h=(e,t)=>(i("comp",e,t),e=y(e,t),i("caret",e),e=m(e,t),i("tildes",e),e=b(e,t),i("xrange",e),e=w(e,t),i("stars",e),e),g=e=>!e||"x"===e.toLowerCase()||"*"===e,m=(e,t)=>e.trim().split(/\s+/).map((e=>_(e,t))).join(" "),_=(e,t)=>{const n=t.loose?a[s.TILDELOOSE]:a[s.TILDE];return e.replace(n,((t,n,r,o,a)=>{let s;return i("tilde",e,t,n,r,o,a),g(n)?s="":g(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:g(o)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(i("replaceTilde pr",a),s=`>=${n}.${r}.${o}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${o} <${n}.${+r+1}.0-0`,i("tilde return",s),s}))},y=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{i("caret",e,t);const n=t.loose?a[s.CARETLOOSE]:a[s.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,o,a,s)=>{let c;return i("caret",e,t,n,o,a,s),g(n)?c="":g(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:g(a)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:s?(i("replaceCaret pr",s),c="0"===n?"0"===o?`>=${n}.${o}.${a}-${s} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a}-${s} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a}-${s} <${+n+1}.0.0-0`):(i("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${a}${r} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a} <${+n+1}.0.0-0`),i("caret return",c),c}))},b=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>E(e,t))).join(" ")),E=(e,t)=>{e=e.trim();const n=t.loose?a[s.XRANGELOOSE]:a[s.XRANGE];return e.replace(n,((n,r,o,a,s,c)=>{i("xRange",e,n,r,o,a,s,c);const l=g(o),u=l||g(a),d=u||g(s),p=d;return"="===r&&p&&(r=""),c=t.includePrerelease?"-0":"",l?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(u&&(a=0),s=0,">"===r?(r=">=",u?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?o=+o+1:a=+a+1),"<"===r&&(c="-0"),n=`${r+o}.${a}.${s}${c}`):u?n=`>=${o}.0.0${c} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${a}.0${c} <${o}.${+a+1}.0-0`),i("xRange return",n),n}))},w=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[s.STAR],"")),S=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?s.GTE0PRE:s.GTE0],"")),$=e=>(t,n,r,i,o,a,s,c,l,u,d,p,f)=>`${n=g(r)?"":g(i)?`>=${r}.0.0${e?"-0":""}`:g(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=g(l)?"":g(u)?`<${+l+1}.0.0-0`:g(d)?`<${l}.${+u+1}.0-0`:p?`<=${l}.${u}.${d}-${p}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`}`.trim(),A=(e,t,n)=>{for(let r=0;r0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return range}function requireComparator(){if(hasRequiredComparator)return comparator;hasRequiredComparator=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(n){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new c(e.value,n).test(this.value);if(""===e.operator)return""===e.value||new c(this.value,n).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),l=o(this.semver,"<",e.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=o(this.semver,">",e.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||a&&s||l||u}}comparator=t;const n=parseOptions_1,{re:r,t:i}=reExports,o=cmp_1,a=debug_1,s=semver$1,c=requireRange();return comparator}const Range$9=requireRange(),satisfies$4=(e,t,n)=>{try{t=new Range$9(t,n)}catch(r){return!1}return t.test(e)};var satisfies_1=satisfies$4;const Range$8=requireRange(),toComparators$1=(e,t)=>new Range$8(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));var toComparators_1=toComparators$1;const SemVer$4=semver$1,Range$7=requireRange(),maxSatisfying$1=(e,t,n)=>{let r=null,i=null,o=null;try{o=new Range$7(t,n)}catch(a){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new SemVer$4(r,n)))})),r};var maxSatisfying_1=maxSatisfying$1;const SemVer$3=semver$1,Range$6=requireRange(),minSatisfying$1=(e,t,n)=>{let r=null,i=null,o=null;try{o=new Range$6(t,n)}catch(a){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new SemVer$3(r,n)))})),r};var minSatisfying_1=minSatisfying$1;const SemVer$2=semver$1,Range$5=requireRange(),gt$2=gt_1,minVersion$1=(e,t)=>{e=new Range$5(e,t);let n=new SemVer$2("0.0.0");if(e.test(n))return n;if(n=new SemVer$2("0.0.0-0"),e.test(n))return n;n=null;for(let r=0;r{const t=new SemVer$2(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!gt$2(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!gt$2(n,i)||(n=i)}return n&&e.test(n)?n:null};var minVersion_1=minVersion$1;const Range$4=requireRange(),validRange$1=(e,t)=>{try{return new Range$4(e,t).range||"*"}catch(n){return null}};var valid$1=validRange$1;const SemVer$1=semver$1,Comparator$2=requireComparator(),{ANY:ANY$1}=Comparator$2,Range$3=requireRange(),satisfies$3=satisfies_1,gt$1=gt_1,lt$1=lt_1,lte$1=lte_1,gte$1=gte_1,outside$3=(e,t,n,r)=>{let i,o,a,s,c;switch(e=new SemVer$1(e,r),t=new Range$3(t,r),n){case">":i=gt$1,o=lte$1,a=lt$1,s=">",c=">=";break;case"<":i=lt$1,o=gte$1,a=gt$1,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies$3(e,t,r))return!1;for(let l=0;l{e.semver===ANY$1&&(e=new Comparator$2(">=0.0.0")),u=u||e,d=d||e,i(e.semver,u.semver,r)?u=e:a(e.semver,d.semver,r)&&(d=e)})),u.operator===s||u.operator===c)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===c&&a(e,d.semver))return!1}return!0};var outside_1=outside$3;const outside$2=outside_1,gtr$1=(e,t,n)=>outside$2(e,t,">",n);var gtr_1=gtr$1;const outside$1=outside_1,ltr$1=(e,t,n)=>outside$1(e,t,"<",n);var ltr_1=ltr$1;const Range$2=requireRange(),intersects$1=(e,t,n)=>(e=new Range$2(e,n),t=new Range$2(t,n),e.intersects(t));var intersects_1=intersects$1;const satisfies$2=satisfies_1,compare$2=compare_1;var simplify=(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>compare$2(e,t,n)));for(const u of a){satisfies$2(u,t,n)?(o=u,i||(i=u)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[u,d]of r)u===d?s.push(u):d||u!==a[0]?d?u===a[0]?s.push(`<=${d}`):s.push(`${u} - ${d}`):s.push(`>=${u}`):s.push("*");const c=s.join(" || "),l="string"==typeof t.raw?t.raw:String(t);return c.length{if(e===t)return!0;e=new Range$1(e,n),t=new Range$1(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=simpleSubset(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0},simpleSubset=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===ANY){if(1===t.length&&t[0].semver===ANY)return!0;e=n.includePrerelease?[new Comparator$1(">=0.0.0-0")]:[new Comparator$1(">=0.0.0")]}if(1===t.length&&t[0].semver===ANY){if(n.includePrerelease)return!0;t=[new Comparator$1(">=0.0.0")]}const r=new Set;let i,o,a,s,c,l,u;for(const f of e)">"===f.operator||">="===f.operator?i=higherGT(i,f,n):"<"===f.operator||"<="===f.operator?o=lowerLT(o,f,n):r.add(f.semver);if(r.size>1)return null;if(i&&o){if(a=compare$1(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const f of r){if(i&&!satisfies$1(f,String(i),n))return null;if(o&&!satisfies$1(f,String(o),n))return null;for(const e of t)if(!satisfies$1(f,String(e),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,p=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const f of t){if(u=u||">"===f.operator||">="===f.operator,l=l||"<"===f.operator||"<="===f.operator,i)if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),">"===f.operator||">="===f.operator){if(s=higherGT(i,f,n),s===f&&s!==i)return!1}else if(">="===i.operator&&!satisfies$1(i.semver,String(f),n))return!1;if(o)if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),"<"===f.operator||"<="===f.operator){if(c=lowerLT(o,f,n),c===f&&c!==o)return!1}else if("<="===o.operator&&!satisfies$1(o.semver,String(f),n))return!1;if(!f.operator&&(o||i)&&0!==a)return!1}return!(i&&l&&!o&&0!==a)&&(!(o&&u&&!i&&0!==a)&&(!p&&!d))},higherGT=(e,t,n)=>{if(!e)return t;const r=compare$1(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},lowerLT=(e,t,n)=>{if(!e)return t;const r=compare$1(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var subset_1=subset$1;const internalRe=reExports,constants=constants$1,SemVer=semver$1,identifiers=identifiers$1,parse=parse_1,valid=valid_1,clean=clean_1,inc=inc_1,diff=diff_1,major=major_1,minor=minor_1,patch=patch_1,prerelease=prerelease_1,compare=compare_1,rcompare=rcompare_1,compareLoose=compareLoose_1,compareBuild=compareBuild_1,sort=sort_1,rsort=rsort_1,gt=gt_1,lt=lt_1,eq=eq_1,neq=neq_1,gte=gte_1,lte=lte_1,cmp=cmp_1,coerce=coerce_1,Comparator=requireComparator(),Range=requireRange(),satisfies=satisfies_1,toComparators=toComparators_1,maxSatisfying=maxSatisfying_1,minSatisfying=minSatisfying_1,minVersion=minVersion_1,validRange=valid$1,outside=outside_1,gtr=gtr_1,ltr=ltr_1,intersects=intersects_1,simplifyRange=simplify,subset=subset_1;var semver={parse:parse,valid:valid,clean:clean,inc:inc,diff:diff,major:major,minor:minor,patch:patch,prerelease:prerelease,compare:compare,rcompare:rcompare,compareLoose:compareLoose,compareBuild:compareBuild,sort:sort,rsort:rsort,gt:gt,lt:lt,eq:eq,neq:neq,gte:gte,lte:lte,cmp:cmp,coerce:coerce,Comparator:Comparator,Range:Range,satisfies:satisfies,toComparators:toComparators,maxSatisfying:maxSatisfying,minSatisfying:minSatisfying,minVersion:minVersion,validRange:validRange,outside:outside,gtr:gtr,ltr:ltr,intersects:intersects,simplifyRange:simplifyRange,subset:subset,SemVer:SemVer,re:internalRe.re,src:internalRe.src,tokens:internalRe.t,SEMVER_SPEC_VERSION:constants.SEMVER_SPEC_VERSION,compareIdentifiers:identifiers.compareIdentifiers,rcompareIdentifiers:identifiers.rcompareIdentifiers},__defProp$6=Object.defineProperty,__getOwnPropDesc$6=Object.getOwnPropertyDescriptor,__decorateClass$6=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$6(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$6(t,n,o),o},__decorateParam$3=(e,t)=>(n,r)=>t(n,r,e);let SystemManager=class{constructor(e){this.storageMangager=e}async saveToLocal(e,t){FileClient.getInstanceApi().fileApi.putFile(e,t)}async localCacheInit(){}delayAutoUpgrade(){return!1}async tryUpgrade(){}async getOnlineVersion(){return VERSION$1}async upgrade(){}async compareWidgetVersion(){const e=(await getBazzarWidget()).packages.find((e=>"插件系统"===e.name));if(!e)return;const t=e.version;new semver.SemVer(VERSION$1).compare(t)<0&&new Notification({message:_("new_version_widget"),type:"info"}).show()}};SystemManager=__decorateClass$6([injectable(),__decorateParam$3(0,inject(TYPES.StorageManager))],SystemManager);var __defProp$5=Object.defineProperty,__getOwnPropDesc$5=Object.getOwnPropertyDescriptor,__decorateClass$5=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$5(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$5(t,n,o),o},__decorateParam$2=(e,t)=>(n,r)=>t(n,r,e);let components,PluginLoader=class{constructor(e){this.pluginFileManager=e,this.loadedPlugins=new Map}async loadEnabledPlugins(e){if(e&&e.length)for(const t of e)t.enabled&&await this.loadPlugin(t)}async loadAllInternalPlugins(){internalPlugins.forEach((async e=>{const t=new e.plugin;if(!(t instanceof Plugin))throw new Error(`Failed to load plugin ${e.name}`);log(`Load internal plugin: ${e.key}(${e.name})`),this.addAdditionalMethod(t,e.key,e.name),await t.onload(),this.loadedPlugins.set(e.key,t)}))}async loadAllLocalPlugins(){const e=await this.pluginFileManager.getAllPlugins();if(e)for(const t of e)await this.loadPlugin(t)}async loadPlugin(plugin){if(components||this.generateRequiredModules(),!plugin.enabled||!plugin.plugin&&!plugin.script)return;if(plugin.plugin){const e=new plugin.plugin;if(!(e instanceof Plugin))throw new Error(`Failed to load plugin ${plugin.name}`);return log(`Load internal plugin: ${plugin.key}(${plugin.name})`),this.addAdditionalMethod(e,plugin.key,plugin.name),await e.onload(),void this.loadedPlugins.set(plugin.key,e)}const exports={},module={exports:exports};function run(script,name){return eval("(function anonymous(require,module,exports){".concat(script,"\n})\n//# sourceURL=").concat(name,"\n"))}const __require=e=>{if(components[e])return components[e];throw new Error(`module ${e} not found`)},pluginName=plugin.key;try{run(plugin.script,plugin.key)(__require,module,exports)}catch(e){return void error("Error plugin:"+plugin.key+" ->",e)}let pluginConstructor;if(!(pluginConstructor=(module.exports||exports).default||module.exports))throw new Error(`Failed to load plugin ${pluginName}. No exports detected.`);const plug=new pluginConstructor;if(!(plug instanceof Plugin))throw new Error(`Failed to load plugin ${pluginName}`);this.addAdditionalMethod(plug,plugin.key,pluginName);try{await plug.onload(),this.loadedPlugins.set(plugin.key,plug)}catch(e){error("Error plugin:"+plugin.key+" ->",e)}}async unloadPlugin(e){const t=this.loadedPlugins.get(e);t&&(t.onunload(),container.get(TYPES.CommandManager).unregisterCommandByPlugin(e),container.get(TYPES.SettingManager).unregisterSetting(e),this.loadedPlugins.delete(e))}async unloadThirdPartyPlugins(e){const t=e.filter((e=>e.enabled)).map((e=>e.key));for(const n of t)log(`unload third party plugin: ${n}`),await this.unloadPlugin(n)}async loadThirdPartyEnabledPlugins(e){return this.loadEnabledPlugins(e)}generateRequiredModules(){components={siyuan:api,axios:axios$1}}addAdditionalMethod(e,t,n){e.registerCommand=e=>{container.get(TYPES.CommandManager).registerCommand({...e,plugin:t,pluginName:n})};const r=container.get(TYPES.StorageManager);e.writeStorage=async(e,n)=>await r.setPluginStorage(t,e,n),e.loadStorage=async e=>await r.getPluginStorage(t,e),e.registerSettingRender=e=>{container.get(TYPES.SettingManager).registerSetting(t,e)}}};PluginLoader=__decorateClass$5([injectable(),__decorateParam$2(0,inject(TYPES.PluginFileManager))],PluginLoader);var __defProp$4=Object.defineProperty,__getOwnPropDesc$4=Object.getOwnPropertyDescriptor,__decorateClass$4=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$4(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$4(t,n,o),o};let PluginFileManager=class{async scanPlugins(e){const t=await FileClient.getInstanceApi().fileApi.readDir(e);if(!t)return[];const n=t,r=[];for(const i of n)i.name.startsWith(".")||i.isDir&&await isExists(`/data/plugins/${i.name}/manifest.json`)&&await isExists(`/data/plugins/${i.name}/main.js`)&&r.push(`/data/plugins/${i.name}`);return r}async getFileContent(e){return await FileClient.getInstanceApi().fileApi.getFile(e)||""}async getManifest(t){const n=await this.getFileContent(t);try{return JSON.parse(n)}catch(e){return error("loading manifest: "+t,e),null}}async getScript(e){return await this.getFileContent(e)}async getAllPlugins(){const e=await this.scanPlugins("/data/plugins");if(!e||!e.length)return log("No plugin found in /data/plugins"),[];const t=[];for(const n of e){log("Reading plugin from filesystem: "+n);const e=this.getFolderName(n),r=async()=>{const[t,r]=await Promise.all([this.getManifest(`${n}/manifest.json`),this.getScript(`${n}/main.js`)]);return{...t,script:r,enabled:!1,key:e}};t.push(r())}return await Promise.all(t)||[]}getFolderName(e){const t=e.split("/");for(let n=t.length-1;n>=0;n--)if(t[n])return t[n];return""}};PluginFileManager=__decorateClass$4([injectable()],PluginFileManager);var __defProp$3=Object.defineProperty,__getOwnPropDesc$3=Object.getOwnPropertyDescriptor,__decorateClass$3=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$3(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$3(t,n,o),o};let EventBus=class{constructor(){this.eventListeners={}}destroy(){delete this.eventListeners}on(e,t){return this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t),()=>this.off(e,t)}off(e,t){if(t){for(let n=0;n{e(...t)}))}};EventBus=__decorateClass$3([injectable()],EventBus);var __defProp$2=Object.defineProperty,__getOwnPropDesc$2=Object.getOwnPropertyDescriptor,__decorateClass$2=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$2(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$2(t,n,o),o},__decorateParam$1=(e,t)=>(n,r)=>t(n,r,e);let CommandManager=class{constructor(e){this.commandList=[],this.shortcut=e}registerCommand(e){return this.commandList.some((t=>{t.plugin===e.plugin&&(t.command,e.command)}))?new Error$1("Command is already registered, do not register command repeatly"):e.shortcut&&this.commandList.some((t=>{t.shortcut,e.shortcut}))?new Warning("shortcut has already registered"):(this.commandList.push(e),this.shortcut.registerKeyboardEventFromPlugin(e),void log(`Register plugin: ${e.plugin} command: ${e.command}`))}unregisterCommandByPlugin(e){for(let t=0;t0;function addEvent(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),(function(){n(window.event)}))}function getMods(e,t){for(var n=t.slice(0,t.length-1),r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function compareArray(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,o=0;o=0&&_downKeys.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&_downKeys.splice(0,_downKeys.length),93!==t&&224!==t||(t=91),t in _mods)for(var r in _mods[t]=!1,_modifier)_modifier[r]===t&&(hotkeys[r]=!1)}function unbind(e){if(void 0===e)Object.keys(_handlers).forEach((function(e){return delete _handlers[e]}));else if(Array.isArray(e))e.forEach((function(e){e.key&&eachUnbind(e)}));else if("object"==typeof e)e.key&&eachUnbind(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?getMods(_modifier,t):[];_handlers[s]=_handlers[s].filter((function(e){return!((!r||e.method===r)&&e.scope===n&&compareArray(e.mods,c))}))}}))};function eventHandler(e,t,n,r){var i;if(t.element===r&&(t.scope===n||"all"===t.scope)){for(var o in i=t.mods.length>0,_mods)Object.prototype.hasOwnProperty.call(_mods,o)&&(!_mods[o]&&t.mods.indexOf(+o)>-1||_mods[o]&&-1===t.mods.indexOf(+o))&&(i=!1);(0!==t.mods.length||_mods[16]||_mods[18]||_mods[17]||_mods[91])&&!i&&"*"!==t.shortcut||!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function dispatch(e,t){var n=_handlers["*"],r=e.keyCode||e.which||e.charCode;if(hotkeys.filter.call(this,e)){if(93!==r&&224!==r||(r=91),-1===_downKeys.indexOf(r)&&229!==r&&_downKeys.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(t){var n=modifierMap[t];e[t]&&-1===_downKeys.indexOf(n)?_downKeys.push(n):!e[t]&&_downKeys.indexOf(n)>-1?_downKeys.splice(_downKeys.indexOf(n),1):"metaKey"===t&&e[t]&&3===_downKeys.length&&(e.ctrlKey||e.shiftKey||e.altKey||(_downKeys=_downKeys.slice(_downKeys.indexOf(n))))})),r in _mods){for(var i in _mods[r]=!0,_modifier)_modifier[i]===r&&(hotkeys[i]=!0);if(!n)return}for(var o in _mods)Object.prototype.hasOwnProperty.call(_mods,o)&&(_mods[o]=e[modifierMap[o]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===_downKeys.indexOf(17)&&_downKeys.push(17),-1===_downKeys.indexOf(18)&&_downKeys.push(18),_mods[17]=!0,_mods[18]=!0);var a=getScope();if(n)for(var s=0;s-1}function hotkeys(e,t,n){_downKeys=[];var r=getKeys(e),i=[],o="all",a=document,s=0,c=!1,l=!0,u="+",d=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(o=t.scope),t.element&&(a=t.element),t.keyup&&(c=t.keyup),void 0!==t.keydown&&(l=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(u=t.splitKey)),"string"==typeof t&&(o=t);s1&&(i=getMods(_modifier,e)),(e="*"===(e=e[e.length-1])?"*":code(e))in _handlers||(_handlers[e]=[]),_handlers[e].push({keyup:c,keydown:l,scope:o,mods:i,shortcut:r[s],method:n,key:r[s],splitKey:u,element:a});void 0!==a&&!isElementBind(a)&&window&&(elementHasBindEvent.push(a),addEvent(a,"keydown",(function(e){dispatch(e,a)}),d),winListendFocus||(winListendFocus=!0,addEvent(window,"focus",(function(){_downKeys=[]}),d)),addEvent(a,"keyup",(function(e){dispatch(e,a),clearModifier(e)}),d))}function trigger(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(_handlers).forEach((function(n){_handlers[n].filter((function(n){return n.scope===t&&n.shortcut===e})).forEach((function(e){e&&e.method&&e.method()}))}))}var _api={getPressedKeyString:getPressedKeyString,setScope:setScope,getScope:getScope,deleteScope:deleteScope,getPressedKeyCodes:getPressedKeyCodes,isPressed:isPressed,filter:filter,trigger:trigger,unbind:unbind,keyMap:_keyMap,modifier:_modifier,modifierMap:modifierMap};for(var a in _api)Object.prototype.hasOwnProperty.call(_api,a)&&(hotkeys[a]=_api[a]);if("undefined"!=typeof window){var _hotkeys=window.hotkeys;hotkeys.noConflict=function(e){return e&&window.hotkeys===hotkeys&&(window.hotkeys=_hotkeys),hotkeys},window.hotkeys=hotkeys}var __defProp$1=Object.defineProperty,__getOwnPropDesc$1=Object.getOwnPropertyDescriptor,__decorateClass$1=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc$1(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp$1(t,n,o),o},__decorateParam=(e,t)=>(n,r)=>t(n,r,e);hotkeys.filter=function(){return!0};let Shortcut=class{constructor(e){this.option={capture:!0},log("Initialize shortcut subsystem"),this.eventBus=e}registerKeyboardEvent(e,t){hotkeys(e,this.option,t),this.eventBus.on(e.toString(),t)}unregisterKeyboardEvent(e){hotkeys.unbind(e),this.eventBus.off(e.toString())}registerKeyboardEventFromPlugin(e){e.shortcut&&e.callback&&this.registerKeyboardEvent(e.shortcut,e.callback)}unregisterKeyboardEventFromPlugin(e){e.shortcut&&e.callback&&this.unregisterKeyboardEvent(e.shortcut)}};Shortcut=__decorateClass$1([injectable(),__decorateParam(0,inject(TYPES.EventBus))],Shortcut);var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(e,t,n,r)=>{for(var i,o=r>1?void 0:r?__getOwnPropDesc(t,n):t,a=e.length-1;a>=0;a--)(i=e[a])&&(o=(r?i(t,n,o):i(o))||o);return r&&o&&__defProp(t,n,o),o};let SettingManager=class{constructor(){this.settingRenders=new Map}registerSetting(e,t){this.settingRenders.set(e,t)}unregisterSetting(e){this.settingRenders.delete(e)}getSettingRenders(){const e=[];return this.settingRenders.forEach(((t,n)=>{e.push({key:n,value:t})})),e}};SettingManager=__decorateClass([injectable()],SettingManager);const container=new Container;container.bind(TYPES.StorageManager).to(StorageManager).inSingletonScope(),container.bind(TYPES.SystemManager).to(SystemManager).inSingletonScope(),container.bind(TYPES.PluginSystem).to(PluginSystem).inSingletonScope(),container.bind(TYPES.PluginLoader).to(PluginLoader).inSingletonScope(),container.bind(TYPES.PluginFileManager).to(PluginFileManager).inSingletonScope(),container.bind(TYPES.EventBus).to(EventBus),container.bind(TYPES.Shortcut).to(Shortcut).inSingletonScope(),container.bind(TYPES.CommandManager).to(CommandManager).inSingletonScope(),container.bind(TYPES.Store).to(Store).inSingletonScope(),container.bind(TYPES.SettingManager).to(SettingManager).inSingletonScope(),window.pluginSystem||(log("Siyuan Plugin System loading..."),window.pluginSystemVersion=VERSION$1,window.pluginSystem=container.get(TYPES.PluginSystem).init(),window.pluginSystemIocContainer=container)})(); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL3JlZmxlY3QtbWV0YWRhdGFAMC4xLjEzL25vZGVfbW9kdWxlcy9yZWZsZWN0LW1ldGFkYXRhL1JlZmxlY3QuanMiLCIuLi9zcmMvY29uZmlnLnRzIiwiLi4vc3JjL2FwaS9zZXJ2ZXItYXBpLnRzIiwiLi4vc3JjL2ludGVybmFsL2NsYXNzZXMvbm90aWZpY2F0aW9uLnRzIiwiLi4vbm9kZV9tb2R1bGVzLy5wbnBtL3poaS1sb2dAMS42LjEvbm9kZV9tb2R1bGVzL3poaS1sb2cvbGliL2luZGV4LmpzIiwiLi4vc3JjL2FwaS9jbGllbnQtYXBpLnRzIiwiLi4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vbnMgYXJlIG5vdCBwYXJ0IG9mIEVTNiwgdGhvdWdoIHRoZXkgYXJlIHZhbGlkIGluIFR5cGVTY3JpcHQ6XG4gICAgICAgICAqICAgICAgICAgLy8gc3RhdGljIHN0YXRpY1Byb3BlcnR5O1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5O1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgICAgIGNvbnN0cnVjdG9yKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIHN0YXRpYyBzdGF0aWNNZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgbWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gY29uc3RydWN0b3JcbiAgICAgICAgICogICAgIEV4YW1wbGUgPSBSZWZsZWN0LmRlY29yYXRlKGRlY29yYXRvcnNBcnJheSwgRXhhbXBsZSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICBSZWZsZWN0LmRlY29yYXRlKGRlY29yYXRvcnNBcnJheSwgRXhhbXBsZSwgXCJzdGF0aWNQcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICBSZWZsZWN0LmRlY29yYXRlKGRlY29yYXRvcnNBcnJheSwgRXhhbXBsZS5wcm90b3R5cGUsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEV4YW1wbGUsIFwic3RhdGljTWV0aG9kXCIsXG4gICAgICAgICAqICAgICAgICAgUmVmbGVjdC5kZWNvcmF0ZShkZWNvcmF0b3JzQXJyYXksIEV4YW1wbGUsIFwic3RhdGljTWV0aG9kXCIsXG4gICAgICAgICAqICAgICAgICAgICAgIE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3IoRXhhbXBsZSwgXCJzdGF0aWNNZXRob2RcIikpKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiLFxuICAgICAgICAgKiAgICAgICAgIFJlZmxlY3QuZGVjb3JhdGUoZGVjb3JhdG9yc0FycmF5LCBFeGFtcGxlLnByb3RvdHlwZSwgXCJtZXRob2RcIixcbiAgICAgICAgICogICAgICAgICAgICAgT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihFeGFtcGxlLnByb3RvdHlwZSwgXCJtZXRob2RcIikpKTtcbiAgICAgICAgICpcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIGRlY29yYXRlKGRlY29yYXRvcnMsIHRhcmdldCwgcHJvcGVydHlLZXksIGF0dHJpYnV0ZXMpIHtcbiAgICAgICAgICAgIGlmICghSXNVbmRlZmluZWQocHJvcGVydHlLZXkpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFJc0FycmF5KGRlY29yYXRvcnMpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdCh0YXJnZXQpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdChhdHRyaWJ1dGVzKSAmJiAhSXNVbmRlZmluZWQoYXR0cmlidXRlcykgJiYgIUlzTnVsbChhdHRyaWJ1dGVzKSlcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpO1xuICAgICAgICAgICAgICAgIGlmIChJc051bGwoYXR0cmlidXRlcykpXG4gICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZXMgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgcHJvcGVydHlLZXkgPSBUb1Byb3BlcnR5S2V5KHByb3BlcnR5S2V5KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gRGVjb3JhdGVQcm9wZXJ0eShkZWNvcmF0b3JzLCB0YXJnZXQsIHByb3BlcnR5S2V5LCBhdHRyaWJ1dGVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICghSXNBcnJheShkZWNvcmF0b3JzKSlcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpO1xuICAgICAgICAgICAgICAgIGlmICghSXNDb25zdHJ1Y3Rvcih0YXJnZXQpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIERlY29yYXRlQ29uc3RydWN0b3IoZGVjb3JhdG9ycywgdGFyZ2V0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBleHBvcnRlcihcImRlY29yYXRlXCIsIGRlY29yYXRlKTtcbiAgICAgICAgLy8gNC4xLjIgUmVmbGVjdC5tZXRhZGF0YShtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSlcbiAgICAgICAgLy8gaHR0cHM6Ly9yYnVja3Rvbi5naXRodWIuaW8vcmVmbGVjdC1tZXRhZGF0YS8jcmVmbGVjdC5tZXRhZGF0YVxuICAgICAgICAvKipcbiAgICAgICAgICogQSBkZWZhdWx0IG1ldGFkYXRhIGRlY29yYXRvciBmYWN0b3J5IHRoYXQgY2FuIGJlIHVzZWQgb24gYSBjbGFzcywgY2xhc3MgbWVtYmVyLCBvciBwYXJhbWV0ZXIuXG4gICAgICAgICAqIEBwYXJhbSBtZXRhZGF0YUtleSBUaGUga2V5IGZvciB0aGUgbWV0YWRhdGEgZW50cnkuXG4gICAgICAgICAqIEBwYXJhbSBtZXRhZGF0YVZhbHVlIFRoZSB2YWx1ZSBmb3IgdGhlIG1ldGFkYXRhIGVudHJ5LlxuICAgICAgICAgKiBAcmV0dXJucyBBIGRlY29yYXRvciBmdW5jdGlvbi5cbiAgICAgICAgICogQHJlbWFya3NcbiAgICAgICAgICogSWYgYG1ldGFkYXRhS2V5YCBpcyBhbHJlYWR5IGRlZmluZWQgZm9yIHRoZSB0YXJnZXQgYW5kIHRhcmdldCBrZXksIHRoZVxuICAgICAgICAgKiBtZXRhZGF0YVZhbHVlIGZvciB0aGF0IGtleSB3aWxsIGJlIG92ZXJ3cml0dGVuLlxuICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gY29uc3RydWN0b3JcbiAgICAgICAgICogICAgIEBSZWZsZWN0Lm1ldGFkYXRhKGtleSwgdmFsdWUpXG4gICAgICAgICAqICAgICBjbGFzcyBFeGFtcGxlIHtcbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBjb25zdHJ1Y3RvciwgVHlwZVNjcmlwdCBvbmx5KVxuICAgICAgICAgKiAgICAgY2xhc3MgRXhhbXBsZSB7XG4gICAgICAgICAqICAgICAgICAgQFJlZmxlY3QubWV0YWRhdGEoa2V5LCB2YWx1ZSlcbiAgICAgICAgICogICAgICAgICBzdGF0aWMgc3RhdGljUHJvcGVydHk7XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlLCBUeXBlU2NyaXB0IG9ubHkpXG4gICAgICAgICAqICAgICBjbGFzcyBFeGFtcGxlIHtcbiAgICAgICAgICogICAgICAgICBAUmVmbGVjdC5tZXRhZGF0YShrZXksIHZhbHVlKVxuICAgICAgICAgKiAgICAgICAgIHByb3BlcnR5O1xuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIEBSZWZsZWN0Lm1ldGFkYXRhKGtleSwgdmFsdWUpXG4gICAgICAgICAqICAgICAgICAgc3RhdGljIHN0YXRpY01ldGhvZCgpIHsgfVxuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICBjbGFzcyBFeGFtcGxlIHtcbiAgICAgICAgICogICAgICAgICBAUmVmbGVjdC5tZXRhZGF0YShrZXksIHZhbHVlKVxuICAgICAgICAgKiAgICAgICAgIG1ldGhvZCgpIHsgfVxuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gbWV0YWRhdGEobWV0YWRhdGFLZXksIG1ldGFkYXRhVmFsdWUpIHtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGRlY29yYXRvcih0YXJnZXQsIHByb3BlcnR5S2V5KSB7XG4gICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdCh0YXJnZXQpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgaWYgKCFJc1VuZGVmaW5lZChwcm9wZXJ0eUtleSkgJiYgIUlzUHJvcGVydHlLZXkocHJvcGVydHlLZXkpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgT3JkaW5hcnlEZWZpbmVPd25NZXRhZGF0YShtZXRhZGF0YUtleSwgbWV0YWRhdGFWYWx1ZSwgdGFyZ2V0LCBwcm9wZXJ0eUtleSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZGVjb3JhdG9yO1xuICAgICAgICB9XG4gICAgICAgIGV4cG9ydGVyKFwibWV0YWRhdGFcIiwgbWV0YWRhdGEpO1xuICAgICAgICAvKipcbiAgICAgICAgICogRGVmaW5lIGEgdW5pcXVlIG1ldGFkYXRhIGVudHJ5IG9uIHRoZSB0YXJnZXQuXG4gICAgICAgICAqIEBwYXJhbSBtZXRhZGF0YUtleSBBIGtleSB1c2VkIHRvIHN0b3JlIGFuZCByZXRyaWV2ZSBtZXRhZGF0YS5cbiAgICAgICAgICogQHBhcmFtIG1ldGFkYXRhVmFsdWUgQSB2YWx1ZSB0aGF0IGNvbnRhaW5zIGF0dGFjaGVkIG1ldGFkYXRhLlxuICAgICAgICAgKiBAcGFyYW0gdGFyZ2V0IFRoZSB0YXJnZXQgb2JqZWN0IG9uIHdoaWNoIHRvIGRlZmluZSBtZXRhZGF0YS5cbiAgICAgICAgICogQHBhcmFtIHByb3BlcnR5S2V5IChPcHRpb25hbCkgVGhlIHByb3BlcnR5IGtleSBmb3IgdGhlIHRhcmdldC5cbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5IGRlY2xhcmF0aW9ucyBhcmUgbm90IHBhcnQgb2YgRVM2LCB0aG91Z2ggdGhleSBhcmUgdmFsaWQgaW4gVHlwZVNjcmlwdDpcbiAgICAgICAgICogICAgICAgICAvLyBzdGF0aWMgc3RhdGljUHJvcGVydHk7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAgICAgY29uc3RydWN0b3IocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgc3RhdGljIHN0YXRpY01ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgICAgICBtZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgUmVmbGVjdC5kZWZpbmVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIG9wdGlvbnMsIEV4YW1wbGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgUmVmbGVjdC5kZWZpbmVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIG9wdGlvbnMsIEV4YW1wbGUsIFwic3RhdGljUHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgUmVmbGVjdC5kZWZpbmVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIG9wdGlvbnMsIEV4YW1wbGUucHJvdG90eXBlLCBcInByb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIFJlZmxlY3QuZGVmaW5lTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBvcHRpb25zLCBFeGFtcGxlLCBcInN0YXRpY01ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgUmVmbGVjdC5kZWZpbmVNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIG9wdGlvbnMsIEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIGRlY29yYXRvciBmYWN0b3J5IGFzIG1ldGFkYXRhLXByb2R1Y2luZyBhbm5vdG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FuZCByZXRyaWV2ZSBtZXRhZGF0YS5cbiAgICAgICAgICogQHBhcmFtIHRhcmdldCBUaGUgdGFyZ2V0IG9iamVjdCBvbiB3aGljaCB0aGUgbWV0YWRhdGEgaXMgZGVmaW5lZC5cbiAgICAgICAgICogQHBhcmFtIHByb3BlcnR5S2V5IChPcHRpb25hbCkgVGhlIHByb3BlcnR5IGtleSBmb3IgdGhlIHRhcmdldC5cbiAgICAgICAgICogQHJldHVybnMgYHRydWVgIGlmIHRoZSBtZXRhZGF0YSBrZXkgd2FzIGRlZmluZWQgb24gdGhlIHRhcmdldCBvYmplY3Qgb3IgaXRzIHByb3RvdHlwZSBjaGFpbjsgb3RoZXJ3aXNlLCBgZmFsc2VgLlxuICAgICAgICAgKiBAZXhhbXBsZVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgY2xhc3MgRXhhbXBsZSB7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHkgZGVjbGFyYXRpb25zIGFyZSBub3QgcGFydCBvZiBFUzYsIHRob3VnaCB0aGV5IGFyZSB2YWxpZCBpbiBUeXBlU2NyaXB0OlxuICAgICAgICAgKiAgICAgICAgIC8vIHN0YXRpYyBzdGF0aWNQcm9wZXJ0eTtcbiAgICAgICAgICogICAgICAgICAvLyBwcm9wZXJ0eTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgICAgICBjb25zdHJ1Y3RvcihwKSB7IH1cbiAgICAgICAgICogICAgICAgICBzdGF0aWMgc3RhdGljTWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIG1ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIGNvbnN0cnVjdG9yXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0Lmhhc01ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0Lmhhc01ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSwgXCJzdGF0aWNQcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0Lmhhc01ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZS5wcm90b3R5cGUsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5oYXNNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUsIFwic3RhdGljTWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0Lmhhc01ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZS5wcm90b3R5cGUsIFwibWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gaGFzTWV0YWRhdGEobWV0YWRhdGFLZXksIHRhcmdldCwgcHJvcGVydHlLZXkpIHtcbiAgICAgICAgICAgIGlmICghSXNPYmplY3QodGFyZ2V0KSlcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICBpZiAoIUlzVW5kZWZpbmVkKHByb3BlcnR5S2V5KSlcbiAgICAgICAgICAgICAgICBwcm9wZXJ0eUtleSA9IFRvUHJvcGVydHlLZXkocHJvcGVydHlLZXkp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5O1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgICAgIGNvbnN0cnVjdG9yKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIHN0YXRpYyBzdGF0aWNNZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgbWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gY29uc3RydWN0b3JcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuaGFzT3duTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuaGFzT3duTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLCBcInN0YXRpY1Byb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuaGFzT3duTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLnByb3RvdHlwZSwgXCJwcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0Lmhhc093bk1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSwgXCJzdGF0aWNNZXRob2RcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuaGFzT3duTWV0YWRhdGEoXCJjdXN0b206YW5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cm5zIFRoZSBtZXRhZGF0YSB2YWx1ZSBmb3IgdGhlIG1ldGFkYXRhIGtleSBpZiBmb3VuZDsgb3RoZXJ3aXNlLCBgdW5kZWZpbmVkYC5cbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5IGRlY2xhcmF0aW9ucyBhcmUgbm90IHBhcnQgb2YgRVM2LCB0aG91Z2ggdGhleSBhcmUgdmFsaWQgaW4gVHlwZVNjcmlwdDpcbiAgICAgICAgICogICAgICAgICAvLyBzdGF0aWMgc3RhdGljUHJvcGVydHk7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAgICAgY29uc3RydWN0b3IocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgc3RhdGljIHN0YXRpY01ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgICAgICBtZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRNZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUsIFwic3RhdGljUHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRNZXRhZGF0YShcImN1c3Rvb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SB0YXJnZXQgb2JqZWN0LlxuICAgICAgICAgKiBAcGFyYW0gbWV0YWRhdGFLZXkgQSBrZXkgdXNlZCB0byBzdG9yZSBhbmQgcmV0cmlldmUgbWV0YWRhdGEuXG4gICAgICAgICAqIEBwYXJhbSB0YXJnZXQgVGhlIHRhcmdldCBvYmplY3Qgb24gd2hpY2ggdGhlIG1ldGFkYXRhIGlzIGRlZmluZWQuXG4gICAgICAgICAqIEBwYXJhbSBwcm9wZXJ0eUtleSAoT3B0aW9uYWwpIFRoZSBwcm9wZXJ0eSBrZXkgZm9yIHRoZSB0YXJnZXQuXG4gICAgICAgICAqIEByZXR1cm5zIFRoZSBtZXRhZGF0YSB2YWx1ZSBmb3IgdGhlIG1ldGFkYXRhIGtleSBpZiBmb3VuZDsgb3RoZXJ3aXNlLCBgdW5kZWZpbmVkYC5cbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5IGRlY2xhcmF0aW9ucyBhcmUgbm90IHBhcnQgb2YgRVM2LCB0aG91Z2ggdGhleSBhcmUgdmFsaWQgaW4gVHlwZVNjcmlwdDpcbiAgICAgICAgICogICAgICAgICAvLyBzdGF0aWMgc3RhdGljUHJvcGVydHk7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAgICAgY29uc3RydWN0b3IocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgc3RhdGljIHN0YXRpY01ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgICAgICBtZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUsIFwic3RhdGljUHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUucHJvdG90eXBlLCBcInByb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0T3duTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLCBcInN0YXRpY01ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YShcImN1c3RvbTphbm5vdGF0aW9uXCIsIEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIGdldE93bk1ldGFkYXRhKG1ldGFkYXRhS2V5LCB0YXJnZXQsIHByb3BlcnR5S2V5KSB7XG4gICAgICAgICAgICBpZiAoIUlzT2JqZWN0KHRhcmdldCkpXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpO1xuICAgICAgICAgICAgaWYgKCFJc1VuZGVmaW5lZChwcm9wZXJ0eUtleSkpXG4gICAgICAgICAgICAgICAgcHJvcGVydHlLZXkgPSBUb1Byb3BlcnR5S2V5KHByb3BlcnR5S2V5KTtcbiAgICAgICAgICAgIHJldHVybiBPcmRpbmFyeUdldE93bk1ldGFkYXRhKG1ldGFkYXRhS2V5LCB0YXJnZXQsIHByb3BlcnR5S2V5KTtcbiAgICAgICAgfVxuICAgICAgICBleHBvcnRlcihcImdldE93bk1ldGFkYXRhXCIsIGdldE93bk1ldGFkYXRhKTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdldHMgdGhlIG1ldGFkYXRhIGtleXMgZGVmaW5lZCBvbiB0aGUgdGFyZ2V0IG9iamVjdCBvciBpdHMgcHJvdG90eXBlIGNoYWluLlxuICAgICAgICAgKiBAcGFyYW0gdGFyZ2V0IFRoZSB0YXJnZXQgb2JqZWN0IG9uIHdoaWNoIHRoZSBtZXRhZGF0YSBpcyBkZWZpbmVkLlxuICAgICAgICAgKiBAcGFyYW0gcHJvcGVydHlLZXkgKE9wdGlvbmFsKSBUaGUgcHJvcGVydHkga2V5IGZvciB0aGUgdGFyZ2V0LlxuICAgICAgICAgKiBAcmV0dXJucyBBbiBhcnJheSBvZiB1bmlxdWUgbWV0YWRhdGEga2V5cy5cbiAgICAgICAgICogQGV4YW1wbGVcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIGNsYXNzIEV4YW1wbGUge1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5IGRlY2xhcmF0aW9ucyBhcmUgbm90IHBhcnQgb2YgRVM2LCB0aG91Z2ggdGhleSBhcmUgdmFsaWQgaW4gVHlwZVNjcmlwdDpcbiAgICAgICAgICogICAgICAgICAvLyBzdGF0aWMgc3RhdGljUHJvcGVydHk7XG4gICAgICAgICAqICAgICAgICAgLy8gcHJvcGVydHk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAgICAgY29uc3RydWN0b3IocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgc3RhdGljIHN0YXRpY01ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgICAgICBtZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICB9XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBjb25zdHJ1Y3RvclxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRNZXRhZGF0YUtleXMoRXhhbXBsZSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE1ldGFkYXRhS2V5cyhFeGFtcGxlLCBcInN0YXRpY1Byb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0TWV0YWRhdGFLZXlzKEV4YW1wbGUucHJvdG90eXBlLCBcInByb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0TWV0YWRhdGFLZXlzKEV4YW1wbGUsIFwic3RhdGljTWV0aG9kXCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gbWV0aG9kIChvbiBwcm90b3R5cGUpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE1ldGFkYXRhS2V5cyhFeGFtcGxlLnByb3RvdHlwZSwgXCJtZXRob2RcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqL1xuICAgICAgICBmdW5jdGlvbiBnZXRNZXRhZGF0YUtleXModGFyZ2V0LCBwcm9wZXJ0eUtleSkge1xuICAgICAgICAgICAgaWYgKCFJc09iamVjdCh0YXJnZXQpKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJ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iAgICAgICAgICogICAgICAgICBzdGF0aWMgc3RhdGljTWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIG1ldGhvZChwKSB7IH1cbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIGNvbnN0cnVjdG9yXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmdldE93bk1ldGFkYXRhS2V5cyhFeGFtcGxlKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0T3duTWV0YWRhdGFLZXlzKEV4YW1wbGUsIFwic3RhdGljUHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBwcm9wZXJ0eSAob24gcHJvdG90eXBlKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YUtleXMoRXhhbXBsZS5wcm90b3R5cGUsIFwicHJvcGVydHlcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIGNvbnN0cnVjdG9yKVxuICAgICAgICAgKiAgICAgcmVzdWx0ID0gUmVmbGVjdC5nZXRPd25NZXRhZGF0YUtleXMoRXhhbXBsZSwgXCJzdGF0aWNNZXRob2RcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZ2V0T3duTWV0YWRhdGFLZXlzKEV4YW1wbGUucHJvdG90eXBlLCBcIm1ldGhvZFwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIGdldE93bk1ldGFkYXRhS2V5cyh0YXJnZXQsIHByb3BlcnR5S2V5KSB7XG4gICAgICAgICAgICBpZiAoIUlzT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9mIEVTNiwgdGhvdWdoIHRoZXkgYXJlIHZhbGlkIGluIFR5cGVTY3JpcHQ6XG4gICAgICAgICAqICAgICAgICAgLy8gc3RhdGljIHN0YXRpY1Byb3BlcnR5O1xuICAgICAgICAgKiAgICAgICAgIC8vIHByb3BlcnR5O1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgICAgIGNvbnN0cnVjdG9yKHApIHsgfVxuICAgICAgICAgKiAgICAgICAgIHN0YXRpYyBzdGF0aWNNZXRob2QocCkgeyB9XG4gICAgICAgICAqICAgICAgICAgbWV0aG9kKHApIHsgfVxuICAgICAgICAgKiAgICAgfVxuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gY29uc3RydWN0b3JcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZGVsZXRlTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIHByb3BlcnR5IChvbiBjb25zdHJ1Y3RvcilcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZGVsZXRlTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLCBcInN0YXRpY1Byb3BlcnR5XCIpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgLy8gcHJvcGVydHkgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZGVsZXRlTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLnByb3RvdHlwZSwgXCJwcm9wZXJ0eVwiKTtcbiAgICAgICAgICpcbiAgICAgICAgICogICAgIC8vIG1ldGhvZCAob24gY29uc3RydWN0b3IpXG4gICAgICAgICAqICAgICByZXN1bHQgPSBSZWZsZWN0LmRlbGV0ZU1ldGFkYXRhKFwiY3VzdG9tOmFubm90YXRpb25cIiwgRXhhbXBsZSwgXCJzdGF0aWNNZXRob2RcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICAvLyBtZXRob2QgKG9uIHByb3RvdHlwZSlcbiAgICAgICAgICogICAgIHJlc3VsdCA9IFJlZmxlY3QuZGVsZXRlTWV0YWRhdGEoXCJjdXN0b206YW5ub3RhdGlvblwiLCBFeGFtcGxlLnByb3RvdHlwZSwgXCJtZXRob2RcIik7XG4gICAgICAgICAqXG4gICAgICAgICAqL1xuICAgICAgICBmdW5jdGlvbiBkZWxldGVNZXRhZGF0YShtZXRhZGF0YUtleSwgdGFyZ2V0LCBwcm9wZXJ0eUtleSkge1xuICAgICAgICAgICAgaWYgKCFJc09iamVjdCh0YXJnZXQpKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTtcbiAgICAgICAgICAgIGlmICghSXNVbmRlZmluZWQocHJvcGVydHlLZXkpKVxuICAgICAgICAgICAgICAgIHByb3BlcnR5S2V5ID0gVG9Qcm9wZXJ0eUtleShwcm9wZXJ0eUtleSk7XG4gICAgICAgICAgICB2YXIgbWV0YWRhdGFNYXAgPSBHZXRPckNyZWF0ZU1ldGFkYXRhTWFwKHRhcmdldCwgcHJvcGVydHlLZXksIC8qQ3JlYXRlKi8gZmFsc2UpO1xuICAgICAgICAgICAgaWYgKElzVW5kZWZpbmVkKG1ldGFkYXRhTWFwKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICBpZiAoIW1ldGFkYXRhTWFwLmRlbGV0ZShtZXRhZGF0YUtleSkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgaWYgKG1ldGFkYXRhTWFwLnNpemUgPiAwKVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgdmFyIHRhcmdldE1ldGFkYXRhID0gTWV0YWRhdGEuZ2V0KHRhcmdldCk7XG4gICAgICAgICAgICB0YXJnZXRNZXRhZGF0YS5kZWxldGUocHJvcGVydHlLZXkpO1xuICAgICAgICAgICAgaWYgKHRhcmdldE1ldGFkYXRhLnNpemUgPiAwKVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgTWV0YWRhdGEuZGVsZXRlKHRhcmdldCk7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBleHBvcnRlcihcImRlbGV0ZU1ldGFkYXRhXCIsIGRlbGV0ZU1ldGFkYXRhKTtcbiAgICAgICAgZnVuY3Rpb24gRGVjb3JhdGVDb25zdHJ1Y3RvcihkZWNvcmF0b3JzLCB0YXJnZXQpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBkZWNvcmF0b3JzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRlY29yYXRvciA9IGRlY29yYXRvcnNbaV07XG4gICAgICAgICAgICAgICAgdmFyIGRlY29yYXRlZCA9IGRlY29yYXRvcih0YXJnZXQpO1xuICAgICAgICAgICAgICAgIGlmICghSXNVbmRlZmluZWQoZGVjb3JhdGVkKSAmJiAhSXNOdWxsKGRlY29yYXRlZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFJc0NvbnN0cnVjdG9yKGRlY29yYXRlZCkpXG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldCA9IGRlY29yYXRlZDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGFyZ2V0O1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIERlY29yYXRlUHJvcGVydHkoZGVjb3JhdG9ycywgdGFyZ2V0LCBwcm9wZXJ0eUtleSwgZGVzY3JpcHRvcikge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IGRlY29yYXRvcnMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgICAgICAgICB2YXIgZGVjb3JhdG9yID0gZGVjb3JhdG9yc1tpXTtcbiAgICAgICAgICAgICAgICB2YXIgZGVjb3JhdGVkID0gZGVjb3JhdG9yKHRhcmdldCwgcHJvcGVydHlLZXksIGRlc2NyaXB0b3IpO1xuICAgICAgICAgICAgICAgIGlmICghSXNVbmRlZmluZWQoZGVjb3JhdGVkKSAmJiAhSXNOdWxsKGRlY29yYXRlZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdChkZWNvcmF0ZWQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpO1xuICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdG9yID0gZGVjb3JhdGVkO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkZXNjcmlwdG9yO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIEdldE9yQ3JlYXRlTWV0YWRhdGFNYXAoTywgUCwgQ3JlYXRlKSB7XG4gICAgICAgICAgICB2YXIgdGFyZ2V0TWV0YWRhdGEgPSBNZXRhZGF0YS5nZXQoTyk7XG4gICAgICAgICAgICBpZiAoSXNVbmRlZmluZWQodGFyZ2V0TWV0YWRhdGEpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFDcmVhdGUpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgdGFyZ2V0TWV0YWRhdGEgPSBuZXcgX01hcCgpO1xuICAgICAgICAgICAgICAgIE1ldGFkYXRhLnNldChPLCB0YXJnZXRNZXRhZGF0YSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgbWV0YWRhdGFNYXAgPSB0YXJnZXRNZXRhZGF0YS5nZXQoUCk7XG4gICAgICAgICAgICBpZiAoSXNVbmRlZmluZWQobWV0YWRhdGFNYXApKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFDcmVhdGUpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgbWV0YWRhdGFNYXAgPSBuZXcgX01hcCgpO1xuICAgICAgICAgICAgICAgIHRhcmdldE1ldGFkYXRhLnNldChQLCBtZXRhZGF0YU1hcCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbWV0YWRhdGFNYXA7XG4gICAgICAgIH1cbiAgICAgICAgLy8gMy4xLjEuMSBPcmRpbmFyeUhhc01ldGFkYXRhKE1ldGFkYXRhS2V5LCBPLCBQKVxuICAgICAgICAvLyBodHRwczovL3JidWNrdG9uLmdpdGh1Yi5pby9yZWZsZWN0LW1ldGFkYXRhLyNvcmRpbmFyeWhhc21ldGFkYXRhXG4gICAgICAgIGZ1bmN0aW9uIE9yZGluYXJ5SGFzTWV0YWRhdGEoTWV0YWRhdGFLZXksIE8sIFApIHtcbiAgICAgICAgICAgIHZhciBoYXNPd24gPSBPcmRpbmFyeUhhc093bk1ldGFkYXRhKE1ldGFkYXRhS2V5LCBPLCBQKTtcbiAgICAgICAgICAgIGlmIChoYXNPd24pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB2YXIgcGFyZW50ID0gT3JkaW5hcnlHZXRQcm90b3R5cGVPZihPKTtcbiAgICAgICAgICAgIGlmICghSXNOdWxsKHBhcmVudCkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIE9yZGluYXJ5SGFzTWV0YWRhdGEoTWV0YWRhdGFLZXksIHBhcmVudCwgUCk7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgLy8gMy4xLjIuMSBPcmRpbmFyeUhhc093bk1ldGFkYXRhKE1ldGFkYXRhS2V5LCBPLCBQKVxuICAgICAgICAvLyBodHRwczovL3JidWNrdG9uLmdpdGh1Yi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C5zZXQoTWV0YWRhdGFLZXksIE1ldGFkYXRhVmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIC8vIDMuMS42LjEgT3JkaW5hcnlNZXRhZGF0YUtleXMoTywgUClcbiAgICAgICAgLy8gaHR0cHM6Ly9yYnVja3Rvbi5naXRodWIuaW8vcmVmbGVjdC1tZXRhZGF0YS8jb3JkaW5hcnltZXRhZGF0YWtleXNcbiAgICAgICAgZnVuY3Rpb24gT3JkaW5hcnlNZXRhZGF0YUtleXMoTywgUCkge1xuICAgICAgICAgICAgdmFyIG93bktleXMgPSBPcmRpbmFyeU93bk1ldGFkYXRhS2V5cyhPLCBQKTtcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSBPcmRpbmFyeUdldFByb3RvdHlwZU9mKE8pO1xuICAgICAgICAgICAgaWYgKHBhcmVudCA9PT0gbnVsbClcbiAgICAgICAgICAgICAgICByZXR1cm4gb3duS2V5cztcbiAgICAgICAgICAgIHZhciBwYXJlbnRLZXlzID0gT3JkaW5hcnlNZXRhZGF0YUtleXMocGFyZW50LCBQKTtcbiAgICAgICAgICAgIGlmIChwYXJlbnRLZXlzLmxlbmd0aCA8PSAwKVxuICAgICAgICAgICAgICAgIHJldHVybiBvd25LZXlzO1xuICAgICAgICAgICAgaWYgKG93bktleXMubGVuZ3RoIDw9IDApXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcmVudEtleXM7XG4gICAgICAgICAgICB2YXIgc2V0ID0gbmV3IF9TZXQoKTtcbiAgICAgICAgICAgIHZhciBrZXlzID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBfaSA9IDAsIG93bktleXNfMSA9IG93bktleXM7IF9pIDwgb3duS2V5c18xLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgIHZhciBrZXkgPSBvd25LZXlzXzFbX2ldO1xuICAgICAgICAgICAgICAgIHZhciBoYXNLZXkgPSBzZXQuaGFzKGtleSk7XG4gICAgICAgICAgICAgICAgaWYgKCFoYXNLZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0LmFkZChrZXkpO1xuICAgICAgICAgICAgICAgICAgICBrZXlzLnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKHZhciBfYSA9IDAsIHBhcmVudEtleXNfMSA9IHBhcmVudEtleXM7IF9hIDwgcGFyZW50S2V5c18xLmxlbmd0aDsgX2ErKykge1xuICAgICAgICAgICAgICAgIHZhciBrZXkgPSBwYXJlbnRLZXlzXzFbX2FdO1xuICAgICAgICAgICAgICAgIHZhciBoYXNLZXkgPSBzZXQuaGFzKGtleSk7XG4gICAgICAgICAgICAgICAgaWYgKCFoYXNLZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0LmFkZChrZXkpO1xuICAgICAgICAgICAgICAgICAgICBrZXlzLnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4ga2V5cztcbiAgICAgICAgfVxuICAgICAgICAvLyAzLjEuNy4xIE9yZGluYXJ5T3duTWV0YWRhdGFLZXlzKE8sIFApXG4gICAgICAgIC8vIGh0dHBzOi8vcmJ1Y2t0b24uZ2l0aHViLmlvL3JlZmxlY3QtbWV0YWRhdGEvI29yZGluYXJ5b3dubWV0YWRhdGFrZXlzXG4gICAgICAgIGZ1bmN0aW9uIE9yZGluYXJ5T3duTWV0YWRhdGFLZXlzKE8sIFApIHtcbiAgICAgICAgICAgIHZhciBrZXlzID0gW107XG4gICAgICAgICAgICB2YXIgbWV0YWRhdGFNYXAgPSBHZXRPckNyZWF0ZU1ldGFkYXRhTWFwKE8sIFAsIC8qQ3JlYXRlKi8gZmFsc2UpO1xuICAgICAgICAgICAgaWYgKElzVW5kZWZpbmVkKG1ldGFkYXRhTWFwKSlcbiAgICAgICAgICAgICAgICByZXR1cm4ga2V5cztcbiAgICAgICAgICAgIHZhciBrZXlzT2JqID0gbWV0YWRhdGFNYXAua2V5cygpO1xuICAgICAgICAgICAgdmFyIGl0ZXJhdG9yID0gR2V0SXRlcmF0b3Ioa2V5c09iaik7XG4gICAgICAgICAgICB2YXIgayA9IDA7XG4gICAgICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgICAgICAgIHZhciBuZXh0ID0gSXRlcmF0b3JTdGVwKGl0ZXJhdG9yKTtcbiAgICAgICAgICAgICAgICBpZiAoIW5leHQpIHtcbiAgICAgICAgICAgICAgICAgICAga2V5cy5sZW5ndGggPSBrO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ga2V5cztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIG5leHRWYWx1ZSA9IEl0ZXJhdG9yVmFsdWUobmV4dCk7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAga2V5c1trXSA9IG5leHRWYWx1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEl0ZXJhdG9yQ2xvc2UoaXRlcmF0b3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGZpbmFsbHkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBrKys7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gNiBFQ01BU2NyaXB0IERhdGEgVHlwMGVzIGFuZCBWYWx1ZXNcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtZWNtYXNjcmlwdC1kYXRhLXR5cGVzLWFuZC12YWx1ZXNcbiAgICAgICAgZnVuY3Rpb24gVHlwZSh4KSB7XG4gICAgICAgICAgICBpZiAoeCA9PT0gbnVsbClcbiAgICAgICAgICAgICAgICByZXR1cm4gMSAvKiBOdWxsICovO1xuICAgICAgICAgICAgc3dpdGNoICh0eXBlb2YgeCkge1xuICAgICAgICAgICAgICAgIGNhc2UgXCJ1bmRlZmluZWRcIjogcmV0dXJuIDAgLyogVW5kZWZpbmVkICovO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJib29sZWFuXCI6IHJldHVybiAyIC8qIEJvb2xlYW4gKi87XG4gICAgICAgICAgICAgICAgY2FzZSBcInN0cmluZ1wiOiByZXR1cm4gMyAvKiBTdHJpbmcgKi87XG4gICAgICAgICAgICAgICAgY2FzZSBcInN5bWJvbFwiOiByZXR1cm4gNCAvKiBTeW1ib2wgKi87XG4gICAgICAgICAgICAgICAgY2FzZSBcIm51bWJlclwiOiByZXR1cm4gNSAvKiBOdW1iZXIgKi87XG4gICAgICAgICAgICAgICAgY2FzZSBcIm9iamVjdFwiOiByZXR1cm4geCA9PT0gbnVsbCA/IDEgLyogTnVsbCAqLyA6IDYgLyogT2JqZWN0ICovO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHJldHVybiA2IC8qIE9iamVjdCAqLztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyA2LjEuMSBUaGUgVW5kZWZpbmVkIFR5cGVcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtZWNtYXNjcmlwdC1sYW5ndWFnZS10eXBlcy11bmRlZmluZWQtdHlwZVxuICAgICAgICBmdW5jdGlvbiBJc1VuZGVmaW5lZCh4KSB7XG4gICAgICAgICAgICByZXR1cm4geCA9PT0gdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgICAgIC8vIDYuMS4yIFRoZSBOdWxsIFR5cGVcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtZWNtYXNjcmlwdC1sYW5nd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AgICAgICAgICAgICAgY2FzZSAwIC8qIFVuZGVmaW5lZCAqLzogcmV0dXJuIGlucHV0O1xuICAgICAgICAgICAgICAgIGNhc2UgMSAvKiBOdWxsICovOiByZXR1cm4gaW5wdXQ7XG4gICAgICAgICAgICAgICAgY2FzZSAyIC8qIEJvb2xlYW4gKi86IHJldHVybiBpbnB1dDtcbiAgICAgICAgICAgICAgICBjYXNlIDMgLyogU3RyaW5nICovOiByZXR1cm4gaW5wdXQ7XG4gICAgICAgICAgICAgICAgY2FzZSA0IC8qIFN5bWJvbCAqLzogcmV0dXJuIGlucHV0O1xuICAgICAgICAgICAgICAgIGNhc2UgNSAvKiBOdW1iZXIgKi86IHJldHVybiBpbnB1dDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBoaW50ID0gUHJlZmVycmVkVHlwZSA9PT0gMyAvKiBTdHJpbmcgKi8gPyBcInN0cmluZ1wiIDogUHJlZmVycmVkVHlwZSA9PT0gNSAvKiBOdW1iZXIgKi8gPyBcIm51bWJlclwiIDogXCJkZWZhdWx0XCI7XG4gICAgICAgICAgICB2YXIgZXhvdGljVG9QcmltID0gR2V0TWV0aG9kKGlucHV0LCB0b1ByaW1pdGl2ZVN5bWJvbCk7XG4gICAgICAgICAgICBpZiAoZXhvdGljVG9QcmltICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gZXhvdGljVG9QcmltLmNhbGwoaW5wdXQsIGhpbnQpO1xuICAgICAgICAgICAgICAgIGlmIChJc09iamVjdChyZXN1bHQpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBPcmRpbmFyeVRvUHJpbWl0aXZlKGlucHV0LCBoaW50ID09PSBcImRlZmF1bHRcIiA/IFwibnVtYmVyXCIgOiBoaW50KTtcbiAgICAgICAgfVxuICAgICAgICAvLyA3LjEuMS4xIE9yZGluYXJ5VG9QcmltaXRpdmUoTywgaGludClcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtb3JkaW5hcnl0b3ByaW1pdGl2ZVxuICAgICAgICBmdW5jdGlvbiBPcmRpbmFyeVRvUHJpbWl0aXZlKE8sIGhpbnQpIHtcbiAgICAgICAgICAgIGlmIChoaW50ID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRvU3RyaW5nXzEgPSBPLnRvU3RyaW5nO1xuICAgICAgICAgICAgICAgIGlmIChJc0NhbGxhYmxlKHRvU3RyaW5nXzEpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSB0b1N0cmluZ18xLmNhbGwoTyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghSXNPYmplY3QocmVzdWx0KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciB2YWx1ZU9mID0gTy52YWx1ZU9mO1xuICAgICAgICAgICAgICAgIGlmIChJc0NhbGxhYmxlKHZhbHVlT2YpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSB2YWx1ZU9mLmNhbGwoTyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghSXNPYmplY3QocmVzdWx0KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlT2YgPSBPLnZhbHVlT2Y7XG4gICAgICAgICAgICAgICAgaWYgKElzQ2FsbGFibGUodmFsdWVPZikpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHZhbHVlT2YuY2FsbChPKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFJc09iamVjdChyZXN1bHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIHRvU3RyaW5nXzIgPSBPLnRvU3RyaW5nO1xuICAgICAgICAgICAgICAgIGlmIChJc0NhbGxhYmxlKHRvU3RyaW5nXzIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSB0b1N0cmluZ18yLmNhbGwoTyk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghSXNPYmplY3QocmVzdWx0KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpO1xuICAgICAgICB9XG4gICAgICAgIC8vIDcuMS4yIFRvQm9vbGVhbihhcmd1bWVudClcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLzIwMTYvI3NlYy10b2Jvb2xlYW5cbiAgICAgICAgZnVuY3Rpb24gVG9Cb29sZWFuKGFyZ3VtZW50KSB7XG4gICAgICAgICAgICByZXR1cm4gISFhcmd1bWVudDtcbiAgICAgICAgfVxuICAgICAgICAvLyA3LjEuMTIgVG9TdHJpbmcoYXJndW1lbnQpXG4gICAgICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLXRvc3RyaW5nXG4gICAgICAgIGZ1bmN0aW9uIFRvU3RyaW5nKGFyZ3VtZW50KSB7XG4gICAgICAgICAgICByZXR1cm4gXCJcIiArIGFyZ3VtZW50O1xuICAgICAgICB9XG4gICAgICAgIC8vIDcuMS4xNCBUb1Byb3BlcnR5S2V5KGFyZ3VtZW50KVxuICAgICAgICAvLyBodHRwczovL3RjMzkuZ2l0aHViLmlvL2VjbWEyNjIvI3NlYy10b3Byb3BlcnR5a2V5XG4gICAgICAgIGZ1bmN0aW9uIFRvUHJvcGVydHlLZXkoYXJndW1lbnQpIHtcbiAgICAgICAgICAgIHZhciBrZXkgPSBUb1ByaW1pdGl2ZShhcmd1bWVudCwgMyAvKiBTdHJpbmcgKi8pO1xuICAgICAgICAgICAgaWYgKElzU3ltYm9sKGtleSkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGtleTtcbiAgICAgICAgICAgIHJldHVybiBUb1N0cmluZyhrZXkpO1xuICAgICAgICB9XG4gICAgICAgIC8vIDcuMiBUZXN0aW5nIGFuZCBDb21wYXJpc29uIE9wZXJhdGlvbnNcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtdGVzdGluZy1hbmQtY29tcGFyaXNvbi1vcGVyYXRpb25zXG4gICAgICAgIC8vIDcuMi4yIElzQXJyYXkoYXJndW1lbnQpXG4gICAgICAgIC8vIGh0dHBzOi8vdGMzOS5naXRodWIuaW8vZWNtYTI2Mi8jc2VjLWlzYXJyYXlcbiAgICAgICAgZnVuY3Rpb24gSXNBcnJheShhcmd1bWVudCkge1xuICAgICAgICAgICAgcmV0dXJuIEFycmF5LmlzQXJyYXlcbiAgICAgICAgICAgICAgICA/IEFycmF5LmlzQXJyYXkoYXJndW1lbnQpXG4gICAgICAgICAgICAgICAgOiBhcmd1bWVudCBpbnN0YW5jZW9mIE9iamVjdFxuICAgICAgICAgICAgICAgICAgICA/IGFyZ3VtZW50IGluc3RhbmNlb2YgQXJyYXlcbiAgICAgICAgICAgICAgICAgICAgOiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoYXJndW1lbnQpID09PSBcIltvYmplY3QgQXJyYXldXCI7XG4gICAgICAgIH1cbiAgICAgICAgLy8gNy4yLjMgSXNDYWxsYWJsZShhcmd1bWVudClcbiAgICAgICAgLy8gaHR0cHM6Ly90YzM5L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pbmUgdGhlIGhlcml0YWdlLlxuICAgICAgICAgICAgdmFyIGNvbnN0cnVjdG9yID0gcHJvdG90eXBlUHJvdG8uY29uc3RydWN0b3I7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGNvbnN0cnVjdG9yICE9PSBcImZ1bmN0aW9uXCIpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHByb3RvO1xuICAgICAgICAgICAgLy8gSWYgd2UgaGF2ZSBzb21lIGtpbmQgb2Ygc2VsZi1yZWZlcmVuY2UsIHRoZW4gd2UgY2Fubm90IGRldGVybWluZSB0aGUgaGVyaXRhZ2UuXG4gICAgICAgICAgICBpZiAoY29uc3RydWN0b3IgPT09IE8pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHByb3RvO1xuICAgICAgICAgICAgLy8gd2UgaGF2ZSBhIHByZXR0eSBnb29kIGd1ZXNzIGF0IHRoZSBoZXJpdGFnZS5cbiAgICAgICAgICAgIHJldHVybiBjb25zdHJ1Y3RvcjtcbiAgICAgICAgfVxuICAgICAgICAvLyBuYWl2ZSBNYXAgc2hpbVxuICAgICAgICBmdW5jdGlvbiBDcmVhdGVNYXBQb2x5ZmlsbCgpIHtcbiAgICAgICAgICAgIHZhciBjYWNoZVNlbnRpbmVsID0ge307XG4gICAgICAgICAgICB2YXIgYXJyYXlTZW50aW5lbCA9IFtdO1xuICAgICAgICAgICAgdmFyIE1hcEl0ZXJhdG9yID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1hcEl0ZXJhdG9yKGtleXMsIHZhbHVlcywgc2VsZWN0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5kZXggPSAwO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlzID0ga2V5cztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmFsdWVzID0gdmFsdWVzO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZWxlY3RvciA9IHNlbGVjdG9yO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBNYXBJdGVyYXRvci5wcm90b3R5cGVbXCJAQGl0ZXJhdG9yXCJdID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpczsgfTtcbiAgICAgICAgICAgICAgICBNYXBJdGVyYXRvci5wcm90b3R5cGVbaXRlcmF0b3JTeW1ib2xdID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpczsgfTtcbiAgICAgICAgICAgICAgICBNYXBJdGVyYXRvci5wcm90b3R5cGUubmV4dCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gdGhpcy5faW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSAwICYmIGluZGV4IDwgdGhpcy5fa2V5cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSB0aGlzLl9zZWxlY3Rvcih0aGlzLl9rZXlzW2luZGV4XSwgdGhpcy5fdmFsdWVzW2luZGV4XSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggKyAxID49IHRoaXMuX2tleXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5kZXggPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlzID0gYXJyYXlTZW50aW5lbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXMgPSBhcnJheVNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHZhbHVlOiByZXN1bHQsIGRvbmU6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgdmFsdWU6IHVuZGVmaW5lZCwgZG9uZTogdHJ1ZSB9O1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgTWFwSXRlcmF0b3IucHJvdG90eXBlLnRocm93ID0gZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9pbmRleCA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9pbmRleCA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5cyA9IGFycmF5U2VudGluZWw7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXMgPSBhcnJheVNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRocm93IGVycm9yO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgTWFwSXRlcmF0b3IucHJvdG90eXBlLnJldHVybiA9IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5faW5kZXggPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5kZXggPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleXMgPSBhcnJheVNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmFsdWVzID0gYXJyYXlTZW50aW5lbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4geyB2YWx1ZTogdmFsdWUsIGRvbmU6IHRydWUgfTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiBNYXBJdGVyYXRvcjtcbiAgICAgICAgICAgIH0oKSk7XG4gICAgICAgICAgICByZXR1cm4gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1hcCgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5cyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fY2FjaGVLZXkgPSBjYWNoZVNlbnRpbmVsO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZUluZGV4ID0gLTI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShNYXAucHJvdG90eXBlLCBcInNpemVcIiwge1xuICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRoaXMuX2tleXMubGVuZ3RoOyB9LFxuICAgICAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBNYXAucHJvdG90eXBlLmhhcyA9IGZ1bmN0aW9uIChrZXkpIHsgcmV0dXJuIHRoaXMuX2ZpbmQoa2V5LCAvKmluc2VydCovIGZhbHNlKSA+PSAwOyB9O1xuICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGUuZ2V0ID0gZnVuY3Rpb24gKGtleSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW5kZXggPSB0aGlzLl9maW5kKGtleSwgLyppbnNlcnQqLyBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpbmRleCA+PSAwID8gdGhpcy5fdmFsdWVzW2luZGV4XSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGUuc2V0ID0gZnVuY3Rpb24gKGtleSwgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZChrZXksIC8qaW5zZXJ0Ki8gdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlc1tpbmRleF0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBNYXAucHJvdG90eXBlLmRlbGV0ZSA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZChrZXksIC8qaW5zZXJ0Ki8gZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNpemUgPSB0aGlzLl9rZXlzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSBpbmRleCArIDE7IGkgPCBzaXplOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlzW2kgLSAxXSA9IHRoaXMuX2tleXNbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fdmFsdWVzW2kgLSAxXSA9IHRoaXMuX3ZhbHVlc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2tleXMubGVuZ3RoLS07XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl92YWx1ZXMubGVuZ3RoLS07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSB0aGlzLl9jYWNoZUtleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlS2V5ID0gY2FjaGVTZW50aW5lbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZUluZGV4ID0gLTI7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBNYXAucHJvdG90eXBlLmNsZWFyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlzLmxlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcy5sZW5ndGggPSAwO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZUtleSA9IGNhY2hlU2VudGluZWw7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2NhY2hlSW5kZXggPSAtMjtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGUua2V5cyA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIG5ldyBNYXBJdGVyYXRvcih0aGlzLl9rZXlzLCB0aGlzLl92YWx1ZXMsIGdldEtleSk7IH07XG4gICAgICAgICAgICAgICAgTWFwLnByb3RvdHlwZS52YWx1ZXMgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBuZXcgTWFwSXRlcmF0b3IodGhpcy5fa2V5cywgdGhpcy5fdmFsdWVzLCBnZXRWYWx1ZSk7IH07XG4gICAgICAgICAgICAgICAgTWFwLnByb3RvdHlwZS5lbnRyaWVzID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gbmV3IE1hcEl0ZXJhdG9yKHRoaXMuX2tleXMsIHRoaXMuX3ZhbHVlcywgZ2V0RW50cnkpOyB9O1xuICAgICAgICAgICAgICAgIE1hcC5wcm90b3R5cGVbXCJAQGl0ZXJhdG9yXCJdID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gdGhpcy5lbnRyaWVzKCk7IH07XG4gICAgICAgICAgICAgICAgTWFwLnByb3RvdHlwZVtpdGVyYXRvclN5bWJvbF0gPSBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzLmVudHJpZXMoKTsgfTtcbiAgICAgICAgICAgICAgICBNYXAucHJvdG90eXBlLl9maW5kID0gZnVuY3Rpb24gKGtleSwgaW5zZXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9jYWNoZUtleSAhPT0ga2V5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZUluZGV4ID0gdGhpcy5fa2V5cy5pbmRleE9mKHRoaXMuX2NhY2hlS2V5ID0ga2V5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fY2FjaGVJbmRleCA8IDAgJiYgaW5zZXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9jYWNoZUluZGV4ID0gdGhpcy5fa2V5cy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9rZXlzLnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3ZhbHVlcy5wdXNoKHVuZGVmaW5lZCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NhY2hlSW5kZXg7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4gTWFwO1xuICAgICAgICAgICAgfSgpKTtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldEtleShrZXksIF8pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ga2V5O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZ2V0VmFsdWUoXywgdmFsdWUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBnZXRFbnRyeShrZXksIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFtrZXksIHZhbHVlXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBuYWl2ZSBTZXQgc2hpbVxuICAgICAgICBmdW5jdGlvbiBDcmVhdGVTZXRQb2x5ZmlsbCgpIHtcbiAgICAgICAgICAgIHJldHVybiAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gU2V0KCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9tYXAgPSBuZXcgX01hcCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoU2V0LnByb3RvdHlwZSwgXCJzaXplXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7IHJldHVybiB0aGlzLl9tYXAuc2l6ZTsgfSxcbiAgICAgICAgICAgICAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgU2V0LnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiAodmFsdWUpIHsgcmV0dXJuIHRoaXMuX21hcC5oYXModmFsdWUpOyB9O1xuICAgICAgICAgICAgICAgIFNldC5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gKHZhbHVlKSB7IHJldHVybiB0aGlzLl9tYXAuc2V0KHZhbHVlLCB2YWx1ZSksIHRoaXM7IH07XG4gICAgICAgICAgICAgICAgU2V0LnByb3RvdHlwZS5kZWxldGUgPSBmdW5jdGlvbiAodmFsdWUpIHsgcmV0dXJuIHRoaXMuX21hcC5kZWxldGUodmFsdWUpOyB9O1xuICAgICAgICAgICAgICAgIFNldC5wcm90b3R5cGUuY2xlYXIgPSBmdW5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ZUtleSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBXZWFrTWFwLnByb3RvdHlwZS5oYXMgPSBmdW5jdGlvbiAodGFyZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0YWJsZSA9IEdldE9yQ3JlYXRlV2Vha01hcFRhYmxlKHRhcmdldCwgLypjcmVhdGUqLyBmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0YWJsZSAhPT0gdW5kZWZpbmVkID8gSGFzaE1hcC5oYXModGFibGUsIHRoaXMuX2tleSkgOiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFdlYWtNYXAucHJvdG90eXBlLmdldCA9IGZ1bmN0aW9uICh0YXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhYmxlID0gR2V0T3JDcmVhdGVXZWFrTWFwVGFibGUodGFyZ2V0LCAvKmNyZWF0ZSovIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhYmxlICE9PSB1bmRlZmluZWQgPyBIYXNoTWFwLmdldCh0YWJsZSwgdGhpcy5fa2V5KSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFdlYWtNYXAucHJvdG90eXBlLnNldCA9IGZ1bmN0aW9uICh0YXJnZXQsIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0YWJsZSA9IEdldE9yQ3JlYXRlV2Vha01hcFRhYmxlKHRhcmdldCwgLypjcmVhdGUqLyB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgdGFibGVbdGhpcy5fa2V5XSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIFdlYWtNYXAucHJvdG90eXBlLmRlbGV0ZSA9IGZ1bmN0aW9uICh0YXJnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRhYmxlID0gR2V0T3JDcmVhdGVXZWFrTWFwVGFibGUodGFyZ2V0LCAvKmNyZWF0ZSovIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRhYmxlICE9PSB1bmRlZmluZWQgPyBkZWxldGUgdGFibGVbdGhpcy5fa2V5XSA6IGZhbHNlO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgV2Vha01hcC5wcm90b3R5cGUuY2xlYXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIE5PVEU6IG5vdCBhIHJlYWwgY2xlYXIsIGp1c3QgbWFrZXMgdGhlIHByZXZpb3VzIGRhdGEgdW5yZWFjaGFibGVcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fa2V5ID0gQ3JlYXRlVW5pcXVlS2V5KCk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4gV2Vha01hcDtcbiAgICAgICAgICAgIH0oKSk7XG4gICAgICAgICAgICBmdW5jdGlvbiBDcmVhdGVVbmlxdWVLZXkoKSB7XG4gICAgICAgICAgICAgICAgdmFyIGtleTtcbiAgICAgICAgICAgICAgICBkb1xuICAgICAgICAgICAgICAgICAgICBrZXkgPSBcIkBAV2Vha01hcEBAXCIgKyBDcmVhdGVVVUlEKCk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKEhhc2hNYXAuaGFzKGtleXMsIGtleSkpO1xuICAgICAgICAgICAgICAgIGtleXNba2V5XSA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGtleTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIEdldE9yQ3JlYXRlV2Vha01hcFRhYmxlKHRhcmdldCwgY3JlYXRlKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFoYXNPd24uY2FsbCh0YXJnZXQsIHJvb3RLZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY3JlYXRlKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRhcmdldCwgcm9vdEtleSwgeyB2YWx1ZTogSGFzaE1hcC5jcmVhdGUoKSB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhcmdldFtyb290S2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIEZpbGxSYW5kb21CeXRlcyhidWZmZXIsIHNpemUpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHNpemU7ICsraSlcbiAgICAgICAgICAgICAgICAgICAgYnVmZmVyW2ldID0gTWF0aC5yYW5kb20oKSAqIDB4ZmYgfCAwO1xuICAgICAgICAgICAgICAgIHJldHVybiBidWZmZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBHZW5SYW5kb21CeXRlcyhzaXplKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBVaW50OEFycmF5ID09PSBcImZ1bmN0aW9uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBjcnlwdG8gIT09IFwidW5kZWZpbmVkXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3J5cHRvLmdldFJhbmRvbVZhbHVlcyhuZXcgVWludDhBcnJheShzaXplKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgbXNDcnlwdG8gIT09IFwidW5kZWZpbmVkXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbXNDcnlwdG8uZ2V0UmFuZG9tVmFsdWVzKG5ldyBVaW50OEFycmF5KHNpemUpKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZpbGxSYW5kb21CeXRlcyhuZXcgVWludDhBcnJheShzaXplKSwgc2l6ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBGaWxsUmFuZG9tQnl0ZXMobmV3IEFycmF5KHNpemUpLCBzaXplKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIENyZWF0ZVVVSUQoKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRhdGEgPSBHZW5SYW5kb21CeXRlcyhVVUlEX1NJWkUpO1xuICAgICAgICAgICAgICAgIC8vIG1hcmsgYXMgcmFuZG9tIC0gUkZDIDQxMjIgwqcgNC40XG4gICAgICAgICAgICAgICAgZGF0YVs2XSA9IGRhdGFbNl0gJiAweDRmIHwgMHg0MDtcbiAgICAgICAgICAgICAgICBkYXRhWzhdID0gZGF0YVs4XSAmIDB4YmYgfCAweDgwO1xuICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBcIlwiO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIG9mZnNldCA9IDA7IG9mZnNldCA8IFVVSURfU0laRTsgKytvZmZzZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGJ5dGUgPSBkYXRhW29mZnNldF07XG4gICAgICAgICAgICAgICAgICAgIGlmIChvZmZzZXQgPT09IDQgfHwgb2Zmc2V0ID09PSA2IHx8IG9mZnNldCA9PT0gOClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBcIi1cIjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJ5dGUgPCAxNilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBcIjBcIjtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGJ5dGUudG9TdHJpbmcoMTYpLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gdXNl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BkYXRhVHlwZSwgZGF0YSkge1xyXG4gICAgbGV0IHVybCA9ICcvYXBpL2Jsb2NrL3ByZXBlbmRCbG9jayc7XHJcbiAgICByZXR1cm4gcGFyc2VCb2R5KFxyXG4gICAgICAgIHJlcXVlc3QoXHJcbiAgICAgICAgICAgICh1cmwgPSB1cmwpLFxyXG4gICAgICAgICAgICAoZGF0YSA9IHtcclxuICAgICAgICAgICAgICAgIHBhcmVudElEOiBwYXJlbnRJRCxcclxuICAgICAgICAgICAgICAgIGRhdGFUeXBlOiBkYXRhVHlwZSxcclxuICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEsXHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgKVxyXG4gICAgKTtcclxufVxyXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gYXBwZW5kQmxvY2socGFyZW50SUQsIGRhdGFUeXBlLCBkYXRhKSB7XHJcbiAgICBsZXQgdXJsID0gJy9hcGkvYmxvY2svYXBwZW5kQmxvY2snO1xyXG4gICAgcmV0dXJuIHBhcnNlQm9keShcclxuICAgICAgICByZXF1ZXN0KFxyXG4gICAgICAgICAgICAodXJsID0gdXJsKSxcclxuICAgICAgICAgICAgKGRhdGEgPSB7XHJcbiAgICAgICAgICAgICAgICBwYXJlbnRJRDogcGFyZW50SUQsXHJcbiAgICAgICAgICAgICAgICBkYXRhVHlwZTogZGF0YVR5cGUsXHJcbiAgICAgICAgICAgICAgICBkYXRhOiBkYXRhLFxyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgIClcclxuICAgICk7XHJcbn1cclxuXHJcbmV4cG9ydCBhc3luYyBmdW5jdGlvbiB1cGRhdGVCbG9jayhpZCwgZGF0YVR5cGUsIGRhdGEpIHtcclxuICAgIGxldCB1cmwgPSAnL2FwaS9ibG9jay91cGRhdGVCbG9jayc7XHJcbiAgICByZXR1cm4gcGFyc2VCb2R5KFxyXG4gICAgICAgIHJlcXVlc3QoXHJcbiAgICAgICAgICAgICh1cmwgPSB1cmwp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XG4gICAgICAgIGlmICghKHR5cGVvZiB3aW5kb3cgPT09IHQgfHwgIXUpKSB7XG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIG4gPSB3aW5kb3cubG9jYWxTdG9yYWdlW3VdO1xuICAgICAgICAgIH0gY2F0Y2gge1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAodHlwZW9mIG4gPT09IHQpXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICB2YXIgZCA9IHdpbmRvdy5kb2N1bWVudC5jb29raWUsIG0gPSBkLmluZGV4T2YoXG4gICAgICAgICAgICAgICAgZW5jb2RlVVJJQ29tcG9uZW50KHUpICsgXCI9XCJcbiAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgbSAhPT0gLTEgJiYgKG4gPSAvXihbXjtdKykvLmV4ZWMoZC5zbGljZShtKSlbMV0pO1xuICAgICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIG8ubGV2ZWxzW25dID09PSB2b2lkIDAgJiYgKG4gPSB2b2lkIDApLCBuO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBmdW5jdGlvbiBWKCkge1xuICAgICAgICBpZiAoISh0eXBlb2Ygd2luZG93ID09PSB0IHx8ICF1KSkge1xuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICB3aW5kb3cubG9jYWxTdG9yYWdlLnJlbW92ZUl0ZW0odSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgfVxuICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICB3aW5kb3cuZG9jdW1lbnQuY29va2llID0gZW5jb2RlVVJJQ29tcG9uZW50KHUpICsgXCI9OyBleHBpcmVzPVRodSwgMDEgSmFuIDE5NzAgMDA6MDA6MDAgVVRDXCI7XG4gICAgICAgICAgfSBjYXRjaCB7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9X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BfKHRoaXMsIFwiZ2V0TG9nZ2VyXCIsIChlKSA9PiB7XG4gICAgICBsZXQgdDtcbiAgICAgIGlmIChlKVxuICAgICAgICB0ID0gZTtcbiAgICAgIGVsc2Uge1xuICAgICAgICBjb25zdCBsID0gdGhpcy5nZXRDYWxsU3RhY2soKSwgcCA9IFtdLCBjID0gW107XG4gICAgICAgIGZvciAobGV0IGcgPSAwOyBnIDwgbC5sZW5ndGg7IGcrKykge1xuICAgICAgICAgIGNvbnN0IHcgPSBsW2ddLCBFID0gdy5nZXRGaWxlTmFtZSgpID8/IFwibm9uZVwiO1xuICAgICAgICAgIGlmIChnID4gdGhpcy5zdGFja1NpemUgLSAxKVxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY29uc3QgRiA9IEUgKyBcIi1cIiArIHcuZ2V0TGluZU51bWJlcigpICsgXCI6XCIgKyB3LmdldENvbHVtbk51bWJlcigpO1xuICAgICAgICAgIHAucHVzaChGKTtcbiAgICAgICAgfVxuICAgICAgICBjLmxlbmd0aCA+IDAgJiYgKHQgPSBwLmpvaW4oXCIgLT4gXCIpKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiAoIXQgfHwgdC50cmltKCkubGVuZ3RoID09PSAwKSAmJiAodCA9IHRoaXMuY29uc29sZUxvZ2dlciksIGIuZ2V0TG9nZ2VyKHQpO1xuICAgIH0pO1xuICAgIHRoaXMuc3RhY2tTaXplID0gMTtcbiAgICBsZXQgcDtcbiAgICBlID8gcCA9IGUgOiBwID0gSS5nZXRFbnZMZXZlbChsKSwgcCA9IHAgPz8gUy5MT0dfTEVWRUxfSU5GTywgYi5zZXRMZXZlbChwKTtcbiAgICBjb25zdCBjID0ge1xuICAgICAgZ3JheTogKGcpID0+IGcudG9TdHJpbmcoKSxcbiAgICAgIGdyZWVuOiAoZykgPT4gZy50b1N0cmluZygpLFxuICAgICAgeWVsbG93OiAoZykgPT4gZy50b1N0cmluZygpLFxuICAgICAgcmVkOiAoZykgPT4gZy50b1N0cmluZygpXG4gICAgfTtcbiAgICBSLnJlZyhiKSwgUi5hcHBseShiLCB7XG4gICAgICBmb3JtYXQoZywgdywgRSkge1xuICAgICAgICBjb25zdCByID0gW1wiW1wiICsgKHQgPz8gSS5nZXRFbnZMb2dnZXIobCkgPz8gXCJ6aGlcIikgKyBcIl1cIl07XG4gICAgICAgIHN3aXRjaCAoci5wdXNoKFxuICAgICAgICAgIGMuZ3JheShcIltcIikgKyBjLmdyZWVuKEUpLnRvU3RyaW5nKCkgKyBjLmdyYXkoXCJdXCIpXG4gICAgICAgICksIGcpIHtcbiAgICAgICAgICBjYXNlIFMuTE9HX0xFVkVMX0RFQlVHOlxuICAgICAgICAgICAgci5wdXNoKGMuZ3JheShnLnRvVXBwZXJDYXNlKCkudG9TdHJpbmcoKSkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSBTLkxPR19MRVZFTF9JTkZPOlxuICAgICAgICAgICAgci5wdXNoKGMuZ3JlZW4oZy50b1VwcGVyQ2FzZSgpLnRvU3RyaW5nKCkpKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgUy5MT0dfTEVWRUxfV0FSTjpcbiAgICAgICAgICAgIHIucHVzaChjLnllbGxvdyhnLnRvVXBwZXJDYXNlKCkudG9TdHJpbmcoKSkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSBTLkxPR19MRVZFTF9FUlJPUjpcbiAgICAgICAgICAgIHIucHVzaChjLnJlZChnLnRvVXBwZXJDYXNlKCkudG9TdHJpbmcoKSkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHIucHVzaChjLmdyZWVuKHcpLnRvU3RyaW5nKCkpLCByLnB1c2goYy5ncmF5KFwiOlwiKSksIHIuam9pbihcIiBcIik7XG4gICAgICB9XG4gICAgfSk7XG4gIH1cbiAgLyoqXG4gICAqIOiuvue9rui+k+WHuuagiOeahOa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gbWVudSBub3QgZm91bmQhJyk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIHRoaXMubWVudSA9IG1lbnU7XHJcbiAgICAgICAgaWYgKCFpZCkge1xyXG4gICAgICAgICAgICB0aHJvdyBFcnJvcignTWVudSBtdXN0IGhhcyBhbiBpZCwgZ290IGVtcHR5IG9yIHVuZGVmaW5lZCEnKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgbWVudS5yZW1vdmUoKTtcclxuICAgICAgICBtZW51LmVsZW1lbnQuc2V0QXR0cmlidXRlKCdkYXRhLW5hbWUnLCBpZCk7XHJcbiAgICB9XHJcblxyXG4gICAgYWRkSXRlbShpdGVtOiBNZW51SXRlbSkge1xyXG4gICAgICAgIHRoaXMubWVudS5hcHBlbmQoaXRlbS5lbGVtZW50KTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBhZGRTZXBhcmF0b3IoKSB7XHJcbiAgICAgICAgdGhpcy5hZGRJdGVtKG5ldyBNZW51SXRlbSh7IHR5cGU6ICdzZXBhcmF0b3InIH0pKTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBzaG93QXRNb3VzZUV2ZW50KGV2ZW50OiBNb3VzZUV2ZW50KSB7XHJcbiAgICAgICAgdGhpcy5tZW51LnBvcHVwKHsgeDogZXZlbnQuY2xpZW50WCwgeTogZXZlbnQuY2xpZW50WSB9KTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBzaG93QXRQb3NpdGlvbihwb3NpdGlvbjogeyB4OiBudW1iZXI7IHk6IG51bWJlciB9KSB7XHJcbiAgICAgICAgdGhpcy5tZW51LnBvcHVwKHsgeDogcG9zaXRpb24ueCwgeTogcG9zaXRpb24ueSB9KTtcclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBjbG9zZSgpIHtcclxuICAgICAgICB0aGlzLm1lbnUucmVtb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zLmZvckVhY2goKHApID0+IHAuZGVzdHJveSgpKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZGVzdHJveSgpIHtcclxuICAgICAgICB0aGlzLmVsZW1lbnQucmVtb3ZlKCk7XHJcbiAgICAgICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL3NpeXVhbi1ub3RlL3NpeXVhbi9pc3N1ZXMvNjc4M1xyXG4gICAgICAgIHdpbmRvdy5zaXl1YW4ubWVudXMubWVudS5yZW1vdmUoKTtcclxuICAgICAgICBpZiAodGhpcy5kZXN0cm95Q2FsbGJhY2spIHtcclxuICAgICAgICAgICAgdGhpcy5kZXN0cm95Q2FsbGJhY2soKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgd2luZG93LnNpeXVhbi5kaWFsb2dzLmZpbmQoKGl0ZW0sIGluZGV4KSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChpdGVtLmlkID09PSB0aGlzLmlkKSB7XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuc2l5dWFuLmRpYWxvZ3Muc3BsaWNlKGluZGV4LCAxKTtcclxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIGJpbmRJbnB1dChpbnB1dEVsZW1lbnQ6IEhUTUxJbnB1dEVsZW1lbnQgfCBIVE1MVGV4dEFyZWFFbGVtZW50LCBlbnRlckV2ZW50PzogKCkgPT4gdm9pZCkge1xyXG4gICAgICAgIGlucHV0RWxlbWVudC5mb2N1cygpO1xyXG4gICAgICAgIGlucHV0RWxlbWVudC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJywgKGV2ZW50OiBLZXlib2FyZEV2ZW50KSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChldmVudC5pc0NvbXBvc2luZykge1xyXG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBpZiAoZXZlbnQua2V5ID09PSAnRXNjYXBlJykge1xyXG4gICAgICAgICAgICAgICAgdGhpcy5kZXN0cm95KCk7XHJcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgaWYgKGV2ZW50LmtleSA9PT0gJ0VudGVyJyAmJiBlbnRlckV2ZW50KSB7XHJcbiAgICAgICAgICAgICAgICBlbnRlckV2ZW50KCk7XHJcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbn1cclxuIiwiLyogZXNsaW50LWRpc2FibGUgKi9cclxuaW1wb3J0IHsgSVBsdWdpbiwgSVBsdWdpbkNvbW1hbmQsIFNldHRpbmdSZW5kZXIgfSBmcm9tICcuLi90eXBlcyc7XHJcblxyXG5leHBvcnQgY2xhc3MgUGx1Z2luIGltcGxlbWVudHMgSVBsdWdpbiB7XHJcbiAgICBfaWQ6IHN0cmluZztcclxuICAgIG9ubG9hZCgpIHt9XHJcbiAgICBvbnVubG9hZCgpIHt9XHJcbiAgICByZWdpc3RlckNvbW1hbmQoY29tbWFuZDogSVBsdWdpbkNvbW1hbmQpIHt9XHJcbiAgICByZWdpc3RlclNldHRpbmdSZW5kZXIoc2V0dGluZ1JlbmRlcjogU2V0dGluZ1JlbmRlcikge31cclxuICAgIGFzeW5jIGxvYWRTdG9yYWdlKGZpbGVuYW1lOiBzdHJpbmcpIHtcclxuICAgICAgICByZXR1cm4gbnVsbDtcclxuICAgIH1cclxuICAgIGFzeW5jIHdyaXRlU3RvcmFnZShmaWxlbmFtZT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LyAgICAgdGhpcy5maWxlQXBpID0gdGhpcy5zZXJ2ZXJBcGk7XHJcbiAgICAgICAgLy8gfVxyXG4gICAgfVxyXG5cclxuICAgIHN0YXRpYyBnZXRJbnN0YW5jZUFwaSgpIHtcclxuICAgICAgICBpZiAoIXRoaXMuZmlsZUNsaWVudCkge1xyXG4gICAgICAgICAgICB0aGlzLmZpbGVDbGllbnQgPSBuZXcgRmlsZUNsaWVudCgpO1xyXG4gICAgICAgIH1cclxuICAgICAgICByZXR1cm4gdGhpcy5maWxlQ2xpZW50O1xyXG4gICAgfVxyXG5cclxuICAgIGVsZWN0cm9uQXBpID0ge1xyXG4gICAgICAgIHJlYWREaXIocDogc3RyaW5nKTogUHJvbWlzZTxBcnJheTx7IGlzRGlyOiBib29sZWFuOyBuYW1lOiBzdHJpbmcgfT4+IHtcclxuICAgICAgICAgICAgY29uc3QgZnMgPSB3aW5kb3cucmVxdWlyZSgnZnMnKTtcclxuICAgICAgICAgICAgY29uc3QgcGF0aCA9IHdpbmRvdy5yZXF1aXJlKCdwYXRoJyk7XHJcbiAgICAgICAgICAgIGNvbnN0IFNJWVVBTl9XT1JLU1BBQ0UgPSBwYXRoLmpvaW4od2luZG93LnNpeXVhbi5jb25maWcuc3lzdGVtLmRhdGFEaXIsICcuLicpO1xyXG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHtcclxuICAgICAgICAgICAgICAgIGZzLnJlYWRkaXIocGF0aC5qb2luKFNJWVVBTl9XT1JLU1BBQ0UsIHApLCAoZXJyLCBmaWxlczogc3RyaW5nW10pID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUoW10pO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IGZpbGVzLm1hcDx7IGlzRGlyOiBib29sZWFuOyBuYW1lOiBzdHJpbmcgfT4oKGY6IHN0cmluZykgPT4gKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaXNEaXI6IChmcy5zdGF0U3luYyhwYXRoLmpvaW4oU0lZVUFOX1dPUktTUEFDRSwgcCwgZikpIGFzIFN0YXRzKS5pc0RpcmVjdG9yeSgpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBmLFxyXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcclxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBnZXRGaWxlKGY6IHN0cmluZywgdHlwZTogJ2pzb24nIHwgJ3RleHQnID0gJ3RleHQnKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBmcyA9IHdpbmRvdy5yZXF1aXJlKCdmcycpO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgcGF0aCA9IHdpbmRvdy5yZXF1aXJlKCdwYXRoJyk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBTSVlVQU5fV09SS1NQQUNFID0gcGF0aC5qb2luKHdpbmRvdy5zaXl1YW4uY29uZmlnLnN5c3RlbS5kYXRhRGlyLCAnLi4nKTtcclxuICAgICAgICAgICAgICAgIGZzLnJlYWRGaWxlKHBhdGguam9pbihTSVlVQU5fV09SS1NQQUNFLCBmKSwgKGVyciwgZGF0YSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB0ZXh0ID0gZGF0YS50b1N0cmluZygndXRmOCcpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09PSAnanNvbicpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKEpTT04ucGFyc2UodGV4dCkpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZSk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmUodGV4dCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICBwdXRGaWxlOiBzZXJ2ZXJBcGkucHV0RmlsZSxcclxuICAgICAgICByZW1vdmVGaWxlKGY6IHN0cmluZyk6IFByb21pc2U8dm9pZD4ge1xyXG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgZnMgPSB3aW5kb3cucmVxdWlyZSgnZnMnKTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IHBhdGggPSB3aW5kb3cucmVxdWlyZSgncGF0aCcpO1xyXG4gICAgICAgICAgICAgICAgY29uc3QgU0lZVUFOX1dPUktTUEFDRSA9IHBhdGguam9pbih3aW5kb3cuc2l5dWFuLmNvbmZpZy5zeXN0ZW0uZGF0YURpciwgJy4uJyk7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBwID0gcGF0aC5qb2luKFNJWVVBTl9XT1JLU1BBQ0UsIGYpO1xyXG4gICAgICAgICAgICAgICAgbG9nKCd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nICsgcGF0aCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXRpbHMuaXNTdHJpbmcoZG9tYWluKSkge1xuICAgICAgICAgIGNvb2tpZS5wdXNoKCdkb21haW49JyArIGRvbWFpbik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoc2VjdXJlID09PSB0cnVlKSB7XG4gICAgICAgICAgY29va2llLnB1c2goJ3NlY3VyZScpO1xuICAgICAgICB9XG5cbiAgICAgICAgZG9jdW1lbnQuY29va2llID0gY29va2llLmpvaW4oJzsgJyk7XG4gICAgICB9LFxuXG4gICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG5hbWUpIHtcbiAgICAgICAgY29uc3QgbWF0Y2ggPSBkb2N1bWVudC5jb29raWUubWF0Y2gobmV3IFJlZ0V4cCgnKF58O1xcXFxzKikoJyArIG5hbWUgKyAnKT0oW147XSopJykpO1xuICAgICAgICByZXR1cm4gKG1hdGNoID8gZGVjb2RlVVJJQ29tcG9uZW50KG1hdGNoWzNdKSA6IG51bGwpO1xuICAgICAgfSxcblxuICAgICAgcmVtb3ZlOiBmdW5jdGlvbiByZW1vdmUobmFtZSkge1xuICAgICAgICB0aGlzLndyaXRlKG5hbWUsICcnLCBEYXRlLm5vdygpIC0gODY0MDAwMDApO1xuICAgICAgfVxuICAgIH07XG4gIH0pKCkgOlxuXG4vLyBOb24gc3RhbmRhcmQgYnJvd3NlciBlbnYgKHdlYiB3b3JrZXJzLCByZWFjdC1uYXRpdmUpIGxhY2sgbmVlZGVkIHN1cHBvcnQuXG4gIChmdW5jdGlvbiBub25TdGFuZGFyZEJyb3dzZXJFbnYoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZSgpIHt9LFxuICAgICAgcmVhZDogZnVuY3Rpb24gcmVhZCgpIHsgcmV0dXJuIG51bGw7IH0sXG4gICAgICByZW1vdmU6IGZ1bmN0aW9uIHJlbW92ZSgpIHt9XG4gICAgfTtcbiAgfSk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iAoa2V5KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHJldHVybiBmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIGZvciAodmFyIF9pID0gMCwgX2EgPSBfdGhpcy5tZXRhZGF0YTsgX2kgPCBfYS5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgbSA9IF9hW19pXTtcbiAgICAgICAgICAgICAgICBpZiAobS5rZXkgPT09IGtleSAmJiBtLnZhbHVlID09PSB2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH07XG4gICAgfTtcbiAgICByZXR1cm4gVGFyZ2V0O1xufSgpKTtcbmV4cG9ydCB7IFRhcmdldCB9O1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGFyZ2V0LmpzLm1hcCIsInZhciBfX3NwcmVhZEFycmF5ID0gKHRoaXMgJiYgdGhpcy5fX3NwcmVhZEFycmF5KSB8fCBmdW5jdGlvbiAodG8sIGZyb20sIHBhY2spIHtcbiAgICBpZiAocGFjayB8fCBhcmd1bWVudHMubGVuZ3RoID09PSAyKSBmb3IgKHZhciBpID0gMCwgbCA9IGZyb20ubGVuZ3RoLCBhcjsgaSA8IGw7IGkrKykge1xuICAgICAgICBpZiAoYXIgfHwgIShpIGluIGZyb20pKSB7XG4gICAgICAgICAgICBpZiAoIWFyKSBhciA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGZyb20sIDAsIGkpO1xuICAgICAgICAgICAgYXJbaV0gPSBmcm9tW2ldO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB0by5jb25jYXQoYXIgfHwgQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoZnJvbSkpO1xufTtcbmltcG9ydCB7IExhenlTZXJ2aWNl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HJpbmcsIGdldEJpbmRpbmdzKTtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IobXNnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgY2FzZSBCaW5kaW5nQ291bnQuT25seU9uZUJpbmRpbmdBdmFpbGFibGU6XG4gICAgICAgICAgICByZXR1cm4gYmluZGluZ3M7XG4gICAgICAgIGNhc2UgQmluZGluZ0NvdW50Lk11bHRpcGxlQmluZGluZ3NBdmFpbGFibGU6XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBpZiAoIXRhcmdldC5pc0FycmF5KCkpIHtcbiAgICAgICAgICAgICAgICB2YXIgc2VydmljZUlkZW50aWZpZXJTdHJpbmcgPSBnZXRTZXJ2aWNlSWRlbnRpZmllckFzU3RyaW5nKHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICAgICAgICAgICAgICB2YXIgbXNnID0gRVJST1JfTVNHUy5BTUJJR1VPVVNfTUFUQ0ggKyBcIiBcIiArIHNlcnZpY2VJZGVudGlmaWVyU3RyaW5nO1xuICAgICAgICAgICAgICAgIG1zZyArPSBsaXN0UmVnaXN0ZXJlZEJpbmRpbmdzRm9yU2VydmljZUlkZW50aWZpZXIoY29udGFpbmVyLCBzZXJ2aWNlSWRlbnRpZmllclN0cmluZywgZ2V0QmluZGluZ3MpO1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihtc2cpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpbmRpbmdzO1xuICAgICAgICAgICAgfVxuICAgIH1cbn1cbmZ1bmN0aW9uIF9jcmVhdGVTdWJSZXF1ZXN0cyhtZXRhZGF0YVJlYWRlciwgYXZvaWRDb25zdHJhaW50cywgc2VydmljZUlkZW50aWZpZXIsIGNvbnRleHQsIHBhcmVudFJlcXVlc3QsIHRhcmdldCkge1xuICAgIHZhciBhY3RpdmVCaW5kaW5ncztcbiAgIC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gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBpZiAoYmluZGluZy5jYWNoZSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHN1YkNoaWxkUmVxdWVzdCA9IGNoaWxkUmVxdWVzdDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoYmluZGluZy50eXBlID09PSBCaW5kaW5nVHlwZUVudW0uSW5zdGFuY2UgJiYgYmluZGluZy5pbXBsZW1lbnRhdGlvblR5cGUgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHZhciBkZXBlbmRlbmNpZXMgPSBnZXREZXBlbmRlbmNpZXMobWV0YWRhdGFSZWFkZXIsIGJpbmRpbmcuaW1wbGVtZW50YXRpb25UeXBlKTtcbiAgICAgICAgICAgIGlmICghY29udGV4dC5jb250YWluZXIub3B0aW9ucy5za2lwQmFzZUNsYXNzQ2hlY2tzKSB7XG4gICAgICAgICAgICAgICAgdmFyIGJhc2VDbGFzc0RlcGVuZGVuY3lDb3VudCA9IGdldEJhc2VDbGFzc0RlcGVuZGVuY3lDb3VudChtZXRhZGF0YVJlYWRlciwgYmluZGluZy5pbXBsZW1lbnRhdGlvblR5cGUpO1xuICAgICAgICAgICAgICAgIGlmIChkZXBlbmRlbmNpZXMubGVuZ3RoIDwgYmFzZUNsYXNzRGVwZW5kZW5jeUNvdW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBlcnJvciA9IEVSUk9SX01TR1MuQVJHVU1FTlRTX0xFTkdUSF9NSVNNQVRDSChnZXRGdW5jdGlvbk5hbWUoYmluZGluZy5pbXBsZW1lbnRhdGlvblR5cGUpKTtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkZXBlbmRlbmNpZXMuZm9yRWFjaChmdW5jdGlvbiAoZGVwZW5kZW5je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B9OyB9XG4gICAgZnVuY3Rpb24gc3RlcChvcCkge1xuICAgICAgICBpZiAoZikgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkdlbmVyYXRvciBpcyBhbHJlYWR5IGV4ZWN1dGluZy5cIik7XG4gICAgICAgIHdoaWxlIChfKSB0cnkge1xuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xuICAgICAgICAgICAgaWYgKHkgPSAwLCB0KSBvcCA9IFtvcFswXSAmIDIsIHQudmFsdWVdO1xuICAgICAgICAgICAgc3dpdGNoIChvcFswXSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNDogXy5sYWJlbCsrOyByZXR1cm4geyB2YWx1ZTogb3BbMV0sIGRvbmU6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgY2FzZSA1OiBfLmxhYmVsKys7IHkgPSBvcFsxXTsgb3AgPSBbMF07IGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICBpZiAoISh0ID0gXy50cnlzLCB0ID0gdC5sZW5ndGggPiAwICYmIHRbdC5sZW5ndGggLSAxXSkgJiYgKG9wWzBdID09PSA2IHx8IG9wWzBdID09PSAyKSkgeyBfID0gMDsgY29udGludWU7IH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0g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fc2F2ZUFzeW5jUmVzdWx0VG9TaW5nbGV0b25TY29wZShiaW5kaW5nLCByZXN1bHQpO1xuICAgIH1cbn07XG52YXIgX3NhdmVBc3luY1Jlc3VsdFRvU2luZ2xldG9uU2NvcGUgPSBmdW5jdGlvbiAoYmluZGluZywgYXN5bmNSZXN1bHQpIHsgcmV0dXJuIF9fYXdhaXRlcih2b2lkIDAsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiAoKSB7XG4gICAgdmFyIHJlc3VsdCwgZXhfMTtcbiAgICByZXR1cm4gX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgIHN3aXRjaCAoX2EubGFiZWwpIHtcbiAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICBfYS50cnlzLnB1c2goWzAsIDIsICwgM10pO1xuICAgICAgICAgICAgICAgIHJldHVybiBbNCwgYXN5bmNSZXN1bHRdO1xuICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICBiaW5kaW5nLmNhY2hlID0gcmVzdWx0O1xuICAgICAgICAgICAgICAgIHJldHVybiBbMywgM107XG4gICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgZXhfMSA9IF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICBiaW5kaW5nLmNhY2hlID0gbnVsbDtcbiAgICAgICAgICAgICAgICBiaW5kaW5nLmFjdGl2YXRlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHRocm93IGV4XzE7XG4gICAgICAgICAgICBjYXNlIDM6IHJldHVybiBbMl07XG4gICAgICAgIH1cbiAgICB9KTtcbn0pOyB9O1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c2NvcGUuanMubWFwIiwiZXhwb3J0IHZhciBGYWN0b3J5VHlwZTtcbihmdW5jdGlvbiAoRmFjdG9yeVR5cGUpIHtcbiAg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2VydmljZShzZXJ2aWNlKTsgfSk7XG4gICAgICAgIH07XG4gICAgfTtcbn07XG5leHBvcnQgdmFyIGVuc3VyZUZ1bGx5Qm91bmQgPSBmdW5jdGlvbiAoYmluZGluZykge1xuICAgIHZhciBib3VuZFZhbHVlID0gbnVsbDtcbiAgICBzd2l0Y2ggKGJpbmRpbmcudHlwZSkge1xuICAgICAgICBjYXNlIEJpbmRpbmdUeXBlRW51bS5Db25zdGFudFZhbHVlOlxuICAgICAgICBjYXNlIEJpbmRpbmdUeXBlRW51bS5GdW5jdGlvbjpcbiAgICAgICAgICAgIGJvdW5kVmFsdWUgPSBiaW5kaW5nLmNhY2hlO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgQmluZGluZ1R5cGVFbnVtLkNvbnN0cnVjdG9yOlxuICAgICAgICBjYXNlIEJpbmRpbmdUeXBlRW51bS5JbnN0YW5jZTpcbiAgICAgICAgICAgIGJvdW5kVmFsdWUgPSBiaW5kaW5nLmltcGxlbWVudGF0aW9uVHlwZTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIEJpbmRpbmdUeXBlRW51bS5EeW5hbWljVmFsdWU6XG4gICAgICAgICAgICBib3VuZFZhbHVlID0gYmluZGluZy5keW5hbWljVmFsdWU7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBCaW5kaW5nVHlwZUVudW0uUHJvdmlkZXI6XG4gICAgICAgICAgICBib3VuZFZhbHVlID0gYmluZGluZy5wcm92aWRlcjtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIEJpbmRpbmdUeXBlRW51bS5GYWN0b3J5OlxuICAgICAgICAgICAgYm91bmRWYWx1ZSA9IGJpbmRpbmcuZmFjdG9yeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgIH1cbiAgICBpZiAoYm91bmRWYWx1ZSA9PT0gbnVsbCkge1xuICAgICAgICB2YXIgc2VydmljZUlkZW50aWZpZXJBc1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gPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xuICAgICAgICAgICAgaWYgKHkgPSAwLCB0KSBvcCA9IFtvcFswXSAmIDIsIHQudmFsdWVdO1xuICAgICAgICAgICAgc3dpdGNoIChvcFswXSkge1xuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNDogXy5sYWJlbCsrOyByZXR1cm4geyB2YWx1ZTogb3BbMV0sIGRvbmU6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgY2FzZSA1OiBfLmxhYmVsKys7IHkgPSBvcFsxXTsgb3AgPSBbMF07IGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICBpZiAoISh0ID0gXy50cnlzLCB0ID0gdC5sZW5ndGggPiAwICYmIHRbdC5sZW5ndGggLSAxXSkgJiYgKG9wWzBdID09PSA2IHx8IG9wWzBdID09PSAyKSkgeyBfID0gMDsgY29udGludWU7IH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSA2ICYmIF8ubGFiZWwgPCB0WzFdKSB7IF8ubGFiZWwgPSB0WzFdOyB0ID0gb3A7IGJyZWFrO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3Rpb25zKGFyZ3MuY29uc3RydWN0b3JJbmplY3Rpb25zKV07XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBjb25zdHJ1Y3RvckluamVjdGlvbnMgPSBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgcG9zc2libHlXYWl0SW5qZWN0aW9ucyhhcmdzLnByb3BlcnR5SW5qZWN0aW9ucyldO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgcHJvcGVydHlJbmplY3Rpb25zID0gX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzIsIGNyZWF0ZUluc3RhbmNlV2l0aEluamVjdGlvbnMoX19hc3NpZ24oX19hc3NpZ24oe30sIGFyZ3MpLCB7IGNvbnN0cnVjdG9ySW5qZWN0aW9uczogY29uc3RydWN0b3JJbmplY3Rpb25zLCBwcm9wZXJ0eUluamVjdGlvbnM6IHByb3BlcnR5SW5qZWN0aW9ucyB9KSldO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcbn1cbmZ1bmN0aW9uIHBvc3NpYmx5V2FpdEluamVjdGlvbnMocG9zc2libGVQcm9taXNlaW5qZWN0aW9ucykge1xuICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGluamVjdGlvbnMsIF9pLCBwb3NzaWJsZVByb21pc2VpbmplY3Rpb25zXzEsIGluamVjdGlvbjtcbiAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgaW5qZWN0aW9ucyA9IFtdO1xuICAgICAgICAgICAgZm9yIChfaSA9IDAsIHBvc3NpYmxlUHJvbWlzZWluamVjdGlvbnNfMSA9IHBvc3NpYmxlUHJvbWlzZWluamVjdGlvb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Gl2YXRpb24udmFsdWUoY29udGV4dCwgcmVzdWx0KV07XG4gICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgIGFjdGl2YXRpb24gPSBhY3RpdmF0aW9uc0l0ZXJhdG9yLm5leHQoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gWzMsIDJdO1xuICAgICAgICAgICAgY2FzZSA0OiByZXR1cm4gWzIsIHJlc3VsdF07XG4gICAgICAgIH1cbiAgICB9KTtcbn0pOyB9O1xudmFyIF9nZXRDb250YWluZXJBY3RpdmF0aW9uc0ZvclNlcnZpY2UgPSBmdW5jdGlvbiAoY29udGFpbmVyLCBzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgIHZhciBhY3RpdmF0aW9ucyA9IGNvbnRhaW5lci5fYWN0aXZhdGlvbnM7XG4gICAgcmV0dXJuIGFjdGl2YXRpb25zLmhhc0tleShzZXJ2aWNlSWRlbnRpZmllcikgPyBhY3RpdmF0aW9ucy5nZXQoc2VydmljZUlkZW50aWZpZXIpLnZhbHVlcygpIDogW10udmFsdWVzKCk7XG59O1xudmFyIF9nZXRDb250YWluZXJzSXRlcmF0b3IgPSBmdW5jdGlvbiAoY29udGFpbmVyKSB7XG4gICAgdmFyIGNvbnRhaW5lcnNTdGFjayA9IFtjb250YWluZXJdO1xuICAgIHZhciBwYXJlbnQgPSBjb250YWluZXIucGFyZW50O1xuICAgIHdoaWxlIChwYXJlbnQgIT09IG51bGwpIHtcbiAgICAgICAgY29udGFpbmVyc1N0YWNrLnB1c2gocGFyZW50KTtcbiAgICAgICAgcGFyZW50ID0gcGFyZW50LnBhcmVudDtcbiAgICB9XG4gICAgdmFyIGdldE5leHRDb250YWluZXIgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBuZXh0Q29udGFpbmVyID0gY29udGFpbmVyc1N0YWNrLnBvcCgpO1xuICAgICAgICBpZiAobmV4dENvbnRha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XNLZXkoc2VydmljZUlkZW50aWZpZXIpID8gbG9va3VwLmdldChzZXJ2aWNlSWRlbnRpZmllcikgOiB1bmRlZmluZWQ7XG4gICAgICAgICAgICBpZiAobG9va3VwQWN0aXZhdGlvbnMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHZhciBmaWx0ZXJlZFZhbHVlcyA9IHZhbHVlLmZpbHRlcihmdW5jdGlvbiAobG9va3VwVmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFsb29rdXBBY3RpdmF0aW9ucy5zb21lKGZ1bmN0aW9uIChtb2R1bGVBY3RpdmF0aW9uKSB7IHJldHVybiBsb29rdXBWYWx1ZSA9PT0gbW9kdWxlQWN0aXZhdGlvbjsgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgX3RoaXMuX3NldFZhbHVlKHNlcnZpY2VJZGVudGlmaWVyLCBmaWx0ZXJlZFZhbHVlcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgTG9va3VwLnByb3RvdHlwZS5yZW1vdmVCeUNvbmRpdGlvbiA9IGZ1bmN0aW9uIChjb25kaXRpb24pIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgdmFyIHJlbW92YWxzID0gW107XG4gICAgICAgIHRoaXMuX21hcC5mb3JFYWNoKGZ1bmN0aW9uIChlbnRyaWVzLCBrZXkpIHtcbiAgICAgICAgICAgIHZhciB1cGRhdGVkRW50cmllcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwLCBlbnRyaWVzXzEgPSBlbnRyaWVzOyBfaSA8IGVudHJpZXNfMS5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgZW50cnkgPSBlbnRyaWVzXzFbX2ldO1xuICAgICAgICAgICAgICAgIHZhciByZW1vdmUgPSBjb25kaXRpb24oZW50cnkpO1xuICAgICAgICAgICAgICAgIGlmIChyZW1vdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZhbHMucHVzaChlbnRyeSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB1cGRhdGVkRW50cmllcy5wdXNoKGVudHJ5KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfdGhpcy5fc2V0VmFsdWUoa2V5LCB1cGRhdGVkRW50cmllcyk7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gcmVtb3ZhbHM7XG4gICAgfTtcbiAgICBMb29rdXAucHJvdG90eXBlLmhhc0tleSA9IGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICBpZiAoc2VydmljZUlkZW50aWZpZXIgPT09IG51bGwgfHwgc2VydmljZUlkZW50aWZpZXIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKEVSUk9SX01TR1MuTlVMTF9BUkdVTUVOVCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXMuX21hcC5oYXMoc2VydmljZUlkZW50aWZpZXIpO1xuICAgIH07XG4gICAgTG9va3VwLnByb3RvdHlwZS5jbG9uZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgdmFyIGNvcHkgPSBuZXcgTG9va3VwKCk7XG4gICAgICAgIHRoaXMuX21hcC5mb3JFYWNoKGZ1bmN0aW9uICh2YWx1ZSwga2V5KSB7XG4gICAgICAgICAgICB2YWx1ZS5mb3JFYWNoKGZ1bmN0aW9uIChiKSB7IHJldHVybiBjb3B5LmFkZChrZXksIGlzQ2xvbmFibGUoYikgPyBiLmNsb25lKCkgOiBiKTsgfSk7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gY29weTtcbiAgICB9O1xuICAgIExvb2t1cC5wcm90b3R5cGUudHJhdmVyc2UgPSB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cnM7XG4gICAgICAgICAgICByZXR1cm4gX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24gKF9iKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChfYi5sYWJlbCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRIZWxwZXJzID0gdGhpcy5fZ2V0Q29udGFpbmVyTW9kdWxlSGVscGVyc0ZhY3RvcnkoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hID0gMCwgbW9kdWxlc18yID0gbW9kdWxlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIF9iLmxhYmVsID0gMTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoX2EgPCBtb2R1bGVzXzIubGVuZ3RoKSkgcmV0dXJuIFszLCA0XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRNb2R1bGUgPSBtb2R1bGVzXzJbX2FdO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGFpbmVyTW9kdWxlSGVscGVycyA9IGdldEhlbHBlcnMoY3VycmVudE1vZHVsZS5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIGN1cnJlbnRNb2R1bGUucmVnaXN0cnkoY29udGFpbmVyTW9kdWxlSGVscGVycy5iaW5kRnVuY3Rpb24sIGNvbnRhaW5lck1vZHVsZUhlbHBlcnMudW5iaW5kRnVuY3Rpb24sIGNvbnRhaW5lck1vZHVsZUhlbHBlcnMuaXNib3VuZEZ1bmN0aW9uLCBjb250YWluZXJNb2R1bGVIZWxwZXJzLnJlYmluZEZ1bmN0aW9uLCBjb250YWluZXJNb2R1bGVIZWxwZXJzLnVuYmluZEFzeW5jRnVuY3Rpb24sIGNvbnRhaW5lck1vZHVsZUhlbHBlcnMub25BY3RpdmF0aW9uRnVuY3Rpb24sIGNvbnRhaW5lck1vZHVsZUhlbHBlcnMub25EZWFjdGl2YXRpb25GdW5jdGlvbildO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYi5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBfYi5sYWJlbCA9IDM7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hKys7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzMsIDFdO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6IHJldHVybiBbMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS51bmxvYWQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHZhciBtb2R1bGVzID0gW107XG4gICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBhcmd1bWVudHMubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgICAgICBtb2R1bGVzW19pXSA9IGFyZ3VtZW50c1tfaV07XG4gICAgICAgIH1cbiAgICAgICAgbW9kdWxlcy5mb3JFYWNoKGZ1bmN0aW9uIChtb2R1bGUpIHtcbiAgICAgICAgICAgIHZhciBkZWFjdGl2YXRpb25zID0gX3RoaXMuX3JlbW92ZU1vZHVsZUJpbmRpbmdzKG1vZHVsZS5pZCk7XG4gICAgICAgICAgICBfdGhpcy5fZGVhY3RpdmF0ZVNpbmdsZXRvbnMoZGVhY3RpdmF0aW9ucyk7XG4gICAgICAgICAgICBfdGhpcy5fcmVtb3ZlTW9kdWxlSGFuZGxlcnMobW9kdWxlLmlkKTtcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLnVubG9hZEFzeW5jID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgbW9kdWxlcyA9IFtdO1xuICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgbW9kdWxlc1tfaV0gPSBhcmd1bWVudHNbX2ldO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBfYSwgbW9kdWxlc18zLCBtb2R1bGVfMSwgZGVhY3RpdmF0aW9ucztcbiAgICAgICAgICAgIHJldHVybiBfX2dlbmVyYXRvcih0aGlzLCBmdW5jdGlvbiAoX2IpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKF9iLmxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hID0gMCwgbW9kdWxlc18zID0gbW9kdWxlcztcbiAgICAgICAgICAgICAgICAgICAgICAgIF9iLmxhYmVsID0gMTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoX2EgPCBtb2R1bGVzXzMubGVuZ3RoKSkgcmV0dXJuIFszLCA0XTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1vZHVsZV8xID0gbW9kdWxlc18zW19hXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlYWN0aXZhdGlvbnMgPSB0aGlzLl9yZW1vdmVNb2R1bGVCaW5kaW5ncyhtb2R1bGVfMS5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIHRoaXMuX2RlYWN0aXZhdGVTaW5nbGV0b25zQXN5bmMoZGVhY3RpdmF0aW9ucyldO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYi5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9yZW1vdmVNb2R1bGVIYW5kbGVycyhtb2R1bGVfMS5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBfYi5sYWJlbCA9IDM7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hKys7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzMsIDFdO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6IHJldHVybiBbMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS5iaW5kID0gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgICAgIHZhciBzY29wZSA9IHRoaXMub3B0aW9ucy5kZWZhdWx0U2NvcGUgfHwgQmluZGluZ1Njb3BlRW51bS5UcmFuc2llbnQ7XG4gICAgICAgIHZhciBiaW5kaW5nID0gbmV3IEJpbmRpbmcoc2VydmljZUlkZW50aWZpZXIsIHNjb3BlKTtcbiAgICAgICAgdGhpcy5fYmluZGluZ0RpY3Rpb25hcnkuYWRkKHNlcnZpY2VJZGVudGlmaWVyLCBiaW5kaW5nKTtcbiAgICAgICAgcmV0dXJuIG5ldyBCaW5kaW5nVG9TeW50YXgoYmluZGluZyk7XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLnJlYmluZCA9IGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICB0aGlzLnVuYmluZChzZXJ2aWNlSWRlbnRpZmllcik7XG4gICAgICAgIHJldHVybiB0aGlzLmJpbmQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS5yZWJpbmRBc3luYyA9IGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChfYS5sYWJlbCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDA6IHJldHVybiBbNCwgdGhpcy51bmJpbmRBc3luYyhzZXJ2aWNlSWRlbnRpZmllcildO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzIsIHRoaXMuYmluZChzZXJ2aWNlSWRlbnRpZmllcildO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUudW5iaW5kID0gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgICAgIGlmICh0aGlzLl9iaW5kaW5nRGljdGlvbmFyeS5oYXNLZXkoc2VydmljZUlkZW50aWZpZXIpKSB7XG4gICAgICAgICAgICB2YXIgYmluZGluZ3MgPSB0aGlzLl9iaW5kaW5nRGljdGlvbmFyeS5nZXQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICAgICAgdGhpcy5fZGVhY3RpdmF0ZVNpbmdsZXRvbnMoYmluZGluZ3MpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuX3JlbW92ZVNlcnZpY2VGcm9tRGljdGlvbmFyeShzZXJ2aWNlSWRlbnRpZmllcik7XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLnVuYmluZEFzeW5jID0gZnVuY3Rpb24gKHNlcnZpY2VJZGVudGlmaWVyKSB7XG4gICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBiaW5kaW5ncztcbiAgICAgICAgICAgIHJldHVybiBfX2dlbmVyYXRvcih0aGlzLCBmdW5jdGlvbiAoX2EpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKF9hLmxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5fYmluZGluZ0RpY3Rpb25hcnkuaGFzS2V5KHNlcnZpY2VJZGVudGlmaWVyKSkgcmV0dXJuIFszLCAyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJpbmRpbmdzID0gdGhpcy5fYmluZGluZ0RpY3Rpb25hcnkuZ2V0KHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbNCwgdGhpcy5fZGVhY3RpdmF0ZVNpbmdsZXRvbnNBc3luYyhiaW5kaW5ncyldO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5sYWJlbCA9IDI7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3JlbW92ZVNlcnZpY2VGcm9tRGljdGlvbmFyeShzZXJ2aWNlSWRlbnRpZmllcik7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUudW5iaW5kQWxsID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB0aGlzLl9iaW5kaW5nRGljdGlvbmFyeS50cmF2ZXJzZShmdW5jdGlvbiAoX2tleSwgdmFsdWUpIHtcbiAgICAgICAgICAgIF90aGlzLl9kZWFjdGl2YXRlU2luZ2xldG9ucyh2YWx1ZSk7XG4gICAgICAgIH0pO1xuICAgICAgICB0aGlzLl9iaW5kaW5nRGljdGlvbmFyeSA9IG5ldyBMb29rdXAoKTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUudW5iaW5kQWxsQXN5bmMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBwcm9taXNlcztcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICByZXR1cm4gX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChfYS5sYWJlbCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fYmluZGluZ0RpY3Rpb25hcnkudHJhdmVyc2UoZnVuY3Rpb24gKF9rZXksIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvbWlzZXMucHVzaChfdGhpcy5fZGVhY3RpdmF0ZVNpbmdsZXRvbnNBc3luYyh2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIFByb21pc2UuYWxsKHByb21pc2VzKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2JpbmRpbmdEaWN0aW9uYXJ5ID0gbmV3IExvb2t1cCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFs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yIGV4XzE7XG4gICAgICAgICAgICByZXR1cm4gX19nZW5lcmF0b3IodGhpcywgZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChfYS5sYWJlbCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS50cnlzLnB1c2goWzAsIDIsICwgM10pO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFs0LCBhc3luY1Jlc3VsdF07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMywgM107XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4XzEgPSBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoRVJST1JfTVNHUy5PTl9ERUFDVElWQVRJT05fRVJST1IoY29uc3RydWN0b3IubmFtZSwgZXhfMS5tZXNzYWdlKSk7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzogcmV0dXJuIFsyXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLl9kZWFjdGl2YXRlQ29udGFpbmVyID0gZnVuY3Rpb24gKGluc3RhbmNlLCBkZWFjdGl2YXRpb25zSXRlcmF0b3IpIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgdmFyIGRlYWN0aXZhdGlvbiA9IGRlYWN0aXZhdGlvbnNJdGVyYXRvci5uZXh0KCk7XG4gICAgICAgIHdoaWxlIChkZWFjdGl2YXRpb24udmFsdWUpIHtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBkZWFjdGl2YXRpb24udmFsdWUoaW5zdGFuY2UpO1xuICAgICAgICAgICAgaWYgKGlzUHJvbWlzZShyZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLl9kZWFjdGl2YXRlQ29udGFpbmVyQXN5bmMoaW5zdGFuY2UsIGRlYWN0aXZhdGlvbnNJdGVyYXRvcik7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWFjdGl2YXRpb24gPSBkZWFjdGl2YXRpb25zSXRlcmF0b3IubmV4dCgpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLl9kZWFjdGl2YXRlQ29udGFpbmVyQXN5bmMgPSBmdW5jdGlvbiAoaW5zdGFuY2UsIGRlYWN0aXZhdGlvbnNJdGVyYXRvcikge1xuICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZGVhY3RpdmF0aW9uO1xuICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoX2EubGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgZGVhY3RpdmF0aW9uID0gZGVhY3RpdmF0aW9uc0l0ZXJhdG9yLm5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLmxhYmVsID0gMTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFkZWFjdGl2YXRpb24udmFsdWUpIHJldHVybiBbMywgM107XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIGRlYWN0aXZhdGlvbi52YWx1ZShpbnN0YW5jZSldO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWFjdGl2YXRpb24gPSBkZWFjdGl2YXRpb25zSXRlcmF0b3IubmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFszLCAxXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOiByZXR1cm4gWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUuX2dldENvbnRhaW5lck1vZHVsZUhlbHBlcnNGYWN0b3J5ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICB2YXIgc2V0TW9kdWxlSWQgPSBmdW5jdGlvbiAoYmluZGluZ1RvU3ludGF4LCBtb2R1bGVJZCkge1xuICAgICAgICAgICAgYmluZGluZ1RvU3ludGF4Ll9iaW5kaW5nLm1vZHVsZUlkID0gbW9kdWxlSWQ7XG4gICAgICAgIH07XG4gICAgICAgIHZhciBnZXRCaW5kRnVuY3Rpb24gPSBmdW5jdGlvbiAobW9kdWxlSWQpIHtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2VydmljZUlkZW50aWZpZXIpIHtcbiAgICAgICAgICAgICAgICB2YXIgYmluZGluZ1RvU3ludGF4ID0gX3RoaXMuYmluZChzZXJ2aWNlSWRlbnRpZmllcik7XG4gICAgICAgICAgICAgICAgc2V0TW9kdWxlSWQoYmluZGluZ1RvU3ludGF4LCBtb2R1bGVJZCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpbmRpbmdUb1N5bnRheDtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIHZhciBnZXRVbmJpbmRGdW5jdGlvbiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2VydmljZUlkZW50aWZpZXIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMudW5iaW5kKHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIHZhciBnZXRVbmJpbmRBc3luY0Z1bmN0aW9uID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy51bmJpbmRBc3luYyhzZXJ2aWNlSWRlbnRpZmllcik7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgICB2YXIgZ2V0SXNib3VuZEZ1bmN0aW9uID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5pc0JvdW5kKHNlcnZpY2VJZGVudGlmaWVyKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIHZhciBnZXRSZWJpbmRGdW5jdGlvbiA9IGZ1bmN0aW9uIChtb2R1bGVJZCkge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICAgICAgICAgIHZhciBiaW5kaW5nVG9TeW50YXggPSBfdGhpcy5yZWJpbmQoc2VydmljZUlkZW50aWZpZXIpO1xuICAgICAgICAgICAgICAgIHNldE1vZHVsZUlkKGJpbmRpbmdUb1N5bnRheCwgbW9kdWxlSWQpO1xuICAgICAgICAgICAgICAgIHJldHVybiBiaW5kaW5nVG9TeW50YXg7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgICB2YXIgZ2V0T25BY3R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IHtcbiAgICAgICAgICAgIGF2b2lkQ29uc3RyYWludHM6IGZhbHNlLFxuICAgICAgICAgICAgaXNNdWx0aUluamVjdDogaXNNdWx0aUluamVjdCxcbiAgICAgICAgICAgIHNlcnZpY2VJZGVudGlmaWVyOiBzZXJ2aWNlSWRlbnRpZmllcixcbiAgICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgICAgdmFsdWU6IHZhbHVlLFxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gZ2V0Tm90QWxsQXJncztcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUuX3BsYW5BbmRSZXNvbHZlID0gZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGFyZ3MpIHtcbiAgICAgICAgICAgIHZhciBjb250ZXh0ID0gcGxhbihfdGhpcy5fbWV0YWRhdGFSZWFkZXIsIF90aGlzLCBhcmdzLmlzTXVsdGlJbmplY3QsIGFyZ3MudGFyZ2V0VHlwZSwgYXJncy5zZXJ2aWNlSWRlbnRpZmllciwgYXJncy5rZXksIGFyZ3MudmFsdWUsIGFyZ3MuYXZvaWRDb25zdHJhaW50cyk7XG4gICAgICAgICAgICBjb250ZXh0ID0gYXJncy5jb250ZXh0SW50ZXJjZXB0b3IoY29udGV4dCk7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gcmVzb2x2ZShjb250ZXh0KTtcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH07XG4gICAgfTtcbiAgICBDb250YWluZXIucHJvdG90eXBlLl9kZWFjdGl2YXRlSWZTaW5nbGV0b24gPSBmdW5jdGlvbiAoYmluZGluZykge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICBpZiAoIWJpbmRpbmcuYWN0aXZhdGVkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlz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AgICAgICAgICAgc3dpdGNoIChfYS5sYWJlbCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDA6IHJldHVybiBbNCwgUHJvbWlzZS5hbGwoYmluZGluZ3MubWFwKGZ1bmN0aW9uIChiKSB7IHJldHVybiBfdGhpcy5fZGVhY3RpdmF0ZUlmU2luZ2xldG9uKGIpOyB9KSldO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgICAgICBfYS5zZW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUuX3Byb3BhZ2F0ZUNvbnRhaW5lckRlYWN0aXZhdGlvblRoZW5CaW5kaW5nQW5kUHJlRGVzdHJveSA9IGZ1bmN0aW9uIChiaW5kaW5nLCBpbnN0YW5jZSwgY29uc3RydWN0b3IpIHtcbiAgICAgICAgaWYgKHRoaXMucGFyZW50KSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fZGVhY3RpdmF0ZS5iaW5kKHRoaXMucGFyZW50KShiaW5kaW5nLCBpbnN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5fYmluZGluZ0RlYWN0aXZhdGlvbkFuZFByZURlc3Ryb3koYmluZGluZywgaW5zdGFuY2UsIGNvbnN0cnVjdG9yKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgQ29udGFpbmVyLnByb3RvdHlwZS5fcHJvcGFnYXRlQ29udGFpbmVyRGVhY3RpdmF0aW9uVGhlbkJpbmRpbmdBbmRQcmVEZXN0cm95QXN5bmMgPSBmdW5jdGlvbiAoYmluZGluZywgaW5zdGFuY2UsIGNvbnN0cnVjdG9yKSB7XG4gICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBfX2dlbmVyYXRvcih0aGlzLCBmdW5jdGlvbiAoX2EpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKF9hLmxhYmVsKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghdGhpcy5wYXJlbnQpIHJldHVybiBbMywgMl07XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIHRoaXMuX2RlYWN0aXZhdGUuYmluZCh0aGlzLnBhcmVudCkoYmluZGluZywgaW5zdGFuY2UpXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFszLCA0XTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAyOiByZXR1cm4gWzQsIHRoaXMuX2JpbmRpbmdEZWFjdGl2YXRpb25BbmRQcmVEZXN0cm95QXN5bmMoYmluZGluZywgaW5zdGFuY2UsIGNvbnN0cnVjdG9yKV07XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLnNlbnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9hLmxhYmVsID0gNDtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA0OiByZXR1cm4gWzJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9O1xuICAgIENvbnRhaW5lci5wcm90b3R5cGUuX3JlbW92ZVNlcnZpY2VGcm9tRGljdGlvbmFyeSA9IGZ1bmN0aW9uIChzZXJ2aWNlSWRlbnRpZmllcikge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhpcy5fYmluZGluZ0RpY3Rpb25hcnkucmVtb3Zl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b24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYSkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoX2EubGFiZWwpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEodHlwZW9mIGJpbmRpbmcub25EZWFjdGl2YXRpb24gPT09IFwiZnVuY3Rpb25cIikpIHJldHVybiBbMywgMl07XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIGJpbmRpbmcub25EZWFjdGl2YXRpb24oaW5zdGFuY2UpXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgX2EubGFiZWwgPSAyO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6IHJldHVybiBbNCwgdGhpcy5fcHJlRGVzdHJveShjb25zdHJ1Y3RvciwgaW5zdGFuY2UpXTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICAgICAgX2Euc2VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFsyXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICByZXR1cm4gQ29udGFpbmVyO1xufSgpKTtcbmV4cG9ydCB7IENvbnRhaW5lciB9O1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y29udGFpbmVyLmpzLm1hcCIsImV4cG9ydCBmdW5jdGlvbiBnZXRGaXJzdEFycmF5RHVwbGljYXRlKGFycmF5KSB7XG4gICAgdmFyIHNlZW5WYWx1ZXMgPSBuZXcgU2V0KCk7XG4gICAgZm9yICh2YXIgX2kgPSAwLCBhcnJheV8xID0gYXJyYXk7IF9pIDwgYXJyYXlfMS5sZ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c3QgdHJ5IHRvIGZpbmQgYW4gZWxlbWVudCBhZnRlciB0aGUgcHJldmlvdXMgb25lXG4gICAgICAgIGZvciAobGV0IGkgPSBub2Rlcy5jbGFpbV9pbmZvLmxhc3RfaW5kZXg7IGkgPCBub2Rlcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgY29uc3Qgbm9kZSA9IG5vZGVzW2ldO1xuICAgICAgICAgICAgaWYgKHByZWRpY2F0ZShub2RlKSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHJlcGxhY2VtZW50ID0gcHJvY2Vzc05vZGUobm9kZSk7XG4gICAgICAgICAgICAgICAgaWYgKHJlcGxhY2VtZW50ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZXMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZXNbaV0gPSByZXBsYWNlbWVudDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFkb250VXBkYXRlTGFzdEluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGVzLmNsYWltX2luZm8ubGFzdF9pbmRleCA9IGk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIE90aGVyd2lzZSwgd2UgdHJ5IHRvIGZpbmQgb25lIGJlZm9yZVxuICAgICAgICAvLyBXZSBpdGVyYXRlIGluIHJldmVyc2Ugc28gdGhhdCB3ZSBkb24ndCBnbyB0b28gZmFyIGJhY2tcbiAgICAgICAgZm9yIChsZXQgaSA9IG5vZGVzLmNsYWltX2luZm8ubGFzdF9pbmRleCAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICBjb25zdCBub2RlID0gbm9kZXNbaV07XG4gICAgICAgICAgICBpZiAocHJlZGljYXRlKG5vZGUpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVwbGFjZW1lbnQgPSBwcm9jZXNzTm9kZShub2RlKTtcbiAgICAgICAgICAgICAgICBpZiAocmVwbGFjZW1lbnQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBub2Rlcy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBub2Rlc1tpXSA9IHJlcGxhY2VtZW50O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWRvbnRVcGRhdGVMYXN0SW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZXMuY2xhaW1faW5mby5sYXN0X2luZGV4ID0gaTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAocmVwbGFjZW1lbnQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBTaW5jZSB3ZSBzcGxpY2VkIGJlZm9yZSB0aGUgbGFzdF9pbmRleCwgd2UgZGVjcmVhc2UgaXRcbiAgICAgICAgICAgICAgICAgICAgbm9kZXMuY2xhaW1faW5mby5sYXN0X2luZGV4LS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIElmIHdlIGNhbid0IGZpbmQgYW55IG1hdGNoaW5nIG5vZGUsIHdlIGNyZWF0ZSBhIG5ldyBvbmVcbiAgICAgICAgcmV0dXJuIGNyZWF0ZU5vZGUoKTtcbiAgICB9KSgpO1xuICAgIHJlc3VsdE5vZGUuY2xhaW1fb3JkZXIgPSBub2Rlcy5jbGFpbV9pbmZvLnRvdGFsX2NsYWltZWQ7XG4gICAgbm9kZXMuY2xhaW1faW5mby50b3RhbF9jbGFpbWVkICs9I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gaWYgKGNvbW1lbnQgPT09IGBIRUFEXyR7bm9kZUlkfV9TVEFSVGApIHtcbiAgICAgICAgICAgICAgICBzdGFydGVkICs9IDE7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnB1c2gobm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoc3RhcnRlZCA+IDApIHtcbiAgICAgICAgICAgIHJlc3VsdC5wdXNoKG5vZGUpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXN1bHQ7XG59XG5jbGFzcyBIdG1sVGFnIHtcbiAgICBjb25zdHJ1Y3Rvcihpc19zdmcgPSBmYWxzZSkge1xuICAgICAgICB0aGlzLmlzX3N2ZyA9IGZhbHNlO1xuICAgICAgICB0aGlzLmlzX3N2ZyA9IGlzX3N2ZztcbiAgICAgICAgdGhpcy5lID0gdGhpcy5uID0gbnVsbDtcbiAgICB9XG4gICAgYyhodG1sKSB7XG4gICAgICAgIHRoaXMuaChodG1sKTtcbiAgICB9XG4gICAgbShodG1sLCB0YXJnZXQsIGFuY2hvciA9IG51bGwpIHtcbiAgICAgICAgaWYgKCF0aGlzLmUpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmlzX3N2ZylcbiAgICAgICAgICAgICAgICB0aGlzLmUgPSBzdmdfZWxlbWVudCh0YXJnZXQubm9kZU5hbWUpO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHRoaXMuZSA9IGVsZW1lbnQodGFyZ2V0Lm5vZGVOYW1lKTtcbiAgICAgICAgICAgIHRoaXMudCA9IHRhcmdldDtcbiAgICAgICAgICAgIHRoaXMuYyhodG1sKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmkoYW5jaG9yKTtcbiAgICB9XG4gICAgaChodG1sKSB7XG4gICAgICAgIHRoaXMuZS5pbm5lckhUTUwgPSBodG1sO1xuICAgICAgICB0aGlzLm4gPSBBcnJheS5mcm9tKHRoaXMuZS5jaGls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gIHN0YXJ0OiBzdGFydF90aW1lID0gbm93KCkgKyBkZWxheSwgXG4gICAgLy8gQHRzLWlnbm9yZSB0b2RvOlxuICAgIGVuZCA9IHN0YXJ0X3RpbWUgKyBkdXJhdGlvbiwgdGljayA9IG5vb3AsIGNzcyB9ID0gZm4obm9kZSwgeyBmcm9tLCB0byB9LCBwYXJhbXMpO1xuICAgIGxldCBydW5uaW5nID0gdHJ1ZTtcbiAgICBsZXQgc3RhcnRlZCA9IGZhbHNlO1xuICAgIGxldCBuYW1lO1xuICAgIGZ1bmN0aW9uIHN0YXJ0KCkge1xuICAgICAgICBpZiAoY3NzKSB7XG4gICAgICAgICAgICBuYW1lID0gY3JlYXRlX3J1bGUobm9kZSwgMCwgMSwgZHVyYXRpb24sIGRlbGF5LCBlYXNpbmcsIGNzcyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFkZWxheSkge1xuICAgICAgICAgICAgc3RhcnRlZCA9IHRydWU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gc3RvcCgpIHtcbiAgICAgICAgaWYgKGNzcylcbiAgICAgICAgICAgIGRlbGV0ZV9ydWxlKG5vZGUsIG5hbWUpO1xuICAgICAgICBydW5uaW5nID0gZmFsc2U7XG4gICAgfVxuICAgIGxvb3Aobm93ID0+IHtcbiAgICAgICAgaWYgKCFzdGFydGVkICYmIG5vdyA+PSBzdGFydF90aW1lKSB7XG4gICAgICAgICAgICBzdGFydGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc3RhcnRlZCAmJiBub3cgPj0gZW5kKSB7XG4gICAgICAgICAgICB0aWNrKDEsIDApO1xuICAgICAgICAgICAgc3RvcCgpO1xuICAgICAgICB9XG4gICAgICAgIGlmICghcnVubmluZykge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzdGFydGVkKSB7XG4gICAgICAgICAgICBjb25zdCBwID0gbm93IC0gc3Rhc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0LlxuICAgIC8vIFJlZW50cmFuY3kgaXMgb2sgYWZ0ZXJ3YXJkcyBmb3IgYmluZGluZ3MgZXRjLlxuICAgIGlmIChmbHVzaGlkeCAhPT0gMCkge1xuICAgICAgICByZXR1cm47XG4gICAgfVxuICAgIGNvbnN0IHNhdmVkX2NvbXBvbmVudCA9IGN1cnJlbnRfY29tcG9uZW50O1xuICAgIGRvIHtcbiAgICAgICAgLy8gZmlyc3QsIGNhbGwgYmVmb3JlVXBkYXRlIGZ1bmN0aW9uc1xuICAgICAgICAvLyBhbmQgdXBkYXRlIGNvbXBvbmVudHNcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHdoaWxlIChmbHVzaGlkeCA8IGRpcnR5X2NvbXBvbmVudHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGlydHlfY29tcG9uZW50c1tmbHVzaGlkeF07XG4gICAgICAgICAgICAgICAgZmx1c2hpZHgrKztcbiAgICAgICAgICAgICAgICBzZXRfY3VycmVudF9jb21wb25lbnQoY29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICB1cGRhdGUoY29tcG9uZW50LiQkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBjYXRjaCAoZSkge1xuICAgICAgICAgICAgLy8gcmVzZXQgZGlydHkgc3RhdGUgdG8gbm90IGVuZCB1cCBpbiBhIGRlYWRsb2NrZWQgc3RhdGUgYW5kIHRoZW4gcmV0aHJvd1xuICAgICAgICAgICAgZGlydHlfY29tcG9uZW50cy5sZW5ndGggPSAwO1xuICAgICAgICAgICAgZmx1c2hpZHggPSAwO1xuICAgICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgfVxuICAgICAgICBzZXRfY3VycmVudF9jb21wb25lbnQobnVsbCk7XG4gICAgICAgIGRpcnR5X2NvbXBvbmVudHMubGVuZ3RoID0gMDtcbiAgICAgICAgZmx1c2hpZHggPSAwO1xuICAgICAgICB3aGlsZSAo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gIGxldCBhbmltYXRpb25fbmFtZTtcbiAgICBsZXQgdGFzaztcbiAgICBsZXQgdWlkID0gMDtcbiAgICBmdW5jdGlvbiBjbGVhbnVwKCkge1xuICAgICAgICBpZiAoYW5pbWF0aW9uX25hbWUpXG4gICAgICAgICAgICBkZWxldGVfcnVsZShub2RlLCBhbmltYXRpb25fbmFtZSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdvKCkge1xuICAgICAgICBjb25zdCB7IGRlbGF5ID0gMCwgZHVyYXRpb24gPSAzMDAsIGVhc2luZyA9IGlkZW50aXR5LCB0aWNrID0gbm9vcCwgY3NzIH0gPSBjb25maWcgfHwgbnVsbF90cmFuc2l0aW9uO1xuICAgICAgICBpZiAoY3NzKVxuICAgICAgICAgICAgYW5pbWF0aW9uX25hbWUgPSBjcmVhdGVfcnVsZShub2RlLCAwLCAxLCBkdXJhdGlvbiwgZGVsYXksIGVhc2luZywgY3NzLCB1aWQrKyk7XG4gICAgICAgIHRpY2soMCwgMSk7XG4gICAgICAgIGNvbnN0IHN0YXJ0X3RpbWUgPSBub3coKSArIGRlbGF5O1xuICAgICAgICBjb25zdCBlbmRfdGltZSA9IHN0YXJ0X3RpbWUgKyBkdXJhdGlvbjtcbiAgICAgICAgaWYgKHRhc2spXG4gICAgICAgICAgICB0YXNrLmFib3J0KCk7XG4gICAgICAgIHJ1bm5pbmcgPSB0cnVlO1xuICAgICAgICBhZGRfcmVuZGVyX2NhbGxiYWNrKCgpID0+IGRpc3BhdGNoKG5vZGUsIHRydWUsICdzdGFydCcpKTtcbiAgICAgICAgdGFzayA9IGxvb3Aobm93ID0+IHtcbiAgICAgICAgICAgIGlmIChydW5uaW5nKSB7XG4gICAgICAgICAgICAgICAgaWYgKG5vdyA+PSBlbmRfdGltZSkge1xuICAgICAgICAgICAgICAgICAgICB0aWNrKDEsIDApO1xuICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChub2RlLCB0cnVlLCAnZW5kJyk7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFudXAoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJ1bm5pbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKG5vdyA+PSBzdGFydF90aW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSBlYXNpbmcoKG5vdyAtIHN0YXJ0X3RpbWUpIC8gZHVyYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICB0aWNrKHQsIDEgLSB0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcnVubmluZztcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGxldCBzdGFydGVkID0gZmFsc2U7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgc3RhcnQoKSB7XG4gICAgICAgICAgICBpZiAoc3RhcnRlZClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBzdGFydGVkID0gdHJ1ZTtcbiAgICAgICAgICAgIGRlbGV0ZV9ydWxlKG5vZGUpO1xuICAgICAgICAgICAgaWYgKGlzX2Z1bmN0aW9uKGNvbmZpZykpIHtcbiAgICAgICAgICAgICAgICBjb25maWcgPSBjb25maWcob3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgd2FpdCgpLnRoZW4oZ28pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZ28oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaW52YWxpZGF0ZSgpIHtcbiAgICAgICAgICAgIHN0YXJ0ZWQgPSBmYWxzZTtcbiAgICAgICAgfSxcbiAgICAgICAgZW5kKCkge1xuICAgICAgICAgICAgaWYgKHJ1bm5pbmcpIHtcbiAgICAgICAgICAgICAgICBjbGVhbnVwKCk7XG4gICAgICAgICAgICAgICAgcnVubmluZyA9IGZhbHNlO1xuICAgICAgICAgICAgf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gICAgICAgICAgICAgICBpZiAoIS0tZ3JvdXAucikge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhpcyB3aWxsIHJlc3VsdCBpbiBgZW5kKClgIGJlaW5nIGNhbGxlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNvIHdlIGRvbid0IG5lZWQgdG8gY2xlYW4gdXAgaGVyZVxuICAgICAgICAgICAgICAgICAgICAgICAgcnVuX2FsbChncm91cC5jKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChub3cgPj0gc3RhcnRfdGltZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0ID0gZWFzaW5nKChub3cgLSBzdGFydF90aW1lKSAvIGR1cmF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgdGljaygxIC0gdCwgdCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJ1bm5pbmc7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBpZiAoaXNfZnVuY3Rpb24oY29uZmlnKSkge1xuICAgICAgICB3YWl0KCkudGhlbigoKSA9PiB7XG4gICAgICAgICAgICAvLyBAdHMtaWdub3JlXG4gICAgICAgICAgICBjb25maWcgPSBjb25maWcob3B0aW9ucyk7XG4gICAgICAgICAgICBnbygpO1xuICAgICAgICB9KTtcbiAgICB9XG4gICAgZWxzZSB7XG4gICAgICAgIGdvKCk7XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIGVuZChyZXNldCkge1xuICAgICAgICAgICAgaWYgKHJlc2V0ICYmIGNvbmZpZy50aWNrKSB7XG4gICAgICAgICAgICAgICAgY29uZmlnLnRpY2soMSwgMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocnVubmluZykge1xuICAgICAgICAgICAgICAgIGlmIChhbmlt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AgICAgICAgZ3JvdXA6IHByb2dyYW0uZ3JvdXBcbiAgICAgICAgfTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ28oYikge1xuICAgICAgICBjb25zdCB7IGRlbGF5ID0gMCwgZHVyYXRpb24gPSAzMDAsIGVhc2luZyA9IGlkZW50aXR5LCB0aWNrID0gbm9vcCwgY3NzIH0gPSBjb25maWcgfHwgbnVsbF90cmFuc2l0aW9uO1xuICAgICAgICBjb25zdCBwcm9ncmFtID0ge1xuICAgICAgICAgICAgc3RhcnQ6IG5vdygpICsgZGVsYXksXG4gICAgICAgICAgICBiXG4gICAgICAgIH07XG4gICAgICAgIGlmICghYikge1xuICAgICAgICAgICAgLy8gQHRzLWlnbm9yZSB0b2RvOiBpbXByb3ZlIHR5cGluZ3NcbiAgICAgICAgICAgIHByb2dyYW0uZ3JvdXAgPSBvdXRyb3M7XG4gICAgICAgICAgICBvdXRyb3MuciArPSAxO1xuICAgICAgICB9XG4gICAgICAgIGlmIChydW5uaW5nX3Byb2dyYW0gfHwgcGVuZGluZ19wcm9ncmFtKSB7XG4gICAgICAgICAgICBwZW5kaW5nX3Byb2dyYW0gPSBwcm9ncmFtO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gaWYgdGhpcyBpcyBhbiBpbnRybywgYW5kIHRoZXJlJ3MgYSBkZWxheSwgd2UgbmVlZCB0byBkb1xuICAgICAgICAgICAgLy8gYW4gaW5pdGlhbCB0aWNrIGFuZC9vciBhcHBseSBDU1MgYW5pbWF0aW9uIGltbWVkaWF0ZWx5XG4gICAgICAgICAgICBpZiAoY3NzKSB7XG4gICAgICAgICAgICAgICAgY2xlYXJfYW5pbWF0aW9uKCk7XG4gICAgICAgICAgICAgICAgYW5pbWF0aW9uX25hbWUgPSBjcmVhdGVfcnVsZShub2RlLCB0LCBiLCBkdXJhdGlvbiwgZGVsYXksIGVhc2luZywgY3NzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChiKVxuICAgICAgICAgICAgICAgIHRpY2soMCwgMSk7XG4gICAgICAgICAgICBydW5uaW5nX3Byb2dyYW0gPSBpbml0KHByb2dyYW0sIGR1cmF0aW9uKTtcbiAgICAgICAgICAgIGFkZF9yZW5kZXJfY2FsbGJhY2soKCkgPT4gZGlzcGF0Y2gobm9kZSwgYiwgJ3N0YXJ0JykpO1xuICAgICAgICAgICAgbG9vcChub3cgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChwZW5kaW5nX3Byb2dyYW0gJiYgbm93ID4gcGVuZGluZ19wcm9ncmFtLnN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bm5pbmdfcHJvZ3JhbSA9IGluaXQocGVuZGluZ19wcm9ncmFtLCBkdXJhdGlvbik7XG4gICAgICAgICAgICAgICAgICAgIHBlbmRpbmdfcHJvZ3JhbSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKG5vZGUsIHJ1bm5pbmdfcHJvZ3JhbS5iLCAnc3RhcnQnKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJfYW5pbWF0aW9uKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb25fbmFtZSA9IGNyZWF0ZV9ydWxlKG5vZGUsIHQsIHJ1bm5pbmdfcHJvZ3JhbS5iLCBydW5uaW5nX3Byb2dyYW0uZHVyYXRpb24sIDAsIGVhc2luZywgY29uZmlnLmNzcyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJ1bm5pbmdfcHJvZ3JhbSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobm93ID49IHJ1bm5pbmdfcHJvZ3JhbS5lbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpY2sodCA9IHJ1bm5pbmdfcHJvZ3JhbS5iLCAxIC0gdCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChub2RlLCBydW5uaW5nX3Byb2dyYW0uYiwgJ2VuZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFwZW5kaW5nX3Byb2dyYW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB3ZSdyZSBkb25lXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bm5pbmdfcHJvZ3JhbS5iKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGludHJvIOKAlCB3ZSBjYW4gdGlkeSB1cCBpbW1lZGlhdGVseVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhcl9hbmltYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIG91dHJvIOKAlCBuZWVkcyB0byBiZSBjb29yZGluYXRlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIS0tcnVubmluZ19wcm9ncmFtLmdyb3VwLnIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBydW5fYWxsKHJ1bm5pbmdfcHJvZ3JhbS5ncm91cC5jKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBydW5uaW5nX3Byb2dyYW0gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKG5vdyA+PSBydW5uaW5nX3Byb2dyYW0uc3RhcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHAgPSBub3cgLSBydW5uaW5nX3Byb2dyYW0uc3RhcnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ID0gcnVubmluZ19wcm9ncmFtLmEgKyBydW5uaW5nX3Byb2dyYW0uZCAqIGVhc2luZyhwIC8gcnVubmluZ19wcm9ncmFtLmR1cmF0aW9uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpY2sodCwgMSAtIHQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiAhIShydW5uaW5nX3Byb2dyYW0gfHwgcGVuZGluZ19wcm9ncmFtKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIHJ1bihiKSB7XG4gICAgICAgICAgICBpZiAoaXNfZnVuY3Rpb24oY29uZmlnKSkge1xuICAgICAgICAgICAgICAgIHdhaXQoKS50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBjb25maWcob3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIGdvKGIpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZ28oYik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGVuZCgpIHtcbiAgICAgICAgICAgIGNsZWFyX2FuaW1hdGlvbigpO1xuICAgICAgICAgICAgcnVubmluZ19wcm9ncmFtID0gcGVuZGluZ19wcm9ncmFtID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH07XG59XG5cbmZ1bmN0aW9uIGhhbmRsZV9wcm9taXNlKHByb21pc2UsIGluZm8pIHtcbiAgICBjb25zdCB0b2tlbiA9IGluZm8udG9rZW4gPSB7fTtcbiAgICBmdW5jdGlvbiB1cGRhdGUodHlwZSwgaW5kZXgsIGtleSwgdmFsdWUpIHtcbiAgICAgICAgaWYgKGluZm8udG9rZW4gIT09IHRva2VuKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICBpbmZvLnJlc29sdmVkID0gdmFsdWU7XG4gICAgICAgIGxldCBjaGlsZF9jdHggPSBpbmZvLmN0eDtcbiAgICAgICAgaWYgKGtleSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBjaGlsZF9jdHggPSBjaGlsZF9jdHguc2xpY2UoKTtcbiAgICAgICAgICAgIGNoaWxkX2N0eFtrZXldID0gdmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgYmxvY2sgPSB0eXBlICYmIChpbmZvLmN1cnJlbnQgPSB0eXBlKShjaGlsZF9jdHgpO1xuICAgICAgICBsZXQgbmVlZHNfZmx1c2ggPSBmYWxzZTtcbiAgICAgICAgaWYgKGluZm8uYmxvY2spIHtcbiAgICAgICAgICAgIGlmIChpbmZvLmJsb2Nrcykge1xuICAgICAgICAgICAgICAgIGluZm8uYmxvY2tzLmZvckVhY2goKGJsb2NrLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9PSBpbmRleCAmJiBibG9jaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXBfb3V0cm9zKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uX291dChibG9jaywgMSwgMSwgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmZvLmJsb2Nrc1tpXSA9PT0gYmxvY2spIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mby5ibG9ja3NbaV0gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2tfb3V0cm9zKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGluZm8uYmxvY2suZCgxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJsb2NrLmMoKTtcbiAgICAgICAgICAgIHRyYW5zaXRpb25faW4oYmxvY2ssIDEpO1xuICAgICAgICAgICAgYmxvY2subShpbmZvLm1vdW50KCksIGluZm8uYW5jaG9yKTtcbiAgICAgICAgICAgIG5lZWRzX2ZsdXNoID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBpbmZvLmJsb2NrID0gYmxvY2s7XG4gICAgICAgIGlmIChpbmZvLmJsb2NrcylcbiAgICAgICAgICAgIGluZm8uYmxvY2tzW2luZGV4XSA9IGJsb2NrO1xuICAgICAgICBpZiAobmVlZHNfZmx1c2gpIHtcbiAgICAgICAgICAgIGZsdXNoKCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKGlzX3Byb21pc2UocHJvbWlzZSkpIHtcbiAgICAgICAgY29uc3QgY3VycmVudF9jb21wb25lbnQgPSBnZXRfY3VycmVudF9jb21wb25lbnQoKTtcbiAgICAgICAgcHJvbWlzZS50aGVuKHZhbHVlID0+IHtcbiAgICAgICAgICAgIHNldF9jdXJyZW50X2NvbXBvbmVudChjdXJyZW50X2NvbXBvbmVudCk7XG4gICAgICAgICAgICB1cGRhdGUoaW5mby50aGVuLCAxLCBpbmZvLnZhbHVlLCB2YWx1ZSk7XG4gICAgICAgICAgICBzZXRfY3VycmVudF9jb21wb25lbnQobnVsbCk7XG4gICAgICAgIH0sIGVycm9yID0+IHtcbiAgICAgICAgICAgIHNldF9jdXJyZW50X2NvbXBvbmVudChjdXJyZW50X2NvbXBvbmVudCk7XG4gICAgICAgICAgICB1cGRhdGUoaW5mby5jYXRjaCwgMiwgaW5mby5lcnJvciwgZXJyb3IpO1xuICAgICAgICAgICAgc2V0X2N1cnJlbnRfY29tcG9uZW50KG51bGwpO1xuICAgICAgICAgICAgaWYgKCFpbmZvLmhhc0NhdGNoKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgZX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ICAgIG5leHQgPSBibG9jay5maXJzdDtcbiAgICAgICAgbi0tO1xuICAgIH1cbiAgICB3aGlsZSAobyAmJiBuKSB7XG4gICAgICAgIGNvbnN0IG5ld19ibG9jayA9IG5ld19ibG9ja3NbbiAtIDFdO1xuICAgICAgICBjb25zdCBvbGRfYmxvY2sgPSBvbGRfYmxvY2tzW28gLSAxXTtcbiAgICAgICAgY29uc3QgbmV3X2tleSA9IG5ld19ibG9jay5rZXk7XG4gICAgICAgIGNvbnN0IG9sZF9rZXkgPSBvbGRfYmxvY2sua2V5O1xuICAgICAgICBpZiAobmV3X2Jsb2NrID09PSBvbGRfYmxvY2spIHtcbiAgICAgICAgICAgIC8vIGRvIG5vdGhpbmdcbiAgICAgICAgICAgIG5leHQgPSBuZXdfYmxvY2suZmlyc3Q7XG4gICAgICAgICAgICBvLS07XG4gICAgICAgICAgICBuLS07XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoIW5ld19sb29rdXAuaGFzKG9sZF9rZXkpKSB7XG4gICAgICAgICAgICAvLyByZW1vdmUgb2xkIGJsb2NrXG4gICAgICAgICAgICBkZXN0cm95KG9sZF9ibG9jaywgbG9va3VwKTtcbiAgICAgICAgICAgIG8tLTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICghbG9va3VwLmhhcyhuZXdfa2V5KSB8fCB3aWxsX21vdmUuaGFzKG5ld19rZXkpKSB7XG4gICAgICAgICAgICBpbnNlcnQobmV3X2Jsb2NrKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChkaWRfbW92ZS5oYXMob2xkX2tleSkpIHtcbiAgICAgICAgICAgIG8tLTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChkZWx0YXMuZ2V0KG5ld19rZXkpID4gZGVsdGFzLmdldChvbGRfa2V5KSkge1xuICAgICAgICAgICAgZGlkX21vdmUuYWRkKG5ld19rZXkpO1xuICAgICAgICAgICAgaW5zZXJ0KG5ld19ibG9jayk7XG4gICAg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2ZWxzLmxlbmd0aDtcbiAgICB3aGlsZSAoaS0tKSB7XG4gICAgICAgIGNvbnN0IG8gPSBsZXZlbHNbaV07XG4gICAgICAgIGNvbnN0IG4gPSB1cGRhdGVzW2ldO1xuICAgICAgICBpZiAobikge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gbykge1xuICAgICAgICAgICAgICAgIGlmICghKGtleSBpbiBuKSlcbiAgICAgICAgICAgICAgICAgICAgdG9fbnVsbF9vdXRba2V5XSA9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBuKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhY2NvdW50ZWRfZm9yW2tleV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlW2tleV0gPSBuW2tleV07XG4gICAgICAgICAgICAgICAgICAgIGFjY291bnRlZF9mb3Jba2V5XSA9IDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGV2ZWxzW2ldID0gbjtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIG8pIHtcbiAgICAgICAgICAgICAgICBhY2NvdW50ZWRfZm9yW2tleV0gPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGZvciAoY29uc3Qga2V5IGluIHRvX251bGxfb3V0KSB7XG4gICAgICAgIGlmICghKGtleSBpbiB1cGRhdGUpKVxuICAgICAgICAgICAgdXBkYXRlW2tleV0gPSB1bmRlZmluZWQ7XG4gICAgfVxuICAgIHJldHVybiB1cGRhdGU7XG59XG5mdW5jdGlvbiBnZXRfc3ByZWFkX29iamVjdChzcHJlYWRfcHJvcHMpIHtcbiAgICByZXR1cm4gdHlwZW9mIHNwcmVhZF9wcm9wcyA9PT0gJ29iamVjdCcgJiYgc3ByZWFkX3Byb3BzICE9PSBudWxsID8gc3ByZWFkX3Byb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5bGVzO1xuICAgICAgICBpZiAoY2xhc3Nlc190b19hZGQpIHtcbiAgICAgICAgICAgIGlmIChhdHRyaWJ1dGVzLmNsYXNzID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzLmNsYXNzID0gY2xhc3Nlc190b19hZGQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzLmNsYXNzICs9ICcgJyArIGNsYXNzZXNfdG9fYWRkO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChzdHlsZXNfdG9fYWRkKSB7XG4gICAgICAgICAgICBpZiAoYXR0cmlidXRlcy5zdHlsZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgYXR0cmlidXRlcy5zdHlsZSA9IHN0eWxlX29iamVjdF90b19zdHJpbmcoc3R5bGVzX3RvX2FkZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBhdHRyaWJ1dGVzLnN0eWxlID0gc3R5bGVfb2JqZWN0X3RvX3N0cmluZyhtZXJnZV9zc3Jfc3R5bGVzKGF0dHJpYnV0ZXMuc3R5bGUsIHN0eWxlc190b19hZGQpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBsZXQgc3RyID0gJyc7XG4gICAgT2JqZWN0LmtleXMoYXR0cmlidXRlcykuZm9yRWFjaChuYW1lID0+IHtcbiAgICAgICAgaWYgKGludmFsaWRfYXR0cmlidXRlX25hbWVfY2hhcmFjdGVyLnRlc3QobmFtZSkpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGNvbnN0IHZhbHVlID0gYXR0cmlidXRlc1tuYW1lXTtcbiAgICAgICAgaWYgKHZhbHVlID09PSB0cnVlKVxuICAgICAgICAgICAgc3RyICs9ICcgJyArIG5hbWU7XG4gICAgICAgIGVsc2UgaWYgKGJvb2xlYW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dGhlc2Ugd2lsbCBiZSBpbW1lZGlhdGVseSBkaXNjYXJkZWRcbiAgICAgICAgICAgIG9uX21vdW50OiBbXSxcbiAgICAgICAgICAgIGJlZm9yZV91cGRhdGU6IFtdLFxuICAgICAgICAgICAgYWZ0ZXJfdXBkYXRlOiBbXSxcbiAgICAgICAgICAgIGNhbGxiYWNrczogYmxhbmtfb2JqZWN0KClcbiAgICAgICAgfTtcbiAgICAgICAgc2V0X2N1cnJlbnRfY29tcG9uZW50KHsgJCQgfSk7XG4gICAgICAgIGNvbnN0IGh0bWwgPSBmbihyZXN1bHQsIHByb3BzLCBiaW5kaW5ncywgc2xvdHMpO1xuICAgICAgICBzZXRfY3VycmVudF9jb21wb25lbnQocGFyZW50X2NvbXBvbmVudCk7XG4gICAgICAgIHJldHVybiBodG1sO1xuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICByZW5kZXI6IChwcm9wcyA9IHt9LCB7ICQkc2xvdHMgPSB7fSwgY29udGV4dCA9IG5ldyBNYXAoKSB9ID0ge30pID0+IHtcbiAgICAgICAgICAgIG9uX2Rlc3Ryb3kgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IHsgdGl0bGU6ICcnLCBoZWFkOiAnJywgY3NzOiBuZXcgU2V0KCkgfTtcbiAgICAgICAgICAgIGNvbnN0IGh0bWwgPSAkJHJlbmRlcihyZXN1bHQsIHByb3BzLCB7fSwgJCRzbG90cywgY29udGV4dCk7XG4gICAgICAgICAgICBydW5fYWxsKG9uX2Rlc3Ryb3kpO1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBodG1sLFxuICAgICAgICAgICAgICAgIGNzczoge1xuICAgICAgICAgICAgICAgICAgICBjb2RlOiBBcnJheS5mcm9tKHJlc3VsdC5jc3MpLm1hcChjc3MgPT4gY3NzLmNvZGUpLmpvaW4oJ1xcbicpLFxuICAgICAgICAgICAgICAgICAgICBtYXA6IG51bGwgLy8gVE9ET1xuICA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Ryb3k6IFtdLFxuICAgICAgICBvbl9kaXNjb25uZWN0OiBbXSxcbiAgICAgICAgYmVmb3JlX3VwZGF0ZTogW10sXG4gICAgICAgIGFmdGVyX3VwZGF0ZTogW10sXG4gICAgICAgIGNvbnRleHQ6IG5ldyBNYXAob3B0aW9ucy5jb250ZXh0IHx8IChwYXJlbnRfY29tcG9uZW50ID8gcGFyZW50X2NvbXBvbmVudC4kJC5jb250ZXh0IDogW10pKSxcbiAgICAgICAgLy8gZXZlcnl0aGluZyBlbHNlXG4gICAgICAgIGNhbGxiYWNrczogYmxhbmtfb2JqZWN0KCksXG4gICAgICAgIGRpcnR5LFxuICAgICAgICBza2lwX2JvdW5kOiBmYWxzZSxcbiAgICAgICAgcm9vdDogb3B0aW9ucy50YXJnZXQgfHwgcGFyZW50X2NvbXBvbmVudC4kJC5yb290XG4gICAgfTtcbiAgICBhcHBlbmRfc3R5bGVzICYmIGFwcGVuZF9zdHlsZXMoJCQucm9vdCk7XG4gICAgbGV0IHJlYWR5ID0gZmFsc2U7XG4gICAgJCQuY3R4ID0gaW5zdGFuY2VcbiAgICAgICAgPyBpbnN0YW5jZShjb21wb25lbnQsIG9wdGlvbnMucHJvcHMgfHwge30sIChpLCByZXQsIC4uLnJlc3QpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gcmVzdC5sZW5ndGggPyByZXN0WzBdIDogcmV0O1xuICAgICAgICAgICAgaWYgKCQkLmN0eCAmJiBub3RfZXF1YWwoJCQuY3R4W2ldLCAkJC5jdHhbaV0gPSB2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICBpZiAoISQkLnNraXBfYm91bmQgJiYgJCQuYm91bmRbaV0pXG4gICAgICAgICAgICAgICAgICAgICQkLmJvdW5kW2ldKHZhbHVlKTtcbiAgICAgICAgICAgICAgICBpZiAocmVhZHkpXG4gICAgICAgICAgICAgICAgICAgIG1ha2VfZGlydHkoY29tcG9uZW50LCBpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH0pXG4gICAgICAgIDogW107XG4gICAgJCQudXBkYXRlKCk7XG4gICAgcmVhZHkgPSB0cnVlO1xuICAgIHJ1bl9hbGwoJCQuYmVmb3JlX3VwZGF0ZSk7XG4gICAgLy8gYGZhbHNlYCBhcyBhIHNwZWNpYWwgY2FzZSBvZiBubyBET00gY29tcG9uZW50XG4gICAgJCQuZnJhZ21lbnQgPSBjcmVhdGVfZnJhZ21lbnQgPyBjcmVhdGVfZnJhZ21lbnQoJCQuY3R4KSA6IGZhbHNlO1xuICAgIGlmIChvcHRpb25zLnRhcmdldCkge1xuICAgICAgICBpZiAob3B0aW9ucy5oeWRyYXRlKSB7XG4gICAgICAgICAgICBzdGFydF9oeWRyYXRpbmcoKTtcbiAgICAgICAgICAgIGNvbnN0IG5vZGVzID0gY2hpbGRyZW4ob3B0aW9ucy50YXJnZXQpO1xuICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1ub24tbnVsbC1hc3NlcnRpb25cbiAgICAgICAgICAgICQkLmZyYWdtZW50ICYmICQkLmZyYWdtZW50Lmwobm9kZXMpO1xuICAgICAgICAgICAgbm9kZXMuZm9yRWFjaChkZXRhY2gpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1ub24tbnVsbC1hc3NlcnRpb25cbiAgICAgICAgICAgICQkLmZyYWdtZW50ICYmICQkLmZyYWdtZW50LmMoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAob3B0aW9ucy5pbnRybylcbiAgICAgICAgICAgIHRyYW5zaXRpb25faW4oY29tcG9uZW50LiQkLmZyYWdtZW50KTtcbiAgICAgICAgbW91bnRfY29tcG9uZW50KGNvbXBvbmVudCwgb3B0aW9ucy50YXJnZXQsIG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V3VmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgZGlzY29ubmVjdGVkQ2FsbGJhY2soKSB7XG4gICAgICAgICAgICBydW5fYWxsKHRoaXMuJCQub25fZGlzY29ubmVjdCk7XG4gICAgICAgIH1cbiAgICAgICAgJGRlc3Ryb3koKSB7XG4gICAgICAgICAgICBkZXN0cm95X2NvbXBvbmVudCh0aGlzLCAxKTtcbiAgICAgICAgICAgIHRoaXMuJGRlc3Ryb3kgPSBub29wO1xuICAgICAgICB9XG4gICAgICAgICRvbih0eXBlLCBjYWxsYmFjaykge1xuICAgICAgICAgICAgLy8gVE9ETyBzaG91bGQgdGhpcyBkZWxlZ2F0ZSB0byBhZGRFdmVudExpc3RlbmVyP1xuICAgICAgICAgICAgaWYgKCFpc19mdW5jdGlvbihjYWxsYmFjaykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbm9vcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrcyA9ICh0aGlzLiQkLmNhbGxiYWNrc1t0eXBlXSB8fCAodGhpcy4kJC5jYWxsYmFja3NbdHlwZV0gPSBbXSkpO1xuICAgICAgICAgICAgY2FsbGJhY2tzLnB1c2goY2FsbGJhY2spO1xuICAgICAgICAgICAgcmV0dXJuICgpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IGNhbGxiYWNrcy5pbmRleE9mKGNhbGxiYWNrKTtcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xKVxuICAgICAgICAgICAgICAgICAgICBjYWxsYmFja3Muc3BsaWNlKGluZGV4LCAxKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgJHNldCgkJHByb3BzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy4kJHNldCAmJiAhaXNfZW1wdHkoJCRwcm9wcykpIHtcbiAgICAgICAgICAgICAgICB0aGlzLiQkLnNraXBfYm91bmQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMuJCRzZXQoJCRwcm9wcyk7XG4gICAgICAgICAgICAgICAgdGhpcy4kJC5za2lwX2JvdW5kID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufVxuLyoqXG4gKiBCYXNlIGNsYXNzIGZvciBTdmVsdGUgY29tcG9uZW50cy4gVXNlZCB3aGVuIGRldj1mYWxzZS5cbiAqL1xuY2xhc3MgU3ZlbHRlQ29tcG9uZW50IHtcbiAgICAkZGVzdHJveSgpIHtcbiAgICAgICAgZGVzdHJveV9jb21wb25lbnQodGhpcywgMSk7XG4gICAgICAgIHRoaXMuJGRlc3Ryb3kgPSBub29wO1xuICAgIH1cbiAgICAkb24odHlwZSwgY2FsbGJhY2spIHtcbiAgICAgICAgaWYgKCFpc19mdW5jdGlvbihjYWxsYmFjaykpIHtcbiAgICAgICAgICAgIHJldHVybiBub29wO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGNhbGxiYWNrcyA9ICh0aGlzLiQkLmNhbGxiYWNrc1t0eXBlXSB8fCAodGhpcy4kJC5jYWxsYmFja3NbdHlwZV0gPSBbXSkpO1xuICAgICAgICBjYWxsYmFja3MucHVzaChjYWxsYmFjayk7XG4gICAgICAgIHJldHVybiAoKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBpbmRleCA9IGNhbGxiYWNrcy5pbmRleE9mKGNhbGxiYWNrKTtcbiAgICAgICAgICAgIGlmIChpbmRleCAhPT0gLTEpXG4gICAgICAgICAgICAgICAgY2FsbGJhY2tzLnNwbGljZShpbmRleCwgMSk7XG4gICAgICAgIH07XG4gICAgfVxuICAgICRzZXQoJCRwcm9wcykge1xuICAgICAgICBpZiAodGhpcy4kJHNldCAmJiAhaXNfZW1wdHkoJCRwcm9wcykpIHtcbiAgICAgICAgICAgIHRoaXMuJCQuc2tpcF9ib3VuZCA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLiQkc2V0KCQkcHJvcHMpO1xuICAgICAgICAgIC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mFnZXIgPSBjb250YWluZXIuZ2V0PElDb21tYW5kTWFuYWdlcj4oJ0NvbW1hbmRNYW5hZ2VyJyk7XHJcblxyXG4gICAgbGV0IGNvbW1hbmRzOiBDb21tYW5kW10gPSBbXTtcclxuXHJcbiAgICBsZXQgY29tbWFuZCA9ICcnO1xyXG5cclxuICAgIGxldCBjdXJyZW50SW5kZXggPSAwO1xyXG5cclxuICAgIGxldCByZXN1bHQ6IENvbW1hbmRbXSA9IFtdO1xyXG5cclxuICAgIGNvbnN0IG9ua2V5cHJlc3MgPSAoZTogS2V5Ym9hcmRFdmVudCkgPT4ge1xyXG4gICAgICAgIGlmIChlLmtleUNvZGUgPT09IDEzKSB7XHJcbiAgICAgICAgICAgIG9uRW50ZXIoKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gbW92ZVVwXHJcbiAgICAgICAgaWYgKGUua2V5Q29kZSA9PT0gMzgpIHtcclxuICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICBpZiAoY3VycmVudEluZGV4ID09PSAwKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY3VycmVudEluZGV4LS07XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgLy8gbW92ZURvd25cclxuICAgICAgICBpZiAoZS5rZXlDb2RlID09PSA0MCkge1xyXG4gICAgICAgICAgICBjb25zdCBsZW4gPSByZXN1bHQubGVuZ3RoO1xyXG4gICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XHJcbiAgICAgICAgICAgIGlmIChjdXJyZW50SW5kZXggPj0gbGVuIC0gMSkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGN1cnJlbnRJbmRleCsrO1xyXG4gICAgICAgIH1cclxuICAgIH07XHJcblxyXG4gICAgY29uc3Qgb25FbnRlciA9ICgpID0+IHtcclxuICAgICAgICBjb25zdCBjb20gPSByZXN1bHRbY3VycmVudEluZGV4XTtcclxuICAgICAgICBEaWFsb2cuZGVzdHJveUFsbCgpO1xyXG4gICAgICAgIGNvbS5jYWxsYmFjaygpO1xyXG4gICAgfTtcclxuXHJcbiAgICBjb25zdCBvbkNsaWNrID0gKGk6IG51bWJlcikgPT4ge1xyXG4gICAgICAgIGN1cnJlbnRJbmRleCA9IGk7XHJcbiAgICAgICAgb25FbnRlcigpO1xyXG4gICAgfTtcclxuXHJcbiAgICBjb25zdCBoYXNDb250ZW50ID0gKHY6IHN0cmluZyB8IHVuZGVmaW5lZCwgYzogc3RyaW5nKSA9PiB2ICYmIHYudG9Mb3dlckNhc2UoKS5pbmRleE9mKGMudG9Mb3dlckNhc2UoKSkgPj0gMDtcclxuXHJcbiAgICAkOiB7XHJcbiAgICAgICAgY3VycmVudEluZGV4ID0gMDtcclxuICAgICAgICBpZiAoIWNvbW1hbmQpIHtcclxuICAgICAgICAgICAgcmVzdWx0ID0gY29tbWFuZHM7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgcmVzdWx0ID0gY29tbWFuZHMuZmlsdGVyKChjKSA9PiB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxyXG4gICAgICAgICAgICAgICAgICAgIGhhc0NvbnRlbnQoYy5wbHVnaW4sIGNvbW1hbmQpIHx8XHJcbiAgICAgICAgICAgICAgICAgICAgaGFzQ29udGVudChjLnBsdWdpbk5hbWUsIGNvbW1hbmQpIHx8XHJcbiAgICAgICAgICAgICAgICAgICAgaGFzQ29udGVudChjLmNvbW1hbmQsIGNvbW1hbmQpIHx8XHJcbiAgICAgICAgICAgICAgICAgICAgaGFzQ29udGVudChjLmRlc2NyaXB0aW9uLCBjb21tYW5kKVxyXG4gICAgICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgfSk7XHJc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ldC5jaGVja2VkO1xyXG4gICAgICAgICAgICAgICAgaWYgKGNoZWNrZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICBwbHVnaW5TeXN0ZW0udHVybk9uU2FmZU1vZGUoKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcGx1Z2luU3lzdGVtLnR1cm5PZmZTYWZlTW9kZSgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgLy8ge1xyXG4gICAgICAgIC8vICAgICBsYWJlbDogXygnYXV0b3VwZ3JhZGUnKSxcclxuICAgICAgICAvLyAgICAgdGlwOiBfKCdhdXRvdXBncmFkZXRpcCcpLFxyXG4gICAgICAgIC8vICAgICBjaGVja2VkOiB0cnVlLFxyXG4gICAgICAgIC8vICAgICB0eXBlOiAnY2hlY2tib3gnLFxyXG4gICAgICAgIC8vICAgICBvbkNoYW5nZTogKGV2ZW50KSA9PiB7XHJcbiAgICAgICAgLy8gICAgICAgICBzdG9yYWdlTWFuYWdlci5zZXQoUExVR0lOX1NZU1RFTV9BVVRPX1VQREFURSwgZXZlbnQudGFyZ2V0LmNoZWNrZWQpO1xyXG4gICAgICAgIC8vICAgICB9LFxyXG4gICAgICAgIC8vIH0sXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBsYWJlbDogXygnc3RvcmVfdXJsJyksXHJcbiAgICAgICAgICAgIHRpcDogYCR7Xygnc3RvcmVfdXJsX3RpcCcpfSAke2RlZmF1bHRDb25maWcuUExVR0lOX1NUT1JFX1VSTH1gLFxyXG4gICAgICAgICAgICB0eXBlOiAnaW5wdXQnLFxyXG4gICAgICAgICAgICB2YWx1ZTogc3RvcmFnZU1hbmFnZXIuZ2V0KFBMVUdJTl9TVE9SRV9VUkwpLFxyXG4gICAgICAgICAgICBvbkNoYW5nZTogKGV2ZW50KSA9PiB7XHJcbiAgICAgICAgICAgICAgICBz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ZlbnRzLWhhdmUta2V5LWV2ZW50cyAtLT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJyZW1vdmVcIiBvbjpjbGljaz17KGV2ZW50KSA9PiB1bmluc3RhbGwocGx1Z2luLmtleSwgZXZlbnQpfT57XygndW5pbnN0YWxsJyl9PC9zcGFuPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiYjMtbGFiZWxfX3RleHRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtwbHVnaW4uZGVzY3JpcHRpb24gfHwgXygnbm9kZXNjcmlwdGlvbicpfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImZuX19zcGFjZVwiIC8+XHJcbiAgICAgICAgICAgICAgICAgICAgPGlucHV0XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzPVwiYjMtc3dpdGNoIGZuX19mbGV4LWNlbnRlclwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkPVwiZnVsbFdpZHRoXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZT1cImNoZWNrYm94XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgYmluZDpjaGVja2VkPXtwbHVnaW4uZW5hYmxlZH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgb246Y2hhbmdlPXtvblBsdWdpbkVuYWJsZWRDaGFuZ2UocGx1Z2luLmtleSl9XHJcbiAgICAgICAgICAgICAgICAgICAgLz5cclxuICAgICAgICAgICAgICAgIDwvbGFiZWw+XHJcbiAgICAgICAgICAgIHsvaWZ9XHJcbiAgICAgICAgey9lYWNofVxyXG4gICAgPC9kaXY+XHJcbjwvbGFiZWw+XHJcblxyXG48c3R5bGU+XHJcbiAgICAucGx1Z2luIHNwYW4ucmVtb3ZlIHtc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kUGx1Z2luc0Zyb21VcmwoKSB7XHJcbiAgICAgICAgY29uc3Qgc3RvcmVVcmwgPSB0aGlzLmdldFN0b3JlVXJsKCk7XHJcbiAgICAgICAgaWYgKCFzdG9yZVVybCkge1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGxldCByZXM6IEF4aW9zUmVzcG9uc2U7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgcmVzID0gYXdhaXQgcmVxdWVzdC5nZXQoc3RvcmVVcmwgKyAnL3BsdWdpbnMuanNvbicsIHtcclxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcclxuICAgICAgICAgICAgICAgICAgICAnQ2FjaGUtQ29udHJvbCc6ICduby1jYWNoZScsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgcmVxID0gW107XHJcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocmVzLmRhdGE/LnBsdWdpbnMpKSB7XHJcbiAgICAgICAgICAgIGZvciAoY29uc3QgcGx1Z2luS2V5IG9mIHJlcy5kYXRhPy5wbHVnaW5zIHx8IHt9KSB7XHJcbiAgICAgICAgICAgICAgICBjb25zdCBwbHVnaW4gPSB0aGlzLmdldFBsdWdpbk1hbmlmZXN0KGAke3N0b3JlVXJsfS8ke3BsdWdpbktleX1gKTtcclxuICAgICAgICAgICAgICAgIHJlcS5wdXNoKHBsdWdpbik7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5wbHVnaW5zID0gYXdhaXQgUHJvbWlzZS5hbGwocmVxKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYXN5bmMgZ2V0UGx1Z2luQnlVcmwodXJsOiBzdHJpbmcpIHtcclxuICAgICAgICByZXR1cm4gUHJvbWlzZS5hbGwoW3RoaXMuZ2V0UGx1Z2luTWFuaWZlc3QodXJsKSwgdGhpcy5nZXRQbHVnaW5NYWluSnModXJsKV0pLnRoZW4oKHZhbHVlKSA9PiB7XHJcbiAgICAgICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgICAgICBtYW5pZmVzdDogdmFsdWVbMF0sXHJcbiAgICAgICAgICAgICAgICBtYWluSnM6IHZhbHVlWzFdLFxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBnZXRQbHVnaW5NYW5pZmVzdCh1cmw6IHN0cmluZykge1xyXG4gICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgIGNvbnN0IG1hbmlmZXN0ID0gYXdhaXQgcmVxdWVzdC5nZXQoYCR7dXJsfS9tYW5pZmVzdC5qc29uYCwge1xyXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xyXG4gICAgICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbicsXHJcbiAgICAgICAgICAgICAgICAgICAgJ0NhY2hlLUNvbnRyb2wnOiAnbm8tY2FjaGUnLFxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgIHJldHVybiBtYW5pZmVzdC5kYXRhO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgY29uc29sZS5lcnJvcihlKTtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBnZXRQbHVnaW5NYWluSnModXJsOiBzdHJpbmcpIHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBjb25zdCByZXMgPSBhd2FpdCByZXF1ZXN0LmdldChgJHt1cmx9L21haW4uanNgLCB7XHJcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICd0ZXh0L3BsYWluJyxcclxuICAgICAgICAgICAgICAgICAgICAnQ2FjaGUtQ29udHJvbCc6ICduby1jYWNoZScsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgcmV0dXJuIHJlcy5kYXRhO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgY29uc29sZS5lcnJvcihlKTtcclxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBnZXRQbHVnaW5SZWFkbWUoa2V5OiBzdHJpbmcpIHtcclxuICAgICAgICBjb25zdCB1cmwgPSBgJHt0aGlzLmdldFN0b3JlVXJsKCl9LyR7a2V5fWA7XHJcbiAgICAgICAgdHJ5IHtcclxuICAgICAgICAgICAgY29uc3QgcmVzID0gYXdhaXQgcmVxdWVzdC5nZXQoYCR7dXJsfS9SRUFETUUubWRgLCB7XHJcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XHJcbiAgICAgICAgICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICd0ZXh0L3BsYWluJyxcclxuICAgICAgICAgICAgICAgICAgICAnQ2FjaGUtQ29udHJvbCc6ICduby1jYWNoZScsXHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgcmV0dXJuIHJlcy5kYXRhIGFzIHN0cmluZztcclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7XHJcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXH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DxkaXYgY2xhc3M9XCJmbl9fZmxleC0xXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gc3ZlbHRlLWlnbm9yZSBhMTF5LWNsaWNrLWV2ZW50cy1oYXZlLWtleS1ldmVudHMgLS0+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gc3ZlbHRlLWlnbm9yZSBhMTF5LWludmFsaWQtYXR0cmlidXRlIC0tPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8YSBocmVmPVwiamF2YXNjcmlwdDp2b2lkKDApXCIgY2xhc3M9XCJcIiBvbjpjbGljaz17KGV2ZW50KSA9PiBwcmV2aWV3UGx1Z2luKGV2ZW50LCBwbHVnaW4pfT57cGx1Z2luLm5hbWV9PC9hPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7cGx1Z2luLnZlcnNpb259XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJiMy1sYWJlbF9fdGV4dFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3BsdWdpbi5kZXNjcmlwdGlvbiB8fCAnJ31cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJmbl9fc3BhY2VcIiAvPlxyXG4gICAgICAgICAgICAgICAgICAgIHsjaWYgbG9hZGluZ01hcFtwbHVnaW4ua2V5XX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgPEJ1dHRvbiBkaXNhYmxlZD17dHJ1ZX0+e18oJ2Rvd25sb2FkaW5nJyl9PC9CdXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgezplbHNlIGlmIHBsdWdpbi5pc0V4aXN0fVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB7I2lmIHBsdWdpbi5uZWVkVXBncmFkZX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxCdXR0b24gb25DbGljaz17KCkgPT4gZG93bmxvYWRQbHVnaW4ocGx1Z2luLmtleSl9PntfKCd1cGdyYWRlJyl9PC9CdXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHs6ZWxzZX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxCdXR0b24gZGlzYWJsZWQ9e3RydWV9PntfKCdkb3dubG9hZGVkJyl9PC9CdXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHsvaWZ9XHJcbiAgICAgICAgICAgICAgICAgICAgezplbHNlfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8QnV0dG9uIG9uQ2xpY2s9eygpID0+IGRvd25sb2FkUGx1Z2luKHBsdWdpbi5rZXkpfT57XygnZG93bmxvYWQnKX08L0J1dHRvbj5cclxuICAgICAgICAgICAgICAgICAgICB7L2lmfVxyXG4gICAgICAgICAgICAgICAgPC9sYWJlbD5cclxuICAgICAgICAgICAgey9lYWNofVxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgezplbHNlfVxyXG4gICAgICAgIDxTZXR0aW5nUHJldmlldyBvbjpnb2JhY2s9eygpID0+IHNlbGVjdGVkUGx1Z2luID0gbnVsbCB9IHBsdWdpbj17c2VsZWN0ZWRQbHVnaW59PjwvU2V0dGluZ1ByZXZpZXc+XHJcbiAgICB7L2lmfVxyXG48L2Rpdj5cclxuIiwiPHNjcmlwdCBsYW5nPVwidHNcIj5cclxuICAgIGltcG9ydCB7IFNldHRpbmdSZW5kZXIgfSBmcm9tICdAL3R5cGVzJztcclxuICAgIGltcG9ydCB7IG9uTW91bnQgfSBmcm9tICdzdmVsdGUnO1xyXG5cclxuICAgIGxldCByb290OiBIVE1MRWxlbWVudDtcclxuXHJcbiAgICBleHBvcnQgbGV0IHJlbmRlcjogU2V0dGluZ1JlbmRlcjtcclxuXHJcbiAgICAkOiB7XHJcbiAgICAgICAgY29uc3QgZWwgPSBkb2N1bWVudC5nZXRFbGVtZW50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ZWx0ZSc7XHJcbiAgICBpbXBvcnQgeyBjb250YWluZXIgfSBmcm9tICdAL2NvbnRhaW5lcic7XHJcbiAgICBpbXBvcnQgeyBUWVBFUyB9IGZyb20gJ0AvY29uZmlnJztcclxuICAgIGltcG9ydCB7IElTZXR0aW5nTWFuYWdlciwgSVN0b3JhZ2VNYW5hZ2VyLCBTZXR0aW5nUmVuZGVyIH0gZnJvbSAnQC90eXBlcyc7XHJcbiAgICBpbXBvcnQgU2V0dGluZ0N1c3RvbSBmcm9tICcuL3NldHRpbmctY3VzdG9tLnN2ZWx0ZSc7XHJcblxyXG4gICAgdHlwZSBNZW51ID0geyBrZXk6IHN0cmluZzsgbmFtZTogc3RyaW5nOyB0eXBlOiAnaW50ZXJuYWwnIHwgJ2N1c3RvbSc7IGNvbXBvbmVudD86IGFueTsgcmVuZGVyPzogU2V0dGluZ1JlbmRlcjsgfTtcclxuXHJcbiAgICBjb25zdCBtZW51czogTWVudVtdID0gW1xyXG4gICAgICAgIHtcclxuICAgICAgICAgICAga2V5OiAnY29tbW9uJyxcclxuICAgICAgICAgICAgbmFtZTogXygnbWVudV9jb21tb24nKSxcclxuICAgICAgICAgICAgdHlwZTogJ2ludGVybmFsJyxcclxuICAgICAgICAgICAgY29tcG9uZW50OiBTZXR0aW5nQ29tbW9uLFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAge1xyXG4gICAgICAgICAgICBrZXk6ICdsaXN0JyxcclxuICAgICAgICAgICAgbmFtZTogXygnbWVudV9saXN0JyksXHJcbiAgICAgICAgICAgIHR5cGU6ICdpbnRlcm5hbCcsXHJcbiAgICAgICAgICAgIGNvbXBvbmVudDogU2V0dGluZ0xpc3QsXHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICAgIGtleTogJ3N0b3JlJyxcclxuICAgICAgICAgICAgbmFtZTogXygnbWVudV9zdG9yZScpLFxyXG4gICAgICAgICAgICB0eXBlOiAnaW50ZXJuYWwnLFxyXG4gICAgICAg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0LWl0ZW1fX3RleHRcIj57bWVudS5uYW1lfTwvc3Bhbj5cclxuICAgICAgICAgICAgICAgIDwvbGk+XHJcbiAgICAgICAgICAgIHsvZWFjaH1cclxuICAgICAgICAgICAgeyNpZiB0aGlyZE1lbnVzLmxlbmd0aCA+IDB9XHJcbiAgICAgICAgICAgICAgICA8aHIgc3R5bGU9XCJtYXJnaW46IDEycHg7XCI+XHJcbiAgICAgICAgICAgIHsvaWZ9XHJcbiAgICAgICAgICAgIHsjZWFjaCB0aGlyZE1lbnVzIGFzIG1lbnV9XHJcbiAgICAgICAgICAgICAgICA8IS0tIHN2ZWx0ZS1pZ25vcmUgYTExeS1jbGljay1ldmVudHMtaGF2ZS1rZXktZXZlbnRzIC0tPlxyXG4gICAgICAgICAgICAgICAgPGxpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS1uYW1lPXttZW51LmtleX1cclxuICAgICAgICAgICAgICAgICAgICBjbGFzcz17Y3VycmVudFNlbGVjdGlvbi5rZXkgPT09IG1lbnUua2V5XHJcbiAgICAgICAgICAgICAgICAgICAgICAgID8gJ2IzLWxpc3QtaXRlbS0tZm9jdXMgYjMtbGlzdC1pdGVtIGIzLWxpc3QtaXRlbS0tYmlnJ1xyXG4gICAgICAgICAgICAgICAgICAgICAgICA6ICdiMy1saXN0LWl0ZW0gYjMtbGlzdC1pdGVtLS1iaWcnfSBcclxuICAgICAgICAgICAgICAgICAgICBvbjpjbGljaz17KCkgPT4gc2V0Q3VycmVudFNlbGVjdGlvbihtZW51KX1cclxuICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImIzLWxpc3QtaXRlbV9fdGV4dFwiPnttZW51Lm5hbWV9PC9zcGFuPlxyXG4gICAgICAgICAgICAgICAgPC9saT5cclxuICAgICAgICAgICAgey9lYWNofVxyXG4gICAgICAgIDwvdWw+XHJcbiAgICAgICAgPGRpdiBjbGFzcz1cImNvbmZpZ19fdGFiLWNvbnRha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JylcclxuICAgICAgICAgICAgICAgIC5hZGRJdGVtKFxyXG4gICAgICAgICAgICAgICAgICAgIG5ldyBNZW51SXRlbSh7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfKCdwbHVnaW5fc3lzdGVtX3NldHRpbmcnKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ2ljb25FZGl0JyxcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6ICgpID0+IHNob3dTZXR0aW5nRGlhbG9nKCksXHJcbiAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgIClcclxuICAgICAgICAgICAgICAgIC5hZGRTZXBhcmF0b3IoKVxyXG4gICAgICAgICAgICAgICAgLmFkZEl0ZW0oXHJcbiAgICAgICAgICAgICAgICAgICAgbmV3IE1lbnVJdGVtKHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF8oJ3JlbG9hZCcpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpY29uOiAnaWNvblJlZnJlc2gnLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogKCkgPT4gd2luZG93LmxvY2F0aW9uLnJlbG9hZCgpLFxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICApXHJcbiAgICAgICAgICAgICAgICAuc2hvd0F0TW91c2VFdmVudChldmVudCk7XHJcbiAgICAgICAgICAgIGV2ZW50LnN0b3BQcm9wYWdhdGlvbigpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIGNsaWVudEFwaS5hZGRUb29sYmFyUmlnaHQoaW50ZXJuYWxTZXR0aW5nQnV0dG9uKTtcclxuXHJcbiAgICAgICAgdGhpcy5yZWdpc3RlckNvbW1hbmQoe1xyXG4gICAgICAgICAgICBjb21tYW5kOiAnU2hvdyBwbHVnaW4gc3lzdGVtIGNvbmlmZycsXHJcbiAgICAgICAgICAgIGRlc2NyaXB0aW9uOiBfKCdza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pIHtcclxuICAgICAgICAgICAgaWYgKGFsbFtrZXldICE9PSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnW2tleV0gPSBhbGxba2V5XTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGF3YWl0IHNldFN0b3JhZ2VWYWwoa2V5LCBkZWZhdWx0Q29uZmlnW2tleV0pO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgICAgIC8vIGxvYWQgYWxsIHBsdWdpbnNcclxuICAgICAgICB0aGlzLnRoaXJkUGFydHlQbHVnaW5zID0gYXdhaXQgdGhpcy5wbHVnaW5GaWxlTWFuYWdlci5nZXRBbGxQbHVnaW5zKCk7XHJcbiAgICAgICAgdGhpcy5pbnRlcm5hbFBsdWdpbnMgPSBbLi4uaW50ZXJuYWxQbHVnaW5zXTtcclxuICAgICAgICB0aGlzLmluaXQzcmRQYXJ0eUVuYWJsZWQoKTtcclxuICAgICAgICB0aGlzLmluaXRJbnRlcm5hbEVuYWJsZWQoKTtcclxuICAgICAgICBhd2FpdCB0aGlzLnNhdmVQbHVnaW5zRW5hYmxlZCgpO1xyXG5cclxuICAgICAgICByZXR1cm4gdGhpcztcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGluaXQzcmRQYXJ0eUVuYWJsZWQoKSB7XHJcbiAgICAgICAgY29uc3QgZW5hYmxlZFBsdWdpbnMgPSB0aGlzLmdldChQTFVHSU5fU1lTVEVNX1RISVJEX1BBUlRZX1BMVUdJTikgYXMgUGx1Z2luRW5hYmxlQ29uZmlnW107XHJcbiAgICAgICAgZm9yIChjb25zdCBlcCBvZiBlbmFibGVkUGx1Z2lucykge1xyXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHAgb2YgdGhpcy50aGlyZFBhcnR5UGx1Z2lucykge1xyXG4gICAgICAgICAgICAgICAgaWYgKHAua2V5ID09PSBlcC5rZXkpIHtcclxuICAgICAgICAgICAgICAgICAgICBwLmVuYWJsZWQgPSBlcC5lbmFibGVkIHx8IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgaW5pdEludGVybmFsRW5hYmxlZCgpIHtcclxuICAgICAgICBjb25zdCBlbmFibGVkUGx1Z2lucyA9IHRoaXMuZ2V0KFBMVUdJTl9TWVNURU1fUExVR0lOKSBhcyBQbHVnaW5FbmFibGVDb25maWdbXTtcclxuICAgICAgICBmb3IgKGNvbnN0IGVwIG9mIGVuYWJsZWRQbHVnaW5zKSB7XHJcbiAgICAgICAgICAgIGZvciAoY29uc3QgcCBvZiB0aGlzLmludGVybmFsUGx1Z2lucykge1xyXG4gICAgICAgICAgICAgICAgaWYgKHAua2V5ID09PSBlcC5rZXkpIHtcclxuICAgICAgICAgICAgICAgICAgICBwLmVuYWJsZWQgPSBlcC5lbmFibGVkIHx8IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRQbHVnaW5zKCkge1xyXG4gICAgICAgIHJldHVybiBbLi4udGhpcy5pbnRlcm5hbFBsdWdpbnMsIC4uLnRoaXMudGhpcmRQYXJ0eVBsdWdpbnNdO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRJbnRlcm5hbFBsdWdpbnMoKSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuaW50ZXJuYWxQbHVnaW5zO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBnZXRUaGlyZFBhcnR5UGx1Z2lucygpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy50aGlyZFBhcnR5UGx1Z2lucztcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgZ2V0UGx1Z2luQnlLZXkoa2V5KSB7XHJcbiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0UGx1Z2lucygpLmZpbmQoKHApID0+IHAua2V5ID09PSBrZXkpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBzZXRQbHVnaW5FbmFibGVkKGtleTogc3RyaW5nLCBlbmFibGVkOiBib29sZWFuKSB7XHJcbiAgICAgICAgZm9yIChjb25zdCBwIG9mIFsuLi50aGlzLmludGVybmFsUGx1Z2lucywgLi4udGhpcy50aGlyZFBhcnR5UGx1Z2luc10pIHtcclxuICAgICAgICAgICAgaWYgKHAua2V5ID09PSBrZXkpIHtcclxuICAgICAgICAgICAgICAgIHAuZW5hYmxlZCA9IGVuYWJsZWQ7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBhd2FpdCB0aGlzLnNhdmVQbHVnaW5zRW5hYmxlZCgpO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBhc3luYyBzZXRTYWZlTW9kZUVuYWJsZWQoZW5hYmxlZDogYm9vbGVhbikge1xyXG4gICAgICAgIHJldHVybiB0aGlzLnNldChQTFVHSU5fU1lTVEVNX1NBRkVfTU9ERV9FTkFCTEVELCBlbmFibGVkKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgYXN5bmMgc2F2ZVBsdWdpbnNFbmFibGVkKCkge1xyXG4gICAgICAgIGF3YWl0IHRoaXMuc2V0KFxyXG4gICAgICAgICAgICBQTFVHSU5fU1lTVEVNX1BMVUdJTixcclxuICAgICAgICAgICAgdGhpcy5pbnRlcm5hbFBsdWdpbnMubWFwKChwKSA9PiAoeyBrZXk6IHAua2V5LCBlbmFibGVkOiBwLmVuYWJsZWQgfSkpXHJcbiAgICAgICAgKTtcclxuICAgICAgICByZXR1cm4gdGhpcy5zZXQoXHJcbiAgICA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HJlcmVsZWFzZS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICB0aGlzLnBhdGNoKytcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnByZXJlbGVhc2UgPSBbXVxuICAgICAgICBicmVha1xuICAgICAgLy8gVGhpcyBwcm9iYWJseSBzaG91bGRuJ3QgYmUgdXNlZCBwdWJsaWNseS5cbiAgICAgIC8vIDEuMC4wICdwcmUnIHdvdWxkIGJlY29tZSAxLjAuMC0wIHdoaWNoIGlzIHRoZSB3cm9uZyBkaXJlY3Rpb24uXG4gICAgICBjYXNlICdwcmUnOlxuICAgICAgICBpZiAodGhpcy5wcmVyZWxlYXNlLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgIHRoaXMucHJlcmVsZWFzZSA9IFswXVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGxldCBpID0gdGhpcy5wcmVyZWxlYXNlLmxlbmd0aFxuICAgICAgICAgIHdoaWxlICgtLWkgPj0gMCkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiB0aGlzLnByZXJlbGVhc2VbaV0gPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgIHRoaXMucHJlcmVsZWFzZVtpXSsrXG4gICAgICAgICAgICAgIGkgPSAtMlxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoaSA9PT0gLTEpIHtcbiAgICAgICAgICAgIC8vIGRpZG4ndCBpbmNyZW1lbnQgYW55dGhpbmdcbiAgICAgICAgICAgIHRoaXMucHJlcmVsZWFzZS5wdXNoKDApXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChpZGVudGlmaWVyKSB7XG4gICAgICAgICAgLy8gMS4yLjAtYmV0YS4xIGJ1bXBzIHRvIDEuMi4wLWJldGEuMixcbiAgICAgICAgICAvLyAxLjIuMC1iZXRhLmZvb2JseiBvciAxLjIuMC1iZXRhIGJ1bXBzIHRvIDEuMi4wLWJldGEuMFxuICAgICAgICAgIG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AuMC0wYFxuICAgIH0gZWxzZSBpZiAoaXNYKHApKSB7XG4gICAgICBpZiAoTSA9PT0gJzAnKSB7XG4gICAgICAgIHJldCA9IGA+PSR7TX0uJHttfS4wJHt6fSA8JHtNfS4keyttICsgMX0uMC0wYFxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcmV0ID0gYD49JHtNfS4ke219LjAke3p9IDwkeytNICsgMX0uMC4wLTBgXG4gICAgICB9XG4gICAgfSBlbHNlIGlmIChwcikge1xuICAgICAgZGVidWcoJ3JlcGxhY2VDYXJldCBwcicsIHByKVxuICAgICAgaWYgKE0gPT09ICcwJykge1xuICAgICAgICBpZiAobSA9PT0gJzAnKSB7XG4gICAgICAgICAgcmV0ID0gYD49JHtNfS4ke219LiR7cH0tJHtwclxuICAgICAgICAgIH0gPCR7TX0uJHttfS4keytwICsgMX0tMGBcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXQgPSBgPj0ke019LiR7bX0uJHtwfS0ke3ByXG4gICAgICAgICAgfSA8JHtNfS4keyttICsgMX0uMC0wYFxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXQgPSBgPj0ke019LiR7bX0uJHtwfS0ke3ByXG4gICAgICAgIH0gPCR7K00gKyAxfS4wLjAtMGBcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgZGVidWcoJ25vIHByJylcbiAgICAgIGlmIChNID09PSAnMCcpIHtcbiAgICAgICAgaWYgKG0gPT09ICcwJykge1xuICAgICAgICAgIHJldCA9IGA+PSR7TX0uJHttfS4ke3BcbiAgICAgICAgICB9JHt6fSA8JHtNfS4ke219LiR7K3AgKyAxfS0wYFxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldCA9IGA+PSR7TX0uJHttfS4ke3BcbiAgICAgICAgICB9JHt6fSA8JHtNfS4keyttICsgMX0uMC0wYFxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXQgPSBgPj0ke019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ocCwgY29udGVudCk7XHJcbiAgICB9XHJcblxyXG4gICAgYXN5bmMgbG9jYWxDYWNoZUluaXQoKSB7XHJcbiAgICAgICAgLy8gdHJ5IHtcclxuICAgICAgICAvLyAgICAgY29uc3QgcGx1Z2luID0gRmlsZUNsaWVudC5nZXRJbnN0YW5jZUFwaSgpLmZpbGVBcGkuZ2V0RmlsZShwbHVnaW5TY3JpcHRQb3NpdGlvbik7XHJcbiAgICAgICAgLy8gICAgIGlmIChwbHVnaW4gIT09IG51bGwpIHtcclxuICAgICAgICAvLyAgICAgICAgIHRoaXMuZGVsYXlBdXRvVXBncmFkZSgpO1xyXG4gICAgICAgIC8vICAgICB9XHJcbiAgICAgICAgLy8gICAgIHJldHVybjtcclxuICAgICAgICAvLyB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgLy8gICAgIGxvZygnUGx1Z2luIHN5c3RlbSBub3QgZm91bmQnKTtcclxuICAgICAgICAvLyB9XHJcbiAgICAgICAgLy8gY29uc3Qgc2NyaXB0ID0gd2luZG93LnNpeXVhblBsdWdpblNjcmlwdDtcclxuICAgICAgICAvLyBpZiAoIXNjcmlwdCkge1xyXG4gICAgICAgIC8vICAgICByZXR1cm47XHJcbiAgICAgICAgLy8gfVxyXG4gICAgICAgIC8vIGF3YWl0IHRoaXMuc2F2ZVRvTG9jYWwocGx1Z2luU2NyaXB0UG9zaXRpb24sIHNjcmlwdCk7XHJcbiAgICAgICAgLy8gdGhpcy5kZWxheUF1dG9VcGdyYWRlKCk7XHJcbiAgICB9XHJcblxyXG4gICAgZGVsYXlBdXRvVXBncmFkZSgpIHtcclxuICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7XHJcbiAgICAgICAgICAgIGNvbnN0IGF1dG9VcGRhdGUgPSB0aGlzLnN0b3JhZ2VNYW5nYWdlci5nZXQoUExVR0lOX1NZU1RFTV9BVVRPX1VQREFURSk7XHJcbiAgICAgICAgICAgIGlmICghYXV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iAgICAgICAgfVxyXG4gICAgICAgIGZvciAoY29uc3QgcCBvZiBwbHVnaW5zKSB7XHJcbiAgICAgICAgICAgIGlmICghcC5lbmFibGVkKSB7XHJcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBhd2FpdCB0aGlzLmxvYWRQbHVnaW4ocCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGxvYWRBbGxJbnRlcm5hbFBsdWdpbnMoKSB7XHJcbiAgICAgICAgaW50ZXJuYWxQbHVnaW5zLmZvckVhY2goYXN5bmMgKHApID0+IHtcclxuICAgICAgICAgICAgY29uc3QgcGx1ZyA9IG5ldyBwLnBsdWdpbigpO1xyXG4gICAgICAgICAgICBpZiAoIShwbHVnIGluc3RhbmNlb2YgUGx1Z2luKSkge1xyXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBGYWlsZWQgdG8gbG9hZCBwbHVnaW4gJHtwLm5hbWV9YCk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbG9nKGBMb2FkIGludGVybmFsIHBsdWdpbjogJHtwLmtleX0oJHtwLm5hbWV9KWApO1xyXG4gICAgICAgICAgICB0aGlzLmFkZEFkZGl0aW9uYWxNZXRob2QocGx1ZywgcC5rZXksIHAubmFtZSk7XHJcbiAgICAgICAgICAgIGF3YWl0IHBsdWcub25sb2FkKCk7XHJcbiAgICAgICAgICAgIHRoaXMubG9hZGVkUGx1Z2lucy5zZXQocC5rZXksIHBsdWcpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGxvYWRBbGxMb2NhbFBsdWdpbnMoKSB7XHJcbiAgICAgICAgY29uc3QgcGx1Z2lucyA9IGF3YWl0IHRoaXMucGx1Z2luRmlsZU1hbmFnZXIuZ2V0QWxsUGx1Z2lucygpO1xyXG4gICAgICAgIGlmICghcGx1Z2lucykge1xyXG4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lzLmxvYWRlZFBsdWdpbnMuc2V0KHBsdWdpbi5rZXksIHBsdWcpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNvbnN0IGV4cG9ydHM6IHsgW2tleTogc3RyaW5nXTogYW55IH0gPSB7fTtcclxuICAgICAgICBjb25zdCBtb2R1bGUgPSB7IGV4cG9ydHMgfTtcclxuICAgICAgICBmdW5jdGlvbiBydW4oc2NyaXB0OiBzdHJpbmcsIG5hbWU6IHN0cmluZykge1xyXG4gICAgICAgICAgICByZXR1cm4gZXZhbCgnKGZ1bmN0aW9uIGFub255bW91cyhyZXF1aXJlLG1vZHVsZSxleHBvcnRzKXsnLmNvbmNhdChzY3JpcHQsICdcXG59KVxcbi8vIyBzb3VyY2VVUkw9JykuY29uY2F0KG5hbWUsICdcXG4nKSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNvbnN0IF9fcmVxdWlyZSA9IChuYW1lOiBzdHJpbmcpID0+IHtcclxuICAgICAgICAgICAgaWYgKGNvbXBvbmVudHNbbmFtZV0pIHtcclxuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb25lbnRzW25hbWVdO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgbW9kdWxlICR7bmFtZX0gbm90IGZvdW5kYCk7XHJcbiAgICAgICAgfTtcclxuICAgICAgICBjb25zdCBwbHVnaW5OYW1lID0gcGx1Z2luLmtleTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBydW4ocGx1Z2luLnNjcmlwdCwgcGx1Z2luLmtleSkoX19yZXF1aXJlLCBtb2R1bGUsIGV4cG9ydHMpO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgZXJyb3IoJ0Vycm9yIHBsdWdpbjonICsgcGx1Z2luLmtleSArICcgLT4nLCBlKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH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vbW1hbmQ6IENvbW1hbmQpIHtcclxuICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgIHRoaXMuY29tbWFuZExpc3Quc29tZSgoY29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb20ucGx1Z2luID09PSBjb21tYW5kLnBsdWdpbiAmJiBjb20uY29tbWFuZCA9PT0gY29tbWFuZC5jb21tYW5kO1xyXG4gICAgICAgICAgICB9KVxyXG4gICAgICAgICkge1xyXG4gICAgICAgICAgICByZXR1cm4gbmV3IEVycm9yKCdDb21tYW5kIGlzIGFscmVhZHkgcmVnaXN0ZXJlZCwgZG8gbm90IHJlZ2lzdGVyIGNvbW1hbmQgcmVwZWF0bHknKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICBjb21tYW5kLnNob3J0Y3V0ICYmXHJcbiAgICAgICAgICAgIHRoaXMuY29tbWFuZExpc3Quc29tZSgoY29tKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBjb20uc2hvcnRjdXQgPT09IGNvbW1hbmQuc2hvcnRjdXQ7XHJcbiAgICAgICAgICAgIH0pXHJcbiAgICAgICAgKSB7XHJcbiAgICAgICAgICAgIHJldHVybiBuZXcgV2FybmluZygnc2hvcnRjdXQgaGFzIGFscmVhZHkgcmVnaXN0ZXJlZCcpO1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLmNvbW1hbmRMaXN0LnB1c2goY29tbWFuZCk7XHJcbiAgICAgICAgdGhpcy5zaG9ydGN1dC5yZWdpc3RlcktleWJvYXJkRXZlbnRGcm9tUGx1Z2luKGNvbW1hbmQpO1xyXG4gICAgICAgIGxvZyhgUmVnaXN0ZXIgcGx1Z2luOiAke2NvbW1hbmQucGx1Z2lufSBjb21tYW5kOiAke2NvbW1hbmQuY29tbWFuZH1gKTtcclxuICAgIH1cclxuXHJcbiAgICBwdWJsaWMgdW5yZWdpc3RlckNvbW1hbmRCeVBsdWdpbihwbHVnaW46IHN0cmluZykge1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5jb21tYW5kTGlzdC5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgICAgICBpZiAocGx1Z2luID09PSB0aGlzLmNvbW1hbmRMaXN0W2ldLnBsdWdpbikge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgY29tID0gdGhpcy5jb21tYW5kTGlzdFtpXTtcclxuICAgICAgICAgICAgICAgIGxvZyhgVW5yZWdpc3RlciBwbHVnaW46ICR7cGx1Z2lufSBjb21tYW5kOiAke2NvbS5jb21tYW5kfWApO1xyXG4gICAgICAgICAgICAgICAgdGhpcy5jb21tYW5kTGlzdC5zcGxpY2UoaSwgMSk7XHJcbiAgICAgICAgICAgICAgICBpZiAoY29tLnNob3J0Y3V0KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zaG9ydGN1dC51bnJlZ2lzdGVyS2V5Ym9hcmRFdmVudChjb20uc2hvcnRjdXQpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyB1bnJlZ2lzdGVyQ29tbWFuZChjb21tYW5kOiBDb21tYW5kKSB7XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0aGlzLmNvbW1hbmRMaXN0Lmxlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICAgIGlmIChjb21tYW5kLmNvbW1hbmQgPT09IHRoaXMuY29tbWFuZExpc3RbaV0uY29tbWFuZCAmJiBjb21tYW5kLnBsdWdpbiA9PT0gdGhpcy5jb21tYW5kTGlzdFtpXS5wbHVnaW4pIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuY29tbWFuZExpc3Quc3BsaWNlKGksIDEpO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgdGhpcy5zaG9ydGN1dC5yZ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lxuICAgKiBKZXN0IHRlc3QgY2FzZXMgYXJlIHJlcXVpcmVkLlxuICAgKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gICAqL1xuXG4gIFsnY3RybEtleScsICdhbHRLZXknLCAnc2hpZnRLZXknLCAnbWV0YUtleSddLmZvckVhY2goZnVuY3Rpb24gKGtleU5hbWUpIHtcbiAgICB2YXIga2V5TnVtID0gbW9kaWZpZXJNYXBba2V5TmFtZV07XG5cbiAgICBpZiAoZXZlbnRba2V5TmFtZV0gJiYgX2Rvd25LZXlzLmluZGV4T2Yoa2V5TnVtKSA9PT0gLTEpIHtcbiAgICAgIF9kb3duS2V5cy5wdXNoKGtleU51bSk7XG4gICAgfSBlbHNlIGlmICghZXZlbnRba2V5TmFtZV0gJiYgX2Rvd25LZXlzLmluZGV4T2Yoa2V5TnVtKSA+IC0xKSB7XG4gICAgICBfZG93bktleXMuc3BsaWNlKF9kb3duS2V5cy5pbmRleE9mKGtleU51bSksIDEpO1xuICAgIH0gZWxzZSBpZiAoa2V5TmFtZSA9PT0gJ21ldGFLZXknICYmIGV2ZW50W2tleU5hbWVdICYmIF9kb3duS2V5cy5sZW5ndGggPT09IDMpIHtcbiAgICAgIC8qKlxuICAgICAgICogRml4IGlmIENvbW1hbmQgaXMgcHJlc3NlZDpcbiAgICAgICAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAgICAgICAqL1xuICAgICAgaWYgKCEoZXZlbnQuY3RybEtleSB8fCBldmVudC5zaGlmdEtleSB8fCBldmVudC5hbHRLZXkpKSB7XG4gICAgICAgIF9kb3duS2V5cyA9IF9kb3duS2V5cy5zbGljZShfZG93bktleXMuaW5kZXhPZihrZXlOdW0pKTtcbiAgICAgIH1cbiAgICB9XG4gIH0pO1xuICAvKipcbiAgICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuICAgKi9cblxuICBpZiAoa2V5IGluIF9tb2RzKSB7XG4gICAgX21vZHNba2V5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vQmxMLE1BQU1FLGNBQWNrakMsR0FBR2xqQyxjQUFjZ3ZDLG1CQUNuRWxRLFVBQVU5ekIsS0FBb0JsTCxNQUFNSSxjQUFjZ2pDLEdBQUdoakMsY0FBYzh1QyxtQkFDbkVsUSxVQUFVOXpCLEtBQXlCbEwsTUFBTUssbUJBQW1CK2lDLEdBQUcvaUMsbUJBQW1CNnVDLG1CQUNsRmxRLFVBQVU5ekIsS0FBZ0JsTCxNQUFNTSxVQUFVOGlDLEdBQUc5aUMsVUFDN0MwK0IsVUFBVTl6QixLQUFnQmxMLE1BQU1PLFVBQVU2aUMsR0FBRzdpQyxVQUFVMnVDLG1CQUN2RGxRLFVBQVU5ekIsS0FBc0JsTCxNQUFNUSxnQkFBZ0I0aUMsR0FBRzVpQyxnQkFBZ0IwdUMsbUJBQ3pFbFEsVUFBVTl6QixLQUFhbEwsTUFBTVMsT0FBTzJpQyxHQUFHM2lDLE9BQU95dUMsbUJBQzlDbFEsVUFBVTl6QixLQUFzQmxMLE1BQU1VLGdCQUFnQjBpQyxHQUFHMWlDLGdCQUFnQnd1QyxtQkMzQnBFcnZDLE9BQU95bUQsZUFDUi82QyxJQUFJLG1DQUNKMUwsT0FBTzB1RSxvQkFBc0I3dUUsVUFDN0JHLE9BQU95bUQsYUFBZXRuQixVQUFVcnBDLElBQW1CcUssTUFBTUUsY0FBY3dpRCxPQUN2RTdpRCxPQUFPMnVFLHlCQUEyQnh2QyJ9 diff --git a/app/PSP/package.json b/app/PSP/package.json deleted file mode 100644 index 9a9549b852..0000000000 --- a/app/PSP/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "siyuan-petal", - "version": "0.7.1", - "type": "module", - "main": "main.esm.js", - "types": "type.d.ts", - "license": "AGPL-v3", - "scripts": { - "build": "cross-env TYPE=iife vite build && cross-env TYPE=esm vite build", - "version": "node tools/version.cjs", - "dev": "vite build --watch", - "type:build": "tsc src/api.ts src/index.d.ts -d --emitDeclarationOnly --esModuleInterop --resolveJsonModule --outdir temp && node tools/bundle.cjs && rm -rf temp/", - "type:clean": "rm -rf temp/ type/" - }, - "devDependencies": { - "@microsoft/api-extractor": "^7.34.4", - "@sveltejs/vite-plugin-svelte": "^2.0.3", - "@types/node": "^18.14.1", - "@types/sanitize-filename": "^1.6.3", - "@types/semver": "^7.3.13", - "axios": "^1.3.4", - "chokidar": "^3.5.3", - "cross-env": "^7.0.3", - "dts-bundle": "^0.7.3", - "dts-gen": "^0.6.1", - "hotkeys-js": "^3.10.1", - "inversify": "^6.0.1", - "reflect-metadata": "^0.1.13", - "rome": "^12.0.0", - "sanitize-filename": "^1.6.3", - "semver": "^7.3.8", - "svelte": "^3.55.1", - "terser": "^5.16.5", - "typescript": "^5", - "vite": "^4.1.4", - "vite-plugin-css-injected-by-js": "^3.1.0", - "vite-plugin-eslint": "^1.8.1", - "vite-plugin-replace": "^0.1.1", - "zhi-log": "^1.6.1" - } -} \ No newline at end of file diff --git a/app/PSP/pnpm-lock.yaml b/app/PSP/pnpm-lock.yaml deleted file mode 100644 index 6715189e98..0000000000 --- a/app/PSP/pnpm-lock.yaml +++ /dev/null @@ -1,2179 +0,0 @@ -lockfileVersion: '6.0' - -devDependencies: - '@microsoft/api-extractor': - specifier: ^7.34.4 - version: 7.34.4(@types/node@18.14.1) - '@sveltejs/vite-plugin-svelte': - specifier: ^2.0.3 - version: 2.0.3(svelte@3.55.1)(vite@4.1.4) - '@types/node': - specifier: ^18.14.1 - version: 18.14.1 - '@types/sanitize-filename': - specifier: ^1.6.3 - version: 1.6.3 - '@types/semver': - specifier: ^7.3.13 - version: 7.3.13 - axios: - specifier: ^1.3.4 - version: 1.3.4 - chokidar: - specifier: ^3.5.3 - version: 3.5.3 - cross-env: - specifier: ^7.0.3 - version: 7.0.3 - dts-bundle: - specifier: ^0.7.3 - version: 0.7.3 - dts-gen: - specifier: ^0.6.1 - version: 0.6.1 - hotkeys-js: - specifier: ^3.10.1 - version: 3.10.1 - inversify: - specifier: ^6.0.1 - version: 6.0.1 - reflect-metadata: - specifier: ^0.1.13 - version: 0.1.13 - rome: - specifier: ^12.0.0 - version: 12.0.0 - sanitize-filename: - specifier: ^1.6.3 - version: 1.6.3 - semver: - specifier: ^7.3.8 - version: 7.3.8 - svelte: - specifier: ^3.55.1 - version: 3.55.1 - terser: - specifier: ^5.16.5 - version: 5.16.5 - typescript: - specifier: ^5 - version: 5.0.3 - vite: - specifier: ^4.1.4 - version: 4.1.4(@types/node@18.14.1)(terser@5.16.5) - vite-plugin-css-injected-by-js: - specifier: ^3.1.0 - version: 3.1.0(vite@4.1.4) - vite-plugin-eslint: - specifier: ^1.8.1 - version: 1.8.1(eslint@8.38.0)(vite@4.1.4) - vite-plugin-replace: - specifier: ^0.1.1 - version: 0.1.1(vite@4.1.4) - zhi-log: - specifier: ^1.6.1 - version: 1.6.1 - -packages: - - /@esbuild/android-arm64@0.16.17: - resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-arm@0.16.17: - resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/android-x64@0.16.17: - resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-arm64@0.16.17: - resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/darwin-x64@0.16.17: - resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-arm64@0.16.17: - resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/freebsd-x64@0.16.17: - resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm64@0.16.17: - resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-arm@0.16.17: - resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ia32@0.16.17: - resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-loong64@0.16.17: - resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-mips64el@0.16.17: - resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-ppc64@0.16.17: - resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-riscv64@0.16.17: - resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-s390x@0.16.17: - resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/linux-x64@0.16.17: - resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@esbuild/netbsd-x64@0.16.17: - resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/openbsd-x64@0.16.17: - resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true - dev: true - optional: true - - /@esbuild/sunos-x64@0.16.17: - resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-arm64@0.16.17: - resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-ia32@0.16.17: - resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@esbuild/win32-x64@0.16.17: - resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@eslint-community/eslint-utils@4.4.0(eslint@8.38.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - dependencies: - eslint: 8.38.0 - eslint-visitor-keys: 3.4.0 - dev: true - - /@eslint-community/regexpp@4.5.0: - resolution: {integrity: sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true - - /@eslint/eslintrc@2.0.2: - resolution: {integrity: sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.5.1 - globals: 13.20.0 - ignore: 5.2.4 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@eslint/js@8.38.0: - resolution: {integrity: sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@humanwhocodes/config-array@0.11.8: - resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@humanwhocodes/module-importer@1.0.1: - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - dev: true - - /@humanwhocodes/object-schema@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - dev: true - - /@jridgewell/gen-mapping@0.3.2: - resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping': 0.3.17 - dev: true - - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/set-array@1.1.2: - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/source-map@0.3.2: - resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} - dependencies: - '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.17 - dev: true - - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - dev: true - - /@jridgewell/trace-mapping@0.3.17: - resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /@microsoft/api-extractor-model@7.26.4(@types/node@18.14.1): - resolution: {integrity: sha512-PDCgCzXDo+SLY5bsfl4bS7hxaeEtnXj7XtuzEE+BtALp7B5mK/NrS2kHWU69pohgsRmEALycQdaQPXoyT2i5MQ==} - dependencies: - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.55.2(@types/node@18.14.1) - transitivePeerDependencies: - - '@types/node' - dev: true - - /@microsoft/api-extractor@7.34.4(@types/node@18.14.1): - resolution: {integrity: sha512-HOdcci2nT40ejhwPC3Xja9G+WSJmWhCUKKryRfQYsmE9cD+pxmBaKBKCbuS9jUcl6bLLb4Gz+h7xEN5r0QiXnQ==} - hasBin: true - dependencies: - '@microsoft/api-extractor-model': 7.26.4(@types/node@18.14.1) - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.2 - '@rushstack/node-core-library': 3.55.2(@types/node@18.14.1) - '@rushstack/rig-package': 0.3.18 - '@rushstack/ts-command-line': 4.13.2 - colors: 1.2.5 - lodash: 4.17.21 - resolve: 1.22.1 - semver: 7.3.8 - source-map: 0.6.1 - typescript: 4.8.4 - transitivePeerDependencies: - - '@types/node' - dev: true - - /@microsoft/tsdoc-config@0.16.2: - resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} - dependencies: - '@microsoft/tsdoc': 0.14.2 - ajv: 6.12.6 - jju: 1.4.0 - resolve: 1.19.0 - dev: true - - /@microsoft/tsdoc@0.14.2: - resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} - dev: true - - /@nodelib/fs.scandir@2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - dev: true - - /@nodelib/fs.stat@2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - dev: true - - /@nodelib/fs.walk@1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 - dev: true - - /@rollup/pluginutils@4.2.1: - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} - dependencies: - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: true - - /@rometools/cli-darwin-arm64@12.0.0: - resolution: {integrity: sha512-kEFCzU6cgy6vfY0mkMzq57ea3srqV5X2wyCAxjVfA2JF7fioq695uWhy7yOCBW+nUUFIz62N9v1nf/aYqX8XkA==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-darwin-x64@12.0.0: - resolution: {integrity: sha512-YDevVPKrkRFdjjM/3zOpOWI5mEY2ivjKM2eR8Yqv9xH3SZhyD/t67f/xo7Azp6NkGUVXSnHLGdkmIg+qrYgz5A==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-linux-arm64@12.0.0: - resolution: {integrity: sha512-n2LJg6eAZENUcJF99wjDeqQCr/40IqGUJDbX7NwiU1RvCy+RBZNmhcmSAaKOc6rCoLUcM9W5q+H4jfn4bWfJBA==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-linux-x64@12.0.0: - resolution: {integrity: sha512-VuQO4eOrKmfrLrc8KzMaZypz3i1rD9FXRxwOFk6ha16DNHV+17dRQYm7jRZ1p+HrXdjAJYTScxR/E03yGLThlQ==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-win32-arm64@12.0.0: - resolution: {integrity: sha512-lvOh5/B8YuQdI2ieGJnJ6CUMZxvVwA8+1VDkEZJyl5IEF8AXzbXYx4k6SFA5a79cfXEL9tJuJy0rn+Zs/+1yJQ==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@rometools/cli-win32-x64@12.0.0: - resolution: {integrity: sha512-yTfz71k8+9QIDzglKnMbEMMv1JUk30qfeSomgEUG2v0qDSbSq0Gs1ff0H0dysYOHLvZZmWA3IheOY/SC8fj1nA==} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@rushstack/node-core-library@3.55.2(@types/node@18.14.1): - resolution: {integrity: sha512-SaLe/x/Q/uBVdNFK5V1xXvsVps0y7h1sN7aSJllQyFbugyOaxhNRF25bwEDnicARNEjJw0pk0lYnJQ9Kr6ev0A==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - dependencies: - '@types/node': 18.14.1 - colors: 1.2.5 - fs-extra: 7.0.1 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.1 - semver: 7.3.8 - z-schema: 5.0.5 - dev: true - - /@rushstack/rig-package@0.3.18: - resolution: {integrity: sha512-SGEwNTwNq9bI3pkdd01yCaH+gAsHqs0uxfGvtw9b0LJXH52qooWXnrFTRRLG1aL9pf+M2CARdrA9HLHJys3jiQ==} - dependencies: - resolve: 1.22.1 - strip-json-comments: 3.1.1 - dev: true - - /@rushstack/ts-command-line@4.13.2: - resolution: {integrity: sha512-bCU8qoL9HyWiciltfzg7GqdfODUeda/JpI0602kbN5YH22rzTxyqYvv7aRLENCM7XCQ1VRs7nMkEqgJUOU8Sag==} - dependencies: - '@types/argparse': 1.0.38 - argparse: 1.0.10 - colors: 1.2.5 - string-argv: 0.3.1 - dev: true - - /@sveltejs/vite-plugin-svelte@2.0.3(svelte@3.55.1)(vite@4.1.4): - resolution: {integrity: sha512-o+cguBFdwIGtRbNkYOyqTM7KvRUffxh5bfK4oJsWKG2obu+v/cbpT03tJrGl58C7tRXo/aEC0/axN5FVHBj0nA==} - engines: {node: ^14.18.0 || >= 16} - peerDependencies: - svelte: ^3.54.0 - vite: ^4.0.0 - dependencies: - debug: 4.3.4 - deepmerge: 4.3.0 - kleur: 4.1.5 - magic-string: 0.29.0 - svelte: 3.55.1 - svelte-hmr: 0.15.1(svelte@3.55.1) - vite: 4.1.4(@types/node@18.14.1)(terser@5.16.5) - vitefu: 0.2.4(vite@4.1.4) - transitivePeerDependencies: - - supports-color - dev: true - - /@types/argparse@1.0.38: - resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} - dev: true - - /@types/detect-indent@0.1.30: - resolution: {integrity: sha512-AUmj9JHuHTD94slY1WR1VulFxRGC6D1pcNCN0MCulKFyiihvV/28lLS8oRHgfmc2Cxq954J8Vmosa8qzm7PLGQ==} - dev: true - - /@types/eslint@8.21.3: - resolution: {integrity: sha512-fa7GkppZVEByMWGbTtE5MbmXWJTVbrjjaS8K6uQj+XtuuUv1fsuPAxhygfqLmsb/Ufb3CV8deFCpiMfAgi00Sw==} - dependencies: - '@types/estree': 1.0.0 - '@types/json-schema': 7.0.11 - dev: true - - /@types/estree@1.0.0: - resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} - dev: true - - /@types/glob@5.0.30: - resolution: {integrity: sha512-ZM05wDByI+WA153sfirJyEHoYYoIuZ7lA2dB/Gl8ymmpMTR78fNRtDMqa7Z6SdH4fZdLWZNRE6mZpx3XqBOrHw==} - dependencies: - '@types/minimatch': 5.1.2 - '@types/node': 18.14.1 - dev: true - - /@types/json-schema@7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} - dev: true - - /@types/minimatch@5.1.2: - resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - dev: true - - /@types/mkdirp@0.3.29: - resolution: {integrity: sha512-QRLQpFsIQGO2k8pupga9abfei85GKotAtQ+F6xuQmSGomUt6C52TyMiTFpP8kUwuPKr00gNtu3itLlC6gvI/NA==} - dev: true - - /@types/node@18.14.1: - resolution: {integrity: sha512-QH+37Qds3E0eDlReeboBxfHbX9omAcBCXEzswCu6jySP642jiM3cYSIkU/REqwhCUqXdonHFuBfJDiAJxMNhaQ==} - dev: true - - /@types/node@8.0.0: - resolution: {integrity: sha512-j2tekvJCO7j22cs+LO6i0kRPhmQ9MXaPZ55TzOc1lzkN5b6BWqq4AFjl04s1oRRQ1v5rSe+KEvnLUSTonuls/A==} - dev: true - - /@types/sanitize-filename@1.6.3: - resolution: {integrity: sha512-1dAV8Va7KsiXNAstV2JmF4CRVG3Fsyl+VnBw87C9cCMccekpOqJBezS7MUnHYPChNAFee1WakwBXdfn7QJxzVg==} - deprecated: This is a stub types definition. sanitize-filename provides its own type definitions, so you do not need this installed. - dependencies: - sanitize-filename: 1.6.3 - dev: true - - /@types/semver@7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} - dev: true - - /acorn-jsx@5.3.2(acorn@8.8.2): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - acorn: 8.8.2 - dev: true - - /acorn@8.8.2: - resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - dev: true - - /ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - dev: true - - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - dev: true - - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true - - /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - - /argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - - /asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - dev: true - - /axios@1.3.4: - resolution: {integrity: sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==} - dependencies: - follow-redirects: 1.15.2 - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - dev: true - - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: true - - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: true - - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true - - /callsites@4.0.0: - resolution: {integrity: sha512-y3jRROutgpKdz5vzEhWM34TidDU8vkJppF8dszITeb1PQmSqV3DTxyV8G/lyO/DNvtE1YTedehmw9MPZsCBHxQ==} - engines: {node: '>=12.20'} - dev: true - - /camelcase@3.0.0: - resolution: {integrity: sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==} - engines: {node: '>=0.10.0'} - dev: true - - /chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - - /chokidar@3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /cliui@3.2.0: - resolution: {integrity: sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==} - dependencies: - string-width: 1.0.2 - strip-ansi: 3.0.1 - wrap-ansi: 2.1.0 - dev: true - - /code-point-at@1.1.0: - resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} - engines: {node: '>=0.10.0'} - dev: true - - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: true - - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true - - /colors@1.2.5: - resolution: {integrity: sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==} - engines: {node: '>=0.1.90'} - dev: true - - /combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - dependencies: - delayed-stream: 1.0.0 - dev: true - - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: true - - /commander@9.5.0: - resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} - engines: {node: ^12.20.0 || >=14} - requiresBuild: true - dev: true - optional: true - - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true - - /cross-env@7.0.3: - resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} - engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} - hasBin: true - dependencies: - cross-spawn: 7.0.3 - dev: true - - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - dev: true - - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - dev: true - - /decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - dev: true - - /deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true - - /deepmerge@4.3.0: - resolution: {integrity: sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==} - engines: {node: '>=0.10.0'} - dev: true - - /delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - dev: true - - /detect-indent@0.2.0: - resolution: {integrity: sha512-C6jyrDu/eGH4KT0ZxAzijiH+ts5YLy7DqGFoDuHGxZjMOdjzRltp3jByySnpFBVIy4Em0ZkLN8tIV6mcREdw5A==} - engines: {node: '>=0.10.0'} - hasBin: true - dependencies: - get-stdin: 0.1.0 - minimist: 0.1.0 - dev: true - - /doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dependencies: - esutils: 2.0.3 - dev: true - - /dts-bundle@0.7.3: - resolution: {integrity: sha512-EEAEuPRk8QyKhoN90NHTh+spSQujkkvOnKWUfuzpmC/fgryiWopL1SegSktx0UsoPfNidIGVDN7/AXpBDBv0WQ==} - engines: {node: '>= 0.10.0'} - hasBin: true - dependencies: - '@types/detect-indent': 0.1.30 - '@types/glob': 5.0.30 - '@types/mkdirp': 0.3.29 - '@types/node': 8.0.0 - commander: 2.20.3 - detect-indent: 0.2.0 - glob: 6.0.4 - mkdirp: 0.5.6 - dev: true - - /dts-dom@3.7.0: - resolution: {integrity: sha512-WnmiiHfhtcYS+DyGd2Rq3J6QA3ATVBdKtlrhutc/VzQVFoBgNDm+gnYc5gZizsXAI0xQ2frZntT5IJFeB2qQIg==} - dev: true - - /dts-gen@0.6.1: - resolution: {integrity: sha512-0YXXhpP00T9BGj/szN1quCHYdQb+/gIe1H2NB9A4gc90SYWHAJbSB6XaStsy9B+3+RPhDzYDTmP4OaCIHiTDNw==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - dts-dom: 3.7.0 - parse-git-config: 1.1.1 - typescript: 3.9.10 - yargs: 4.8.1 - dev: true - - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - - /esbuild@0.16.17: - resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.16.17 - '@esbuild/android-arm64': 0.16.17 - '@esbuild/android-x64': 0.16.17 - '@esbuild/darwin-arm64': 0.16.17 - '@esbuild/darwin-x64': 0.16.17 - '@esbuild/freebsd-arm64': 0.16.17 - '@esbuild/freebsd-x64': 0.16.17 - '@esbuild/linux-arm': 0.16.17 - '@esbuild/linux-arm64': 0.16.17 - '@esbuild/linux-ia32': 0.16.17 - '@esbuild/linux-loong64': 0.16.17 - '@esbuild/linux-mips64el': 0.16.17 - '@esbuild/linux-ppc64': 0.16.17 - '@esbuild/linux-riscv64': 0.16.17 - '@esbuild/linux-s390x': 0.16.17 - '@esbuild/linux-x64': 0.16.17 - '@esbuild/netbsd-x64': 0.16.17 - '@esbuild/openbsd-x64': 0.16.17 - '@esbuild/sunos-x64': 0.16.17 - '@esbuild/win32-arm64': 0.16.17 - '@esbuild/win32-ia32': 0.16.17 - '@esbuild/win32-x64': 0.16.17 - dev: true - - /escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true - - /eslint-scope@7.2.0: - resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: true - - /eslint-visitor-keys@3.4.0: - resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /eslint@8.38.0: - resolution: {integrity: sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.38.0) - '@eslint-community/regexpp': 4.5.0 - '@eslint/eslintrc': 2.0.2 - '@eslint/js': 8.38.0 - '@humanwhocodes/config-array': 0.11.8 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.0 - espree: 9.5.1 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.20.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.4 - import-fresh: 3.3.0 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-sdsl: 4.4.0 - 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.1 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - dev: true - - /espree@9.5.1: - resolution: {integrity: sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.8.2 - acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.4.0 - dev: true - - /esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - engines: {node: '>=0.10'} - dependencies: - estraverse: 5.3.0 - dev: true - - /esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - dependencies: - estraverse: 5.3.0 - dev: true - - /estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - dev: true - - /estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: true - - /esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true - - /extend-shallow@2.0.1: - resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} - engines: {node: '>=0.10.0'} - dependencies: - is-extendable: 0.1.1 - dev: true - - /fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true - - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true - - /fast-levenshtein@2.0.6: - resolution: {integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=} - dev: true - - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} - dependencies: - reusify: 1.0.4 - dev: true - - /file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flat-cache: 3.0.4 - dev: true - - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: true - - /find-up@1.1.2: - resolution: {integrity: sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==} - engines: {node: '>=0.10.0'} - dependencies: - path-exists: 2.1.0 - pinkie-promise: 2.0.1 - dev: true - - /find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true - - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flatted: 3.2.7 - rimraf: 3.0.2 - dev: true - - /flatted@3.2.7: - resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - dev: true - - /follow-redirects@1.15.2: - resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dev: true - - /form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - dev: true - - /fs-exists-sync@0.1.0: - resolution: {integrity: sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==} - engines: {node: '>=0.10.0'} - dev: true - - /fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} - dependencies: - graceful-fs: 4.2.10 - jsonfile: 4.0.0 - universalify: 0.1.2 - dev: true - - /fs.realpath@1.0.0: - resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} - dev: true - - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true - - /get-caller-file@1.0.3: - resolution: {integrity: sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==} - dev: true - - /get-stdin@0.1.0: - resolution: {integrity: sha512-/WBu3IaQZxE3bs3BhBmR10ipDY4pjN+U4EZgXULa1eqKA0B/Lka/MVoAqhTVYBkkRlCrEGDOU9itrzIgm9Ksng==} - engines: {node: '>=0.10.0'} - dev: true - - /git-config-path@1.0.1: - resolution: {integrity: sha512-KcJ2dlrrP5DbBnYIZ2nlikALfRhKzNSX0stvv3ImJ+fvC4hXKoV+U+74SV0upg+jlQZbrtQzc0bu6/Zh+7aQbg==} - engines: {node: '>=0.10.0'} - dependencies: - extend-shallow: 2.0.1 - fs-exists-sync: 0.1.0 - homedir-polyfill: 1.0.3 - dev: true - - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob@6.0.4: - resolution: {integrity: sha512-MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A==} - dependencies: - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 - dev: true - - /graceful-fs@4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} - dev: true - - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - dev: true - - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true - - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: true - - /homedir-polyfill@1.0.3: - resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==} - engines: {node: '>=0.10.0'} - dependencies: - parse-passwd: 1.0.0 - dev: true - - /hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: true - - /hotkeys-js@3.10.1: - resolution: {integrity: sha512-mshqjgTqx8ee0qryHvRgZaZDxTwxam/2yTQmQlqAWS3+twnq1jsY9Yng9zB7lWq6WRrjTbTOc7knNwccXQiAjQ==} - dev: true - - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} - engines: {node: '>= 4'} - dev: true - - /import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - dev: true - - /import-lazy@4.0.0: - resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} - engines: {node: '>=8'} - dev: true - - /imurmurhash@0.1.4: - resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} - engines: {node: '>=0.8.19'} - dev: true - - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - dev: true - - /inversify@6.0.1: - resolution: {integrity: sha512-B3ex30927698TJENHR++8FfEaJGqoWOgI6ZY5Ht/nLUsFCwHn6akbwtnUAPCgUepAnTpe2qHxhDNjoKLyz6rgQ==} - dev: true - - /invert-kv@1.0.0: - resolution: {integrity: sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==} - engines: {node: '>=0.10.0'} - dev: true - - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true - - /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - dev: true - - /is-core-module@2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} - dependencies: - has: 1.0.3 - dev: true - - /is-extendable@0.1.1: - resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} - engines: {node: '>=0.10.0'} - dev: true - - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - dev: true - - /is-fullwidth-code-point@1.0.0: - resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} - engines: {node: '>=0.10.0'} - dependencies: - number-is-nan: 1.0.1 - dev: true - - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: true - - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: true - - /is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: true - - /is-utf8@0.2.1: - resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} - dev: true - - /isexe@2.0.0: - resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=} - dev: true - - /jju@1.4.0: - resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - dev: true - - /js-sdsl@4.4.0: - resolution: {integrity: sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==} - dev: true - - /js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - - /json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true - - /json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=} - dev: true - - /jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - optionalDependencies: - graceful-fs: 4.2.10 - dev: true - - /kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - dev: true - - /lcid@1.0.0: - resolution: {integrity: sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==} - engines: {node: '>=0.10.0'} - dependencies: - invert-kv: 1.0.0 - dev: true - - /levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - dev: true - - /load-json-file@1.1.0: - resolution: {integrity: sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==} - engines: {node: '>=0.10.0'} - dependencies: - graceful-fs: 4.2.10 - parse-json: 2.2.0 - pify: 2.3.0 - pinkie-promise: 2.0.1 - strip-bom: 2.0.0 - dev: true - - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - dependencies: - p-locate: 5.0.0 - dev: true - - /lodash.assign@4.2.0: - resolution: {integrity: sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==} - dev: true - - /lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - dev: true - - /lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - dev: true - - /lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true - - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true - - /loglevel-plugin-prefix@0.8.4: - resolution: {integrity: sha512-WpG9CcFAOjz/FtNht+QJeGpvVl/cdR6P0z6OcXSkr8wFJOsV2GRj2j10JLfjuA4aYkcKCNIEqRGCyTife9R8/g==} - dev: true - - /loglevel@1.8.1: - resolution: {integrity: sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==} - engines: {node: '>= 0.6.0'} - dev: true - - /lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - dev: true - - /magic-string@0.29.0: - resolution: {integrity: sha512-WcfidHrDjMY+eLjlU+8OvwREqHwpgCeKVBUpQ3OhYYuvfaYCUgcbuBzappNzZvg/v8onU3oQj+BYpkOJe9Iw4Q==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/sourcemap-codec': 1.4.14 - dev: true - - /mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - dev: true - - /mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - dependencies: - mime-db: 1.52.0 - dev: true - - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimist@0.1.0: - resolution: {integrity: sha512-wR5Ipl99t0mTGwLjQJnBjrP/O7zBbLZqvA3aw32DmLx+nXHfWctUjzDjnDx09pX1Po86WFQazF9xUzfMea3Cnw==} - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true - - /mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - dependencies: - minimist: 1.2.8 - dev: true - - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true - - /nanoid@3.3.4: - resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - - /natural-compare@1.4.0: - resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} - dev: true - - /normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.1 - semver: 5.7.1 - validate-npm-package-license: 3.0.4 - dev: true - - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /number-is-nan@1.0.1: - resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} - engines: {node: '>=0.10.0'} - dev: true - - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /optionator@0.9.1: - resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} - engines: {node: '>= 0.8.0'} - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.3 - dev: true - - /os-locale@1.4.0: - resolution: {integrity: sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==} - engines: {node: '>=0.10.0'} - dependencies: - lcid: 1.0.0 - dev: true - - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true - - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true - - /parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - dependencies: - callsites: 3.1.0 - dev: true - - /parse-git-config@1.1.1: - resolution: {integrity: sha512-S3LGXJZVSy/hswvbSkfdbKBRVsnqKrVu6j8fcvdtJ4TxosSELyQDsJPuGPXuZ+EyuYuJd3O4uAF8gcISR0OFrQ==} - engines: {node: '>=0.10.0'} - dependencies: - extend-shallow: 2.0.1 - fs-exists-sync: 0.1.0 - git-config-path: 1.0.1 - ini: 1.3.8 - dev: true - - /parse-json@2.2.0: - resolution: {integrity: sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==} - engines: {node: '>=0.10.0'} - dependencies: - error-ex: 1.3.2 - dev: true - - /parse-passwd@1.0.0: - resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==} - engines: {node: '>=0.10.0'} - dev: true - - /path-exists@2.1.0: - resolution: {integrity: sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==} - engines: {node: '>=0.10.0'} - dependencies: - pinkie-promise: 2.0.1 - dev: true - - /path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true - - /path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true - - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - dev: true - - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /path-type@1.1.0: - resolution: {integrity: sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==} - engines: {node: '>=0.10.0'} - dependencies: - graceful-fs: 4.2.10 - pify: 2.3.0 - pinkie-promise: 2.0.1 - dev: true - - /picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true - - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: true - - /pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - dev: true - - /pinkie-promise@2.0.1: - resolution: {integrity: sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==} - engines: {node: '>=0.10.0'} - dependencies: - pinkie: 2.0.4 - dev: true - - /pinkie@2.0.4: - resolution: {integrity: sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==} - engines: {node: '>=0.10.0'} - dev: true - - /postcss@8.4.21: - resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.4 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - - /prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - dev: true - - /proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - dev: true - - /punycode@2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} - engines: {node: '>=6'} - dev: true - - /queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: true - - /read-pkg-up@1.0.1: - resolution: {integrity: sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==} - engines: {node: '>=0.10.0'} - dependencies: - find-up: 1.1.2 - read-pkg: 1.1.0 - dev: true - - /read-pkg@1.1.0: - resolution: {integrity: sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==} - engines: {node: '>=0.10.0'} - dependencies: - load-json-file: 1.1.0 - normalize-package-data: 2.5.0 - path-type: 1.1.0 - dev: true - - /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - - /reflect-metadata@0.1.13: - resolution: {integrity: sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==} - dev: true - - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true - - /require-main-filename@1.0.1: - resolution: {integrity: sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==} - dev: true - - /resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true - - /resolve@1.19.0: - resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} - dependencies: - is-core-module: 2.11.0 - path-parse: 1.0.7 - dev: true - - /resolve@1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} - hasBin: true - dependencies: - is-core-module: 2.11.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true - - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - - /rollup@2.79.1: - resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} - engines: {node: '>=10.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /rollup@3.17.2: - resolution: {integrity: sha512-qMNZdlQPCkWodrAZ3qnJtvCAl4vpQ8q77uEujVCCbC/6CLB7Lcmvjq7HyiOSnf4fxTT9XgsE36oLHJBH49xjqA==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /rome@12.0.0: - resolution: {integrity: sha512-w/tLvLj5PGUCx3R+Kna08BMq4zL83Xzh9spvrqoWa3Nkzk16SkD8JSpyWWP9WhI2r3qv3Xvc7FnYZ4QDnjAiYg==} - engines: {node: '>=14.*'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@rometools/cli-darwin-arm64': 12.0.0 - '@rometools/cli-darwin-x64': 12.0.0 - '@rometools/cli-linux-arm64': 12.0.0 - '@rometools/cli-linux-x64': 12.0.0 - '@rometools/cli-win32-arm64': 12.0.0 - '@rometools/cli-win32-x64': 12.0.0 - dev: true - - /run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - dependencies: - queue-microtask: 1.2.3 - dev: true - - /sanitize-filename@1.6.3: - resolution: {integrity: sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==} - dependencies: - truncate-utf8-bytes: 1.0.2 - dev: true - - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} - hasBin: true - dev: true - - /semver@7.3.8: - resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - - /set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: true - - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - dependencies: - shebang-regex: 3.0.0 - dev: true - - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true - - /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - dev: true - - /source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - - /spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.12 - dev: true - - /spdx-exceptions@2.3.0: - resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - dev: true - - /spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - dependencies: - spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.12 - dev: true - - /spdx-license-ids@3.0.12: - resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} - dev: true - - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true - - /string-argv@0.3.1: - resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} - engines: {node: '>=0.6.19'} - dev: true - - /string-width@1.0.2: - resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} - engines: {node: '>=0.10.0'} - dependencies: - code-point-at: 1.1.0 - is-fullwidth-code-point: 1.0.0 - strip-ansi: 3.0.1 - dev: true - - /strip-ansi@3.0.1: - resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} - engines: {node: '>=0.10.0'} - dependencies: - ansi-regex: 2.1.1 - dev: true - - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - dev: true - - /strip-bom@2.0.0: - resolution: {integrity: sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==} - engines: {node: '>=0.10.0'} - dependencies: - is-utf8: 0.2.1 - dev: true - - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true - - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: true - - /supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true - - /svelte-hmr@0.15.1(svelte@3.55.1): - resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==} - engines: {node: ^12.20 || ^14.13.1 || >= 16} - peerDependencies: - svelte: '>=3.19.0' - dependencies: - svelte: 3.55.1 - dev: true - - /svelte@3.55.1: - resolution: {integrity: sha512-S+87/P0Ve67HxKkEV23iCdAh/SX1xiSfjF1HOglno/YTbSTW7RniICMCofWGdJJbdjw3S+0PfFb1JtGfTXE0oQ==} - engines: {node: '>= 8'} - dev: true - - /terser@5.16.5: - resolution: {integrity: sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@jridgewell/source-map': 0.3.2 - acorn: 8.8.2 - commander: 2.20.3 - source-map-support: 0.5.21 - dev: true - - /text-table@0.2.0: - resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=} - dev: true - - /to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: true - - /truncate-utf8-bytes@1.0.2: - resolution: {integrity: sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==} - dependencies: - utf8-byte-length: 1.0.4 - dev: true - - /type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.2.1 - dev: true - - /type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - dev: true - - /typescript@3.9.10: - resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - - /typescript@4.8.4: - resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: true - - /typescript@5.0.3: - resolution: {integrity: sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA==} - engines: {node: '>=12.20'} - hasBin: true - dev: true - - /universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - dev: true - - /uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - dependencies: - punycode: 2.3.0 - dev: true - - /utf8-byte-length@1.0.4: - resolution: {integrity: sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA==} - dev: true - - /validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - dependencies: - spdx-correct: 3.2.0 - spdx-expression-parse: 3.0.1 - dev: true - - /validator@13.9.0: - resolution: {integrity: sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==} - engines: {node: '>= 0.10'} - dev: true - - /vite-plugin-css-injected-by-js@3.1.0(vite@4.1.4): - resolution: {integrity: sha512-qogCmpocZfcbSAYZQjS88ieIY0PzLUm7RkLFWFgAxkXdz3N6roZbSTNTxeIOj5IxFbZWACUPuVBBoo6qCuXDcw==} - peerDependencies: - vite: '>2.0.0-0' - dependencies: - vite: 4.1.4(@types/node@18.14.1)(terser@5.16.5) - dev: true - - /vite-plugin-eslint@1.8.1(eslint@8.38.0)(vite@4.1.4): - resolution: {integrity: sha512-PqdMf3Y2fLO9FsNPmMX+//2BF5SF8nEWspZdgl4kSt7UvHDRHVVfHvxsD7ULYzZrJDGRxR81Nq7TOFgwMnUang==} - peerDependencies: - eslint: '>=7' - vite: '>=2' - dependencies: - '@rollup/pluginutils': 4.2.1 - '@types/eslint': 8.21.3 - eslint: 8.38.0 - rollup: 2.79.1 - vite: 4.1.4(@types/node@18.14.1)(terser@5.16.5) - dev: true - - /vite-plugin-replace@0.1.1(vite@4.1.4): - resolution: {integrity: sha512-v+okl3JNt2pf1jDYijw+WPVt6h9FWa/atTi+qnSFBqmKThLTDhlesx0r3bh+oFPmxRJmis5tNx9HtN6lGFoqWg==} - peerDependencies: - vite: ^2 - dependencies: - vite: 4.1.4(@types/node@18.14.1)(terser@5.16.5) - dev: true - - /vite@4.1.4(@types/node@18.14.1)(terser@5.16.5): - resolution: {integrity: sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 18.14.1 - esbuild: 0.16.17 - postcss: 8.4.21 - resolve: 1.22.1 - rollup: 3.17.2 - terser: 5.16.5 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /vitefu@0.2.4(vite@4.1.4): - resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 - peerDependenciesMeta: - vite: - optional: true - dependencies: - vite: 4.1.4(@types/node@18.14.1)(terser@5.16.5) - dev: true - - /which-module@1.0.0: - resolution: {integrity: sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==} - dev: true - - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - - /window-size@0.2.0: - resolution: {integrity: sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==} - engines: {node: '>= 0.10.0'} - hasBin: true - dev: true - - /word-wrap@1.2.3: - resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} - engines: {node: '>=0.10.0'} - dev: true - - /wrap-ansi@2.1.0: - resolution: {integrity: sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==} - engines: {node: '>=0.10.0'} - dependencies: - string-width: 1.0.2 - strip-ansi: 3.0.1 - dev: true - - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /y18n@3.2.2: - resolution: {integrity: sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==} - dev: true - - /yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: true - - /yargs-parser@2.4.1: - resolution: {integrity: sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA==} - dependencies: - camelcase: 3.0.0 - lodash.assign: 4.2.0 - dev: true - - /yargs@4.8.1: - resolution: {integrity: sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==} - dependencies: - cliui: 3.2.0 - decamelize: 1.2.0 - get-caller-file: 1.0.3 - lodash.assign: 4.2.0 - os-locale: 1.4.0 - read-pkg-up: 1.0.1 - require-directory: 2.1.1 - require-main-filename: 1.0.1 - set-blocking: 2.0.0 - string-width: 1.0.2 - which-module: 1.0.0 - window-size: 0.2.0 - y18n: 3.2.2 - yargs-parser: 2.4.1 - dev: true - - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true - - /z-schema@5.0.5: - resolution: {integrity: sha512-D7eujBWkLa3p2sIpJA0d1pr7es+a7m0vFAnZLlCEKq/Ij2k0MLi9Br2UPxoxdYystm5K1yeBGzub0FlYUEWj2Q==} - engines: {node: '>=8.0.0'} - hasBin: true - dependencies: - lodash.get: 4.4.2 - lodash.isequal: 4.5.0 - validator: 13.9.0 - optionalDependencies: - commander: 9.5.0 - dev: true - - /zhi-env@1.10.0: - resolution: {integrity: sha512-CqyIOlAV1QZ3SiBZu2UP63OAD+wAxyJ9DW3u1MsEmFwAfBC69IDGXRp5TU33IQ32DWKqm95+CkFoTjb1r87OhQ==} - dev: true - - /zhi-log@1.6.1: - resolution: {integrity: sha512-BXXQ2FMqNKFotLLPUDyxtz74ZJl8Ihzxz6ZE8H3dTdc58GW5DLARN4jcyAq4EDGTRyzkrmCMsPG3Gf62tG+1kw==} - dependencies: - callsites: 4.0.0 - loglevel: 1.8.1 - loglevel-plugin-prefix: 0.8.4 - zhi-env: 1.10.0 - dev: true diff --git a/app/PSP/rome.json b/app/PSP/rome.json deleted file mode 100644 index c9e4bc7b6e..0000000000 --- a/app/PSP/rome.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "./node_modules/rome/configuration_schema.json", - "formatter": { - "enabled": true, - "indentStyle": "space", - "indentSize": 2, - "lineWidth": 120, - "formatWithErrors": true - }, - "javascript": { - "formatter": { - "quoteStyle": "single" - } - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "suspicious": { - "noExplicitAny": "off", - "noAsyncPromiseExecutor": "off" - }, - "performance": { "noDelete": "warn" }, - "style": { "useTemplate": "warn","useConst":"warn","noVar":"warn" }, - "complexity": { "useSimplifiedLogicExpression": "warn" }, - "correctness": { "noUnreachable": "warn" } - } - } -} \ No newline at end of file diff --git a/app/PSP/src/api.ts b/app/PSP/src/api.ts deleted file mode 100644 index a37bf211c6..0000000000 --- a/app/PSP/src/api.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as serverApi from './api/server-api'; -import * as clientApi from './api/client-api'; -import { Menu, MenuItem, MenuSeparator } from './internal/classes/menu'; -import { Dialog } from './internal/classes/dialog'; -import { Notification } from './internal/classes/notification'; -import { Plugin } from './api/plugin'; - -export { clientApi, serverApi, Menu, MenuItem, MenuSeparator, Notification, Dialog, Plugin }; - -export default { - clientApi, - serverApi, - Plugin, - Menu, - MenuItem, - MenuSeparator, - Notification, - Dialog, -}; diff --git a/app/PSP/src/api/client-api.ts b/app/PSP/src/api/client-api.ts deleted file mode 100644 index 85dfd8e439..0000000000 --- a/app/PSP/src/api/client-api.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { getLogger } from '../util'; - -function insertBefore(positionEl: Element, el: Element) { - return positionEl.insertAdjacentElement('beforebegin', el); -} - -function insertAfter(positionEl: Element, el: Element) { - return positionEl.insertAdjacentElement('afterend', el); -} - -export function addToolbarLeft(el: Element) { - const title = document.getElementById('toolbar')?.getElementsByClassName('fn__ellipsis'); - if (!title) { - return; - } - insertBefore(title[0], el); -} - -export function addToolbarRight(el: Element) { - const title = document.getElementById('toolbar')?.getElementsByClassName('fn__ellipsis'); - if (!title) { - return; - } - insertAfter(title[0], el); -} - -export const createLogger = (name: string) => getLogger(name); diff --git a/app/PSP/src/api/file-api.ts b/app/PSP/src/api/file-api.ts deleted file mode 100644 index 1268060075..0000000000 --- a/app/PSP/src/api/file-api.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { serverApi } from '../api'; -import { log } from '../util'; -import { Stats } from 'fs'; -import semver from 'semver'; - -export class FileClient { - static fileClient: FileClient; - - getVersion() { - return window.siyuan.config.system.kernelVersion; - } - - fileApi: { - readDir: (path: string) => Promise>; - getFile: (path: string, type?: 'json' | 'text') => Promise; - putFile: (path, filedata, isDir?: boolean, modTime?: number) => Promise; - removeFile: (path: string) => Promise; - }; - - private constructor() { - this.fileApi = this.serverApi; - // const v = this.getVersion(); - // if (semver.compare(v, '2.8.1') < 0) { - // // old version, electron api support - // this.fileApi = this.electronApi; - // } else { - // // new api, file api support - // this.fileApi = this.serverApi; - // } - } - - static getInstanceApi() { - if (!this.fileClient) { - this.fileClient = new FileClient(); - } - return this.fileClient; - } - - electronApi = { - readDir(p: string): Promise> { - const fs = window.require('fs'); - const path = window.require('path'); - const SIYUAN_WORKSPACE = path.join(window.siyuan.config.system.dataDir, '..'); - return new Promise((resolve) => { - fs.readdir(path.join(SIYUAN_WORKSPACE, p), (err, files: string[]) => { - if (err) { - resolve([]); - return; - } - const result = files.map<{ isDir: boolean; name: string }>((f: string) => ({ - isDir: (fs.statSync(path.join(SIYUAN_WORKSPACE, p, f)) as Stats).isDirectory(), - name: f, - })); - resolve(result); - }); - }); - }, - getFile(f: string, type: 'json' | 'text' = 'text') { - return new Promise((resolve, reject) => { - const fs = window.require('fs'); - const path = window.require('path'); - const SIYUAN_WORKSPACE = path.join(window.siyuan.config.system.dataDir, '..'); - fs.readFile(path.join(SIYUAN_WORKSPACE, f), (err, data) => { - if (err) { - return reject(err); - } - const text = data.toString('utf8'); - if (type === 'json') { - try { - return resolve(JSON.parse(text)); - } catch (e) { - reject(e); - return; - } - } - return resolve(text); - }); - }); - }, - putFile: serverApi.putFile, - removeFile(f: string): Promise { - return new Promise((resolve, reject) => { - const fs = window.require('fs'); - const path = window.require('path'); - const SIYUAN_WORKSPACE = path.join(window.siyuan.config.system.dataDir, '..'); - const p = path.join(SIYUAN_WORKSPACE, f); - log('Remove files from', p); - fs.rm(p, { recursive: true, force: true }, (err) => { - if (err) { - return reject(err); - } - resolve(null); - }); - }); - }, - }; - - serverApi = { - readDir: serverApi.readDir, - getFile: serverApi.getFile, - putFile: serverApi.putFile, - removeFile: serverApi.removeFile, - }; -} diff --git a/app/PSP/src/api/plugin.ts b/app/PSP/src/api/plugin.ts deleted file mode 100644 index e9004a03d7..0000000000 --- a/app/PSP/src/api/plugin.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-disable */ -import { IPlugin, IPluginCommand, SettingRender } from '../types'; - -export class Plugin implements IPlugin { - _id: string; - onload() {} - onunload() {} - registerCommand(command: IPluginCommand) {} - registerSettingRender(settingRender: SettingRender) {} - async loadStorage(filename: string) { - return null; - } - async writeStorage(filename: string, content: any) {} -} diff --git a/app/PSP/src/api/server-api.ts b/app/PSP/src/api/server-api.ts deleted file mode 100644 index 85036a7d13..0000000000 --- a/app/PSP/src/api/server-api.ts +++ /dev/null @@ -1,550 +0,0 @@ -/* eslint-disable */ -import { config } from '../config'; -import { genUUID } from '../util'; - -export async function request(url, data) { - let resData = null; - await fetch(url, { - body: JSON.stringify(data), - method: 'POST', - headers: { - Authorization: `Token ${config().token}`, - }, - }).then(function (response) { - resData = response.json(); - }); - return resData; -} - -export async function parseBody(response) { - let r = await response; - return r.code === 0 ? r.data : null; -} - -export async function transactions(protyle, transactions = []) { - const url = '/api/transactions'; - const ws_url = new URL(protyle.ws.ws.url); - const data = { - app: ws_url.searchParams.get('app'), - session: ws_url.searchParams.get('id'), - transactions: transactions, - }; - return parseBody(request(url, data)); -} - -export async function sql(sql) { - let sqldata = { - stmt: sql, - }; - let url = '/api/query/sql'; - return parseBody(request(url, sqldata)); -} - -export async function lsNotebooks(sql) { - let sqldata = { stmt: sql }; - let url = '/api/notebook/lsNotebooks'; - return parseBody(request(url, sqldata)); -} - -export async function getAnchor(anchorText, name) { - anchorText = anchorText.replace('((', '').replace('))', ''); - let sqlScript = `select * from blocks where id = '${anchorText}'`; - let sqlRes = await sql(sqlScript); - let anchor = ''; - if (sqlRes) { - try { - if (sqlRes[0][name]) { - anchor = sqlRes[0][name]; - } else if (sqlRes[0]['content']) { - anchor = sqlRes[0]['content']; - } else { - anchor = anchorText; - } - } catch (e) { - anchor = '解析错误'; - } - } - return anchor; -} - -export async function openNotebook(notebookId) { - let data = { - notebook: notebookId, - }; - let url = '/api/notebook/openNotebook'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function closeNotebook(notebookId) { - let data = { - notebook: notebookId, - }; - let url = '/api/notebook/closeNotebook'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function renameNotebook(notebookId, notebookNewName) { - let data = { - notebook: notebookId, - name: notebookNewName, - }; - let url = '/api/notebook/renameNotebook'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function createNotebook(notebookName) { - let data = { - name: notebookName, - }; - let url = '/api/notebook/createNotebook'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function removeNotebook(notebookId) { - let data = { notebook: notebookId }; - let url = '/api/notebook/removeNotebook'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function getNotebookConf(notebookId) { - let data = { notebook: notebookId }; - let url = '/api/notebook/getNotebookConf'; - return parseBody(request(url, data)); - //返回笔记本配置 -} - -export async function setNotebookConf(notebookId) { - let data = { notebook: notebookId }; - let url = '/api/notebook/setNotebookConf'; - return parseBody(request(url, data)); - //返回笔记本配置 -} - -export async function renameDoc(notebookId, path, title) { - let data = { - notebook: notebookId, - path: path, - title: title, - }; - let url = '/api/filetree/renameDoc'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function removeDoc(notebookId, path) { - let data = { - notebook: notebookId, - path: path, - }; - let url = '/api/filetree/removeDoc'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function moveDoc(srcNotebookId, srcPath, targetNotebookId, targetPath) { - let data = { - fromNotebook: srcNotebookId, - fromPath: srcPath, - toNotebook: targetNotebookId, - toPath: targetPath, - }; - let url = '/api/filetree/moveDoc'; - return parseBody(request(url, data)); - //返回空数据 -} - -export async function getHPathByPath(notebookId, path) { - let data = { - Notebook: notebookId, - Path: path, - }; - let url = '/api/filetree/getHPathByPath'; - return parseBody(request(url, data)); - //返回路径 -} - -export async function getHPathByID(ID) { - let data = { - id: ID, - }; - let url = '/api/filetree/getHPathByID'; - return parseBody(request(url, data)); -} - -//暂缺上传文件 - -export async function getBlockAttrs(blockId) { - let data = { - id: blockId, - }; - let url = '/api/attr/getBlockAttrs'; - return parseBody(request(url, data)); -} - -export async function getBlockByID(blockId) { - let sqlScript = `select * from blocks where id ='${blockId}'`; - let data = await sql(sqlScript); - return data[0]; -} - -export async function getBlockKramdown(blockId) { - const data = { - id: blockId, - }; - const url = '/api/block/getBlockKramdown'; - return parseBody(request(url, data)); -} - -export async function getBlockBreadcrumb(ID) { - const data = { - id: ID, - }; - const url = '/api/block/getBlockBreadcrumb'; - return parseBody(request(url, data)); -} - -export async function setBlockAttrs(blockId, attrs) { - let url = '/api/attr/setBlockAttrs'; - return parseBody( - request(url, { - id: blockId, - attrs: attrs, - }) - ); -} - -export async function exportMdContent(docId) { - let data = { - id: docId, - }; - let url = '/api/export/exportMdContent'; - return parseBody(request(url, data)); - //文档hepath与Markdown 内容 -} - -export async function getDocOutline(docId) { - let data = { - id: docId, - }; - let url = '/api/outline/getDocOutline'; - return parseBody(request(url, data)); -} - -export async function listDocsByPath(path) { - let data = { - path: path, - }; - let url = '/api/filetree/listDocsByPath'; - return parseBody(request(url, data)); - //文档hepath与Markdown 内容 -} - -function html转义(text) { - var tempEl = document.createElement('div'); - tempEl.innerHTML = text; - var output = tempEl.innerText || tempEl.textContent; - tempEl = null; - return output; -} - -export async function getBacklink(id) { - let data = { - id: id, - beforeLen: 10, - k: '', - mk: '', - }; - let url = '/api/ref/getBacklink'; - return parseBody(request(url, data)); -} - -export async function searchEmbedBlock(excludeIds, sql) { - let data = { - stmt: sql, - excludeIDs: excludeIds, - }; - let url = '/api/search/searchEmbedBlock'; - return parseBody(request(url, data)); -} -export async function getDoc(id) { - let data = { - id: id, - k: '', - mode: 2, - size: 36, - }; - let url = '/api/filetree/getDoc'; - return parseBody(request(url, data)); -} -export async function getFocusedDoc(id) { - let data = { - id: id, - k: '', - mode: 0, - size: 36, - }; - let url = '/api/filetree/getDoc'; - return parseBody(request(url, data)); -} -export async function getTag() { - let data = {}; - let url = '/api/tag/getTag'; - return parseBody(request(url, data)); -} -export async function getLocalGraph(k, id, conf, reqId) { - let data = { - id: id, - k: k, - conf: conf, - reqId: reqId, - }; - let url = '/api/graph/getLocalGraph'; - return parseBody(request(url, data)); -} -export async function getGraph(k, conf, reqId) { - let data = { - k: k, - conf: conf, - reqId: reqId, - }; - let url = '/api/graph/getGraph'; - return parseBody(request(url, data)); -} - -export async function searchDocs(k) { - let data = { - k: k, - }; - let url = '/api/filetree/searchDocs'; - return parseBody(request(url, data)); -} -export async function searchBlock(query) { - let data = { - query: query, - }; - let url = '/api/search/searchBlock'; - return parseBody(request(url, data)); -} -export async function searchTemplate(k) { - let data = { - k: k, - }; - let url = '/api/search/searchTemplate'; - return parseBody(request(url, data)); -} - -export async function createDocWithMd(notebook, path, markdown) { - let data = { - notebook: notebook, - path: path, - markdown: markdown, - }; - let url = '/api/filetree/createDocWithMd'; - return parseBody(request(url, data)); -} - -export async function docSaveAsTemplate(id, overwrite = false) { - let url = '/api/template/docSaveAsTemplate'; - let data = { - id: id, - overwrite: overwrite, - }; - return parseBody(request(url, data)); -} - -export async function render(data) { - let url = '/api/template/render'; - return parseBody(request(url, data)); -} - -export async function insertBlock(previousID, dataType, data) { - let url = '/api/block/insertBlock'; - return parseBody( - request( - (url = url), - (data = { - previousID: previousID, - dataType: dataType, - data: data, - }) - ) - ); -} - -export async function prependBlock(parentID, dataType, data) { - let url = '/api/block/prependBlock'; - return parseBody( - request( - (url = url), - (data = { - parentID: parentID, - dataType: dataType, - data: data, - }) - ) - ); -} -export async function appendBlock(parentID, dataType, data) { - let url = '/api/block/appendBlock'; - return parseBody( - request( - (url = url), - (data = { - parentID: parentID, - dataType: dataType, - data: data, - }) - ) - ); -} - -export async function updateBlock(id, dataType, data) { - let url = '/api/block/updateBlock'; - return parseBody( - request( - (url = url), - (data = { - id: id, - dataType: dataType, - data: data, - }) - ) - ); -} - -export async function deleteBlock(id) { - let url = '/api/block/deleteBlock'; - return parseBody(request(url, { id })); -} - -export async function moveBlock(id: string, previousID: string, parentID: string) { - let url = '/api/block/moveBlock'; - return parseBody( - request(url, { id: id, previousID: previousID, parentID: parentID }) - ); -} - -export async function getSysFonts() { - let url = '/api/system/getSysFonts'; - return parseBody(request(url, null)); -} - -export async function getFile(path: string, type: 'json' | 'text' = 'text') { - const response = await fetch('/api/file/getFile', { - method: 'POST', - headers: { - Authorization: `Token ${config().token}`, - }, - body: JSON.stringify({ - path: path, - }), - }); - if (response.status === 200) { - if (type === 'text') { - return await response.text(); - } - if (type === 'json') { - return (await response.json()).data; - } - } - return null; -} - -export async function putFile(path, filedata, isDir = false, modTime = Date.now()) { - let blob = new Blob([filedata]); - let file = new File([blob], path.split('/').pop()); - let formdata = new FormData(); - formdata.append('path', path); - formdata.append('file', file); - formdata.append('isDir', String(isDir)); - formdata.append('modTime', String(modTime)); - const response = await fetch('/api/file/putFile', { - body: formdata, - method: 'POST', - headers: { - Authorization: `Token ${config().token}`, - }, - }); - if (response.status === 200) return await response.json(); - else return null; -} - -export async function readDir(path: string) { - const response = await fetch('/api/file/readDir', { - method: 'POST', - headers: { - Authorization: `Token ${config().token}`, - }, - body: JSON.stringify({ - path: path, - }), - }); - if (response.status === 200) { - return (await response.json()).data; - }; - return null; -} - -export async function removeFile(path) { - const response = await fetch('/api/file/removeFile', { - method: 'POST', - headers: { - Authorization: `Token ${config().token}`, - }, - body: JSON.stringify({ - path: path, - }), - }); - if (response.status === 200) return; - else return null; -} - -const language = window.theme?.languageMode; - -export async function pushMsg(message = null, text = null, timeout = 7000) { - const url = '/api/notification/pushMsg'; - const data = { - msg: message ? message[language] || message.other : text, - timeout: timeout, - }; - return parseBody(request(url, data)); -} - -export async function pushErrMsg(message = null, text = null, timeout = 7000) { - const url = '/api/notification/pushErrMsg'; - const data = { - msg: message ? message[language] || message.other : text, - timeout: timeout, - }; - return parseBody(request(url, data)); -} - -export async function setStorageVal(key: string, val: any) { - const url = '/api/storage/setLocalStorageVal'; - const data = { - app: genUUID(), - key, - val, - }; - return parseBody(request(url, data)); -} - -export async function getLocalStorage() { - const url = '/api/storage/getLocalStorage'; - return parseBody(request(url, null)); -} - -export async function renderSprig(sprig: string) { - let url = '/api/template/renderSprig'; - return parseBody(request(url, {template: sprig})); -} - -export async function getBazzarWidget() { - const url = '/api/bazaar/getBazaarWidget'; - return parseBody(request(url, null)); -} diff --git a/app/PSP/src/config.ts b/app/PSP/src/config.ts deleted file mode 100644 index 1e84896e1f..0000000000 --- a/app/PSP/src/config.ts +++ /dev/null @@ -1,24 +0,0 @@ -export const PLUGIN_FOLDER = 'plugins'; - -export const VERSION = '__VERSION__'; - -// export const VERSION_URL = 'https://gitee.com/zuoez02/siyuan-plugin-system/raw/main/VERSION'; - -// export const SCRIPT_URL = 'https://gitee.com/zuoez02/siyuan-plugin-system/raw/main/main.js'; - -// export const PLUGIN_SYS_ABS_PATH = '/data/widgets/插件系统/plugin.js'; - -export const config = () => ({ token: window.siyuan.config.api.token }); - -export const TYPES = { - StorageManager: 'StorageManager', - PluginSystem: 'PluginSystem', - SystemManager: 'PluginSystemLocalManager', - PluginLoader: 'PluginLoader', - PluginFileManager: 'PluginFileManager', - EventBus: 'EventBus', - Shortcut: 'Shortcut', - CommandManager: 'CommandManager', - Store: 'Store', - SettingManager: 'SettingManager', -}; diff --git a/app/PSP/src/container.ts b/app/PSP/src/container.ts deleted file mode 100644 index 06a559a6be..0000000000 --- a/app/PSP/src/container.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Container } from 'inversify'; -import { StorageManager } from './core/storage-manager'; -import { PluginSystem } from './core'; -import { TYPES } from './config'; -import { SystemManager } from './core/system-manager'; -import { PluginLoader } from './core/loader'; -import { PluginFileManager } from './core/plugin-file-manager'; -import { - IStorageManager, - ISystemManager, - IPluginSystem, - IPluginLoader, - IPluginFileManager, - IEventBus, - IShortcut, - ICommandManager, - IStore, - ISettingManager, -} from './types'; -import { EventBus } from './core/event-bus'; -import { CommandManager } from './core/command-manager'; -import { Shortcut } from './core/shortcut'; -import { Store } from './core/store'; -import { SettingManager } from './core/setting-manager'; - -const container = new Container(); -container.bind(TYPES.StorageManager).to(StorageManager).inSingletonScope(); -container.bind(TYPES.SystemManager).to(SystemManager).inSingletonScope(); -container.bind(TYPES.PluginSystem).to(PluginSystem).inSingletonScope(); -container.bind(TYPES.PluginLoader).to(PluginLoader).inSingletonScope(); -container.bind(TYPES.PluginFileManager).to(PluginFileManager).inSingletonScope(); -container.bind(TYPES.EventBus).to(EventBus); -container.bind(TYPES.Shortcut).to(Shortcut).inSingletonScope(); -container.bind(TYPES.CommandManager).to(CommandManager).inSingletonScope(); -container.bind(TYPES.Store).to(Store).inSingletonScope(); -container.bind(TYPES.SettingManager).to(SettingManager).inSingletonScope(); - -export { container }; diff --git a/app/PSP/src/core/command-manager.ts b/app/PSP/src/core/command-manager.ts deleted file mode 100644 index c58594125c..0000000000 --- a/app/PSP/src/core/command-manager.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { TYPES } from '@/config'; -import { Command, ICommandManager } from '@/types'; -// rome-ignore lint/suspicious/noShadowRestrictedNames: -import { Error, log, Warning } from '@/util'; -import { inject, injectable } from 'inversify'; -import { Shortcut } from './shortcut'; - -@injectable() -export class CommandManager implements ICommandManager { - private shortcut: Shortcut; - private commandList: Command[]; - - public constructor(@inject(TYPES.Shortcut) shortcut) { - this.commandList = []; - this.shortcut = shortcut; - } - - public registerCommand(command: Command) { - if ( - this.commandList.some((com) => { - com.plugin === command.plugin && com.command === command.command; - }) - ) { - return new Error('Command is already registered, do not register command repeatly'); - } - if ( - command.shortcut && - this.commandList.some((com) => { - com.shortcut === command.shortcut; - }) - ) { - return new Warning('shortcut has already registered'); - } - this.commandList.push(command); - this.shortcut.registerKeyboardEventFromPlugin(command); - log(`Register plugin: ${command.plugin} command: ${command.command}`); - } - - public unregisterCommandByPlugin(plugin: string) { - for (let i = 0; i < this.commandList.length; i++) { - if (plugin === this.commandList[i].plugin) { - const com = this.commandList[i]; - log(`Unregister plugin: ${plugin} command: ${com.command}`); - this.commandList.splice(i, 1); - if (com.shortcut) { - this.shortcut.unregisterKeyboardEvent(com.shortcut); - } - } - } - } - - public unregisterCommand(command: Command) { - for (let i = 0; i < this.commandList.length; i++) { - if (command.command === this.commandList[i].command && command.plugin === this.commandList[i].plugin) { - this.commandList.splice(i, 1); - break; - } - } - this.shortcut.registerKeyboardEventFromPlugin(command); - } - - public getCommands(): Command[] { - return this.commandList; - } -} diff --git a/app/PSP/src/core/event-bus.ts b/app/PSP/src/core/event-bus.ts deleted file mode 100644 index 877f798f1a..0000000000 --- a/app/PSP/src/core/event-bus.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { IEventBus, Listener } from '@/types'; -import { injectable } from 'inversify'; - -@injectable() -export class EventBus implements IEventBus { - private eventListeners: { [key: string]: Listener[] }; - - constructor() { - this.eventListeners = {}; - } - - destroy() { - delete this.eventListeners; - } - - on(eventName: string, callback: Listener) { - if (!this.eventListeners[eventName]) { - this.eventListeners[eventName] = []; - } - this.eventListeners[eventName].push(callback); - return () => this.off(eventName, callback); - } - - off(eventName: string, callback?: Listener) { - if (!callback) { - delete this.eventListeners[eventName]; - return; - } - for (let i = 0; i < this.eventListeners[eventName].length; i++) { - if (this.eventListeners[eventName][i] === callback) { - this.eventListeners[eventName].splice(i, 1); - return; - } - } - } - - emit(eventName: string, ...args: any) { - if (this.eventListeners[eventName]) { - this.eventListeners[eventName].forEach((cb) => { - cb(...args); - }); - } - } -} diff --git a/app/PSP/src/core/index.ts b/app/PSP/src/core/index.ts deleted file mode 100644 index 650cc42e4f..0000000000 --- a/app/PSP/src/core/index.ts +++ /dev/null @@ -1,57 +0,0 @@ -import 'reflect-metadata'; -import { inject, injectable } from 'inversify'; -import { TYPES, VERSION } from '../config'; -import { IPluginSystem, IStorageManager } from '../types'; -import { PLUGIN_SYSTEM_SAFE_MODE_ENABLED } from './plugin-config'; -import { log } from '../util'; - -@injectable() -export class PluginSystem implements IPluginSystem { - public version = VERSION; - - constructor( - @inject(TYPES.PluginLoader) private pluginLoader, - @inject(TYPES.SystemManager) private pslm, - @inject(TYPES.StorageManager) private storageManager: IStorageManager, - @inject(TYPES.CommandManager) private commandManager, - @inject(TYPES.Store) private store - ) {} - - async init() { - await this.storageManager.initStorage(); - const internalPlugins = this.storageManager.getInternalPlugins(); - this.pluginLoader.loadEnabledPlugins(internalPlugins); - log(`Loading internal enabled plugins: ${internalPlugins.map((p) => p.key).join(',')}`); - const securityModeEnabled = this.storageManager.get(PLUGIN_SYSTEM_SAFE_MODE_ENABLED); - if (!securityModeEnabled) { - const plugins = this.storageManager.getThirdPartyPlugins(); - log(`Loading 3rd party enabled plugins: ${plugins.map((p) => p.key).join(',')}`); - this.pluginLoader.loadEnabledPlugins(plugins); - } - this.pslm.localCacheInit(); - return this; - } - - async loadPlugin(key: string) { - this.storageManager.setPluginEnabled(key, true); - const plugin = this.storageManager.getPluginByKey(key); - this.pluginLoader.loadPlugin(plugin); - } - - async unloadPlugin(key: string) { - this.storageManager.setPluginEnabled(key, false); - this.pluginLoader.unloadPlugin(key); - } - - async turnOffSafeMode() { - this.storageManager.setSafeModeEnabled(false); - const plugins = this.storageManager.getThirdPartyPlugins(); - return this.pluginLoader.loadEnabledPlugins(plugins); - } - - async turnOnSafeMode() { - this.storageManager.setSafeModeEnabled(true); - const plugins = this.storageManager.getThirdPartyPlugins(); - return this.pluginLoader.unloadThirdPartyPlugins(plugins); - } -} diff --git a/app/PSP/src/core/layout.ts b/app/PSP/src/core/layout.ts deleted file mode 100644 index 9a514d1376..0000000000 --- a/app/PSP/src/core/layout.ts +++ /dev/null @@ -1,5 +0,0 @@ -const Layout = window.siyuan.layout.layout.constructor; - -const newLayout = new Layout({ resize: 'tb' }); - -window.siyuan.layout.leftDock.layout.addLayout(newLayout); diff --git a/app/PSP/src/core/loader.ts b/app/PSP/src/core/loader.ts deleted file mode 100644 index 5e7bd013a2..0000000000 --- a/app/PSP/src/core/loader.ts +++ /dev/null @@ -1,176 +0,0 @@ -import { Plugin } from '../api/plugin'; -import api from '../api'; -import { - IPluginCommand, - ICommandManager, - IPlugin, - IPluginFileManager, - IPluginLoader, - PluginManifest, - SettingRender, - ISettingManager, -} from '../types'; -import { internalPlugins } from '../internal'; -import { log } from '../util'; -import { inject, injectable } from 'inversify'; -import { TYPES } from '../config'; -import { container } from '@/container'; -import { IStorageManager } from '../types'; -import { error } from '../util'; -import axios from 'axios'; - -let components: { [key: string]: any }; - -@injectable() -export class PluginLoader implements IPluginLoader { - pluginFileManager: IPluginFileManager; - - loadedPlugins: Map; - - constructor(@inject(TYPES.PluginFileManager) pluginFileManager) { - this.pluginFileManager = pluginFileManager; - this.loadedPlugins = new Map(); - } - - async loadEnabledPlugins(plugins: PluginManifest[]) { - if (!plugins || !plugins.length) { - return; - } - for (const p of plugins) { - if (!p.enabled) { - continue; - } - await this.loadPlugin(p); - } - } - - async loadAllInternalPlugins() { - internalPlugins.forEach(async (p) => { - const plug = new p.plugin(); - if (!(plug instanceof Plugin)) { - throw new Error(`Failed to load plugin ${p.name}`); - } - log(`Load internal plugin: ${p.key}(${p.name})`); - this.addAdditionalMethod(plug, p.key, p.name); - await plug.onload(); - this.loadedPlugins.set(p.key, plug); - }); - } - - async loadAllLocalPlugins() { - const plugins = await this.pluginFileManager.getAllPlugins(); - if (!plugins) { - return; - } - for (const p of plugins) { - await this.loadPlugin(p); - } - } - - async loadPlugin(plugin: PluginManifest) { - if (!components) { - this.generateRequiredModules(); - } - if (!plugin.enabled || (!plugin.plugin && !plugin.script)) { - return; - } - if (plugin.plugin) { - // internal plugin - const plug = new plugin.plugin(); - if (!(plug instanceof Plugin)) { - throw new Error(`Failed to load plugin ${plugin.name}`); - } - log(`Load internal plugin: ${plugin.key}(${plugin.name})`); - this.addAdditionalMethod(plug, plugin.key, plugin.name); - await plug.onload(); - this.loadedPlugins.set(plugin.key, plug); - return; - } - const exports: { [key: string]: any } = {}; - const module = { exports }; - function run(script: string, name: string) { - return eval('(function anonymous(require,module,exports){'.concat(script, '\n})\n//# sourceURL=').concat(name, '\n')); - } - const __require = (name: string) => { - if (components[name]) { - return components[name]; - } - throw new Error(`module ${name} not found`); - }; - const pluginName = plugin.key; - try { - run(plugin.script, plugin.key)(__require, module, exports); - } catch (e) { - error('Error plugin:' + plugin.key + ' ->', e); - return; - } - let pluginConstructor; - if (!(pluginConstructor = (module.exports || exports).default || module.exports)) { - throw new Error(`Failed to load plugin ${pluginName}. No exports detected.`); - } - const plug = new pluginConstructor(); - if (!(plug instanceof Plugin)) { - throw new Error(`Failed to load plugin ${pluginName}`); - } - this.addAdditionalMethod(plug, plugin.key, pluginName); - try { - await plug.onload(); - this.loadedPlugins.set(plugin.key, plug); - } catch (e) { - error('Error plugin:' + plugin.key + ' ->', e); - } - } - - async unloadPlugin(key: string) { - const plugin = this.loadedPlugins.get(key); - if (!plugin) { - return; - } - plugin.onunload(); - container.get(TYPES.CommandManager).unregisterCommandByPlugin(key); - container.get(TYPES.SettingManager).unregisterSetting(key); - this.loadedPlugins.delete(key); - } - - async unloadThirdPartyPlugins(plugins: PluginManifest[]) { - const keys = plugins.filter((p) => p.enabled).map((p) => p.key); - for (const k of keys) { - log(`unload third party plugin: ${k}`); - await this.unloadPlugin(k); - } - } - - async loadThirdPartyEnabledPlugins(plugins: PluginManifest[]) { - return this.loadEnabledPlugins(plugins); - } - - public generateRequiredModules() { - components = { - siyuan: api, - axios: axios, - }; - } - - private addAdditionalMethod(plugin: Plugin, pluginKey: string, pluginName: string) { - plugin.registerCommand = (command: IPluginCommand) => { - const cm = container.get(TYPES.CommandManager); - cm.registerCommand({ - ...command, - plugin: pluginKey, - pluginName, - }); - }; - - const sm = container.get(TYPES.StorageManager); - plugin.writeStorage = async (filename: string, content: any) => { - return await sm.setPluginStorage(pluginKey, filename, content); - }; - plugin.loadStorage = async (filename: string) => { - return await sm.getPluginStorage(pluginKey, filename); - }; - plugin.registerSettingRender = (settingRender: SettingRender) => { - const cm = container.get(TYPES.SettingManager); - cm.registerSetting(pluginKey, settingRender); - }; - } -} diff --git a/app/PSP/src/core/plugin-config.ts b/app/PSP/src/core/plugin-config.ts deleted file mode 100644 index f786d88920..0000000000 --- a/app/PSP/src/core/plugin-config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { PluginConfig } from '../types'; - -export const PLUGIN_SYSTEM_AUTO_UPDATE = 'PLUGIN_SYSTEM_AUTO_UPDATE'; -export const PLUGIN_SYSTEM_PLUGIN = 'PLUGIN_SYSTEM_PLUGIN'; -export const PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN = 'PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN'; -export const PLUGIN_SYSTEM_SAFE_MODE_ENABLED = 'PLUGIN_SYSTEM_SAFE_MODE_ENABLED'; -export const PLUGIN_STORE_URL = 'PLUGIN_STORE_URL'; - -export const defaultConfig: PluginConfig = { - [PLUGIN_SYSTEM_SAFE_MODE_ENABLED]: true, - [PLUGIN_SYSTEM_AUTO_UPDATE]: true, - [PLUGIN_SYSTEM_PLUGIN]: [{ key: 'setting', enabled: true }], - [PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN]: [], - [PLUGIN_STORE_URL]: 'https://bitbucket.org/hi-windom/sillot-plugins/raw/main/', -}; diff --git a/app/PSP/src/core/plugin-file-manager.ts b/app/PSP/src/core/plugin-file-manager.ts deleted file mode 100644 index 94adb22143..0000000000 --- a/app/PSP/src/core/plugin-file-manager.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { FileClient } from '@/api/file-api'; -import { injectable } from 'inversify'; -import { PluginManifest } from '../types'; -import { error, isExists, log } from '../util'; - -export const MANIFEST = 'manifest.json'; - -export const SCRIPT = 'main.js'; - -@injectable() -export class PluginFileManager { - async scanPlugins(pluginFolder: string): Promise { - const res = await FileClient.getInstanceApi().fileApi.readDir(pluginFolder); - if (!res) { - return []; - } - const files = res; - const result: string[] = []; - for (const f of files) { - if (f.name.startsWith('.')) { - continue; - } - if (f.isDir && (await isExists(`/data/plugins/${f.name}/manifest.json`)) && (await isExists(`/data/plugins/${f.name}/main.js`))) { - result.push(`/data/plugins/${f.name}`); - } - } - return result; - } - - async getFileContent(f: string): Promise { - const res = await FileClient.getInstanceApi().fileApi.getFile(f); - return res || ''; - } - - async getManifest(manifest: string) { - const content = await this.getFileContent(manifest); - try { - return JSON.parse(content); - } catch (e) { - error('loading manifest: ' + manifest, e); - return null; - } - } - - async getScript(script: string) { - return await this.getFileContent(script); - } - - async getAllPlugins(): Promise { - const plugins = await this.scanPlugins('/data/plugins'); - if (!plugins || !plugins.length) { - log('No plugin found in ' + '/data/plugins'); - return []; - } - const req = []; - for (const p of plugins) { - log('Reading plugin from filesystem: ' + p); - const key = this.getFolderName(p); - const f = async () => { - const [manifest, script] = await Promise.all([this.getManifest(`${p}/manifest.json`), this.getScript(`${p}/main.js`)]); - return { ...manifest, script, enabled: false, key }; - }; - req.push(f()); - } - const result: PluginManifest[] = await Promise.all(req); - return result || []; - } - - getFolderName(p) { - const f = p.split('/'); - for (let i = f.length - 1; i >= 0; i--) { - if (f[i]) { - return f[i]; - } - } - return ''; - } -} diff --git a/app/PSP/src/core/setting-manager.ts b/app/PSP/src/core/setting-manager.ts deleted file mode 100644 index 5cd392f5c9..0000000000 --- a/app/PSP/src/core/setting-manager.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { injectable } from 'inversify'; -import { ISettingManager, SettingRender } from '../types'; - -@injectable() -export class SettingManager implements ISettingManager { - settingRenders: Map; - - public constructor() { - this.settingRenders = new Map(); - } - - registerSetting(pluginKey: string, settingRender: SettingRender) { - this.settingRenders.set(pluginKey, settingRender); - } - - unregisterSetting(key: string) { - this.settingRenders.delete(key); - } - - getSettingRenders() { - const result: Array<{ key: string; value: SettingRender }> = []; - this.settingRenders.forEach((value, key) => { - result.push({ key, value }); - }); - return result; - } -} diff --git a/app/PSP/src/core/shortcut.ts b/app/PSP/src/core/shortcut.ts deleted file mode 100644 index 21feed3bc0..0000000000 --- a/app/PSP/src/core/shortcut.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { TYPES } from '@/config'; -import { Command, IEventBus, IShortcut } from '@/types'; -import { log } from '@/util'; -import hotkeys from 'hotkeys-js'; -import { inject, injectable } from 'inversify'; - -hotkeys.filter = function () { - return true; -}; - -@injectable() -export class Shortcut implements IShortcut { - private eventBus: IEventBus; - - private option = { - capture: true, - }; - - public constructor(@inject(TYPES.EventBus) eventBus: IEventBus) { - log('Initialize shortcut subsystem'); - this.eventBus = eventBus; - } - - public registerKeyboardEvent(shortcut: string, callback: (e: KeyboardEvent) => void) { - hotkeys(shortcut, this.option, callback); - this.eventBus.on(shortcut.toString(), callback); - } - - public unregisterKeyboardEvent(shortcut: string) { - hotkeys.unbind(shortcut); - this.eventBus.off(shortcut.toString()); - } - - public registerKeyboardEventFromPlugin(command: Command) { - if (command.shortcut && command.callback) { - this.registerKeyboardEvent(command.shortcut, command.callback); - } - } - - public unregisterKeyboardEventFromPlugin(command: Command) { - if (command.shortcut && command.callback) { - this.unregisterKeyboardEvent(command.shortcut); - } - } -} diff --git a/app/PSP/src/core/storage-manager.ts b/app/PSP/src/core/storage-manager.ts deleted file mode 100644 index 2fe8bdd77f..0000000000 --- a/app/PSP/src/core/storage-manager.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { inject, injectable } from 'inversify'; -import { getLocalStorage, setStorageVal } from '../api/server-api'; -import { defaultConfig, PLUGIN_SYSTEM_PLUGIN, PLUGIN_SYSTEM_SAFE_MODE_ENABLED, PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN } from './plugin-config'; -import { internalPlugins } from '../internal'; -import { TYPES } from '../config'; -import { IPluginFileManager, IStorageManager, PluginConfig, PluginEnableConfig, PluginManifest } from '../types'; -import { showErrorMessage } from '@/util'; -import sanitize from 'sanitize-filename'; -import { FileClient } from '@/api/file-api'; - -@injectable() -export class StorageManager implements IStorageManager { - private pluginFileManager: IPluginFileManager; - - private config: PluginConfig; - - private internalPlugins: PluginManifest[]; - - private thirdPartyPlugins: PluginManifest[]; - - constructor(@inject(TYPES.PluginFileManager) pluginFileManager) { - this.config = Object.assign({}, defaultConfig); - this.pluginFileManager = pluginFileManager; - } - - public get(key: keyof PluginConfig) { - return this.config[key]; - } - - public async set(key: string, val: any) { - this.config[key] = val; - return setStorageVal(key, val); - } - - async initStorage() { - const all = await getLocalStorage(); - const configKeys = Object.keys(defaultConfig); - for (const key of configKeys) { - if (all[key] !== undefined) { - this.config[key] = all[key]; - } else { - await setStorageVal(key, defaultConfig[key]); - } - } - // load all plugins - this.thirdPartyPlugins = await this.pluginFileManager.getAllPlugins(); - this.internalPlugins = [...internalPlugins]; - this.init3rdPartyEnabled(); - this.initInternalEnabled(); - await this.savePluginsEnabled(); - - return this; - } - - private init3rdPartyEnabled() { - const enabledPlugins = this.get(PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN) as PluginEnableConfig[]; - for (const ep of enabledPlugins) { - for (const p of this.thirdPartyPlugins) { - if (p.key === ep.key) { - p.enabled = ep.enabled || false; - break; - } - } - } - } - - private initInternalEnabled() { - const enabledPlugins = this.get(PLUGIN_SYSTEM_PLUGIN) as PluginEnableConfig[]; - for (const ep of enabledPlugins) { - for (const p of this.internalPlugins) { - if (p.key === ep.key) { - p.enabled = ep.enabled || false; - break; - } - } - } - } - - public getPlugins() { - return [...this.internalPlugins, ...this.thirdPartyPlugins]; - } - - public getInternalPlugins() { - return this.internalPlugins; - } - - public getThirdPartyPlugins() { - return this.thirdPartyPlugins; - } - - public getPluginByKey(key) { - return this.getPlugins().find((p) => p.key === key); - } - - public async setPluginEnabled(key: string, enabled: boolean) { - for (const p of [...this.internalPlugins, ...this.thirdPartyPlugins]) { - if (p.key === key) { - p.enabled = enabled; - break; - } - } - await this.savePluginsEnabled(); - } - - public async setSafeModeEnabled(enabled: boolean) { - return this.set(PLUGIN_SYSTEM_SAFE_MODE_ENABLED, enabled); - } - - public async savePluginsEnabled() { - await this.set( - PLUGIN_SYSTEM_PLUGIN, - this.internalPlugins.map((p) => ({ key: p.key, enabled: p.enabled })) - ); - return this.set( - PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN, - this.thirdPartyPlugins.map((p) => ({ key: p.key, enabled: p.enabled })) - ); - } - - public async setPluginStorage(pluginKey: string, filename: string, content: any) { - try { - if (this.isFileNameIllegal(filename)) { - showErrorMessage(`插件${pluginKey}存储文件名不合法`); - return; - } - await this.addPluginStorageFolderIfNotExist(pluginKey); - await FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/.storage/${pluginKey}/${filename}`, content); - } catch (e) { - showErrorMessage(`插件${pluginKey}存储保存失败`, 2000); - } - } - - public async getPluginStorage(pluginKey: string, filename: string): Promise { - try { - return await FileClient.getInstanceApi().fileApi.getFile(`/data/plugins/.storage/${pluginKey}/${filename}`); - } catch (e) { - showErrorMessage(`插件${pluginKey}存储保存失败`, 2000); - return null; - } - } - - public async uninstallPlugin(pluginKey: string): Promise { - await FileClient.getInstanceApi().fileApi.removeFile(`/data/plugins/${pluginKey}`); - await FileClient.getInstanceApi().fileApi.removeFile(`/data/plugins//.storage/${pluginKey}`); - } - - private async addPluginStorageFolderIfNotExist(pluginKey: string) { - const folder = `/data/plugins/.storage/${pluginKey}`; - await FileClient.getInstanceApi().fileApi.putFile(folder, null, true); - } - - private isFileNameIllegal(filename: string) { - return filename !== sanitize(filename); - } -} diff --git a/app/PSP/src/core/store.ts b/app/PSP/src/core/store.ts deleted file mode 100644 index 959e08ed86..0000000000 --- a/app/PSP/src/core/store.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { TYPES } from '@/config'; -import { PLUGIN_STORE_URL } from '@/core/plugin-config'; -import { IStorageManager, IStore, StorePluginManifest, StorePluginStatus } from '@/types'; -import { AxiosResponse } from 'axios'; -import { inject, injectable } from 'inversify'; -import { SemVer } from 'semver'; -import { request, sleep } from '@/util'; -import { FileClient } from '@/api/file-api'; - -@injectable() -export class Store implements IStore { - private plugins: StorePluginManifest[]; - private pluginStatus: StorePluginStatus[]; - - constructor(@inject(TYPES.StorageManager) private storageManager: IStorageManager) { - this.plugins = []; - this.pluginStatus = []; - } - - public async init() { - this.plugins = []; - this.pluginStatus = []; - await Promise.all([this.loadPluginsFromUrl(), this.storageManager.initStorage()]); - const plugins = this.storageManager.getPlugins(); - const storePlugins: StorePluginStatus[] = []; - for (const plugin of this.plugins) { - const p: StorePluginStatus = { ...plugin, isExist: false, needUpgrade: false }; - const oldPlugin = plugins.find((p) => p.key === plugin.key); - // if (oldPlugin) { - // p.isExist = true; - // const pV = new SemVer(p.version); - // const oldPluginV = new SemVer(oldPlugin.version); - // if (pV.compare(oldPluginV) === 1) { - // p.needUpgrade = true; - // } - // } - storePlugins.push(p); - } - this.pluginStatus = storePlugins; - } - - public getStoreUrl() { - return this.storageManager.get(PLUGIN_STORE_URL); - } - - public getPlugins() { - return this.plugins; - } - - public async loadPlugins() { - await this.init(); - return this.getPluginsWithStatus(); - } - - public getPluginsWithStatus() { - return this.pluginStatus; - } - - public async loadPluginsFromUrl() { - const storeUrl = this.getStoreUrl(); - if (!storeUrl) { - return; - } - let res: AxiosResponse; - try { - res = await request.get(storeUrl + '/plugins.json', { - headers: { - 'Cache-Control': 'no-cache', - }, - }); - } catch (e) { - console.error(e); - return; - } - const req = []; - if (Array.isArray(res.data?.plugins)) { - for (const pluginKey of res.data?.plugins || {}) { - const plugin = this.getPluginManifest(`${storeUrl}/${pluginKey}`); - req.push(plugin); - } - } - this.plugins = await Promise.all(req); - } - - public async getPluginByUrl(url: string) { - return Promise.all([this.getPluginManifest(url), this.getPluginMainJs(url)]).then((value) => { - return { - manifest: value[0], - mainJs: value[1], - }; - }); - } - - public async getPluginManifest(url: string) { - try { - const manifest = await request.get(`${url}/manifest.json`, { - headers: { - 'Content-Type': 'application/json', - 'Cache-Control': 'no-cache', - }, - }); - return manifest.data; - } catch (e) { - console.error(e); - return null; - } - } - - public async getPluginMainJs(url: string) { - try { - const res = await request.get(`${url}/main.js`, { - headers: { - 'Content-Type': 'text/plain', - 'Cache-Control': 'no-cache', - }, - }); - return res.data; - } catch (e) { - console.error(e); - return null; - } - } - - public async getPluginReadme(key: string) { - const url = `${this.getStoreUrl()}/${key}`; - try { - const res = await request.get(`${url}/README.md`, { - headers: { - 'Content-Type': 'text/plain', - 'Cache-Control': 'no-cache', - }, - }); - return res.data as string; - } catch (e) { - console.error(e); - return null; - } - } - - public async downloadPlugin(key: string) { - await sleep(500); - const files = await this.getPluginByUrl(`${this.getStoreUrl()}/${key}`); - const manifestJson = files.manifest; - const mainJs = files.mainJs; - return await Promise.all([ - FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${key}`, null, true), - FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${key}/manifest.json`, JSON.stringify(manifestJson), false), - FileClient.getInstanceApi().fileApi.putFile(`/data/plugins/${key}/main.js`, mainJs, false), - ]); - } -} diff --git a/app/PSP/src/core/system-manager.ts b/app/PSP/src/core/system-manager.ts deleted file mode 100644 index ae2ba71121..0000000000 --- a/app/PSP/src/core/system-manager.ts +++ /dev/null @@ -1,106 +0,0 @@ -// import { PLUGIN_SYS_ABS_PATH, SCRIPT_URL, VERSION, VERSION_URL } from '../config'; -import { VERSION } from '../config'; -import { TYPES } from '../config'; -import { _, log, reloadWindow, showInfoMessage } from '../util'; -import { inject, injectable } from 'inversify'; -import { PLUGIN_SYSTEM_AUTO_UPDATE } from './plugin-config'; -import { IStorageManager, ISystemManager } from '../types'; -import { FileClient } from '@/api/file-api'; -import { migrate } from '@/util/migrate'; -import { serverApi } from '@/api'; -import { SemVer } from 'semver'; -import { Notification } from '@/internal/classes/notification'; - -// const pluginScriptPosition = PLUGIN_SYS_ABS_PATH; - -@injectable() -export class SystemManager implements ISystemManager { - storageMangager: IStorageManager; - - constructor(@inject(TYPES.StorageManager) storageManager) { - this.storageMangager = storageManager; - } - - public async saveToLocal(p: string, content: string) { - FileClient.getInstanceApi().fileApi.putFile(p, content); - } - - async localCacheInit() { - // try { - // const plugin = FileClient.getInstanceApi().fileApi.getFile(pluginScriptPosition); - // if (plugin !== null) { - // this.delayAutoUpgrade(); - // } - // return; - // } catch (e) { - // log('Plugin system not found'); - // } - // const script = window.siyuanPluginScript; - // if (!script) { - // return; - // } - // await this.saveToLocal(pluginScriptPosition, script); - // this.delayAutoUpgrade(); - } - - delayAutoUpgrade() { - return false; - setTimeout(() => { - const autoUpdate = this.storageMangager.get(PLUGIN_SYSTEM_AUTO_UPDATE); - if (!autoUpdate) { - log('Auto Update skipped'); - } else { - this.tryUpgrade(); - } - }, 1000); - } - - async tryUpgrade() { - // if (window.pluginSystemSource === 'bazzar') { - // log('Plugin installed from bazzar version, upgrade skip'); - // return; - // } - // log('Try getting online version'); - // const onlineVersion = await this.getOnlineVersion(); - // if (onlineVersion !== VERSION) { - // showInfoMessage(`插件系统获取到最新版本 ${onlineVersion},即将自动更新`); - // log('Online Version: ' + onlineVersion + ', local version: ' + VERSION); - // log('Downloading new version of Plugin System'); - // this.upgrade(); - // } else { - // log('Version is ' + VERSION + ', OK'); - // } - } - - async getOnlineVersion() { - // return fetch(VERSION_URL, { cache: 'no-cache' }).then((res) => res.text()); - return VERSION; - } - - async upgrade() { - // const script = await fetch(SCRIPT_URL, { cache: 'no-cache' }).then((res) => res.text()); - // if (!script) { - // return; - // } - // migrate(); - - // showInfoMessage('插件系统升级中,即将自动重载...'); - // await this.saveToLocal(pluginScriptPosition, script); - // log('Plugin system upgraded, reloading...'); - // setTimeout(() => reloadWindow(), 3000); - } - - async compareWidgetVersion() { - const res = await serverApi.getBazzarWidget(); - const packages = res.packages; - const ps = packages.find((p) => p.name === '插件系统'); - if (!ps) { - return; - } - const latestVersion = ps.version; - const result = new SemVer(VERSION).compare(latestVersion); - if (result < 0) { - new Notification({ message: _('new_version_widget'), type: 'info' }).show(); - } - } -} diff --git a/app/PSP/src/env.d.ts b/app/PSP/src/env.d.ts deleted file mode 100644 index 572b52175a..0000000000 --- a/app/PSP/src/env.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export {}; - -declare global { - const __VERSION__: string; - - namespace NodeJS { - interface ProcessEnv { - HOME?: string; - } - } - - interface Window { - theme?: any; - siyuan: any; - require: any; - pluginSystem?: any; - siyuanPluginScript?: string; - pluginSystemVersion?: string; - pluginSystemIocContainer?: any; - pluginSystemSource?: string; - Lute: any; - } -} diff --git a/app/PSP/src/export.ts b/app/PSP/src/export.ts deleted file mode 100644 index 08beda4a50..0000000000 --- a/app/PSP/src/export.ts +++ /dev/null @@ -1,19 +0,0 @@ -import 'reflect-metadata'; - -import { VERSION } from './config'; -import { log } from './util'; -import { container } from './container'; -import { TYPES } from './config'; -import { IPluginSystem } from './types'; - -function initPluginSystem() { - if (!window.pluginSystem) { - log('Siyuan Plugin System loading...'); - window.pluginSystemVersion = VERSION; - window.pluginSystem = container.get(TYPES.PluginSystem).init(); - window.pluginSystemIocContainer = container; - } -} - -export { initPluginSystem }; -export default initPluginSystem; diff --git a/app/PSP/src/i18n/en_US.json b/app/PSP/src/i18n/en_US.json deleted file mode 100644 index 151e1adcda..0000000000 --- a/app/PSP/src/i18n/en_US.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": "Author" , - "version": "Version", - "description": "Description", - "goBack": "Go Back", - "url": "URL", - "readme": "README", - "loading": "Loading", - "downloading": "Downloading", - "downloaded": "Downloaded", - "download": "Download", - "upgrade": "Upgrade", - "nodescription": "No Description content", - "safemode": "Safe Mode", - "safemodetip": "Turn off safe mode to enable third party plugins.", - "autoupgrade": "Auto Upgrade", - "autoupgradetip": "Auto upgrade plugin system online.", - "store_url": "Plugin Store URL", - "store_url_tip": "Plugin Store URL, default is", - "menu_common": "Common Setting", - "menu_list": "Plugins", - "menu_store": "Store", - "plugin_system": "Plugin System", - "plugin_system_setting": "Plugin System Setting", - "reload": "Reload", - "show_plugin_system_config": "Show plugin system config", - "reload_window": "Reload current window", - "shortcut": "Shortcut", - "show_command_panel": "Show command panel", - "uninstall": "Uninstall", - "new_version_widget": "New version plugin system found in Bazzar, please upgrade and reload." -} \ No newline at end of file diff --git a/app/PSP/src/i18n/zh_CN.json b/app/PSP/src/i18n/zh_CN.json deleted file mode 100644 index 8b0525f374..0000000000 --- a/app/PSP/src/i18n/zh_CN.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "author": "作者" , - "version": "版本", - "description": "描述", - "goBack": "返回", - "url": "地址", - "readme": "README", - "loading": "加载中", - "downloading": "下载中", - "downloaded": "已下载", - "download": "下载", - "upgrade": "升级", - "nodescription": "无描述内容", - "safemode": "安全模式", - "safemodetip": "关闭安全模式允许第三方插件加载", - "autoupgrade": "自动更新", - "autoupgradetip": "从固定位置获取版本并更新本地存储的插件系统脚本", - "store_url": "插件商店地址", - "store_url_tip": "线上插件系统仓库地址, 默认为", - "menu_common": "通用配置", - "menu_list": "插件列表", - "menu_store": "插件商店", - "plugin_system": "插件系统", - "plugin_system_setting": "插件系统设置", - "reload": "重载", - "show_plugin_system_config": "显示插件系统配置", - "reload_window": "重载当前窗口", - "shortcut": "快捷键", - "show_command_panel": "显示控制面板", - "uninstall": "卸载", - "new_version_widget": "集市发现新版本的插件系统,请前往更新并重载" -} \ No newline at end of file diff --git a/app/PSP/src/index.d.ts b/app/PSP/src/index.d.ts deleted file mode 100644 index 3d72675ae6..0000000000 --- a/app/PSP/src/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare interface Window { - siyuan: any; - theme: any; -} diff --git a/app/PSP/src/index.ts b/app/PSP/src/index.ts deleted file mode 100644 index 964614fea7..0000000000 --- a/app/PSP/src/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import 'reflect-metadata'; - -import { VERSION } from './config'; -import { log } from './util'; -import { container } from './container'; -import { TYPES } from './config'; -import { IPluginSystem } from './types'; - -if (!window.pluginSystem) { - log('Siyuan Plugin System loading...'); - window.pluginSystemVersion = VERSION; - window.pluginSystem = container.get(TYPES.PluginSystem).init(); - window.pluginSystemIocContainer = container; -} diff --git a/app/PSP/src/internal/classes/dialog.ts b/app/PSP/src/internal/classes/dialog.ts deleted file mode 100644 index 4b47565a43..0000000000 --- a/app/PSP/src/internal/classes/dialog.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copy from siyuan source code - */ -import { genUUID } from '../../util'; - -export class Dialog { - private destroyCallback: () => void; - public element: HTMLElement; - private id: string; - private disableClose: boolean; - - constructor(options: { - title?: string; - transparent?: boolean; - content: string; - width?: string; - height?: string; - destroyCallback?: () => void; - disableClose?: boolean; - disableAnimation?: boolean; - }) { - this.disableClose = options.disableClose; - this.id = genUUID(); - window.siyuan.dialogs.push(this); - this.destroyCallback = options.destroyCallback; - this.element = document.createElement('div') as HTMLElement; - - this.element.innerHTML = `
-
-
- -
${options.title || ''}
-
${options.content}
-
`; - - this.element.querySelector('.b3-dialog__scrim').addEventListener('click', (event) => { - if (!this.disableClose) { - this.destroy(); - } - event.preventDefault(); - event.stopPropagation(); - // https://ld246.com/article/1657969292700/comment/1658147006669#comments - window.siyuan.menus.menu.remove(); - }); - if (!this.disableClose) { - this.element.querySelector('.b3-dialog__close').addEventListener('click', (event) => { - this.destroy(); - event.preventDefault(); - event.stopPropagation(); - }); - } - document.body.append(this.element); - if (options.disableAnimation) { - this.element.classList.add('b3-dialog--open'); - } else { - setTimeout(() => { - this.element.classList.add('b3-dialog--open'); - }); - } - // https://github.com/siyuan-note/siyuan/issues/6783 - window.siyuan.menus.menu.remove(); - } - - static destroyAll() { - window.siyuan.dialogs.forEach((p) => p.destroy()); - } - - public destroy() { - this.element.remove(); - // https://github.com/siyuan-note/siyuan/issues/6783 - window.siyuan.menus.menu.remove(); - if (this.destroyCallback) { - this.destroyCallback(); - } - window.siyuan.dialogs.find((item, index) => { - if (item.id === this.id) { - window.siyuan.dialogs.splice(index, 1); - return true; - } - }); - } - - public bindInput(inputElement: HTMLInputElement | HTMLTextAreaElement, enterEvent?: () => void) { - inputElement.focus(); - inputElement.addEventListener('keydown', (event: KeyboardEvent) => { - if (event.isComposing) { - event.preventDefault(); - return; - } - if (event.key === 'Escape') { - this.destroy(); - event.preventDefault(); - event.stopPropagation(); - return; - } - if (event.key === 'Enter' && enterEvent) { - enterEvent(); - event.preventDefault(); - } - }); - } -} diff --git a/app/PSP/src/internal/classes/index.ts b/app/PSP/src/internal/classes/index.ts deleted file mode 100644 index 252c5823b0..0000000000 --- a/app/PSP/src/internal/classes/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './menu'; -export * from './dialog'; diff --git a/app/PSP/src/internal/classes/menu.ts b/app/PSP/src/internal/classes/menu.ts deleted file mode 100644 index d8e3e334be..0000000000 --- a/app/PSP/src/internal/classes/menu.ts +++ /dev/null @@ -1,127 +0,0 @@ -export interface IMenuItemOption { - label?: string; - click?: (element: HTMLElement) => void; - type?: 'separator' | 'submenu' | 'readonly'; - accelerator?: string; - action?: string; - id?: string; - submenu?: IMenuItemOption[]; - disabled?: boolean; - icon?: string; - iconHTML?: string; - current?: boolean; - bind?: (element: HTMLElement) => void; -} - -export class Menu { - menu: any; - - constructor(id: string) { - const menu = window.siyuan?.menus?.menu; - if (!menu) { - throw Error('Siyuan internal menu not found!'); - } - this.menu = menu; - if (!id) { - throw Error('Menu must has an id, got empty or undefined!'); - } - menu.remove(); - menu.element.setAttribute('data-name', id); - } - - addItem(item: MenuItem) { - this.menu.append(item.element); - return this; - } - - addSeparator() { - this.addItem(new MenuItem({ type: 'separator' })); - return this; - } - - showAtMouseEvent(event: MouseEvent) { - this.menu.popup({ x: event.clientX, y: event.clientY }); - return this; - } - - showAtPosition(position: { x: number; y: number }) { - this.menu.popup({ x: position.x, y: position.y }); - return this; - } - - close() { - this.menu.remove(); - } -} - -/** - * Copy from siyuan source code - */ -export class MenuItem { - public element: HTMLElement; - - constructor(options: IMenuItemOption) { - this.element = document.createElement('button'); - if (options.disabled) { - this.element.setAttribute('disabled', 'disabled'); - } - if (options.type === 'separator') { - this.element.classList.add('b3-menu__separator'); - return; - } - this.element.classList.add('b3-menu__item'); - if (options.current) { - this.element.classList.add('b3-menu__item--selected'); - } - if (options.click) { - // 需使用 click,否则移动端无法滚动 - this.element.addEventListener('click', (event) => { - if (this.element.getAttribute('disabled')) { - return; - } - options.click(this.element); - event.preventDefault(); - event.stopImmediatePropagation(); - event.stopPropagation(); - window.siyuan.menus.menu.remove(); - }); - } - let html = `${options.label}`; - if (options.iconHTML) { - html = options.iconHTML + html; - } else { - html = `${html}`; - } - // if (options.accelerator) { - // html += `${updateHotkeyTip(options.accelerator)}`; - // } - if (options.action) { - html += ``; - } - if (options.id) { - this.element.setAttribute('data-id', options.id); - } - if (options.type === 'readonly') { - this.element.classList.add('b3-menu__item--readonly'); - } - this.element.innerHTML = html; - if (options.bind) { - // 主题 rem craft 需要使用 b3-menu__item--custom 来区分自定义菜单 by 281261361 - this.element.classList.add('b3-menu__item--custom'); - options.bind(this.element); - } - if (options.submenu) { - const submenuElement = document.createElement('div'); - submenuElement.classList.add('b3-menu__submenu'); - options.submenu.forEach((item) => { - submenuElement.append(new MenuItem(item).element); - }); - this.element.insertAdjacentHTML('beforeend', ''); - this.element.append(submenuElement); - } - } -} - -export class MenuSeparator {} diff --git a/app/PSP/src/internal/classes/notification.ts b/app/PSP/src/internal/classes/notification.ts deleted file mode 100644 index 901ddfcc1b..0000000000 --- a/app/PSP/src/internal/classes/notification.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as serverApi from '../../api/server-api'; -import { INoticationOption, INotification } from '../../types'; - -export class Notification implements INotification { - constructor(private option: INoticationOption) {} - - show() { - if (this.option.type === 'error') { - serverApi.pushErrMsg(null, this.option.message, this.option.timeout); - } else { - serverApi.pushMsg(null, this.option.message, this.option.timeout); - } - } -} diff --git a/app/PSP/src/internal/components/Button.svelte b/app/PSP/src/internal/components/Button.svelte deleted file mode 100644 index f5232744e6..0000000000 --- a/app/PSP/src/internal/components/Button.svelte +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/app/PSP/src/internal/index.ts b/app/PSP/src/internal/index.ts deleted file mode 100644 index d2f33d9cc9..0000000000 --- a/app/PSP/src/internal/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from './classes'; -import { PluginManifest } from '@/types'; -import { CommandPanelPlugin } from './plugins/command-panel'; -import { InternalSettingPlugin } from './plugins/setting'; - -export const internalPlugins: PluginManifest[] = [ - { key: 'setting', name: 'setting', plugin: InternalSettingPlugin, enabled: true, hidden: true, version: '1.0.0' }, - { key: 'commandPanel', name: 'commandPanel', plugin: CommandPanelPlugin, enabled: true, hidden: true, version: '1.0.0' }, -]; diff --git a/app/PSP/src/internal/plugins/command-panel/command-panel.svelte b/app/PSP/src/internal/plugins/command-panel/command-panel.svelte deleted file mode 100644 index 2257d0d4bd..0000000000 --- a/app/PSP/src/internal/plugins/command-panel/command-panel.svelte +++ /dev/null @@ -1,134 +0,0 @@ - - -
-
- - -
- {#if result} - {#each result as com, i} - -
onClick(i)}> - {com.pluginName} {':'} - {com.command} {com.description || ''} - {#if com.shortcut} -
{_('shortcut')}: {com.shortcut}
- {/if} -
- {/each} - {/if} -
- - diff --git a/app/PSP/src/internal/plugins/command-panel/index.ts b/app/PSP/src/internal/plugins/command-panel/index.ts deleted file mode 100644 index 99df5874c1..0000000000 --- a/app/PSP/src/internal/plugins/command-panel/index.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Plugin } from '@/api/plugin'; -import { Dialog } from '@/internal/classes'; -import { Shortcut } from '@/core/shortcut'; -import CommandPanel__SvelteComponent_ from './command-panel.svelte'; -import { _ } from '@/util'; - -export class CommandPanelPlugin extends Plugin { - shortcut: Shortcut; - - onload(): void { - this.registerCommand({ - command: 'Show command panel', - description: _('show_command_panel'), - shortcut: 'ctrl+shift+o,command+shift+o', - callback: () => { - this.showPanel(); - }, - }); - } - - showPanel() { - Dialog.destroyAll(); - new Dialog({ content: '
' }); - setImmediate(() => { - new CommandPanel__SvelteComponent_({ - target: document.getElementById('command-panel'), - }); - }); - } -} diff --git a/app/PSP/src/internal/plugins/setting/index.ts b/app/PSP/src/internal/plugins/setting/index.ts deleted file mode 100644 index 09075f92a4..0000000000 --- a/app/PSP/src/internal/plugins/setting/index.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Menu, MenuItem, Dialog } from '@/internal'; -import * as clientApi from '@/api/client-api'; -import { Plugin } from '@/api/plugin'; -import Settings from './setting.svelte'; -import { _ } from '@/util'; - -export class InternalSettingPlugin extends Plugin { - constructor() { - super(); - } - svg = - ''; - onload() { - const internalSettingButton = document.createElement('button'); - internalSettingButton.setAttribute('aria-label', _('plugin_system')); - internalSettingButton.classList.add('toolbar__item', 'b3-tooltips', 'b3-tooltips__sw'); - internalSettingButton.insertAdjacentHTML('beforeend', this.svg); - internalSettingButton.addEventListener('click', (event) => { - new Menu('internalSettingButton') - .addItem( - new MenuItem({ - label: _('plugin_system_setting'), - icon: 'iconEdit', - click: () => showSettingDialog(), - }) - ) - .addSeparator() - .addItem( - new MenuItem({ - label: _('reload'), - icon: 'iconRefresh', - click: () => window.location.reload(), - }) - ) - .showAtMouseEvent(event); - event.stopPropagation(); - }); - clientApi.addToolbarRight(internalSettingButton); - - this.registerCommand({ - command: 'Show plugin system conifg', - description: _('show_plugin_system_config'), - shortcut: 'command+option+p', - callback: () => showSettingDialog(), - }); - this.registerCommand({ - command: 'Reload Window', - description: _('reload_window'), - callback: () => window.location.reload(), - }); - } -} - -function showSettingDialog() { - new Dialog({ - title: _('plugin_system_setting'), - content: '
', - width: '90vw', - height: '80vh', - }); - setTimeout(() => { - new Settings({ - target: document.getElementById('plugin-settings'), - }); - }); -} diff --git a/app/PSP/src/internal/plugins/setting/setting-common.svelte b/app/PSP/src/internal/plugins/setting/setting-common.svelte deleted file mode 100644 index 0beeb2e027..0000000000 --- a/app/PSP/src/internal/plugins/setting/setting-common.svelte +++ /dev/null @@ -1,68 +0,0 @@ - - -{#each configs as config} - -{/each} diff --git a/app/PSP/src/internal/plugins/setting/setting-custom.svelte b/app/PSP/src/internal/plugins/setting/setting-custom.svelte deleted file mode 100644 index 4cc5fed6c3..0000000000 --- a/app/PSP/src/internal/plugins/setting/setting-custom.svelte +++ /dev/null @@ -1,32 +0,0 @@ - - - -
\ No newline at end of file diff --git a/app/PSP/src/internal/plugins/setting/setting-list.svelte b/app/PSP/src/internal/plugins/setting/setting-list.svelte deleted file mode 100644 index 86fc516b3f..0000000000 --- a/app/PSP/src/internal/plugins/setting/setting-list.svelte +++ /dev/null @@ -1,93 +0,0 @@ - - - - - diff --git a/app/PSP/src/internal/plugins/setting/setting-preview.svelte b/app/PSP/src/internal/plugins/setting/setting-preview.svelte deleted file mode 100644 index bc52a64f8d..0000000000 --- a/app/PSP/src/internal/plugins/setting/setting-preview.svelte +++ /dev/null @@ -1,97 +0,0 @@ - - -
-
-
-
{plugin.name}
-
({plugin.key})
- - - -
- -
- {#if plugin.url} {/if} - {#if plugin.author}
{_('author')}: {plugin.author}
{/if} - {#if plugin.version}
{_('version')}: {plugin.version}
{/if} - {#if plugin.description}
{_('description')}: {plugin.description}
{/if} -
-
-
-
- {#if loading} - {_('readme')} - {:else} - {@html previewHTML()} - {/if} -
-
- - diff --git a/app/PSP/src/internal/plugins/setting/setting-store.svelte b/app/PSP/src/internal/plugins/setting/setting-store.svelte deleted file mode 100644 index 5de272a2c6..0000000000 --- a/app/PSP/src/internal/plugins/setting/setting-store.svelte +++ /dev/null @@ -1,84 +0,0 @@ - - -
- {#if loading} -
{_('loading')}
- {:else if !selectedPlugin} -
- {#each plugins as plugin} - - - {/each} -
- {:else} - selectedPlugin = null } plugin={selectedPlugin}> - {/if} -
diff --git a/app/PSP/src/internal/plugins/setting/setting.svelte b/app/PSP/src/internal/plugins/setting/setting.svelte deleted file mode 100644 index 0a6b151df5..0000000000 --- a/app/PSP/src/internal/plugins/setting/setting.svelte +++ /dev/null @@ -1,96 +0,0 @@ - - -
-
- -
- {#if currentSelection.type === 'internal'} - updateMenus()} /> - {:else} - - {/if} -
-
-
diff --git a/app/PSP/src/types.ts b/app/PSP/src/types.ts deleted file mode 100644 index 54151b6af0..0000000000 --- a/app/PSP/src/types.ts +++ /dev/null @@ -1,194 +0,0 @@ -export interface IPlugin { - onload(): void; - onunload(): void; - registerCommand(command: IPluginCommand); - registerSettingRender(settingRender: SettingRender); - loadStorage(filename: string): Promise; - writeStorage(filename: string, content: any): Promise; -} - -export interface PluginConstructor { - new (): IPlugin; -} - -export interface StorePluginManifest { - key: string; - name: string; - description: string; - author: string; - version: string; - url: string; -} - -export interface StorePluginStatus extends StorePluginManifest { - isExist: boolean; - needUpgrade: boolean; -} - -export interface PluginManifest { - key: string; - name: string; - version: string; - script?: string; - enabled?: boolean; - hidden?: boolean; - description?: string; - url?: string; - author?: string; - plugin?: new (...args: any) => IPlugin; -} - -export interface IStorageManager { - get(key: keyof PluginConfig): any; - set(key: string, val: any): Promise; - initStorage(): Promise; - getPlugins(): PluginManifest[]; - getInternalPlugins(): PluginManifest[]; - getThirdPartyPlugins(): PluginManifest[]; - getPluginByKey(key: string): PluginManifest | undefined; - setPluginEnabled(key: string, enabled: boolean): Promise; - savePluginsEnabled(): Promise; - setSafeModeEnabled(enabled: boolean): Promise; - setPluginStorage(pluginKey: string, filename: string, content: any): Promise; - getPluginStorage(pluginKey: string, filename: string): Promise; - uninstallPlugin(key: string): Promise; -} - -export interface ISystemManager { - saveToLocal(p: string, content: string): Promise; - localCacheInit(): Promise; - delayAutoUpgrade(): void; - tryUpgrade(): Promise; - getOnlineVersion(): Promise; - upgrade(): Promise; -} - -export interface IPluginSystem { - init(): Promise; - loadPlugin(key: string): Promise; - unloadPlugin(key: string): Promise; - turnOffSafeMode(): Promise; - turnOnSafeMode(): Promise; -} - -export interface IPluginLoader { - loadEnabledPlugins(plugins: PluginManifest[]): Promise; - loadAllInternalPlugins(): Promise; - loadAllLocalPlugins(): Promise; - loadPlugin(plugin: PluginManifest): Promise; - unloadPlugin(key: string): Promise; - generateRequiredModules(): void; - unloadThirdPartyPlugins(plugins: PluginManifest[]): Promise; - loadThirdPartyEnabledPlugins(plugins: PluginManifest[]): Promise; -} - -export interface IPluginFileManager { - scanPlugins(pluginFolder: string): Promise; - getFileContent(f: string): Promise; - getManifest(f: string): Promise; - getScript(f: string): Promise; - getAllPlugins(): Promise; -} - -export interface ISettingTab { - key: string; - name: string; - settings: ISetting[]; -} - -export interface ISetting { - key: string; - name: string; - type: T; - value: T extends 'boolean' ? boolean : T extends 'string' ? string : T extends 'array' ? Array : T extends 'number' ? number : any; -} - -export enum ISettingType { - BOOLEAN = 'boolean', - STRING = 'string', - ARRAY = 'array', - NUMBER = 'number', -} - -export interface PluginEnableConfig { - key: string; - enabled: boolean; -} - -export interface PluginConfig { - PLUGIN_SYSTEM_SAFE_MODE_ENABLED: boolean; - PLUGIN_SYSTEM_AUTO_UPDATE: boolean; - PLUGIN_SYSTEM_PLUGIN: Array; - PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN: Array; - PLUGIN_STORE_URL: string; -} - -export type Listener = (...args: any) => void; - -export interface IEventBus { - on(eventName: string, callback: Listener): () => void; - off(eventName: string, callback?: Listener): void; - emit(eventName: string, ...args: any): void; - destroy(): void; -} - -export interface Command { - plugin: string; - pluginName: string; - command: string; - shortcut?: string; - description?: string; - callback: (...args) => any; -} - -export interface IPluginCommand { - command: string; - shortcut?: string; - description?: string; - callback: (...args) => any; -} - -export interface ICommandManager { - registerCommand(command: Command); - unregisterCommand(command: Command); - unregisterCommandByPlugin(plugin: string); - getCommands(): Command[]; -} - -export interface IShortcut { - registerKeyboardEvent(shortcut: string, callback: (e: KeyboardEvent) => void); - unregisterKeyboardEvent(shortcut: string); - registerKeyboardEventFromPlugin(command: Command); - unregisterKeyboardEventFromPlugin(command: Command); -} - -export interface INotification { - show(): void; -} - -export interface INoticationOption { - type: 'error' | 'info'; - message: string; - timeout?: number; -} - -export interface IStore { - init(): Promise; - getStoreUrl(): string; - getPlugins(): StorePluginManifest[]; - loadPlugins(): Promise; - getPluginsWithStatus(): StorePluginManifest[]; - loadPluginsFromUrl(): Promise; - getPluginByUrl(url: string): Promise<{ manifest: string; mainJs: string }>; - getPluginManifest(url: string): Promise; - getPluginReadme(url: string): Promise; - downloadPlugin(key: string): Promise; -} - -export type SettingRender = (element: HTMLElement) => void; - -export interface ISettingManager { - registerSetting(key: string, settingRender: SettingRender): void; - unregisterSetting(key: string): void; - getSettingRenders(): Array<{ key: string; value: SettingRender }>; -} diff --git a/app/PSP/src/util/index.ts b/app/PSP/src/util/index.ts deleted file mode 100644 index 59a33eb20d..0000000000 --- a/app/PSP/src/util/index.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Notification } from '../internal/classes/notification'; -import LoggerFactory, { LogLevelEnum } from 'zhi-log'; -import { FileClient } from '../api/file-api'; - -import zh_CN from '../i18n/zh_CN.json'; -import en_US from '../i18n/en_US.json'; -import axios from 'axios'; - -const factory = LoggerFactory.customLogFactory(LogLevelEnum.LOG_LEVEL_INFO, 'PluginSystem'); -const pluginSystemLogger = factory.getLogger('plugin system'); - -export const log = (...p) => { - pluginSystemLogger.info(...p); -}; - -export const request = axios.create({ - withCredentials: false, - headers: { - 'Cache-Control': 'no-cache', - Pragma: 'no-cache', - Expires: '0', - }, -}); - -export const sleep = async (t: number) => { - return new Promise((resolve) => { - setTimeout(() => resolve(null), t); - }); -}; - -export const error = (...p) => pluginSystemLogger.error(...p); - -export const reloadWindow = () => window.location.reload(); - -export const getCrossPlatformAppDataFolder = () => { - const PROCESS_ENV = window.process?.env; - let configFilePath; - if (process.platform === 'darwin') { - configFilePath = `${PROCESS_ENV.HOME}/Library/Application Support`; - } else if (process.platform === 'win32') { - // Roaming包含在APPDATA中了 - configFilePath = PROCESS_ENV.APPDATA; - } else if (process.platform === 'linux') { - configFilePath = PROCESS_ENV.HOME; - } - return configFilePath; -}; - -/** - * genUUID genernate UUID, copy from siyuan - * @returns - */ -export const genUUID = () => - ([1e7].toString() + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) => - (parseInt(c, 10) ^ (window.crypto.getRandomValues(new Uint32Array(1))[0] & (15 >> (parseInt(c, 10) / 4)))).toString(16) - ); - -export function isDir(p: string) { - throw new Error('can not get dir by path:' + p); -} - -export async function isExists(p: string) { - try { - const res = await FileClient.getInstanceApi().fileApi.getFile(p); - return res !== null; - } catch { - return false; - } -} - -export class Info { - constructor(private message: string) {} -} -// rome-ignore lint/suspicious/noShadowRestrictedNames: -export class Error { - constructor(private message: string) {} -} -export class Warning { - constructor(private message: string) {} -} - -export const showInfoMessage = (message: string, timeout?: number) => new Notification({ type: 'info', message, timeout }).show(); -export const showErrorMessage = (message: string, timeout?: number) => new Notification({ type: 'error', message, timeout }).show(); - -export const getLogger = (name: string) => factory.getLogger(name); - -const langs = { - zh_CN, - en_US, -}; - -export const _ = (v: string): string => { - return langs[window.siyuan.config.lang][v] || 'not defined'; -}; diff --git a/app/PSP/src/util/migrate.ts b/app/PSP/src/util/migrate.ts deleted file mode 100644 index 2faf52c8fb..0000000000 --- a/app/PSP/src/util/migrate.ts +++ /dev/null @@ -1,65 +0,0 @@ -export const migrate = async () => { - const SNIPPET_NAME = 'plugin-system-bazzar'; - const content = `(async () => { - window.pluginSystemSource = 'bazzar'; - const response = await fetch('/api/file/getFile', { - method: 'POST', - mode: 'cors', - cache: 'no-cache', - credentials: 'same-origin', - headers: { - 'Content-Type': 'application/json', - }, - redirect: 'follow', - referrerPolicy: 'no-referrer', - body: JSON.stringify({ path: '/data/widgets/插件系统/plugin.js' }), - }); - const js = await response.text(); - eval(js); - })()`; - - const request = async (url, body) => { - const response = await fetch(url, { - method: 'POST', - mode: 'cors', - cache: 'no-cache', - credentials: 'same-origin', - headers: { - 'Content-Type': 'application/json', - }, - redirect: 'follow', - referrerPolicy: 'no-referrer', - body: JSON.stringify(body), - }); - return response.json(); - }; - - const res = await request('/api/snippet/getSnippet', { enabled: 2, type: 'all' }); - - const snippets = res.data.snippets; - - for (const snippet of snippets) { - if (snippet.type !== 'js') { - continue; - } - if (snippet.content.indexOf('https://gitee.com/zuoez02/siyuan-plugin-system/raw/main/main.js') !== -1) { - snippet.enabled = false; - } - if (snippet.name === SNIPPET_NAME) { - snippet.enabled = true; - snippet.content = content; - await request('/api/snippet/setSnippet', { snippets }); - return; - } - } - - snippets.splice(0, 0, { - id: '20230324100959-plugind', - name: SNIPPET_NAME, - type: 'js', - enabled: true, - content, - }); - await request('/api/snippet/setSnippet', { snippets }); - setTimeout(() => window.parent.location.reload(), 1000); -}; diff --git a/app/PSP/src/vite-env.d.ts b/app/PSP/src/vite-env.d.ts deleted file mode 100644 index 4078e7476a..0000000000 --- a/app/PSP/src/vite-env.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -/// -/// diff --git a/app/PSP/svelte.config.js b/app/PSP/svelte.config.js deleted file mode 100644 index bd327b6e86..0000000000 --- a/app/PSP/svelte.config.js +++ /dev/null @@ -1,8 +0,0 @@ -import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' - -export default { - // Consult https://svelte.dev/docs#compile-time-svelte-preprocess - // for more information about preprocessors - preprocess: vitePreprocess(), - } - \ No newline at end of file diff --git a/app/PSP/tools/bundle.cjs b/app/PSP/tools/bundle.cjs deleted file mode 100644 index 8f715ae6f2..0000000000 --- a/app/PSP/tools/bundle.cjs +++ /dev/null @@ -1,8 +0,0 @@ -const dts = require('dts-bundle'); -const path = require('path'); - -dts.bundle({ - name: 'siyuan', - main: path.resolve(__dirname, '..', 'temp/api.d.ts'), - out: path.resolve(__dirname, '..', 'type/siyuan.d.ts'), -}); diff --git a/app/PSP/tools/update-dev.cjs b/app/PSP/tools/update-dev.cjs deleted file mode 100644 index 1e5a49c930..0000000000 --- a/app/PSP/tools/update-dev.cjs +++ /dev/null @@ -1,18 +0,0 @@ -const path = require('path'); -const fs = require('fs'); - -const SNIPPET_CONF_PATH = ''; - -const content = fs.readFileSync(SNIPPET_CONF_PATH); - -const snippets = JSON.parse(content); - -for (const snippet of snippets) { - if (snippet.name === 'pluginTest' && snippet.type === 'js') { - snippet.enabled = true; - snippet.content = fs.readFileSync(path.join(__dirname, '..', 'main.js')); - break; - } -} - -fs.writeFileSync(SNIPPET_CONF_PATH, JSON.stringify(snippets, null, 2)); diff --git a/app/PSP/tools/version.cjs b/app/PSP/tools/version.cjs deleted file mode 100644 index be9e3a8f6f..0000000000 --- a/app/PSP/tools/version.cjs +++ /dev/null @@ -1,12 +0,0 @@ -const version = process.argv[2]; -// replace in VERSION -const fs = require('fs'); -const path = require('path'); - -fs.writeFileSync(path.join(__dirname, '..', 'VERSION'), version); -// replace in package.json -const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'))); - -packageJson.version = version; - -fs.writeFileSync(path.join(__dirname, '..', 'package.json'), JSON.stringify(packageJson, null, 2)); diff --git a/app/PSP/tsconfig.json b/app/PSP/tsconfig.json deleted file mode 100644 index c798a67c69..0000000000 --- a/app/PSP/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "target": "es2017", - "lib": [ - "dom", - "es2015" - ], - "paths": { - "@/*": [ - "./src/*" - ] - }, - "types": [ - "node", - "reflect-metadata" - ], - "moduleResolution": "node", - "esModuleInterop": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "resolveJsonModule": true - } -} \ No newline at end of file diff --git a/app/PSP/type.d.ts b/app/PSP/type.d.ts deleted file mode 100644 index de7d6e43a9..0000000000 --- a/app/PSP/type.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'siyuan-petal' { - const initPluginSystem: () => void; - export { initPluginSystem }; - export default initPluginSystem; -} diff --git a/app/PSP/type/README.md b/app/PSP/type/README.md deleted file mode 100644 index fc016318c2..0000000000 --- a/app/PSP/type/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Siyuan Plugin API - -This is Siyuan Plugin System API. Only types declaration here. \ No newline at end of file diff --git a/app/PSP/type/package.json b/app/PSP/type/package.json deleted file mode 100644 index a23abb3f48..0000000000 --- a/app/PSP/type/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "siyuan", - "author": "zuoez02", - "types": "siyuan.d.ts", - "version": "0.7.1", - "repository": "https://github.com/siyuan-note/petal/type" -} diff --git a/app/PSP/type/siyuan.d.ts b/app/PSP/type/siyuan.d.ts deleted file mode 100644 index 30a2e6350f..0000000000 --- a/app/PSP/type/siyuan.d.ts +++ /dev/null @@ -1,344 +0,0 @@ -// Generated by dts-bundle v0.7.3 - -declare module 'siyuan' { - import * as serverApi from 'siyuan/api/server-api'; - import * as clientApi from 'siyuan/api/client-api'; - import { Menu, MenuItem, MenuSeparator } from 'siyuan/internal/classes/menu'; - import { Dialog } from 'siyuan/internal/classes/dialog'; - import { Notification } from 'siyuan/internal/classes/notification'; - import { Plugin } from 'siyuan/api/plugin'; - export { clientApi, serverApi, Menu, MenuItem, MenuSeparator, Notification, Dialog, Plugin }; - const _default: { - clientApi: typeof clientApi; - serverApi: typeof serverApi; - Plugin: typeof Plugin; - Menu: typeof Menu; - MenuItem: typeof MenuItem; - MenuSeparator: typeof MenuSeparator; - Notification: typeof Notification; - Dialog: typeof Dialog; - }; - export default _default; -} - -declare module 'siyuan/api/server-api' { - export function request(url: any, data: any): Promise; - export function parseBody(response: any): Promise; - export function transactions(protyle: any, transactions?: any[]): Promise; - export function sql(sql: any): Promise; - export function lsNotebooks(sql: any): Promise; - export function getAnchor(anchorText: any, name: any): Promise; - export function openNotebook(notebookId: any): Promise; - export function closeNotebook(notebookId: any): Promise; - export function renameNotebook(notebookId: any, notebookNewName: any): Promise; - export function createNotebook(notebookName: any): Promise; - export function removeNotebook(notebookId: any): Promise; - export function getNotebookConf(notebookId: any): Promise; - export function setNotebookConf(notebookId: any): Promise; - export function renameDoc(notebookId: any, path: any, title: any): Promise; - export function removeDoc(notebookId: any, path: any): Promise; - export function moveDoc(srcNotebookId: any, srcPath: any, targetNotebookId: any, targetPath: any): Promise; - export function getHPathByPath(notebookId: any, path: any): Promise; - export function getHPathByID(ID: any): Promise; - export function getBlockAttrs(blockId: any): Promise; - export function getBlockByID(blockId: any): Promise; - export function getBlockKramdown(blockId: any): Promise; - export function getBlockBreadcrumb(ID: any): Promise; - export function setBlockAttrs(blockId: any, attrs: any): Promise; - export function exportMdContent(docId: any): Promise; - export function getDocOutline(docId: any): Promise; - export function listDocsByPath(path: any): Promise; - export function getBacklink(id: any): Promise; - export function searchEmbedBlock(excludeIds: any, sql: any): Promise; - export function getDoc(id: any): Promise; - export function getFocusedDoc(id: any): Promise; - export function getTag(): Promise; - export function getLocalGraph(k: any, id: any, conf: any, reqId: any): Promise; - export function getGraph(k: any, conf: any, reqId: any): Promise; - export function searchDocs(k: any): Promise; - export function searchBlock(query: any): Promise; - export function searchTemplate(k: any): Promise; - export function createDocWithMd(notebook: any, path: any, markdown: any): Promise; - export function docSaveAsTemplate(id: any, overwrite?: boolean): Promise; - export function render(data: any): Promise; - export function insertBlock(previousID: any, dataType: any, data: any): Promise; - export function prependBlock(parentID: any, dataType: any, data: any): Promise; - export function appendBlock(parentID: any, dataType: any, data: any): Promise; - export function updateBlock(id: any, dataType: any, data: any): Promise; - export function deleteBlock(id: any): Promise; - export function moveBlock(id: string, previousID: string, parentID: string): Promise; - export function getSysFonts(): Promise; - export function getFile(path: string, type?: 'json' | 'text'): Promise; - export function putFile(path: any, filedata: any, isDir?: boolean, modTime?: number): Promise; - export function readDir(path: string): Promise; - export function removeFile(path: any): Promise; - export function pushMsg(message?: any, text?: any, timeout?: number): Promise; - export function pushErrMsg(message?: any, text?: any, timeout?: number): Promise; - export function setStorageVal(key: string, val: any): Promise; - export function getLocalStorage(): Promise; - export function renderSprig(sprig: string): Promise; - export function getBazzarWidget(): Promise; -} - -declare module 'siyuan/api/client-api' { - export function addToolbarLeft(el: Element): void; - export function addToolbarRight(el: Element): void; - export const createLogger: (name: string) => import("zhi-log").DefaultLogger; -} - -declare module 'siyuan/internal/classes/menu' { - export interface IMenuItemOption { - label?: string; - click?: (element: HTMLElement) => void; - type?: 'separator' | 'submenu' | 'readonly'; - accelerator?: string; - action?: string; - id?: string; - submenu?: IMenuItemOption[]; - disabled?: boolean; - icon?: string; - iconHTML?: string; - current?: boolean; - bind?: (element: HTMLElement) => void; - } - export class Menu { - menu: any; - constructor(id: string); - addItem(item: MenuItem): this; - addSeparator(): this; - showAtMouseEvent(event: MouseEvent): this; - showAtPosition(position: { - x: number; - y: number; - }): this; - close(): void; - } - /** - * Copy from siyuan source code - */ - export class MenuItem { - element: HTMLElement; - constructor(options: IMenuItemOption); - } - export class MenuSeparator { - } -} - -declare module 'siyuan/internal/classes/dialog' { - export class Dialog { - element: HTMLElement; - constructor(options: { - title?: string; - transparent?: boolean; - content: string; - width?: string; - height?: string; - destroyCallback?: () => void; - disableClose?: boolean; - disableAnimation?: boolean; - }); - static destroyAll(): void; - destroy(): void; - bindInput(inputElement: HTMLInputElement | HTMLTextAreaElement, enterEvent?: () => void): void; - } -} - -declare module 'siyuan/internal/classes/notification' { - import { INoticationOption, INotification } from 'siyuan/types'; - export class Notification implements INotification { - constructor(option: INoticationOption); - show(): void; - } -} - -declare module 'siyuan/api/plugin' { - import { IPlugin, IPluginCommand, SettingRender } from 'siyuan/types'; - export class Plugin implements IPlugin { - _id: string; - onload(): void; - onunload(): void; - registerCommand(command: IPluginCommand): void; - registerSettingRender(settingRender: SettingRender): void; - loadStorage(filename: string): Promise; - writeStorage(filename: string, content: any): Promise; - } -} - -declare module 'siyuan/types' { - export interface IPlugin { - onload(): void; - onunload(): void; - registerCommand(command: IPluginCommand): any; - registerSettingRender(settingRender: SettingRender): any; - loadStorage(filename: string): Promise; - writeStorage(filename: string, content: any): Promise; - } - export interface PluginConstructor { - new (): IPlugin; - } - export interface StorePluginManifest { - key: string; - name: string; - description: string; - author: string; - version: string; - url: string; - } - export interface StorePluginStatus extends StorePluginManifest { - isExist: boolean; - needUpgrade: boolean; - } - export interface PluginManifest { - key: string; - name: string; - version: string; - script?: string; - enabled?: boolean; - hidden?: boolean; - description?: string; - url?: string; - author?: string; - plugin?: new (...args: any) => IPlugin; - } - export interface IStorageManager { - get(key: keyof PluginConfig): any; - set(key: string, val: any): Promise; - initStorage(): Promise; - getPlugins(): PluginManifest[]; - getInternalPlugins(): PluginManifest[]; - getThirdPartyPlugins(): PluginManifest[]; - getPluginByKey(key: string): PluginManifest | undefined; - setPluginEnabled(key: string, enabled: boolean): Promise; - savePluginsEnabled(): Promise; - setSafeModeEnabled(enabled: boolean): Promise; - setPluginStorage(pluginKey: string, filename: string, content: any): Promise; - getPluginStorage(pluginKey: string, filename: string): Promise; - uninstallPlugin(key: string): Promise; - } - export interface ISystemManager { - saveToLocal(p: string, content: string): Promise; - localCacheInit(): Promise; - delayAutoUpgrade(): void; - tryUpgrade(): Promise; - getOnlineVersion(): Promise; - upgrade(): Promise; - } - export interface IPluginSystem { - init(): Promise; - loadPlugin(key: string): Promise; - unloadPlugin(key: string): Promise; - turnOffSafeMode(): Promise; - turnOnSafeMode(): Promise; - } - export interface IPluginLoader { - loadEnabledPlugins(plugins: PluginManifest[]): Promise; - loadAllInternalPlugins(): Promise; - loadAllLocalPlugins(): Promise; - loadPlugin(plugin: PluginManifest): Promise; - unloadPlugin(key: string): Promise; - generateRequiredModules(): void; - unloadThirdPartyPlugins(plugins: PluginManifest[]): Promise; - loadThirdPartyEnabledPlugins(plugins: PluginManifest[]): Promise; - } - export interface IPluginFileManager { - scanPlugins(pluginFolder: string): Promise; - getFileContent(f: string): Promise; - getManifest(f: string): Promise; - getScript(f: string): Promise; - getAllPlugins(): Promise; - } - export interface ISettingTab { - key: string; - name: string; - settings: ISetting[]; - } - export interface ISetting { - key: string; - name: string; - type: T; - value: T extends 'boolean' ? boolean : T extends 'string' ? string : T extends 'array' ? Array : T extends 'number' ? number : any; - } - export enum ISettingType { - BOOLEAN = "boolean", - STRING = "string", - ARRAY = "array", - NUMBER = "number" - } - export interface PluginEnableConfig { - key: string; - enabled: boolean; - } - export interface PluginConfig { - PLUGIN_SYSTEM_SAFE_MODE_ENABLED: boolean; - PLUGIN_SYSTEM_AUTO_UPDATE: boolean; - PLUGIN_SYSTEM_PLUGIN: Array; - PLUGIN_SYSTEM_THIRD_PARTY_PLUGIN: Array; - PLUGIN_STORE_URL: string; - } - export type Listener = (...args: any) => void; - export interface IEventBus { - on(eventName: string, callback: Listener): () => void; - off(eventName: string, callback?: Listener): void; - emit(eventName: string, ...args: any): void; - destroy(): void; - } - export interface Command { - plugin: string; - pluginName: string; - command: string; - shortcut?: string; - description?: string; - callback: (...args: any[]) => any; - } - export interface IPluginCommand { - command: string; - shortcut?: string; - description?: string; - callback: (...args: any[]) => any; - } - export interface ICommandManager { - registerCommand(command: Command): any; - unregisterCommand(command: Command): any; - unregisterCommandByPlugin(plugin: string): any; - getCommands(): Command[]; - } - export interface IShortcut { - registerKeyboardEvent(shortcut: string, callback: (e: KeyboardEvent) => void): any; - unregisterKeyboardEvent(shortcut: string): any; - registerKeyboardEventFromPlugin(command: Command): any; - unregisterKeyboardEventFromPlugin(command: Command): any; - } - export interface INotification { - show(): void; - } - export interface INoticationOption { - type: 'error' | 'info'; - message: string; - timeout?: number; - } - export interface IStore { - init(): Promise; - getStoreUrl(): string; - getPlugins(): StorePluginManifest[]; - loadPlugins(): Promise; - getPluginsWithStatus(): StorePluginManifest[]; - loadPluginsFromUrl(): Promise; - getPluginByUrl(url: string): Promise<{ - manifest: string; - mainJs: string; - }>; - getPluginManifest(url: string): Promise; - getPluginReadme(url: string): Promise; - downloadPlugin(key: string): Promise; - } - export type SettingRender = (element: HTMLElement) => void; - export interface ISettingManager { - registerSetting(key: string, settingRender: SettingRender): void; - unregisterSetting(key: string): void; - getSettingRenders(): Array<{ - key: string; - value: SettingRender; - }>; - } -} - diff --git a/app/PSP/vite.config.js b/app/PSP/vite.config.js deleted file mode 100644 index d3aa7a18d1..0000000000 --- a/app/PSP/vite.config.js +++ /dev/null @@ -1,60 +0,0 @@ -// vite.config.js -import { resolve } from 'path'; -import { defineConfig } from 'vite'; -import { svelte } from '@sveltejs/vite-plugin-svelte'; -import { replaceCodePlugin } from 'vite-plugin-replace'; -import packageJson from './package.json'; -import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'; - -export default defineConfig({ - plugins: [ - svelte(), - replaceCodePlugin({ - replacements: [ - { - from: '__VERSION__', - to: packageJson.version, - }, - ], - }), - cssInjectedByJsPlugin(), - ], - lib: { - // Could also be a dictionary or array of multiple entry points - entry: resolve(__dirname, 'src/index.js'), - name: 'SiYuan', - // the proper extensions will be added - fileName: 'main', - }, - resolve: { - alias: { - '@': resolve('src'), - }, - }, - server: { - host: '0.0.0.0', - port: 8090, - watch: {}, - hmr: true, - }, - build: { - assetsDir: '', - emptyOutDir: false, - lib: { - entry: process.env.TYPE === 'iife' ? 'src/index.ts' : 'src/export', - formats: process.env.TYPE === 'iife' ? ['iife'] : ['es'], - name: 'siyuan-plugin-system', - fileName: (t, v) => t === 'iife' ? 'main.js' : 'main.esm.js', - }, - outDir: '', - rollupOptions: { - output: { - name: 'main', - dir: 'out' - }, - }, - //构建后是否生成 source map 文件 - sourcemap: 'inline', - minify: 'terser', //terser 构建后文件体积更小 - }, -}); diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index 57d4865e0f..225d01c47b 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1,4 +1,6 @@ { + "updateLayout": "Update layout", + "dndFolderTip": "Please note that ${x} only inserts the file:// hyperlink and does not copy the file", "removeCol": "Are you sure you want to delete the ${x} column in the database?", "video": "Video", "audio": "Audio", @@ -434,6 +436,14 @@ "autoDownloadUpdatePkgTip": "After enabling, it will automatically check the version update every two hours. If there is an updated version, it will automatically download the installation package and prompt for installation", "downloaded": "Downloaded", "allOp": "All operations", + "allNotebooks": "All Notebooks", + "historyClean": "clean", + "historyUpdate": "update", + "historyDelete": "delete", + "historyFormat": "format", + "historySync": "sync", + "historyReplace": "replace", + "historyOutline": "outline", "htmlBlockError": "The execution of the following script will affect the interface display, and the script has stopped running", "fileHistory": "File history", "htmlBlockTip": "Multiple HTML blocks are formed. To prevent data loss, please use <div> tags to wrap and remove blank lines", @@ -1068,7 +1078,7 @@ "about": "About", "about1": "Copyright (c) 2022-present • Hi-Windom • Privacy PolicyUser Agreement", "about2": "Use on browser", - "about3": "Please use the Chrome browser and keep it in the same network as the computer, port ${port}(In addition to the random port, the first started workspace will also automatically listen to 6806 as a fixed port, so that it is convenient for the browser to clip extensions or other external programs to call the kernel interface), the addresses that may be connected are as follows: ", + "about3": "Please use the Chrome browser and keep it in the same network as the computer, port ${port}(In addition to the random port, the first started workspace will also automatically listen to 58131 as a fixed port, so that it is convenient for the browser to clip extensions or other external programs to call the kernel interface), the addresses that may be connected are as follows: ", "about4": "Open browser", "about5": "Access authorization code", "about6": "After configuration, it will be used as the access authentication password, leave it blank to close the authentication", @@ -1079,7 +1089,7 @@ "about11": "Network serving", "about12": "After enabling, other devices in the same LAN will be allowed to access. The application will be closed automatically after modification, please restart manually", "about13": "API token", - "about14": "The token needs to be authenticated when calling the API", + "about14": "The token needs to be authenticated when calling the API
HTTP request header Authorization: token ${token}", "about17": "Do not enable proxy when set to Direct connection", "about18": "When using a non-loopback address (127.0.0.1/[::1]) please set the Access authorization code first", "checkUpdate": "Check update", @@ -1451,6 +1461,9 @@ "235": "[%d/%d] is updating the marketplace package...", "236": "[%d/%d] is updating the marketplace package [%s]...", "237": "[%d] marketplace packages have all been updated successfully", - "238": "Marketplace package [%s] update failed, please try again later" + "238": "Marketplace package [%s] update failed, please try again later", + "239": "Related operations are being processed, please try again later", + "240": "Drag heading under container blocks in the doc is not supported", + "241": "Drag to its subheading is not supported" } } diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index 2a12ac21a5..b5ccb6909e 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1,4 +1,6 @@ { + "updateLayout": "Actualizar diseño", + "dndFolderTip": "Tenga en cuenta que ${x} solo inserta el hipervínculo file:// y no copia el archivo", "removeCol": "¿Está seguro de que desea eliminar la columna ${x} en la base de datos?", "vídeo": "Vídeo", "audio": "Audio", @@ -434,6 +436,14 @@ "autoDownloadUpdatePkgTip": "Después de abrir, verificará automáticamente la actualización de la versión cada dos horas. Si hay una versión actualizada, descargará automáticamente el paquete de instalación y solicitará la instalación", "downloaded": "Descargado", "allOp": "Todas las operaciones", + "allNotebooks": "Todos los cuadernos", + "historyClean": "limpiar (clean)", + "historyUpdate": "actualizar (update)", + "historyDelete": "eliminar (delete)", + "historyFormat": "formatear (format)", + "historySync": "sincronizar (sync)", + "historyReplace": "reemplazar (replace)", + "historyOutline": "esquema (outline)", "htmlBlockError": "La ejecución del siguiente script afectará la visualización de la interfaz y el script ha dejado de ejecutarse", "fileHistory": "Historial de archivos", "htmlBlockTip": "Se forman varios bloques HTML. Para evitar la pérdida de datos, utilice etiquetas <div> para ajustar y eliminar líneas en blanco", @@ -1068,7 +1078,7 @@ "about": "Acerca de", "about1": "Copyright (c) 2022-presente • Hi-Windom • Política de privacidadAcuerdo de usuario", "about2": "Uso en el navegador", - "about3": "Por favor, utilice el navegador Chrome y manténgalo en la misma red que el ordenador, puerto ${port}(Además del puerto aleatorio, el primer espacio de trabajo iniciado también escuchará automáticamente 6806 como un puerto fijo, por lo que es conveniente que el navegador recorte extensiones u otros programas externos para llamar a la interfaz del kernel), las direcciones que se pueden conectar son las siguientes: ", + "about3": "Por favor, utilice el navegador Chrome y manténgalo en la misma red que el ordenador, puerto ${port}(Además del puerto aleatorio, el primer espacio de trabajo iniciado también escuchará automáticamente 58131 como un puerto fijo, por lo que es conveniente que el navegador recorte extensiones u otros programas externos para llamar a la interfaz del kernel), las direcciones que se pueden conectar son las siguientes: ", "about4": "Abrir el navegador", "about5": "Código de autorización de acceso", "about6": "Después de la configuración, se utilizará como contraseña de autenticación de acceso, déjelo en blanco para cerrar la autenticación", @@ -1079,7 +1089,7 @@ "about11": "Red de servicio", "about12": "Después de habilitarlo, se permitirá el acceso a otros dispositivos de la misma LAN. La aplicación se cerrará automáticamente después de la modificación, por favor reinicie manualmente", "about13": "Token API", - "about14": "El token debe ser autentificado al llamar a la API", + "about14": "El token debe ser autentificado al llamar a la API
Encabezado de solicitud HTTP Authorization: token ${token}", "about17": "No habilite el proxy cuando esté configurado como Conexión directa", "about18": "Cuando se utiliza una dirección sin bucle invertido (127.0.0.1/[::1] ) Primero configure el Código de autorización de acceso", "checkUpdate": "Comprobar actualización", @@ -1451,6 +1461,9 @@ "235": "[%d/%d] está actualizando el paquete del mercado...", "236": "[%d/%d] está actualizando el paquete del mercado [%s]...", "237": "[%d] todos los paquetes del mercado se han actualizado correctamente", - "238": "Error en la actualización del paquete Marketplace [%s], inténtalo de nuevo más tarde" + "238": "Error en la actualización del paquete Marketplace [%s], inténtalo de nuevo más tarde", + "239": "Las operaciones relacionadas se están procesando, inténtalo de nuevo más tarde", + "240": "No se admite arrastrar encabezado debajo de los bloques contenedores en el documento", + "241": "No se admite arrastrar a su subtítulo" } } diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index 332a18d2b7..955761ea9f 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1,4 +1,6 @@ { + "updateLayout": "Mettre à jour la mise en page", + "dndFolderTip": "Veuillez noter que ${x} insère uniquement le lien hypertexte file:// et ne copie pas le fichier", "removeCol": "Êtes-vous sûr de vouloir supprimer la colonne ${x} de la base de données ?", "video": "Vidéo", "audio": "Audio", @@ -434,6 +436,14 @@ "autoDownloadUpdatePkgTip": "Après l'ouverture, il vérifiera automatiquement la mise à jour de la version toutes les deux heures. S'il existe une version mise à jour, il téléchargera automatiquement le package d'installation et demandera l'installation", "downloaded": "Téléchargé", "allOp": "Toutes les opérations", + "allNotebooks": "Tous les cahiers", + "historyClean": "nettoyer (clean)", + "historyUpdate": "mettre à jour (update)", + "historyDelete": "supprimer (delete)", + "historyFormat": "formater (format)", + "historySync": "synchroniser (sync)", + "historyReplace": "remplacer (replace)", + "historyOutline": "contour (outline)", "htmlBlockError": "L'exécution du script suivant affectera l'affichage de l'interface et le script a cessé de s'exécuter", "fileHistory": "Historique des fichiers", "htmlBlockTip": "Plusieurs blocs HTML sont formés. Pour éviter la perte de données, veuillez utiliser les balises <div> pour envelopper et supprimer les lignes vides", @@ -1068,7 +1078,7 @@ "about": "À propos de", "about1": "Copyright (c) 2022-présent • Hi-Windom • Politique de confidentialitéAccord de l'utilisateur", "about2": "Utiliser sur le navigateur", - "about3": "Veuillez utiliser le navigateur Chrome et le garder sur le même réseau que l'ordinateur, port ${port}(En plus du port aléatoire, le premier espace de travail démarré écoutera également automatiquement 6806 en tant que port fixe, de sorte qu'il est pratique pour le navigateur de couper des extensions ou d'autres programmes externes pour appeler l'interface du noyau), les adresses pouvant être connectées sont les suivantes: ", + "about3": "Veuillez utiliser le navigateur Chrome et le garder sur le même réseau que l'ordinateur, port ${port}(En plus du port aléatoire, le premier espace de travail démarré écoutera également automatiquement 58131 en tant que port fixe, de sorte qu'il est pratique pour le navigateur de couper des extensions ou d'autres programmes externes pour appeler l'interface du noyau), les adresses pouvant être connectées sont les suivantes: ", "about4": "Ouvrir le navigateur", "about5": "Accès code d'autorisation", "about6": "Configuré comme mot de passe d'authentification d'accès, laisser vide pour désactiver l'authentification.", @@ -1079,7 +1089,7 @@ "about11": "Service de réseau", "about12": "Après l'activation, les autres appareils du même réseau local seront autorisés à accéder. L'application sera fermée automatiquement après modification, veuillez la redémarrer manuellement.", "about13": "API token", - "about14": "Le token doit être authentifié lors de l'appel de l'API.", + "about14": "Le token doit être authentifié lors de l'appel de l'API
En-tête de requête HTTP Authorization: token ${token}", "about17": "N'activez pas le proxy lorsqu'il est défini sur Connexion directe.", "about18": "Lors de l'utilisation d'une adresse sans bouclage (127.0.0.1/[::1] ) Veuillez d'abord définir le Accès code d'autorisation", "checkUpdate": "Vérifier la mise à jour", @@ -1451,6 +1461,9 @@ "235": "[%d/%d] met à jour le package Marketplace...", "236": "[%d/%d] met à jour le package Marketplace [%s]...", "237": "[%d] packages Marketplace ont tous été mis à jour avec succès", - "238": "La mise à jour du package Marketplace [%s] a échoué, veuillez réessayer plus tard" + "238": "La mise à jour du package Marketplace [%s] a échoué, veuillez réessayer plus tard", + "239": "Les opérations associées sont en cours de traitement, veuillez réessayer plus tard", + "240": "Le déplacement du titre sous les blocs conteneurs dans la doc n'est pas pris en charge", + "241": "Le glisser vers son sous-titre n'est pas pris en charge" } } diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 85fa06a4d1..466cff1af9 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1,4 +1,6 @@ { + "updateLayout": "更新版面配置", + "dndFolderTip": "請注意 ${x} 僅插入 file:// 超鏈接,不複製檔案", "removeCol": "確定刪除資料庫中的 ${x} 欄位?", "video": "影片", "audio": "音訊", @@ -434,6 +436,14 @@ "autoDownloadUpdatePkgTip": "啟用後會每隔兩小時自動檢查版本更新,如果有更新版本則自動下載安裝檔並提示安裝", "downloaded": "已下載", "allOp": "所有操作", + "allNotebooks": "所有筆記本", + "historyClean": "清理  (clean)", + "historyUpdate": "更新  (update)", + "historyDelete": "刪除  (delete)", + "historyFormat": "格式化 (format)", + "historySync": "同步  (sync)", + "historyReplace": "替換  (replace)", + "historyOutline": "大綱  (outline)", "htmlBlockError": "以下 script 執行會影響界面顯示,已經停止運行該腳本", "fileHistory": "文件歷史", "htmlBlockTip": "形成了多個 HTML 塊,為防止資料丟失請使用 <div> 標籤包裹並去掉空行", @@ -1068,7 +1078,7 @@ "about": "關於", "about1": "版權所有 (c) 2020-現在 • 雲南鏈滴科技有限公司 • 隱私政策用戶協議", "about2": "在瀏覽器上使用", - "about3": "請使用 Chrome 瀏覽器並保持和電腦在同一個網路內,埠 ${port}(第一個啟動的工作空間除了隨機埠外也會自動偵聽 6806 作為固定埠,以方便瀏覽器剪藏擴展或者其他外部程序調用Kernel接口),可能連通的網絡地址:", + "about3": "請使用 Chrome 瀏覽器並保持和電腦在同一個網路內,埠 ${port}(第一個啟動的工作空間除了隨機埠外也會自動偵聽 58131 作為固定埠,以方便瀏覽器剪藏擴展或者其他外部程序調用Kernel接口),可能連通的網絡地址:", "about4": "打開瀏覽器", "about5": "存取授權碼", "about6": "配置後作為存取鑒權密碼,留空則關閉鑒權", @@ -1079,7 +1089,7 @@ "about11": "網路伺服", "about12": "啟用後將允許同一區域網內的其他設備進行存取。修改後會自動關閉應用,請手動重啟", "about13": "API token", - "about14": "調用 API 時需要通過該 token 進行鑒權", + "about14": "調用 API 時需要通過該 token 進行鑒權
HTTP 請求標頭 Authorization: token ${token}", "about17": "設置為 直接連接 時不啟用代理", "about18": "使用非環回地址(127.0.0.1/[::1])時請先設置訪問授權碼", "checkUpdate": "檢查更新", @@ -1451,6 +1461,9 @@ "235": "[%d/%d] 正在更新市集包...", "236": "[%d/%d] 正在更新市集包 [%s]...", "237": "[%d] 個市集包已經全部更新成功", - "238": "市集包 [%s] 更新失敗,請稍後再試" + "238": "市集包 [%s] 更新失敗,請稍後再試", + "239": "相關操作正在處理中,請稍後再試", + "240": "不支援拖曳文件中容器區塊下的標題", + "241": "不支持拖曳為自己的子標題" } } diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index 18c6cb1bf2..b487960f1a 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1,4 +1,6 @@ { + "updateLayout": "更新布局", + "dndFolderTip": "请注意 ${x} 仅插入 file:// 超链接,不复制文件", "removeCol": "确定删除数据库中的 ${x} 列?", "video": "视频", "audio": "音频", @@ -435,6 +437,14 @@ "autoDownloadUpdatePkgTip": "启用后会每隔两小时自动检查版本更新,如果有更新版本则自动下载安装包并提示安装", "downloaded": "已下载", "allOp": "所有操作", + "allNotebooks": "所有笔记本", + "historyClean": "清理  (clean)", + "historyUpdate": "更新  (update)", + "historyDelete": "删除  (delete)", + "historyFormat": "格式化 (format)", + "historySync": "同步  (sync)", + "historyReplace": "替换  (replace)", + "historyOutline": "大纲  (outline)", "htmlBlockError": "以下 script 执行会影响界面显示,已经停止运行该脚本", "fileHistory": "文件历史", "htmlBlockTip": "形成了多个 HTML 块,为防止数据丢失请使用 <div> 标签包裹并去掉空行", @@ -1080,9 +1090,9 @@ "about11": "网络伺服", "about12": "启用后将允许同一局域网内的其他设备进行访问。修改后不会自动关闭应用,请手动重启", "about13": "API token", - "about14": "调用 API 时需要通过该 token 进行鉴权", + "about14": "调用 API 时需要通过该 token 进行鉴权
HTTP 请求标头 Authorization: token ${token}", "about17": "设置为 直接连接 时不启用代理", - "about18": "使用非环回地址(127.0.0.1/[::1])时请先设置 访问授权码", + "about18": "未设置访问授权码时仅可通过环回地址(127.0.0.1/[::1])访问", "checkUpdate": "检查更新", "currentVer": "当前版本", "downloadLatestVer": "下载最新版", @@ -1453,6 +1463,9 @@ "235": "[%d/%d] 正在更新集市包...", "236": "[%d/%d] 正在更新集市包 [%s]...", "237": "[%d] 个集市包已经全部更新成功", - "238": "集市包 [%s] 更新失败,请稍后再试" + "238": "集市包 [%s] 更新失败,请稍后再试", + "239": "相关操作正在处理中,请稍后再试", + "240": "不支持拖拽文档中容器块下的标题", + "241": "不支持拖拽为自己的子标题" } } diff --git a/app/apps/deno/deno-aarch64-apple-darwin.zip b/app/apps/deno/deno-aarch64-apple-darwin.zip deleted file mode 100644 index f1bcac278c..0000000000 Binary files a/app/apps/deno/deno-aarch64-apple-darwin.zip and /dev/null differ diff --git a/app/apps/deno/deno-x86_64-apple-darwin.zip b/app/apps/deno/deno-x86_64-apple-darwin.zip deleted file mode 100644 index db3bdc3c6d..0000000000 Binary files a/app/apps/deno/deno-x86_64-apple-darwin.zip and /dev/null differ diff --git a/app/apps/deno/deno-x86_64-pc-windows-msvc.zip b/app/apps/deno/deno-x86_64-pc-windows-msvc.zip index 857a69a16d..85cbafd0dc 100644 Binary files a/app/apps/deno/deno-x86_64-pc-windows-msvc.zip and b/app/apps/deno/deno-x86_64-pc-windows-msvc.zip differ diff --git a/app/apps/deno/deno-x86_64-unknown-linux-gnu.zip b/app/apps/deno/deno-x86_64-unknown-linux-gnu.zip index 4314bc2d52..89ea4f1b63 100644 Binary files a/app/apps/deno/deno-x86_64-unknown-linux-gnu.zip and b/app/apps/deno/deno-x86_64-unknown-linux-gnu.zip differ diff --git a/app/appx/AppxManifest.xml b/app/appx/AppxManifest.xml index bfc4c8f582..eb0308f76d 100644 --- a/app/appx/AppxManifest.xml +++ b/app/appx/AppxManifest.xml @@ -9,7 +9,7 @@ + Version="3.0.6.0"/> SiYuan 云南链滴科技有限公司 diff --git a/app/changelogs/v0.19-sillot.md b/app/changelogs/v0.19-sillot.md index 659e4efa6b..335c423e70 100644 --- a/app/changelogs/v0.19-sillot.md +++ b/app/changelogs/v0.19-sillot.md @@ -7,7 +7,7 @@ 🚢 [Docker image](https://hub.docker.com/r/soltus/sillot/tags?page=1&ordering=last_updated) 📱 [Android application package](https://github.com/Hi-Windom/Sillot-android/releases) 📦 [Chromium Browser Extension](https://github.com/K-Sillot/Sillot-Be/releases)

- +

--- diff --git a/app/changelogs/v0.22-sillot.md b/app/changelogs/v0.22-sillot.md index fe970c8b7f..1bc63980f8 100644 --- a/app/changelogs/v0.22-sillot.md +++ b/app/changelogs/v0.22-sillot.md @@ -7,7 +7,7 @@ 🚢 [Docker image](https://hub.docker.com/r/soltus/sillot/tags?page=1&ordering=last_updated) 📱 [Android application package](https://github.com/Hi-Windom/Sillot-android/releases) 📦 [Chromium Browser Extension](https://github.com/K-Sillot/Sillot-Be/releases)

- +

--- diff --git a/app/changelogs/v0.23-sillot.md b/app/changelogs/v0.23-sillot.md index 17da1d1a39..5fa036e994 100644 --- a/app/changelogs/v0.23-sillot.md +++ b/app/changelogs/v0.23-sillot.md @@ -7,7 +7,7 @@ 🚢 [Docker image](https://hub.docker.com/r/soltus/sillot/tags?page=1&ordering=last_updated) 📱 [Android application package](https://github.com/Hi-Windom/Sillot-android/releases) 📦 [Chromium Browser Extension](https://github.com/K-Sillot/Sillot-Be/releases)

- +

--- diff --git a/app/changelogs/v0.24-sillot.md b/app/changelogs/v0.24-sillot.md index e2bad9836d..38d5c5aed3 100644 --- a/app/changelogs/v0.24-sillot.md +++ b/app/changelogs/v0.24-sillot.md @@ -7,7 +7,7 @@ 🚢 [Docker image](https://hub.docker.com/r/soltus/sillot/tags?page=1&ordering=last_updated) 📱 [Android application package](https://github.com/Hi-Windom/Sillot-android/releases) 📦 [Chromium Browser Extension](https://github.com/K-Sillot/Sillot-Be/releases)

- +

--- diff --git a/app/changelogs/v0.25-sillot.md b/app/changelogs/v0.25-sillot.md index abb47b5810..2fd11d54c5 100644 --- a/app/changelogs/v0.25-sillot.md +++ b/app/changelogs/v0.25-sillot.md @@ -7,7 +7,7 @@ 🚢 [Docker image](https://hub.docker.com/r/soltus/sillot/tags?page=1&ordering=last_updated) 📱 [Android application package](https://github.com/Hi-Windom/Sillot-android/releases) 📦 [Chromium Browser Extension](https://github.com/K-Sillot/Sillot-Be/releases)

- +

--- diff --git a/app/changelogs/v0.26-sillot.md b/app/changelogs/v0.26-sillot.md index 116bbae05f..2f8cbc5d16 100644 --- a/app/changelogs/v0.26-sillot.md +++ b/app/changelogs/v0.26-sillot.md @@ -7,7 +7,7 @@ 🚢 [Docker image](https://hub.docker.com/r/soltus/sillot/tags?page=1&ordering=last_updated) 📱 [Android application package](https://github.com/Hi-Windom/Sillot-android/releases) 📦 [Chromium Browser Extension](https://github.com/K-Sillot/Sillot-Be/releases)

- +

--- diff --git a/app/changelogs/v3.0.5/v3.0.5_zh_CHT.md b/app/changelogs/v3.0.5/v3.0.5_zh_CHT.md index 641b497239..698b83b892 100644 --- a/app/changelogs/v3.0.5/v3.0.5_zh_CHT.md +++ b/app/changelogs/v3.0.5/v3.0.5_zh_CHT.md @@ -34,9 +34,9 @@ * [資源檔案連結元素遊標懸浮提示更多資訊](https://github.com/siyuan-note/siyuan/issues/10714) * [建立文件時在地化標題](https://github.com/siyuan-note/siyuan/issues/10719) * [建立資料庫後預設新增單選欄位](https://github.com/siyuan-note/siyuan/issues/10720) -* [改進屬性面板 - 資料庫 編輯遊標樣式](https://github.com/siyuan-note/siyuan/issues/10721) +* [改進 屬性面板 - 資料庫 編輯遊標樣式](https://github.com/siyuan-note/siyuan/issues/10721) * [改進拖曳文件內容時的遊標樣式](https://github.com/siyuan-note/siyuan/issues/10727) -* [在屬性面板 - 資料庫 中刪除欄位時進行提示](https://github.com/siyuan-note/siyuan/issues/10729) +* [在 屬性面板 - 資料庫 中刪除欄位時進行提示](https://github.com/siyuan-note/siyuan/issues/10729) * [改進閃卡更多選單介面](https://github.com/siyuan-note/siyuan/issues/10735) ### 修復缺陷 @@ -61,4 +61,4 @@ ## 下載 * [B3log](https://b3log.org/siyuan/download.html) -* [GitHub](https://github.com/siyuan-note/siyuan/releases) \ No newline at end of file +* [GitHub](https://github.com/siyuan-note/siyuan/releases) diff --git a/app/changelogs/v3.0.5/v3.0.5_zh_CN.md b/app/changelogs/v3.0.5/v3.0.5_zh_CN.md index 76618983a7..5b640600b0 100644 --- a/app/changelogs/v3.0.5/v3.0.5_zh_CN.md +++ b/app/changelogs/v3.0.5/v3.0.5_zh_CN.md @@ -34,9 +34,9 @@ * [资源文件链接元素光标悬浮提示更多信息](https://github.com/siyuan-note/siyuan/issues/10714) * [创建文档时本地化标题](https://github.com/siyuan-note/siyuan/issues/10719) * [创建数据库后默认添加单选字段](https://github.com/siyuan-note/siyuan/issues/10720) -* [改进属性面板 - 数据库 编辑光标样式](https://github.com/siyuan-note/siyuan/issues/10721) +* [改进 属性面板 - 数据库 编辑光标样式](https://github.com/siyuan-note/siyuan/issues/10721) * [改进拖拽文档内容时的光标样式](https://github.com/siyuan-note/siyuan/issues/10727) -* [在属性面板 - 数据库 中删除字段时进行提示](https://github.com/siyuan-note/siyuan/issues/10729) +* [在 属性面板 - 数据库 中删除字段时进行提示](https://github.com/siyuan-note/siyuan/issues/10729) * [改进闪卡更多菜单界面](https://github.com/siyuan-note/siyuan/issues/10735) ### 修复缺陷 diff --git a/app/changelogs/v3.0.6/v3.0.6.md b/app/changelogs/v3.0.6/v3.0.6.md new file mode 100644 index 0000000000..5119548389 --- /dev/null +++ b/app/changelogs/v3.0.6/v3.0.6.md @@ -0,0 +1,65 @@ +## Overview + +This version supports dragging and dropping to adjust the level and position of outline items in the outline panel. + +## Changelogs + +Below are the detailed changes in this version. + +### Enhancement + +* [The outline item in the outline panel supports dragging to adjust the level and position](https://github.com/siyuan-note/siyuan/issues/7957) +* [Improve image click interaction on the mobile](https://github.com/siyuan-note/siyuan/issues/10646) +* [Database table view primary key supports pasting reference block](https://github.com/siyuan-note/siyuan/issues/10690) +* [Leave two lines space to connect when turning pages up and down](https://github.com/siyuan-note/siyuan/issues/10702) +* [Improve database table view URL field display](https://github.com/siyuan-note/siyuan/issues/10712) +* [No longer prompts "Don't panic... scroll up and down to load more" when opening a doc and the first block has been loaded](https://github.com/siyuan-note/siyuan/issues/10716) +* [When not focused in SiYuan window, the left option of Database row is hard to select](https://github.com/siyuan-note/siyuan/issues/10731) +* [Support opening images through other apps on the Android](https://github.com/siyuan-note/siyuan/issues/10736) +* [Improved tab menu shake issue](https://github.com/siyuan-note/siyuan/issues/10737) +* [Improve database table view multi-select interaction](https://github.com/siyuan-note/siyuan/issues/10738) +* [Support search code snippets](https://github.com/siyuan-note/siyuan/issues/10739) +* [Improve exit focus positioning](https://github.com/siyuan-note/siyuan/issues/10746) +* [`Hide/Show Window` supports configuration `Alt+Fn`](https://github.com/siyuan-note/siyuan/issues/10754) +* [`Hide/Show Window` is only for workspaces](https://github.com/siyuan-note/siyuan/issues/10755) +* [Improve the handling of empty values in database multi-field sorting](https://github.com/siyuan-note/siyuan/issues/10758) +* [Improve marketplace package UI](https://github.com/siyuan-note/siyuan/pull/10760) +* [Click to add row in database table view row menu](https://github.com/siyuan-note/siyuan/issues/10763) +* [Automatically loads and indexes from the file system when a block is not found](https://github.com/siyuan-note/siyuan/issues/10772) +* [Add `Open with New Window` to flashcard menu](https://github.com/siyuan-note/siyuan/issues/10773) +* [Prompt when dragging and inserting a folder](https://github.com/siyuan-note/siyuan/issues/10779) +* [Support editing saved layouts](https://github.com/siyuan-note/siyuan/issues/10783) +* [Improve data sync conflict generation](https://github.com/siyuan-note/siyuan/issues/10784) +* [Data history supports querying in all notebooks](https://github.com/siyuan-note/siyuan/issues/10788) +* [Improve i18n for Data History](https://github.com/siyuan-note/siyuan/pull/10793) +* [Database rollup supports numeric calculation](https://github.com/siyuan-note/siyuan/issues/10796) +* [Improve web clip table parsing](https://github.com/siyuan-note/siyuan/issues/10799) +* [`Ctrl+Home` doesn't work when document is in read-only mode](https://github.com/siyuan-note/siyuan/issues/10806) +* [Hyperlink should not open when selecting text on it](https://github.com/siyuan-note/siyuan/issues/10808) +* [Datbase template supports numerical calculations when using rollup](https://github.com/siyuan-note/siyuan/issues/10810) +* [Improve cursor style for ref and pdf ref in read-only mode](https://github.com/siyuan-note/siyuan/issues/10813) +* [Improve copying plain text](https://github.com/siyuan-note/siyuan/issues/10816) +* [Improve database rollup number calculation](https://github.com/siyuan-note/siyuan/issues/10822) + +### Bugfix + +* [Disable right-click menu in database table view column in read-only mode](https://github.com/siyuan-note/siyuan/issues/10750) +* [Inline-level formulas cannot be displayed after pressing Enter](https://github.com/siyuan-note/siyuan/issues/10751) +* [Breadcrumb XSS](https://github.com/siyuan-note/siyuan/issues/10753) +* [Editor parsing exception after enter /```](https://github.com/siyuan-note/siyuan/issues/10759) +* [Index fixing should not be performed before data synchronization](https://github.com/siyuan-note/siyuan/issues/10761) +* [Flash card in new window full screen, buttons cannot be clicked](https://github.com/siyuan-note/siyuan/issues/10765) +* [Floating window `Enter` error from embedded block](https://github.com/siyuan-note/siyuan/issues/10805) +* [Attribute panel - Database template custom attributes not shown](https://github.com/siyuan-note/siyuan/issues/10812) +* [Export PDF error when containing HTML block](https://github.com/siyuan-note/siyuan/issues/10814) +* [Copy text * error for database block](https://github.com/siyuan-note/siyuan/issues/10817) + +### Development + +* [Plugin eventbus for `switch-protyle` on the mobile](https://github.com/siyuan-note/siyuan/issues/10766) +* [Improve kernel API token authentication](https://github.com/siyuan-note/siyuan/issues/10792) + +## Download + +* [B3log](https://b3log.org/siyuan/en/download.html) +* [GitHub](https://github.com/siyuan-note/siyuan/releases) diff --git a/app/changelogs/v3.0.6/v3.0.6_zh_CHT.md b/app/changelogs/v3.0.6/v3.0.6_zh_CHT.md new file mode 100644 index 0000000000..5da0637d0e --- /dev/null +++ b/app/changelogs/v3.0.6/v3.0.6_zh_CHT.md @@ -0,0 +1,65 @@ +## 概述 + +該版本支持在大綱面板中拖拽調整大綱項的級別和位置。 + +## 變更記錄 + +以下是此版本中的詳細變更。 + +### 改進功能 + +* [大綱面板中的大綱項支持拖動調整級別和位置](https://github.com/siyuan-note/siyuan/issues/7957) +* [改進移動端上的圖片點擊交互](https://github.com/siyuan-note/siyuan/issues/10646) +* [數據庫表格視圖主鍵支持粘貼引用塊](https://github.com/siyuan-note/siyuan/issues/10690) +* [上下翻頁時留兩行空間](https://github.com/siyuan-note/siyuan/issues/10702) +* [改進數據庫表格視圖 URL 字段顯示](https://github.com/siyuan-note/siyuan/issues/10712) +* [打開文檔並加載了第一個塊時不再提示 "不要驚慌...上下滾動即可加載更多內容"](https://github.com/siyuan-note/siyuan/issues/10716) +* [在思源窗口未聚焦時數據庫行的左選項難以選擇](https://github.com/siyuan-note/siyuan/issues/10731) +* [Android 端支援透過其他應用程式開啟圖片](https://github.com/siyuan-note/siyuan/issues/10736) +* [改進標籤菜單抖動問題](https://github.com/siyuan-note/siyuan/issues/10737) +* [改進數據庫表格視圖多選交互](https://github.com/siyuan-note/siyuan/issues/10738) +* [支持搜索代碼片段](https://github.com/siyuan-note/siyuan/issues/10739) +* [改進退出聚焦定位](https://github.com/siyuan-note/siyuan/issues/10746) +* [`隱藏/顯示窗口`支持配置`Alt+Fn`](https://github.com/siyuan-note/siyuan/issues/10754) +* [`隱藏/顯示窗口`僅適用於工作區](https://github.com/siyuan-note/siyuan/issues/10755) +* [改進數據庫多字段排序中空值的處理](https://github.com/siyuan-note/siyuan/issues/10758) +* [改進集市包界面](https://github.com/siyuan-note/siyuan/pull/10760) +* [在數據庫表格視圖行菜單中點擊添加行](https://github.com/siyuan-note/siyuan/issues/10763) +* [當塊未找到時自動從文件系統加載和索引](https://github.com/siyuan-note/siyuan/issues/10772) +* [在閃卡菜單中添加 `新窗口打開`](https://github.com/siyuan-note/siyuan/issues/10773) +* [拖動並插入文件夾時提示](https://github.com/siyuan-note/siyuan/issues/10779) +* [支持編輯保存的佈局](https://github.com/siyuan-note/siyuan/issues/10783) +* [改進數據同步衝突生成](https://github.com/siyuan-note/siyuan/issues/10784) +* [數據歷史支持在所有筆記本中查詢](https://github.com/siyuan-note/siyuan/issues/10788) +* [改進數據歷史的多語言](https://github.com/siyuan-note/siyuan/pull/10793) +* [數據庫匯總支持數字計算](https://github.com/siyuan-note/siyuan/issues/10796) +* [改進網頁剪藏表格解析](https://github.com/siyuan-note/siyuan/issues/10799) +* [`Ctrl+Home` 在文檔處於只讀模式時無法工作](https://github.com/siyuan-note/siyuan/issues/10806) +* [在其上選擇文本時不應打開超鏈接](https://github.com/siyuan-note/siyuan/issues/10808) +* [數據庫模板在使用匯總時支持數字計算](https://github.com/siyuan-note/siyuan/issues/10810) +* [改進只讀模式下的引用和 PDF 引用光標樣式](https://github.com/siyuan-note/siyuan/issues/10813) +* [改進複製純文本](https://github.com/siyuan-note/siyuan/issues/10816) +* [改進數據庫匯總數字計算](https://github.com/siyuan-note/siyuan/issues/10822) + +### 修復缺陷 + +* [在只讀模式下禁用數據庫表格視圖列的右鍵菜單](https://github.com/siyuan-note/siyuan/issues/10750) +* [按 Enter 後行級公式無法顯示](https://github.com/siyuan-note/siyuan/issues/10751) +* [面包屑 XSS](https://github.com/siyuan-note/siyuan/issues/10753) +* [輸入 /``` 後編輯器解析異常](https://github.com/siyuan-note/siyuan/issues/10759) +* [在數據同步之前不應進行索引修復](https://github.com/siyuan-note/siyuan/issues/10761) +* [新窗口全屏閃卡按鈕無法點擊](https://github.com/siyuan-note/siyuan/issues/10765) +* [從嵌入塊進入浮動窗口 `Enter` 異常](https://github.com/siyuan-note/siyuan/issues/10805) +* [屬性面板 - 數據庫 模板自定義屬性未顯示](https://github.com/siyuan-note/siyuan/issues/10812) +* [包含 HTML 塊時導出 PDF 異常](https://github.com/siyuan-note/siyuan/issues/10814) +* [數據庫塊複製文本*異常](https://github.com/siyuan-note/siyuan/issues/10817) + +### 開發者 + +* [移動端提供插件事件總線 `switch-protyle`](https://github.com/siyuan-note/siyuan/issues/10766) +* [改進內核 API Token 校驗](https://github.com/siyuan-note/siyuan/issues/10792) + +## 下載 + +* [B3log](https://b3log.org/siyuan/download.html) +* [GitHub](https://github.com/siyuan-note/siyuan/releases) diff --git a/app/changelogs/v3.0.6/v3.0.6_zh_CN.md b/app/changelogs/v3.0.6/v3.0.6_zh_CN.md new file mode 100644 index 0000000000..2fad57548f --- /dev/null +++ b/app/changelogs/v3.0.6/v3.0.6_zh_CN.md @@ -0,0 +1,65 @@ +## 概述 + +该版本支持在大纲面板中拖拽调整大纲项的级别和位置。 + +## 变更记录 + +以下是此版本中的详细变更。 + +### 改进功能 + +* [大纲面板中的大纲项支持拖动调整级别和位置](https://github.com/siyuan-note/siyuan/issues/7957) +* [改进移动端上的图片点击交互](https://github.com/siyuan-note/siyuan/issues/10646) +* [数据库表格视图主键支持粘贴引用块](https://github.com/siyuan-note/siyuan/issues/10690) +* [上下翻页时留两行空间](https://github.com/siyuan-note/siyuan/issues/10702) +* [改进数据库表格视图 URL 字段显示](https://github.com/siyuan-note/siyuan/issues/10712) +* [打开文档并加载了第一个块时不再提示 "不要惊慌...上下滚动即可加载更多内容"](https://github.com/siyuan-note/siyuan/issues/10716) +* [在思源窗口未聚焦时数据库行的左选项难以选择](https://github.com/siyuan-note/siyuan/issues/10731) +* [Android 端支持通过其他应用打开图片](https://github.com/siyuan-note/siyuan/issues/10736) +* [改进标签菜单抖动问题](https://github.com/siyuan-note/siyuan/issues/10737) +* [改进数据库表格视图多选交互](https://github.com/siyuan-note/siyuan/issues/10738) +* [支持搜索代码片段](https://github.com/siyuan-note/siyuan/issues/10739) +* [改进退出聚焦定位](https://github.com/siyuan-note/siyuan/issues/10746) +* [`隐藏/显示窗口`支持配置`Alt+Fn`](https://github.com/siyuan-note/siyuan/issues/10754) +* [`隐藏/显示窗口`仅适用于工作区](https://github.com/siyuan-note/siyuan/issues/10755) +* [改进数据库多字段排序中空值的处理](https://github.com/siyuan-note/siyuan/issues/10758) +* [改进集市包界面](https://github.com/siyuan-note/siyuan/pull/10760) +* [在数据库表格视图行菜单中点击添加行](https://github.com/siyuan-note/siyuan/issues/10763) +* [当块未找到时自动从文件系统加载和索引](https://github.com/siyuan-note/siyuan/issues/10772) +* [在闪卡菜单中添加 `新窗口打开`](https://github.com/siyuan-note/siyuan/issues/10773) +* [拖动并插入文件夹时提示](https://github.com/siyuan-note/siyuan/issues/10779) +* [支持编辑保存的布局](https://github.com/siyuan-note/siyuan/issues/10783) +* [改进数据同步冲突生成](https://github.com/siyuan-note/siyuan/issues/10784) +* [数据历史支持在所有笔记本中查询](https://github.com/siyuan-note/siyuan/issues/10788) +* [改进数据历史的多语言](https://github.com/siyuan-note/siyuan/pull/10793) +* [数据库汇总支持数字计算](https://github.com/siyuan-note/siyuan/issues/10796) +* [改进网页剪藏表格解析](https://github.com/siyuan-note/siyuan/issues/10799) +* [`Ctrl+Home` 在文档处于只读模式时无法工作](https://github.com/siyuan-note/siyuan/issues/10806) +* [在其上选择文本时不应打开超链接](https://github.com/siyuan-note/siyuan/issues/10808) +* [数据库模板在使用汇总时支持数字计算](https://github.com/siyuan-note/siyuan/issues/10810) +* [改进只读模式下的引用和 PDF 引用光标样式](https://github.com/siyuan-note/siyuan/issues/10813) +* [改进复制纯文本](https://github.com/siyuan-note/siyuan/issues/10816) +* [改进数据库汇总数字计算](https://github.com/siyuan-note/siyuan/issues/10822) + +### 修复缺陷 + +* [在只读模式下禁用数据库表格视图列的右键菜单](https://github.com/siyuan-note/siyuan/issues/10750) +* [按 Enter 后行级公式无法显示](https://github.com/siyuan-note/siyuan/issues/10751) +* [面包屑 XSS](https://github.com/siyuan-note/siyuan/issues/10753) +* [输入 /``` 后编辑器解析异常](https://github.com/siyuan-note/siyuan/issues/10759) +* [在数据同步之前不应进行索引修复](https://github.com/siyuan-note/siyuan/issues/10761) +* [新窗口全屏闪卡按钮无法点击](https://github.com/siyuan-note/siyuan/issues/10765) +* [从嵌入块进入浮动窗口 `Enter` 异常](https://github.com/siyuan-note/siyuan/issues/10805) +* [属性面板 - 数据库 模板自定义属性未显示](https://github.com/siyuan-note/siyuan/issues/10812) +* [包含 HTML 块时导出 PDF 异常](https://github.com/siyuan-note/siyuan/issues/10814) +* [数据库块复制文本*异常](https://github.com/siyuan-note/siyuan/issues/10817) + +### 开发者 + +* [移动端提供插件事件总线 `switch-protyle`](https://github.com/siyuan-note/siyuan/issues/10766) +* [改进内核 API Token 校验](https://github.com/siyuan-note/siyuan/issues/10792) + +## 下载 + +* [B3log](https://b3log.org/siyuan/download.html) +* [GitHub](https://github.com/siyuan-note/siyuan/releases) diff --git a/app/electron/main.js b/app/electron/main.js index c333b5c7c1..94e3b5a180 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -15,8 +15,6 @@ // along with this program. If not, see . -// 此文件中的控制台输出,可以使用 debugtron 查看 -// https://github.com/pd4d10/debugtron const { net, app, @@ -39,17 +37,75 @@ process.noAsar = true; const appDir = path.dirname(app.getAppPath()); const isDevEnv = process.env.NODE_ENV === "development"; const DevMode = process.env.MODE === "dlv" ? "dlv" : "exec"; -let appVer = app.getVersion(); -try { require("electron-reloader")(module); } catch {} - -let pkg = {}; +const appVer = app.getVersion(); if (isDevEnv) { - pkg = JSON.parse(fs.readFileSync(path.join(appDir, "package.json")).toString()); - if (pkg.version) { appVer = pkg.version;} + appIcon = path.join(appDir, "app", "stage", "icon-large.png"); } else { - pkg = JSON.parse(fs.readFileSync(path.join(appDir, "app", "package.json")).toString()); + appIcon = path.join(appDir, "stage", "icon-large.png"); } -const VerSY = pkg.syv; +console.log("appVer: ", appVer) +console.log("isDevEnv: ", isDevEnv) +console.log("DevMode: ", DevMode) +console.log("appDir: ", appDir) +console.log("appIcon: ", appIcon) +try { require("electron-reloader")(module); } catch {} +const logFileName = 'electron-main.log'; +const logFile = path.join(appDir, logFileName); +const originalLog = console.log; +const originalError = console.error; +const originalWarn = console.warn; +const formatTimestamp = () => { + const now = new Date(); + const year = now.getFullYear(); + const month = String(now.getMonth() + 1).padStart(2, '0'); + const day = String(now.getDate()).padStart(2, '0'); + const hours = String(now.getHours()).padStart(2, '0'); + const minutes = String(now.getMinutes()).padStart(2, '0'); + const seconds = String(now.getSeconds()).padStart(2, '0'); + return `${year}/${month}/${day}${hours}:${minutes}:${seconds}`; +}; +// 不重写 console.debug,配合使用 debugtron 查看. REF https://github.com/pd4d10/debugtron +console.log = function(...args) { + originalLog.apply(console, args); + const timestamp = formatTimestamp(); + const message = `I ${timestamp} main.js ${args.join(' ')}\n`; + fs.appendFile(logFile, message, (err) => { + if (err) { + originalError('Unable to write to log file:', err); + } + }); +}; +console.info = function(...args) { + originalLog.apply(console, args); + const timestamp = formatTimestamp(); + const message = `I ${timestamp} main.js ${args.join(' ')}\n`; + fs.appendFile(logFile, message, (err) => { + if (err) { + originalError('Unable to write to log file:', err); + } + }); +}; +console.error = function(...args) { + originalError.apply(console, args); + const timestamp = formatTimestamp(); + const message = `E ${timestamp} main.js ${args.join(' ')}\n`; + fs.appendFile(logFile, message, (err) => { + if (err) { + originalError('Unable to write to log file:', err); + } + }); +}; +console.warn = function(...args) { + originalWarn.apply(console, args); + const timestamp = formatTimestamp(); + const message = `W ${timestamp} main.js ${args.join(' ')}\n`; + fs.appendFile(logFile, message, (err) => { + if (err) { + originalError('Unable to write to log file:', err); + } + }); +}; + const confDir = path.join(app.getPath("home"), ".config", "sillot"); const windowStatePath = path.join(confDir, "windowState.json"); let bootWindow; @@ -61,6 +117,7 @@ let resetWindowStateOnRestart = false; remote.initialize(); if (!app.requestSingleInstanceLock()) { + app.clearRecentDocuments(); app.quit(); } @@ -98,13 +155,13 @@ const hotKey2Electron = (key) => { if (key.indexOf("⌥") > -1) { electronKey += "Alt+"; } - return electronKey + key.substr(key.length - 1); + return electronKey + key.replace("⌘", "").replace("⇧", "").replace("⌥", ""); }; const exitApp = (port, errorWindowId) => { let tray; let mainWindow; - + app.clearRecentDocuments() // 关闭端口相同的所有非主窗口 BrowserWindow.getAllWindows().forEach((item) => { try { @@ -190,7 +247,7 @@ const showErrorWindow = (title, content) => { width: Math.floor(screen.getPrimaryDisplay().size.width * 0.5), height: Math.floor(screen.getPrimaryDisplay().workAreaSize.height * 0.8), frame: false, - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, webPreferences: { nodeIntegration: true, webviewTag: true, webSecurity: false, contextIsolation: false, }, @@ -201,7 +258,7 @@ const showErrorWindow = (title, content) => { v: appVer, title: title, content: content, - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, }, }); errWindow.webContents.on('did-finish-load', () => { @@ -318,7 +375,7 @@ const boot = () => { }, frame: "darwin" === process.platform, titleBarStyle: "hidden", - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, }); remote.enable(currentWindow.webContents); @@ -463,9 +520,8 @@ const initKernel = (workspace, port, lang) => { height: Math.floor(screen.getPrimaryDisplay().workAreaSize.height / 2), frame: false, backgroundColor: "#1e1e1e", - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, }); - let bootIndex = path.join(appDir, "app", "electron", "boot.html"); if (isDevEnv) { bootIndex = path.join(appDir, "electron", "boot.html"); @@ -481,7 +537,7 @@ const initKernel = (workspace, port, lang) => { } else if (!isDevEnv) { kernelPath = path.join(appDir, "kernel", kernelName); } else { - kernelPath = path.join(appDir,"app", "kernel", kernelName); + kernelPath = path.join(appDir, "app", "kernel", kernelName); } console.log("debug: $kernelPath = " + kernelPath); if (!fs.existsSync(kernelPath) && DevMode === "exec") { @@ -621,6 +677,7 @@ const initKernel = (workspace, port, lang) => { try { const progressResult = await net.fetch(getServer() + "/api/system/bootProgress"); const progressData = await progressResult.json(); + bootWindow.setProgressBar(progressData.data.progress/100); if (progressData.data.progress >= 100) { resolve(true); progressing = true; @@ -639,6 +696,7 @@ const initKernel = (workspace, port, lang) => { progressing = true; } } + bootWindow.setProgressBar(-1); } } else { writeLog(`get kernel version failed: ${apiData.code}, ${apiData.msg}`); @@ -777,19 +835,18 @@ app.whenReady().then(() => { resetTrayMenu(tray, lang, mainWindow); }; + const getWindowByContentId = (id) => { - const wnd = BrowserWindow.getAllWindows().find((win) => win.webContents.id === id); - if (!wnd) { - return null; - } - return BrowserWindow.fromId(wnd.id); + return BrowserWindow.getAllWindows().find((win) => win.webContents.id === id); }; ipcMain.on("siyuan-open-folder", (event, filePath) => { if (filePath === "openWorkspacesLogFolder") { - let ws = JSON.parse(fs.readFileSync(path.join(confDir, "workspace.json")).toString()); + const ws = JSON.parse(fs.readFileSync(path.join(confDir, "workspace.json")).toString()); ws.forEach((workspacePath) => { - shell.showItemInFolder(path.join(workspacePath, "temp", "siyuan.log")); + const file = path.join(workspacePath, "temp", "siyuan.log"); + shell.showItemInFolder(file); + app.addRecentDocument(file); }); return; } @@ -797,14 +854,28 @@ app.whenReady().then(() => { }); ipcMain.on("siyuan-open-file", (event, filePath) => { if (filePath === "openAppLog") { - filePath = path.join(confDir, "app.log"); + shell.openPath(path.join(appDir, logFileName), (error) => { + if (error) { + console.error(`无法打开: ${filePath}. 错误信息: ${error.message}`); + } else { + app.addRecentDocument(path.join(appDir, logFileName)); + } + }); + shell.openPath(path.join(confDir, "app.log"), (error) => { + if (error) { + console.error(`无法打开: ${filePath}. 错误信息: ${error.message}`); + } else { + app.addRecentDocument(path.join(confDir, "app.log")); + } + }); + return; } + // 默认处理 shell.openPath(filePath, (error) => { if (error) { - // 如果有错误,返回错误信息 console.error(`无法打开: ${filePath}. 错误信息: ${error.message}`); } else { - // 如果成功,返回空字符串 + console.log(filePath, " opened by siyuan-open-file") } }); }); @@ -815,7 +886,7 @@ app.whenReady().then(() => { if (data.cmd === "showOpenDialog") { return dialog.showOpenDialog(data); } - if (data.cmd === "getCurrentWindowId") { + if (data.cmd === "getContentsId") { return event.sender.id; } if (data.cmd === "setProxy") { @@ -911,8 +982,8 @@ app.whenReady().then(() => { case "openDevTools": event.sender.openDevTools({mode: "bottom"}); break; - case "unregisterAll": - globalShortcut.unregisterAll(); + case "unregisterGlobalShortcut": + globalShortcut.unregister(hotKey2Electron(data.accelerator)); break; case "show": if (!currentWindow) { @@ -1034,13 +1105,15 @@ app.whenReady().then(() => { }); ipcMain.on("siyuan-export-newwindow", (event, data) => { // The PDF/Word export preview window automatically adjusts according to the size of the main window https://github.com/siyuan-note/siyuan/issues/10554 + const wndBounds = getWindowByContentId(event.sender.id).getBounds(); + const wndScreen = screen.getDisplayNearestPoint({x: wndBounds.x, y: wndBounds.y}); const printWin = new BrowserWindow({ show: true, - width: Math.floor(screen.getPrimaryDisplay().size.width * 0.8), - height: Math.floor(screen.getPrimaryDisplay().workAreaSize.height * 0.8), + width: Math.floor(wndScreen.size.width * 0.8), + height: Math.floor(wndScreen.size.height * 0.8), resizable: true, frame: "darwin" === process.platform, - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, titleBarStyle: "hidden", webPreferences: { contextIsolation: false, @@ -1050,6 +1123,7 @@ app.whenReady().then(() => { autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587 }, }); + printWin.center(); printWin.webContents.userAgent = "SiYuan/" + appVer + " https://b3log.org/siyuan Electron " + printWin.webContents.userAgent; printWin.loadURL(data); printWin.webContents.on("will-navigate", (nEvent) => { @@ -1070,13 +1144,13 @@ app.whenReady().then(() => { const win = new BrowserWindow({ show: true, trafficLightPosition: {x: 8, y: 13}, - width: data.width || mainScreen.size.width * 0.7, - height: data.height || mainScreen.size.height * 0.9, + width: Math.floor(data.width || mainScreen.size.width * 0.7), + height: Math.floor(data.height || mainScreen.size.height * 0.9), minWidth: 493, minHeight: 376, fullscreenable: true, frame: "darwin" === process.platform, - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, titleBarStyle: "hidden", webPreferences: { contextIsolation: false, @@ -1143,7 +1217,7 @@ app.whenReady().then(() => { let tray; if ("win32" === process.platform || "linux" === process.platform) { // 系统托盘 - tray = new Tray(path.join(appDir, "stage", "icon-large.png")); + tray = new Tray(appIcon); tray.setToolTip(`{{ ${path.basename(data.workspaceDir)} }} <<< Sillot v${appVer}`); const mainWindow = getWindowByContentId(event.sender.id); if (!mainWindow) { @@ -1164,7 +1238,6 @@ app.whenReady().then(() => { await net.fetch(getServer(data.port) + "/api/system/uiproc?pid=" + process.pid, {method: "POST"}); }); ipcMain.on("siyuan-hotkey", (event, data) => { - globalShortcut.unregisterAll(); if (!data.hotkeys || data.hotkeys.length === 0) { return; } @@ -1173,31 +1246,32 @@ app.whenReady().then(() => { if (!shortcut) { return; } + if (globalShortcut.isRegistered(shortcut)) { + globalShortcut.unregister(shortcut); + } if (index === 0) { globalShortcut.register(shortcut, () => { - workspaces.forEach(workspaceItem => { + workspaces.find(workspaceItem => { const mainWindow = workspaceItem.browserWindow; - if (mainWindow.isMinimized()) { - mainWindow.restore(); - mainWindow.show(); // 按 `Alt+M` 后隐藏窗口,再次按 `Alt+M` 显示窗口后会卡住不能编辑 https://github.com/siyuan-note/siyuan/issues/8456 - } else { - if (mainWindow.isVisible()) { - if (1 === workspaces.length) { // 改进 `Alt+M` 激活窗口 https://github.com/siyuan-note/siyuan/issues/7258 + if (event.sender.id === mainWindow.webContents.id) { + if (mainWindow.isMinimized()) { + mainWindow.restore(); + mainWindow.show(); // 按 `Alt+M` 后隐藏窗口,再次按 `Alt+M` 显示窗口后会卡住不能编辑 https://github.com/siyuan-note/siyuan/issues/8456 + } else { + if (mainWindow.isVisible()) { if (!mainWindow.isFocused()) { mainWindow.show(); } else { hideWindow(mainWindow); } } else { - hideWindow(mainWindow); + mainWindow.show(); } - } else { - mainWindow.show(); } - } - - if ("win32" === process.platform || "linux" === process.platform) { - resetTrayMenu(workspaceItem.tray, data.languages, mainWindow); + if ("win32" === process.platform || "linux" === process.platform) { + resetTrayMenu(workspaceItem.tray, data.languages, mainWindow); + } + return true; } }); }); @@ -1226,7 +1300,7 @@ app.whenReady().then(() => { width: Math.floor(screen.getPrimaryDisplay().size.width * 0.6), height: Math.floor(screen.getPrimaryDisplay().workAreaSize.height * 0.8), frame: false, - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, webPreferences: { nodeIntegration: true, webviewTag: true, webSecurity: false, contextIsolation: false, }, @@ -1244,7 +1318,7 @@ app.whenReady().then(() => { lang: language, home: app.getPath("home"), v: appVer, - icon: path.join(appDir, "stage", "icon-large.png"), + icon: appIcon, }, }); firstOpenWindow.show(); @@ -1374,6 +1448,7 @@ app.whenReady().then(() => { const ignore = [ "localhost", "www.clarity.ms", + "cdn.jsdelivr.net", "127.0.0.1", "0.0.0.0", ] diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy index 94a841ee46..982b4c9a40 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20210615213222-vs5tzbd.sy @@ -5,7 +5,8 @@ "Properties": { "id": "20210615213222-vs5tzbd", "title": "Data history", - "updated": "20230422102255" + "type": "doc", + "updated": "20240402174245" }, "Children": [ { @@ -183,7 +184,7 @@ "ListData": {}, "Properties": { "id": "20220501135308-30uwxvd", - "updated": "20230403114455" + "updated": "20240402174245" }, "Children": [ { @@ -208,7 +209,15 @@ "Children": [ { "Type": "NodeText", - "Data": "Every 10 minutes, a history will be generated for the documents updated within these 10 minutes (the interval can be set by " + "Data": "Every 10 minutes, " + }, + { + "Type": "NodeText", + "Data": "a" + }, + { + "Type": "NodeText", + "Data": " history will be generated for the documents updated within these 10 minutes (the interval can be set by " }, { "Type": "NodeTextMark", @@ -272,7 +281,15 @@ "Children": [ { "Type": "NodeText", - "Data": "When synchronizing in the cloud, the local data covered by the cloud will generate a history, and the suffix of the history folder is " + "Data": "When synchronizing in the cloud, the local data covered by the cloud will generate " + }, + { + "Type": "NodeText", + "Data": "a" + }, + { + "Type": "NodeText", + "Data": " history, and the suffix of the history folder is " }, { "Type": "NodeTextMark", @@ -357,7 +374,15 @@ }, { "Type": "NodeText", - "Data": ", a history will be generated, and the suffix of the history folder is " + "Data": ", " + }, + { + "Type": "NodeText", + "Data": "a" + }, + { + "Type": "NodeText", + "Data": " history will be generated, and the suffix of the history folder is " }, { "Type": "NodeTextMark", @@ -405,7 +430,15 @@ }, { "Type": "NodeText", - "Data": ", a history will be generated, and the suffix of the history folder is " + "Data": ", " + }, + { + "Type": "NodeText", + "Data": "a" + }, + { + "Type": "NodeText", + "Data": " history will be generated, and the suffix of the history folder is " }, { "Type": "NodeTextMark", @@ -429,7 +462,7 @@ }, "Properties": { "id": "20230403114321-4rwhj6j", - "updated": "20230403114424" + "updated": "20240402174245" }, "Children": [ { @@ -437,7 +470,7 @@ "Type": "NodeParagraph", "Properties": { "id": "20230403114321-tou7etc", - "updated": "20230403114424" + "updated": "20240402174245" }, "Children": [ { @@ -451,7 +484,7 @@ }, { "Type": "NodeText", - "Data": "​, a history will be generated, and the suffix of the history folder " + "Data": "​, a history will be generated, and the suffix of the history folder is " }, { "Type": "NodeTextMark", @@ -465,6 +498,43 @@ ] } ] + }, + { + "ID": "20240402174218-u5vrt8y", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20240402174218-u5vrt8y", + "updated": "20240402174243" + }, + "Children": [ + { + "ID": "20240402174218-9x6w0bk", + "Type": "NodeParagraph", + "Properties": { + "id": "20240402174218-9x6w0bk", + "updated": "20240402174243" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "When dragging an outline item in the outline panel, a history will be generated, and the suffix of the history folder is " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "-outline" + }, + { + "Type": "NodeText", + "Data": "​" + } + ] + } + ] } ] }, diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.sy index ab52f1c24b..f6b5538514 100644 --- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.sy +++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20221223221636-ms2b4w9.sy @@ -6,7 +6,8 @@ "icon": "1f4f8", "id": "20221223221636-ms2b4w9", "title": "Flashcards", - "updated": "20240224103857" + "type": "doc", + "updated": "20240326165536" }, "Children": [ { @@ -88,7 +89,7 @@ "ListData": {}, "Properties": { "id": "20230219092249-yzjjb1o", - "updated": "20231013104018" + "updated": "20240326165536" }, "Children": [ { @@ -189,7 +190,7 @@ }, "Properties": { "id": "20231013103926-u4hxd38", - "updated": "20231013104018" + "updated": "20240326165536" }, "Children": [ { @@ -197,12 +198,12 @@ "Type": "NodeParagraph", "Properties": { "id": "20231013103926-o3y1n5a", - "updated": "20231013104018" + "updated": "20240326165536" }, "Children": [ { "Type": "NodeText", - "Data": "If a heading block is set as an flashcard, the heading block will be treated as a question and the blocks below it will be treated answers" + "Data": "If a heading block is set as a flashcard, the heading block will be treated as a question and the blocks below it will be treated answers" } ] } diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy index 8e106e97c1..1e806f1bf8 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20210615211733-v6rzowm.sy @@ -5,7 +5,8 @@ "Properties": { "id": "20210615211733-v6rzowm", "title": "数据历史", - "updated": "20240119210241" + "type": "doc", + "updated": "20240402173808" }, "Children": [ { @@ -183,7 +184,7 @@ "ListData": {}, "Properties": { "id": "20210403160319-ufy7jta", - "updated": "20230403114310" + "updated": "20240402173808" }, "Children": [ { @@ -208,7 +209,15 @@ "Children": [ { "Type": "NodeText", - "Data": "每隔 10 分钟会对这 10 分钟内更新过的文档生成历史(间隔时间可通过 " + "Data": "每隔 10 分钟会对这 10 分钟内更新过的文档生成历史(间隔" + }, + { + "Type": "NodeText", + "Data": "时间" + }, + { + "Type": "NodeText", + "Data": "可通过 " }, { "Type": "NodeTextMark", @@ -309,7 +318,15 @@ "Children": [ { "Type": "NodeText", - "Data": "手动删除笔记本、文档和资源文件时会生成历史,历史文件夹后缀为 " + "Data": "手动删除笔记本、文档和" + }, + { + "Type": "NodeText", + "Data": "资源文件" + }, + { + "Type": "NodeText", + "Data": "时会生成历史,历史文件夹后缀为 " }, { "Type": "NodeTextMark", @@ -465,6 +482,43 @@ ] } ] + }, + { + "ID": "20240402173746-e726apc", + "Type": "NodeListItem", + "ListData": { + "BulletChar": 42, + "Marker": "Kg==" + }, + "Properties": { + "id": "20240402173746-e726apc", + "updated": "20240402173808" + }, + "Children": [ + { + "ID": "20240402173746-k4p1tqy", + "Type": "NodeParagraph", + "Properties": { + "id": "20240402173746-k4p1tqy", + "updated": "20240402173808" + }, + "Children": [ + { + "Type": "NodeText", + "Data": "在大纲面板拖拽大纲项目时会生成历史,历史文件夹后缀为 " + }, + { + "Type": "NodeTextMark", + "TextMarkType": "code", + "TextMarkTextContent": "-outline" + }, + { + "Type": "NodeText", + "Data": "​" + } + ] + } + ] } ] }, diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.sy index 1e805cd671..ddc129fbbd 100644 --- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.sy +++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20221223215557-o6gfsoy.sy @@ -6,7 +6,8 @@ "icon": "1f4f8", "id": "20221223215557-o6gfsoy", "title": "闪卡", - "updated": "20240224103816" + "type": "doc", + "updated": "20240326165457" }, "Children": [ { @@ -88,7 +89,7 @@ "ListData": {}, "Properties": { "id": "20230219085658-xnrf7rf", - "updated": "20231013103850" + "updated": "20240326165457" }, "Children": [ { @@ -193,7 +194,7 @@ }, "Properties": { "id": "20231013103816-b0k440b", - "updated": "20231013103850" + "updated": "20240326165457" }, "Children": [ { @@ -201,12 +202,12 @@ "Type": "NodeParagraph", "Properties": { "id": "20231013103816-sx34w1r", - "updated": "20231013103850" + "updated": "20240326165457" }, "Children": [ { "Type": "NodeText", - "Data": "如果将标题块设置为上卡,则该标题块会被视作问题,其下方块会被视作答案" + "Data": "如果将标题块设置为闪卡,则该标题块会被视作问题,其下方块会被视作答案" } ] } diff --git a/app/nsis/installer.nsh b/app/nsis/installer.nsh index fd289428dd..2e0764bc5a 100644 --- a/app/nsis/installer.nsh +++ b/app/nsis/installer.nsh @@ -9,10 +9,10 @@ Caption "${PRODUCT_NAME} ${VERSION}" !macro customInstallMode ${IfNot} ${AtLeastWin10} - MessageBox mb_iconStop "抱歉,Windows 10 以下系统不受支持" + MessageBox mb_iconStop "❗ 抱歉,Windows 10 以下系统不受支持" Quit ${EndIf} - MessageBox MB_ICONEXCLAMATION|MB_OKCANCEL "数据无价,请勿在生产环节使用汐洛!安装前应当先备份重要文件!是否继续?$\n$\n" IDOK yes2 IDCANCEL no2 + MessageBox MB_ICONEXCLAMATION|MB_OKCANCEL "🚧 汐洛仅用于开发者测试,不要用来存储重要数据!$\n☢️ 安装前应当先备份重要文件!$\n$\n❓ 是否继续?$\n$\n" IDOK yes2 IDCANCEL no2 no2: Quit yes2: @@ -21,7 +21,7 @@ Caption "${PRODUCT_NAME} ${VERSION}" !macro customUnInit ${un.FindIt} "$INSTDIR" "data" $R0 ${If} -1 != $R0 - MessageBox MB_ICONSTOP "检测到安装路径下包含了工作空间数据 $R0,请将工作空间文件夹移到其他位置后再试。$\n$\n\ + MessageBox MB_ICONSTOP "❗ 检测到安装路径下包含了工作空间数据 $R0,请将工作空间文件夹移到其他位置后再试。$\n$\n\ The workspace data $R0 was detected in the installation path, please move the workspace folder to another location and try again.$\n" Quit ${EndIf} @@ -29,20 +29,20 @@ Caption "${PRODUCT_NAME} ${VERSION}" !macro customUnInstall ${IfNot} ${isUpdated} - MessageBox MB_YESNO "是否需要彻底删除全局配置($PROFILE\.config\siyuan\)?$\n$\n\ - Do you want to delete the global configuration ($PROFILE\.config\siyuan\)?$\n" \ + MessageBox MB_YESNO "❓ 是否需要彻底删除全局配置($PROFILE\.config\sillot\)$\n$\n\ + Do you want to delete the global configuration ($PROFILE\.config\sillot\)?$\n" \ /SD IDYES IDYES AcceptedRMConf IDNO SkippedRMConf AcceptedRMConf: - RMDir /r "$PROFILE\.config\siyuan\" + RMDir /r "$PROFILE\.config\sillot\" SkippedRMConf: ${EndIf} ${IfNot} ${isUpdated} - MessageBox MB_YESNO "是否需要彻底删除默认工作空间($PROFILE\SiYuan\)?$\n$\n\ - Do you want to completely delete the default workspace ($PROFILE\SiYuan\)?$\n" \ + MessageBox MB_YESNO "❓ 是否需要彻底删除默认工作空间($PROFILE\Sillot\)$\n$\n\ + Do you want to completely delete the default workspace ($PROFILE\Sillot\)?$\n" \ /SD IDNO IDYES AcceptedRMWorkspace IDNO SkippedRMWrokspace AcceptedRMWorkspace: - RMDir /r "$PROFILE\SiYuan\" + RMDir /r "$PROFILE\Sillot\" SkippedRMWrokspace: ${EndIf} !macroend @@ -111,4 +111,4 @@ Pop $R3 Pop $R2 Pop $R1 Exch $R0 -FunctionEnd \ No newline at end of file +FunctionEnd diff --git a/app/package.cli.mjs b/app/package.cli.mjs index 5b13c7ede8..d1ac1fe2f7 100644 --- a/app/package.cli.mjs +++ b/app/package.cli.mjs @@ -6,6 +6,7 @@ import inquirer from "inquirer"; import ora from "ora"; import fs from "fs"; import path from "path"; +import { spawn } from 'child_process'; const shell = (await import("shelljs")).default; const iconv = (await import("iconv-lite")).default; import pkg from "./package.json" assert { type: "json" }; @@ -42,13 +43,12 @@ function getCurrentDateTime() { return `${year}-${month}-${day} ${hour}:${minute}:${second}`; } -// 每秒更新一次spinner文本 -const intervalId = setInterval(updateSpinnerText, 1000); +const intervalId = setInterval(updateSpinnerText, 1000); // 每秒更新一次spinner文本 const works = { - a: { a01: "构建 build", a02: "检查 check", a03: "开发 dev" }, - a01: { a0101: "Win App 构建", a0102: "安卓构建" }, + a: { a01: "构建 build", a03: "开发 dev", a02: "检查 check" }, + a01: { a0101: "Win App 构建", a0102: "安卓构建", a0103: "生成本地版本 changelog" }, a02: { a0201: "升级 npm 包", a0202: "eslint(暂不支持)" }, - a03: { a0301: "生成本地版本 changelog" }, + a03: { a0301: "electron 调试", a0302: "electron 调试(使用 dlv 和 @electron-forge/cli)"}, }; inquirer .prompt([ @@ -111,6 +111,23 @@ function exeHandler(cmds, silent) { ); } + +function exeHandlerWindow(cmds) { + spinner.start(); + // 使用 spawn 创建一个新的进程 + const child = spawn(cmds, [], { shell: true, detached: true }); + + child.on('exit', (code) => { + clearInterval(intervalId); // 停止更新spinner文本 + console.log("Exit code:", code); + if (code === 0) { + spinner.succeed("Sillot mini cli work done. \t" + getCurrentDateTime()); + } else { + spinner.fail("Sillot mini cli work failed."); + } + }); +} + function doit(obj) { inquirer .prompt([ @@ -131,6 +148,45 @@ function doit(obj) { case works.a01.a0102: exeHandler("cd .. && .\\scripts\\sillot-android-build.bat", true); break; + case works.a01.a0103: + inquirer.prompt([ + { + name: "b", + type: "list", + message: "从何处获取思源更新", + choices: [ + { name: "Github milestone" }, + { name: "local changelog zh_CN.md(未正式发布的版本无该文件)" }, + { name: "local changelog.md(未正式发布的版本无该文件)" }, + ], + }, + ]) + .then((answers) => { + switch (answers.b) { + case "Github milestone": + exeHandler( + `cd .. && python .\\scripts\\parse-changelog2File-sillot.py -t ${V} -v ${SYV} -w github`, + true + ); + break; + case "local changelog": + exeHandler( + `cd .. && python .\\scripts\\parse-changelog2File-sillot.py -t ${V} -v ${SYV} -w local`, + true + ); + break; + default: + exeHandler( + `cd .. && python .\\scripts\\parse-changelog2File-sillot.py -t ${V} -v ${SYV} -w local_zh`, + true + ); + break; + } + }) + .catch((e) => { + eCatcher(e); + }); + break; case works.a02.a0201: exeHandler("set NPM_CHECK_INSTALLER=pnpm && npm-check -y", false); break; @@ -138,44 +194,10 @@ function doit(obj) { console.warn("敬请期待"); break; case works.a03.a0301: - inquirer - .prompt([ - { - name: "b", - type: "list", - message: "从何处获取思源更新", - choices: [ - { name: "Github milestone" }, - { name: "local changelog zh_CN" }, - { name: "local changelog" }, - ], - }, - ]) - .then((answers) => { - switch (answers.b) { - case "Github milestone": - exeHandler( - `cd .. && python .\\scripts\\parse-changelog2File-sillot.py -t ${V} -v ${SYV} -w github`, - true - ); - break; - case "local changelog": - exeHandler( - `cd .. && python .\\scripts\\parse-changelog2File-sillot.py -t ${V} -v ${SYV} -w local`, - true - ); - break; - default: - exeHandler( - `cd .. && python .\\scripts\\parse-changelog2File-sillot.py -t ${V} -v ${SYV} -w local_zh`, - true - ); - break; - } - }) - .catch((e) => { - eCatcher(e); - }); + console.warn("\n请手动执行 pnpm start 命令\n\n注意:内核可执行文件是否已经正确拉起\n"); + break; + case works.a03.a0302: + console.warn("\n请手动执行 pnpm dlv 命令\n\n注意:dlv debug 是否在独立终端运行中(需要在dlv里执行continue)?没有请先启动(终端工作路径是 kernel/main.go 所在目录),不需要内核调试则应该运行 pnpm run dev 命令\n"); break; } }) diff --git a/app/package.json b/app/package.json index fa999d9faa..98b03b14e5 100644 --- a/app/package.json +++ b/app/package.json @@ -1,9 +1,10 @@ { "name": "sillot", - "version": "0.27.29", - "syv": "3.0.5", - "sypv": "3.0.4", + "version": "0.28.14", + "syv": "3.0.7", + "sypv": "3.0.6", "description": "Build Your Eternal Digital Garden", + "author": "Soltus", "homepage": "https://github.com/Hi-Windom/Sillot", "repository": "https://github.com/Hi-Windom/Sillot", "main": "./electron/main.js", @@ -14,7 +15,7 @@ "packageManager": "pnpm@9.0.0-alpha.8", "scripts": { "cli": "node ./package.cli.mjs", - "dlv": "echo '注意:dlv debug 是否在独立终端运行中?没有请先启动,不需要内核调试则应该运行 pnpm run dev 命令\n' && pause && NODE_ENV=development MODE=dlv electron ./electron/main.js", + "dlv": "echo '注意:dlv debug 是否在独立终端运行中(需要在dlv里执行continue)?没有请先启动(终端工作路径是 kernel/main.go 所在目录),不需要内核调试则应该运行 pnpm run dev 命令\n' && pause && NODE_ENV=development MODE=dlv electron-forge start", "v": "pnpm version && echo '\npnpm:' && pnpm -v && echo '\n'", "git:tag": "git push origin --tags", "git:proxy": "git config --global http.proxy http://127.0.0.1:7890 && git config --global https.proxy http://127.0.0.1:7890 && echo '7890是 clash 默认端口'", @@ -83,8 +84,9 @@ "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", "@babel/runtime": "^7.24.0", + "@electron-forge/cli": "^7.3.1", "@emotion/react": "^11.11.4", - "@emotion/styled": "^11.11.0", + "@emotion/styled": "^11.11.5", "@mui/icons-material": "^5.15.13", "@mui/joy": "5.0.0-alpha.77", "@mui/material": "^5.15.13", @@ -97,11 +99,11 @@ "@simonwep/pickr": "^1.9.0", "@types/jest": "^29.5.12", "@types/lodash": "^4.17.0", - "@types/node": "^20.11.29", - "@types/react": "^18.2.70", - "@types/react-dom": "^18.2.22", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@types/node": "^20.12.3", + "@types/react": "^18.2.74", + "@types/react-dom": "^18.2.23", + "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/parser": "^7.5.0", "@wixc3/react-board": "^2.4.1", "babel-loader": "^9.1.3", "brace": "^0.11.1", @@ -111,7 +113,7 @@ "csstype": "^3.1.3", "date-fns": "^3.6.0", "ejs": "^3.1.9", - "electron": "30.0.0-beta.2", + "electron": "30.0.0-beta.5", "electron-builder": "^24.13.3", "electron-reloader": "^1.2.3", "encoding": "^0.1.13", @@ -126,7 +128,7 @@ "html-webpack-plugin": "^5.6.0", "iconv-lite": "^0.6.3", "ifdef-loader": "^2.3.2", - "inquirer": "^9.2.16", + "inquirer": "^9.2.17", "jest": "^29.7.0", "lodash": "4.17.21", "mini-css-extract-plugin": "2.8.1", @@ -142,7 +144,7 @@ "react-monaco-editor": "^0.55.0", "react-spinners": "^0.13.8", "react-toastify": "^10.0.5", - "rollup": "^4.13.0", + "rollup": "^4.14.0", "rollup-plugin-import-css": "^3.5.0", "rollup-plugin-postcss": "^4.0.2", "rome": "^12.1.3", diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml index 0bdaf70d97..b51646e472 100644 --- a/app/pnpm-lock.yaml +++ b/app/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: dependencies: '@electron/remote': specifier: ^2.1.0 - version: 2.1.2(electron@30.0.0-beta.2) + version: 2.1.2(electron@30.0.0-beta.5) '@monaco-editor/loader': specifier: ^1.4.0 version: 1.4.0(monaco-editor@0.47.0) @@ -54,39 +54,42 @@ importers: '@babel/runtime': specifier: ^7.24.0 version: 7.24.1 + '@electron-forge/cli': + specifier: ^7.3.1 + version: 7.3.1(encoding@0.1.13) '@emotion/react': specifier: ^11.11.4 - version: 11.11.4(@types/react@18.2.70)(react@18.2.0) + version: 11.11.4(@types/react@18.2.74)(react@18.2.0) '@emotion/styled': - specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) + specifier: ^11.11.5 + version: 11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) '@mui/icons-material': specifier: ^5.15.13 - version: 5.15.14(@mui/material@5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) + version: 5.15.14(@mui/material@5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) '@mui/joy': specifier: 5.0.0-alpha.77 - version: 5.0.0-alpha.77(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 5.0.0-alpha.77(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@mui/material': specifier: ^5.15.13 - version: 5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@rollup/plugin-babel': specifier: ^6.0.4 - version: 6.0.4(@babel/core@7.24.3)(rollup@4.13.0) + version: 6.0.4(@babel/core@7.24.3)(rollup@4.14.0) '@rollup/plugin-commonjs': specifier: ^25.0.7 - version: 25.0.7(rollup@4.13.0) + version: 25.0.7(rollup@4.14.0) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.13.0) + version: 6.1.0(rollup@4.14.0) '@rollup/plugin-node-resolve': specifier: ^15.2.3 - version: 15.2.3(rollup@4.13.0) + version: 15.2.3(rollup@4.14.0) '@rollup/plugin-sucrase': specifier: ^5.0.2 - version: 5.0.2(rollup@4.13.0) + version: 5.0.2(rollup@4.14.0) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.13.0) + version: 0.4.4(rollup@4.14.0) '@simonwep/pickr': specifier: ^1.9.0 version: 1.9.0 @@ -97,20 +100,20 @@ importers: specifier: ^4.17.0 version: 4.17.0 '@types/node': - specifier: ^20.11.29 - version: 20.11.30 + specifier: ^20.12.3 + version: 20.12.3 '@types/react': - specifier: ^18.2.70 - version: 18.2.70 + specifier: ^18.2.74 + version: 18.2.74 '@types/react-dom': - specifier: ^18.2.22 - version: 18.2.22 + specifier: ^18.2.23 + version: 18.2.23 '@typescript-eslint/eslint-plugin': - specifier: ^7.4.0 - version: 7.4.0(@typescript-eslint/parser@7.4.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3) + specifier: ^7.5.0 + version: 7.5.0(@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3) '@typescript-eslint/parser': - specifier: ^7.4.0 - version: 7.4.0(eslint@8.57.0)(typescript@5.4.3) + specifier: ^7.5.0 + version: 7.5.0(eslint@8.57.0)(typescript@5.4.3) '@wixc3/react-board': specifier: ^2.4.1 version: 2.4.1(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -139,8 +142,8 @@ importers: specifier: ^3.1.9 version: 3.1.9 electron: - specifier: 30.0.0-beta.2 - version: 30.0.0-beta.2 + specifier: 30.0.0-beta.5 + version: 30.0.0-beta.5 electron-builder: specifier: ^24.13.3 version: 24.13.3(electron-builder-squirrel-windows@24.13.3(dmg-builder@24.13.3)) @@ -184,11 +187,11 @@ importers: specifier: ^2.3.2 version: 2.3.2 inquirer: - specifier: ^9.2.16 - version: 9.2.16 + specifier: ^9.2.17 + version: 9.2.17 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.11.30) + version: 29.7.0(@types/node@20.12.3) lodash: specifier: 4.17.21 version: 4.17.21 @@ -224,7 +227,7 @@ importers: version: 4.24.2(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react-monaco-editor: specifier: ^0.55.0 - version: 0.55.0(@types/react@18.2.70)(monaco-editor@0.47.0)(react@18.2.0) + version: 0.55.0(@types/react@18.2.74)(monaco-editor@0.47.0)(react@18.2.0) react-spinners: specifier: ^0.13.8 version: 0.13.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -232,11 +235,11 @@ importers: specifier: ^10.0.5 version: 10.0.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) rollup: - specifier: ^4.13.0 - version: 4.13.0 + specifier: ^4.14.0 + version: 4.14.0 rollup-plugin-import-css: specifier: ^3.5.0 - version: 3.5.0(rollup@4.13.0) + version: 3.5.0(rollup@4.14.0) rollup-plugin-postcss: specifier: ^4.0.2 version: 4.0.2(postcss@8.4.38) @@ -278,7 +281,7 @@ importers: version: 5.3.10(esbuild@0.20.2)(webpack@5.91.0(esbuild@0.20.2)(webpack-cli@5.1.4)) ts-jest: specifier: ^29.1.2 - version: 29.1.2(@babel/core@7.24.3)(esbuild@0.20.2)(jest@29.7.0(@types/node@20.11.30))(typescript@5.4.3) + version: 29.1.2(@babel/core@7.24.3)(esbuild@0.20.2)(jest@29.7.0(@types/node@20.12.3))(typescript@5.4.3) ts-loader: specifier: ^9.5.1 version: 9.5.1(typescript@5.4.3)(webpack@5.91.0(esbuild@0.20.2)(webpack-cli@5.1.4)) @@ -989,6 +992,59 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} + '@electron-forge/cli@7.3.1': + resolution: {integrity: sha512-qPIeLxUO5d0xqiJZn0eZ17ytkDjFCN1acgrO/4B767PHsy5MmylyK0ulnRje/aQ/K+u/bN7N0cDyWs3JAEYZrQ==} + engines: {node: '>= 16.4.0'} + hasBin: true + + '@electron-forge/core-utils@7.3.1': + resolution: {integrity: sha512-+DLk6Futxb4576vi5FKjem1v9+D8EuaLVQy9Y3om7oYkc5JC3eTVSqbryVTEfoyNIm1xdZqya4tRSQ9v7EWu7A==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/core@7.3.1': + resolution: {integrity: sha512-Gveci4eAIk4zH/cS+reHqccoAN/qJPde9K/5TotNyNvu8l6QxGd+qJL4bqCixUUXdQ7Nq4tEG12gB/DtUHb6Bw==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/maker-base@7.3.1': + resolution: {integrity: sha512-FWQg2IIBodLh6ms6UvIRdQ4WiNUrUvlzUfIyKQ/DbMk9MUCxbzqY8YI76Uv5vna/rGdXf0lPOC48tpOgTREv/g==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/plugin-base@7.3.1': + resolution: {integrity: sha512-4mAzUqfOkRqBwFmE3yO+9dEM2nK9PN/UXFALjN42GS7hbLorluHVmzELkC48Y6M0k1Q+GN3NAdzfMiD+X2PWVA==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/publisher-base@7.3.1': + resolution: {integrity: sha512-2JMTbUfgBi11AkprTclyeGhn4dwN0rsDVzHYLwOZ08cWSMhvQ0zy/YznI4Yfl9pptirb9I9X8fLQMEK4XbeBQA==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/shared-types@7.3.1': + resolution: {integrity: sha512-yRW3UWd+AwtK1UrZxWCtxqnD1lF6e+1GWXdgR186/UX2CMy+jVzUtL4Xk+xMKrLgiVKZglVbTdee1cEb6egtVw==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-base@7.3.1': + resolution: {integrity: sha512-iGzjWeZlxoIdZMaLu4ABwG4AzI2/QEUMM9817mMVb24+7ZUTtrP8WJWkpsJjcEjXtb1oyt3CRoNqQt+iH6H1BA==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-vite-typescript@7.3.1': + resolution: {integrity: sha512-YS2arQENkpBbpFXk7SlAulK77OMLgcutjmZd0jW9Z/PUCUo9rdTW9QmlCNFz37tRHvwpClJcTcAoKpCoJUrIVA==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-vite@7.3.1': + resolution: {integrity: sha512-r1PFPZ2Y7t4EDte2HckTUiXQY1L++wofolm6TRzVv/h5ZViHq8vNBWvXTyZNtZOtqIErIRbGXHL1DbiRlgOMTg==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-webpack-typescript@7.3.1': + resolution: {integrity: sha512-cCFAuiKiKCNAJTXOgA3NTLAU6VQ0uYtGa6WiI8q5tK7d34Ef6zEuCKt5opI4zKXVdFrE0vYE0PBHH/M++z1g1w==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/template-webpack@7.3.1': + resolution: {integrity: sha512-SlzfFsOUVsx9Yk6Hhqqsw33s1/J1cx7eGkc9AVASKZnGHnFDGYUVyTr1ueR7SFQwZd5TOs7OISQ6sL2GQa4Icg==} + engines: {node: '>= 16.4.0'} + + '@electron-forge/tracer@7.3.1': + resolution: {integrity: sha512-Jz6SgnHZ2Gk4l7WRu/rLyQTe6F23dXcTNsjI5gtUEJxjjd2K9L0UoxVcGikA7SEMUufaPyskSJfrW7NSZ4s43Q==} + engines: {node: '>= 14.17.5'} + '@electron/asar@3.2.9': resolution: {integrity: sha512-Vu2P3X2gcZ3MY9W7yH72X9+AMXwUQZEJBrsPIbX0JsdllLtoh62/Q8Wg370/DawIEVKOyfD6KtTLo645ezqxUA==} engines: {node: '>=10.12.0'} @@ -998,6 +1054,10 @@ packages: resolution: {integrity: sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==} engines: {node: '>=12'} + '@electron/get@3.0.0': + resolution: {integrity: sha512-hLv4BYFiyrNRI+U0Mm2X7RxCCdJLkDUn8GCEp9QJzbLpZRko+UaLlCjOMkj6TEtirNLPyBA7y1SeGfnpOB21aQ==} + engines: {node: '>=14'} + '@electron/notarize@2.2.1': resolution: {integrity: sha512-aL+bFMIkpR0cmmj5Zgy0LMKEpgy43/hw5zadEArgmAMWWlKc5buwFvFT9G/o/YJkvXAJm5q3iuTuLaiaXW39sg==} engines: {node: '>= 10.0.0'} @@ -1007,6 +1067,16 @@ packages: engines: {node: '>=12.0.0'} hasBin: true + '@electron/packager@18.1.3': + resolution: {integrity: sha512-21T5MxUf7DwV07IIes3jO/571mXCjOGVPdmYJFPCVDTimFiHQSW0Oy+OIGQaKBiNIXfnP29KylsCQbmds6O6Iw==} + engines: {node: '>= 16.13.0'} + hasBin: true + + '@electron/rebuild@3.6.0': + resolution: {integrity: sha512-zF4x3QupRU3uNGaP5X1wjpmcjfw1H87kyqZ00Tc3HvriV+4gmOGuvQjGNkrJuXdsApssdNyVwLsy+TaeTGGcVw==} + engines: {node: '>=12.13.0'} + hasBin: true + '@electron/remote@2.1.2': resolution: {integrity: sha512-EPwNx+nhdrTBxyCqXt/pftoQg/ybtWDW3DUWHafejvnB1ZGGfMpv6e15D8KeempocjXe78T7WreyGGb3mlZxdA==} peerDependencies: @@ -1016,6 +1086,15 @@ packages: resolution: {integrity: sha512-kbgXxyEauPJiQQUNG2VgUeyfQNFk6hBF11ISN2PNI6agUgPl55pv4eQmaqHzTAzchBvqZ2tQuRVaPStGf0mxGw==} engines: {node: '>=8.6'} + '@electron/universal@2.0.1': + resolution: {integrity: sha512-fKpv9kg4SPmt+hY7SVBnIYULE9QJl8L3sCfcBsnqbJwwBwAeTLokJ9TRt9y7bK0JAzIW2y78TVVjvnQEms/yyA==} + engines: {node: '>=16.4'} + + '@electron/windows-sign@1.1.2': + resolution: {integrity: sha512-eXEiZjDtxW3QORCWfRUarANPRTlH9B6At4jqBZJ0NzokSGutXQUVLPA6WmGpIhDW6w2yCMdHW1EJd1HrXtU5sg==} + engines: {node: '>=14.14'} + hasBin: true + '@emotion/babel-plugin@11.11.0': resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} @@ -1043,11 +1122,14 @@ packages: '@emotion/serialize@1.1.3': resolution: {integrity: sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA==} + '@emotion/serialize@1.1.4': + resolution: {integrity: sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==} + '@emotion/sheet@1.2.2': resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} - '@emotion/styled@11.11.0': - resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} + '@emotion/styled@11.11.5': + resolution: {integrity: sha512-/ZjjnaNKvuMPxcIiUkf/9SHoG4Q196DRl1w82hQ3WCsjo1IUR8uaGWrC6a87CrYAW0Kb/pK7hk8BnLgLRi9KoQ==} peerDependencies: '@emotion/react': ^11.0.0-rc.0 '@types/react': '*' @@ -1241,6 +1323,9 @@ packages: '@floating-ui/utils@0.2.1': resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==} + '@gar/promisify@1.1.3': + resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} + '@humanwhocodes/config-array@0.11.14': resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -1359,6 +1444,10 @@ packages: resolution: {integrity: sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==} engines: {node: '>= 10'} + '@malept/cross-spawn-promise@2.0.0': + resolution: {integrity: sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==} + engines: {node: '>= 12.13.0'} + '@malept/flatpak-bundler@0.4.0': resolution: {integrity: sha512-9QOtNffcOF/c1seMCDnjckb3R9WHcG34tky+FHpNKKCW0wc/scYLwMtO+ptyGUfMW0/b/n4qRiALlaFHc9Oj7Q==} engines: {node: '>= 10.0.0'} @@ -1507,6 +1596,15 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@npmcli/fs@2.1.2': + resolution: {integrity: sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + '@npmcli/move-file@2.0.1': + resolution: {integrity: sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + deprecated: This functionality has been moved to @npmcli/fs + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -1589,73 +1687,85 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.13.0': - resolution: {integrity: sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==} + '@rollup/rollup-android-arm-eabi@4.14.0': + resolution: {integrity: sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.13.0': - resolution: {integrity: sha512-BSbaCmn8ZadK3UAQdlauSvtaJjhlDEjS5hEVVIN3A4bbl3X+otyf/kOJV08bYiRxfejP3DXFzO2jz3G20107+Q==} + '@rollup/rollup-android-arm64@4.14.0': + resolution: {integrity: sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.13.0': - resolution: {integrity: sha512-Ovf2evVaP6sW5Ut0GHyUSOqA6tVKfrTHddtmxGQc1CTQa1Cw3/KMCDEEICZBbyppcwnhMwcDce9ZRxdWRpVd6g==} + '@rollup/rollup-darwin-arm64@4.14.0': + resolution: {integrity: sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.13.0': - resolution: {integrity: sha512-U+Jcxm89UTK592vZ2J9st9ajRv/hrwHdnvyuJpa5A2ngGSVHypigidkQJP+YiGL6JODiUeMzkqQzbCG3At81Gg==} + '@rollup/rollup-darwin-x64@4.14.0': + resolution: {integrity: sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.13.0': - resolution: {integrity: sha512-8wZidaUJUTIR5T4vRS22VkSMOVooG0F4N+JSwQXWSRiC6yfEsFMLTYRFHvby5mFFuExHa/yAp9juSphQQJAijQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.14.0': + resolution: {integrity: sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.13.0': - resolution: {integrity: sha512-Iu0Kno1vrD7zHQDxOmvweqLkAzjxEVqNhUIXBsZ8hu8Oak7/5VTPrxOEZXYC1nmrBVJp0ZcL2E7lSuuOVaE3+w==} + '@rollup/rollup-linux-arm64-gnu@4.14.0': + resolution: {integrity: sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.13.0': - resolution: {integrity: sha512-C31QrW47llgVyrRjIwiOwsHFcaIwmkKi3PCroQY5aVq4H0A5v/vVVAtFsI1nfBngtoRpeREvZOkIhmRwUKkAdw==} + '@rollup/rollup-linux-arm64-musl@4.14.0': + resolution: {integrity: sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-riscv64-gnu@4.13.0': - resolution: {integrity: sha512-Oq90dtMHvthFOPMl7pt7KmxzX7E71AfyIhh+cPhLY9oko97Zf2C9tt/XJD4RgxhaGeAraAXDtqxvKE1y/j35lA==} + '@rollup/rollup-linux-powerpc64le-gnu@4.14.0': + resolution: {integrity: sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA==} + cpu: [ppc64le] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-gnu@4.14.0': + resolution: {integrity: sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.13.0': - resolution: {integrity: sha512-yUD/8wMffnTKuiIsl6xU+4IA8UNhQ/f1sAnQebmE/lyQ8abjsVyDkyRkWop0kdMhKMprpNIhPmYlCxgHrPoXoA==} + '@rollup/rollup-linux-s390x-gnu@4.14.0': + resolution: {integrity: sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.14.0': + resolution: {integrity: sha512-C6y6z2eCNCfhZxT9u+jAM2Fup89ZjiG5pIzZIDycs1IwESviLxwkQcFRGLjnDrP+PT+v5i4YFvlcfAs+LnreXg==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.13.0': - resolution: {integrity: sha512-9RyNqoFNdF0vu/qqX63fKotBh43fJQeYC98hCaf89DYQpv+xu0D8QFSOS0biA7cGuqJFOc1bJ+m2rhhsKcw1hw==} + '@rollup/rollup-linux-x64-musl@4.14.0': + resolution: {integrity: sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-win32-arm64-msvc@4.13.0': - resolution: {integrity: sha512-46ue8ymtm/5PUU6pCvjlic0z82qWkxv54GTJZgHrQUuZnVH+tvvSP0LsozIDsCBFO4VjJ13N68wqrKSeScUKdA==} + '@rollup/rollup-win32-arm64-msvc@4.14.0': + resolution: {integrity: sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.13.0': - resolution: {integrity: sha512-P5/MqLdLSlqxbeuJ3YDeX37srC8mCflSyTrUsgbU1c/U9j6l2g2GiIdYaGD9QjdMQPMSgYm7hgg0551wHyIluw==} + '@rollup/rollup-win32-ia32-msvc@4.14.0': + resolution: {integrity: sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.13.0': - resolution: {integrity: sha512-UKXUQNbO3DOhzLRwHSpa0HnhhCgNODvfoPWv2FCXme8N/ANFfhIPMGuOT+QuKd16+B5yxZ0HdpNlqPvTMS1qfw==} + '@rollup/rollup-win32-x64-msvc@4.14.0': + resolution: {integrity: sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag==} cpu: [x64] os: [win32] @@ -1812,8 +1922,8 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/node@20.11.30': - resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==} + '@types/node@20.12.3': + resolution: {integrity: sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1827,14 +1937,14 @@ packages: '@types/prop-types@15.7.11': resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} - '@types/react-dom@18.2.22': - resolution: {integrity: sha512-fHkBXPeNtfvri6gdsMYyW+dW7RXFo6Ad09nLFK0VQWR7yGLai/Cyvyj696gbwYvBnhGtevUG9cET0pmUbMtoPQ==} + '@types/react-dom@18.2.23': + resolution: {integrity: sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A==} '@types/react-transition-group@4.4.10': resolution: {integrity: sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==} - '@types/react@18.2.70': - resolution: {integrity: sha512-hjlM2hho2vqklPhopNkXkdkeq6Lv8WSZTpr7956zY+3WS5cfYUewtCzsJLsbW5dEv3lfSeQ4W14ZFeKC437JRQ==} + '@types/react@18.2.74': + resolution: {integrity: sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==} '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} @@ -1842,9 +1952,6 @@ packages: '@types/responselike@1.0.3': resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} - '@types/scheduler@0.16.8': - resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} - '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -1863,8 +1970,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@7.4.0': - resolution: {integrity: sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==} + '@typescript-eslint/eslint-plugin@7.5.0': + resolution: {integrity: sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1874,8 +1981,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.4.0': - resolution: {integrity: sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==} + '@typescript-eslint/parser@7.5.0': + resolution: {integrity: sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1884,12 +1991,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.4.0': - resolution: {integrity: sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==} + '@typescript-eslint/scope-manager@7.5.0': + resolution: {integrity: sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.4.0': - resolution: {integrity: sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==} + '@typescript-eslint/type-utils@7.5.0': + resolution: {integrity: sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1898,12 +2005,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.4.0': - resolution: {integrity: sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==} + '@typescript-eslint/types@7.5.0': + resolution: {integrity: sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.4.0': - resolution: {integrity: sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==} + '@typescript-eslint/typescript-estree@7.5.0': + resolution: {integrity: sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1911,14 +2018,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.4.0': - resolution: {integrity: sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==} + '@typescript-eslint/utils@7.5.0': + resolution: {integrity: sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.4.0': - resolution: {integrity: sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==} + '@typescript-eslint/visitor-keys@7.5.0': + resolution: {integrity: sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==} engines: {node: ^18.18.0 || >=20.0.0} '@ungap/structured-clone@1.2.0': @@ -2028,6 +2135,9 @@ packages: '@xtuc/long@4.2.2': resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} + abbrev@1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} @@ -2055,6 +2165,14 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + agentkeepalive@4.5.0: + resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==} + engines: {node: '>= 8.0.0'} + + aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -2127,6 +2245,9 @@ packages: dmg-builder: 24.13.3 electron-builder-squirrel-windows: 24.13.3 + aproba@2.0.0: + resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + archiver-utils@2.1.0: resolution: {integrity: sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==} engines: {node: '>= 6'} @@ -2139,6 +2260,10 @@ packages: resolution: {integrity: sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==} engines: {node: '>= 10'} + are-we-there-yet@3.0.1: + resolution: {integrity: sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -2225,6 +2350,10 @@ packages: resolution: {integrity: sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==} engines: {node: '>=10.12.0'} + author-regex@1.0.0: + resolution: {integrity: sha512-KbWgR8wOYRAPekEmMXrYYdc7BRyhn2Ftk7KWfMUnQ43hFdojWEFRxhhRUm3/OFEdPa1r0KAvTTg9YQK57xTe0g==} + engines: {node: '>=0.8'} + available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -2370,6 +2499,10 @@ packages: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} + cacache@16.1.3: + resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + cacheable-lookup@5.0.4: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} @@ -2468,6 +2601,10 @@ packages: resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} engines: {node: '>= 10.0'} + clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + clean-webpack-plugin@4.0.0: resolution: {integrity: sha512-WuWE1nyTNAyW5T7oNyys2EN0cfP2fdRxhxnIQWiAp0bMabPdHhoGxM8A6YL2GhqwgrPnnaemVE7nv5XJ2Fhh2w==} engines: {node: '>=10.0.0'} @@ -2548,6 +2685,10 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-support@1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true + colord@2.9.3: resolution: {integrity: sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==} @@ -2581,6 +2722,10 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + common-path-prefix@3.0.0: resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} @@ -2617,6 +2762,9 @@ packages: resolution: {integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==} engines: {node: '>=8'} + console-control-strings@1.1.0: + resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} @@ -2671,6 +2819,17 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true + cross-dirname@0.1.0: + resolution: {integrity: sha512-+R08/oI0nl3vfPcqftZRpytksBXDzOUveBq/NBVx0sUp1axwzPQrKinNx5yd5sxPu8j1wIy8AfnVQ+5eFdha6Q==} + + cross-spawn-windows-exe@1.2.0: + resolution: {integrity: sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw==} + engines: {node: '>= 10'} + + cross-spawn@6.0.5: + resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} + engines: {node: '>=4.8'} + cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2768,6 +2927,14 @@ packages: debounce@1.2.1: resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} + debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -2838,6 +3005,9 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + depcheck@1.4.7: resolution: {integrity: sha512-1lklS/bV5chOxwNKA/2XUUk/hPORp8zihZsXflr8x0kLwmcZ9Y9BsS6Hs3ssvA+2wUVbG0U2Ciqvm1SokNjPkA==} engines: {node: '>=10'} @@ -2850,6 +3020,10 @@ packages: resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==} engines: {node: '>=0.10.0'} + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -2864,6 +3038,9 @@ packages: dir-compare@3.3.0: resolution: {integrity: sha512-J7/et3WlGUCxjdnD3HAAzQ6nsnc0WL6DD7WcwJb7c39iH1+AWfg+9OqzJNaI6PkBwBvm1mhZNL9iY/nRiZXlPg==} + dir-compare@4.2.0: + resolution: {integrity: sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==} + dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -2969,8 +3146,8 @@ packages: electron-to-chromium@1.4.710: resolution: {integrity: sha512-w+9yAVHoHhysCa+gln7AzbO9CdjFcL/wN/5dd+XW/Msl2d/4+WisEaCF1nty0xbAKaxdaJfgLB2296U7zZB7BA==} - electron@30.0.0-beta.2: - resolution: {integrity: sha512-jTBM8RJotaroZLGuWbp/lWWysSbXG/8YSNF5rXwtM1Q3r//IfhA4EFnQC4VgTAaADyFPIXyQgoIRYjukElcPlQ==} + electron@30.0.0-beta.5: + resolution: {integrity: sha512-UULJwVGP4yKq4X6C1F0QITPiaEN4YJOIl8GUNLu2lGttuHGkItYV+3DopDYqhD8Qg9KFOXkSESfmQNVK5JBV5Q==} engines: {node: '>= 12.20.55'} hasBin: true @@ -3173,6 +3350,10 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} + execa@1.0.0: + resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} + engines: {node: '>=6'} + execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -3189,6 +3370,9 @@ packages: resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + exponential-backoff@3.1.1: + resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} + external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} @@ -3245,6 +3429,14 @@ packages: filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + filename-reserved-regex@2.0.0: + resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} + engines: {node: '>=4'} + + filenamify@4.3.0: + resolution: {integrity: sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==} + engines: {node: '>=8'} + fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -3256,6 +3448,10 @@ packages: find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} + find-up@2.1.0: + resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} + engines: {node: '>=4'} + find-up@3.0.0: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} @@ -3290,6 +3486,10 @@ packages: flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flora-colossus@2.0.0: + resolution: {integrity: sha512-dz4HxH6pOvbUzZpZ/yXhafjbR2I8cenK5xL0KtBFb7U2ADsR+OwXifnxZjij/pZWF775uSCMzWVd+jDik2H2IA==} + engines: {node: '>= 12'} + for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -3342,6 +3542,14 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + galactus@1.0.0: + resolution: {integrity: sha512-R1fam6D4CyKQGNlvJne4dkNF+PvUUl7TAJInvTGa9fti9qAv95quQz29GXapA4d8Ec266mJJxFVh82M4GIIGDQ==} + engines: {node: '>= 12'} + + gauge@4.0.4: + resolution: {integrity: sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + generic-names@4.0.0: resolution: {integrity: sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==} @@ -3357,10 +3565,17 @@ packages: resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} engines: {node: '>=18'} + get-installed-path@2.1.1: + resolution: {integrity: sha512-Qkn9eq6tW5/q9BDVdMpB8tOHljX9OSP0jRC5TRNVA4qRc839t4g8KQaR8t0Uv0EFVL0MlyG7m/ofjEgAROtYsA==} + get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-package-info@1.0.0: + resolution: {integrity: sha512-SCbprXGAPdIhKAXiG+Mk6yeoFH61JlYunqdFQFHDtLjJlDjFf6x07dsS8acO+xWt52jpdVo49AlVDnUVK1sDNw==} + engines: {node: '>= 4.0'} + get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} @@ -3511,6 +3726,9 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} + has-unicode@2.0.1: + resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} + has-yarn@2.1.0: resolution: {integrity: sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==} engines: {node: '>=8'} @@ -3593,6 +3811,9 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + humanize-ms@1.2.1: + resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + iconv-corefoundation@1.1.7: resolution: {integrity: sha512-T10qvkw0zz4wnm560lOEg0PovVqUXuOFhhHAkixw8/sycy7TJt7v/RrkEKEQnAw2viPSJu6iAkErxnzR0g8PpQ==} engines: {node: ^8.11.2 || >=10} @@ -3657,6 +3878,9 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} + infer-owner@1.0.4: + resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} + inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} @@ -3674,8 +3898,8 @@ packages: resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} engines: {node: '>=8.0.0'} - inquirer@9.2.16: - resolution: {integrity: sha512-qzgbB+yNjgSzk2omeqMDtO9IgJet/UL67luT1MaaggRpGK73DBQct5Q4pipwFQcIKK1GbMODYd4UfsRCkSP1DA==} + inquirer@9.2.17: + resolution: {integrity: sha512-Vr3Ia2ud5sGnioURkE69endl4SkeJcMzTF6SosKcX5GALJfId7C+JvO5ZZb6y1LOXnEofCPbwzoQ1q0e8Gaduw==} engines: {node: '>=18'} internal-slot@1.0.7: @@ -3690,6 +3914,10 @@ packages: resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} engines: {node: '>=10.13.0'} + ip-address@9.0.5: + resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} + engines: {node: '>= 12'} + is-array-buffer@3.0.4: resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} engines: {node: '>= 0.4'} @@ -3739,6 +3967,11 @@ packages: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + is-es2016-keyword@1.0.0: resolution: {integrity: sha512-JtZWPUwjdbQ1LIo9OSZ8MdkWEve198ors27vH+RzUUvZXXZkzXCxFnlUhzWYxy5IexQSRiXVw9j2q/tHMmkVYQ==} @@ -3777,6 +4010,9 @@ packages: resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==} engines: {node: '>=12'} + is-lambda@1.0.1: + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} + is-map@2.0.3: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} @@ -3850,6 +4086,10 @@ packages: resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} engines: {node: '>= 0.4'} + is-stream@1.1.0: + resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} + engines: {node: '>=0.10.0'} + is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -3896,6 +4136,10 @@ packages: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + is-yarn-global@0.3.0: resolution: {integrity: sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==} @@ -4103,6 +4347,9 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsbn@1.1.0: + resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} + jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -4155,6 +4402,10 @@ packages: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} + junk@3.1.0: + resolution: {integrity: sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==} + engines: {node: '>=8'} + keyv@3.1.0: resolution: {integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==} @@ -4195,6 +4446,19 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + listr2@5.0.8: + resolution: {integrity: sha512-mC73LitKHj9w6v30nLNGPetZIlfpUniNSsxxrbaPcWOjDb92SHPzJPi/t+v1YC/lxKz/AJ9egOjww0qUuFxBpA==} + engines: {node: ^14.13.1 || >=16.0.0} + peerDependencies: + enquirer: '>= 2.3.0 < 3' + peerDependenciesMeta: + enquirer: + optional: true + + load-json-file@2.0.0: + resolution: {integrity: sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==} + engines: {node: '>=4'} + load-yaml-file@0.2.0: resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} engines: {node: '>=6'} @@ -4215,6 +4479,10 @@ packages: resolution: {integrity: sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==} engines: {node: '>= 12.13.0'} + locate-path@2.0.0: + resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} + engines: {node: '>=4'} + locate-path@3.0.0: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} @@ -4246,6 +4514,9 @@ packages: lodash.flatten@4.4.0: resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} + lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} @@ -4272,6 +4543,10 @@ packages: resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==} engines: {node: '>=18'} + log-update@4.0.0: + resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} + engines: {node: '>=10'} + loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -4298,6 +4573,10 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} + lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} + engines: {node: '>=12'} + magic-string@0.30.8: resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==} engines: {node: '>=12'} @@ -4313,9 +4592,17 @@ packages: make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + make-fetch-happen@10.2.1: + resolution: {integrity: sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + map-age-cleaner@0.1.3: + resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} + engines: {node: '>=6'} + map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -4331,6 +4618,10 @@ packages: mdn-data@2.0.14: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} + mem@4.3.0: + resolution: {integrity: sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==} + engines: {node: '>=6'} + meow@9.0.0: resolution: {integrity: sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==} engines: {node: '>=10'} @@ -4407,6 +4698,26 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass-collect@1.0.2: + resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} + engines: {node: '>= 8'} + + minipass-fetch@2.1.2: + resolution: {integrity: sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + minipass-flush@1.0.5: + resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} + engines: {node: '>= 8'} + + minipass-pipeline@1.2.4: + resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} + engines: {node: '>=8'} + + minipass-sized@1.0.3: + resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} + engines: {node: '>=8'} + minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} engines: {node: '>=8'} @@ -4444,6 +4755,9 @@ packages: resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} engines: {node: '>=10'} + ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -4482,21 +4796,50 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + nice-try@1.0.5: + resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} + no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + node-abi@3.56.0: + resolution: {integrity: sha512-fZjdhDOeRcaS+rcpve7XuwHBmktS1nS1gzgghwKUQQ8nTy2FdSDr6ZT8k6YhvlJeHmmQMYiT/IH9hfco5zeW2Q==} + engines: {node: '>=10'} + node-addon-api@1.7.2: resolution: {integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==} + node-api-version@0.2.0: + resolution: {integrity: sha512-fthTTsi8CxaBXMaBAD7ST2uylwvsnYxh2PfaScwpMhos6KlSFajXQPcM4ogNE1q2s3Lbz9GCGqeIHC+C6OZnKg==} + node-emoji@1.11.0: resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==} + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-gyp@9.4.1: + resolution: {integrity: sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ==} + engines: {node: ^12.13 || ^14.13 || >=16} + hasBin: true + node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + nopt@6.0.0: + resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -4521,10 +4864,18 @@ packages: engines: {node: '>=10.9.0'} hasBin: true + npm-run-path@2.0.2: + resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} + engines: {node: '>=4'} + npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} + npmlog@6.0.2: + resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} @@ -4593,10 +4944,22 @@ packages: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} + p-defer@1.0.0: + resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} + engines: {node: '>=4'} + p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} + p-is-promise@2.1.0: + resolution: {integrity: sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==} + engines: {node: '>=6'} + + p-limit@1.3.0: + resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} + engines: {node: '>=4'} + p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -4609,6 +4972,10 @@ packages: resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-locate@2.0.0: + resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} + engines: {node: '>=4'} + p-locate@3.0.0: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} @@ -4629,6 +4996,10 @@ packages: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} + p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + p-queue@6.6.2: resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==} engines: {node: '>=8'} @@ -4637,6 +5008,10 @@ packages: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} engines: {node: '>=8'} + p-try@1.0.0: + resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} + engines: {node: '>=4'} + p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -4652,6 +5027,14 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-author@2.0.0: + resolution: {integrity: sha512-yx5DfvkN8JsHL2xk2Os9oTia467qnvRgey4ahSm2X8epehBLx/gWLcy5KI+Y36ful5DzGbCS6RazqZGgy1gHNw==} + engines: {node: '>=0.10.0'} + + parse-json@2.2.0: + resolution: {integrity: sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==} + engines: {node: '>=0.10.0'} + parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -4688,6 +5071,10 @@ packages: path-is-inside@1.0.2: resolution: {integrity: sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==} + path-key@2.0.1: + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} + engines: {node: '>=4'} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -4699,6 +5086,10 @@ packages: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} + path-type@2.0.0: + resolution: {integrity: sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==} + engines: {node: '>=4'} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -4977,6 +5368,11 @@ packages: resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} + postject@1.0.0-alpha.6: + resolution: {integrity: sha512-b9Eb8h2eVqNE8edvKdwqkrY6O7kAwmI8kcnBv1NScolYJbo59XUF0noFq+lxbC1yN20bmC0WBEbDC5H/7ASb0A==} + engines: {node: '>=14.0.0'} + hasBin: true + preferred-pm@3.1.3: resolution: {integrity: sha512-MkXsENfftWSRpzCzImcp4FRsCc3y1opwB73CfCNWyzMqArju2CrlMHlqB7VexKiPEOjGMbttv1r9fSCn5S610w==} engines: {node: '>=10'} @@ -5003,6 +5399,14 @@ packages: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} + promise-inflight@1.0.1: + resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true + promise-retry@2.0.1: resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} engines: {node: '>=10'} @@ -5097,6 +5501,10 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true + rcedit@4.0.1: + resolution: {integrity: sha512-bZdaQi34krFWhrDn+O53ccBDw0MkAT2Vhu75SqhtvhQu4OPyFM4RoVheyYiVQYdjhUi6EJMVWQ0tR6bCIYVkUg==} + engines: {node: '>= 14.0.0'} + react-dom@18.2.0: resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: @@ -5156,14 +5564,26 @@ packages: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} + read-binary-file-arch@1.0.6: + resolution: {integrity: sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==} + hasBin: true + read-config-file@6.3.2: resolution: {integrity: sha512-M80lpCjnE6Wt6zb98DoW8WHR09nzMSpu8XHtPkiTHrJ5Az9CybfeQhTJ8D7saeBHpGhLPIVyA8lcL6ZmdKwY6Q==} engines: {node: '>=12.0.0'} + read-pkg-up@2.0.0: + resolution: {integrity: sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==} + engines: {node: '>=4'} + read-pkg-up@7.0.1: resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} engines: {node: '>=8'} + read-pkg@2.0.0: + resolution: {integrity: sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==} + engines: {node: '>=4'} + read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} @@ -5271,6 +5691,10 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-package@1.0.1: + resolution: {integrity: sha512-rzB7NnQpOkPHBWFPP3prUMqOP6yg3HkRGgcvR+lDyvyHoY3fZLFLYDkPXh78SPVBAE6VTCk/V+j8we4djg6o4g==} + engines: {node: '>=4', npm: '>=2'} + resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} @@ -5308,6 +5732,9 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rfdc@1.3.1: + resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} + rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} hasBin: true @@ -5335,8 +5762,8 @@ packages: rollup-pluginutils@2.8.2: resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} - rollup@4.13.0: - resolution: {integrity: sha512-3YegKemjoQnYKmsBlOHfMLVPPA5xLkQ8MHLLSw/fBrFaVkEayL51DilPpNNLq1exr98F2B1TzrV0FUlN3gWRPg==} + rollup@4.14.0: + resolution: {integrity: sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -5453,6 +5880,9 @@ packages: serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -5468,10 +5898,18 @@ packages: shallowequal@1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} + shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} + shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -5514,6 +5952,10 @@ packages: resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} engines: {node: '>=8'} + slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} @@ -5532,6 +5974,14 @@ packages: resolution: {integrity: sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==} engines: {node: '>=10.2.0'} + socks-proxy-agent@7.0.0: + resolution: {integrity: sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==} + engines: {node: '>= 10'} + + socks@2.8.1: + resolution: {integrity: sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + sofill@1.1.4: resolution: {integrity: sha512-eowy89UHjTz0h1ieFoUsI3YTheXLNmuNQKjp6UeX+aUxPNe5iucF9zM87JS1IHeAoQFOlB0Q+GH2zO5qdZ5/gw==} peerDependencies: @@ -5594,6 +6044,10 @@ packages: sprintf-js@1.1.3: resolution: {integrity: sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==} + ssri@9.0.1: + resolution: {integrity: sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + stable@0.1.8: resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' @@ -5670,6 +6124,10 @@ packages: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} engines: {node: '>=8'} + strip-eof@1.0.0: + resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} + engines: {node: '>=0.10.0'} + strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} @@ -5686,6 +6144,10 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + strip-outer@1.0.1: + resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} + engines: {node: '>=0.10.0'} + style-inject@0.3.0: resolution: {integrity: sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw==} @@ -5709,6 +6171,9 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true + sudo-prompt@9.2.1: + resolution: {integrity: sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==} + sumchecker@3.0.1: resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==} engines: {node: '>= 8.0'} @@ -5827,6 +6292,9 @@ packages: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -5835,6 +6303,10 @@ packages: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} + trim-repeated@1.0.0: + resolution: {integrity: sha512-pkonvlKk8/ZuR0D5tLW8ljt5I8kmxp2XKymhepUeOdCEfKpZaktSArkLHZt76OB1ZvO9bssUsDty4SWhLvZpLg==} + engines: {node: '>=0.10.0'} + truncate-utf8-bytes@1.0.2: resolution: {integrity: sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==} @@ -5963,6 +6435,14 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} + unique-filename@2.0.1: + resolution: {integrity: sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + unique-slug@3.0.0: + resolution: {integrity: sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + unique-string@2.0.0: resolution: {integrity: sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==} engines: {node: '>=8'} @@ -5992,6 +6472,10 @@ packages: resolution: {integrity: sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==} engines: {node: '>=4'} + username@5.1.0: + resolution: {integrity: sha512-PCKbdWw85JsYMvmCv5GH3kXmM66rCd9m1hBEDutPNv94b/pqCMT4NtcKyeWYvLFiE8b+ha1Jdl8XAaUdPn5QTg==} + engines: {node: '>=8'} + utf8-byte-length@1.0.4: resolution: {integrity: sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA==} @@ -6029,6 +6513,9 @@ packages: wcwidth@1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webpack-bundle-analyzer@4.10.1: resolution: {integrity: sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==} engines: {node: '>= 10.13.0'} @@ -6072,6 +6559,9 @@ packages: webpack-cli: optional: true + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -6100,6 +6590,9 @@ packages: engines: {node: '>= 8'} hasBin: true + wide-align@1.1.5: + resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + widest-line@3.1.0: resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} engines: {node: '>=8'} @@ -6195,6 +6688,11 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} + yarn-or-npm@3.0.1: + resolution: {integrity: sha512-fTiQP6WbDAh5QZAVdbMQkecZoahnbOjClTQhzv74WX5h2Uaidj1isf9FDes11TKtsZ0/ZVfZsqZ+O3x6aLERHQ==} + engines: {node: '>=8.6.0'} + hasBin: true + yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} @@ -7174,41 +7672,239 @@ snapshots: '@discoveryjs/json-ext@0.5.7': dev: true - '@electron/asar@3.2.9': - dependencies: - commander: 5.1.0 - glob: 7.2.3 - minimatch: 3.1.2 - dev: true - - '@electron/get@2.0.3': + '@electron-forge/cli@7.3.1(encoding@0.1.13)': dependencies: + '@electron-forge/core': 7.3.1(encoding@0.1.13) + '@electron-forge/shared-types': 7.3.1 + '@electron/get': 3.0.0 + chalk: 4.1.2 + commander: 4.1.1 debug: 4.3.4 - env-paths: 2.2.1 - fs-extra: 8.1.0 - got: 11.8.6 - progress: 2.0.3 - semver: 6.3.1 - sumchecker: 3.0.1 - optionalDependencies: - global-agent: 3.0.0 + fs-extra: 10.1.0 + listr2: 5.0.8 + semver: 7.6.0 transitivePeerDependencies: + - bluebird + - encoding + - enquirer - supports-color + dev: true - '@electron/notarize@2.2.1': + '@electron-forge/core-utils@7.3.1': dependencies: + '@electron-forge/shared-types': 7.3.1 + '@electron/rebuild': 3.6.0 + '@malept/cross-spawn-promise': 2.0.0 + chalk: 4.1.2 debug: 4.3.4 - fs-extra: 9.1.0 - promise-retry: 2.0.1 + find-up: 5.0.0 + fs-extra: 10.1.0 + log-symbols: 4.1.0 + semver: 7.6.0 + yarn-or-npm: 3.0.1 transitivePeerDependencies: + - bluebird + - enquirer - supports-color dev: true - '@electron/osx-sign@1.0.5': - dependencies: - compare-version: 0.1.2 + '@electron-forge/core@7.3.1(encoding@0.1.13)': + dependencies: + '@electron-forge/core-utils': 7.3.1 + '@electron-forge/maker-base': 7.3.1 + '@electron-forge/plugin-base': 7.3.1 + '@electron-forge/publisher-base': 7.3.1 + '@electron-forge/shared-types': 7.3.1 + '@electron-forge/template-base': 7.3.1 + '@electron-forge/template-vite': 7.3.1 + '@electron-forge/template-vite-typescript': 7.3.1 + '@electron-forge/template-webpack': 7.3.1 + '@electron-forge/template-webpack-typescript': 7.3.1 + '@electron-forge/tracer': 7.3.1 + '@electron/get': 3.0.0 + '@electron/packager': 18.1.3 + '@electron/rebuild': 3.6.0 + '@malept/cross-spawn-promise': 2.0.0 + chalk: 4.1.2 debug: 4.3.4 - fs-extra: 10.1.0 + fast-glob: 3.3.2 + filenamify: 4.3.0 + find-up: 5.0.0 + fs-extra: 10.1.0 + got: 11.8.6 + interpret: 3.1.1 + listr2: 5.0.8 + lodash: 4.17.21 + log-symbols: 4.1.0 + node-fetch: 2.7.0(encoding@0.1.13) + progress: 2.0.3 + rechoir: 0.8.0 + resolve-package: 1.0.1 + semver: 7.6.0 + source-map-support: 0.5.21 + sudo-prompt: 9.2.1 + username: 5.1.0 + yarn-or-npm: 3.0.1 + transitivePeerDependencies: + - bluebird + - encoding + - enquirer + - supports-color + dev: true + + '@electron-forge/maker-base@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + fs-extra: 10.1.0 + which: 2.0.2 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/plugin-base@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/publisher-base@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/shared-types@7.3.1': + dependencies: + '@electron-forge/tracer': 7.3.1 + '@electron/packager': 18.1.3 + '@electron/rebuild': 3.6.0 + listr2: 5.0.8 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/template-base@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.3.4 + fs-extra: 10.1.0 + username: 5.1.0 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/template-vite-typescript@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + '@electron-forge/template-base': 7.3.1 + fs-extra: 10.1.0 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/template-vite@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + '@electron-forge/template-base': 7.3.1 + fs-extra: 10.1.0 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/template-webpack-typescript@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + '@electron-forge/template-base': 7.3.1 + fs-extra: 10.1.0 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/template-webpack@7.3.1': + dependencies: + '@electron-forge/shared-types': 7.3.1 + '@electron-forge/template-base': 7.3.1 + fs-extra: 10.1.0 + transitivePeerDependencies: + - bluebird + - enquirer + - supports-color + dev: true + + '@electron-forge/tracer@7.3.1': + dependencies: + chrome-trace-event: 1.0.3 + dev: true + + '@electron/asar@3.2.9': + dependencies: + commander: 5.1.0 + glob: 7.2.3 + minimatch: 3.1.2 + dev: true + + '@electron/get@2.0.3': + dependencies: + debug: 4.3.4 + env-paths: 2.2.1 + fs-extra: 8.1.0 + got: 11.8.6 + progress: 2.0.3 + semver: 6.3.1 + sumchecker: 3.0.1 + optionalDependencies: + global-agent: 3.0.0 + transitivePeerDependencies: + - supports-color + + '@electron/get@3.0.0': + dependencies: + debug: 4.3.4 + env-paths: 2.2.1 + fs-extra: 8.1.0 + got: 11.8.6 + progress: 2.0.3 + semver: 6.3.1 + sumchecker: 3.0.1 + optionalDependencies: + global-agent: 3.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + '@electron/notarize@2.2.1': + dependencies: + debug: 4.3.4 + fs-extra: 9.1.0 + promise-retry: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: true + + '@electron/osx-sign@1.0.5': + dependencies: + compare-version: 0.1.2 + debug: 4.3.4 + fs-extra: 10.1.0 isbinaryfile: 4.0.10 minimist: 1.2.8 plist: 3.1.0 @@ -7216,9 +7912,56 @@ snapshots: - supports-color dev: true - '@electron/remote@2.1.2(electron@30.0.0-beta.2)': + '@electron/packager@18.1.3': + dependencies: + '@electron/asar': 3.2.9 + '@electron/get': 3.0.0 + '@electron/notarize': 2.2.1 + '@electron/osx-sign': 1.0.5 + '@electron/universal': 2.0.1 + '@electron/windows-sign': 1.1.2 + cross-spawn-windows-exe: 1.2.0 + debug: 4.3.4 + extract-zip: 2.0.1 + filenamify: 4.3.0 + fs-extra: 11.2.0 + galactus: 1.0.0 + get-package-info: 1.0.0 + junk: 3.1.0 + parse-author: 2.0.0 + plist: 3.1.0 + rcedit: 4.0.1 + resolve: 1.22.8 + semver: 7.6.0 + yargs-parser: 21.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + '@electron/rebuild@3.6.0': dependencies: - electron: 30.0.0-beta.2 + '@malept/cross-spawn-promise': 2.0.0 + chalk: 4.1.2 + debug: 4.3.4 + detect-libc: 2.0.3 + fs-extra: 10.1.0 + got: 11.8.6 + node-abi: 3.56.0 + node-api-version: 0.2.0 + node-gyp: 9.4.1 + ora: 5.4.1 + read-binary-file-arch: 1.0.6 + semver: 7.6.0 + tar: 6.2.0 + yargs: 17.7.2 + transitivePeerDependencies: + - bluebird + - supports-color + dev: true + + '@electron/remote@2.1.2(electron@30.0.0-beta.5)': + dependencies: + electron: 30.0.0-beta.5 dev: false '@electron/universal@1.5.1': @@ -7234,6 +7977,30 @@ snapshots: - supports-color dev: true + '@electron/universal@2.0.1': + dependencies: + '@electron/asar': 3.2.9 + '@malept/cross-spawn-promise': 2.0.0 + debug: 4.3.4 + dir-compare: 4.2.0 + fs-extra: 11.2.0 + minimatch: 9.0.3 + plist: 3.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + '@electron/windows-sign@1.1.2': + dependencies: + cross-dirname: 0.1.0 + debug: 4.3.4 + fs-extra: 11.2.0 + minimist: 1.2.8 + postject: 1.0.0-alpha.6 + transitivePeerDependencies: + - supports-color + dev: true + '@emotion/babel-plugin@11.11.0': dependencies: '@babel/helper-module-imports': 7.24.1 @@ -7269,7 +8036,7 @@ snapshots: '@emotion/memoize@0.8.1': dev: true - '@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0)': + '@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 '@emotion/babel-plugin': 11.11.0 @@ -7278,7 +8045,7 @@ snapshots: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 - '@types/react': 18.2.70 + '@types/react': 18.2.74 hoist-non-react-statics: 3.3.2 react: 18.2.0 dev: true @@ -7292,19 +8059,28 @@ snapshots: csstype: 3.1.3 dev: true + '@emotion/serialize@1.1.4': + dependencies: + '@emotion/hash': 0.9.1 + '@emotion/memoize': 0.8.1 + '@emotion/unitless': 0.8.1 + '@emotion/utils': 1.2.1 + csstype: 3.1.3 + dev: true + '@emotion/sheet@1.2.2': dev: true - '@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0)': + '@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 '@emotion/babel-plugin': 11.11.0 '@emotion/is-prop-valid': 1.2.2 - '@emotion/react': 11.11.4(@types/react@18.2.70)(react@18.2.0) - '@emotion/serialize': 1.1.3 + '@emotion/react': 11.11.4(@types/react@18.2.74)(react@18.2.0) + '@emotion/serialize': 1.1.4 '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 - '@types/react': 18.2.70 + '@types/react': 18.2.74 react: 18.2.0 dev: true @@ -7462,6 +8238,9 @@ snapshots: '@floating-ui/utils@0.2.1': dev: true + '@gar/promisify@1.1.3': + dev: true + '@humanwhocodes/config-array@0.11.14': dependencies: '@humanwhocodes/object-schema': 2.0.2 @@ -7502,7 +8281,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -7516,14 +8295,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.11.30) + jest-config: 29.7.0(@types/node@20.12.3) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -7549,7 +8328,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 jest-mock: 29.7.0 dev: true @@ -7570,7 +8349,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 20.11.30 + '@types/node': 20.12.3 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -7594,7 +8373,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 20.11.30 + '@types/node': 20.12.3 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -7670,7 +8449,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 20.11.30 + '@types/node': 20.12.3 '@types/yargs': 17.0.32 chalk: 4.1.2 dev: true @@ -7713,6 +8492,11 @@ snapshots: cross-spawn: 7.0.3 dev: true + '@malept/cross-spawn-promise@2.0.0': + dependencies: + cross-spawn: 7.0.3 + dev: true + '@malept/flatpak-bundler@0.4.0': dependencies: debug: 4.3.4 @@ -7729,14 +8513,14 @@ snapshots: state-local: 1.0.7 dev: false - '@mui/base@5.0.0-alpha.127(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@mui/base@5.0.0-alpha.127(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 '@emotion/is-prop-valid': 1.2.2 - '@mui/types': 7.2.14(@types/react@18.2.70) - '@mui/utils': 5.15.14(@types/react@18.2.70)(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.74) + '@mui/utils': 5.15.14(@types/react@18.2.74)(react@18.2.0) '@popperjs/core': 2.11.8 - '@types/react': 18.2.70 + '@types/react': 18.2.74 clsx: 1.2.1 prop-types: 15.8.1 react: 18.2.0 @@ -7744,14 +8528,14 @@ snapshots: react-is: 18.2.0 dev: true - '@mui/base@5.0.0-beta.40(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@mui/base@5.0.0-beta.40(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 '@floating-ui/react-dom': 2.0.8(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@mui/types': 7.2.14(@types/react@18.2.70) - '@mui/utils': 5.15.14(@types/react@18.2.70)(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.74) + '@mui/utils': 5.15.14(@types/react@18.2.74)(react@18.2.0) '@popperjs/core': 2.11.8 - '@types/react': 18.2.70 + '@types/react': 18.2.74 clsx: 2.1.0 prop-types: 15.8.1 react: 18.2.0 @@ -7761,25 +8545,25 @@ snapshots: '@mui/core-downloads-tracker@5.15.14': dev: true - '@mui/icons-material@5.15.14(@mui/material@5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.2.70)(react@18.2.0)': + '@mui/icons-material@5.15.14(@mui/material@5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.2.74)(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 - '@mui/material': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - '@types/react': 18.2.70 + '@mui/material': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@types/react': 18.2.74 react: 18.2.0 dev: true - '@mui/joy@5.0.0-alpha.77(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@mui/joy@5.0.0-alpha.77(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 - '@emotion/react': 11.11.4(@types/react@18.2.70)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) - '@mui/base': 5.0.0-alpha.127(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.74)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) + '@mui/base': 5.0.0-alpha.127(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@mui/core-downloads-tracker': 5.15.14 - '@mui/system': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) - '@mui/types': 7.2.14(@types/react@18.2.70) - '@mui/utils': 5.15.14(@types/react@18.2.70)(react@18.2.0) - '@types/react': 18.2.70 + '@mui/system': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.74) + '@mui/utils': 5.15.14(@types/react@18.2.74)(react@18.2.0) + '@types/react': 18.2.74 clsx: 1.2.1 csstype: 3.1.3 prop-types: 15.8.1 @@ -7788,17 +8572,17 @@ snapshots: react-is: 18.2.0 dev: true - '@mui/material@5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@mui/material@5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 - '@emotion/react': 11.11.4(@types/react@18.2.70)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) - '@mui/base': 5.0.0-beta.40(@types/react@18.2.70)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.74)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) + '@mui/base': 5.0.0-beta.40(@types/react@18.2.74)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@mui/core-downloads-tracker': 5.15.14 - '@mui/system': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) - '@mui/types': 7.2.14(@types/react@18.2.70) - '@mui/utils': 5.15.14(@types/react@18.2.70)(react@18.2.0) - '@types/react': 18.2.70 + '@mui/system': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.74) + '@mui/utils': 5.15.14(@types/react@18.2.74)(react@18.2.0) + '@types/react': 18.2.74 '@types/react-transition-group': 4.4.10 clsx: 2.1.0 csstype: 3.1.3 @@ -7809,52 +8593,52 @@ snapshots: react-transition-group: 4.4.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0) dev: true - '@mui/private-theming@5.15.14(@types/react@18.2.70)(react@18.2.0)': + '@mui/private-theming@5.15.14(@types/react@18.2.74)(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 - '@mui/utils': 5.15.14(@types/react@18.2.70)(react@18.2.0) - '@types/react': 18.2.70 + '@mui/utils': 5.15.14(@types/react@18.2.74)(react@18.2.0) + '@types/react': 18.2.74 prop-types: 15.8.1 react: 18.2.0 dev: true - '@mui/styled-engine@5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(react@18.2.0)': + '@mui/styled-engine@5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 '@emotion/cache': 11.11.0 - '@emotion/react': 11.11.4(@types/react@18.2.70)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) + '@emotion/react': 11.11.4(@types/react@18.2.74)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) csstype: 3.1.3 prop-types: 15.8.1 react: 18.2.0 dev: true - '@mui/system@5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0)': + '@mui/system@5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 - '@emotion/react': 11.11.4(@types/react@18.2.70)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0) - '@mui/private-theming': 5.15.14(@types/react@18.2.70)(react@18.2.0) - '@mui/styled-engine': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@emotion/styled@11.11.0(@emotion/react@11.11.4(@types/react@18.2.70)(react@18.2.0))(@types/react@18.2.70)(react@18.2.0))(react@18.2.0) - '@mui/types': 7.2.14(@types/react@18.2.70) - '@mui/utils': 5.15.14(@types/react@18.2.70)(react@18.2.0) - '@types/react': 18.2.70 + '@emotion/react': 11.11.4(@types/react@18.2.74)(react@18.2.0) + '@emotion/styled': 11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0) + '@mui/private-theming': 5.15.14(@types/react@18.2.74)(react@18.2.0) + '@mui/styled-engine': 5.15.14(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@emotion/styled@11.11.5(@emotion/react@11.11.4(@types/react@18.2.74)(react@18.2.0))(@types/react@18.2.74)(react@18.2.0))(react@18.2.0) + '@mui/types': 7.2.14(@types/react@18.2.74) + '@mui/utils': 5.15.14(@types/react@18.2.74)(react@18.2.0) + '@types/react': 18.2.74 clsx: 2.1.0 csstype: 3.1.3 prop-types: 15.8.1 react: 18.2.0 dev: true - '@mui/types@7.2.14(@types/react@18.2.70)': + '@mui/types@7.2.14(@types/react@18.2.74)': dependencies: - '@types/react': 18.2.70 + '@types/react': 18.2.74 dev: true - '@mui/utils@5.15.14(@types/react@18.2.70)(react@18.2.0)': + '@mui/utils@5.15.14(@types/react@18.2.74)(react@18.2.0)': dependencies: '@babel/runtime': 7.24.1 '@types/prop-types': 15.7.11 - '@types/react': 18.2.70 + '@types/react': 18.2.74 prop-types: 15.8.1 react: 18.2.0 react-is: 18.2.0 @@ -7875,6 +8659,18 @@ snapshots: fastq: 1.17.1 dev: true + '@npmcli/fs@2.1.2': + dependencies: + '@gar/promisify': 1.1.3 + semver: 7.6.0 + dev: true + + '@npmcli/move-file@2.0.1': + dependencies: + mkdirp: 1.0.4 + rimraf: 3.0.2 + dev: true + '@pkgjs/parseargs@0.11.0': dev: true optional: true @@ -7890,114 +8686,122 @@ snapshots: react: 18.2.0 dev: true - '@rollup/plugin-babel@6.0.4(@babel/core@7.24.3)(rollup@4.13.0)': + '@rollup/plugin-babel@6.0.4(@babel/core@7.24.3)(rollup@4.14.0)': dependencies: '@babel/core': 7.24.3 '@babel/helper-module-imports': 7.24.1 - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) - rollup: 4.13.0 + '@rollup/pluginutils': 5.1.0(rollup@4.14.0) + rollup: 4.14.0 dev: true - '@rollup/plugin-commonjs@25.0.7(rollup@4.13.0)': + '@rollup/plugin-commonjs@25.0.7(rollup@4.14.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) + '@rollup/pluginutils': 5.1.0(rollup@4.14.0) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.8 - rollup: 4.13.0 + rollup: 4.14.0 dev: true - '@rollup/plugin-json@6.1.0(rollup@4.13.0)': + '@rollup/plugin-json@6.1.0(rollup@4.14.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) - rollup: 4.13.0 + '@rollup/pluginutils': 5.1.0(rollup@4.14.0) + rollup: 4.14.0 dev: true - '@rollup/plugin-node-resolve@15.2.3(rollup@4.13.0)': + '@rollup/plugin-node-resolve@15.2.3(rollup@4.14.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) + '@rollup/pluginutils': 5.1.0(rollup@4.14.0) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.13.0 + rollup: 4.14.0 dev: true - '@rollup/plugin-sucrase@5.0.2(rollup@4.13.0)': + '@rollup/plugin-sucrase@5.0.2(rollup@4.14.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) - rollup: 4.13.0 + '@rollup/pluginutils': 5.1.0(rollup@4.14.0) + rollup: 4.14.0 sucrase: 3.35.0 dev: true - '@rollup/plugin-terser@0.4.4(rollup@4.13.0)': + '@rollup/plugin-terser@0.4.4(rollup@4.14.0)': dependencies: - rollup: 4.13.0 + rollup: 4.14.0 serialize-javascript: 6.0.2 smob: 1.4.1 terser: 5.29.2 dev: true - '@rollup/pluginutils@5.1.0(rollup@4.13.0)': + '@rollup/pluginutils@5.1.0(rollup@4.14.0)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.13.0 + rollup: 4.14.0 + dev: true + + '@rollup/rollup-android-arm-eabi@4.14.0': dev: true + optional: true - '@rollup/rollup-android-arm-eabi@4.13.0': + '@rollup/rollup-android-arm64@4.14.0': dev: true optional: true - '@rollup/rollup-android-arm64@4.13.0': + '@rollup/rollup-darwin-arm64@4.14.0': dev: true optional: true - '@rollup/rollup-darwin-arm64@4.13.0': + '@rollup/rollup-darwin-x64@4.14.0': dev: true optional: true - '@rollup/rollup-darwin-x64@4.13.0': + '@rollup/rollup-linux-arm-gnueabihf@4.14.0': dev: true optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.13.0': + '@rollup/rollup-linux-arm64-gnu@4.14.0': dev: true optional: true - '@rollup/rollup-linux-arm64-gnu@4.13.0': + '@rollup/rollup-linux-arm64-musl@4.14.0': dev: true optional: true - '@rollup/rollup-linux-arm64-musl@4.13.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.14.0': dev: true optional: true - '@rollup/rollup-linux-riscv64-gnu@4.13.0': + '@rollup/rollup-linux-riscv64-gnu@4.14.0': dev: true optional: true - '@rollup/rollup-linux-x64-gnu@4.13.0': + '@rollup/rollup-linux-s390x-gnu@4.14.0': dev: true optional: true - '@rollup/rollup-linux-x64-musl@4.13.0': + '@rollup/rollup-linux-x64-gnu@4.14.0': dev: true optional: true - '@rollup/rollup-win32-arm64-msvc@4.13.0': + '@rollup/rollup-linux-x64-musl@4.14.0': dev: true optional: true - '@rollup/rollup-win32-ia32-msvc@4.13.0': + '@rollup/rollup-win32-arm64-msvc@4.14.0': dev: true optional: true - '@rollup/rollup-win32-x64-msvc@4.13.0': + '@rollup/rollup-win32-ia32-msvc@4.14.0': + dev: true + optional: true + + '@rollup/rollup-win32-x64-msvc@4.14.0': dev: true optional: true @@ -8099,7 +8903,7 @@ snapshots: dependencies: '@types/http-cache-semantics': 4.0.4 '@types/keyv': 3.1.4 - '@types/node': 20.11.30 + '@types/node': 20.12.3 '@types/responselike': 1.0.3 '@types/cookie@0.4.1': @@ -8107,7 +8911,7 @@ snapshots: '@types/cors@2.8.17': dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 dev: true '@types/debug@4.1.12': @@ -8132,18 +8936,18 @@ snapshots: '@types/fs-extra@9.0.13': dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 dev: true '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.11.30 + '@types/node': 20.12.3 dev: true '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 dev: true '@types/html-minifier-terser@6.1.0': @@ -8175,7 +8979,7 @@ snapshots: '@types/keyv@3.1.4': dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 '@types/lodash@4.17.0': dev: true @@ -8192,7 +8996,7 @@ snapshots: '@types/ms@0.7.34': dev: true - '@types/node@20.11.30': + '@types/node@20.12.3': dependencies: undici-types: 5.26.5 @@ -8204,7 +9008,7 @@ snapshots: '@types/plist@3.0.5': dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 xmlbuilder: 15.1.1 dev: true optional: true @@ -8212,20 +9016,19 @@ snapshots: '@types/prop-types@15.7.11': dev: true - '@types/react-dom@18.2.22': + '@types/react-dom@18.2.23': dependencies: - '@types/react': 18.2.70 + '@types/react': 18.2.74 dev: true '@types/react-transition-group@4.4.10': dependencies: - '@types/react': 18.2.70 + '@types/react': 18.2.74 dev: true - '@types/react@18.2.70': + '@types/react@18.2.74': dependencies: '@types/prop-types': 15.7.11 - '@types/scheduler': 0.16.8 csstype: 3.1.3 dev: true @@ -8234,10 +9037,7 @@ snapshots: '@types/responselike@1.0.3': dependencies: - '@types/node': 20.11.30 - - '@types/scheduler@0.16.8': - dev: true + '@types/node': 20.12.3 '@types/semver@7.5.8': dev: true @@ -8259,17 +9059,17 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 optional: true - '@typescript-eslint/eslint-plugin@7.4.0(@typescript-eslint/parser@7.4.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3)': + '@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.3))(eslint@8.57.0)(typescript@5.4.3)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/type-utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 eslint: 8.57.0 graphemer: 1.4.0 @@ -8282,12 +9082,12 @@ snapshots: - supports-color dev: true - '@typescript-eslint/parser@7.4.0(eslint@8.57.0)(typescript@5.4.3)': + '@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.3)': dependencies: - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.3) + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 eslint: 8.57.0 typescript: 5.4.3 @@ -8295,16 +9095,16 @@ snapshots: - supports-color dev: true - '@typescript-eslint/scope-manager@7.4.0': + '@typescript-eslint/scope-manager@7.5.0': dependencies: - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/visitor-keys': 7.5.0 dev: true - '@typescript-eslint/type-utils@7.4.0(eslint@8.57.0)(typescript@5.4.3)': + '@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.3)': dependencies: - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) - '@typescript-eslint/utils': 7.4.0(eslint@8.57.0)(typescript@5.4.3) + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.3) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.3) debug: 4.3.4 eslint: 8.57.0 ts-api-utils: 1.3.0(typescript@5.4.3) @@ -8313,13 +9113,13 @@ snapshots: - supports-color dev: true - '@typescript-eslint/types@7.4.0': + '@typescript-eslint/types@7.5.0': dev: true - '@typescript-eslint/typescript-estree@7.4.0(typescript@5.4.3)': + '@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.3)': dependencies: - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/visitor-keys': 7.4.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -8331,14 +9131,14 @@ snapshots: - supports-color dev: true - '@typescript-eslint/utils@7.4.0(eslint@8.57.0)(typescript@5.4.3)': + '@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.4.0 - '@typescript-eslint/types': 7.4.0 - '@typescript-eslint/typescript-estree': 7.4.0(typescript@5.4.3) + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.3) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -8346,9 +9146,9 @@ snapshots: - typescript dev: true - '@typescript-eslint/visitor-keys@7.4.0': + '@typescript-eslint/visitor-keys@7.5.0': dependencies: - '@typescript-eslint/types': 7.4.0 + '@typescript-eslint/types': 7.5.0 eslint-visitor-keys: 3.4.3 dev: true @@ -8520,6 +9320,9 @@ snapshots: '@xtuc/long@4.2.2': dev: true + abbrev@1.1.1: + dev: true + accepts@1.3.8: dependencies: mime-types: 2.1.35 @@ -8549,6 +9352,17 @@ snapshots: - supports-color dev: true + agentkeepalive@4.5.0: + dependencies: + humanize-ms: 1.2.1 + dev: true + + aggregate-error@3.1.0: + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + dev: true + ajv-formats@2.1.1(ajv@8.12.0): dependencies: ajv: 8.12.0 @@ -8658,6 +9472,9 @@ snapshots: - supports-color dev: true + aproba@2.0.0: + dev: true + archiver-utils@2.1.0: dependencies: glob: 7.2.3 @@ -8697,6 +9514,12 @@ snapshots: zip-stream: 4.1.1 dev: true + are-we-there-yet@3.0.1: + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.2 + dev: true + argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -8800,7 +9623,6 @@ snapshots: astral-regex@2.0.0: dev: true - optional: true async-exit-hook@2.0.1: dev: true @@ -8817,6 +9639,9 @@ snapshots: atomically@1.7.0: dev: false + author-regex@1.0.0: + dev: true + available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.0.0 @@ -9062,6 +9887,30 @@ snapshots: builtin-modules@3.3.0: dev: true + cacache@16.1.3: + dependencies: + '@npmcli/fs': 2.1.2 + '@npmcli/move-file': 2.0.1 + chownr: 2.0.0 + fs-minipass: 2.1.0 + glob: 8.1.0 + infer-owner: 1.0.4 + lru-cache: 7.18.3 + minipass: 3.3.6 + minipass-collect: 1.0.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + mkdirp: 1.0.4 + p-map: 4.0.0 + promise-inflight: 1.0.1 + rimraf: 3.0.2 + ssri: 9.0.1 + tar: 6.2.0 + unique-filename: 2.0.1 + transitivePeerDependencies: + - bluebird + dev: true + cacheable-lookup@5.0.4: {} cacheable-request@6.1.0: @@ -9202,6 +10051,9 @@ snapshots: source-map: 0.6.1 dev: true + clean-stack@2.2.0: + dev: true + clean-webpack-plugin@4.0.0(webpack@5.91.0(esbuild@0.20.2)(webpack-cli@5.1.4)): dependencies: del: 4.1.1 @@ -9229,7 +10081,6 @@ snapshots: slice-ansi: 3.0.0 string-width: 4.2.3 dev: true - optional: true cli-width@3.0.0: dev: true @@ -9293,6 +10144,9 @@ snapshots: color-name@1.1.4: dev: true + color-support@1.1.3: + dev: true + colord@2.9.3: dev: true @@ -9322,6 +10176,9 @@ snapshots: commander@8.3.0: dev: true + commander@9.5.0: + dev: true + common-path-prefix@3.0.0: dev: true @@ -9390,6 +10247,9 @@ snapshots: xdg-basedir: 4.0.0 dev: true + console-control-strings@1.1.0: + dev: true + convert-source-map@1.9.0: dev: true @@ -9450,13 +10310,13 @@ snapshots: dev: true optional: true - create-jest@29.7.0(@types/node@20.11.30): + create-jest@29.7.0(@types/node@20.12.3): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.11.30) + jest-config: 29.7.0(@types/node@20.12.3) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -9466,6 +10326,25 @@ snapshots: - ts-node dev: true + cross-dirname@0.1.0: + dev: true + + cross-spawn-windows-exe@1.2.0: + dependencies: + '@malept/cross-spawn-promise': 1.1.1 + is-wsl: 2.2.0 + which: 2.0.2 + dev: true + + cross-spawn@6.0.5: + dependencies: + nice-try: 1.0.5 + path-key: 2.0.1 + semver: 5.7.2 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + cross-spawn@7.0.3: dependencies: path-key: 3.1.1 @@ -9612,6 +10491,11 @@ snapshots: debounce@1.2.1: dev: true + debug@2.6.9: + dependencies: + ms: 2.0.0 + dev: true + debug@4.3.4: dependencies: ms: 2.1.2 @@ -9682,6 +10566,9 @@ snapshots: delayed-stream@1.0.0: dev: true + delegates@1.0.0: + dev: true + depcheck@1.4.7: dependencies: '@babel/parser': 7.24.1 @@ -9717,6 +10604,9 @@ snapshots: detect-file@1.0.0: dev: true + detect-libc@2.0.3: + dev: true + detect-newline@3.1.0: dev: true @@ -9732,6 +10622,12 @@ snapshots: minimatch: 3.1.2 dev: true + dir-compare@4.2.0: + dependencies: + minimatch: 3.1.2 + p-limit: 3.1.0 + dev: true + dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -9918,10 +10814,10 @@ snapshots: electron-to-chromium@1.4.710: dev: true - electron@30.0.0-beta.2: + electron@30.0.0-beta.5: dependencies: '@electron/get': 2.0.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 extract-zip: 2.0.1 transitivePeerDependencies: - supports-color @@ -9956,7 +10852,7 @@ snapshots: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.17 - '@types/node': 20.11.30 + '@types/node': 20.12.3 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -10322,6 +11218,17 @@ snapshots: events@3.3.0: dev: true + execa@1.0.0: + dependencies: + cross-spawn: 6.0.5 + get-stream: 4.1.0 + is-stream: 1.1.0 + npm-run-path: 2.0.2 + p-finally: 1.0.0 + signal-exit: 3.0.7 + strip-eof: 1.0.0 + dev: true + execa@5.1.1: dependencies: cross-spawn: 7.0.3 @@ -10352,6 +11259,9 @@ snapshots: jest-util: 29.7.0 dev: true + exponential-backoff@3.1.1: + dev: true + external-editor@3.1.0: dependencies: chardet: 0.7.0 @@ -10429,6 +11339,16 @@ snapshots: minimatch: 5.1.6 dev: true + filename-reserved-regex@2.0.0: + dev: true + + filenamify@4.3.0: + dependencies: + filename-reserved-regex: 2.0.0 + strip-outer: 1.0.1 + trim-repeated: 1.0.0 + dev: true + fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 @@ -10443,6 +11363,11 @@ snapshots: find-root@1.1.0: dev: true + find-up@2.1.0: + dependencies: + locate-path: 2.0.0 + dev: true + find-up@3.0.0: dependencies: locate-path: 3.0.0 @@ -10493,6 +11418,14 @@ snapshots: flatted@3.3.1: dev: true + flora-colossus@2.0.0: + dependencies: + debug: 4.3.4 + fs-extra: 10.1.0 + transitivePeerDependencies: + - supports-color + dev: true + for-each@0.3.3: dependencies: is-callable: 1.2.7 @@ -10567,6 +11500,27 @@ snapshots: functions-have-names@1.2.3: dev: true + galactus@1.0.0: + dependencies: + debug: 4.3.4 + flora-colossus: 2.0.0 + fs-extra: 10.1.0 + transitivePeerDependencies: + - supports-color + dev: true + + gauge@4.0.4: + dependencies: + aproba: 2.0.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + dev: true + generic-names@4.0.0: dependencies: loader-utils: 3.2.1 @@ -10581,6 +11535,11 @@ snapshots: get-east-asian-width@1.2.0: dev: true + get-installed-path@2.1.1: + dependencies: + global-modules: 1.0.0 + dev: true + get-intrinsic@1.2.4: dependencies: es-errors: 1.3.0 @@ -10589,6 +11548,16 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-package-info@1.0.0: + dependencies: + bluebird: 3.7.2 + debug: 2.6.9 + lodash.get: 4.4.2 + read-pkg-up: 2.0.0 + transitivePeerDependencies: + - supports-color + dev: true + get-package-type@0.1.0: dev: true @@ -10809,6 +11778,9 @@ snapshots: has-symbols: 1.0.3 dev: true + has-unicode@2.0.1: + dev: true + has-yarn@2.1.0: dev: true @@ -10921,6 +11893,11 @@ snapshots: human-signals@2.1.0: dev: true + humanize-ms@1.2.1: + dependencies: + ms: 2.1.2 + dev: true + iconv-corefoundation@1.1.7: dependencies: cli-truncate: 2.1.0 @@ -10990,6 +11967,9 @@ snapshots: indent-string@4.0.0: dev: true + infer-owner@1.0.4: + dev: true + inflight@1.0.6: dependencies: once: 1.4.0 @@ -11022,7 +12002,7 @@ snapshots: through: 2.3.8 dev: true - inquirer@9.2.16: + inquirer@9.2.17: dependencies: '@ljharb/through': 2.3.13 ansi-escapes: 4.3.2 @@ -11054,6 +12034,12 @@ snapshots: interpret@3.1.1: dev: true + ip-address@9.0.5: + dependencies: + jsbn: 1.1.0 + sprintf-js: 1.1.3 + dev: true + is-array-buffer@3.0.4: dependencies: call-bind: 1.0.7 @@ -11117,6 +12103,9 @@ snapshots: has-tostringtag: 1.0.2 dev: true + is-docker@2.2.1: + dev: true + is-es2016-keyword@1.0.0: dev: true @@ -11156,6 +12145,9 @@ snapshots: is-interactive@2.0.0: dev: true + is-lambda@1.0.1: + dev: true + is-map@2.0.3: dev: true @@ -11227,6 +12219,9 @@ snapshots: call-bind: 1.0.7 dev: true + is-stream@1.1.0: + dev: true + is-stream@2.0.1: dev: true @@ -11274,6 +12269,11 @@ snapshots: is-windows@1.0.2: dev: true + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + dev: true + is-yarn-global@0.3.0: dev: true @@ -11379,7 +12379,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -11400,16 +12400,16 @@ snapshots: - supports-color dev: true - jest-cli@29.7.0(@types/node@20.11.30): + jest-cli@29.7.0(@types/node@20.12.3): dependencies: '@jest/core': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.11.30) + create-jest: 29.7.0(@types/node@20.12.3) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.11.30) + jest-config: 29.7.0(@types/node@20.12.3) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -11420,12 +12420,12 @@ snapshots: - ts-node dev: true - jest-config@29.7.0(@types/node@20.11.30): + jest-config@29.7.0(@types/node@20.12.3): dependencies: '@babel/core': 7.24.3 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 babel-jest: 29.7.0(@babel/core@7.24.3) chalk: 4.1.2 ci-info: 3.9.0 @@ -11477,7 +12477,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -11489,7 +12489,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.11.30 + '@types/node': 20.12.3 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -11532,7 +12532,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 jest-util: 29.7.0 dev: true @@ -11572,7 +12572,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -11601,7 +12601,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 chalk: 4.1.2 cjs-module-lexer: 1.2.3 collect-v8-coverage: 1.0.2 @@ -11649,7 +12649,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -11670,7 +12670,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.11.30 + '@types/node': 20.12.3 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -11680,25 +12680,25 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true jest-worker@29.7.0: dependencies: - '@types/node': 20.11.30 + '@types/node': 20.12.3 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - jest@29.7.0(@types/node@20.11.30): + jest@29.7.0(@types/node@20.12.3): dependencies: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.11.30) + jest-cli: 29.7.0(@types/node@20.12.3) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -11723,6 +12723,9 @@ snapshots: argparse: 2.0.1 dev: true + jsbn@1.1.0: + dev: true + jsesc@0.5.0: dev: true @@ -11778,6 +12781,9 @@ snapshots: object.values: 1.2.0 dev: true + junk@3.1.0: + dev: true + keyv@3.1.0: dependencies: json-buffer: 3.0.0 @@ -11821,6 +12827,26 @@ snapshots: lines-and-columns@1.2.4: dev: true + listr2@5.0.8: + dependencies: + cli-truncate: 2.1.0 + colorette: 2.0.20 + log-update: 4.0.0 + p-map: 4.0.0 + rfdc: 1.3.1 + rxjs: 7.8.1 + through: 2.3.8 + wrap-ansi: 7.0.0 + dev: true + + load-json-file@2.0.0: + dependencies: + graceful-fs: 4.2.11 + parse-json: 2.2.0 + pify: 2.3.0 + strip-bom: 3.0.0 + dev: true + load-yaml-file@0.2.0: dependencies: graceful-fs: 4.2.11 @@ -11849,6 +12875,12 @@ snapshots: loader-utils@3.2.1: dev: true + locate-path@2.0.0: + dependencies: + p-locate: 2.0.0 + path-exists: 3.0.0 + dev: true + locate-path@3.0.0: dependencies: p-locate: 3.0.0 @@ -11885,6 +12917,9 @@ snapshots: lodash.flatten@4.4.0: dev: true + lodash.get@4.4.2: + dev: true + lodash.isplainobject@4.0.6: dev: true @@ -11915,6 +12950,14 @@ snapshots: is-unicode-supported: 1.3.0 dev: true + log-update@4.0.0: + dependencies: + ansi-escapes: 4.3.2 + cli-cursor: 3.1.0 + slice-ansi: 4.0.0 + wrap-ansi: 6.2.0 + dev: true + loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 @@ -11942,6 +12985,9 @@ snapshots: dependencies: yallist: 4.0.0 + lru-cache@7.18.3: + dev: true + magic-string@0.30.8: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -11960,11 +13006,39 @@ snapshots: make-error@1.3.6: dev: true + make-fetch-happen@10.2.1: + dependencies: + agentkeepalive: 4.5.0 + cacache: 16.1.3 + http-cache-semantics: 4.1.1 + http-proxy-agent: 5.0.0 + https-proxy-agent: 5.0.1 + is-lambda: 1.0.1 + lru-cache: 7.18.3 + minipass: 3.3.6 + minipass-collect: 1.0.2 + minipass-fetch: 2.1.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + negotiator: 0.6.3 + promise-retry: 2.0.1 + socks-proxy-agent: 7.0.0 + ssri: 9.0.1 + transitivePeerDependencies: + - bluebird + - supports-color + dev: true + makeerror@1.0.12: dependencies: tmpl: 1.0.5 dev: true + map-age-cleaner@0.1.3: + dependencies: + p-defer: 1.0.0 + dev: true + map-obj@1.0.1: dev: true @@ -11979,6 +13053,13 @@ snapshots: mdn-data@2.0.14: dev: true + mem@4.3.0: + dependencies: + map-age-cleaner: 0.1.3 + mimic-fn: 2.1.0 + p-is-promise: 2.1.0 + dev: true + meow@9.0.0: dependencies: '@types/minimist': 1.2.5 @@ -12067,6 +13148,35 @@ snapshots: minimist@1.2.8: dev: true + minipass-collect@1.0.2: + dependencies: + minipass: 3.3.6 + dev: true + + minipass-fetch@2.1.2: + dependencies: + minipass: 3.3.6 + minipass-sized: 1.0.3 + minizlib: 2.1.2 + optionalDependencies: + encoding: 0.1.13 + dev: true + + minipass-flush@1.0.5: + dependencies: + minipass: 3.3.6 + dev: true + + minipass-pipeline@1.2.4: + dependencies: + minipass: 3.3.6 + dev: true + + minipass-sized@1.0.3: + dependencies: + minipass: 3.3.6 + dev: true + minipass@3.3.6: dependencies: yallist: 4.0.0 @@ -12102,6 +13212,9 @@ snapshots: mrmime@2.0.0: dev: true + ms@2.0.0: + dev: true + ms@2.1.2: {} multimatch@5.0.0: @@ -12144,27 +13257,69 @@ snapshots: neo-async@2.6.2: dev: true + nice-try@1.0.5: + dev: true + no-case@3.0.4: dependencies: lower-case: 2.0.2 tslib: 2.6.2 dev: true + node-abi@3.56.0: + dependencies: + semver: 7.6.0 + dev: true + node-addon-api@1.7.2: dev: true optional: true + node-api-version@0.2.0: + dependencies: + semver: 7.6.0 + dev: true + node-emoji@1.11.0: dependencies: lodash: 4.17.21 dev: true + node-fetch@2.7.0(encoding@0.1.13): + dependencies: + encoding: 0.1.13 + whatwg-url: 5.0.0 + dev: true + + node-gyp@9.4.1: + dependencies: + env-paths: 2.2.1 + exponential-backoff: 3.1.1 + glob: 7.2.3 + graceful-fs: 4.2.11 + make-fetch-happen: 10.2.1 + nopt: 6.0.0 + npmlog: 6.0.2 + rimraf: 3.0.2 + semver: 7.6.0 + tar: 6.2.0 + which: 2.0.2 + transitivePeerDependencies: + - bluebird + - supports-color + dev: true + node-int64@0.4.0: dev: true node-releases@2.0.14: dev: true + nopt@6.0.0: + dependencies: + abbrev: 1.1.1 + dev: true + normalize-package-data@2.5.0: dependencies: hosted-git-info: 2.8.9 @@ -12222,11 +13377,24 @@ snapshots: - supports-color dev: true + npm-run-path@2.0.2: + dependencies: + path-key: 2.0.1 + dev: true + npm-run-path@4.0.1: dependencies: path-key: 3.1.1 dev: true + npmlog@6.0.2: + dependencies: + are-we-there-yet: 3.0.1 + console-control-strings: 1.1.0 + gauge: 4.0.4 + set-blocking: 2.0.0 + dev: true + nth-check@2.1.1: dependencies: boolbase: 1.0.0 @@ -12331,9 +13499,20 @@ snapshots: p-cancelable@2.1.1: {} + p-defer@1.0.0: + dev: true + p-finally@1.0.0: dev: true + p-is-promise@2.1.0: + dev: true + + p-limit@1.3.0: + dependencies: + p-try: 1.0.0 + dev: true + p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -12348,6 +13527,11 @@ snapshots: yocto-queue: 1.0.0 dev: true + p-locate@2.0.0: + dependencies: + p-limit: 1.3.0 + dev: true + p-locate@3.0.0: dependencies: p-limit: 2.3.0 @@ -12371,6 +13555,11 @@ snapshots: p-map@2.1.0: dev: true + p-map@4.0.0: + dependencies: + aggregate-error: 3.1.0 + dev: true + p-queue@6.6.2: dependencies: eventemitter3: 4.0.7 @@ -12382,6 +13571,9 @@ snapshots: p-finally: 1.0.0 dev: true + p-try@1.0.0: + dev: true + p-try@2.2.0: {} package-json@6.5.0: @@ -12403,6 +13595,16 @@ snapshots: callsites: 3.1.0 dev: true + parse-author@2.0.0: + dependencies: + author-regex: 1.0.0 + dev: true + + parse-json@2.2.0: + dependencies: + error-ex: 1.3.2 + dev: true + parse-json@5.2.0: dependencies: '@babel/code-frame': 7.24.1 @@ -12428,8 +13630,7 @@ snapshots: path-browserify@1.0.1: dev: true - path-exists@3.0.0: - dev: false + path-exists@3.0.0: {} path-exists@4.0.0: dev: true @@ -12443,6 +13644,9 @@ snapshots: path-is-inside@1.0.2: dev: true + path-key@2.0.1: + dev: true + path-key@3.1.1: dev: true @@ -12455,6 +13659,11 @@ snapshots: minipass: 7.0.4 dev: true + path-type@2.0.0: + dependencies: + pify: 2.3.0 + dev: true + path-type@4.0.0: dev: true @@ -12757,6 +13966,11 @@ snapshots: source-map-js: 1.2.0 dev: true + postject@1.0.0-alpha.6: + dependencies: + commander: 9.5.0 + dev: true + preferred-pm@3.1.3: dependencies: find-up: 5.0.0 @@ -12789,6 +14003,9 @@ snapshots: progress@2.0.3: {} + promise-inflight@1.0.1: + dev: true + promise-retry@2.0.1: dependencies: err-code: 2.0.3 @@ -12925,6 +14142,11 @@ snapshots: strip-json-comments: 2.0.1 dev: true + rcedit@4.0.1: + dependencies: + cross-spawn-windows-exe: 1.2.0 + dev: true + react-dom@18.2.0(react@18.2.0): dependencies: loose-envify: 1.4.0 @@ -12970,9 +14192,9 @@ snapshots: sortablejs: 1.15.2 dev: true - react-monaco-editor@0.55.0(@types/react@18.2.70)(monaco-editor@0.47.0)(react@18.2.0): + react-monaco-editor@0.55.0(@types/react@18.2.74)(monaco-editor@0.47.0)(react@18.2.0): dependencies: - '@types/react': 18.2.70 + '@types/react': 18.2.74 monaco-editor: 0.47.0 prop-types: 15.8.1 react: 18.2.0 @@ -13006,6 +14228,13 @@ snapshots: loose-envify: 1.4.0 dev: true + read-binary-file-arch@1.0.6: + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + read-config-file@6.3.2: dependencies: config-file-ts: 0.2.6 @@ -13016,6 +14245,12 @@ snapshots: lazy-val: 1.0.5 dev: true + read-pkg-up@2.0.0: + dependencies: + find-up: 2.1.0 + read-pkg: 2.0.0 + dev: true + read-pkg-up@7.0.1: dependencies: find-up: 4.1.0 @@ -13023,6 +14258,13 @@ snapshots: type-fest: 0.8.1 dev: true + read-pkg@2.0.0: + dependencies: + load-json-file: 2.0.0 + normalize-package-data: 2.5.0 + path-type: 2.0.0 + dev: true + read-pkg@5.2.0: dependencies: '@types/normalize-package-data': 2.4.4 @@ -13177,6 +14419,11 @@ snapshots: resolve-from@5.0.0: dev: true + resolve-package@1.0.1: + dependencies: + get-installed-path: 2.1.1 + dev: true + resolve-pkg-maps@1.0.0: dev: true @@ -13224,6 +14471,9 @@ snapshots: reusify@1.0.4: dev: true + rfdc@1.3.1: + dev: true + rimraf@2.7.1: dependencies: glob: 7.2.3 @@ -13244,10 +14494,10 @@ snapshots: sprintf-js: 1.1.3 optional: true - rollup-plugin-import-css@3.5.0(rollup@4.13.0): + rollup-plugin-import-css@3.5.0(rollup@4.14.0): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.13.0) - rollup: 4.13.0 + '@rollup/pluginutils': 5.1.0(rollup@4.14.0) + rollup: 4.14.0 dev: true rollup-plugin-postcss@4.0.2(postcss@8.4.38): @@ -13275,23 +14525,25 @@ snapshots: estree-walker: 0.6.1 dev: true - rollup@4.13.0: + rollup@4.14.0: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.13.0 - '@rollup/rollup-android-arm64': 4.13.0 - '@rollup/rollup-darwin-arm64': 4.13.0 - '@rollup/rollup-darwin-x64': 4.13.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.13.0 - '@rollup/rollup-linux-arm64-gnu': 4.13.0 - '@rollup/rollup-linux-arm64-musl': 4.13.0 - '@rollup/rollup-linux-riscv64-gnu': 4.13.0 - '@rollup/rollup-linux-x64-gnu': 4.13.0 - '@rollup/rollup-linux-x64-musl': 4.13.0 - '@rollup/rollup-win32-arm64-msvc': 4.13.0 - '@rollup/rollup-win32-ia32-msvc': 4.13.0 - '@rollup/rollup-win32-x64-msvc': 4.13.0 + '@rollup/rollup-android-arm-eabi': 4.14.0 + '@rollup/rollup-android-arm64': 4.14.0 + '@rollup/rollup-darwin-arm64': 4.14.0 + '@rollup/rollup-darwin-x64': 4.14.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.14.0 + '@rollup/rollup-linux-arm64-gnu': 4.14.0 + '@rollup/rollup-linux-arm64-musl': 4.14.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.14.0 + '@rollup/rollup-linux-riscv64-gnu': 4.14.0 + '@rollup/rollup-linux-s390x-gnu': 4.14.0 + '@rollup/rollup-linux-x64-gnu': 4.14.0 + '@rollup/rollup-linux-x64-musl': 4.14.0 + '@rollup/rollup-win32-arm64-msvc': 4.14.0 + '@rollup/rollup-win32-ia32-msvc': 4.14.0 + '@rollup/rollup-win32-x64-msvc': 4.14.0 fsevents: 2.3.3 dev: true @@ -13420,6 +14672,9 @@ snapshots: randombytes: 2.1.0 dev: true + set-blocking@2.0.0: + dev: true + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -13446,11 +14701,19 @@ snapshots: shallowequal@1.1.0: dev: true + shebang-command@1.2.0: + dependencies: + shebang-regex: 1.0.0 + dev: true + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 dev: true + shebang-regex@1.0.0: + dev: true + shebang-regex@3.0.0: dev: true @@ -13502,11 +14765,16 @@ snapshots: astral-regex: 2.0.0 is-fullwidth-code-point: 3.0.0 dev: true - optional: true + + slice-ansi@4.0.0: + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + dev: true smart-buffer@4.2.0: dev: true - optional: true smob@1.4.1: dev: true @@ -13544,6 +14812,21 @@ snapshots: - utf-8-validate dev: true + socks-proxy-agent@7.0.0: + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + socks: 2.8.1 + transitivePeerDependencies: + - supports-color + dev: true + + socks@2.8.1: + dependencies: + ip-address: 9.0.5 + smart-buffer: 4.2.0 + dev: true + sofill@1.1.4(@sillot/bridge@0.0.3)(typescript@5.4.3): dependencies: '@sillot/bridge': 0.0.3 @@ -13607,8 +14890,12 @@ snapshots: sprintf-js@1.0.3: dev: true - sprintf-js@1.1.3: - optional: true + sprintf-js@1.1.3: {} + + ssri@9.0.1: + dependencies: + minipass: 3.3.6 + dev: true stable@0.1.8: dev: true @@ -13721,6 +15008,9 @@ snapshots: strip-bom@4.0.0: dev: true + strip-eof@1.0.0: + dev: true + strip-final-newline@2.0.0: dev: true @@ -13735,6 +15025,11 @@ snapshots: strip-json-comments@3.1.1: dev: true + strip-outer@1.0.1: + dependencies: + escape-string-regexp: 1.0.5 + dev: true + style-inject@0.3.0: dev: true @@ -13764,6 +15059,9 @@ snapshots: ts-interface-checker: 0.1.13 dev: true + sudo-prompt@9.2.1: + dev: true + sumchecker@3.0.1: dependencies: debug: 4.3.4 @@ -13908,12 +15206,20 @@ snapshots: totalist@3.0.1: dev: true + tr46@0.0.3: + dev: true + tree-kill@1.2.2: dev: true trim-newlines@3.0.1: dev: true + trim-repeated@1.0.0: + dependencies: + escape-string-regexp: 1.0.5 + dev: true + truncate-utf8-bytes@1.0.2: dependencies: utf8-byte-length: 1.0.4 @@ -13927,13 +15233,13 @@ snapshots: ts-interface-checker@0.1.13: dev: true - ts-jest@29.1.2(@babel/core@7.24.3)(esbuild@0.20.2)(jest@29.7.0(@types/node@20.11.30))(typescript@5.4.3): + ts-jest@29.1.2(@babel/core@7.24.3)(esbuild@0.20.2)(jest@29.7.0(@types/node@20.12.3))(typescript@5.4.3): dependencies: '@babel/core': 7.24.3 bs-logger: 0.2.6 esbuild: 0.20.2 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.11.30) + jest: 29.7.0(@types/node@20.12.3) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -14058,6 +15364,16 @@ snapshots: unicode-property-aliases-ecmascript@2.1.0: dev: true + unique-filename@2.0.1: + dependencies: + unique-slug: 3.0.0 + dev: true + + unique-slug@3.0.0: + dependencies: + imurmurhash: 0.1.4 + dev: true + unique-string@2.0.0: dependencies: crypto-random-string: 2.0.0 @@ -14102,6 +15418,12 @@ snapshots: prepend-http: 2.0.0 dev: true + username@5.1.0: + dependencies: + execa: 1.0.0 + mem: 4.3.0 + dev: true + utf8-byte-length@1.0.4: dev: true @@ -14159,6 +15481,9 @@ snapshots: defaults: 1.0.4 dev: true + webidl-conversions@3.0.1: + dev: true + webpack-bundle-analyzer@4.10.1: dependencies: '@discoveryjs/json-ext': 0.5.7 @@ -14247,6 +15572,12 @@ snapshots: - uglify-js dev: true + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: true + which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 @@ -14305,6 +15636,11 @@ snapshots: isexe: 2.0.0 dev: true + wide-align@1.1.5: + dependencies: + string-width: 4.2.3 + dev: true + widest-line@3.1.0: dependencies: string-width: 4.2.3 @@ -14404,6 +15740,12 @@ snapshots: yargs-parser: 21.1.1 dev: true + yarn-or-npm@3.0.1: + dependencies: + cross-spawn: 6.0.5 + pkg-dir: 4.2.0 + dev: true + yauzl@2.10.0: dependencies: buffer-crc32: 0.2.13 diff --git a/app/scripts/genAppIndex.tpl.js b/app/scripts/genAppIndex.tpl.js index 2b98b76e50..ff567084d6 100644 --- a/app/scripts/genAppIndex.tpl.js +++ b/app/scripts/genAppIndex.tpl.js @@ -30,6 +30,7 @@ const T = ` <%- ndom.ReactApp.app3 %> <%- ndom.ReactApp.app4 %> <%- ndom.ReactApp.app5 %> +<%- ndom.PAG %> <%- scripts.loadingRefresh %> <%- scripts.Clarity %> diff --git a/app/scripts/genDesktopIndex.tpl.js b/app/scripts/genDesktopIndex.tpl.js index 681e29d417..ed5401cff7 100644 --- a/app/scripts/genDesktopIndex.tpl.js +++ b/app/scripts/genDesktopIndex.tpl.js @@ -29,6 +29,7 @@ const T = ` <%- ndom.ReactApp.app1 %> <%- ndom.ReactApp.app3 %> <%- ndom.ReactApp.app5 %> +<%- ndom.PAG %> <%- scripts.Clarity %> diff --git a/app/scripts/genDockerIndex.tpl.js b/app/scripts/genDockerIndex.tpl.js index aa9c129386..420b29e433 100644 --- a/app/scripts/genDockerIndex.tpl.js +++ b/app/scripts/genDockerIndex.tpl.js @@ -28,6 +28,7 @@ const T = ` <%- ndom.ReactApp.app1 %> <%- ndom.ReactApp.app3 %> <%- ndom.ReactApp.app5 %> +<%- ndom.PAG %> <%- scripts.Clarity %> diff --git a/app/scripts/genTPLData.js b/app/scripts/genTPLData.js index fed6e61d36..d542e50f33 100644 --- a/app/scripts/genTPLData.js +++ b/app/scripts/genTPLData.js @@ -135,6 +135,14 @@ exports.default = { app4: /*html*/ `
`, app5: /*html*/ `
`, }, + PAG: /*html*/ ` + + ` }, styles: { editorFontSize: /*html*/ ``, diff --git a/app/src/ai/actions.ts b/app/src/ai/actions.ts index 0dc904ccc4..19622fdde7 100644 --- a/app/src/ai/actions.ts +++ b/app/src/ai/actions.ts @@ -35,9 +35,9 @@ const editDialog = (customName: string, customMemo: string) => {
+
-
- +
`, width: isMobile() ? "92vw" : "520px", }); @@ -47,13 +47,13 @@ const editDialog = (customName: string, customMemo: string) => { const customElement = dialog.element.querySelector("textarea"); const btnsElement = dialog.element.querySelectorAll(".b3-button"); dialog.bindInput(customElement, () => { - (btnsElement[1] as HTMLButtonElement).click(); + (btnsElement[2] as HTMLButtonElement).click(); }); customElement.value = customMemo; - btnsElement[0].addEventListener("click", () => { + btnsElement[1].addEventListener("click", () => { dialog.destroy(); }); - btnsElement[1].addEventListener("click", () => { + btnsElement[2].addEventListener("click", () => { window.siyuan.storage[Constants.LOCAL_AI].find((subItem: { name: string, memo: string @@ -67,7 +67,7 @@ const editDialog = (customName: string, customMemo: string) => { }); dialog.destroy(); }); - btnsElement[2].addEventListener("click", () => { + btnsElement[0].addEventListener("click", () => { window.siyuan.storage[Constants.LOCAL_AI].find((subItem: { name: string, memo: string diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scss index 54d6b958b6..2698076b86 100644 --- a/app/src/assets/scss/business/_av.scss +++ b/app/src/assets/scss/business/_av.scss @@ -225,7 +225,7 @@ &__cell { box-sizing: border-box; position: relative; - padding: 5px; + padding: 5px 8px; flex-shrink: 0; border-right: 1px solid var(--b3-theme-surface-lighter); overflow: hidden; diff --git a/app/src/assets/scss/component/_list.scss b/app/src/assets/scss/component/_list.scss index 2923482c12..d9508f7574 100644 --- a/app/src/assets/scss/component/_list.scss +++ b/app/src/assets/scss/component/_list.scss @@ -7,7 +7,7 @@ &--background .b3-list-item { border-radius: var(--b3-border-radius); - &:hover:not(.b3-list-item--focus), + &:hover:not(.b3-list-item--focus):not(.dragover):not(.dragover__top):not(.dragover__bottom), &--focus:not(.dragover) { background-color: var(--b3-list-hover); } diff --git a/app/src/assets/scss/component/_menu.scss b/app/src/assets/scss/component/_menu.scss index 21f4400db3..deb1e84296 100644 --- a/app/src/assets/scss/component/_menu.scss +++ b/app/src/assets/scss/component/_menu.scss @@ -120,6 +120,8 @@ white-space: break-spaces; line-height: 26px; margin: 8px 0; + // 移动端面包屑过长 + word-wrap: break-word; } &__icon { @@ -297,6 +299,18 @@ } } + &__checked { + width: 22px; + height: 22px; + align-self: center; + margin-left: 8px; + color: var(--b3-theme-on-surface-light); + border-radius: var(--b3-border-radius); + padding: 4px; + box-sizing: border-box; + translate: var(--b3-transition); + } + &__separator { background-color: var(--b3-theme-surface-lighter); height: 1px; diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss index da586ecb9e..0472d1bae7 100644 --- a/app/src/assets/scss/protyle/_wysiwyg.scss +++ b/app/src/assets/scss/protyle/_wysiwyg.scss @@ -241,6 +241,15 @@ color: var(--b3-protyle-inline-fileref-color); } + span[data-type~="block-ref"], + span[data-type~="file-annotation-ref"] { + cursor: pointer; + + &:hover { + opacity: 1; + } + } + &.render-node { min-height: 32px; @@ -590,8 +599,6 @@ .protyle-wysiwyg[data-readonly="false"] { span[data-type~="inline-math"], span[data-type~="tag"], - span[data-type~="block-ref"], - span[data-type~="file-annotation-ref"], .protyle-action__language, .img > span:nth-child(2), .render-node { @@ -602,11 +609,6 @@ background-color: var(--b3-theme-surface-lighter); } - span[data-type~="block-ref"]:hover, - span[data-type~="file-annotation-ref"]:hover { - opacity: 1; - } - .code-block .protyle-action { -webkit-user-modify: read-only; diff --git a/app/src/assets/template/app/index.tpl b/app/src/assets/template/app/index.tpl index d83ff347ff..00cdd317da 100644 --- a/app/src/assets/template/app/index.tpl +++ b/app/src/assets/template/app/index.tpl @@ -51,6 +51,14 @@
+ + + + ${themeStyle} ${window.siyuan.languages.export} PDF